CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TtSemiLepJetComb Class Reference

Common calculator class to keep multivariate analysis variables for jet combinations in semi-leptonic ttbar decays. More...

#include "TopQuarkAnalysis/TopJetCombination/interface/TtSemiLepJetComb.h"

Public Member Functions

double addUserVar (std::string key, double value)
 add an arbitary user defined variable with given key and value More...
 
double bOverLightQPt () const
 
double bQuarkVar (JetComb::DecayType decay, JetComb::VarType var) const
 b quark candidate variable More...
 
double bTag (JetComb::DecayType decay, JetComb::BTagAlgo algo) const
 b-tag value of a b candidate More...
 
double combinedBTags (JetComb::BTagAlgo algo, JetComb::Operator op) const
 combined b-tag values of the two b candidates More...
 
double combinedBTagsForLightQuarks (JetComb::BTagAlgo algo, JetComb::Operator op) const
 combined b-tag values of the two light quark candidates More...
 
double compareBLepton (JetComb::DecayType decay, JetComb::CompType comp) const
 comparison between the b and the lepton candidate More...
 
double compareBNeutrino (JetComb::DecayType decay, JetComb::CompType comp) const
 comparison between the b and the neutrino candidate More...
 
double compareHadBLepB (JetComb::CompType comp) const
 comparison between the two b candidates More...
 
double compareHadTopLepTop (JetComb::CompType comp) const
 comparison between the two top candidates More...
 
double compareHadWLepW (JetComb::CompType comp) const
 comparison between the two W candidates More...
 
double compareLeptonNeutrino (JetComb::CompType comp) const
 comparison between the lepton and the neutrino candidate More...
 
double compareLightQuarks (JetComb::CompType comp) const
 comparison between the lightQ and the lightQBar candidate More...
 
double compareTopB (JetComb::DecayType dec1, JetComb::DecayType dec2, JetComb::CompType comp) const
 comparison between the top and the b candidate More...
 
double compareTopLepton (JetComb::DecayType decay, JetComb::CompType comp) const
 comparison between the top and the lepton candidate More...
 
double compareTopNeutrino (JetComb::DecayType decay, JetComb::CompType comp) const
 comparison between the top and the neutrino candidate More...
 
double compareTopW (JetComb::DecayType dec1, JetComb::DecayType dec2, JetComb::CompType comp) const
 comparison between the top and the W candidate More...
 
double compareWB (JetComb::DecayType dec1, JetComb::DecayType dec2, JetComb::CompType comp) const
 comparison between the W and the b candidate More...
 
double compareWLepton (JetComb::DecayType decay, JetComb::CompType comp) const
 comparison between the W and the lepton candidate More...
 
double compareWNeutrino (JetComb::DecayType decay, JetComb::CompType comp) const
 comparison between the W and the neutrino candidate More...
 
double leptonVar (JetComb::VarType var) const
 lepton candidate variable More...
 
double lightQVar (bool qbar, JetComb::VarType var) const
 light quark candidate variable More...
 
double neutrinoVar (JetComb::VarType var) const
 neutrino candidate variable More...
 
double relativePtHadronicTop () const
 
double topVar (JetComb::DecayType decay, JetComb::VarType var) const
 top quark candidate variable More...
 
 TtSemiLepJetComb ()
 emtpy constructor More...
 
 TtSemiLepJetComb (const std::vector< pat::Jet > &, const std::vector< int > &, const math::XYZTLorentzVector &, const pat::MET &)
 default constructor More...
 
double userVar (const std::string &key) const
 receive user defined variable value with given key More...
 
double wBosonVar (JetComb::DecayType decay, JetComb::VarType var) const
 W boson candidate variable. More...
 
 ~TtSemiLepJetComb ()
 default destructor More...
 

Private Member Functions

const pat::JetbQuark (JetComb::DecayType decay) const
 return leptonic or hadronic b candidate depending on argument More...
 
double bTag (const pat::Jet &jet, JetComb::BTagAlgo algo) const
 b-tag value of one of the 4 jets More...
 
void deduceMothers ()
 reconstruct mother candidates from final state candidates More...
 
const pat::JetlightQ (bool qbar=false) const
 return lightQ or lightQBar candidate depending on argument More...
 
double lightQVar (JetComb::VarType var) const
 light quark candidate variable with default on q and not qbar More...
 
const math::XYZTLorentzVectortop (JetComb::DecayType decay) const
 return leptonic or hadronic top candidate depending on argument More...
 
