CMS 3D CMS Logo

TtSemiLepJetCombEval.h
Go to the documentation of this file.
1 #ifndef TtSemiLepJetCombEval_h
2 #define TtSemiLepJetCombEval_h
3 
6 
7 // ----------------------------------------------------------------------
8 // common interface for the evaluation of multivariate analysis variables
9 // for jet combinations in semi leptonic ttbar decays
10 // used by the MVATrainer and MVAComputer
11 // ----------------------------------------------------------------------
12 
14  // ----------------------------------------------------------------------
15  // mass, pt, eta, phi and theta of single candidates of the ttbar system
16  // ----------------------------------------------------------------------
17  // hadronic top quark
18  values.add("massHadTop", jetComb.topVar(JetComb::kHad, JetComb::kMass));
19  values.add("ptHadTop", jetComb.topVar(JetComb::kHad, JetComb::kPt));
20  values.add("etaHadTop", jetComb.topVar(JetComb::kHad, JetComb::kEta));
21  values.add("phiHadTop", jetComb.topVar(JetComb::kHad, JetComb::kPhi));
22  values.add("thetaHadTop", jetComb.topVar(JetComb::kHad, JetComb::kTheta));
23  // leptonic top quark
24  values.add("massLepTop", jetComb.topVar(JetComb::kLep, JetComb::kMass));
25  values.add("ptLepTop", jetComb.topVar(JetComb::kLep, JetComb::kPt));
26  values.add("etaLepTop", jetComb.topVar(JetComb::kLep, JetComb::kEta));
27  values.add("phiLepTop", jetComb.topVar(JetComb::kLep, JetComb::kPhi));
28  values.add("thetaLepTop", jetComb.topVar(JetComb::kLep, JetComb::kTheta));
29  // hadronic W boson
30  values.add("massHadW", jetComb.wBosonVar(JetComb::kHad, JetComb::kMass));
31  values.add("ptHadW", jetComb.wBosonVar(JetComb::kHad, JetComb::kPt));
32  values.add("etaHadW", jetComb.wBosonVar(JetComb::kHad, JetComb::kEta));
33  values.add("phiHadW", jetComb.wBosonVar(JetComb::kHad, JetComb::kPhi));
34  values.add("thetaHadW", jetComb.wBosonVar(JetComb::kHad, JetComb::kTheta));
35  // hadronic b quark
36  values.add("ptHadB", jetComb.bQuarkVar(JetComb::kHad, JetComb::kPt));
37  values.add("etaHadB", jetComb.bQuarkVar(JetComb::kHad, JetComb::kEta));
38  values.add("phiHadB", jetComb.bQuarkVar(JetComb::kHad, JetComb::kPhi));
39  values.add("thetaHadB", jetComb.bQuarkVar(JetComb::kHad, JetComb::kTheta));
40  // leptonic b quark
41  values.add("ptLepB", jetComb.bQuarkVar(JetComb::kLep, JetComb::kPt));
42  values.add("etaLepB", jetComb.bQuarkVar(JetComb::kLep, JetComb::kEta));
43  values.add("phiLepB", jetComb.bQuarkVar(JetComb::kLep, JetComb::kPhi));
44  values.add("thetaLepB", jetComb.bQuarkVar(JetComb::kLep, JetComb::kTheta));
45  // light quark
46  values.add("ptLightQ", jetComb.lightQVar(false, JetComb::kPt));
47  values.add("etaLightQ", jetComb.lightQVar(false, JetComb::kEta));
48  values.add("phiLightQ", jetComb.lightQVar(false, JetComb::kPhi));
49  values.add("thetaLightQ", jetComb.lightQVar(false, JetComb::kTheta));
50  // light anti-quark
51  values.add("ptLightQBar", jetComb.lightQVar(true, JetComb::kPt));
52  values.add("etaLightQBar", jetComb.lightQVar(true, JetComb::kEta));
53  values.add("phiLightQBar", jetComb.lightQVar(true, JetComb::kPhi));
54  values.add("thetaLightQBar", jetComb.lightQVar(true, JetComb::kTheta));
55  // ----------------------------------------------------------------------
56  // compare two candidates of the ttbar system in DeltaM, DeltaR, DeltaPhi or DeltaTheta
57  // ----------------------------------------------------------------------
58  // the two top quarks
59  values.add("deltaMHadTopLepTop", jetComb.compareHadTopLepTop(JetComb::kDeltaM));
60  values.add("deltaRHadTopLepTop", jetComb.compareHadTopLepTop(JetComb::kDeltaR));
61  values.add("deltaPhiHadTopLepTop", jetComb.compareHadTopLepTop(JetComb::kDeltaPhi));
62  values.add("deltaThetaHadTopLepTop", jetComb.compareHadTopLepTop(JetComb::kDeltaTheta));
63  // the two W bosons
64  values.add("deltaMHadWLepW", jetComb.compareHadWLepW(JetComb::kDeltaM));
65  values.add("deltaRHadWLepW", jetComb.compareHadWLepW(JetComb::kDeltaR));
66  values.add("deltaPhiHadWLepW", jetComb.compareHadWLepW(JetComb::kDeltaPhi));
67  values.add("deltaThetaHadWLepW", jetComb.compareHadWLepW(JetComb::kDeltaTheta));
68  // the two b quarks
69  values.add("deltaRHadBLepB", jetComb.compareHadBLepB(JetComb::kDeltaR));
70  values.add("deltaPhiHadBLepB", jetComb.compareHadBLepB(JetComb::kDeltaPhi));
71  values.add("deltaThetaHadBLepB", jetComb.compareHadBLepB(JetComb::kDeltaTheta));
72  // the two light quarks
73  values.add("deltaRHadQHadQBar", jetComb.compareLightQuarks(JetComb::kDeltaR));
74  values.add("deltaPhiHadQHadQBar", jetComb.compareLightQuarks(JetComb::kDeltaPhi));
75  values.add("deltaThetaHadQHadQBar", jetComb.compareLightQuarks(JetComb::kDeltaTheta));
76  // the hadronic top and the hadronic W
77  values.add("deltaMHadTopHadW", jetComb.compareTopW(JetComb::kHad, JetComb::kHad, JetComb::kDeltaM));
78  values.add("deltaRHadTopHadW", jetComb.compareTopW(JetComb::kHad, JetComb::kHad, JetComb::kDeltaR));
79  values.add("deltaPhiHadTopHadW", jetComb.compareTopW(JetComb::kHad, JetComb::kHad, JetComb::kDeltaPhi));
80  values.add("deltaThetaHadTopHadW", jetComb.compareTopW(JetComb::kHad, JetComb::kHad, JetComb::kDeltaTheta));
81  // the leptonic top and the leptonic W
82  values.add("deltaMLepTopLepW", jetComb.compareTopW(JetComb::kLep, JetComb::kLep, JetComb::kDeltaM));
83  values.add("deltaRLepTopLepW", jetComb.compareTopW(JetComb::kLep, JetComb::kLep, JetComb::kDeltaR));
84  values.add("deltaPhiLepTopLepW", jetComb.compareTopW(JetComb::kLep, JetComb::kLep, JetComb::kDeltaPhi));
85  values.add("deltaThetaLepTopLepW", jetComb.compareTopW(JetComb::kLep, JetComb::kLep, JetComb::kDeltaTheta));
86  // the hadronic top and the leptonic W
87  values.add("deltaMHadTopLepW", jetComb.compareTopW(JetComb::kHad, JetComb::kLep, JetComb::kDeltaM));
88  values.add("deltaRHadTopLepW", jetComb.compareTopW(JetComb::kHad, JetComb::kLep, JetComb::kDeltaR));
89  values.add("deltaPhiHadTopLepW", jetComb.compareTopW(JetComb::kHad, JetComb::kLep, JetComb::kDeltaPhi));
90  values.add("deltaThetaHadTopLepW", jetComb.compareTopW(JetComb::kHad, JetComb::kLep, JetComb::kDeltaTheta));
91  // the leptonic top and the hadronic W
92  values.add("deltaMLepTopHadW", jetComb.compareTopW(JetComb::kLep, JetComb::kHad, JetComb::kDeltaM));
93  values.add("deltaRLepTopHadW", jetComb.compareTopW(JetComb::kLep, JetComb::kHad, JetComb::kDeltaR));
94  values.add("deltaPhiLepTopHadW", jetComb.compareTopW(JetComb::kLep, JetComb::kHad, JetComb::kDeltaPhi));
95  values.add("deltaThetaLepTopHadW", jetComb.compareTopW(JetComb::kLep, JetComb::kHad, JetComb::kDeltaTheta));
96  // the hadronic top and the hadronic b
97  values.add("deltaRHadTopHadB", jetComb.compareTopB(JetComb::kHad, JetComb::kHad, JetComb::kDeltaR));
98  values.add("deltaPhiHadTopHadB", jetComb.compareTopB(JetComb::kHad, JetComb::kHad, JetComb::kDeltaPhi));
99  values.add("deltaThetaHadTopHadB", jetComb.compareTopB(JetComb::kHad, JetComb::kHad, JetComb::kDeltaTheta));
100  // the leptonic top and the leptonic b
101  values.add("deltaRLepTopLepB", jetComb.compareTopB(JetComb::kLep, JetComb::kLep, JetComb::kDeltaR));
102  values.add("deltaPhiLepTopLepB", jetComb.compareTopB(JetComb::kLep, JetComb::kLep, JetComb::kDeltaPhi));
103  values.add("deltaThetaLepTopLepB", jetComb.compareTopB(JetComb::kLep, JetComb::kLep, JetComb::kDeltaTheta));
104  // the hadronic top and the leptonic b
105  values.add("deltaRHadTopLepB", jetComb.compareTopB(JetComb::kHad, JetComb::kLep, JetComb::kDeltaR));
106  values.add("deltaPhiHadTopLepB", jetComb.compareTopB(JetComb::kHad, JetComb::kLep, JetComb::kDeltaPhi));
107  values.add("deltaThetaHadTopLepB", jetComb.compareTopB(JetComb::kHad, JetComb::kLep, JetComb::kDeltaTheta));
108  // the leptonic top and the hadronic b
109  values.add("deltaRLepTopHadB", jetComb.compareTopB(JetComb::kLep, JetComb::kHad, JetComb::kDeltaR));
110  values.add("deltaPhiLepTopHadB", jetComb.compareTopB(JetComb::kLep, JetComb::kHad, JetComb::kDeltaPhi));
111  values.add("deltaThetaLepTopHadB", jetComb.compareTopB(JetComb::kLep, JetComb::kHad, JetComb::kDeltaTheta));
112  // the hadronic W and the hadronic b
113  values.add("deltaRHadWHadB", jetComb.compareWB(JetComb::kHad, JetComb::kHad, JetComb::kDeltaR));
114  values.add("deltaPhiHadWHadB", jetComb.compareWB(JetComb::kHad, JetComb::kHad, JetComb::kDeltaPhi));
115  values.add("deltaThetaHadWHadB", jetComb.compareWB(JetComb::kHad, JetComb::kHad, JetComb::kDeltaTheta));
116  // the leptonic W and the leptonic b
117  values.add("deltaRLepWLepB", jetComb.compareWB(JetComb::kLep, JetComb::kLep, JetComb::kDeltaR));
118  values.add("deltaPhiLepWLepB", jetComb.compareWB(JetComb::kLep, JetComb::kLep, JetComb::kDeltaPhi));
119  values.add("deltaThetaLepWLepB", jetComb.compareWB(JetComb::kLep, JetComb::kLep, JetComb::kDeltaTheta));
120  // the hadronic W and the leptonic b
121  values.add("deltaRHadWLepB", jetComb.compareWB(JetComb::kHad, JetComb::kLep, JetComb::kDeltaR));
122  values.add("deltaPhiHadWLepB", jetComb.compareWB(JetComb::kHad, JetComb::kLep, JetComb::kDeltaPhi));
123  values.add("deltaThetaHadWLepB", jetComb.compareWB(JetComb::kHad, JetComb::kLep, JetComb::kDeltaTheta));
124  // the leptonic W and the hadronic b
125  values.add("deltaRLepWHadB", jetComb.compareWB(JetComb::kLep, JetComb::kHad, JetComb::kDeltaR));
126  values.add("deltaPhiLepWHadB", jetComb.compareWB(JetComb::kLep, JetComb::kHad, JetComb::kDeltaPhi));
127  values.add("deltaThetaLepWHadB", jetComb.compareWB(JetComb::kLep, JetComb::kHad, JetComb::kDeltaTheta));
128  // the hadronic top and the lepton
129  values.add("deltaRHadTopLepton", jetComb.compareTopLepton(JetComb::kHad, JetComb::kDeltaR));
130  values.add("deltaPhiHadTopLepton", jetComb.compareTopLepton(JetComb::kHad, JetComb::kDeltaPhi));
131  values.add("deltaThetaHadTopLepton", jetComb.compareTopLepton(JetComb::kHad, JetComb::kDeltaTheta));
132  // the leptonic top and the lepton
133  values.add("deltaRLepTopLepton", jetComb.compareTopLepton(JetComb::kLep, JetComb::kDeltaR));
134  values.add("deltaPhiLepTopLepton", jetComb.compareTopLepton(JetComb::kLep, JetComb::kDeltaPhi));
135  values.add("deltaThetaLepTopLepton", jetComb.compareTopLepton(JetComb::kLep, JetComb::kDeltaTheta));
136  // the hadronic top and the neutrino
137  values.add("deltaRHadTopNeutrino", jetComb.compareTopNeutrino(JetComb::kHad, JetComb::kDeltaR));
138  values.add("deltaPhiHadTopNeutrino", jetComb.compareTopNeutrino(JetComb::kHad, JetComb::kDeltaPhi));
139  values.add("deltaThetaHadTopNeutrino", jetComb.compareTopNeutrino(JetComb::kHad, JetComb::kDeltaTheta));
140  // the leptonic top and the neutrino
141  values.add("deltaRLepTopNeutrino", jetComb.compareTopNeutrino(JetComb::kLep, JetComb::kDeltaR));
142  values.add("deltaPhiLepTopNeutrino", jetComb.compareTopNeutrino(JetComb::kLep, JetComb::kDeltaPhi));
143  values.add("deltaThetaLepTopNeutrino", jetComb.compareTopNeutrino(JetComb::kLep, JetComb::kDeltaTheta));
144  // the hadronic W and the lepton
145  values.add("deltaRHadWLepton", jetComb.compareWLepton(JetComb::kHad, JetComb::kDeltaR));
146  values.add("deltaPhiHadWLepton", jetComb.compareWLepton(JetComb::kHad, JetComb::kDeltaPhi));
147  values.add("deltaThetaHadWLepton", jetComb.compareWLepton(JetComb::kHad, JetComb::kDeltaTheta));
148  // the hadronic W and the neutrino
149  values.add("deltaRHadWNeutrino", jetComb.compareWNeutrino(JetComb::kHad, JetComb::kDeltaR));
150  values.add("deltaPhiHadWNeutrino", jetComb.compareWNeutrino(JetComb::kHad, JetComb::kDeltaPhi));
151  values.add("deltaThetaHadWNeutrino", jetComb.compareWNeutrino(JetComb::kHad, JetComb::kDeltaTheta));
152  // the hadronic b and the lepton
153  values.add("deltaRHadBLepton", jetComb.compareBLepton(JetComb::kHad, JetComb::kDeltaR));
154  values.add("deltaPhiHadBLepton", jetComb.compareBLepton(JetComb::kHad, JetComb::kDeltaPhi));
155  values.add("deltaThetaHadBLepton", jetComb.compareBLepton(JetComb::kHad, JetComb::kDeltaTheta));
156  // the leptonic b and the lepton
157  values.add("deltaRLepBLepton", jetComb.compareBLepton(JetComb::kLep, JetComb::kDeltaR));
158  values.add("deltaPhiLepBLepton", jetComb.compareBLepton(JetComb::kLep, JetComb::kDeltaPhi));
159  values.add("deltaThetaLepBLepton", jetComb.compareBLepton(JetComb::kLep, JetComb::kDeltaTheta));
160  // the hadronic b and the neutrino
161  values.add("deltaRHadBNeutrino", jetComb.compareBNeutrino(JetComb::kHad, JetComb::kDeltaR));
162  values.add("deltaPhiHadBNeutrino", jetComb.compareBNeutrino(JetComb::kHad, JetComb::kDeltaPhi));
163  values.add("deltaThetaHadBNeutrino", jetComb.compareBNeutrino(JetComb::kHad, JetComb::kDeltaTheta));
164  // the leptonic b and the neutrino
165  values.add("deltaRLepBNeutrino", jetComb.compareBNeutrino(JetComb::kLep, JetComb::kDeltaR));
166  values.add("deltaPhiLepBNeutrino", jetComb.compareBNeutrino(JetComb::kLep, JetComb::kDeltaPhi));
167  values.add("deltaThetaLepBNeutrino", jetComb.compareBNeutrino(JetComb::kLep, JetComb::kDeltaTheta));
168  // ----------------------------------------------------------------------
169  // special variables combining the pt of the jets
170  // ----------------------------------------------------------------------
171  values.add("relativePtHadronicTop", jetComb.relativePtHadronicTop());
172  values.add("bOverLightQPt", jetComb.bOverLightQPt());
173  // ----------------------------------------------------------------------
174  // variables based on b-tagging with six different algorithms
175  // ----------------------------------------------------------------------
176  // hadronic b quark candidate
177  values.add("bTagHadBTrkCntHighEff", jetComb.bTag(JetComb::kHad, JetComb::kTrackCountHighEff));
178  values.add("bTagHadBTrkCntHighPur", jetComb.bTag(JetComb::kHad, JetComb::kTrackCountHighPur));
179  values.add("bTagHadBSoftMuon", jetComb.bTag(JetComb::kHad, JetComb::kSoftMuon));
180  values.add("bTagHadBSimpSecondVtx", jetComb.bTag(JetComb::kHad, JetComb::kSimpleSecondVtx));
181  values.add("bTagHadBCombSecondVtx", jetComb.bTag(JetComb::kHad, JetComb::kCombSecondVtx));
182  values.add("bTagHadBImpactParaMVA", jetComb.bTag(JetComb::kHad, JetComb::kCombSecondVtxMVA));
183  // leptonic b quark candidate
184  values.add("bTagLepBTrkCntHighEff", jetComb.bTag(JetComb::kLep, JetComb::kTrackCountHighEff));
185  values.add("bTagLepBTrkCntHighPur", jetComb.bTag(JetComb::kLep, JetComb::kTrackCountHighPur));
186  values.add("bTagLepBSoftMuon", jetComb.bTag(JetComb::kLep, JetComb::kSoftMuon));
187  values.add("bTagLepBSimpSecondVtx", jetComb.bTag(JetComb::kLep, JetComb::kSimpleSecondVtx));
188  values.add("bTagLepBCombSecondVtx", jetComb.bTag(JetComb::kLep, JetComb::kCombSecondVtx));
189  values.add("bTagLepBImpactParaMVA", jetComb.bTag(JetComb::kLep, JetComb::kCombSecondVtxMVA));
190  // summed b-tags of the two b quark candidates
191  values.add("bTagSumTrkCntHighEff", jetComb.combinedBTags(JetComb::kTrackCountHighEff, JetComb::kAdd));
192  values.add("bTagSumTrkCntHighPur", jetComb.combinedBTags(JetComb::kTrackCountHighPur, JetComb::kAdd));
193  values.add("bTagSumSoftMuon", jetComb.combinedBTags(JetComb::kSoftMuon, JetComb::kAdd));
194  values.add("bTagSumSimpSecondVtx", jetComb.combinedBTags(JetComb::kSimpleSecondVtx, JetComb::kAdd));
195  values.add("bTagSumCombSecondVtx", jetComb.combinedBTags(JetComb::kCombSecondVtx, JetComb::kAdd));
196  values.add("bTagSumImpactParaMVA", jetComb.combinedBTags(JetComb::kCombSecondVtxMVA, JetComb::kAdd));
197  // multiplied b-tags of the two b quark candidates
198  values.add("bTagProdImpactParaMVA", jetComb.combinedBTags(JetComb::kCombSecondVtxMVA, JetComb::kMult));
199  // summed b-tags of the two light quark candidates
200  values.add("bTagSumHadQHadQBarTrkCntHighEff",
202  values.add("bTagSumHadQHadQBarTrkCntHighPur",
204  values.add("bTagSumHadQHadQBarSoftMuon", jetComb.combinedBTagsForLightQuarks(JetComb::kSoftMuon, JetComb::kAdd));
205  values.add("bTagSumHadQHadQBarSimpSecondVtx",
207  values.add("bTagSumHadQHadQBarCombSecondVtx",
209  values.add("bTagSumHadQHadQBarImpactParaMVA",
211  // multiplied b-tags of the two light quark candidates
212  values.add("bTagProdHadQHadQBarImpactParaMVA",
214 }
215 
216 #endif
double relativePtHadronicTop() const
double combinedBTags(JetComb::BTagAlgo algo, JetComb::Operator op) const
combined b-tag values of the two b candidates
double compareWB(JetComb::DecayType dec1, JetComb::DecayType dec2, JetComb::CompType comp) const
comparison between the W and the b candidate
double compareHadBLepB(JetComb::CompType comp) const
comparison between the two b candidates
double compareHadWLepW(JetComb::CompType comp) const
comparison between the two W candidates
double bQuarkVar(JetComb::DecayType decay, JetComb::VarType var) const
b quark candidate variable
double compareHadTopLepTop(JetComb::CompType comp) const
comparison between the two top candidates
double compareWLepton(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the W and the lepton candidate
double compareBLepton(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the b and the lepton candidate
double lightQVar(bool qbar, JetComb::VarType var) const
light quark candidate variable
double compareBNeutrino(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the b and the neutrino candidate
double compareLightQuarks(JetComb::CompType comp) const
comparison between the lightQ and the lightQBar candidate
double compareTopLepton(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the top and the lepton candidate
double compareTopW(JetComb::DecayType dec1, JetComb::DecayType dec2, JetComb::CompType comp) const
comparison between the top and the W candidate
double compareTopB(JetComb::DecayType dec1, JetComb::DecayType dec2, JetComb::CompType comp) const
comparison between the top and the b candidate
double topVar(JetComb::DecayType decay, JetComb::VarType var) const
top quark candidate variable
double wBosonVar(JetComb::DecayType decay, JetComb::VarType var) const
W boson candidate variable.
Helper class that can contain an list of identifier-value pairs.
Definition: Variable.h:77
double combinedBTagsForLightQuarks(JetComb::BTagAlgo algo, JetComb::Operator op) const
combined b-tag values of the two light quark candidates
double compareWNeutrino(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the W and the neutrino candidate
void evaluateTtSemiLepJetComb(PhysicsTools::Variable::ValueList &values, const TtSemiLepJetComb &jetComb)
Common calculator class to keep multivariate analysis variables for jet combinations in semi-leptonic...
double compareTopNeutrino(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the top and the neutrino candidate
double bTag(JetComb::DecayType decay, JetComb::BTagAlgo algo) const
b-tag value of a b candidate
double bOverLightQPt() const
void add(AtomicId id, double value)
Definition: Variable.h:103