CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
TtEvent Class Reference

Base class to hold information for ttbar event interpretation. More...

#include "AnalysisDataFormats/TopObjects/interface/TtEvent.h"

Inheritance diagram for TtEvent:
TtFullHadronicEvent TtFullLeptonicEvent TtSemiLeptonicEvent

Classes

struct  HypoClassKeyStringToEnum
 a lightweight map for selection type string label and enum value More...
 

Public Types

enum  HypoClassKey {
  kGeom, kWMassMaxSumPt, kMaxSumPtWMass, kGenMatch,
  kMVADisc, kKinFit, kKinSolution, kWMassDeltaTopMass,
  kHitFit
}
 supported classes of event hypotheses More...
 
typedef std::pair
< reco::CompositeCandidate,
std::vector< int > > 
HypoCombPair
 pair of hypothesis and lepton jet combinatorics for a given hypothesis More...
 

Public Member Functions

void addEventHypo (const HypoClassKey &key, const HypoCombPair &hyp)
 add new hypotheses More...
 
int correspondingHypo (const std::string &key1, const unsigned &hyp1, const std::string &key2) const
 return the hypothesis in hypothesis class 'key2', which corresponds to hypothesis 'hyp1' in hypothesis class 'key1' More...
 
int correspondingHypo (const HypoClassKey &key1, const unsigned &hyp1, const HypoClassKey &key2) const
 return the hypothesis in hypothesis class 'key2', which corresponds to hypothesis 'hyp1' in hypothesis class 'key1' More...
 
const reco::CompositeCandidateeventHypo (const HypoClassKey &key, const unsigned &cmb=0) const
 
double fitChi2 (const unsigned &cmb=0) const
 return the chi2 of the kinematic fit of hypothesis 'cmb' if available; -1 else More...
 
double fitProb (const unsigned &cmb=0) const
 return the fit probability of hypothesis 'cmb' if available; -1 else More...
 
const edm::RefProd< TtGenEvent > & genEvent () const
 get TtGenEvent More...
 
double genMatchSumDR (const unsigned &cmb=0) const
 return the sum dr of the generator match if available; -1 else More...
 
double genMatchSumPt (const unsigned &cmb=0) const
 return the sum pt of the generator match if available; -1 else More...
 
double hitFitChi2 (const unsigned &cmb=0) const
 return the hitfit chi2 of hypothesis 'cmb' if available; -1 else More...
 
double hitFitMT (const unsigned &cmb=0) const
 return the hitfit top mass of hypothesis 'cmb' if available; -1 else More...
 
double hitFitProb (const unsigned &cmb=0) const
 return the hitfit probability of hypothesis 'cmb' if available; -1 else More...
 
double hitFitSigMT (const unsigned &cmb=0) const
 return the hitfit top mass uncertainty of hypothesis 'cmb' if available; -1 else More...
 
bool isHypoAvailable (const std::string &key, const unsigned &cmb=0) const
 
bool isHypoAvailable (const HypoClassKey &key, const unsigned &cmb=0) const
 check if hypothesis 'cmb' is available within the hypothesis class More...
 
bool isHypoClassAvailable (const std::string &key) const
 check if hypothesis class 'key' was added to the event structure More...
 
bool isHypoClassAvailable (const HypoClassKey &key) const
 check if hypothesis class 'key' was added to the event structure More...
 
bool isHypoValid (const std::string &key, const unsigned &cmb=0) const
 check if hypothesis 'cmb' within the hypothesis class was valid; if not it lead to an empty CompositeCandidate More...
 
bool isHypoValid (const HypoClassKey &key, const unsigned &cmb=0) const
 check if hypothesis 'cmb' within the hypothesis class was valid; if not it lead to an empty CompositeCandidate More...
 
std::vector< int > jetLeptonCombination (const std::string &key, const unsigned &cmb=0) const
 return the vector of jet lepton combinatorics for a given hypothesis and class More...
 
std::vector< int > jetLeptonCombination (const HypoClassKey &key, const unsigned &cmb=0) const
 return the vector of jet lepton combinatorics for a given hypothesis and class More...
 
std::pair< WDecay::LeptonType,
WDecay::LeptonType
lepDecays () const
 get leptonic decay channels More...
 
double mvaDisc (const unsigned &cmb=0) const
 return the mva discriminant value of hypothesis 'cmb' if available; -1 else More...
 
std::string mvaMethod () const
 return the label of the mva method in use for the jet parton association (if kMVADisc is not available the string is empty) More...
 
unsigned int numberOfAvailableHypoClasses () const
 return number of available hypothesis classes More...
 
unsigned int numberOfAvailableHypos (const std::string &key) const
 return number of available hypotheses within a given hypothesis class More...
 
unsigned int numberOfAvailableHypos (const HypoClassKey &key) const
 return number of available hypotheses within a given hypothesis class More...
 