const math::XYZTLorentzVectorwBoson (JetComb::DecayType decay) const
 return leptonic or hadronic W candidate depending on argument More...
 

Private Attributes

pat::Jet hadBJet_
 hadronic b jet More...
 
pat::Jet hadQBarJet_
 lightQBar jet More...
 
pat::Jet hadQJet_
 lightQ jet More...
 
math::XYZTLorentzVector hadTop_
 hadronic top 4-vector More...
 
math::XYZTLorentzVector hadW_
 hadronic W 4-vector More...
 
pat::Jet lepBJet_
 leptonic b jet More...
 
math::XYZTLorentzVector lepton_
 lepton 4-vector More...
 
math::XYZTLorentzVector lepTop_
 leptonic top 4-vector More...
 
math::XYZTLorentzVector lepW_
 leptonic W 4-vector More...
 
pat::MET neutrino_
 neutrino candidate More...
 
std::map< std::string, double > userVariables_
 map for user defined variables More...
 

Detailed Description

Common calculator class to keep multivariate analysis variables for jet combinations in semi-leptonic ttbar decays.

This class is currently used by TtSemiLepJetCombEval.h, which is included in both the TtSemiLepJetCombMVAComputer and the TtSemiLepJetCombMVATrainer.

Definition at line 37 of file TtSemiLepJetComb.h.

Constructor & Destructor Documentation

TtSemiLepJetComb::TtSemiLepJetComb ( )

emtpy constructor

Definition at line 6 of file TtSemiLepJetComb.cc.

7 {
8 }
TtSemiLepJetComb::TtSemiLepJetComb ( const std::vector< pat::Jet > &  jets,
const std::vector< int > &  combination,
const math::XYZTLorentzVector lepton,
const pat::MET neutrino 
)

default constructor

Definition at line 10 of file TtSemiLepJetComb.cc.

References deduceMothers(), TtSemiLepEvtPartons::HadB, hadBJet_, hadQBarJet_, hadQJet_, TtSemiLepEvtPartons::LepB, lepBJet_, lepton_, TtSemiLepEvtPartons::LightQ, TtSemiLepEvtPartons::LightQBar, and neutrino_.

12 {
13  // receive right jet association
14  // from jet-parton matching
15  hadQJet_ = jets[ combination[TtSemiLepEvtPartons::LightQ ] ];
17  hadBJet_ = jets[ combination[TtSemiLepEvtPartons::HadB ] ];
18  lepBJet_ = jets[ combination[TtSemiLepEvtPartons::LepB ] ];
19  lepton_ = lepton;
20  neutrino_ = neutrino;
21  // create mother candidates from
22  // final-state candidates
23  deduceMothers();
24 }
math::XYZTLorentzVector lepton_
lepton 4-vector
vector< PseudoJet > jets
pat::Jet hadBJet_
hadronic b jet
pat::Jet hadQJet_
lightQ jet
pat::Jet lepBJet_
leptonic b jet
pat::Jet hadQBarJet_
lightQBar jet
void deduceMothers()
reconstruct mother candidates from final state candidates
pat::MET neutrino_
neutrino candidate
TtSemiLepJetComb::~TtSemiLepJetComb ( )

default destructor

Definition at line 26 of file TtSemiLepJetComb.cc.

27 {
28 }

Member Function Documentation

double TtSemiLepJetComb::addUserVar ( std::string  key,
double  value 
)
inline

add an arbitary user defined variable with given key and value

Definition at line 106 of file TtSemiLepJetComb.h.

References relval_steps::key, userVariables_, and relativeConstraints::value.

106 { return userVariables_[key]=value;};
std::map< std::string, double > userVariables_
map for user defined variables
double TtSemiLepJetComb::bOverLightQPt ( ) const

scalar sum of the pt of the b candidates relative to scalar sum of the pt of the light quark candidates

Definition at line 265 of file TtSemiLepJetComb.cc.

References bQuark(), JetComb::kHad, JetComb::kLep, lightQ(), p4, reco::LeafCandidate::p4(), and EnergyCorrector::pt.

Referenced by evaluateTtSemiLepJetComb().

266 {
267  return (bQuark(JetComb::kHad).p4().pt()+bQuark(JetComb::kLep).p4().pt())/(lightQ().p4().pt()+lightQ(true).p4().pt());
268 }
double p4[4]
Definition: TauolaWrapper.h:92
const pat::Jet & lightQ(bool qbar=false) const
return lightQ or lightQBar candidate depending on argument
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
const pat::Jet& TtSemiLepJetComb::bQuark ( JetComb::DecayType  decay) const
inlineprivate

