EnergySysts.h
Go to the documentation of this file.
1 #pragma once
2 
3 // For analysis-specific energy systs look in EnergySystsXXXX.h
4 //
5 // Some legacy trivial systs remain here. They seem to mostly be used in
6 // SecondAna.
7 
8 #include "CAFAna/Core/ISyst.h"
9 
10 namespace ana
11 {
12  //----------------------------------------------------------------------
13  /// Absolute fit hadronic energy scale systematic
14  class HadEnergyScaleSyst: public ISyst
15  {
16  public:
18  const std::string& latexName,
19  double scale)
20  : ISyst(shortName, latexName), fScale(scale)
21  {
22  }
23 
25  : ISyst("AbsHadEScale", "Absolute Hadronic Energy Scale"), fScale(scale)
26  {
27  }
28 
29  void Shift(double sigma, caf::SRProxy* sr, double& weight) const override;
30 
31  private:
32  const double fScale;
33  };
34 
36 
37  //----------------------------------------------------------------------
38  /// Absolute fit muon energy scale systematic
39  class MuEnergyScaleSyst: public ISyst
40  {
41  public:
43  const std::string& latexName,
44  double scale)
45  : ISyst(shortName, latexName), fScale(scale)
46  {
47  }
48 
50  : ISyst("AbsMuEScale", "Absolute Muon Energy Scale"), fScale(scale)
51  {
52  }
53 
54  void Shift(double sigma, caf::SRProxy* sr, double& weight) const override;
55 
56  private:
57  const double fScale;
58  };
59 
61 
62  //----------------------------------------------------------------------
63  /// FD hadronic energy scale systematic
65  {
66  public:
68  : HadEnergyScaleSyst("FDHadEScale", "FD Relative Hadronic Energy Scale", scale)
69  {
70  }
71 
72  void Shift(double sigma, caf::SRProxy* sr, double& weight) const override;
73  };
74 
76 
77  //----------------------------------------------------------------------
78  /// FD muon energy scale systematic
80  {
81  public:
82  FDMuEnergyScaleSyst(const double scale)
83  : MuEnergyScaleSyst("FDMuEScale", "FD Relativs Muon Energy Scale", scale)
84  {
85  }
86 
87  void Shift(double sigma, caf::SRProxy* sr, double& weight) const override;
88  };
89 
91 }
HadEnergyScaleSyst(double scale)
Definition: EnergySysts.h:24
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const FDMuEnergyScaleSyst kFDMuEnergyScaleSyst(.01)
Definition: EnergySysts.h:90
MuEnergyScaleSyst(double scale)
Definition: EnergySysts.h:49
const FDHadEnergyScaleSyst kFDHadEnergyScaleSyst(.05)
Definition: EnergySysts.h:75
const Var weight
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
FD muon energy scale systematic.
Definition: EnergySysts.h:79
Encapsulate code to systematically shift a caf::SRProxy.
Definition: ISyst.h:14
HadEnergyScaleSyst(const std::string &shortName, const std::string &latexName, double scale)
Definition: EnergySysts.h:17
FDHadEnergyScaleSyst(double scale)
Definition: EnergySysts.h:67
Double_t scale
Definition: plot.C:25
FDMuEnergyScaleSyst(const double scale)
Definition: EnergySysts.h:82
const MuEnergyScaleSyst kMuEnergyScaleSyst(.02)
Definition: EnergySysts.h:60
caf::StandardRecord * sr
double sigma(TH1F *hist, double percentile)
const HadEnergyScaleSyst kHadEnergyScaleSyst(.05)
Definition: EnergySysts.h:35
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
Definition: EnergySysts.cxx:17
Absolute fit hadronic energy scale systematic.
Definition: EnergySysts.h:14
string shortName
THUMBNAIL BLOCK: We need to make a thumbnail for each.
Absolute fit muon energy scale systematic.
Definition: EnergySysts.h:39
MuEnergyScaleSyst(const std::string &shortName, const std::string &latexName, double scale)
Definition: EnergySysts.h:42
FD hadronic energy scale systematic.
Definition: EnergySysts.h:64
const double fScale
Definition: EnergySysts.h:57
enum BeamMode string