int numberOfConsideredJets (const std::string &key) const
 return number of jets that were considered when building a given hypothesis More...
 
int numberOfConsideredJets (const HypoClassKey &key) const
 return number of jets that were considered when building a given hypothesis More...
 
void printParticle (edm::LogInfo &log, const char *name, const reco::Candidate *cand) const
 print pt, eta, phi, mass of a given candidate into an existing LogInfo More...
 
void setFitChi2 (const std::vector< double > &val)
 set chi2 of kKinFit hypothesis More...
 
void setFitProb (const std::vector< double > &val)
 set fit probability of kKinFit hypothesis More...
 
void setGenEvent (const edm::Handle< TtGenEvent > &evt)
 set TtGenEvent More...
 
void setGenMatchSumDR (const std::vector< double > &val)
 set sum dr of kGenMatch hypothesis More...
 
void setGenMatchSumPt (const std::vector< double > &val)
 set sum pt of kGenMatch hypothesis More...
 
void setHitFitChi2 (const std::vector< double > &val)
 set chi2 of kHitFit hypothesis More...
 
void setHitFitMT (const std::vector< double > &val)
 set fitted top mass of kHitFit hypothesis More...
 
void setHitFitProb (const std::vector< double > &val)
 set fit probability of kHitFit hypothesis More...
 
void setHitFitSigMT (const std::vector< double > &val)
 set fitted top mass uncertainty of kHitFit hypothesis More...
 
void setLepDecays (const WDecay::LeptonType &lepDecTop1, const WDecay::LeptonType &lepDecTop2)
 set leptonic decay channels More...
 
void setMvaDiscriminators (const std::vector< double > &val)
 set mva discriminant values of kMVADisc hypothesis More...
 
void setMvaMethod (const std::string &name)
 set label of mva method for kMVADisc hypothesis More...
 
void setNumberOfConsideredJets (const HypoClassKey &key, const unsigned int nJets)
 set number of jets considered when building a given hypothesis More...
 
const reco::CandidatetopPair (const std::string &key, const unsigned &cmb=0) const
 get combined 4-vector of top and topBar of the given hypothesis More...
 
const reco::CandidatetopPair (const HypoClassKey &key, const unsigned &cmb=0) const
 get combined 4-vector of top and topBar of the given hypothesis More...
 
const math::XYZTLorentzVectortopPair () const
 get combined 4-vector of top and topBar from the TtGenEvent More...
 
 TtEvent ()
 empty constructor More...
 
virtual ~TtEvent ()
 default destructor More...
 

Protected Member Functions

HypoClassKey hypoClassKeyFromString (const std::string &label) const
 return the corresponding enum value from a string More...
 

Protected Attributes

std::map< HypoClassKey,
std::vector< HypoCombPair > > 
evtHyp_
 
std::vector< double > fitChi2_
 result of kinematic fit More...
 
std::vector< double > fitProb_
 result of kinematic fit More...
 
edm::RefProd< TtGenEventgenEvt_
 reference to TtGenEvent (has to be kept in the event!) More...
 
std::vector< double > genMatchSumDR_
 result of gen match More...
 
std::vector< double > genMatchSumPt_
 result of gen match More...
 
std::vector< double > hitFitChi2_
 
std::vector< double > hitFitMT_
 result of hitfit More...
 
std::vector< double > hitFitProb_
 
std::vector< double > hitFitSigMT_
 
std::pair< WDecay::LeptonType,
WDecay::LeptonType
lepDecays_
 leptonic decay channels More...
 
std::vector< double > mvaDisc_
 MVA discriminants. More...
 
std::string mvaMethod_
 label of the MVA method More...
 
std::map< HypoClassKey, int > nJetsConsidered_
 number of jets considered when building the hypotheses More...
 

Detailed Description

Base class to hold information for ttbar event interpretation.

The structure holds information for ttbar event interpretation. All event hypotheses of different classes (user defined during production) and a reference to the TtGenEvent (if available). It provides access and administration.

Definition at line 27 of file TtEvent.h.

Member Typedef Documentation

typedef std::pair<reco::CompositeCandidate, std::vector<int> > TtEvent::HypoCombPair

pair of hypothesis and lepton jet combinatorics for a given hypothesis

Definition at line 33 of file TtEvent.h.

Member Enumeration Documentation

supported classes of event hypotheses

Enumerator
kGeom 
kWMassMaxSumPt 
kMaxSumPtWMass 
kGenMatch 
kMVADisc 
kKinFit 
kKinSolution 
kWMassDeltaTopMass 
kHitFit 

Definition at line 31 of file TtEvent.h.

Constructor & Destructor Documentation

TtEvent::TtEvent ( )
inline

empty constructor

Definition at line 43 of file TtEvent.h.

43 {};
virtual TtEvent::~TtEvent ( )
inlinevirtual

default destructor

Definition at line 45 of file TtEvent.h.

45 {};

Member Function Documentation