return leptonic or hadronic b candidate depending on argument

Definition at line 122 of file TtSemiLepJetComb.h.

References hadBJet_, JetComb::kHad, and lepBJet_.

Referenced by bOverLightQPt(), bQuarkVar(), bTag(), compareBLepton(), compareBNeutrino(), compareHadBLepB(), compareTopB(), compareWB(), and relativePtHadronicTop().

122 { return (decay==JetComb::kHad ? hadBJet_ : lepBJet_); }
pat::Jet hadBJet_
hadronic b jet
pat::Jet lepBJet_
leptonic b jet
double TtSemiLepJetComb::bQuarkVar ( JetComb::DecayType  decay,
JetComb::VarType  var 
) const

b quark candidate variable

Definition at line 54 of file TtSemiLepJetComb.cc.

References bQuark(), JetComb::kEta, JetComb::kMass, JetComb::kPhi, JetComb::kPt, JetComb::kTheta, and reco::LeafCandidate::p4().

Referenced by evaluateTtSemiLepJetComb().

55 {
56  switch(var){
57  case JetComb::kMass : return -9999.;
58  case JetComb::kPt : return bQuark(decay).p4().pt();
59  case JetComb::kEta : return bQuark(decay).p4().eta();
60  case JetComb::kPhi : return bQuark(decay).p4().phi();
61  case JetComb::kTheta : return bQuark(decay).p4().theta();
62  };
63  return -9999.;
64 }
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
double TtSemiLepJetComb::bTag ( JetComb::DecayType  decay,
JetComb::BTagAlgo  algo 
) const
inline

b-tag value of a b candidate

Definition at line 99 of file TtSemiLepJetComb.h.

References bQuark(), and bTag().

Referenced by bTag(), combinedBTags(), combinedBTagsForLightQuarks(), and evaluateTtSemiLepJetComb().

99 { return bTag(bQuark(decay), algo); };
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
double bTag(JetComb::DecayType decay, JetComb::BTagAlgo algo) const
b-tag value of a b candidate
double TtSemiLepJetComb::bTag ( const pat::Jet jet,
JetComb::BTagAlgo  algo 
) const
private

b-tag value of one of the 4 jets

Definition at line 301 of file TtSemiLepJetComb.cc.

References pat::Jet::bDiscriminator(), JetComb::kBProbability, JetComb::kCombSecondVtx, JetComb::kCombSecondVtxMVA, JetComb::kProbability, JetComb::kSimpleSecondVtx, JetComb::kSofMuonByIP3d, JetComb::kSoftElec, JetComb::kSoftMuon, JetComb::kSoftMuonByPt, JetComb::kTrackCountHighEff, and JetComb::kTrackCountHighPur.

302 {
303  switch(algo){
304  case JetComb::kTrackCountHighEff : return jet.bDiscriminator("trackCountingHighEffBJetTags" );
305  case JetComb::kTrackCountHighPur : return jet.bDiscriminator("trackCountingHighPurBJetTags" );
306  case JetComb::kSoftMuon : return jet.bDiscriminator("softMuonBJetTags" );
307  case JetComb::kSoftMuonByPt : return jet.bDiscriminator("softMuonByPtBJetTags" );
308  case JetComb::kSofMuonByIP3d : return jet.bDiscriminator("softMuonByIP3dBJetTags" );
309  case JetComb::kSoftElec : return jet.bDiscriminator("softElectronBJetTags" );
310  case JetComb::kProbability : return jet.bDiscriminator("jetProbabilityBJetTags" );
311  case JetComb::kBProbability : return jet.bDiscriminator("jetBProbabilityBJetTags" );
312  case JetComb::kSimpleSecondVtx : return jet.bDiscriminator("simpleSecondaryVertexBJetTags" );
313  case JetComb::kCombSecondVtx : return jet.bDiscriminator("combinedSecondaryVertexBJetTags" );
314  case JetComb::kCombSecondVtxMVA : return jet.bDiscriminator("combinedSecondaryVertexMVABJetTags");
315  };
316  return -9999.;
317 }
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
double TtSemiLepJetComb::combinedBTags ( JetComb::BTagAlgo  algo,
JetComb::Operator  op 
) const

combined b-tag values of the two b candidates

