CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TtSemiLeptonicEvent.h
Go to the documentation of this file.
1 #ifndef TopObjects_TtSemiLeptonicEvent_h
2 #define TopObjects_TtSemiLeptonicEvent_h
3 
5 
6 namespace TtSemiLepDaughter{
9  static const std::string Nu ="Nu" , Lep ="Lep" , LepW="LepW", LepB="LepB", LepTop="LepTop";
10  static const std::string HadQ="HadQ", HadP="HadP", HadW="HadW", HadB="HadB", HadTop="HadTop";
11 }
12 
25 
26  public:
27 
31  virtual ~TtSemiLeptonicEvent(){};
32 
34  const reco::Candidate* hadronicDecayTop(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayTop(hypoClassKeyFromString(key), cmb); };
36  const reco::Candidate* hadronicDecayTop(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : eventHypo(key,cmb). daughter(TtSemiLepDaughter::HadTop); };
38  const reco::Candidate* hadronicDecayB(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayB(hypoClassKeyFromString(key), cmb); };
40  const reco::Candidate* hadronicDecayB(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : hadronicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::HadB); };
42  const reco::Candidate* hadronicDecayW(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayW(hypoClassKeyFromString(key), cmb); };
44  const reco::Candidate* hadronicDecayW(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : hadronicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::HadW); };
46  const reco::Candidate* hadronicDecayQuark(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayQuark(hypoClassKeyFromString(key), cmb); };
48  const reco::Candidate* hadronicDecayQuark(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : hadronicDecayW(key,cmb)->daughter(TtSemiLepDaughter::HadP); };
50  const reco::Candidate* hadronicDecayQuarkBar(const std::string& key, const unsigned& cmb=0) const { return hadronicDecayQuarkBar(hypoClassKeyFromString(key), cmb); };
52  const reco::Candidate* hadronicDecayQuarkBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : hadronicDecayW(key,cmb)->daughter(TtSemiLepDaughter::HadQ); };
54  const reco::Candidate* leptonicDecayTop(const std::string& key, const unsigned& cmb=0) const { return leptonicDecayTop(hypoClassKeyFromString(key), cmb); };
56  const reco::Candidate* leptonicDecayTop(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : eventHypo(key,cmb). daughter(TtSemiLepDaughter::LepTop); };
58  const reco::Candidate* leptonicDecayB(const std::string& key, const unsigned& cmb=0) const { return leptonicDecayB(hypoClassKeyFromString(key), cmb); };
60  const reco::Candidate* leptonicDecayB(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : leptonicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::LepB); };
62  const reco::Candidate* leptonicDecayW(const std::string& key, const unsigned& cmb=0) const { return leptonicDecayW(hypoClassKeyFromString(key), cmb); };
64  const reco::Candidate* leptonicDecayW(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : leptonicDecayTop(key,cmb)->daughter(TtSemiLepDaughter::LepW); };
66  const reco::Candidate* singleNeutrino(const std::string& key, const unsigned& cmb=0) const { return singleNeutrino(hypoClassKeyFromString(key), cmb); };
68  const reco::Candidate* singleNeutrino(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : leptonicDecayW(key,cmb)->daughter(TtSemiLepDaughter::Nu); };
70  const reco::Candidate* singleLepton(const std::string& key, const unsigned& cmb=0) const { return singleLepton(hypoClassKeyFromString(key), cmb); };
72  const reco::Candidate* singleLepton(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : leptonicDecayW(key,cmb)->daughter(TtSemiLepDaughter::Lep); };
73 
75  const reco::GenParticle* hadronicDecayTop() const { return (!genEvt_ ? 0 : this->genEvent()->hadronicDecayTop()); };
77  const reco::GenParticle* hadronicDecayB() const { return (!genEvt_ ? 0 : this->genEvent()->hadronicDecayB()); };
79  const reco::GenParticle* hadronicDecayW() const { return (!genEvt_ ? 0 : this->genEvent()->hadronicDecayW()); };
81  const reco::GenParticle* hadronicDecayQuark() const { return (!genEvt_ ? 0 : this->genEvent()->hadronicDecayQuark()); };
83  const reco::GenParticle* hadronicDecayQuarkBar() const { return (!genEvt_ ? 0 : this->genEvent()->hadronicDecayQuarkBar()); };
85  const reco::GenParticle* leptonicDecayTop() const { return (!genEvt_ ? 0 : this->genEvent()->leptonicDecayTop()); };
87  const reco::GenParticle* leptonicDecayB() const { return (!genEvt_ ? 0 : this->genEvent()->leptonicDecayB()); };
89  const reco::GenParticle* leptonicDecayW() const { return (!genEvt_ ? 0 : this->genEvent()->leptonicDecayW()); };
91  const reco::GenParticle* singleLepton() const { return (!genEvt_ ? 0 : this->genEvent()->singleLepton()); };
93  const reco::GenParticle* singleNeutrino() const { return (!genEvt_ ? 0 : this->genEvent()->singleNeutrino()); };
94 
97  void print(const int verbosity=1) const;
98 
103 
106 
107  protected:
108 
110  std::map<HypoClassKey, int> numberOfRealNeutrinoSolutions_;
111 
112 };
113 
114 #endif
const reco::Candidate * leptonicDecayTop(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic top of the given hypothesis
static const std::string HadB
const reco::Candidate * leptonicDecayW(const std::string &key, const unsigned &cmb=0) const
get leptonic W of the given hypothesis
const reco::GenParticle * leptonicDecayTop() const
get leptonic top of the TtGenEvent
HypoClassKey
supported classes of event hypotheses
Definition: TtEvent.h:31
static const std::string LepTop
const reco::Candidate * hadronicDecayTop(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic top of the given hypothesis
const reco::Candidate * singleLepton(const std::string &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
static const std::string Lep
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:53
static const std::string LepW
const reco::Candidate * hadronicDecayW(const std::string &key, const unsigned &cmb=0) const
get hadronic W of the given hypothesis
const reco::Candidate * hadronicDecayQuarkBar(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
const reco::Candidate * hadronicDecayW(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic W of the given hypothesis
const reco::GenParticle * leptonicDecayB() const
get leptonic b of the TtGenEvent
const reco::Candidate * hadronicDecayTop(const std::string &key, const unsigned &cmb=0) const
get hadronic top of the given hypothesis
void setNumberOfRealNeutrinoSolutions(const HypoClassKey &key, const int &nr)
set number of real neutrino solutions for a given hypo class
Class derived from the TtEvent for the semileptonic decay channel.
static const std::string HadP
const reco::Candidate * leptonicDecayW(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic W of the given hypothesis
const reco::Candidate * hadronicDecayB(const std::string &key, const unsigned &cmb=0) const
get hadronic b of the given hypothesis
const reco::GenParticle * hadronicDecayB() const
get hadronic b of the TtGenEvent
const reco::GenParticle * singleLepton() const
get lepton top of the TtGenEvent
const reco::Candidate * leptonicDecayB(const std::string &key, const unsigned &cmb=0) const
get leptonic b of the given hypothesis
virtual const Candidate * daughter(size_type) const
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
const int numberOfRealNeutrinoSolutions(const std::string &key) const
get number of real neutrino solutions for a given hypo class
const reco::GenParticle * leptonicDecayW() const
get leptonic W of the TtGenEvent
const reco::GenParticle * hadronicDecayW() const
get hadronic W of the TtGenEvent
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:19
const reco::Candidate * hadronicDecayB(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic b of the given hypothesis
static const std::string HadTop
const reco::Candidate * hadronicDecayQuarkBar(const std::string &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
TtSemiLeptonicEvent()
empty constructor
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
const reco::Candidate * leptonicDecayTop(const std::string &key, const unsigned &cmb=0) const
get leptonic top of the given hypothesis
void print(const int verbosity=1) const
const reco::GenParticle * hadronicDecayQuarkBar() const
get hadronic light quark of the TtGenEvent
const reco::Candidate * hadronicDecayQuark(const HypoClassKey &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
const reco::CompositeCandidate & eventHypo(const HypoClassKey &key, const unsigned &cmb=0) const
Definition: TtEvent.h:51
const reco::Candidate * singleLepton(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
Base class to hold information for ttbar event interpretation.
Definition: TtEvent.h:27
static const std::string HadQ
virtual ~TtSemiLeptonicEvent()
default destructor
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:150
static const std::string HadW
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:64
const reco::GenParticle * hadronicDecayTop() const
get hadronic top of the TtGenEvent
static const std::string Nu
const reco::Candidate * hadronicDecayQuark(const std::string &key, const unsigned &cmb=0) const
get hadronic light quark of the given hypothesis
static const std::string LepB
const reco::GenParticle * hadronicDecayQuark() const
get hadronic light quark of the TtGenEvent
const int numberOfRealNeutrinoSolutions(const HypoClassKey &key) const
get number of real neutrino solutions for a given hypo class
const reco::Candidate * leptonicDecayB(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic b of the given hypothesis
const reco::GenParticle * singleNeutrino() const
get neutrino of the TtGenEvent
std::map< HypoClassKey, int > numberOfRealNeutrinoSolutions_
number of real neutrino solutions for all hypo classes
const reco::Candidate * singleNeutrino(const std::string &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis
const reco::Candidate * singleNeutrino(const HypoClassKey &key, const unsigned &cmb=0) const
get leptonic light quark of the given hypothesis