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:
14 
16  TtFullHadSignalSel(const std::vector<pat::Jet>&);
18 
19  double H() const { return H_; }
20  double Ht() const { return Ht_; }
21  double Ht123() const { return Ht123_; }
22  double Ht3jet() const { return Ht3jet_; }
23  double sqrt_s() const { return sqrt_s_; }
24  double Et56() const { return Et56_; }
25  double M3() const { return M3_; }
26 
27  double TCHE_Bjets() const { return TCHE_Bjets_; }
28  double TCHP_Bjets() const { return TCHP_Bjets_; }
29  double SSVHE_Bjets() const { return SSVHE_Bjets_; }
30  double SSVHP_Bjets() const { return SSVHP_Bjets_; }
31  double CSV_Bjets() const { return CSV_Bjets_; }
32  double CSVMVA_Bjets() const { return CSVMVA_Bjets_; }
33  double SM_Bjets() const { return SM_Bjets_; }
34 
35  double TCHE_Bjet (unsigned short i) const { return (TCHE_BJet_Discs_ .size() >= i) ? TCHE_BJet_Discs_ .at(TCHE_BJet_Discs_ .size()-i) : -100.; }
36  double TCHP_Bjet (unsigned short i) const { return (TCHP_BJet_Discs_ .size() >= i) ? TCHP_BJet_Discs_ .at(TCHP_BJet_Discs_ .size()-i) : -100.; }
37  double SSVHE_Bjet (unsigned short i) const { return (SSVHE_BJet_Discs_ .size() >= i) ? SSVHE_BJet_Discs_ .at(SSVHE_BJet_Discs_ .size()-i) : -100.; }
38  double SSVHP_Bjet (unsigned short i) const { return (SSVHP_BJet_Discs_ .size() >= i) ? SSVHP_BJet_Discs_ .at(SSVHP_BJet_Discs_ .size()-i) : -100.; }
39  double CSV_Bjet (unsigned short i) const { return (CSV_BJet_Discs_ .size() >= i) ? CSV_BJet_Discs_ .at(CSV_BJet_Discs_ .size()-i) : -100.; }
40  double CSVMVA_Bjet(unsigned short i) const { return (CSVMVA_BJet_Discs_.size() >= i) ? CSVMVA_BJet_Discs_.at(CSVMVA_BJet_Discs_.size()-i) : -100.; }
41  double SM_Bjet (unsigned short i) const { return (SM_BJet_Discs_ .size() >= i) ? SM_BJet_Discs_ .at(SM_BJet_Discs_ .size()-i) : -100.; }
42 
43  double pt(unsigned short i) const { return (pts_.size() >= i) ? pts_.at(i-1) : -1.; }
44 
45  double EtSin2Theta (unsigned short i, bool boosted=false) const { return boosted? ( (EtStars_ .size() >= i) ? EtStars_ .at(i-1) : -1.) :
46  (EtSin2Thetas_.size() >= i) ? EtSin2Thetas_ .at(i-1) : -1.; }
47  double theta (unsigned short i, bool boosted=false) const { return boosted? ( (thetaStars_ .size() >= i) ? thetaStars_ .at(i-1) : -1.) :
48  (thetas_ .size() >= i) ? thetas_ .at(i-1) : -1.; }
49  double sinTheta (unsigned short i, bool boosted=false) const { return boosted? ( (thetaStars_ .size() >= i) ? sin(thetaStars_.at(i-1)) : -1.) :
50  (thetas_ .size() >= i) ? sin(thetas_ .at(i-1)) : -1.; }
51 
52  double EtSin2Theta3jet(bool boosted=false) const { return boosted? EtStar3jet_ : EtSin2Theta3jet_; }
53  double theta3jet (bool boosted=false) const { return boosted? thetaStar3jet_ : theta3jet_; }
54  double sinTheta3jet (bool boosted=false) const { return boosted? sinThetaStar3jet_ : sinTheta3jet_; }
55 
56  double pti_ptj(unsigned short i, unsigned short j, bool norm=false) const { return (pts_.size() >= j) ? ( norm ? (pt(i) - pt(j))/(pt(i) + pt(j)) : (pt(i) - pt(j)) ) : -1.; }
57 
58  double jet_etaetaMoment(unsigned short i, bool noB=false) const { return noB? ( (etaetaMomentsNoB_.size()>= i)? etaetaMomentsNoB_.at(etaetaMomentsNoB_.size() - i) : -100.) :
59  (etaetaMoments_ .size()>= i)? etaetaMoments_ .at(etaetaMoments_ .size() - i) : -100.; }
60  double jet_etaphiMoment(unsigned short i, bool noB=false) const { return noB? ( (etaphiMomentsNoB_.size()>= i)? etaphiMomentsNoB_.at(etaphiMomentsNoB_.size() - i) : -100.) :
61  (etaphiMoments_ .size()>= i)? etaphiMoments_ .at(etaphiMoments_ .size() - i) : -100.; }
62  double jet_phiphiMoment(unsigned short i, bool noB=false) const { return noB? ( (phiphiMomentsNoB_.size()>= i)? phiphiMomentsNoB_.at(phiphiMomentsNoB_.size() - i) : -100.) :
63  (phiphiMoments_ .size()>= i)? phiphiMoments_ .at(phiphiMoments_ .size() - i) : -100.; }
64 
65  double jet_etaetaMomentMoment(unsigned short i) const { return (etaetaMomentsMoment_.size()>= i)? etaetaMomentsMoment_.at(etaetaMomentsMoment_.size() - i) : -100.; }
66  double jet_etaphiMomentMoment(unsigned short i) const { return (etaphiMomentsMoment_.size()>= i)? etaphiMomentsMoment_.at(etaphiMomentsMoment_.size() - i) : -100.; }
67  double jet_phiphiMomentMoment(unsigned short i) const { return (phiphiMomentsMoment_.size()>= i)? phiphiMomentsMoment_.at(phiphiMomentsMoment_.size() - i) : -100.; }
68 
69  double jets_etaetaMoment(bool noB=false) const { return noB ? jets_etaetaMomentNoB_ : jets_etaetaMoment_; }
70  double jets_etaphiMoment(bool noB=false) const { return noB ? jets_etaphiMomentNoB_ : jets_etaphiMoment_; }
71  double jets_phiphiMoment(bool noB=false) const { return noB ? jets_phiphiMomentNoB_ : jets_phiphiMoment_; }
72 
73  double jet_etaetaMomentLogEt(unsigned short i) const { return (etaetaMomentsLogEt_.size()>= i)? etaetaMomentsLogEt_.at(etaetaMomentsLogEt_.size() - i) : -100.; }
74  double jet_etaphiMomentLogEt(unsigned short i) const { return (etaphiMomentsLogEt_.size()>= i)? etaphiMomentsLogEt_.at(etaphiMomentsLogEt_.size() - i) : -100.; }
75  double jet_phiphiMomentLogEt(unsigned short i) const { return (phiphiMomentsLogEt_.size()>= i)? phiphiMomentsLogEt_.at(phiphiMomentsLogEt_.size() - i) : -100.; }
76 
77  double jet_etaetaMomentMomentLogEt(unsigned short i) const { return (etaetaMomentsMomentLogEt_.size()>= i)? etaetaMomentsMomentLogEt_.at(etaetaMomentsMomentLogEt_.size() - i) : -100.; }
78  double jet_etaphiMomentMomentLogEt(unsigned short i) const { return (etaphiMomentsMomentLogEt_.size()>= i)? etaphiMomentsMomentLogEt_.at(etaphiMomentsMomentLogEt_.size() - i) : -100.; }
79  double jet_phiphiMomentMomentLogEt(unsigned short i) const { return (phiphiMomentsMomentLogEt_.size()>= i)? phiphiMomentsMomentLogEt_.at(phiphiMomentsMomentLogEt_.size() - i) : -100.; }
80 
84 
85  double aplanarity (bool allJets=false) const { return allJets ? aplanarityAll_ : aplanarity_; }
86  double sphericity (bool allJets=false) const { return allJets ? sphericityAll_ : sphericity_; }
87  double circularity(bool allJets=false) const { return allJets ? circularityAll_ : circularity_; }
88  double isotropy (bool allJets=false) const { return allJets ? isotropyAll_ : isotropy_; }
89  double C (bool allJets=false) const { return allJets ? CAll_ : C_; }
90  double D (bool allJets=false) const { return allJets ? DAll_ : D_; }
91 
92  double aplanarityAllCMS () const { return aplanarityAllCMS_; }
93  double sphericityAllCMS () const { return sphericityAllCMS_; }
94  double circularityAllCMS() const { return circularityAllCMS_; }
95  double isotropyAllCMS () const { return isotropyAllCMS_; }
96  double CAllCMS () const { return CAllCMS_; }
97  double DAllCMS () const { return DAllCMS_; }
98 
99  double centrality(bool alternative=false) const { return alternative ? (Ht_/sqrt_s_) : (Ht_/H_); }
100 
101  double thrust(bool inCMS=false) const { return inCMS ? thrustCMS_ : thrust_; }
102 
103  double dRMin (unsigned short i) const { return (dR_ .size() >= i) ? dR_ .at(i-1) : -1.; }
104  double dRMinMass (unsigned short i) const { return (dRMass_ .size() >= i) ? dRMass_ .at(i-1) : -1.; }
105  double dRMinAngle(unsigned short i) const { return (dRAngle_.size() >= i) ? dRAngle_.at(i-1) : -1.; }
106 
107  double sumDR3JetMin (unsigned short i) const { return (dR3Jets_ .size() >= i) ? dR3Jets_ .at(i-1) : -1.; }
108  double sumDR3JetMinMass(unsigned short i) const { return (dR3JetsMass_ .size() >= i) ? dR3JetsMass_ .at(i-1) : -1.; }
109  double massDiffMWCands (unsigned short i) const { return (massDiffMWCands_.size() >= i) ? massDiffMWCands_.at(i-1) : -1.; }
110 
111 private:
112 
113  double H_;
114  double Ht_;
115  double Ht123_;
116  double Ht3jet_;
117  double sqrt_s_;
118  double Et56_;
119  double M3_;
120 
121  double TCHE_Bjets_;
122  double TCHP_Bjets_;
123  double SSVHE_Bjets_;
124  double SSVHP_Bjets_;
125  double CSV_Bjets_;
127  double SM_Bjets_;
128 
129  std::vector<double> TCHE_BJet_Discs_;
130  std::vector<double> TCHP_BJet_Discs_;
131  std::vector<double> SSVHE_BJet_Discs_;
132  std::vector<double> SSVHP_BJet_Discs_;
133  std::vector<double> CSV_BJet_Discs_;
134  std::vector<double> CSVMVA_BJet_Discs_;
135  std::vector<double> SM_BJet_Discs_;
136 
137  std::vector<double> pts_;
138  std::vector<double> EtSin2Thetas_;
139  std::vector<double> thetas_;
140  std::vector<double> thetaStars_;
141  std::vector<double> EtStars_;
142 
144  double theta3jet_;
148  double EtStar3jet_;
149 
150  std::vector<double> etaetaMoments_;
151  std::vector<double> etaphiMoments_;
152  std::vector<double> phiphiMoments_;
153 
154  std::vector<double> etaetaMomentsMoment_;
155  std::vector<double> etaphiMomentsMoment_;
156  std::vector<double> phiphiMomentsMoment_;
157 
158  std::vector<double> etaetaMomentsLogEt_;
159  std::vector<double> etaphiMomentsLogEt_;
160  std::vector<double> phiphiMomentsLogEt_;
161 
162  std::vector<double> etaetaMomentsMomentLogEt_;
163  std::vector<double> etaphiMomentsMomentLogEt_;
164  std::vector<double> phiphiMomentsMomentLogEt_;
165 
166  std::vector<double> etaetaMomentsNoB_;
167  std::vector<double> etaphiMomentsNoB_;
168  std::vector<double> phiphiMomentsNoB_;
169 
173 
177 
181 
182  double aplanarity_;
183  double sphericity_;
184  double circularity_;
185  double isotropy_;
186  double C_;
187  double D_;
188 
192  double isotropyAll_;
193  double CAll_;
194  double DAll_;
195 
200  double CAllCMS_;
201  double DAllCMS_;
202 
203  double thrust_;
204  double thrustCMS_;
205 
206  std::vector<double> dR_;
207  std::vector<double> dRMass_;
208  std::vector<double> dRAngle_;
209 
210  std::vector<double> dR3Jets_;
211  std::vector<double> dR3JetsMass_;
212 
213  std::vector<double> massDiffMWCands_;
214 
215 };
216 
217 #endif
size
Write out results.
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
int i
Definition: DBlmapReader.cc:9
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_
int j
Definition: DBlmapReader.cc:9
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_