Public Member Functions | List of all members
ana::WrongSignScale Class Reference

Wrong sign scale systematic up and dn by 30%. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/3FlavorAna/Systs/WrongSignSysts.h"

Inheritance diagram for ana::WrongSignScale:
ana::ISyst

Public Member Functions

 WrongSignScale ()
 
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...
 

Detailed Description

Wrong sign scale systematic up and dn by 30%.

Definition at line 8 of file WrongSignSysts.h.

Constructor & Destructor Documentation

ana::WrongSignScale::WrongSignScale ( )
inline

Definition at line 11 of file WrongSignSysts.h.

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

11 : ISyst("ScaleWS", "Wrong Sign Scale Systematic") {}
ISyst(const std::string &shortName, const std::string &latexName)
Definition: ISyst.cxx:10

Member Function Documentation

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::WrongSignScale::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 18 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, ana::WrongSignEnergyBinRHC::Shift(), sigma(), and caf::Proxy< caf::StandardRecord >::spill.

Referenced by ana::MyWrongSignScale::MyWrongSignScale(), ana::WrongSignEnergyBin::WrongSignEnergyBin(), ana::WrongSignEnergyBinRHC::WrongSignEnergyBinRHC(), WrongSignScale(), and ana::WrongSignScale100::WrongSignScale100().

19  {
20  bool rhc = sr->spill.isRHC;
21  bool fhc = sr->spill.isFHC;
22 
23  if(sr->mc.nnu == 0) return;
24  if(sr->mc.nu[0].pdg<0 && fhc) weight *= 1+0.3*sigma;
25  if(sr->mc.nu[0].pdg>0 && rhc) weight *= 1+0.3*sigma;
26  // do we want to apply this to all events or select cc only?
27  // do we want to weight ws in rhc only or in both beams?
28  // if(sr->mc.nu[0].iscc && sr->mc.nu[0].pdg < 0) weight *= 1+0.3*sigma;
29  }
caf::Proxy< caf::SRSpill > spill
Definition: SRProxy.h:2143
const Var weight
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
caf::Proxy< bool > isRHC
Definition: SRProxy.h:1376
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  }

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