CMS 3D CMS Logo

TtSemiLepJetComb.h
Go to the documentation of this file.
1 #ifndef TtSemiLepJetComb_h
2 #define TtSemiLepJetComb_h
3 
4 #include <vector>
5 #include <string>
6 
7 #include "TMath.h"
8 
11 
12 namespace JetComb {
15  enum DecayType { kHad, kLep };
17  enum VarType { kMass, kPt, kEta, kPhi, kTheta };
21  enum BTagAlgo {
33  };
35  enum Operator { kAdd, kMult };
36 } // namespace JetComb
37 
49 public:
53  TtSemiLepJetComb(const std::vector<pat::Jet>&,
54  const std::vector<int>&,
56  const pat::MET&);
59 
67  double lightQVar(bool qbar, JetComb::VarType var) const;
69  double leptonVar(JetComb::VarType var) const;
71  double neutrinoVar(JetComb::VarType var) const;
72 
101 
105  double relativePtHadronicTop() const;
108  double bOverLightQPt() const;
109 
116 
118  double addUserVar(std::string key, double value) { return userVariables_[key] = value; };
120  double userVar(const std::string& key) const {
121  return (userVariables_.find(key) != userVariables_.end() ? userVariables_.find(key)->second : -9999.);
122  };
123 
124 private:
126  void deduceMothers();
128  double bTag(const pat::Jet& jet, JetComb::BTagAlgo algo) const;
130  double lightQVar(JetComb::VarType var) const { return lightQVar(false, var); };
132  const pat::Jet& lightQ(bool qbar = false) const { return (qbar ? hadQBarJet_ : hadQJet_); }
137  return (decay == JetComb::kHad ? hadW_ : lepW_);
138  }
141  return (decay == JetComb::kHad ? hadTop_ : lepTop_);
142  }
143 
144 private:
166  std::map<std::string, double> userVariables_;
167 };
168 
169 #endif
JetComb::kDeltaTheta
Definition: TtSemiLepJetComb.h:19
TtSemiLepJetComb::~TtSemiLepJetComb
~TtSemiLepJetComb()
default destructor
Definition: TtSemiLepJetComb.cc:25
JetComb::kBProbability
Definition: TtSemiLepJetComb.h:28
TtSemiLepJetComb::relativePtHadronicTop
double relativePtHadronicTop() const
Definition: TtSemiLepJetComb.cc:319
JetComb::kAdd
Definition: TtSemiLepJetComb.h:35
JetComb::kSoftMuon
Definition: TtSemiLepJetComb.h:24
TtSemiLepJetComb::combinedBTags
double combinedBTags(JetComb::BTagAlgo algo, JetComb::Operator op) const
combined b-tag values of the two b candidates
Definition: TtSemiLepJetComb.cc:331
TtSemiLepJetComb::compareTopLepton
double compareTopLepton(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the top and the lepton candidate
Definition: TtSemiLepJetComb.cc:235
JetComb::kTheta
Definition: TtSemiLepJetComb.h:17
TtSemiLepJetComb::lepton_
math::XYZTLorentzVector lepton_
lepton 4-vector
Definition: TtSemiLepJetComb.h:156
JetComb::CompType
CompType
supported comparison types
Definition: TtSemiLepJetComb.h:19
TtSemiLepJetComb::compareTopNeutrino
double compareTopNeutrino(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the top and the neutrino candidate
Definition: TtSemiLepJetComb.cc:249
TtSemiLepJetComb::compareWNeutrino
double compareWNeutrino(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the W and the neutrino candidate
Definition: TtSemiLepJetComb.cc:277
TtSemiLepJetComb::compareTopW
double compareTopW(JetComb::DecayType dec1, JetComb::DecayType dec2, JetComb::CompType comp) const
comparison between the top and the W candidate
Definition: TtSemiLepJetComb.cc:193
JetComb
Definition: TtSemiLepJetComb.h:12
JetComb::kCombSecondVtxMVA
Definition: TtSemiLepJetComb.h:32
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
JetComb::kHad
Definition: TtSemiLepJetComb.h:15
TtSemiLepJetComb::wBosonVar
double wBosonVar(JetComb::DecayType decay, JetComb::VarType var) const
W boson candidate variable.
Definition: TtSemiLepJetComb.cc:43
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:164
pat::Jet
Analysis-level calorimeter jet class.
Definition: Jet.h:77
TtSemiLepJetComb
Common calculator class to keep multivariate analysis variables for jet combinations in semi-leptonic...
Definition: TtSemiLepJetComb.h:48
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::Operator
Operator
operators for combining variables
Definition: TtSemiLepJetComb.h:35
TtSemiLepJetComb::compareBLepton
double compareBLepton(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the b and the lepton candidate
Definition: TtSemiLepJetComb.cc:291
TtSemiLepJetComb::combinedBTagsForLightQuarks
double combinedBTagsForLightQuarks(JetComb::BTagAlgo algo, JetComb::Operator op) const
combined b-tag values of the two light quark candidates
Definition: TtSemiLepJetComb.cc:341
TtSemiLepJetComb::topVar
double topVar(JetComb::DecayType decay, JetComb::VarType var) const
top quark candidate variable
Definition: TtSemiLepJetComb.cc:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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
JetComb::kPhi
Definition: TtSemiLepJetComb.h:17
JetComb::DecayType
DecayType
Definition: TtSemiLepJetComb.h:15
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
TtSemiLepJetComb::compareLightQuarks
double compareLightQuarks(JetComb::CompType comp) const
comparison between the lightQ and the lightQBar candidate
Definition: TtSemiLepJetComb.cc:165
TtSemiLepJetComb::hadBJet_
pat::Jet hadBJet_
hadronic b jet
Definition: TtSemiLepJetComb.h:150
TtSemiLepJetComb::compareTopB
double compareTopB(JetComb::DecayType dec1, JetComb::DecayType dec2, JetComb::CompType comp) const
comparison between the top and the b candidate
Definition: TtSemiLepJetComb.cc:207
value
Definition: value.py:1
pat::MET
Analysis-level MET class.
Definition: MET.h:40
JetComb::kDeltaM
Definition: TtSemiLepJetComb.h:19
TtSemiLepJetComb::neutrinoVar
double neutrinoVar(JetComb::VarType var) const
neutrino candidate variable
Definition: TtSemiLepJetComb.cc:107
MET.h
Jet.h
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::compareWLepton
double compareWLepton(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the W and the lepton candidate
Definition: TtSemiLepJetComb.cc:263
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::compareWB
double compareWB(JetComb::DecayType dec1, JetComb::DecayType dec2, JetComb::CompType comp) const
comparison between the W and the b candidate
Definition: TtSemiLepJetComb.cc:221
TtSemiLepJetComb::addUserVar
double addUserVar(std::string key, double value)
add an arbitary user defined variable with given key and value
Definition: TtSemiLepJetComb.h:118
TtSemiLepJetComb::hadQBarJet_
pat::Jet hadQBarJet_
lightQBar jet
Definition: TtSemiLepJetComb.h:148
TtSemiLepJetComb::bOverLightQPt
double bOverLightQPt() const
Definition: TtSemiLepJetComb.cc:326
JetComb::kProbability
Definition: TtSemiLepJetComb.h:29
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.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
TtSemiLepJetComb::userVar
double userVar(const std::string &key) const
receive user defined variable value with given key
Definition: TtSemiLepJetComb.h:120
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
TtSemiLepJetComb::bQuarkVar
double bQuarkVar(JetComb::DecayType decay, JetComb::VarType var) const
b quark candidate variable
Definition: TtSemiLepJetComb.cc:59
JetComb::VarType
VarType
supported std single variable types
Definition: TtSemiLepJetComb.h:17
JetComb::kCombSecondVtx
Definition: TtSemiLepJetComb.h:31
JetComb::BTagAlgo
BTagAlgo
b-tagging algorithms
Definition: TtSemiLepJetComb.h:21
TtSemiLepJetComb::compareHadTopLepTop
double compareHadTopLepTop(JetComb::CompType comp) const
comparison between the two top candidates
Definition: TtSemiLepJetComb.cc:123
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
TtSemiLepJetComb::compareHadWLepW
double compareHadWLepW(JetComb::CompType comp) const
comparison between the two W candidates
Definition: TtSemiLepJetComb.cc:137
crabWrapper.key
key
Definition: crabWrapper.py:19
TtSemiLepJetComb::TtSemiLepJetComb
TtSemiLepJetComb()
emtpy constructor
Definition: TtSemiLepJetComb.cc:6
TtSemiLepJetComb::leptonVar
double leptonVar(JetComb::VarType var) const
lepton candidate variable
Definition: TtSemiLepJetComb.cc:91
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
TtSemiLepJetComb::compareBNeutrino
double compareBNeutrino(JetComb::DecayType decay, JetComb::CompType comp) const
comparison between the b and the neutrino candidate
Definition: TtSemiLepJetComb.cc:305
JetComb::kSofMuonByIP3d
Definition: TtSemiLepJetComb.h:26
TtSemiLepJetComb::lightQVar
double lightQVar(JetComb::VarType var) const
light quark candidate variable with default on q and not qbar
Definition: TtSemiLepJetComb.h:130
TtSemiLepJetComb::compareLeptonNeutrino
double compareLeptonNeutrino(JetComb::CompType comp) const
comparison between the lepton and the neutrino candidate
Definition: TtSemiLepJetComb.cc:179
TtSemiLepJetComb::compareHadBLepB
double compareHadBLepB(JetComb::CompType comp) const
comparison between the two b candidates
Definition: TtSemiLepJetComb.cc:151