![]() |
![]() |
Base class to hold information for ttbar event interpretation. More...
#include "AnalysisDataFormats/TopObjects/interface/TtEvent.h"
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 } |
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, 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::CompositeCandidate & | eventHypo (const HypoClassKey &key, const unsigned &cmb=0) const |
double | fitChi2 (const unsigned &cmb=0) const |
return the chi2 of the kinemtaic 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... | |
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... | |
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 | 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... | |
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< TtGenEvent > | genEvt_ |
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::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... | |
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.
typedef std::pair<reco::CompositeCandidate, std::vector<int> > TtEvent::HypoCombPair |
supported classes of event hypotheses
Enumerator | |
---|---|
kGeom | |
kWMassMaxSumPt | |
kMaxSumPtWMass | |
kGenMatch | |
kMVADisc | |
kKinFit | |
kKinSolution | |
kWMassDeltaTopMass |
Definition at line 31 of file TtEvent.h.
|
inlinevirtual |
|
inline |
add new hypotheses
Definition at line 102 of file TtEvent.h.
References evtHyp_, and combine::key.
|
inline |
return the hypothesis in hypothesis class 'key2', which corresponds to hypothesis 'hyp1' in hypothesis class 'key1'
Definition at line 90 of file TtEvent.h.
References correspondingHypo(), and hypoClassKeyFromString().
Referenced by correspondingHypo().
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 7 of file TtEvent.cc.
References jetLeptonCombination(), and numberOfAvailableHypos().
|
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(), TtFullHadronicEvent::top(), TtFullLeptonicEvent::top(), TtFullLeptonicEvent::topBar(), and TtFullHadronicEvent::topBar().
|
inline |
return the chi2 of the kinemtaic fit of hypothesis 'cmb' if available; -1 else
Definition at line 86 of file TtEvent.h.
References fitChi2_.
Referenced by TtSemiLeptonicEvent::print(), and TtFullHadronicEvent::print().
|
inline |
return the fit probability of hypothesis 'cmb' if available; -1 else
Definition at line 88 of file TtEvent.h.
References fitProb_.
Referenced by TtSemiLeptonicEvent::print(), and TtFullHadronicEvent::print().
|
inline |
get TtGenEvent
Definition at line 53 of file TtEvent.h.
References genEvt_.
Referenced by TtFullHadronicEvent::b(), TtFullHadronicEvent::bBar(), TtFullLeptonicEvent::genB(), TtFullLeptonicEvent::genBBar(), TtFullLeptonicEvent::genLepton(), TtFullLeptonicEvent::genLeptonBar(), TtFullLeptonicEvent::genNeutrino(), TtFullLeptonicEvent::genNeutrinoBar(), TtFullLeptonicEvent::genTop(), TtFullLeptonicEvent::genTopBar(), TtFullLeptonicEvent::genWMinus(), TtFullLeptonicEvent::genWPlus(), TtSemiLeptonicEvent::hadronicDecayB(), TtSemiLeptonicEvent::hadronicDecayQuark(), TtSemiLeptonicEvent::hadronicDecayQuarkBar(), TtSemiLeptonicEvent::hadronicDecayTop(), TtSemiLeptonicEvent::hadronicDecayW(), TtSemiLeptonicEvent::leptonicDecayB(), TtSemiLeptonicEvent::leptonicDecayTop(), TtSemiLeptonicEvent::leptonicDecayW(), TtFullHadronicEvent::lightP(), TtFullHadronicEvent::lightPBar(), TtFullHadronicEvent::lightQ(), TtFullHadronicEvent::lightQBar(), TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), TtFullHadronicEvent::print(), TtSemiLeptonicEvent::singleLepton(), TtSemiLeptonicEvent::singleNeutrino(), TtFullHadronicEvent::top(), TtFullHadronicEvent::topBar(), TtFullHadronicEvent::wMinus(), and TtFullHadronicEvent::wPlus().
|
inline |
return the sum dr of the generator match if available; -1 else
Definition at line 80 of file TtEvent.h.
References genMatchSumDR_.
Referenced by TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().
|
inline |
return the sum pt of the generator match if available; -1 else
Definition at line 78 of file TtEvent.h.
References genMatchSumPt_.
Referenced by TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().
|
protected |
return the corresponding enum value from a string
Definition at line 18 of file TtEvent.cc.
References edm::hlt::Exception, newFWLiteAna::found, i, kGenMatch, kGeom, kKinFit, kKinSolution, kMaxSumPtWMass, kMVADisc, kWMassDeltaTopMass, kWMassMaxSumPt, TtEvent::HypoClassKeyStringToEnum::label, TtEvent::HypoClassKeyStringToEnum::value, and relativeConstraints::value.
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(), TtSemiLeptonicEvent::numberOfRealNeutrinoSolutions(), TtSemiLeptonicEvent::singleLepton(), TtSemiLeptonicEvent::singleNeutrino(), TtFullHadronicEvent::top(), TtFullLeptonicEvent::top(), TtFullLeptonicEvent::topBar(), TtFullHadronicEvent::topBar(), TtFullLeptonicEvent::wMinus(), TtFullHadronicEvent::wMinus(), TtFullLeptonicEvent::wPlus(), and TtFullHadronicEvent::wPlus().
|
inline |
Definition at line 60 of file TtEvent.h.
References hypoClassKeyFromString(), and isHypoAvailable().
Referenced by TtEvtBuilder< C >::fillSpecific(), isHypoAvailable(), isHypoValid(), main(), and numberOfAvailableHypos().
|
inline |
check if hypothesis 'cmb' is available within the hypothesis class
Definition at line 62 of file TtEvent.h.
References evtHyp_, and isHypoClassAvailable().
|
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().
|
inline |
check if hypothesis class 'key' was added to the event structure
Definition at line 58 of file TtEvent.h.
References evtHyp_.
|
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(), TtFullLeptonicEvent::wMinus(), TtFullHadronicEvent::wMinus(), TtFullLeptonicEvent::wPlus(), and TtFullHadronicEvent::wPlus().
|
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().
|
inline |
return the vector of jet lepton combinatorics for a given hypothesis and class
Definition at line 74 of file TtEvent.h.
References hypoClassKeyFromString(), and jetLeptonCombination().
Referenced by correspondingHypo(), jetLeptonCombination(), TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().
|
inline |
return the vector of jet lepton combinatorics for a given hypothesis and class
Definition at line 76 of file TtEvent.h.
References evtHyp_, and edm::second().
|
inline |
get leptonic decay channels
Definition at line 48 of file TtEvent.h.
References lepDecays_.
|
inline |
return the mva discriminant value of hypothesis 'cmb' if available; -1 else
Definition at line 84 of file TtEvent.h.
References mvaDisc_.
Referenced by TtSemiLeptonicEvent::print(), and TtFullHadronicEvent::print().
|
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 82 of file TtEvent.h.
References mvaMethod_.
Referenced by TtSemiLeptonicEvent::print(), and TtFullHadronicEvent::print().
|
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().
|
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().
|
inline |
return number of available hypotheses within a given hypothesis class
Definition at line 72 of file TtEvent.h.
References evtHyp_, and isHypoAvailable().
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 50 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().
|
inline |
|
inline |
|
inline |
set TtGenEvent
Definition at line 100 of file TtEvent.h.
References genEvt_.
|
inline |
set sum dr of kGenMatch hypothesis
Definition at line 106 of file TtEvent.h.
References genMatchSumDR_.
|
inline |
set sum pt of kGenMatch hypothesis
Definition at line 104 of file TtEvent.h.
References genMatchSumPt_.
|
inline |
set leptonic decay channels
Definition at line 98 of file TtEvent.h.
References lepDecays_.
|
inline |
|
inline |
set label of mva method for kMVADisc hypothesis
Definition at line 108 of file TtEvent.h.
References mvaMethod_, and mergeVDriftHistosByStation::name.
|
protected |
map of hypotheses; for each HypoClassKey a vector of hypothesis and their lepton jet combinatorics are kept
Definition at line 124 of file TtEvent.h.
Referenced by addEventHypo(), eventHypo(), isHypoAvailable(), isHypoClassAvailable(), jetLeptonCombination(), numberOfAvailableHypoClasses(), numberOfAvailableHypos(), TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().
|
protected |
result of kinematic fit
Definition at line 127 of file TtEvent.h.
Referenced by fitChi2(), and setFitChi2().
|
protected |
result of kinematic fit
Definition at line 129 of file TtEvent.h.
Referenced by fitProb(), and setFitProb().
|
protected |
reference to TtGenEvent (has to be kept in the event!)
Definition at line 121 of file TtEvent.h.
Referenced by TtFullHadronicEvent::b(), TtFullHadronicEvent::bBar(), TtFullLeptonicEvent::genB(), TtFullLeptonicEvent::genBBar(), genEvent(), TtFullLeptonicEvent::genLepton(), TtFullLeptonicEvent::genLeptonBar(), TtFullLeptonicEvent::genNeutrino(), TtFullLeptonicEvent::genNeutrinoBar(), TtFullLeptonicEvent::genTop(), TtFullLeptonicEvent::genTopBar(), TtFullLeptonicEvent::genWMinus(), TtFullLeptonicEvent::genWPlus(), TtSemiLeptonicEvent::hadronicDecayB(), TtSemiLeptonicEvent::hadronicDecayQuark(), TtSemiLeptonicEvent::hadronicDecayQuarkBar(), TtSemiLeptonicEvent::hadronicDecayTop(), TtSemiLeptonicEvent::hadronicDecayW(), TtSemiLeptonicEvent::leptonicDecayB(), TtSemiLeptonicEvent::leptonicDecayTop(), TtSemiLeptonicEvent::leptonicDecayW(), TtFullHadronicEvent::lightP(), TtFullHadronicEvent::lightPBar(), TtFullHadronicEvent::lightQ(), TtFullHadronicEvent::lightQBar(), TtSemiLeptonicEvent::print(), TtFullHadronicEvent::print(), setGenEvent(), TtSemiLeptonicEvent::singleLepton(), TtSemiLeptonicEvent::singleNeutrino(), TtFullHadronicEvent::top(), TtFullHadronicEvent::topBar(), TtFullHadronicEvent::wMinus(), and TtFullHadronicEvent::wPlus().
|
protected |
result of gen match
Definition at line 133 of file TtEvent.h.
Referenced by genMatchSumDR(), and setGenMatchSumDR().
|
protected |
result of gen match
Definition at line 131 of file TtEvent.h.
Referenced by genMatchSumPt(), and setGenMatchSumPt().
|
protected |
leptonic decay channels
Definition at line 114 of file TtEvent.h.
Referenced by lepDecays(), and setLepDecays().
|
protected |
MVA discriminants.
Definition at line 137 of file TtEvent.h.
Referenced by mvaDisc(), and setMvaDiscriminators().
|
protected |
label of the MVA method
Definition at line 135 of file TtEvent.h.
Referenced by mvaMethod(), and setMvaMethod().