Public Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
ana::CompNormSyst Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/CAFAna/xsec_tuning/Ana2020/tuning/MECTuningUtils.h"

Inheritance diagram for ana::CompNormSyst:
ana::IRescaledSigmaSyst ana::ISyst

Public Member Functions

 CompNormSyst (const 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 Cut fSelCut
 
unsigned int fID
 

Static Private Attributes

static unsigned int sInstanceCount = 0
 

Detailed Description

Definition at line 181 of file MECTuningUtils.h.

Constructor & Destructor Documentation

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

Definition at line 184 of file MECTuningUtils.h.

References sigma(), and ana::weight.

185  : fID(sInstanceCount++),
186  IRescaledSigmaSyst("CompNormShift_" + std::to_string(sInstanceCount), "Component Normalization Shift " + std::to_string(sInstanceCount), sigmaScale),
187  fSelCut(selCut)
188  {}
unsigned int fID
static unsigned int sInstanceCount
IRescaledSigmaSyst(const std::string &shortName, const std::string &latexName, double sigmaScale=1.0)
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32

Member Function Documentation

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

Definition at line 175 of file MECTuningUtils.h.

175 { 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 ana::IRescaledSigmaSyst::SetSigmaScale ( double  sc)
inlineinherited

Definition at line 176 of file MECTuningUtils.h.

176 { fSigmaScale = sc; };
void ana::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 198 of file MECTuningUtils.h.

References sigma(), and wgt.

199  {
200  if (!fSelCut(sr))
201  return;
202 
203  double wgt = 1 + fSigmaScale * sigma;
204  if (wgt < 0)
205  wgt = 0;
206  weight *= wgt;
207  }
const Var weight
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 demo::DemoSyst1, ana::BeamSyst, ana::GenericSystComponentScale< T >, ana::GenericSystComponentScale< T >, ana::GenericSystComponentScale< T >, 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 ana::CompNormSyst::fID
private

Definition at line 193 of file MECTuningUtils.h.

const Cut ana::CompNormSyst::fSelCut
private

Definition at line 192 of file MECTuningUtils.h.

double ana::IRescaledSigmaSyst::fSigmaScale
protectedinherited

Definition at line 176 of file MECTuningUtils.h.

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

Definition at line 195 of file MECTuningUtils.h.


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