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

Nus group systematic applied as a flat shift only dependent on NC or CC. More...

#include "/cvmfs/"

Inheritance diagram for ana::Nus18FlatSyst:

Public Member Functions

 Nus18FlatSyst (const std::string &systname, const std::string &latexname, const std::string &det, const std::string &polarity, const double &ncWei, const double &bgWei)
 ~Nus18FlatSyst ()
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

double fNCWei
double fBGWei
std::string fDet
std::string fPolarity

Detailed Description

Nus group systematic applied as a flat shift only dependent on NC or CC.

Definition at line 68 of file Nus18Systs.h.

Constructor & Destructor Documentation

ana::Nus18FlatSyst::Nus18FlatSyst ( const std::string systname,
const std::string latexname,
const std::string det,
const std::string polarity,
const double &  ncWei,
const double &  bgWei 

Definition at line 357 of file Nus18Systs.cxx.

363  : ISyst(std::string(polarity)+std::string("_")+std::string(det)+std::string("_")+systname, latexname),
364  fNCWei(ncWei/100.),
365  fBGWei(bgWei/100.),
366  fDet(det),
367  fPolarity(polarity) {
368  }
std::string fDet
Definition: Nus18Systs.h:81
std::string fPolarity
Definition: Nus18Systs.h:82
ISyst(const std::string &shortName, const std::string &latexName)
Definition: ISyst.cxx:10
enum BeamMode string
ana::Nus18FlatSyst::~Nus18FlatSyst ( )

Definition at line 371 of file Nus18Systs.cxx.

371  {
372  }

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::Nus18FlatSyst::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 375 of file Nus18Systs.cxx.

References caf::Proxy< caf::SRHeader >::det, fBGWei, fDet, fNCWei, caf::Proxy< caf::StandardRecord >::hdr, caf::kFARDET, caf::kNEARDET, caf::Proxy< caf::StandardRecord >::mc, caf::Proxy< caf::SRTruthBranch >::nnu, and caf::Proxy< caf::SRTruthBranch >::nu.

376  {
378  // Takes in output from extrap - only shift FD spectra
379  if(sr->hdr.det == caf::kFARDET &&
380"FD") != 0) { return; }
381  if(sr->hdr.det == caf::kNEARDET &&
382"ND") != 0) { return; }
384  if(sr->mc.nnu == 0) return;
385  if(sigma == 0) return;
387  weight *= ((sr->[0].iscc) ?
388  1. + fBGWei*sigma :
389  1. + fNCWei*sigma);
391  return;
393  }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Var weight
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2136
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:617
caf::Proxy< short int > nnu
Definition: SRProxy.h:616
std::string fDet
Definition: Nus18Systs.h:81
double sigma(TH1F *hist, double percentile)
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2137
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:231
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 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

double ana::Nus18FlatSyst::fBGWei

Definition at line 80 of file Nus18Systs.h.

Referenced by Shift().

std::string ana::Nus18FlatSyst::fDet

Definition at line 81 of file Nus18Systs.h.

Referenced by Shift().

double ana::Nus18FlatSyst::fNCWei

Definition at line 79 of file Nus18Systs.h.

Referenced by Shift().

std::string ana::Nus18FlatSyst::fPolarity

Definition at line 82 of file Nus18Systs.h.

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