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.

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 }

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

◆ ~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.

118 { return userVariables_[key] = value; };

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

◆ 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.

326  {
327  return (bQuark(JetComb::kHad).p4().pt() + bQuark(JetComb::kLep).p4().pt()) /
328  (lightQ().p4().pt() + lightQ(true).p4().pt());
329 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

134 { return (decay == JetComb::kHad ? hadBJet_ : lepBJet_); }

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

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

◆ bQuarkVar()

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

b quark candidate variable

Definition at line 59 of file TtSemiLepJetComb.cc.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ bTag() [1/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.

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 }

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.

◆ bTag() [2/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.

111 { return bTag(bQuark(decay), algo); };

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

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

◆ 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.

331  {
332  switch (op) {
333  case JetComb::kAdd:
335  case JetComb::kMult:
337  };
338  return -9999.;
339 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ compareHadBLepB()

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

comparison between the two b candidates

Definition at line 151 of file TtSemiLepJetComb.cc.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ compareHadTopLepTop()

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

comparison between the two top candidates

Definition at line 123 of file TtSemiLepJetComb.cc.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ compareHadWLepW()

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

comparison between the two W candidates

Definition at line 137 of file TtSemiLepJetComb.cc.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ compareLeptonNeutrino()

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

comparison between the lepton and the neutrino candidate

Definition at line 179 of file TtSemiLepJetComb.cc.

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 }

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

◆ compareLightQuarks()

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

comparison between the lightQ and the lightQBar candidate

Definition at line 165 of file TtSemiLepJetComb.cc.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ deduceMothers()

void TtSemiLepJetComb::deduceMothers ( )
private

reconstruct mother candidates from final state candidates

Definition at line 355 of file TtSemiLepJetComb.cc.

355  {
356  hadW_ = hadQJet_.p4() + hadQBarJet_.p4();
357  lepW_ = lepton_ + neutrino_.p4();
358  hadTop_ = hadW_ + hadBJet_.p4();
359  lepTop_ = lepW_ + lepBJet_.p4();
360 }

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

Referenced by TtSemiLepJetComb().

◆ leptonVar()

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

lepton candidate variable

Definition at line 91 of file TtSemiLepJetComb.cc.

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 }

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

◆ 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.

132 { return (qbar ? hadQBarJet_ : hadQJet_); }

References hadQBarJet_, and hadQJet_.

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

◆ lightQVar() [1/2]

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

light quark candidate variable

Definition at line 75 of file TtSemiLepJetComb.cc.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

130 { return lightQVar(false, var); };

References lightQVar(), and trigObjTnPSource_cfi::var.

Referenced by lightQVar().

◆ neutrinoVar()

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

neutrino candidate variable

Definition at line 107 of file TtSemiLepJetComb.cc.

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 }

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

◆ 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.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

140  {
141  return (decay == JetComb::kHad ? hadTop_ : lepTop_);
142  }

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

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

◆ topVar()

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

top quark candidate variable

Definition at line 27 of file TtSemiLepJetComb.cc.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

◆ 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.

120  {
121  return (userVariables_.find(key) != userVariables_.end() ? userVariables_.find(key)->second : -9999.);
122  };

References crabWrapper::key, and userVariables_.

◆ 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.

136  {
137  return (decay == JetComb::kHad ? hadW_ : lepW_);
138  }

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

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

◆ wBosonVar()

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

W boson candidate variable.

Definition at line 43 of file TtSemiLepJetComb.cc.

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 }

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

Referenced by evaluateTtSemiLepJetComb().

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().