void TtEvent::addEventHypo ( const HypoClassKey key,
const HypoCombPair hyp 
)
inline

add new hypotheses

Definition at line 121 of file TtEvent.h.

References evtHyp_, and combine::key.

121 { evtHyp_[key].push_back(hyp); };
list key
Definition: combine.py:13
std::map< HypoClassKey, std::vector< HypoCombPair > > evtHyp_
Definition: TtEvent.h:153
int TtEvent::correspondingHypo ( const std::string &  key1,
const unsigned &  hyp1,
const std::string &  key2 
) const
inline

return the hypothesis in hypothesis class 'key2', which corresponds to hypothesis 'hyp1' in hypothesis class 'key1'

Definition at line 102 of file TtEvent.h.

References correspondingHypo(), and hypoClassKeyFromString().

Referenced by correspondingHypo().

102 { return correspondingHypo(hypoClassKeyFromString(key1), hyp1, hypoClassKeyFromString(key2) ); };
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:19
int correspondingHypo(const std::string &key1, const unsigned &hyp1, const std::string &key2) const
return the hypothesis in hypothesis class &#39;key2&#39;, which corresponds to hypothesis &#39;hyp1&#39; in hypothesi...
Definition: TtEvent.h:102
int TtEvent::correspondingHypo ( const HypoClassKey key1,
const unsigned &  hyp1,
const HypoClassKey key2 
) const

return the hypothesis in hypothesis class 'key2', which corresponds to hypothesis 'hyp1' in hypothesis class 'key1'

Definition at line 8 of file TtEvent.cc.

References jetLeptonCombination(), and numberOfAvailableHypos().

9 {
10  for(unsigned hyp2 = 0; hyp2 < this->numberOfAvailableHypos(key2); ++hyp2) {
11  if( this->jetLeptonCombination(key1, hyp1) == this->jetLeptonCombination(key2, hyp2) )
12  return hyp2;
13  }
14  return -1; // if no corresponding hypothesis was found
15 }
unsigned int numberOfAvailableHypos(const std::string &key) const
return number of available hypotheses within a given hypothesis class
Definition: TtEvent.h:70
std::vector< int > jetLeptonCombination(const std::string &key, const unsigned &cmb=0) const
return the vector of jet lepton combinatorics for a given hypothesis and class
Definition: TtEvent.h:78
const reco::CompositeCandidate& TtEvent::eventHypo ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get event hypothesis; there can be more hypotheses of a certain class (sorted by quality); per default the best hypothesis is returned

Definition at line 51 of file TtEvent.h.

References evtHyp_, and first.

Referenced by TtSemiLeptonicEvent::hadronicDecayTop(), isHypoValid(), TtSemiLeptonicEvent::leptonicDecayTop(), TtFullLeptonicEvent::top(), TtFullHadronicEvent::top(), TtFullLeptonicEvent::topBar(), TtFullHadronicEvent::topBar(), and topPair().

51 { return (evtHyp_.find(key)->second)[cmb].first; };
bool first
Definition: L1TdeRCT.cc:79
list key
Definition: combine.py:13
std::map< HypoClassKey, std::vector< HypoCombPair > > evtHyp_
Definition: TtEvent.h:153
double TtEvent::fitChi2 ( const unsigned &  cmb = 0) const
inline

return the chi2 of the kinematic fit of hypothesis 'cmb' if available; -1 else

Definition at line 90 of file TtEvent.h.

References fitChi2_.

Referenced by TtSemiLeptonicEvent::print(), and TtFullHadronicEvent::print().

90 { return (cmb<fitChi2_.size() ? fitChi2_[cmb] : -1.); }
std::vector< double > fitChi2_
result of kinematic fit
Definition: TtEvent.h:158
double TtEvent::fitProb ( const unsigned &  cmb = 0) const
inline

return the fit probability of hypothesis 'cmb' if available; -1 else

Definition at line 94 of file TtEvent.h.

References fitProb_.

Referenced by TtSemiLeptonicEvent::print(), and TtFullHadronicEvent::print().

94 { return (cmb<fitProb_.size() ? fitProb_[cmb] : -1.); }
std::vector< double > fitProb_
result of kinematic fit
Definition: TtEvent.h:161
const edm::RefProd<TtGenEvent>& TtEvent::genEvent ( ) const
inline
double TtEvent::genMatchSumDR ( const unsigned &  cmb = 0) const
inline

return the sum dr of the generator match if available; -1 else

Definition at line 84 of file TtEvent.h.

References genMatchSumDR_.

Referenced by TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().

84 { return (cmb<genMatchSumDR_.size() ? genMatchSumDR_[cmb] : -1.); };
std::vector< double > genMatchSumDR_
result of gen match
Definition: TtEvent.h:169
double TtEvent::genMatchSumPt ( const unsigned &  cmb = 0) const
inline

return the sum pt of the generator match if available; -1 else

Definition at line 82 of file TtEvent.h.

