test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TtFullLeptonicEvent.h
Go to the documentation of this file.
1 #ifndef TopObjects_TtFullLeptonicEvent_h
2 #define TopObjects_TtFullLeptonicEvent_h
3 
5 
6 namespace TtFullLepDaughter{
9  static const std::string Nu ="Nu" , LepBar="LepBar", WPlus ="WPlus" , B ="B" , Top ="Top";
10  static const std::string NuBar="NuBar", Lep ="Lep" , WMinus="WMinus", BBar="BBar", TopBar="TopBar";
11 }
12 
25 
26  public:
30  virtual ~TtFullLeptonicEvent(){};
31 
33  const reco::Candidate* top(const std::string& key, const unsigned& cmb=0) const { return top(hypoClassKeyFromString(key), cmb); };
35  const reco::Candidate* top(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : eventHypo(key,cmb). daughter(TtFullLepDaughter::Top); };
37  const reco::Candidate* b(const std::string& key, const unsigned& cmb=0) const { return b(hypoClassKeyFromString(key), cmb); };
39  const reco::Candidate* b(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : top(key,cmb)->daughter(TtFullLepDaughter::B); };
41  const reco::Candidate* wPlus(const std::string& key, const unsigned& cmb=0) const { return wPlus(hypoClassKeyFromString(key), cmb); };
43  const reco::Candidate* wPlus(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : top(key,cmb)->daughter(TtFullLepDaughter::WPlus); };
45  const reco::Candidate* leptonBar(const std::string& key, const unsigned& cmb=0) const { return leptonBar(hypoClassKeyFromString(key), cmb); };
47  const reco::Candidate* leptonBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wPlus(key,cmb)->daughter(TtFullLepDaughter::LepBar); };
49  const reco::Candidate* neutrino(const std::string& key, const unsigned& cmb=0) const { return neutrino(hypoClassKeyFromString(key), cmb); };
51  const reco::Candidate* neutrino(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wPlus(key,cmb)->daughter(TtFullLepDaughter::Nu ); };
53  const reco::Candidate* topBar(const std::string& key, const unsigned& cmb=0) const { return topBar(hypoClassKeyFromString(key), cmb); };
55  const reco::Candidate* topBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : eventHypo(key,cmb). daughter(TtFullLepDaughter::TopBar); };
57  const reco::Candidate* bBar(const std::string& key, const unsigned& cmb=0) const { return bBar(hypoClassKeyFromString(key), cmb); };
59  const reco::Candidate* bBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : topBar(key,cmb)->daughter(TtFullLepDaughter::BBar ); };
61  const reco::Candidate* wMinus(const std::string& key, const unsigned& cmb=0) const { return wMinus(hypoClassKeyFromString(key), cmb); };
63  const reco::Candidate* wMinus(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : topBar(key,cmb)->daughter(TtFullLepDaughter::WMinus); };
65  const reco::Candidate* lepton(const std::string& key, const unsigned& cmb=0) const { return lepton(hypoClassKeyFromString(key), cmb); };
67  const reco::Candidate* lepton(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wMinus(key,cmb)->daughter(TtFullLepDaughter::Lep ); };
69  const reco::Candidate* neutrinoBar(const std::string& key, const unsigned& cmb=0) const { return neutrinoBar(hypoClassKeyFromString(key), cmb); };
71  const reco::Candidate* neutrinoBar(const HypoClassKey& key, const unsigned& cmb=0) const { return !isHypoValid(key,cmb) ? 0 : wMinus (key,cmb)->daughter(TtFullLepDaughter::NuBar ); };
72 
74  const reco::GenParticle* genTop () const { return (!genEvt_ ? 0 : this->genEvent()->top() ); };
76  const reco::GenParticle* genB () const { return (!genEvt_ ? 0 : this->genEvent()->b() ); };
78  const reco::GenParticle* genWPlus () const { return (!genEvt_ ? 0 : this->genEvent()->wPlus() ); };
80  const reco::GenParticle* genLeptonBar () const { return (!genEvt_ ? 0 : this->genEvent()->leptonBar() ); };
82  const reco::GenParticle* genNeutrino () const { return (!genEvt_ ? 0 : this->genEvent()->neutrino() ); };
84  const reco::GenParticle* genTopBar () const { return (!genEvt_ ? 0 : this->genEvent()->topBar() ); };
86  const reco::GenParticle* genBBar () const { return (!genEvt_ ? 0 : this->genEvent()->bBar() ); };
88  const reco::GenParticle* genWMinus () const { return (!genEvt_ ? 0 : this->genEvent()->wMinus() ); };
90  const reco::GenParticle* genLepton () const { return (!genEvt_ ? 0 : this->genEvent()->lepton() ); };
92  const reco::GenParticle* genNeutrinoBar() const { return (!genEvt_ ? 0 : this->genEvent()->neutrinoBar()); };
93 
95  double solWeight(const unsigned& cmb=0) const { return (cmb<solWeight_.size() ? solWeight_[cmb] : -1.); }
97  bool isWrongCharge() const { return wrongCharge_; }
98 
100  void setSolWeight(const std::vector<double>& val) { solWeight_=val; };
102  void setWrongCharge(const bool& val) { wrongCharge_=val; };
103 
106  void print(const int verbosity=1) const;
107 
108  protected:
109 
111  std::vector<double> solWeight_;
114 
115 };
116 
117 #endif
void setWrongCharge(const bool &val)
set right or wrong charge combination of kKinSolution hypothesis
HypoClassKey
supported classes of event hypotheses
Definition: TtEvent.h:31
const reco::Candidate * wPlus(const HypoClassKey &key, const unsigned &cmb=0) const
get Wplus of the given hypothesis
const reco::Candidate * bBar(const std::string &key, const unsigned &cmb=0) const
get anti-b of the given hypothesis
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
static const std::string WMinus
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:53
virtual ~TtFullLeptonicEvent()
default destructor
static const std::string Nu
const reco::GenParticle * genTopBar() const
get anti-top of the TtGenEvent
std::vector< double > solWeight_
result of kinematic solution
static const std::string WPlus
const reco::Candidate * bBar(const HypoClassKey &key, const unsigned &cmb=0) const
get anti-b of the given hypothesis
const reco::Candidate * b(const HypoClassKey &key, const unsigned &cmb=0) const
get b of the given hypothesis
const reco::Candidate * top(const std::string &key, const unsigned &cmb=0) const
get top of the given hypothesis
static const std::string B
const reco::GenParticle * genNeutrinoBar() const
get anti-neutrino of the TtGenEvent
static const std::string Top
const reco::Candidate * lepton(const std::string &key, const unsigned &cmb=0) const
get lepton of the given hypothesis
const reco::GenParticle * genBBar() const
get anti-b of the TtGenEvent
void print(const int verbosity=1) const
static const std::string TopBar
const reco::Candidate * neutrino(const std::string &key, const unsigned &cmb=0) const
get neutrino of the given hypothesis
const reco::Candidate * lepton(const HypoClassKey &key, const unsigned &cmb=0) const
get lepton of the given hypothesis
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:19
static const std::string LepBar
bool isWrongCharge() const
return if the kinematic solution of hypothesis &#39;cmb&#39; is right or wrong charge if available; -1 else ...
const reco::GenParticle * genLepton() const
get lepton of the TtGenEvent
Class derived from the TtEvent for the full leptonic decay channel.
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
const reco::Candidate * neutrinoBar(const std::string &key, const unsigned &cmb=0) const
get anti-neutrino of the given hypothesis
void setSolWeight(const std::vector< double > &val)
set weight of kKinSolution hypothesis
const reco::Candidate * wMinus(const HypoClassKey &key, const unsigned &cmb=0) const
get Wminus of the given hypothesis
const reco::GenParticle * genTop() const
get top of the TtGenEvent
const reco::CompositeCandidate & eventHypo(const HypoClassKey &key, const unsigned &cmb=0) const
Definition: TtEvent.h:51
const reco::Candidate * b(const std::string &key, const unsigned &cmb=0) const
get b of the given hypothesis
bool wrongCharge_
right/wrong charge booleans
Base class to hold information for ttbar event interpretation.
Definition: TtEvent.h:27
const reco::Candidate * topBar(const std::string &key, const unsigned &cmb=0) const
get anti-top of the given hypothesis
const reco::Candidate * neutrinoBar(const HypoClassKey &key, const unsigned &cmb=0) const
get anti-neutrino of the given hypothesis
double solWeight(const unsigned &cmb=0) const
return the weight of the kinematic solution of hypothesis &#39;cmb&#39; if available; -1 else ...
const reco::Candidate * wPlus(const std::string &key, const unsigned &cmb=0) const
get Wplus of the given hypothesis
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:150
const reco::GenParticle * genNeutrino() const
get neutrino of the TtGenEvent
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
static const std::string BBar
TtFullLeptonicEvent()
empty constructor
const reco::GenParticle * genB() const
get b of the TtGenEvent
const reco::Candidate * neutrino(const HypoClassKey &key, const unsigned &cmb=0) const
get neutrino of the given hypothesis
const reco::Candidate * wMinus(const std::string &key, const unsigned &cmb=0) const
get Wminus of the given hypothesis
const reco::GenParticle * genLeptonBar() const
get anti-lepton of the TtGenEvent
const reco::Candidate * top(const HypoClassKey &key, const unsigned &cmb=0) const
get top of the given hypothesis
static const std::string NuBar
const reco::GenParticle * genWMinus() const
get Wminus of the TtGenEvent
static const std::string Lep
const reco::GenParticle * genWPlus() const
get Wplus of the TtGenEvent
const reco::Candidate * topBar(const HypoClassKey &key, const unsigned &cmb=0) const
get anti-top of the given hypothesis
const reco::Candidate * leptonBar(const HypoClassKey &key, const unsigned &cmb=0) const
get anti-lepton of the given hypothesis
const reco::Candidate * leptonBar(const std::string &key, const unsigned &cmb=0) const
get anti-lepton of the given hypothesis