HiggsAnalysis-KITHiggsToTauTau
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
HttEnumTypes.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Kappa/DataFormats/interface/Kappa.h"
5 
6 #include "Artus/Utility/interface/ArtusLogging.h"
7 #include "Artus/KappaAnalysis/interface/KappaEnumTypes.h"
8 
9 
12 class HttEnumTypes : public KappaEnumTypes {
13 
14 public:
15 
16  enum class DecayChannel : int
17  {
18  NONE = -1,
19  TT = 0,
20  MT = 1,
21  ET = 2,
22  EM = 3,
23  MM = 4,
24  EE = 5,
25 
26  //Higgs produced in association with a top quark pair (TTH)
27  TTH_TTE = 6,
28  TTH_TTM = 7
29  };
30  static DecayChannel ToDecayChannel(std::string const& decayChannelString)
31  {
32  if (decayChannelString == "tt") return DecayChannel::TT;
33  else if (decayChannelString == "mt") return DecayChannel::MT;
34  else if (decayChannelString == "et") return DecayChannel::ET;
35  else if (decayChannelString == "em") return DecayChannel::EM;
36  else if (decayChannelString == "mm") return DecayChannel::MM;
37  else if (decayChannelString == "ee") return DecayChannel::EE;
38  else if (decayChannelString == "tte") return DecayChannel::TTH_TTE;
39  else if (decayChannelString == "ttm") return DecayChannel::TTH_TTM;
40  return DecayChannel::NONE;
41  }
42 
43  enum class TauTauRestFrameReco : int
44  {
45  NONE = -1,
46  VISIBLE_LEPTONS = 0,
49  SVFIT = 3,
50  };
51  static TauTauRestFrameReco ToTauTauRestFrameReco(std::string const& tauTauRestFrameReco)
52  {
53  if (tauTauRestFrameReco == "visible_leptons") return TauTauRestFrameReco::VISIBLE_LEPTONS;
54  else if (tauTauRestFrameReco == "visible_leptons_met") return TauTauRestFrameReco::VISIBLE_LEPTONS_MET;
55  else if (tauTauRestFrameReco == "collinear_approximation") return TauTauRestFrameReco::COLLINEAR_APPROXIMATION;
56  else if (tauTauRestFrameReco == "svfit") return TauTauRestFrameReco::SVFIT;
57  else return TauTauRestFrameReco::NONE;
58  }
59 
61  {
62  NONE = -1,
63  MULTIPLY_WEIGHTS = 0,
65  };
66  static DataMcScaleFactorProducerMode ToDataMcScaleFactorProducerMode(std::string const& dataMcScaleFactorProducerMode)
67  {
68  if (dataMcScaleFactorProducerMode == "multiply_weights") return DataMcScaleFactorProducerMode::MULTIPLY_WEIGHTS;
69  else if (dataMcScaleFactorProducerMode == "correlate_triggers") return DataMcScaleFactorProducerMode::CORRELATE_TRIGGERS;
71  }
72 
73  enum class SystematicShift : int
74  {
75  NONE = -1,
76  CENTRAL = 0,
77  TAU_ES = 1,
78  TAU_ES_1PRONG = 2,
80  TAU_ES_3PRONG = 4,
85  TAU_MUON_FAKE_ES = 9,
89  TAU_JET_FAKE_ES = 13
90  };
91 
92  enum class SvfitCacheMissBehaviour : int
93  {
94  assert = 0,
95  undefined = 1,
96  recalculate = 2
97  };
98  static SvfitCacheMissBehaviour ToSvfitCacheMissBehaviour(std::string const& configstring)
99  {
100  if (configstring == "undefined") return SvfitCacheMissBehaviour::undefined;
101  else if (configstring == "recalculate") return SvfitCacheMissBehaviour::recalculate;
102 
104  };
105 
107  {
108  NONE,
112  AbsoluteStat,
113  FlavorQCD,
115  PileUpDataMC,
116  PileUpPtBB,
117  PileUpPtEC1,
118  PileUpPtEC2,
119  PileUpPtHF,
120  PileUpPtRef,
121  RelativeBal,
122  RelativeFSR,
126  RelativePtBB,
129  RelativePtHF,
135  TimePtEta,
136  Total,
137  Closure // individual uncertainties added in quadrature. to be compared to 'Total' for closure test
138  };
139 
140  static JetEnergyUncertaintyShiftName ToJetEnergyUncertaintyShiftName(std::string const& jetEnergyCorrectionUncertainty)
141  {
142  if (jetEnergyCorrectionUncertainty == "AbsoluteFlavMap") return JetEnergyUncertaintyShiftName::AbsoluteFlavMap;
143  else if (jetEnergyCorrectionUncertainty == "AbsoluteMPFBias") return JetEnergyUncertaintyShiftName::AbsoluteMPFBias;
144  else if (jetEnergyCorrectionUncertainty == "AbsoluteScale") return JetEnergyUncertaintyShiftName::AbsoluteScale;
145  else if (jetEnergyCorrectionUncertainty == "AbsoluteStat") return JetEnergyUncertaintyShiftName::AbsoluteStat;
146  else if (jetEnergyCorrectionUncertainty == "FlavorQCD") return JetEnergyUncertaintyShiftName::FlavorQCD;
147  else if (jetEnergyCorrectionUncertainty == "Fragmentation") return JetEnergyUncertaintyShiftName::Fragmentation;
148  else if (jetEnergyCorrectionUncertainty == "PileUpDataMC") return JetEnergyUncertaintyShiftName::PileUpDataMC;
149  else if (jetEnergyCorrectionUncertainty == "PileUpPtBB") return JetEnergyUncertaintyShiftName::PileUpPtBB;
150  else if (jetEnergyCorrectionUncertainty == "PileUpPtEC1") return JetEnergyUncertaintyShiftName::PileUpPtEC1;
151  else if (jetEnergyCorrectionUncertainty == "PileUpPtEC2") return JetEnergyUncertaintyShiftName::PileUpPtEC2;
152  else if (jetEnergyCorrectionUncertainty == "PileUpPtHF") return JetEnergyUncertaintyShiftName::PileUpPtHF;
153  else if (jetEnergyCorrectionUncertainty == "PileUpPtRef") return JetEnergyUncertaintyShiftName::PileUpPtRef;
154  else if (jetEnergyCorrectionUncertainty == "RelativeBal") return JetEnergyUncertaintyShiftName::RelativeBal;
155  else if (jetEnergyCorrectionUncertainty == "RelativeFSR") return JetEnergyUncertaintyShiftName::RelativeFSR;
156  else if (jetEnergyCorrectionUncertainty == "RelativeJEREC1") return JetEnergyUncertaintyShiftName::RelativeJEREC1;
157  else if (jetEnergyCorrectionUncertainty == "RelativeJEREC2") return JetEnergyUncertaintyShiftName::RelativeJEREC2;
158  else if (jetEnergyCorrectionUncertainty == "RelativeJERHF") return JetEnergyUncertaintyShiftName::RelativeJERHF;
159  else if (jetEnergyCorrectionUncertainty == "RelativePtBB") return JetEnergyUncertaintyShiftName::RelativePtBB;
160  else if (jetEnergyCorrectionUncertainty == "RelativePtEC1") return JetEnergyUncertaintyShiftName::RelativePtEC1;
161  else if (jetEnergyCorrectionUncertainty == "RelativePtEC2") return JetEnergyUncertaintyShiftName::RelativePtEC2;
162  else if (jetEnergyCorrectionUncertainty == "RelativePtHF") return JetEnergyUncertaintyShiftName::RelativePtHF;
163  else if (jetEnergyCorrectionUncertainty == "RelativeStatEC") return JetEnergyUncertaintyShiftName::RelativeStatEC;
164  else if (jetEnergyCorrectionUncertainty == "RelativeStatFSR") return JetEnergyUncertaintyShiftName::RelativeStatFSR;
165  else if (jetEnergyCorrectionUncertainty == "RelativeStatHF") return JetEnergyUncertaintyShiftName::RelativeStatHF;
166  else if (jetEnergyCorrectionUncertainty == "SinglePionECAL") return JetEnergyUncertaintyShiftName::SinglePionECAL;
167  else if (jetEnergyCorrectionUncertainty == "SinglePionHCAL") return JetEnergyUncertaintyShiftName::SinglePionHCAL;
168  else if (jetEnergyCorrectionUncertainty == "TimePtEta") return JetEnergyUncertaintyShiftName::TimePtEta;
169  else if (jetEnergyCorrectionUncertainty == "Total") return JetEnergyUncertaintyShiftName::Total;
170  else if (jetEnergyCorrectionUncertainty == "Closure") return JetEnergyUncertaintyShiftName::Closure;
172  }
173 
174  static KMETUncertainty::Type ToMETUncertaintyType(std::string const& metUncertainty)
175  {
176  if (metUncertainty == "JetResUp") return KMETUncertainty::JetResUp;
177  else if (metUncertainty == "JetResDown") return KMETUncertainty::JetResDown;
178  else if (metUncertainty == "JetEnUp") return KMETUncertainty::JetEnUp;
179  else if (metUncertainty == "JetEnDown") return KMETUncertainty::JetEnDown;
180  else if (metUncertainty == "MuonEnUp") return KMETUncertainty::MuonEnUp;
181  else if (metUncertainty == "MuonEnDown") return KMETUncertainty::MuonEnDown;
182  else if (metUncertainty == "ElectronEnUp") return KMETUncertainty::ElectronEnUp;
183  else if (metUncertainty == "ElectronEnDown") return KMETUncertainty::ElectronEnDown;
184  else if (metUncertainty == "TauEnUp") return KMETUncertainty::TauEnUp;
185  else if (metUncertainty == "TauEnDown") return KMETUncertainty::TauEnDown;
186  else if (metUncertainty == "UnclusteredEnUp") return KMETUncertainty::UnclusteredEnUp;
187  else if (metUncertainty == "UnclusteredEnDown") return KMETUncertainty::UnclusteredEnDown;
188  else if (metUncertainty == "PhotonEnUp") return KMETUncertainty::PhotonEnUp;
189  else if (metUncertainty == "PhotonEnDown") return KMETUncertainty::PhotonEnDown;
190  else if (metUncertainty == "NoShift") return KMETUncertainty::NoShift;
191  else if (metUncertainty == "METUncertaintySize") return KMETUncertainty::METUncertaintySize;
192  else if (metUncertainty == "JetResUpSmear") return KMETUncertainty::JetResUpSmear;
193  else if (metUncertainty == "JetResDownSmear") return KMETUncertainty::JetResDownSmear;
194  else if (metUncertainty == "METFullUncertaintySize") return KMETUncertainty::METFullUncertaintySize;
195  else return KMETUncertainty::NoShift;
196  LOG(FATAL) << "You need to specify an implemented MET uncertainty in your config.";
197  };
198 };
199 
SvfitCacheMissBehaviour
Definition: HttEnumTypes.h:92
static DataMcScaleFactorProducerMode ToDataMcScaleFactorProducerMode(std::string const &dataMcScaleFactorProducerMode)
Definition: HttEnumTypes.h:66
static TauTauRestFrameReco ToTauTauRestFrameReco(std::string const &tauTauRestFrameReco)
Definition: HttEnumTypes.h:51
TauTauRestFrameReco
Definition: HttEnumTypes.h:43
SystematicShift
Definition: HttEnumTypes.h:73
static KMETUncertainty::Type ToMETUncertaintyType(std::string const &metUncertainty)
Definition: HttEnumTypes.h:174
Definition: HttEnumTypes.h:12
static JetEnergyUncertaintyShiftName ToJetEnergyUncertaintyShiftName(std::string const &jetEnergyCorrectionUncertainty)
Definition: HttEnumTypes.h:140
DecayChannel
Definition: HttEnumTypes.h:16
DataMcScaleFactorProducerMode
Definition: HttEnumTypes.h:60
JetEnergyUncertaintyShiftName
Definition: HttEnumTypes.h:106
static DecayChannel ToDecayChannel(std::string const &decayChannelString)
Definition: HttEnumTypes.h:30
static SvfitCacheMissBehaviour ToSvfitCacheMissBehaviour(std::string const &configstring)
Definition: HttEnumTypes.h:98