References genMatchSumPt_.

Referenced by TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().

82 { return (cmb<genMatchSumPt_.size() ? genMatchSumPt_[cmb] : -1.); };
std::vector< double > genMatchSumPt_
result of gen match
Definition: TtEvent.h:167
double TtEvent::hitFitChi2 ( const unsigned &  cmb = 0) const
inline

return the hitfit chi2 of hypothesis 'cmb' if available; -1 else

Definition at line 92 of file TtEvent.h.

References hitFitChi2_.

Referenced by TtSemiLeptonicEvent::print().

92 { return (cmb<hitFitChi2_.size() ? hitFitChi2_[cmb] : -1.); }
std::vector< double > hitFitChi2_
Definition: TtEvent.h:159
double TtEvent::hitFitMT ( const unsigned &  cmb = 0) const
inline

return the hitfit top mass of hypothesis 'cmb' if available; -1 else

Definition at line 98 of file TtEvent.h.

References hitFitMT_.

Referenced by TtSemiLeptonicEvent::print().

98 { return (cmb<hitFitMT_.size() ? hitFitMT_[cmb] : -1.); }
std::vector< double > hitFitMT_
result of hitfit
Definition: TtEvent.h:164
double TtEvent::hitFitProb ( const unsigned &  cmb = 0) const
inline

return the hitfit probability of hypothesis 'cmb' if available; -1 else

Definition at line 96 of file TtEvent.h.

References hitFitProb_.

Referenced by TtSemiLeptonicEvent::print().

96 { return (cmb<hitFitProb_.size() ? hitFitProb_[cmb] : -1.); }
std::vector< double > hitFitProb_
Definition: TtEvent.h:162
double TtEvent::hitFitSigMT ( const unsigned &  cmb = 0) const
inline

return the hitfit top mass uncertainty of hypothesis 'cmb' if available; -1 else

Definition at line 100 of file TtEvent.h.

References hitFitSigMT_.

Referenced by TtSemiLeptonicEvent::print().

100 { return (cmb<hitFitSigMT_.size() ? hitFitSigMT_[cmb] : -1.); }
std::vector< double > hitFitSigMT_
Definition: TtEvent.h:165
TtEvent::HypoClassKey TtEvent::hypoClassKeyFromString ( const std::string &  label) const
protected

return the corresponding enum value from a string

Definition at line 19 of file TtEvent.cc.

References diffTwoXMLs::label.

Referenced by TtFullHadronicEvent::b(), TtFullLeptonicEvent::b(), TtFullLeptonicEvent::bBar(), TtFullHadronicEvent::bBar(), correspondingHypo(), TtSemiLeptonicEvent::hadronicDecayB(), TtSemiLeptonicEvent::hadronicDecayQuark(), TtSemiLeptonicEvent::hadronicDecayQuarkBar(), TtSemiLeptonicEvent::hadronicDecayTop(), TtSemiLeptonicEvent::hadronicDecayW(), isHypoAvailable(), isHypoClassAvailable(), isHypoValid(), jetLeptonCombination(), TtFullLeptonicEvent::lepton(), TtFullLeptonicEvent::leptonBar(), TtSemiLeptonicEvent::leptonicDecayB(), TtSemiLeptonicEvent::leptonicDecayTop(), TtSemiLeptonicEvent::leptonicDecayW(), TtFullHadronicEvent::lightP(), TtFullHadronicEvent::lightPBar(), TtFullHadronicEvent::lightQ(), TtFullHadronicEvent::lightQBar(), TtFullLeptonicEvent::neutrino(), TtFullLeptonicEvent::neutrinoBar(), numberOfAvailableHypos(), numberOfConsideredJets(), TtSemiLeptonicEvent::numberOfRealNeutrinoSolutions(), TtSemiLeptonicEvent::singleLepton(), TtSemiLeptonicEvent::singleNeutrino(), TtFullLeptonicEvent::top(), TtFullHadronicEvent::top(), TtFullLeptonicEvent::topBar(), TtFullHadronicEvent::topBar(), topPair(), TtFullLeptonicEvent::wMinus(), TtFullHadronicEvent::wMinus(), TtFullLeptonicEvent::wPlus(), and TtFullHadronicEvent::wPlus().

20 {
21  return (HypoClassKey) StringToEnumValue<HypoClassKey>(label);
22 }
HypoClassKey
supported classes of event hypotheses
Definition: TtEvent.h:31
bool TtEvent::isHypoAvailable ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

Definition at line 60 of file TtEvent.h.

References hypoClassKeyFromString(), and isHypoAvailable().

Referenced by TtEvtBuilder< C >::fillSpecific(), isHypoAvailable(), isHypoValid(), main(), numberOfAvailableHypos(), and numberOfConsideredJets().

60 { return isHypoAvailable( hypoClassKeyFromString(key), cmb ); };
bool isHypoAvailable(const std::string &key, const unsigned &cmb=0) const
Definition: TtEvent.h:60
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:19
list key
Definition: combine.py:13
bool TtEvent::isHypoAvailable ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

