ISyst.cxx
Go to the documentation of this file.
1 #include "CAFAna/Core/ISyst.h"
2 
3 #include "CAFAna/Core/Registry.h"
4 
6 
7 namespace ana
8 {
9  //----------------------------------------------------------------------
11  const std::string& latexName)
12  : fShortName(shortName), fLatexName(latexName)
13  {
15  }
16 
17  //----------------------------------------------------------------------
19  {
20  // Normally ISysts should last for the life of the process, but in case one
21  // is deleted it's best not to leave a dangling pointer in Registry.
23  }
24 
25  //----------------------------------------------------------------------
26  void ISyst::Shift(double sigma, caf::SRProxy* sr, double& weight) const
27  {
28  // Override this function if your systematic depends on non-SRNeutrino
29  // quantities. If it is SRNeutrino-only, implement the other function,
30  // and let this default forward to you when necessary.
31  if(sr->mc.nnu > 0) TruthShift(sigma, &sr->mc.nu[0], weight);
32  }
33 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var weight
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:618
static void UnRegister(const T *s)
Definition: Registry.cxx:44
virtual void Shift(double sigma, caf::SRProxy *sr, double &weight) const
Perform the systematic shift.
Definition: ISyst.cxx:26
caf::Proxy< short int > nnu
Definition: SRProxy.h:617
static void Register(const T *s)
Definition: Registry.cxx:20
virtual void TruthShift(double sigma, caf::SRNeutrinoProxy *nu, double &weight) const
Definition: ISyst.h:46
caf::StandardRecord * sr
double sigma(TH1F *hist, double percentile)
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2138
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
virtual ~ISyst()
Definition: ISyst.cxx:18
enum BeamMode string