Definition at line 270 of file TtSemiLepJetComb.cc.

References bTag(), JetComb::kAdd, JetComb::kHad, JetComb::kLep, and JetComb::kMult.

Referenced by evaluateTtSemiLepJetComb().

271 {
272  switch(op){
275  };
276  return -9999.;
277 }
double bTag(JetComb::DecayType decay, JetComb::BTagAlgo algo) const
b-tag value of a b candidate
double TtSemiLepJetComb::combinedBTagsForLightQuarks ( JetComb::BTagAlgo  algo,
JetComb::Operator  op 
) const

combined b-tag values of the two light quark candidates

Definition at line 279 of file TtSemiLepJetComb.cc.

References bTag(), JetComb::kAdd, JetComb::kMult, and lightQ().

Referenced by evaluateTtSemiLepJetComb().

280 {
281  switch(op){
282  case JetComb::kAdd : return bTag(lightQ(), algo) + bTag(lightQ(true), algo);
283  case JetComb::kMult : return bTag(lightQ(), algo) * bTag(lightQ(true), algo);
284  };
285  return -9999.;
286 }
const pat::Jet & lightQ(bool qbar=false) const
return lightQ or lightQBar candidate depending on argument
double bTag(JetComb::DecayType decay, JetComb::BTagAlgo algo) const
b-tag value of a b candidate
double TtSemiLepJetComb::compareBLepton ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the b and the lepton candidate

Definition at line 234 of file TtSemiLepJetComb.cc.

References bQuark(), HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, lepton_, and p4.

Referenced by evaluateTtSemiLepJetComb().

235 {
236  switch(comp){
237  case JetComb::kDeltaM : return -9999.;
239  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(bQuark(decay).p4(), lepton_));
240  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (bQuark(decay).p4(), lepton_);
241  };
242  return -9999.;
243 }
math::XYZTLorentzVector lepton_
lepton 4-vector
double p4[4]
Definition: TauolaWrapper.h:92
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
double TtSemiLepJetComb::compareBNeutrino ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the b and the neutrino candidate

Definition at line 245 of file TtSemiLepJetComb.cc.

References bQuark(), HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, neutrino_, p4, and reco::LeafCandidate::p4().

Referenced by evaluateTtSemiLepJetComb().

246 {
247  switch(comp){
248  case JetComb::kDeltaM : return -9999.;
250  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(bQuark(decay).p4(), neutrino_.p4()));
251  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (bQuark(decay).p4(), neutrino_.p4());
252  };
253  return -9999.;
254 }
double p4[4]
Definition: TauolaWrapper.h:92
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
pat::MET neutrino_
neutrino candidate
double TtSemiLepJetComb::compareHadBLepB ( JetComb::CompType  comp) const

comparison between the two b candidates

Definition at line 124 of file TtSemiLepJetComb.cc.

References bQuark(), HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, JetComb::kHad, JetComb::kLep, and p4.

Referenced by evaluateTtSemiLepJetComb().

125 {
126  switch(comp){
127  case JetComb::kDeltaM : return -9999.;
129  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(bQuark(JetComb::kHad).p4(), bQuark(JetComb::kLep).p4()));
130  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (bQuark(JetComb::kHad).p4(), bQuark(JetComb::kLep).p4());
131  };
132  return -9999.;
133 }
double p4[4]
Definition: TauolaWrapper.h:92
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
double TtSemiLepJetComb::compareHadTopLepTop ( JetComb::CompType  comp) const

comparison between the two top candidates

Definition at line 102 of file TtSemiLepJetComb.cc.

References HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, JetComb::kHad, JetComb::kLep, and top().

Referenced by evaluateTtSemiLepJetComb().

103 {
104  switch(comp){
105  case JetComb::kDeltaM : return top(JetComb::kHad).mass() - top(JetComb::kLep).mass();
107  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(top(JetComb::kHad), top(JetComb::kLep)));
108  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (top(JetComb::kHad), top(JetComb::kLep));
109  };
110  return -9999.;
111 }
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument
double TtSemiLepJetComb::compareHadWLepW ( JetComb::CompType  comp) const

comparison between the two W candidates

Definition at line 113 of file TtSemiLepJetComb.cc.

References HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, JetComb::kHad, JetComb::kLep, and wBoson().

Referenced by evaluateTtSemiLepJetComb().