check if hypothesis 'cmb' is available within the hypothesis class

Definition at line 62 of file TtEvent.h.

References evtHyp_, and isHypoClassAvailable().

62 { return isHypoClassAvailable(key) ? (cmb<evtHyp_.find(key)->second.size()) : false; };
bool isHypoClassAvailable(const std::string &key) const
check if hypothesis class &#39;key&#39; was added to the event structure
Definition: TtEvent.h:56
list key
Definition: combine.py:13
std::map< HypoClassKey, std::vector< HypoCombPair > > evtHyp_
Definition: TtEvent.h:153
bool TtEvent::isHypoClassAvailable ( const std::string &  key) const
inline

check if hypothesis class 'key' was added to the event structure

Definition at line 56 of file TtEvent.h.

References hypoClassKeyFromString(), and isHypoClassAvailable().

Referenced by isHypoAvailable(), and isHypoClassAvailable().

bool isHypoClassAvailable(const std::string &key) const
check if hypothesis class &#39;key&#39; was added to the event structure
Definition: TtEvent.h:56
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:19
list key
Definition: combine.py:13
bool TtEvent::isHypoClassAvailable ( const HypoClassKey key) const
inline

check if hypothesis class 'key' was added to the event structure

Definition at line 58 of file TtEvent.h.

References evtHyp_.

58 { return (evtHyp_.find(key)!=evtHyp_.end()); };
list key
Definition: combine.py:13
std::map< HypoClassKey, std::vector< HypoCombPair > > evtHyp_
Definition: TtEvent.h:153
bool TtEvent::isHypoValid ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

check if hypothesis 'cmb' within the hypothesis class was valid; if not it lead to an empty CompositeCandidate

Definition at line 64 of file TtEvent.h.

References hypoClassKeyFromString(), and isHypoValid().

Referenced by TtFullHadronicEvent::b(), TtFullLeptonicEvent::b(), TtFullLeptonicEvent::bBar(), TtFullHadronicEvent::bBar(), TtSemiLeptonicEvent::hadronicDecayB(), TtSemiLeptonicEvent::hadronicDecayQuark(), TtSemiLeptonicEvent::hadronicDecayQuarkBar(), TtSemiLeptonicEvent::hadronicDecayTop(), TtSemiLeptonicEvent::hadronicDecayW(), isHypoValid(), TtFullLeptonicEvent::lepton(), TtFullLeptonicEvent::leptonBar(), TtSemiLeptonicEvent::leptonicDecayB(), TtSemiLeptonicEvent::leptonicDecayTop(), TtSemiLeptonicEvent::leptonicDecayW(), TtFullHadronicEvent::lightP(), TtFullHadronicEvent::lightPBar(), TtFullHadronicEvent::lightQ(), TtFullHadronicEvent::lightQBar(), main(), TtFullLeptonicEvent::neutrino(), TtFullLeptonicEvent::neutrinoBar(), TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), TtFullHadronicEvent::print(), TtSemiLeptonicEvent::singleLepton(), TtSemiLeptonicEvent::singleNeutrino(), TtFullHadronicEvent::top(), TtFullLeptonicEvent::top(), TtFullLeptonicEvent::topBar(), TtFullHadronicEvent::topBar(), topPair(), TtFullLeptonicEvent::wMinus(), TtFullHadronicEvent::wMinus(), TtFullLeptonicEvent::wPlus(), and TtFullHadronicEvent::wPlus().

64 { return isHypoValid( hypoClassKeyFromString(key), cmb ); };
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:19
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
list key
Definition: combine.py:13
bool TtEvent::isHypoValid ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

check if hypothesis 'cmb' within the hypothesis class was valid; if not it lead to an empty CompositeCandidate

Definition at line 66 of file TtEvent.h.

References eventHypo(), isHypoAvailable(), and reco::CompositeCandidate::roles().

66 { return isHypoAvailable(key, cmb) ? !eventHypo(key, cmb).roles().empty() : false; };
bool isHypoAvailable(const std::string &key, const unsigned &cmb=0) const
Definition: TtEvent.h:60
role_collection const & roles() const
get the roles
const reco::CompositeCandidate & eventHypo(const HypoClassKey &key, const unsigned &cmb=0) const
Definition: TtEvent.h:51
list key
Definition: combine.py:13
std::vector<int> TtEvent::jetLeptonCombination ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

return the vector of jet lepton combinatorics for a given hypothesis and class

Definition at line 78 of file TtEvent.h.

References hypoClassKeyFromString(), and jetLeptonCombination().

Referenced by correspondingHypo(), jetLeptonCombination(), TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().

HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:19
list key
Definition: combine.py:13
std::vector< int > jetLeptonCombination(const std::string &key, const unsigned &cmb=0) const
return the vector of jet lepton combinatorics for a given hypothesis and class
Definition: TtEvent.h:78
std::vector<int> TtEvent::jetLeptonCombination ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

