CovMxSysts.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Core/ISyst.h"
5 
6 #include "TDirectory.h"
7 #include "TH1.h"
8 #include "TObjString.h"
9 
10 namespace ana {
11 
12  enum class SystChannel {
13  kSig,
14  kBkg,
15  kUnknown
16  };
17 
18  // --------------------------------------------------------------------------
19  class NuISyst : public ISyst {
20 
21  public:
23  std::map<int, std::pair<TH1*, TH1*> > shifts = {});
24  ~NuISyst();
25  std::string SampleName() const { return fSampleName; };
26  std::string BaseName() const;
27  virtual void SaveTo(TDirectory* dir, std::string type) const;
28 
29  protected:
30  virtual double WeightFor(SystChannel channel, double sigma, double calE) const;
32  std::map<int, std::pair<TH1*, TH1*> > fShifts;
33 
34  };
35 
36  // --------------------------------------------------------------------------
37  class KeySyst : public ISyst {
38  public:
40  void SetOneSided(bool onesided=true) { fOneSided=onesided; };
41  bool IsOneSided() const { return fOneSided; };
42  private:
43  bool fOneSided;
44  };
45 
46  // --------------------------------------------------------------------------
47  namespace covmx {
48  class NormSyst : public ISyst {
49  public:
51  : ISyst("Norm"+shortName, "Norm. "+latexName), fScale(scale) {};
52  virtual void Shift(double sigma, caf::SRProxy* sr, double& weight) const override;
53  protected:
54  double fScale;
55  };
56  }
57 
58 } // namespace ana
const XML_Char * name
Definition: expat.h:151
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
void SaveTo(const osc::IOscCalc &x, TDirectory *dir, const std::string &name)
const Var weight
NormSyst(std::string shortName, std::string latexName, double scale)
Definition: CovMxSysts.h:50
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
Encapsulate code to systematically shift a caf::SRProxy.
Definition: ISyst.h:14
const char * label
SystChannel
Definition: CovMxSysts.h:12
Double_t scale
Definition: plot.C:25
Definition: Shift.h:6
bool IsOneSided() const
Definition: CovMxSysts.h:41
std::string fSampleName
Definition: CovMxSysts.h:31
caf::StandardRecord * sr
std::string SampleName() const
Definition: CovMxSysts.h:25
double sigma(TH1F *hist, double percentile)
TDirectory * dir
Definition: macro.C:5
std::map< int, std::pair< TH1 *, TH1 * > > fShifts
Definition: CovMxSysts.h:32
string shortName
THUMBNAIL BLOCK: We need to make a thumbnail for each.
void SetOneSided(bool onesided=true)
Definition: CovMxSysts.h:40
enum BeamMode string