114 {
115  switch(comp){
116  case JetComb::kDeltaM : return wBoson(JetComb::kHad).mass() - wBoson(JetComb::kLep).mass();
118  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(wBoson(JetComb::kHad), wBoson(JetComb::kLep)));
119  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (wBoson(JetComb::kHad), wBoson(JetComb::kLep));
120  };
121  return -9999.;
122 }
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument
double TtSemiLepJetComb::compareLeptonNeutrino ( JetComb::CompType  comp) const

comparison between the lepton and the neutrino candidate

Definition at line 146 of file TtSemiLepJetComb.cc.

References HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, lepton_, neutrino_, and reco::LeafCandidate::p4().

147 {
148  switch(comp){
149  case JetComb::kDeltaM : return -9999.;
151  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(lepton_, neutrino_.p4()));
152  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (lepton_, neutrino_.p4());
153  };
154  return -9999.;
155 }
math::XYZTLorentzVector lepton_
lepton 4-vector
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
pat::MET neutrino_
neutrino candidate
double TtSemiLepJetComb::compareLightQuarks ( JetComb::CompType  comp) const

comparison between the lightQ and the lightQBar candidate

Definition at line 135 of file TtSemiLepJetComb.cc.

References HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, lightQ(), and p4.

Referenced by evaluateTtSemiLepJetComb().

136 {
137  switch(comp){
138  case JetComb::kDeltaM : return -9999.;
139  case JetComb::kDeltaR : return ROOT::Math::VectorUtil::DeltaR (lightQ().p4(), lightQ(true).p4());
140  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(lightQ().p4(), lightQ(true).p4()));
141  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (lightQ().p4(), lightQ(true).p4());
142  };
143  return -9999.;
144 }
double p4[4]
Definition: TauolaWrapper.h:92
const pat::Jet & lightQ(bool qbar=false) const
return lightQ or lightQBar candidate depending on argument
double TtSemiLepJetComb::compareTopB ( JetComb::DecayType  dec1,
JetComb::DecayType  dec2,
JetComb::CompType  comp 
) const

comparison between the top and the b candidate

Definition at line 168 of file TtSemiLepJetComb.cc.

References bQuark(), HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, p4, and top().

Referenced by evaluateTtSemiLepJetComb().

169 {
170  switch(comp){
171  case JetComb::kDeltaM : return -9999.;
172  case JetComb::kDeltaR : return ROOT::Math::VectorUtil::DeltaR (top(dec1), bQuark(dec2).p4());
173  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(top(dec1), bQuark(dec2).p4()));
174  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (top(dec1), bQuark(dec2).p4());
175  };
176  return -9999.;
177 }
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument
double p4[4]
Definition: TauolaWrapper.h:92
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
double TtSemiLepJetComb::compareTopLepton ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the top and the lepton candidate

Definition at line 190 of file TtSemiLepJetComb.cc.

References HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, lepton_, and top().

Referenced by evaluateTtSemiLepJetComb().

191 {
192  switch(comp){
193  case JetComb::kDeltaM : return -9999.;
195  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(top(decay), lepton_));
196  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (top(decay), lepton_);
197  };
198  return -9999.;
199 }
math::XYZTLorentzVector lepton_
lepton 4-vector
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument
double TtSemiLepJetComb::compareTopNeutrino ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the top and the neutrino candidate

Definition at line 201 of file TtSemiLepJetComb.cc.

References HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, neutrino_, reco::LeafCandidate::p4(), and top().

Referenced by evaluateTtSemiLepJetComb().

202 {
203  switch(comp){
204  case JetComb::kDeltaM : return -9999.;
206  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(top(decay), neutrino_.p4()));
207  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (top(decay), neutrino_.p4());
208  };
209  return -9999.;
210 }
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
pat::MET neutrino_
neutrino candidate
double TtSemiLepJetComb::compareTopW ( JetComb::DecayType  dec1,
JetComb::DecayType  dec2,
JetComb::CompType  comp 
) const

comparison between the top and the W candidate

Definition at line 157 of file TtSemiLepJetComb.cc.

References HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, top(), and wBoson().

Referenced by evaluateTtSemiLepJetComb().

158 {
159  switch(comp){
160  case JetComb::kDeltaM : return top(dec1).mass() - wBoson(dec2).mass();
161  case JetComb::kDeltaR : return ROOT::Math::VectorUtil::DeltaR (top(dec1), wBoson(dec2));
162  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(top(dec1), wBoson(dec2)));
163  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (top(dec1), wBoson(dec2));
164  };
165  return -9999.;
166 }
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument
double TtSemiLepJetComb::compareWB ( JetComb::DecayType  dec1,
JetComb::DecayType  dec2,
JetComb::CompType  comp 
) const

