CMS 3D CMS Logo

TtFullHadSignalSel.h
Go to the documentation of this file.
1 #ifndef TtFullHadSignalSel_h
2 #define TtFullHadSignalSel_h
3 
4 #include <vector>
5 #include "TMath.h"
6 #include "Math/VectorUtil.h"
7 
9 
11  // common calculator class for likelihood
12  // variables in fully hadronic ttbar decays
13 public:
15  TtFullHadSignalSel(const std::vector<pat::Jet>&);
17 
18  double H() const { return H_; }
19  double Ht() const { return Ht_; }
20  double Ht123() const { return Ht123_; }
21  double Ht3jet() const { return Ht3jet_; }
22  double sqrt_s() const { return sqrt_s_; }
23  double Et56() const { return Et56_; }
24  double M3() const { return M3_; }
25 
26  double TCHE_Bjets() const { return TCHE_Bjets_; }
27  double TCHP_Bjets() const { return TCHP_Bjets_; }
28  double SSVHE_Bjets() const { return SSVHE_Bjets_; }
29  double SSVHP_Bjets() const { return SSVHP_Bjets_; }
30  double CSV_Bjets() const { return CSV_Bjets_; }
31  double CSVMVA_Bjets() const { return CSVMVA_Bjets_; }
32  double SM_Bjets() const { return SM_Bjets_; }
33 
34  double TCHE_Bjet(unsigned short i) const {
35  return (TCHE_BJet_Discs_.size() >= i) ? TCHE_BJet_Discs_.at(TCHE_BJet_Discs_.size() - i) : -100.;
36  }
37  double TCHP_Bjet(unsigned short i) const {
38  return (TCHP_BJet_Discs_.size() >= i) ? TCHP_BJet_Discs_.at(TCHP_BJet_Discs_.size() - i) : -100.;
39  }
40  double SSVHE_Bjet(unsigned short i) const {
41  return (SSVHE_BJet_Discs_.size() >= i) ? SSVHE_BJet_Discs_.at(SSVHE_BJet_Discs_.size() - i) : -100.;
42  }
43  double SSVHP_Bjet(unsigned short i) const {
44  return (SSVHP_BJet_Discs_.size() >= i) ? SSVHP_BJet_Discs_.at(SSVHP_BJet_Discs_.size() - i) : -100.;
45  }
46  double CSV_Bjet(unsigned short i) const {
47  return (CSV_BJet_Discs_.size() >= i) ? CSV_BJet_Discs_.at(CSV_BJet_Discs_.size() - i) : -100.;
48  }
49  double CSVMVA_Bjet(unsigned short i) const {
50  return (CSVMVA_BJet_Discs_.size() >= i) ? CSVMVA_BJet_Discs_.at(CSVMVA_BJet_Discs_.size() - i) : -100.;
51  }
52  double SM_Bjet(unsigned short i) const {
53  return (SM_BJet_Discs_.size() >= i) ? SM_BJet_Discs_.at(SM_BJet_Discs_.size() - i) : -100.;
54  }
55 
56  double pt(unsigned short i) const { return (pts_.size() >= i) ? pts_.at(i - 1) : -1.; }
57 
58  double EtSin2Theta(unsigned short i, bool boosted = false) const {
59  return boosted ? ((EtStars_.size() >= i) ? EtStars_.at(i - 1) : -1.)
60  : (EtSin2Thetas_.size() >= i) ? EtSin2Thetas_.at(i - 1)
61  : -1.;
62  }
63  double theta(unsigned short i, bool boosted = false) const {
64  return boosted ? ((thetaStars_.size() >= i) ? thetaStars_.at(i - 1) : -1.)
65  : (thetas_.size() >= i) ? thetas_.at(i - 1)
66  : -1.;
67  }
68  double sinTheta(unsigned short i, bool boosted = false) const {
69  return boosted ? ((thetaStars_.size() >= i) ? sin(thetaStars_.at(i - 1)) : -1.)
70  : (thetas_.size() >= i) ? sin(thetas_.at(i - 1))
71  : -1.;
72  }
73 
74  double EtSin2Theta3jet(bool boosted = false) const { return boosted ? EtStar3jet_ : EtSin2Theta3jet_; }
75  double theta3jet(bool boosted = false) const { return boosted ? thetaStar3jet_ : theta3jet_; }
76  double sinTheta3jet(bool boosted = false) const { return boosted ? sinThetaStar3jet_ : sinTheta3jet_; }
77 
78  double pti_ptj(unsigned short i, unsigned short j, bool norm = false) const {
79  return (pts_.size() >= j) ? (norm ? (pt(i) - pt(j)) / (pt(i) + pt(j)) : (pt(i) - pt(j))) : -1.;
80  }
81 
82  double jet_etaetaMoment(unsigned short i, bool noB = false) const {
83  return noB ? ((etaetaMomentsNoB_.size() >= i) ? etaetaMomentsNoB_.at(etaetaMomentsNoB_.size() - i) : -100.)
84  : (etaetaMoments_.size() >= i) ? etaetaMoments_.at(etaetaMoments_.size() - i)
85  : -100.;
86  }
87  double jet_etaphiMoment(unsigned short i, bool noB = false) const {
88  return noB ? ((etaphiMomentsNoB_.size() >= i) ? etaphiMomentsNoB_.at(etaphiMomentsNoB_.size() - i) : -100.)
89  : (etaphiMoments_.size() >= i) ? etaphiMoments_.at(etaphiMoments_.size() - i)
90  : -100.;
91  }
92  double jet_phiphiMoment(unsigned short i, bool noB = false) const {
93  return noB ? ((phiphiMomentsNoB_.size() >= i) ? phiphiMomentsNoB_.at(phiphiMomentsNoB_.size() - i) : -100.)
94  : (phiphiMoments_.size() >= i) ? phiphiMoments_.at(phiphiMoments_.size() - i)
95  : -100.;
96  }
97 
98  double jet_etaetaMomentMoment(unsigned short i) const {
99  return (etaetaMomentsMoment_.size() >= i) ? etaetaMomentsMoment_.at(etaetaMomentsMoment_.size() - i) : -100.;
100  }
101  double jet_etaphiMomentMoment(unsigned short i) const {
102  return (etaphiMomentsMoment_.size() >= i) ? etaphiMomentsMoment_.at(etaphiMomentsMoment_.size() - i) : -100.;
103  }
104  double jet_phiphiMomentMoment(unsigned short i) const {
105  return (phiphiMomentsMoment_.size() >= i) ? phiphiMomentsMoment_.at(phiphiMomentsMoment_.size() - i) : -100.;
106  }
107 
108  double jets_etaetaMoment(bool noB = false) const { return noB ? jets_etaetaMomentNoB_ : jets_etaetaMoment_; }
109  double jets_etaphiMoment(bool noB = false) const { return noB ? jets_etaphiMomentNoB_ : jets_etaphiMoment_; }
110  double jets_phiphiMoment(bool noB = false) const { return noB ? jets_phiphiMomentNoB_ : jets_phiphiMoment_; }
111 
112  double jet_etaetaMomentLogEt(unsigned short i) const {
113  return (etaetaMomentsLogEt_.size() >= i) ? etaetaMomentsLogEt_.at(etaetaMomentsLogEt_.size() - i) : -100.;
114  }
115  double jet_etaphiMomentLogEt(unsigned short i) const {
116  return (etaphiMomentsLogEt_.size() >= i) ? etaphiMomentsLogEt_.at(etaphiMomentsLogEt_.size() - i) : -100.;
117  }
118  double jet_phiphiMomentLogEt(unsigned short i) const {
119  return (phiphiMomentsLogEt_.size() >= i) ? phiphiMomentsLogEt_.at(phiphiMomentsLogEt_.size() - i) : -100.;
120  }
121 
122  double jet_etaetaMomentMomentLogEt(unsigned short i) const {
124  : -100.;
125  }
126  double jet_etaphiMomentMomentLogEt(unsigned short i) const {
128  : -100.;
129  }
130  double jet_phiphiMomentMomentLogEt(unsigned short i) const {
132  : -100.;
133  }
134 
138 
139  double aplanarity(bool allJets = false) const { return allJets ? aplanarityAll_ : aplanarity_; }
140  double sphericity(bool allJets = false) const { return allJets ? sphericityAll_ : sphericity_; }
141  double circularity(bool allJets = false) const { return allJets ? circularityAll_ : circularity_; }
142  double isotropy(bool allJets = false) const { return allJets ? isotropyAll_ : isotropy_; }
143  double C(bool allJets = false) const { return allJets ? CAll_ : C_; }
144  double D(bool allJets = false) const { return allJets ? DAll_ : D_; }
145 
146  double aplanarityAllCMS() const { return aplanarityAllCMS_; }
147  double sphericityAllCMS() const { return sphericityAllCMS_; }
148  double circularityAllCMS() const { return circularityAllCMS_; }
149  double isotropyAllCMS() const { return isotropyAllCMS_; }
150  double CAllCMS() const { return CAllCMS_; }
151  double DAllCMS() const { return DAllCMS_; }
152 
153  double centrality(bool alternative = false) const { return alternative ? (Ht_ / sqrt_s_) : (Ht_ / H_); }
154 
155  double thrust(bool inCMS = false) const { return inCMS ? thrustCMS_ : thrust_; }
156 
157  double dRMin(unsigned short i) const { return (dR_.size() >= i) ? dR_.at(i - 1) : -1.; }
158  double dRMinMass(unsigned short i) const { return (dRMass_.size() >= i) ? dRMass_.at(i - 1) : -1.; }
159  double dRMinAngle(unsigned short i) const { return (dRAngle_.size() >= i) ? dRAngle_.at(i - 1) : -1.; }
160 
161  double sumDR3JetMin(unsigned short i) const { return (dR3Jets_.size() >= i) ? dR3Jets_.at(i - 1) : -1.; }
162  double sumDR3JetMinMass(unsigned short i) const { return (dR3JetsMass_.size() >= i) ? dR3JetsMass_.at(i - 1) : -1.; }
163  double massDiffMWCands(unsigned short i) const {
164  return (massDiffMWCands_.size() >= i) ? massDiffMWCands_.at(i - 1) : -1.;
165  }
166 
167 private:
168  double H_;
169  double Ht_;
170  double Ht123_;
171  double Ht3jet_;
172  double sqrt_s_;
173  double Et56_;
174  double M3_;
175 
176  double TCHE_Bjets_;
177  double TCHP_Bjets_;
178  double SSVHE_Bjets_;
179  double SSVHP_Bjets_;
180  double CSV_Bjets_;
182  double SM_Bjets_;
183 
184  std::vector<double> TCHE_BJet_Discs_;
185  std::vector<double> TCHP_BJet_Discs_;
186  std::vector<double> SSVHE_BJet_Discs_;
187  std::vector<double> SSVHP_BJet_Discs_;
188  std::vector<double> CSV_BJet_Discs_;
189  std::vector<double> CSVMVA_BJet_Discs_;
190  std::vector<double> SM_BJet_Discs_;
191 
192  std::vector<double> pts_;
193  std::vector<double> EtSin2Thetas_;
194  std::vector<double> thetas_;
195  std::vector<double> thetaStars_;
196  std::vector<double> EtStars_;
197 
199  double theta3jet_;
203  double EtStar3jet_;
204 
205  std::vector<double> etaetaMoments_;
206  std::vector<double> etaphiMoments_;
207  std::vector<double> phiphiMoments_;
208 
209  std::vector<double> etaetaMomentsMoment_;
210  std::vector<double> etaphiMomentsMoment_;
211  std::vector<double> phiphiMomentsMoment_;
212 
213  std::vector<double> etaetaMomentsLogEt_;
214  std::vector<double> etaphiMomentsLogEt_;
215  std::vector<double> phiphiMomentsLogEt_;
216 
217  std::vector<double> etaetaMomentsMomentLogEt_;
218  std::vector<double> etaphiMomentsMomentLogEt_;
219  std::vector<double> phiphiMomentsMomentLogEt_;
220 
221  std::vector<double> etaetaMomentsNoB_;
222  std::vector<double> etaphiMomentsNoB_;
223  std::vector<double> phiphiMomentsNoB_;
224 
228 
232 
236 
237  double aplanarity_;
238  double sphericity_;
239  double circularity_;
240  double isotropy_;
241  double C_;
242  double D_;
243 
247  double isotropyAll_;
248  double CAll_;
249  double DAll_;
250 
255  double CAllCMS_;
256  double DAllCMS_;
257 
258  double thrust_;
259  double thrustCMS_;
260 
261  std::vector<double> dR_;
262  std::vector<double> dRMass_;
263  std::vector<double> dRAngle_;
264 
265  std::vector<double> dR3Jets_;
266  std::vector<double> dR3JetsMass_;
267 
268  std::vector<double> massDiffMWCands_;
269 };
270 
271 #endif
double jet_phiphiMoment(unsigned short i, bool noB=false) const
double dRMin(unsigned short i) const
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
double CSVMVA_Bjets() const
std::vector< double > etaetaMoments_
double sumDR3JetMin(unsigned short i) const
std::vector< double > TCHP_BJet_Discs_
double SSVHP_Bjet(unsigned short i) const
std::vector< double > dR_
std::vector< double > massDiffMWCands_
double SM_Bjets() const
std::vector< double > etaphiMoments_
std::vector< double > phiphiMomentsMoment_
double DAllCMS() const
double jet_etaetaMomentMoment(unsigned short i) const
std::vector< double > phiphiMomentsLogEt_
double TCHE_Bjet(unsigned short i) const
std::vector< double > etaphiMomentsLogEt_
double isotropy(bool allJets=false) const
std::vector< double > TCHE_BJet_Discs_
double sqrt_s() const
std::vector< double > phiphiMomentsNoB_
std::vector< double > dR3JetsMass_
double jet_phiphiMomentMomentLogEt(unsigned short i) const
double sphericity(bool allJets=false) const
double jets_etaphiMoment(bool noB=false) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< double > EtStars_
std::vector< double > etaetaMomentsMomentLogEt_
double pti_ptj(unsigned short i, unsigned short j, bool norm=false) const
double theta(unsigned short i, bool boosted=false) const
double sphericityAllCMS() const
double pt(unsigned short i) const
double jets_etaphiMomentLogEt() const
double SSVHE_Bjet(unsigned short i) const
double jets_etaetaMomentLogEt() const
std::vector< double > dR3Jets_
double sinTheta(unsigned short i, bool boosted=false) const
double Ht3jet() const
double Ht123() const
double circularity(bool allJets=false) const
std::vector< double > etaphiMomentsMomentLogEt_
double SSVHE_Bjets() const
double EtSin2Theta3jet(bool boosted=false) const
std::vector< double > etaetaMomentsLogEt_
double jets_etaetaMoment(bool noB=false) const
double dRMinAngle(unsigned short i) const
double aplanarity(bool allJets=false) const
double SM_Bjet(unsigned short i) const
double EtSin2Theta(unsigned short i, bool boosted=false) const
double jets_phiphiMomentLogEt() const
double thrust(bool inCMS=false) const
std::vector< double > SM_BJet_Discs_
double CSV_Bjet(unsigned short i) const
double TCHP_Bjets() const
std::vector< double > EtSin2Thetas_
double circularityAllCMS() const
double jet_etaphiMoment(unsigned short i, bool noB=false) const
double jet_etaetaMomentLogEt(unsigned short i) const
std::vector< double > etaetaMomentsNoB_
double aplanarityAllCMS() const
double sinTheta3jet(bool boosted=false) const
double jets_phiphiMoment(bool noB=false) const
std::vector< double > thetas_
double TCHE_Bjets() const
std::vector< double > pts_
std::vector< double > dRAngle_
std::vector< double > thetaStars_
double jet_etaphiMomentMomentLogEt(unsigned short i) const
std::vector< double > SSVHP_BJet_Discs_
std::vector< double > CSV_BJet_Discs_
double CAllCMS() const
double TCHP_Bjet(unsigned short i) const
std::vector< double > SSVHE_BJet_Discs_
double theta3jet(bool boosted=false) const
double jet_etaetaMomentMomentLogEt(unsigned short i) const
std::vector< double > CSVMVA_BJet_Discs_
double jet_etaphiMomentLogEt(unsigned short i) const
double jet_etaetaMoment(unsigned short i, bool noB=false) const
double centrality(bool alternative=false) const
double dRMinMass(unsigned short i) const
double jet_phiphiMomentLogEt(unsigned short i) const
std::vector< double > etaphiMomentsNoB_
double D(bool allJets=false) const
double C(bool allJets=false) const
std::vector< double > etaphiMomentsMoment_
double CSVMVA_Bjet(unsigned short i) const
double isotropyAllCMS() const
double jet_etaphiMomentMoment(unsigned short i) const
double SSVHP_Bjets() const
std::vector< double > etaetaMomentsMoment_
std::vector< double > phiphiMoments_
double sumDR3JetMinMass(unsigned short i) const
std::vector< double > phiphiMomentsMomentLogEt_
double jet_phiphiMomentMoment(unsigned short i) const
std::vector< double > dRMass_
double CSV_Bjets() const
double massDiffMWCands(unsigned short i) const