TtSemiLepEvtPartons::LightQBar
Definition: TtSemiLepEvtPartons.h:25
JetComb::kDeltaTheta
Definition: TtSemiLepJetComb.h:19
JetComb::kBProbability
Definition: TtSemiLepJetComb.h:28
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
TtSemiLepEvtPartons::LepB
Definition: TtSemiLepEvtPartons.h:25
JetComb::kAdd
Definition: TtSemiLepJetComb.h:35
JetComb::kSoftMuon
Definition: TtSemiLepJetComb.h:24
JetComb::kTheta
Definition: TtSemiLepJetComb.h:17
TtSemiLepJetComb::lepton_
math::XYZTLorentzVector lepton_
lepton 4-vector
Definition: TtSemiLepJetComb.h:156
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
JetComb::kCombSecondVtxMVA
Definition: TtSemiLepJetComb.h:32
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
JetComb::kHad
Definition: TtSemiLepJetComb.h:15
HLT_FULL_cff.DeltaPhi
DeltaPhi
Definition: HLT_FULL_cff.py:465
JetComb::kLep
Definition: TtSemiLepJetComb.h:15
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
JetComb::kTrackCountHighPur
Definition: TtSemiLepJetComb.h:23
cmsdt::algo
algo
Definition: constants.h:165
TtSemiLepJetComb::wBoson
const math::XYZTLorentzVector & wBoson(JetComb::DecayType decay) const
return leptonic or hadronic W candidate depending on argument
Definition: TtSemiLepJetComb.h:136
JetComb::kSoftMuonByPt
Definition: TtSemiLepJetComb.h:25
JetComb::kSimpleSecondVtx
Definition: TtSemiLepJetComb.h:30
JetComb::kTrackCountHighEff
Definition: TtSemiLepJetComb.h:22
TtSemiLepJetComb::lightQVar
double lightQVar(bool qbar, JetComb::VarType var) const
light quark candidate variable
Definition: TtSemiLepJetComb.cc:75
JetComb::kMass
Definition: TtSemiLepJetComb.h:17
TtSemiLepEvtPartons::HadB
Definition: TtSemiLepEvtPartons.h:25
JetComb::kPhi
Definition: TtSemiLepJetComb.h:17
TtSemiLepJetComb::bQuark
const pat::Jet & bQuark(JetComb::DecayType decay) const
return leptonic or hadronic b candidate depending on argument
Definition: TtSemiLepJetComb.h:134
TtSemiLepJetComb::lightQ
const pat::Jet & lightQ(bool qbar=false) const
return lightQ or lightQBar candidate depending on argument
Definition: TtSemiLepJetComb.h:132
JetComb::kSoftElec
Definition: TtSemiLepJetComb.h:27
TtSemiLepEvtPartons::LightQ
Definition: TtSemiLepEvtPartons.h:25
TtSemiLepJetComb::hadBJet_
pat::Jet hadBJet_
hadronic b jet
Definition: TtSemiLepJetComb.h:150
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
p4
double p4[4]
Definition: TauolaWrapper.h:92
JetComb::kDeltaM
Definition: TtSemiLepJetComb.h:19
electronAnalyzer_cfi.DeltaR
DeltaR
Definition: electronAnalyzer_cfi.py:33
TtSemiLepJetComb::hadTop_
math::XYZTLorentzVector hadTop_
hadronic top 4-vector
Definition: TtSemiLepJetComb.h:158
TtSemiLepJetComb::hadW_
math::XYZTLorentzVector hadW_
hadronic W 4-vector
Definition: TtSemiLepJetComb.h:160
JetComb::kDeltaPhi
Definition: TtSemiLepJetComb.h:19
JetComb::kMult
Definition: TtSemiLepJetComb.h:35
TtSemiLepJetComb::deduceMothers
void deduceMothers()
reconstruct mother candidates from final state candidates
Definition: TtSemiLepJetComb.cc:355
PA_ZEESkim_cff.decay
decay
Definition: PA_ZEESkim_cff.py:26
TtSemiLepJetComb::hadQBarJet_
pat::Jet hadQBarJet_
lightQBar jet
Definition: TtSemiLepJetComb.h:148
JetComb::kProbability
Definition: TtSemiLepJetComb.h:29
TtSemiLepJetComb::top
const math::XYZTLorentzVector & top(JetComb::DecayType decay) const
return leptonic or hadronic top candidate depending on argument
Definition: TtSemiLepJetComb.h:140
metsig::jet
Definition: SignAlgoResolutions.h:47
JetComb::kPt
Definition: TtSemiLepJetComb.h:17
relativeConstraints.value
value
Definition: relativeConstraints.py:53
TtSemiLepJetComb::hadQJet_
pat::Jet hadQJet_
lightQ jet
Definition: TtSemiLepJetComb.h:146
TtSemiLepJetComb::bTag
double bTag(JetComb::DecayType decay, JetComb::BTagAlgo algo) const
b-tag value of a b candidate
Definition: TtSemiLepJetComb.h:111
JetComb::kDeltaR
Definition: TtSemiLepJetComb.h:19
JetComb::kCombSecondVtx
Definition: TtSemiLepJetComb.h:31
TtSemiLepJetComb::lepTop_
math::XYZTLorentzVector lepTop_
leptonic top 4-vector
Definition: TtSemiLepJetComb.h:162
JetComb::kEta
Definition: TtSemiLepJetComb.h:17
TtSemiLepJetComb::neutrino_
pat::MET neutrino_
neutrino candidate
Definition: TtSemiLepJetComb.h:154
TtSemiLepJetComb::lepBJet_
pat::Jet lepBJet_
leptonic b jet
Definition: TtSemiLepJetComb.h:152
crabWrapper.key
key
Definition: crabWrapper.py:19
TtSemiLepJetComb::lepW_
math::XYZTLorentzVector lepW_
leptonic W 4-vector
Definition: TtSemiLepJetComb.h:164
TtSemiLepJetComb::userVariables_
std::map< std::string, double > userVariables_
map for user defined variables
Definition: TtSemiLepJetComb.h:166
JetComb::kSofMuonByIP3d
Definition: TtSemiLepJetComb.h:26