comparison between the W and the b candidate

Definition at line 179 of file TtSemiLepJetComb.cc.

References bQuark(), HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, p4, and wBoson().

Referenced by evaluateTtSemiLepJetComb().

180 {
181  switch(comp){
182  case JetComb::kDeltaM : return -9999.;
183  case JetComb::kDeltaR : return ROOT::Math::VectorUtil::DeltaR (wBoson(dec1), bQuark(dec2).p4());
184  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(wBoson(dec1), bQuark(dec2).p4()));
185  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (wBoson(dec1), bQuark(dec2).p4());
186  };
187  return -9999.;
188 }
double p4[4]
Definition: TauolaWrapper.h:92
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
double TtSemiLepJetComb::compareWLepton ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the W and the lepton candidate

Definition at line 212 of file TtSemiLepJetComb.cc.

References HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, lepton_, and wBoson().

Referenced by evaluateTtSemiLepJetComb().

213 {
214  switch(comp){
215  case JetComb::kDeltaM : return -9999.;
217  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(wBoson(decay), lepton_));
218  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (wBoson(decay), lepton_);
219  };
220  return -9999.;
221 }
math::XYZTLorentzVector lepton_
lepton 4-vector
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument
double TtSemiLepJetComb::compareWNeutrino ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the W and the neutrino candidate

Definition at line 223 of file TtSemiLepJetComb.cc.

References HLT_25ns14e33_v1_cff::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, neutrino_, reco::LeafCandidate::p4(), and wBoson().

Referenced by evaluateTtSemiLepJetComb().

224 {
225  switch(comp){
226  case JetComb::kDeltaM : return -9999.;
228  case JetComb::kDeltaPhi : return fabs(ROOT::Math::VectorUtil::DeltaPhi(wBoson(decay), neutrino_.p4()));
229  case JetComb::kDeltaTheta : return ROOT::Math::VectorUtil::Angle (wBoson(decay), neutrino_.p4());
230  };
231  return -9999.;
232 }
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
pat::MET neutrino_
neutrino candidate
void TtSemiLepJetComb::deduceMothers ( )
private

reconstruct mother candidates from final state candidates

Definition at line 293 of file TtSemiLepJetComb.cc.

References hadBJet_, hadQBarJet_, hadQJet_, hadTop_, hadW_, lepBJet_, lepton_, lepTop_, lepW_, neutrino_, and reco::LeafCandidate::p4().

Referenced by TtSemiLepJetComb().

294 {
295  hadW_ = hadQJet_.p4() + hadQBarJet_.p4();
296  lepW_ = lepton_ + neutrino_ .p4();
297  hadTop_ = hadW_ + hadBJet_ .p4();
298  lepTop_ = lepW_ + lepBJet_ .p4();
299 }
math::XYZTLorentzVector lepton_
lepton 4-vector
math::XYZTLorentzVector hadTop_
hadronic top 4-vector
math::XYZTLorentzVector lepW_
leptonic W 4-vector
math::XYZTLorentzVector lepTop_
leptonic top 4-vector
pat::Jet hadBJet_
hadronic b jet
pat::Jet hadQJet_
lightQ jet
pat::Jet lepBJet_
leptonic b jet
math::XYZTLorentzVector hadW_
hadronic W 4-vector
pat::Jet hadQBarJet_
lightQBar jet
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
pat::MET neutrino_
neutrino candidate
double TtSemiLepJetComb::leptonVar ( JetComb::VarType  var) const

lepton candidate variable

Definition at line 78 of file TtSemiLepJetComb.cc.

References JetComb::kEta, JetComb::kMass, JetComb::kPhi, JetComb::kPt, JetComb::kTheta, and lepton_.

79 {
80  switch(var){
81  case JetComb::kMass : return -9999.;
82  case JetComb::kPt : return lepton_.pt();
83  case JetComb::kEta : return lepton_.eta();
84  case JetComb::kPhi : return lepton_.phi();
85  case JetComb::kTheta : return lepton_.theta();
86  };
87  return -9999.;
88 }
math::XYZTLorentzVector lepton_
lepton 4-vector
const pat::Jet& TtSemiLepJetComb::lightQ ( bool  qbar = false) const
inlineprivate

return lightQ or lightQBar candidate depending on argument

