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) : -1.;
61  }
62  double theta(unsigned short i, bool boosted = false) const {
63  return boosted ? ((thetaStars_.size() >= i) ? thetaStars_.at(i - 1) : -1.)
64  : (thetas_.size() >= i) ? thetas_.at(i - 1) : -1.;
65  }
66  double sinTheta(unsigned short i, bool boosted = false) const {
67  return boosted ? ((thetaStars_.size() >= i) ? sin(thetaStars_.at(i - 1)) : -1.)
68  : (thetas_.size() >= i) ? sin(thetas_.at(i - 1)) : -1.;
69  }
70 
71  double EtSin2Theta3jet(bool boosted = false) const { return boosted ? EtStar3jet_ : EtSin2Theta3jet_; }
72  double theta3jet(bool boosted = false) const { return boosted ? thetaStar3jet_ : theta3jet_; }
73  double sinTheta3jet(bool boosted = false) const { return boosted ? sinThetaStar3jet_ : sinTheta3jet_; }
74 
75  double pti_ptj(unsigned short i, unsigned short j, bool norm = false) const {
76  return (pts_.size() >= j) ? (norm ? (pt(i) - pt(j)) / (pt(i) + pt(j)) : (pt(i) - pt(j))) : -1.;
77  }
78 
79  double jet_etaetaMoment(unsigned short i, bool noB = false) const {
80  return noB ? ((etaetaMomentsNoB_.size() >= i) ? etaetaMomentsNoB_.at(etaetaMomentsNoB_.size() - i) : -100.)
81  : (etaetaMoments_.size() >= i) ? etaetaMoments_.at(etaetaMoments_.size() - i) : -100.;
82  }
83  double jet_etaphiMoment(unsigned short i, bool noB = false) const {
84  return noB ? ((etaphiMomentsNoB_.size() >= i) ? etaphiMomentsNoB_.at(etaphiMomentsNoB_.size() - i) : -100.)
85  : (etaphiMoments_.size() >= i) ? etaphiMoments_.at(etaphiMoments_.size() - i) : -100.;
86  }
87  double jet_phiphiMoment(unsigned short i, bool noB = false) const {
88  return noB ? ((phiphiMomentsNoB_.size() >= i) ? phiphiMomentsNoB_.at(phiphiMomentsNoB_.size() - i) : -100.)
89  : (phiphiMoments_.size() >= i) ? phiphiMoments_.at(phiphiMoments_.size() - i) : -100.;
90  }
91 
92  double jet_etaetaMomentMoment(unsigned short i) const {
93  return (etaetaMomentsMoment_.size() >= i) ? etaetaMomentsMoment_.at(etaetaMomentsMoment_.size() - i) : -100.;
94  }
95  double jet_etaphiMomentMoment(unsigned short i) const {
96  return (etaphiMomentsMoment_.size() >= i) ? etaphiMomentsMoment_.at(etaphiMomentsMoment_.size() - i) : -100.;
97  }
98  double jet_phiphiMomentMoment(unsigned short i) const {
99  return (phiphiMomentsMoment_.size() >= i) ? phiphiMomentsMoment_.at(phiphiMomentsMoment_.size() - i) : -100.;
100  }
101 
102  double jets_etaetaMoment(bool noB = false) const { return noB ? jets_etaetaMomentNoB_ : jets_etaetaMoment_; }
103  double jets_etaphiMoment(bool noB = false) const { return noB ? jets_etaphiMomentNoB_ : jets_etaphiMoment_; }
104  double jets_phiphiMoment(bool noB = false) const { return noB ? jets_phiphiMomentNoB_ : jets_phiphiMoment_; }
105 
106  double jet_etaetaMomentLogEt(unsigned short i) const {
107  return (etaetaMomentsLogEt_.size() >= i) ? etaetaMomentsLogEt_.at(etaetaMomentsLogEt_.size() - i) : -100.;
108  }
109  double jet_etaphiMomentLogEt(unsigned short i) const {
110  return (etaphiMomentsLogEt_.size() >= i) ? etaphiMomentsLogEt_.at(etaphiMomentsLogEt_.size() - i) : -100.;
111  }
112  double jet_phiphiMomentLogEt(unsigned short i) const {
113  return (phiphiMomentsLogEt_.size() >= i) ? phiphiMomentsLogEt_.at(phiphiMomentsLogEt_.size() - i) : -100.;
114  }
115 
116  double jet_etaetaMomentMomentLogEt(unsigned short i) const {
118  : -100.;
119  }
120  double jet_etaphiMomentMomentLogEt(unsigned short i) const {
122  : -100.;
123  }
124  double jet_phiphiMomentMomentLogEt(unsigned short i) const {
126  : -100.;
127  }
128 
132 
133  double aplanarity(bool allJets = false) const { return allJets ? aplanarityAll_ : aplanarity_; }
134  double sphericity(bool allJets = false) const { return allJets ? sphericityAll_ : sphericity_; }
135  double circularity(bool allJets = false) const { return allJets ? circularityAll_ : circularity_; }
136  double isotropy(bool allJets = false) const { return allJets ? isotropyAll_ : isotropy_; }
137  double C(bool allJets = false) const { return allJets ? CAll_ : C_; }
138  double D(bool allJets = false) const { return allJets ? DAll_ : D_; }
139 
140  double aplanarityAllCMS() const { return aplanarityAllCMS_; }
141  double sphericityAllCMS() const { return sphericityAllCMS_; }
142  double circularityAllCMS() const { return circularityAllCMS_; }
143  double isotropyAllCMS() const { return isotropyAllCMS_; }
144  double CAllCMS() const { return CAllCMS_; }
145  double DAllCMS() const { return DAllCMS_; }
146 
147  double centrality(bool alternative = false) const { return alternative ? (Ht_ / sqrt_s_) : (Ht_ / H_); }
148 
149  double thrust(bool inCMS = false) const { return inCMS ? thrustCMS_ : thrust_; }
150 
151  double dRMin(unsigned short i) const { return (dR_.size() >= i) ? dR_.at(i - 1) : -1.; }
152  double dRMinMass(unsigned short i) const { return (dRMass_.size() >= i) ? dRMass_.at(i - 1) : -1.; }
153  double dRMinAngle(unsigned short i) const { return (dRAngle_.size() >= i) ? dRAngle_.at(i - 1) : -1.; }
154 
155  double sumDR3JetMin(unsigned short i) const { return (dR3Jets_.size() >= i) ? dR3Jets_.at(i - 1) : -1.; }
156  double sumDR3JetMinMass(unsigned short i) const { return (dR3JetsMass_.size() >= i) ? dR3JetsMass_.at(i - 1) : -1.; }
157  double massDiffMWCands(unsigned short i) const {
158  return (massDiffMWCands_.size() >= i) ? massDiffMWCands_.at(i - 1) : -1.;
159  }
160 
161 private:
162  double H_;
163  double Ht_;
164  double Ht123_;
165  double Ht3jet_;
166  double sqrt_s_;
167  double Et56_;
168  double M3_;
169 
170  double TCHE_Bjets_;
171  double TCHP_Bjets_;
172  double SSVHE_Bjets_;
173  double SSVHP_Bjets_;
174  double CSV_Bjets_;
176  double SM_Bjets_;
177 
178  std::vector<double> TCHE_BJet_Discs_;
179  std::vector<double> TCHP_BJet_Discs_;
180  std::vector<double> SSVHE_BJet_Discs_;
181  std::vector<double> SSVHP_BJet_Discs_;
182  std::vector<double> CSV_BJet_Discs_;
183  std::vector<double> CSVMVA_BJet_Discs_;
184  std::vector<double> SM_BJet_Discs_;
185 
186  std::vector<double> pts_;
187  std::vector<double> EtSin2Thetas_;
188  std::vector<double> thetas_;
189  std::vector<double> thetaStars_;
190  std::vector<double> EtStars_;
191 
193  double theta3jet_;
197  double EtStar3jet_;
198 
199  std::vector<double> etaetaMoments_;
200  std::vector<double> etaphiMoments_;
201  std::vector<double> phiphiMoments_;
202 
203  std::vector<double> etaetaMomentsMoment_;
204  std::vector<double> etaphiMomentsMoment_;
205  std::vector<double> phiphiMomentsMoment_;
206 
207  std::vector<double> etaetaMomentsLogEt_;
208  std::vector<double> etaphiMomentsLogEt_;
209  std::vector<double> phiphiMomentsLogEt_;
210 
211  std::vector<double> etaetaMomentsMomentLogEt_;
212  std::vector<double> etaphiMomentsMomentLogEt_;
213  std::vector<double> phiphiMomentsMomentLogEt_;
214 
215  std::vector<double> etaetaMomentsNoB_;
216  std::vector<double> etaphiMomentsNoB_;
217  std::vector<double> phiphiMomentsNoB_;
218 
222 
226 
230 
231  double aplanarity_;
232  double sphericity_;
233  double circularity_;
234  double isotropy_;
235  double C_;
236  double D_;
237 
241  double isotropyAll_;
242  double CAll_;
243  double DAll_;
244 
249  double CAllCMS_;
250  double DAllCMS_;
251 
252  double thrust_;
253  double thrustCMS_;
254 
255  std::vector<double> dR_;
256  std::vector<double> dRMass_;
257  std::vector<double> dRAngle_;
258 
259  std::vector<double> dR3Jets_;
260  std::vector<double> dR3JetsMass_;
261 
262  std::vector<double> massDiffMWCands_;
263 };
264 
265 #endif
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
std::vector< double > etaetaMoments_
double TCHP_Bjets() const
std::vector< double > TCHP_BJet_Discs_
double massDiffMWCands(unsigned short i) const
double jets_phiphiMomentLogEt() const
double sphericityAllCMS() const
std::vector< double > dR_
std::vector< double > massDiffMWCands_
double jets_phiphiMoment(bool noB=false) const
double SSVHE_Bjet(unsigned short i) const
double jets_etaphiMoment(bool noB=false) const
double sumDR3JetMin(unsigned short i) const
double jet_phiphiMomentMoment(unsigned short i) const
std::vector< double > etaphiMoments_
std::vector< double > phiphiMomentsMoment_
double jet_etaetaMomentMomentLogEt(unsigned short i) const
double CAllCMS() const
double CSV_Bjet(unsigned short i) const
std::vector< double > phiphiMomentsLogEt_
std::vector< double > etaphiMomentsLogEt_
std::vector< double > TCHE_BJet_Discs_
std::vector< double > phiphiMomentsNoB_
std::vector< double > dR3JetsMass_
double pti_ptj(unsigned short i, unsigned short j, bool norm=false) const
double theta3jet(bool boosted=false) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< double > EtStars_
std::vector< double > etaetaMomentsMomentLogEt_
double EtSin2Theta(unsigned short i, bool boosted=false) const
double dRMin(unsigned short i) const
double pt(unsigned short i) const
std::vector< double > dR3Jets_
double jet_etaetaMomentMoment(unsigned short i) const
double EtSin2Theta3jet(bool boosted=false) const
double isotropyAllCMS() const
std::vector< double > etaphiMomentsMomentLogEt_
double aplanarityAllCMS() const
double SSVHE_Bjets() const
double sinTheta(unsigned short i, bool boosted=false) const
double jet_etaphiMomentLogEt(unsigned short i) const
double jets_etaetaMoment(bool noB=false) const
double C(bool allJets=false) const
std::vector< double > etaetaMomentsLogEt_
double aplanarity(bool allJets=false) const
double D(bool allJets=false) const
double SM_Bjets() const
double theta(unsigned short i, bool boosted=false) const
double jet_etaphiMomentMomentLogEt(unsigned short i) const
double Et56() const
double jet_phiphiMomentMomentLogEt(unsigned short i) const
double dRMinMass(unsigned short i) const
std::vector< double > SM_BJet_Discs_
double SSVHP_Bjets() const
double SM_Bjet(unsigned short i) const
std::vector< double > EtSin2Thetas_
double thrust(bool inCMS=false) const
double SSVHP_Bjet(unsigned short i) const
std::vector< double > etaetaMomentsNoB_
double Ht() const
double centrality(bool alternative=false) const
std::vector< double > thetas_
double sqrt_s() const
std::vector< double > pts_
std::vector< double > dRAngle_
std::vector< double > thetaStars_
double sphericity(bool allJets=false) const
double jet_etaphiMoment(unsigned short i, bool noB=false) const
double jet_etaphiMomentMoment(unsigned short i) const
std::vector< double > SSVHP_BJet_Discs_
double M3() const
std::vector< double > CSV_BJet_Discs_
double sumDR3JetMinMass(unsigned short i) const
double TCHP_Bjet(unsigned short i) const
std::vector< double > SSVHE_BJet_Discs_
double CSVMVA_Bjets() const
std::vector< double > CSVMVA_BJet_Discs_
double jets_etaphiMomentLogEt() const
double CSVMVA_Bjet(unsigned short i) const
double DAllCMS() const
double circularityAllCMS() const
double Ht3jet() const
double jet_phiphiMoment(unsigned short i, bool noB=false) const
double jet_etaetaMomentLogEt(unsigned short i) const
double circularity(bool allJets=false) const
double jets_etaetaMomentLogEt() const
double isotropy(bool allJets=false) const
double sinTheta3jet(bool boosted=false) const
double TCHE_Bjets() const
std::vector< double > etaphiMomentsNoB_
double jet_etaetaMoment(unsigned short i, bool noB=false) const
double Ht123() const
std::vector< double > etaphiMomentsMoment_
double TCHE_Bjet(unsigned short i) const
std::vector< double > etaetaMomentsMoment_
std::vector< double > phiphiMoments_
std::vector< double > phiphiMomentsMomentLogEt_
double dRMinAngle(unsigned short i) const
double CSV_Bjets() const
double jet_phiphiMomentLogEt(unsigned short i) const
std::vector< double > dRMass_