CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TtHadLRJetCombObservables.cc
Go to the documentation of this file.
1 
3 
4 // constructor with path; default should not be used
6 {
7 }
8 
10 {
11 }
12 
14 {
15  jetCombVarVal.clear();
16 
17  //observable 1 : pt(had top)
18  //Calculate the average pt for all possible combinations of light jets with the two b-jets
19  double AverageTop =((sol.getHadb().p4()+sol.getHadq().p4()+sol.getHadp().p4()).pt()+
20  (sol.getHadbbar().p4()+sol.getHadq().p4()+sol.getHadp().p4()).pt()+
21  (sol.getHadb().p4()+sol.getHadbbar().p4()+sol.getHadp().p4()).pt()+
22  (sol.getHadb().p4()+sol.getHadbbar().p4()+sol.getHadq().p4()).pt()+
23  (sol.getHadb().p4()+sol.getHadk().p4()+sol.getHadj().p4()).pt()+
24  (sol.getHadbbar().p4()+sol.getHadk().p4()+sol.getHadj().p4()).pt()+
25  (sol.getHadb().p4()+sol.getHadbbar().p4()+sol.getHadj().p4()).pt()+
26  (sol.getHadb().p4()+sol.getHadbbar().p4()+sol.getHadk().p4()).pt()+
27  (sol.getHadb().p4()+sol.getHadq().p4()+sol.getHadj().p4()).pt()+
28  (sol.getHadb().p4()+sol.getHadq().p4()+sol.getHadk().p4()).pt()+
29  (sol.getHadbbar().p4()+sol.getHadq().p4()+sol.getHadj().p4()).pt()+
30  (sol.getHadbbar().p4()+sol.getHadq().p4()+sol.getHadk().p4()).pt())/12.;
31 
32  double Obs1 = ((sol.getHadb().p4()+sol.getHadq().p4()+sol.getHadp().p4()+sol.getHadbbar().p4()+sol.getHadk().p4()+sol.getHadj().p4()).pt())/AverageTop;
33  jetCombVarVal.push_back(std::pair<unsigned int,double>(1,Obs1));
34 
35  //observable 2 : (pt_b1 + pt_b2)/(sum jetpt)
36  double obs2 = (sol.getHadb().pt()+sol.getHadbbar().pt())/(sol.getHadp().pt()+sol.getHadq().pt()+sol.getHadj().pt()+sol.getHadk().pt());
37  jetCombVarVal.push_back(std::pair<unsigned int,double>(2,obs2));
38 
39  //observable 3 and 4: delta R between had b and had W and delta R between had bbar and had W
40  double Obs3 = ROOT::Math::VectorUtil::DeltaR( sol.getHadb().p4(),(sol.getHadq().p4()+sol.getHadp().p4()) );
41  jetCombVarVal.push_back(std::pair<unsigned int,double>(3,Obs3));
42 
43  double Obs4 = ROOT::Math::VectorUtil::DeltaR( sol.getHadbbar().p4(),(sol.getHadk().p4()+sol.getHadj().p4()) );
44  jetCombVarVal.push_back(std::pair<unsigned int,double>(4,Obs4));
45 
46  //observalbe 5 and 6: delta R between light quarks pq and jk
47  double Obs5 = ROOT::Math::VectorUtil::DeltaR( sol.getHadq().p4(),sol.getHadp().p4() );
48  jetCombVarVal.push_back(std::pair<unsigned int,double>(5,Obs5));
49 
50  double Obs6 = ROOT::Math::VectorUtil::DeltaR( sol.getHadk().p4(),sol.getHadj().p4() );
51  jetCombVarVal.push_back(std::pair<unsigned int,double>(6,Obs6));
52 
53  //observable 7: b-tagging information
54  double Obs7 = 0;
55  if ( fabs(sol.getHadb().bDiscriminator("trackCountingJetTags") +10) < 0.0001 || fabs(sol.getHadbbar().bDiscriminator("trackCountingJetTags") +10)< 0.0001 ){
56  Obs7 = -10.;
57  } else {
58  Obs7 = (sol.getHadb().bDiscriminator("trackCountingJetTags")+sol.getHadbbar().bDiscriminator("trackCountingJetTags"));
59  }
60  jetCombVarVal.push_back(std::pair<unsigned int,double>(7,Obs7));
61 
62  //observable 8 : chi2 value of kinematical fit with W-mass constraint
63  double Obs8 =0;
64  if(sol.getProbChi2() <0){
65  Obs8 = -0;
66  } else {
67  Obs8 = log10(sol.getProbChi2()+.00001);
68  }
69  jetCombVarVal.push_back(std::pair<unsigned int,double>(8,Obs8));
70 
72 }
pat::Jet getHadbbar() const
pat::Jet getHadb() const
pat::Jet getHadq() const
pat::Jet getHadj() const
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
void setLRJetCombObservables(const std::vector< std::pair< unsigned int, double > > &varval)
std::vector< std::pair< unsigned int, double > > jetCombVarVal
double getProbChi2() const
pat::Jet getHadp() const
pat::Jet getHadk() const
void operator()(TtHadEvtSolution &)
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
virtual double pt() const final
transverse momentum