Definition at line 120 of file TtSemiLepJetComb.h.

References hadQBarJet_, and hadQJet_.

Referenced by bOverLightQPt(), combinedBTagsForLightQuarks(), compareLightQuarks(), lightQVar(), and relativePtHadronicTop().

120 { return (qbar ? hadQBarJet_ : hadQJet_); }
pat::Jet hadQJet_
lightQ jet
pat::Jet hadQBarJet_
lightQBar jet
double TtSemiLepJetComb::lightQVar ( bool  qbar,
JetComb::VarType  var 
) const

light quark candidate variable

Definition at line 66 of file TtSemiLepJetComb.cc.

References JetComb::kEta, JetComb::kMass, JetComb::kPhi, JetComb::kPt, JetComb::kTheta, lightQ(), and reco::LeafCandidate::p4().

Referenced by evaluateTtSemiLepJetComb().

67 {
68  switch(var){
69  case JetComb::kMass : return -9999.;
70  case JetComb::kPt : return lightQ(qbar).p4().pt();
71  case JetComb::kEta : return lightQ(qbar).p4().eta();
72  case JetComb::kPhi : return lightQ(qbar).p4().phi();
73  case JetComb::kTheta : return lightQ(qbar).p4().theta();
74  };
75  return -9999.;
76 }
const pat::Jet & lightQ(bool qbar=false) const
return lightQ or lightQBar candidate depending on argument
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
double TtSemiLepJetComb::lightQVar ( JetComb::VarType  var) const
inlineprivate

light quark candidate variable with default on q and not qbar

Definition at line 118 of file TtSemiLepJetComb.h.

References lightQVar().

Referenced by lightQVar().

118 { return lightQVar(false, var); };
double lightQVar(bool qbar, JetComb::VarType var) const
light quark candidate variable
double TtSemiLepJetComb::neutrinoVar ( JetComb::VarType  var) const

neutrino candidate variable

Definition at line 90 of file TtSemiLepJetComb.cc.

References JetComb::kEta, JetComb::kMass, JetComb::kPhi, JetComb::kPt, JetComb::kTheta, neutrino_, and reco::LeafCandidate::p4().

91 {
92  switch(var){
93  case JetComb::kMass : return -9999.;
94  case JetComb::kPt : return neutrino_.p4().pt();
95  case JetComb::kEta : return neutrino_.p4().eta();
96  case JetComb::kPhi : return neutrino_.p4().phi();
97  case JetComb::kTheta : return neutrino_.p4().theta();
98  };
99  return -9999.;
100 }
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
pat::MET neutrino_
neutrino candidate
double TtSemiLepJetComb::relativePtHadronicTop ( ) const

pt of the hadronic top candidate relative to pt of the sum of all other reconstruction possibilities (returns values between 0 and 1)

Definition at line 256 of file TtSemiLepJetComb.cc.

References bQuark(), JetComb::kHad, JetComb::kLep, lightQ(), reco::LeafCandidate::p4(), EnergyCorrector::pt, and top().

Referenced by evaluateTtSemiLepJetComb().

257 {
258  return top(JetComb::kHad).pt()/(top(JetComb::kHad).pt() +
259  (lightQ() .p4()+lightQ(true).p4()+bQuark(JetComb::kLep).p4()).pt() +
262  );
263 }
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument
const pat::Jet & lightQ(bool qbar=false) const
return lightQ or lightQBar candidate depending on argument
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
const math::XYZTLorentzVector& TtSemiLepJetComb::top ( JetComb::DecayType  decay) const
inlineprivate

return leptonic or hadronic top candidate depending on argument

Definition at line 126 of file TtSemiLepJetComb.h.

References hadTop_, JetComb::kHad, and lepTop_.

Referenced by compareHadTopLepTop(), compareTopB(), compareTopLepton(), compareTopNeutrino(), compareTopW(), relativePtHadronicTop(), and topVar().

126 { return (decay==JetComb::kHad ? hadTop_ : lepTop_); }
math::XYZTLorentzVector hadTop_
hadronic top 4-vector
math::XYZTLorentzVector lepTop_
leptonic top 4-vector
double TtSemiLepJetComb::topVar ( JetComb::DecayType  decay,
JetComb::VarType  var 
) const

top quark candidate variable

Definition at line 30 of file TtSemiLepJetComb.cc.

References JetComb::kEta, JetComb::kMass, JetComb::kPhi, JetComb::kPt, JetComb::kTheta, and top().

Referenced by evaluateTtSemiLepJetComb().

31 {
32  switch(var){
33  case JetComb::kMass : return top(decay).mass();
34  case JetComb::kPt : return top(decay).pt();
35  case JetComb::kEta : return top(decay).eta();
36  case JetComb::kPhi : return top(decay).phi();
37  case JetComb::kTheta : return top(decay).theta();
38  };
39  return -9999.;
40 }
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument
double TtSemiLepJetComb::userVar ( const std::string &  key) const
inline

receive user defined variable value with given key

Definition at line 108 of file TtSemiLepJetComb.h.

References userVariables_.

108  {
109  return (userVariables_.find(key)!=userVariables_.end() ? userVariables_.find(key)->second : -9999.);};
std::map< std::string, double > userVariables_
map for user defined variables
const math::XYZTLorentzVector& TtSemiLepJetComb::wBoson ( JetComb::DecayType  decay) const
inlineprivate

return leptonic or hadronic W candidate depending on argument

Definition at line 124 of file TtSemiLepJetComb.h.

References hadW_, JetComb::kHad, and lepW_.

Referenced by compareHadWLepW(), compareTopW(), compareWB(), compareWLepton(), compareWNeutrino(), and wBosonVar().

124 { return (decay==JetComb::kHad ? hadW_ : lepW_); }
math::XYZTLorentzVector lepW_
leptonic W 4-vector
math::XYZTLorentzVector hadW_
hadronic W 4-vector
double TtSemiLepJetComb::wBosonVar ( JetComb::DecayType  decay,
JetComb::VarType  var 
) const

W boson candidate variable.

Definition at line 42 of file TtSemiLepJetComb.cc.

References JetComb::kEta, JetComb::kMass, JetComb::kPhi, JetComb::kPt, JetComb::kTheta, and wBoson().

Referenced by evaluateTtSemiLepJetComb().

43 {
44  switch(var){
45  case JetComb::kMass : return wBoson(decay).mass();
46  case JetComb::kPt : return wBoson(decay).pt();
47  case JetComb::kEta : return wBoson(decay).eta();
48  case JetComb::kPhi : return wBoson(decay).phi();
49  case JetComb::kTheta : return wBoson(decay).theta();
50  };
51  return -9999.;
52 }
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument

Member Data Documentation

pat::Jet TtSemiLepJetComb::hadBJet_
private

hadronic b jet

Definition at line 135 of file TtSemiLepJetComb.h.

Referenced by bQuark(), deduceMothers(), and TtSemiLepJetComb().

pat::Jet TtSemiLepJetComb::hadQBarJet_
private

lightQBar jet

Definition at line 133 of file TtSemiLepJetComb.h.

Referenced by deduceMothers(), lightQ(), and TtSemiLepJetComb().

pat::Jet TtSemiLepJetComb::hadQJet_
private

lightQ jet

Definition at line 131 of file TtSemiLepJetComb.h.

Referenced by deduceMothers(), lightQ(), and TtSemiLepJetComb().

math::XYZTLorentzVector TtSemiLepJetComb::hadTop_
private

hadronic top 4-vector

Definition at line 143 of file TtSemiLepJetComb.h.

Referenced by deduceMothers(), and top().

math::XYZTLorentzVector TtSemiLepJetComb::hadW_
private

hadronic W 4-vector

Definition at line 145 of file TtSemiLepJetComb.h.

Referenced by deduceMothers(), and wBoson().

pat::Jet TtSemiLepJetComb::lepBJet_
private

leptonic b jet

Definition at line 137 of file TtSemiLepJetComb.h.

Referenced by bQuark(), deduceMothers(), and TtSemiLepJetComb().

math::XYZTLorentzVector TtSemiLepJetComb::lepton_
private
math::XYZTLorentzVector TtSemiLepJetComb::lepTop_
private

leptonic top 4-vector

Definition at line 147 of file TtSemiLepJetComb.h.

Referenced by deduceMothers(), and top().

math::XYZTLorentzVector TtSemiLepJetComb::lepW_
private

leptonic W 4-vector

Definition at line 149 of file TtSemiLepJetComb.h.

Referenced by deduceMothers(), and wBoson().

pat::MET TtSemiLepJetComb::neutrino_
private
std::map<std::string, double> TtSemiLepJetComb::userVariables_
private

map for user defined variables

Definition at line 151 of file TtSemiLepJetComb.h.

Referenced by addUserVar(), and userVar().