return the vector of jet lepton combinatorics for a given hypothesis and class

Definition at line 80 of file TtEvent.h.

References evtHyp_, and edm::second().

80 { return (evtHyp_.find(key)->second)[cmb].second; };
U second(std::pair< T, U > const &p)
list key
Definition: combine.py:13
std::map< HypoClassKey, std::vector< HypoCombPair > > evtHyp_
Definition: TtEvent.h:153
std::pair<WDecay::LeptonType, WDecay::LeptonType> TtEvent::lepDecays ( ) const
inline

get leptonic decay channels

Definition at line 48 of file TtEvent.h.

References lepDecays_.

48 { return lepDecays_; }
std::pair< WDecay::LeptonType, WDecay::LeptonType > lepDecays_
leptonic decay channels
Definition: TtEvent.h:143
double TtEvent::mvaDisc ( const unsigned &  cmb = 0) const
inline

return the mva discriminant value of hypothesis 'cmb' if available; -1 else

Definition at line 88 of file TtEvent.h.

References mvaDisc_.

Referenced by TtSemiLeptonicEvent::print().

88 { return (cmb<mvaDisc_.size() ? mvaDisc_[cmb] : -1.); }
std::vector< double > mvaDisc_
MVA discriminants.
Definition: TtEvent.h:173
std::string TtEvent::mvaMethod ( ) const
inline

return the label of the mva method in use for the jet parton association (if kMVADisc is not available the string is empty)

Definition at line 86 of file TtEvent.h.

References mvaMethod_.

Referenced by TtSemiLeptonicEvent::print().

86 { return mvaMethod_; }
std::string mvaMethod_
label of the MVA method
Definition: TtEvent.h:171
unsigned int TtEvent::numberOfAvailableHypoClasses ( ) const
inline

return number of available hypothesis classes

Definition at line 68 of file TtEvent.h.

References evtHyp_.

Referenced by TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().

68 { return evtHyp_.size(); };
std::map< HypoClassKey, std::vector< HypoCombPair > > evtHyp_
Definition: TtEvent.h:153
unsigned int TtEvent::numberOfAvailableHypos ( const std::string &  key) const
inline

return number of available hypotheses within a given hypothesis class

Definition at line 70 of file TtEvent.h.

References hypoClassKeyFromString(), and numberOfAvailableHypos().

Referenced by correspondingHypo(), numberOfAvailableHypos(), TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().

unsigned int numberOfAvailableHypos(const std::string &key) const
return number of available hypotheses within a given hypothesis class
Definition: TtEvent.h:70
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:19
list key
Definition: combine.py:13
unsigned int TtEvent::numberOfAvailableHypos ( const HypoClassKey key) const
inline

return number of available hypotheses within a given hypothesis class

Definition at line 72 of file TtEvent.h.

References evtHyp_, and isHypoAvailable().

72 { return isHypoAvailable(key) ? evtHyp_.find(key)->second.size() : 0; };
bool isHypoAvailable(const std::string &key, const unsigned &cmb=0) const
Definition: TtEvent.h:60
list key
Definition: combine.py:13
std::map< HypoClassKey, std::vector< HypoCombPair > > evtHyp_
Definition: TtEvent.h:153
int TtEvent::numberOfConsideredJets ( const std::string &  key) const
inline

return number of jets that were considered when building a given hypothesis

Definition at line 74 of file TtEvent.h.

References hypoClassKeyFromString(), and numberOfConsideredJets().

Referenced by numberOfConsideredJets(), and TtSemiLeptonicEvent::print().

int numberOfConsideredJets(const std::string &key) const
return number of jets that were considered when building a given hypothesis
Definition: TtEvent.h:74
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:19
list key
Definition: combine.py:13
int TtEvent::numberOfConsideredJets ( const HypoClassKey key) const
inline

return number of jets that were considered when building a given hypothesis

Definition at line 76 of file TtEvent.h.

References isHypoAvailable(), and nJetsConsidered_.

76 { return (isHypoAvailable(key) ? nJetsConsidered_.find(key)->second : -1); };
std::map< HypoClassKey, int > nJetsConsidered_
number of jets considered when building the hypotheses
Definition: TtEvent.h:155
bool isHypoAvailable(const std::string &key, const unsigned &cmb=0) const
Definition: TtEvent.h:60
list key
Definition: combine.py:13
void TtEvent::printParticle ( edm::LogInfo log,
const char *  name,
const reco::Candidate cand 
) const

print pt, eta, phi, mass of a given candidate into an existing LogInfo

Definition at line 26 of file TtEvent.cc.

References reco::Candidate::eta(), reco::Candidate::mass(), reco::Candidate::phi(), and reco::Candidate::pt().

Referenced by TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().

