All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
ToyEnergyScaleSyst Class Reference

#include <toysysts.h>

Inheritance diagram for ToyEnergyScaleSyst:
ana::ISyst

Public Member Functions

 ToyEnergyScaleSyst ()
 
void Shift (double sigma, caf::SRSliceProxy *sr, double &weight) const override
 Perform the systematic shift. More...
 
- Public Member Functions inherited from ana::ISyst
 ISyst (const std::string &shortName, const std::string &latexName, bool applyPenalty=true, double min=-3, double max=+3)
 
 ISyst (const ISyst &)=delete
 
 ISyst (ISyst &&rhs)=delete
 
virtual ~ISyst ()
 
void operator= (const ISyst &)=delete
 
void operator= (ISyst &&)=delete
 
virtual std::string ShortName () const final
 The name printed out to the screen. More...
 
virtual std::string LatexName () const final
 The name used on plots (ROOT's TLatex syntax) More...
 
virtual double Penalty (double x) const
 
virtual bool ApplyPenalty () const
 Should a penalty be applied for this shift? More...
 
virtual double Min () const
 Return the min/max value for this syst. More...
 
virtual double Max () const
 
virtual int PredInterpMaxNSigma () const
 

Detailed Description

Definition at line 5 of file toysysts.h.

Constructor & Destructor Documentation

ToyEnergyScaleSyst::ToyEnergyScaleSyst ( )
inline

Definition at line 8 of file toysysts.h.

8 : ISyst("toyEScale", "Toy Energy Scale") {}
ISyst(const std::string &shortName, const std::string &latexName, bool applyPenalty=true, double min=-3, double max=+3)
Definition: ISyst.cxx:9

Member Function Documentation

void ToyEnergyScaleSyst::Shift ( double  sigma,
caf::SRSliceProxy sr,
double &  weight 
) const
inlineoverridevirtual

Perform the systematic shift.

Parameters
sigmaNumber of sigma to shift record by
srThe record to inspect and alter
weightScale this weight for reweighting systematics

Implements ana::ISyst.

Definition at line 9 of file toysysts.h.

12  {
13  const double scale = 1 + .05*sigma; // 5% E scale syst.
14 
15  sr->reco.reco_energy *= scale;
16  }

The documentation for this class was generated from the following file: