CMS 3D CMS Logo

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 48 of file TtSemiLepJetComb.h.

Constructor & Destructor Documentation

◆ TtSemiLepJetComb() [1/2]

TtSemiLepJetComb::TtSemiLepJetComb ( )

emtpy constructor

Definition at line 6 of file TtSemiLepJetComb.cc.

6 {}

◆ TtSemiLepJetComb() [2/2]

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 8 of file TtSemiLepJetComb.cc.

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

11  {
12  // receive right jet association
13  // from jet-parton matching
16  hadBJet_ = jets[combination[TtSemiLepEvtPartons::HadB]];
17  lepBJet_ = jets[combination[TtSemiLepEvtPartons::LepB]];
18  lepton_ = lepton;
19  neutrino_ = neutrino;
20  // create mother candidates from
21  // final-state candidates
22  deduceMothers();
23 }
math::XYZTLorentzVector lepton_
lepton 4-vector
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::~TtSemiLepJetComb ( )

default destructor

Definition at line 25 of file TtSemiLepJetComb.cc.

25 {}

Member Function Documentation

◆ addUserVar()

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

add an arbitary user defined variable with given key and value

Definition at line 118 of file TtSemiLepJetComb.h.

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

118 { return userVariables_[key] = value; };
std::map< std::string, double > userVariables_
map for user defined variables
key
prepare the HTCondor submission files and eventually submit them

◆ bOverLightQPt()

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 326 of file TtSemiLepJetComb.cc.

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

Referenced by evaluateTtSemiLepJetComb().

326  {
327  return (bQuark(JetComb::kHad).p4().pt() + bQuark(JetComb::kLep).p4().pt()) /
328  (lightQ().p4().pt() + lightQ(true).p4().pt());
329 }
const LorentzVector & p4() const final
four-momentum Lorentz vector
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

◆ bQuark()

const pat::Jet& TtSemiLepJetComb::bQuark ( JetComb::DecayType  decay) const
inlineprivate

return leptonic or hadronic b candidate depending on argument

Definition at line 134 of file TtSemiLepJetComb.h.

References WZElectronSkims53X_cff::decay, hadBJet_, JetComb::kHad, and lepBJet_.

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

134 { return (decay == JetComb::kHad ? hadBJet_ : lepBJet_); }
pat::Jet hadBJet_
hadronic b jet
pat::Jet lepBJet_
leptonic b jet

◆ bQuarkVar()

double TtSemiLepJetComb::bQuarkVar ( JetComb::DecayType  decay,
JetComb::VarType  var 
) const

b quark candidate variable

Definition at line 59 of file TtSemiLepJetComb.cc.

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

Referenced by evaluateTtSemiLepJetComb().

59  {
60  switch (var) {
61  case JetComb::kMass:
62  return -9999.;
63  case JetComb::kPt:
64  return bQuark(decay).p4().pt();
65  case JetComb::kEta:
66  return bQuark(decay).p4().eta();
67  case JetComb::kPhi:
68  return bQuark(decay).p4().phi();
69  case JetComb::kTheta:
70  return bQuark(decay).p4().theta();
71  };
72  return -9999.;
73 }
const LorentzVector & p4() const final
four-momentum Lorentz vector
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument

◆ bTag() [1/2]

double TtSemiLepJetComb::bTag ( JetComb::DecayType  decay,
JetComb::BTagAlgo  algo 
) const
inline

b-tag value of a b candidate

Definition at line 111 of file TtSemiLepJetComb.h.

References bQuark(), bTag(), and WZElectronSkims53X_cff::decay.

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

111 { 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

◆ bTag() [2/2]

double TtSemiLepJetComb::bTag ( const pat::Jet jet,
JetComb::BTagAlgo  algo 
) const
private

b-tag value of one of the 4 jets

Definition at line 362 of file TtSemiLepJetComb.cc.

References metsig::jet, JetComb::kBProbability, JetComb::kCombSecondVtx, JetComb::kCombSecondVtxMVA, JetComb::kProbability, JetComb::kSimpleSecondVtx, JetComb::kSofMuonByIP3d, JetComb::kSoftElec, JetComb::kSoftMuon, JetComb::kSoftMuonByPt, JetComb::kTrackCountHighEff, and JetComb::kTrackCountHighPur.

362  {
363  switch (algo) {
365  return jet.bDiscriminator("trackCountingHighEffBJetTags");
367  return jet.bDiscriminator("trackCountingHighPurBJetTags");
368  case JetComb::kSoftMuon:
369  return jet.bDiscriminator("softMuonBJetTags");
371  return jet.bDiscriminator("softMuonByPtBJetTags");
373  return jet.bDiscriminator("softMuonByIP3dBJetTags");
374  case JetComb::kSoftElec:
375  return jet.bDiscriminator("softElectronBJetTags");
377  return jet.bDiscriminator("jetProbabilityBJetTags");
379  return jet.bDiscriminator("jetBProbabilityBJetTags");
381  return jet.bDiscriminator("simpleSecondaryVertexBJetTags");
383  return jet.bDiscriminator("combinedSecondaryVertexBJetTags");
385  return jet.bDiscriminator("combinedSecondaryVertexMVABJetTags");
386  };
387  return -9999.;
388 }

◆ combinedBTags()

double TtSemiLepJetComb::combinedBTags ( JetComb::BTagAlgo  algo,
JetComb::Operator  op 
) const

combined b-tag values of the two b candidates

Definition at line 331 of file TtSemiLepJetComb.cc.

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

Referenced by evaluateTtSemiLepJetComb().

331  {
332  switch (op) {
333  case JetComb::kAdd:
335  case JetComb::kMult:
337  };
338  return -9999.;
339 }
double bTag(JetComb::DecayType decay, JetComb::BTagAlgo algo) const
b-tag value of a b candidate

◆ combinedBTagsForLightQuarks()

double TtSemiLepJetComb::combinedBTagsForLightQuarks ( JetComb::BTagAlgo  algo,
JetComb::Operator  op 
) const

combined b-tag values of the two light quark candidates

Definition at line 341 of file TtSemiLepJetComb.cc.

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

Referenced by evaluateTtSemiLepJetComb().

341  {
342  switch (op) {
343  case JetComb::kAdd:
344  return bTag(lightQ(), algo) + bTag(lightQ(true), algo);
345  case JetComb::kMult:
346  return bTag(lightQ(), algo) * bTag(lightQ(true), algo);
347  };
348  return -9999.;
349 }
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

◆ compareBLepton()

double TtSemiLepJetComb::compareBLepton ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the b and the lepton candidate

Definition at line 291 of file TtSemiLepJetComb.cc.

References bQuark(), AlCaHLTBitMon_QueryRunRegistry::comp, WZElectronSkims53X_cff::decay, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, and lepton_.

Referenced by evaluateTtSemiLepJetComb().

291  {
292  switch (comp) {
293  case JetComb::kDeltaM:
294  return -9999.;
295  case JetComb::kDeltaR:
297  case JetComb::kDeltaPhi:
300  return ROOT::Math::VectorUtil::Angle(bQuark(decay).p4(), lepton_);
301  };
302  return -9999.;
303 }
math::XYZTLorentzVector lepton_
lepton 4-vector
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument

◆ compareBNeutrino()

double TtSemiLepJetComb::compareBNeutrino ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the b and the neutrino candidate

Definition at line 305 of file TtSemiLepJetComb.cc.

References bQuark(), AlCaHLTBitMon_QueryRunRegistry::comp, WZElectronSkims53X_cff::decay, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, neutrino_, and reco::LeafCandidate::p4().

Referenced by evaluateTtSemiLepJetComb().

305  {
306  switch (comp) {
307  case JetComb::kDeltaM:
308  return -9999.;
309  case JetComb::kDeltaR:
311  case JetComb::kDeltaPhi:
314  return ROOT::Math::VectorUtil::Angle(bQuark(decay).p4(), neutrino_.p4());
315  };
316  return -9999.;
317 }
const LorentzVector & p4() const final
four-momentum Lorentz vector
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
pat::MET neutrino_
neutrino candidate

◆ compareHadBLepB()

double TtSemiLepJetComb::compareHadBLepB ( JetComb::CompType  comp) const

comparison between the two b candidates

Definition at line 151 of file TtSemiLepJetComb.cc.

References bQuark(), AlCaHLTBitMon_QueryRunRegistry::comp, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, JetComb::kHad, and JetComb::kLep.

Referenced by evaluateTtSemiLepJetComb().

151  {
152  switch (comp) {
153  case JetComb::kDeltaM:
154  return -9999.;
155  case JetComb::kDeltaR:
157  case JetComb::kDeltaPhi:
160  return ROOT::Math::VectorUtil::Angle(bQuark(JetComb::kHad).p4(), bQuark(JetComb::kLep).p4());
161  };
162  return -9999.;
163 }
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument

◆ compareHadTopLepTop()

double TtSemiLepJetComb::compareHadTopLepTop ( JetComb::CompType  comp) const

comparison between the two top candidates

Definition at line 123 of file TtSemiLepJetComb.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, JetComb::kHad, JetComb::kLep, and top().

Referenced by evaluateTtSemiLepJetComb().

123  {
124  switch (comp) {
125  case JetComb::kDeltaM:
126  return top(JetComb::kHad).mass() - top(JetComb::kLep).mass();
127  case JetComb::kDeltaR:
129  case JetComb::kDeltaPhi:
132  return ROOT::Math::VectorUtil::Angle(top(JetComb::kHad), top(JetComb::kLep));
133  };
134  return -9999.;
135 }
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument

◆ compareHadWLepW()

double TtSemiLepJetComb::compareHadWLepW ( JetComb::CompType  comp) const

comparison between the two W candidates

Definition at line 137 of file TtSemiLepJetComb.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, JetComb::kHad, JetComb::kLep, and wBoson().

Referenced by evaluateTtSemiLepJetComb().

137  {
138  switch (comp) {
139  case JetComb::kDeltaM:
140  return wBoson(JetComb::kHad).mass() - wBoson(JetComb::kLep).mass();
141  case JetComb::kDeltaR:
143  case JetComb::kDeltaPhi:
146  return ROOT::Math::VectorUtil::Angle(wBoson(JetComb::kHad), wBoson(JetComb::kLep));
147  };
148  return -9999.;
149 }
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument

◆ compareLeptonNeutrino()

double TtSemiLepJetComb::compareLeptonNeutrino ( JetComb::CompType  comp) const

comparison between the lepton and the neutrino candidate

Definition at line 179 of file TtSemiLepJetComb.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, lepton_, neutrino_, and reco::LeafCandidate::p4().

179  {
180  switch (comp) {
181  case JetComb::kDeltaM:
182  return -9999.;
183  case JetComb::kDeltaR:
185  case JetComb::kDeltaPhi:
188  return ROOT::Math::VectorUtil::Angle(lepton_, neutrino_.p4());
189  };
190  return -9999.;
191 }
math::XYZTLorentzVector lepton_
lepton 4-vector
const LorentzVector & p4() const final
four-momentum Lorentz vector
pat::MET neutrino_
neutrino candidate

◆ compareLightQuarks()

double TtSemiLepJetComb::compareLightQuarks ( JetComb::CompType  comp) const

comparison between the lightQ and the lightQBar candidate

Definition at line 165 of file TtSemiLepJetComb.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, and lightQ().

Referenced by evaluateTtSemiLepJetComb().

165  {
166  switch (comp) {
167  case JetComb::kDeltaM:
168  return -9999.;
169  case JetComb::kDeltaR:
170  return ROOT::Math::VectorUtil::DeltaR(lightQ().p4(), lightQ(true).p4());
171  case JetComb::kDeltaPhi:
172  return fabs(ROOT::Math::VectorUtil::DeltaPhi(lightQ().p4(), lightQ(true).p4()));
174  return ROOT::Math::VectorUtil::Angle(lightQ().p4(), lightQ(true).p4());
175  };
176  return -9999.;
177 }
const pat::Jet & lightQ(bool qbar=false) const
return lightQ or lightQBar candidate depending on argument

◆ compareTopB()

double TtSemiLepJetComb::compareTopB ( JetComb::DecayType  dec1,
JetComb::DecayType  dec2,
JetComb::CompType  comp 
) const

comparison between the top and the b candidate

Definition at line 207 of file TtSemiLepJetComb.cc.

References bQuark(), AlCaHLTBitMon_QueryRunRegistry::comp, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, and top().

Referenced by evaluateTtSemiLepJetComb().

207  {
208  switch (comp) {
209  case JetComb::kDeltaM:
210  return -9999.;
211  case JetComb::kDeltaR:
212  return ROOT::Math::VectorUtil::DeltaR(top(dec1), bQuark(dec2).p4());
213  case JetComb::kDeltaPhi:
214  return fabs(ROOT::Math::VectorUtil::DeltaPhi(top(dec1), bQuark(dec2).p4()));
216  return ROOT::Math::VectorUtil::Angle(top(dec1), bQuark(dec2).p4());
217  };
218  return -9999.;
219 }
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument

◆ compareTopLepton()

double TtSemiLepJetComb::compareTopLepton ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the top and the lepton candidate

Definition at line 235 of file TtSemiLepJetComb.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, WZElectronSkims53X_cff::decay, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, lepton_, and top().

Referenced by evaluateTtSemiLepJetComb().

235  {
236  switch (comp) {
237  case JetComb::kDeltaM:
238  return -9999.;
239  case JetComb::kDeltaR:
241  case JetComb::kDeltaPhi:
244  return ROOT::Math::VectorUtil::Angle(top(decay), lepton_);
245  };
246  return -9999.;
247 }
math::XYZTLorentzVector lepton_
lepton 4-vector
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument

◆ compareTopNeutrino()

double TtSemiLepJetComb::compareTopNeutrino ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the top and the neutrino candidate

Definition at line 249 of file TtSemiLepJetComb.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, WZElectronSkims53X_cff::decay, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, neutrino_, reco::LeafCandidate::p4(), and top().

Referenced by evaluateTtSemiLepJetComb().

249  {
250  switch (comp) {
251  case JetComb::kDeltaM:
252  return -9999.;
253  case JetComb::kDeltaR:
255  case JetComb::kDeltaPhi:
258  return ROOT::Math::VectorUtil::Angle(top(decay), neutrino_.p4());
259  };
260  return -9999.;
261 }
const LorentzVector & p4() const final
four-momentum Lorentz vector
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument
pat::MET neutrino_
neutrino candidate

◆ compareTopW()

double TtSemiLepJetComb::compareTopW ( JetComb::DecayType  dec1,
JetComb::DecayType  dec2,
JetComb::CompType  comp 
) const

comparison between the top and the W candidate

Definition at line 193 of file TtSemiLepJetComb.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, top(), and wBoson().

Referenced by evaluateTtSemiLepJetComb().

193  {
194  switch (comp) {
195  case JetComb::kDeltaM:
196  return top(dec1).mass() - wBoson(dec2).mass();
197  case JetComb::kDeltaR:
198  return ROOT::Math::VectorUtil::DeltaR(top(dec1), wBoson(dec2));
199  case JetComb::kDeltaPhi:
200  return fabs(ROOT::Math::VectorUtil::DeltaPhi(top(dec1), wBoson(dec2)));
202  return ROOT::Math::VectorUtil::Angle(top(dec1), wBoson(dec2));
203  };
204  return -9999.;
205 }
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument

◆ compareWB()

double TtSemiLepJetComb::compareWB ( JetComb::DecayType  dec1,
JetComb::DecayType  dec2,
JetComb::CompType  comp 
) const

comparison between the W and the b candidate

Definition at line 221 of file TtSemiLepJetComb.cc.

References bQuark(), AlCaHLTBitMon_QueryRunRegistry::comp, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, and wBoson().

Referenced by evaluateTtSemiLepJetComb().

221  {
222  switch (comp) {
223  case JetComb::kDeltaM:
224  return -9999.;
225  case JetComb::kDeltaR:
226  return ROOT::Math::VectorUtil::DeltaR(wBoson(dec1), bQuark(dec2).p4());
227  case JetComb::kDeltaPhi:
228  return fabs(ROOT::Math::VectorUtil::DeltaPhi(wBoson(dec1), bQuark(dec2).p4()));
230  return ROOT::Math::VectorUtil::Angle(wBoson(dec1), bQuark(dec2).p4());
231  };
232  return -9999.;
233 }
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

◆ compareWLepton()

double TtSemiLepJetComb::compareWLepton ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the W and the lepton candidate

Definition at line 263 of file TtSemiLepJetComb.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, WZElectronSkims53X_cff::decay, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, lepton_, and wBoson().

Referenced by evaluateTtSemiLepJetComb().

263  {
264  switch (comp) {
265  case JetComb::kDeltaM:
266  return -9999.;
267  case JetComb::kDeltaR:
269  case JetComb::kDeltaPhi:
272  return ROOT::Math::VectorUtil::Angle(wBoson(decay), lepton_);
273  };
274  return -9999.;
275 }
math::XYZTLorentzVector lepton_
lepton 4-vector
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument

◆ compareWNeutrino()

double TtSemiLepJetComb::compareWNeutrino ( JetComb::DecayType  decay,
JetComb::CompType  comp 
) const

comparison between the W and the neutrino candidate

Definition at line 277 of file TtSemiLepJetComb.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, WZElectronSkims53X_cff::decay, ZGammaplusJetsMonitor_cff::DeltaPhi, electronAnalyzer_cfi::DeltaR, JetComb::kDeltaM, JetComb::kDeltaPhi, JetComb::kDeltaR, JetComb::kDeltaTheta, neutrino_, reco::LeafCandidate::p4(), and wBoson().

Referenced by evaluateTtSemiLepJetComb().

277  {
278  switch (comp) {
279  case JetComb::kDeltaM:
280  return -9999.;
281  case JetComb::kDeltaR:
283  case JetComb::kDeltaPhi:
286  return ROOT::Math::VectorUtil::Angle(wBoson(decay), neutrino_.p4());
287  };
288  return -9999.;
289 }
const LorentzVector & p4() const final
four-momentum Lorentz vector
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument
pat::MET neutrino_
neutrino candidate

◆ deduceMothers()

void TtSemiLepJetComb::deduceMothers ( )
private

reconstruct mother candidates from final state candidates

Definition at line 355 of file TtSemiLepJetComb.cc.

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

Referenced by TtSemiLepJetComb().

355  {
356  hadW_ = hadQJet_.p4() + hadQBarJet_.p4();
357  lepW_ = lepton_ + neutrino_.p4();
358  hadTop_ = hadW_ + hadBJet_.p4();
359  lepTop_ = lepW_ + lepBJet_.p4();
360 }
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
const LorentzVector & p4() const final
four-momentum Lorentz 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
pat::MET neutrino_
neutrino candidate

◆ leptonVar()

double TtSemiLepJetComb::leptonVar ( JetComb::VarType  var) const

lepton candidate variable

Definition at line 91 of file TtSemiLepJetComb.cc.

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

91  {
92  switch (var) {
93  case JetComb::kMass:
94  return -9999.;
95  case JetComb::kPt:
96  return lepton_.pt();
97  case JetComb::kEta:
98  return lepton_.eta();
99  case JetComb::kPhi:
100  return lepton_.phi();
101  case JetComb::kTheta:
102  return lepton_.theta();
103  };
104  return -9999.;
105 }
math::XYZTLorentzVector lepton_
lepton 4-vector

◆ lightQ()

const pat::Jet& TtSemiLepJetComb::lightQ ( bool  qbar = false) const
inlineprivate

return lightQ or lightQBar candidate depending on argument

Definition at line 132 of file TtSemiLepJetComb.h.

References hadQBarJet_, and hadQJet_.

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

132 { return (qbar ? hadQBarJet_ : hadQJet_); }
pat::Jet hadQJet_
lightQ jet
pat::Jet hadQBarJet_
lightQBar jet

◆ lightQVar() [1/2]

double TtSemiLepJetComb::lightQVar ( bool  qbar,
JetComb::VarType  var 
) const

light quark candidate variable

Definition at line 75 of file TtSemiLepJetComb.cc.

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

Referenced by evaluateTtSemiLepJetComb().

75  {
76  switch (var) {
77  case JetComb::kMass:
78  return -9999.;
79  case JetComb::kPt:
80  return lightQ(qbar).p4().pt();
81  case JetComb::kEta:
82  return lightQ(qbar).p4().eta();
83  case JetComb::kPhi:
84  return lightQ(qbar).p4().phi();
85  case JetComb::kTheta:
86  return lightQ(qbar).p4().theta();
87  };
88  return -9999.;
89 }
const LorentzVector & p4() const final
four-momentum Lorentz vector
const pat::Jet & lightQ(bool qbar=false) const
return lightQ or lightQBar candidate depending on argument

◆ lightQVar() [2/2]

double TtSemiLepJetComb::lightQVar ( JetComb::VarType  var) const
inlineprivate

light quark candidate variable with default on q and not qbar

Definition at line 130 of file TtSemiLepJetComb.h.

References lightQVar(), and ALCARECOEcalPhiSym_cff::var.

Referenced by lightQVar().

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

◆ neutrinoVar()

double TtSemiLepJetComb::neutrinoVar ( JetComb::VarType  var) const

neutrino candidate variable

Definition at line 107 of file TtSemiLepJetComb.cc.

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

107  {
108  switch (var) {
109  case JetComb::kMass:
110  return -9999.;
111  case JetComb::kPt:
112  return neutrino_.p4().pt();
113  case JetComb::kEta:
114  return neutrino_.p4().eta();
115  case JetComb::kPhi:
116  return neutrino_.p4().phi();
117  case JetComb::kTheta:
118  return neutrino_.p4().theta();
119  };
120  return -9999.;
121 }
const LorentzVector & p4() const final
four-momentum Lorentz vector
pat::MET neutrino_
neutrino candidate

◆ relativePtHadronicTop()

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 319 of file TtSemiLepJetComb.cc.

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

Referenced by evaluateTtSemiLepJetComb().

319  {
320  return top(JetComb::kHad).pt() /
321  (top(JetComb::kHad).pt() + (lightQ().p4() + lightQ(true).p4() + bQuark(JetComb::kLep).p4()).pt() +
322  (lightQ().p4() + bQuark(JetComb::kHad).p4() + bQuark(JetComb::kLep).p4()).pt() +
323  (bQuark(JetComb::kHad).p4() + lightQ(true).p4() + bQuark(JetComb::kLep).p4()).pt());
324 }
const LorentzVector & p4() const final
four-momentum Lorentz vector
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
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument

◆ top()

const math::XYZTLorentzVector& TtSemiLepJetComb::top ( JetComb::DecayType  decay) const
inlineprivate

return leptonic or hadronic top candidate depending on argument

Definition at line 140 of file TtSemiLepJetComb.h.

References WZElectronSkims53X_cff::decay, hadTop_, JetComb::kHad, and lepTop_.

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

140  {
141  return (decay == JetComb::kHad ? hadTop_ : lepTop_);
142  }
math::XYZTLorentzVector hadTop_
hadronic top 4-vector
math::XYZTLorentzVector lepTop_
leptonic top 4-vector

◆ topVar()

double TtSemiLepJetComb::topVar ( JetComb::DecayType  decay,
JetComb::VarType  var 
) const

top quark candidate variable

Definition at line 27 of file TtSemiLepJetComb.cc.

References WZElectronSkims53X_cff::decay, JetComb::kEta, JetComb::kMass, JetComb::kPhi, JetComb::kPt, JetComb::kTheta, top(), and ALCARECOEcalPhiSym_cff::var.

Referenced by evaluateTtSemiLepJetComb().

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

◆ userVar()

double TtSemiLepJetComb::userVar ( const std::string &  key) const
inline

receive user defined variable value with given key

Definition at line 120 of file TtSemiLepJetComb.h.

References submitPVResolutionJobs::key, and userVariables_.

120  {
121  return (userVariables_.find(key) != userVariables_.end() ? userVariables_.find(key)->second : -9999.);
122  };
std::map< std::string, double > userVariables_
map for user defined variables
key
prepare the HTCondor submission files and eventually submit them

◆ wBoson()

const math::XYZTLorentzVector& TtSemiLepJetComb::wBoson ( JetComb::DecayType  decay) const
inlineprivate

return leptonic or hadronic W candidate depending on argument

Definition at line 136 of file TtSemiLepJetComb.h.

References WZElectronSkims53X_cff::decay, hadW_, JetComb::kHad, and lepW_.

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

136  {
137  return (decay == JetComb::kHad ? hadW_ : lepW_);
138  }
math::XYZTLorentzVector lepW_
leptonic W 4-vector
math::XYZTLorentzVector hadW_
hadronic W 4-vector

◆ wBosonVar()

double TtSemiLepJetComb::wBosonVar ( JetComb::DecayType  decay,
JetComb::VarType  var 
) const

W boson candidate variable.

Definition at line 43 of file TtSemiLepJetComb.cc.

References WZElectronSkims53X_cff::decay, JetComb::kEta, JetComb::kMass, JetComb::kPhi, JetComb::kPt, JetComb::kTheta, ALCARECOEcalPhiSym_cff::var, and wBoson().

Referenced by evaluateTtSemiLepJetComb().

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

Member Data Documentation

◆ hadBJet_

pat::Jet TtSemiLepJetComb::hadBJet_
private

hadronic b jet

Definition at line 150 of file TtSemiLepJetComb.h.

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

◆ hadQBarJet_

pat::Jet TtSemiLepJetComb::hadQBarJet_
private

lightQBar jet

Definition at line 148 of file TtSemiLepJetComb.h.

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

◆ hadQJet_

pat::Jet TtSemiLepJetComb::hadQJet_
private

lightQ jet

Definition at line 146 of file TtSemiLepJetComb.h.

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

◆ hadTop_

math::XYZTLorentzVector TtSemiLepJetComb::hadTop_
private

hadronic top 4-vector

Definition at line 158 of file TtSemiLepJetComb.h.

Referenced by deduceMothers(), and top().

◆ hadW_

math::XYZTLorentzVector TtSemiLepJetComb::hadW_
private

hadronic W 4-vector

Definition at line 160 of file TtSemiLepJetComb.h.

Referenced by deduceMothers(), and wBoson().

◆ lepBJet_

pat::Jet TtSemiLepJetComb::lepBJet_
private

leptonic b jet

Definition at line 152 of file TtSemiLepJetComb.h.

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

◆ lepton_

math::XYZTLorentzVector TtSemiLepJetComb::lepton_
private

◆ lepTop_

math::XYZTLorentzVector TtSemiLepJetComb::lepTop_
private

leptonic top 4-vector

Definition at line 162 of file TtSemiLepJetComb.h.

Referenced by deduceMothers(), and top().

◆ lepW_

math::XYZTLorentzVector TtSemiLepJetComb::lepW_
private

leptonic W 4-vector

Definition at line 164 of file TtSemiLepJetComb.h.

Referenced by deduceMothers(), and wBoson().

◆ neutrino_

pat::MET TtSemiLepJetComb::neutrino_
private

◆ userVariables_

std::map<std::string, double> TtSemiLepJetComb::userVariables_
private

map for user defined variables

Definition at line 166 of file TtSemiLepJetComb.h.

Referenced by addUserVar(), and userVar().