27 {
28  if(!cand) {
29  log << std::setw(15) << name << ": not available!\n";
30  return;
31  }
32  log << std::setprecision(3) << setiosflags(std::ios::fixed | std::ios::showpoint);
33  log << std::setw(15) << name << ": "
34  << std::setw( 7) << cand->pt() << "; "
35  << std::setw( 7) << cand->eta() << "; "
36  << std::setw( 7) << cand->phi() << "; "
37  << resetiosflags(std::ios::fixed | std::ios::showpoint) << setiosflags(std::ios::scientific)
38  << std::setw(10) << cand->mass() << "\n";
39  log << resetiosflags(std::ios::scientific);
40 }
virtual float mass() const =0
mass
virtual float eta() const =0
momentum pseudorapidity
virtual float phi() const =0
momentum azimuthal angle
virtual float pt() const =0
transverse momentum
void TtEvent::setFitChi2 ( const std::vector< double > &  val)
inline

set chi2 of kKinFit hypothesis

Definition at line 133 of file TtEvent.h.

References fitChi2_.

133 { fitChi2_=val; };
std::vector< double > fitChi2_
result of kinematic fit
Definition: TtEvent.h:158
void TtEvent::setFitProb ( const std::vector< double > &  val)
inline

set fit probability of kKinFit hypothesis

Definition at line 137 of file TtEvent.h.

References fitProb_.

137 { fitProb_=val; };
std::vector< double > fitProb_
result of kinematic fit
Definition: TtEvent.h:161
void TtEvent::setGenEvent ( const edm::Handle< TtGenEvent > &  evt)
inline

set TtGenEvent

Definition at line 119 of file TtEvent.h.

References genEvt_.

edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:150
void TtEvent::setGenMatchSumDR ( const std::vector< double > &  val)
inline

set sum dr of kGenMatch hypothesis

Definition at line 127 of file TtEvent.h.

References genMatchSumDR_.

127 {genMatchSumDR_=val;};
std::vector< double > genMatchSumDR_
result of gen match
Definition: TtEvent.h:169
void TtEvent::setGenMatchSumPt ( const std::vector< double > &  val)
inline

set sum pt of kGenMatch hypothesis

Definition at line 125 of file TtEvent.h.

References genMatchSumPt_.

125 {genMatchSumPt_=val;};
std::vector< double > genMatchSumPt_
result of gen match
Definition: TtEvent.h:167
void TtEvent::setHitFitChi2 ( const std::vector< double > &  val)
inline

set chi2 of kHitFit hypothesis

Definition at line 135 of file TtEvent.h.

References hitFitChi2_.

135 { hitFitChi2_=val; };
std::vector< double > hitFitChi2_
Definition: TtEvent.h:159
void TtEvent::setHitFitMT ( const std::vector< double > &  val)
inline

set fitted top mass of kHitFit hypothesis

Definition at line 141 of file TtEvent.h.

References hitFitMT_.

141 { hitFitMT_=val; };
std::vector< double > hitFitMT_
result of hitfit
Definition: TtEvent.h:164
void TtEvent::setHitFitProb ( const std::vector< double > &  val)
inline

set fit probability of kHitFit hypothesis

Definition at line 139 of file TtEvent.h.

References hitFitProb_.

139 { hitFitProb_=val; };
std::vector< double > hitFitProb_
Definition: TtEvent.h:162
void TtEvent::setHitFitSigMT ( const std::vector< double > &  val)
inline

set fitted top mass uncertainty of kHitFit hypothesis

Definition at line 143 of file TtEvent.h.

References hitFitSigMT_.

143 { hitFitSigMT_=val; };
std::vector< double > hitFitSigMT_
Definition: TtEvent.h:165
void TtEvent::setLepDecays ( const WDecay::LeptonType lepDecTop1,
const WDecay::LeptonType lepDecTop2 
)
inline

set leptonic decay channels

Definition at line 117 of file TtEvent.h.

References lepDecays_.

117 { lepDecays_=std::make_pair(lepDecTop1, lepDecTop2); };
std::pair< WDecay::LeptonType, WDecay::LeptonType > lepDecays_
leptonic decay channels
Definition: TtEvent.h:143
void TtEvent::setMvaDiscriminators ( const std::vector< double > &  val)
inline

set mva discriminant values of kMVADisc hypothesis

Definition at line 131 of file TtEvent.h.

References mvaDisc_.

131 { mvaDisc_=val; };
std::vector< double > mvaDisc_
MVA discriminants.
Definition: TtEvent.h:173
void TtEvent::setMvaMethod ( const std::string &  name)
inline

set label of mva method for kMVADisc hypothesis

Definition at line 129 of file TtEvent.h.

References mvaMethod_, and mergeVDriftHistosByStation::name.

129 { mvaMethod_=name; };
std::string mvaMethod_
label of the MVA method
Definition: TtEvent.h:171
void TtEvent::setNumberOfConsideredJets ( const HypoClassKey key,
const unsigned int  nJets 
)
inline

