Public Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
jw::CompNormSyst Class Reference
Inheritance diagram for jw::CompNormSyst:
jw::IRescaledSigmaSyst ana::ISyst

Public Member Functions

 CompNormSyst (const ana::Cut &selCut, double sigmaScale=1.0)
 
void Shift (double sigma, caf::SRProxy *sr, double &weight) const override
 Perform the systematic shift. More...
 
double GetSigmaScale () const
 
void SetSigmaScale (double sc)
 
virtual const std::stringShortName () const final
 The name printed out to the screen. More...
 
virtual const std::stringLatexName () const final
 The name used on plots (ROOT's TLatex syntax) More...
 
virtual void TruthShift (double sigma, caf::SRNeutrinoProxy *nu, double &weight) const
 
virtual bool IsGenieReweight () const
 GENIE reweights can only provide +/-1,2sigma. More...
 

Protected Attributes

double fSigmaScale
 

Private Attributes

const ana::Cut fSelCut
 
unsigned int fID
 

Static Private Attributes

static unsigned int sInstanceCount = 0
 

Detailed Description

Definition at line 190 of file mec_tuning.C.

Constructor & Destructor Documentation

jw::CompNormSyst::CompNormSyst ( const ana::Cut selCut,
double  sigmaScale = 1.0 
)
inline

Definition at line 193 of file mec_tuning.C.

References sigma(), and ana::weight.

194  : fID(sInstanceCount++),
195  IRescaledSigmaSyst("CompNormShift_" + std::to_string(sInstanceCount), "Component Normalization Shift " + std::to_string(sInstanceCount), sigmaScale),
196  fSelCut(selCut)
197  {}
unsigned int fID
Definition: mec_tuning.C:202
const ana::Cut fSelCut
Definition: mec_tuning.C:201
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
static unsigned int sInstanceCount
Definition: mec_tuning.C:204
IRescaledSigmaSyst(const std::string &shortName, const std::string &latexName, double sigmaScale=1.0)
Definition: mec_tuning.C:182

Member Function Documentation

double jw::IRescaledSigmaSyst::GetSigmaScale ( ) const
inlineinherited

Definition at line 184 of file mec_tuning.C.

184 { return fSigmaScale; };
virtual bool ana::ISyst::IsGenieReweight ( ) const
inlinevirtualinherited

GENIE reweights can only provide +/-1,2sigma.

Reimplemented in ana::SummedSyst.

Definition at line 56 of file ISyst.h.

56 {return false;}
virtual const std::string& ana::ISyst::LatexName ( ) const
inlinefinalvirtualinherited

The name used on plots (ROOT's TLatex syntax)

Definition at line 30 of file ISyst.h.

References ana::ISyst::fLatexName, ana::ISyst::Shift(), sigma(), sr, and ana::weight.

Referenced by ana::PredictionInterp::DebugPlotColz(), GetGENIEShiftLabels(), ana::NuISyst::SaveTo(), SystsGENIEAna(), and WriteSystName().

30 {return fLatexName;}
std::string fLatexName
Definition: ISyst.h:60
void jw::IRescaledSigmaSyst::SetSigmaScale ( double  sc)
inlineinherited

Definition at line 185 of file mec_tuning.C.

185 { fSigmaScale = sc; };
void jw::CompNormSyst::Shift ( double  sigma,
caf::SRProxy sr,
double &  weight 
) const
overridevirtual

Perform the systematic shift.

Override this function if your systematic depends on non-SRNeutrino quantities. If it is SRNeutrino-only, implement the other function, and let this default forward to you when necessary.

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

Reimplemented from ana::ISyst.

Definition at line 207 of file mec_tuning.C.

References sigma(), and wgt.

208  {
209  if (!fSelCut(sr))
210  return;
211 
212  double wgt = 1 + fSigmaScale * sigma;
213  if (wgt < 0)
214  wgt = 0;
215  weight *= wgt;
216  }
const Var weight
const ana::Cut fSelCut
Definition: mec_tuning.C:201
const ana::Var wgt
double sigma(TH1F *hist, double percentile)
virtual const std::string& ana::ISyst::ShortName ( ) const
inlinefinalvirtualinherited
virtual void ana::ISyst::TruthShift ( double  sigma,
caf::SRNeutrinoProxy nu,
double &  weight 
) const
inlinevirtualinherited

For systematics that deal only with the neutrino truth and not any reconstruction/PID details. Systematics defined this way will work on nuTree-derived spectra too (e.g. denominators of efficiencies).

Reimplemented in ana::BeamSyst, demo::DemoSyst1, ana::GenericSystComponentScale< T >, ana::GenericSystComponentScale< T >, ana::GenericSystComponentScale< T >, ana::ReinteractionSyst, and ana::NOvARwgtSyst.

Definition at line 46 of file ISyst.h.

Referenced by ana::ISyst::Shift().

49  {
50  // Implement this function if your systematic depends only
51  // SRNeutrino. Left blank by default, since systematics using other
52  // information can do nothing sensible to the nuTree.
53  }

Member Data Documentation

unsigned int jw::CompNormSyst::fID
private

Definition at line 202 of file mec_tuning.C.

const ana::Cut jw::CompNormSyst::fSelCut
private

Definition at line 201 of file mec_tuning.C.

double jw::IRescaledSigmaSyst::fSigmaScale
protectedinherited

Definition at line 185 of file mec_tuning.C.

unsigned int jw::CompNormSyst::sInstanceCount = 0
staticprivate

Definition at line 204 of file mec_tuning.C.


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