Public Member Functions | Private Attributes | List of all members
ana::MyWrongSignScale Class Reference

#include "/cvmfs/"

Inheritance diagram for ana::MyWrongSignScale:

Public Member Functions

 MyWrongSignScale (const std::string &shortName, const std::string &latexName, double scaleFHC, double scaleRHC)
 MyWrongSignScale (const double scaleFHC, const double scaleRHC)
void Shift (double sigma, caf::SRProxy *sr, double &weight) const override
 Perform the systematic shift. More...
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...

Private Attributes

const double fScaleFHC
const double fScaleRHC

Detailed Description

Wrong sign scale systematic set by the user scalefhc scales the fhc ws scalerhc scales the rhc ws

Definition at line 64 of file WrongSignSysts.h.

Constructor & Destructor Documentation

ana::MyWrongSignScale::MyWrongSignScale ( const std::string shortName,
const std::string latexName,
double  scaleFHC,
double  scaleRHC 

Definition at line 67 of file WrongSignSysts.h.

71  : ISyst(shortName, latexName),
72  fScaleFHC(scaleFHC), fScaleRHC(scaleRHC)
73  {
74  }
const double fScaleFHC
const double fScaleRHC
string shortName
THUMBNAIL BLOCK: We need to make a thumbnail for each.
ISyst(const std::string &shortName, const std::string &latexName)
Definition: ISyst.cxx:10
ana::MyWrongSignScale::MyWrongSignScale ( const double  scaleFHC,
const double  scaleRHC 

Definition at line 76 of file WrongSignSysts.h.

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

77  : ISyst("MyWrongSignScale", "My Wrong Sign Scale Systematic"),
78  fScaleFHC(scaleFHC),
79  fScaleRHC(scaleRHC)
80  {
81  }
const double fScaleFHC
const double fScaleRHC
ISyst(const std::string &shortName, const std::string &latexName)
Definition: ISyst.cxx:10

Member Function Documentation

virtual bool ana::ISyst::IsGenieReweight ( ) const

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

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::MyWrongSignScale::Shift ( double  sigma,
caf::SRProxy sr,
double &  weight 
) const

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.

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 98 of file WrongSignSysts.cxx.

References caf::Proxy< caf::SRSpill >::isFHC, caf::Proxy< caf::SRSpill >::isRHC, caf::Proxy< caf::StandardRecord >::mc, caf::Proxy< caf::SRTruthBranch >::nnu, caf::Proxy< caf::SRTruthBranch >::nu, sigma(), and caf::Proxy< caf::StandardRecord >::spill.

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

99  {
100  bool rhc = sr->spill.isRHC;
101  bool fhc = sr->spill.isFHC;
103  if(sr->mc.nnu == 0) return;
104  if(sr->[0].pdg<0 && fhc) weight *= 1 + fScaleFHC*sigma;
105  if(sr->[0].pdg>0 && rhc) weight *= 1 + fScaleRHC*sigma;
106  }
caf::Proxy< caf::SRSpill > spill
Definition: SRProxy.h:2143
const Var weight
const double fScaleFHC
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:618
caf::Proxy< short int > nnu
Definition: SRProxy.h:617
caf::Proxy< bool > isFHC
Definition: SRProxy.h:1375
double sigma(TH1F *hist, double percentile)
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2138
const double fScaleRHC
caf::Proxy< bool > isRHC
Definition: SRProxy.h:1376
virtual const std::string& ana::ISyst::ShortName ( ) const
virtual void ana::ISyst::TruthShift ( double  sigma,
caf::SRNeutrinoProxy nu,
double &  weight 
) const

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

const double ana::MyWrongSignScale::fScaleFHC

Definition at line 89 of file WrongSignSysts.h.

const double ana::MyWrongSignScale::fScaleRHC

Definition at line 90 of file WrongSignSysts.h.

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