set number of jets considered when building a given hypothesis

Definition at line 123 of file TtEvent.h.

References combine::key, and nJetsConsidered_.

Referenced by TtEvtBuilder< C >::fillSpecific().

123 { nJetsConsidered_[key]=nJets; };
std::map< HypoClassKey, int > nJetsConsidered_
number of jets considered when building the hypotheses
Definition: TtEvent.h:155
list key
Definition: combine.py:13
const reco::Candidate* TtEvent::topPair ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get combined 4-vector of top and topBar of the given hypothesis

Definition at line 107 of file TtEvent.h.

References hypoClassKeyFromString(), and topPair().

Referenced by topPair().

107 { return topPair(hypoClassKeyFromString(key), cmb); };
const math::XYZTLorentzVector * topPair() const
get combined 4-vector of top and topBar from the TtGenEvent
Definition: TtEvent.h:111
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:19
list key
Definition: combine.py:13
const reco::Candidate* TtEvent::topPair ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get combined 4-vector of top and topBar of the given hypothesis

Definition at line 109 of file TtEvent.h.

References eventHypo(), and isHypoValid().

109 { return !isHypoValid(key,cmb) ? 0 : (reco::Candidate*)&eventHypo(key,cmb); };
const reco::CompositeCandidate & eventHypo(const HypoClassKey &key, const unsigned &cmb=0) const
Definition: TtEvent.h:51
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
list key
Definition: combine.py:13
const math::XYZTLorentzVector* TtEvent::topPair ( ) const
inline

get combined 4-vector of top and topBar from the TtGenEvent

Definition at line 111 of file TtEvent.h.

References genEvent(), genEvt_, and topPair().

Referenced by TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), TtFullHadronicEvent::print(), and topPair().

111 { return (!genEvt_ ? 0 : this->genEvent()->topPair()); };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:53
const math::XYZTLorentzVector * topPair() const
get combined 4-vector of top and topBar from the TtGenEvent
Definition: TtEvent.h:111
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:150

Member Data Documentation

std::map<HypoClassKey, std::vector<HypoCombPair> > TtEvent::evtHyp_
protected

map of hypotheses; for each HypoClassKey a vector of hypothesis and their lepton jet combinatorics are kept

Definition at line 153 of file TtEvent.h.

Referenced by addEventHypo(), eventHypo(), isHypoAvailable(), isHypoClassAvailable(), jetLeptonCombination(), numberOfAvailableHypoClasses(), numberOfAvailableHypos(), TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().

std::vector<double> TtEvent::fitChi2_
protected

result of kinematic fit

Definition at line 158 of file TtEvent.h.

Referenced by fitChi2(), and setFitChi2().

std::vector<double> TtEvent::fitProb_
protected

result of kinematic fit

Definition at line 161 of file TtEvent.h.

Referenced by fitProb(), and setFitProb().

edm::RefProd<TtGenEvent> TtEvent::genEvt_
protected
std::vector<double> TtEvent::genMatchSumDR_
protected

result of gen match

Definition at line 169 of file TtEvent.h.

Referenced by genMatchSumDR(), and setGenMatchSumDR().

std::vector<double> TtEvent::genMatchSumPt_
protected

result of gen match

Definition at line 167 of file TtEvent.h.

Referenced by genMatchSumPt(), and setGenMatchSumPt().

std::vector<double> TtEvent::hitFitChi2_
protected

Definition at line 159 of file TtEvent.h.

Referenced by hitFitChi2(), and setHitFitChi2().

std::vector<double> TtEvent::hitFitMT_
protected

result of hitfit

Definition at line 164 of file TtEvent.h.

Referenced by hitFitMT(), and setHitFitMT().

std::vector<double> TtEvent::hitFitProb_
protected

Definition at line 162 of file TtEvent.h.

Referenced by hitFitProb(), and setHitFitProb().

std::vector<double> TtEvent::hitFitSigMT_
protected

Definition at line 165 of file TtEvent.h.

Referenced by hitFitSigMT(), and setHitFitSigMT().

std::pair<WDecay::LeptonType, WDecay::LeptonType> TtEvent::lepDecays_
protected

leptonic decay channels

Definition at line 143 of file TtEvent.h.

Referenced by lepDecays(), and setLepDecays().

std::vector<double> TtEvent::mvaDisc_
protected

MVA discriminants.

Definition at line 173 of file TtEvent.h.

Referenced by mvaDisc(), and setMvaDiscriminators().

std::string TtEvent::mvaMethod_
protected

label of the MVA method

Definition at line 171 of file TtEvent.h.

Referenced by mvaMethod(), and setMvaMethod().

std::map<HypoClassKey, int> TtEvent::nJetsConsidered_
protected

number of jets considered when building the hypotheses

Definition at line 155 of file TtEvent.h.

Referenced by numberOfConsideredJets(), and setNumberOfConsideredJets().