Class derived from the TopGenEvent for ttbar events. More...
#include "AnalysisDataFormats/TopObjects/interface/TtGenEvent.h"
Public Member Functions | |
bool | fromGluonFusion () const |
check if the tops were produced from a pair of gluons More... | |
bool | fromQuarkAnnihilation () const |
check if the tops were produced from qqbar More... | |
std::pair< WDecay::LeptonType, WDecay::LeptonType > | fullLeptonicChannel () const |
const reco::GenParticle * | hadronicDecayB (bool excludeTauLeptons=false) const |
get b of hadronic decay branch More... | |
const reco::GenParticle * | hadronicDecayQuark (bool invertFlavor=false) const |
get light quark of hadronic decay branch More... | |
const reco::GenParticle * | hadronicDecayQuarkBar () const |
get light anti-quark of hadronic decay branch More... | |
const reco::GenParticle * | hadronicDecayTop (bool excludeTauLeptons=false) const |
get top of hadronic decay branch More... | |
std::vector< const reco::GenParticle * > | hadronicDecayTopRadiation (bool excludeTauLeptons=false) const |
gluons as radiated from the hadronicly decaying top quark More... | |
const reco::GenParticle * | hadronicDecayW (bool excludeTauLeptons=false) const |
get W of hadronic decay branch More... | |
bool | isFullHadronic (bool excludeTauLeptons=false) const |
check if the event can be classified as full hadronic More... | |
bool | isFullLeptonic (bool excludeTauLeptons=false) const |
check if the event can be classified as full leptonic More... | |
bool | isFullLeptonic (WDecay::LeptonType typeA, WDecay::LeptonType typeB) const |
check if the event is full leptonic with the lepton being of typeA or typeB irrelevant of order; all leptons including taus are allowed More... | |
bool | isSemiLeptonic (bool excludeTauLeptons=false) const |
check if the event can be classified as semi-laptonic More... | |
bool | isSemiLeptonic (WDecay::LeptonType typeA) const |
check if the event is semi-leptonic with the lepton being of typeA; all leptons including taus are allowed More... | |
bool | isSemiLeptonic (WDecay::LeptonType typeA, WDecay::LeptonType typeB) const |
check if the event is semi-leptonic with the lepton being of typeA or typeB; all leptons including taus are allowed More... | |
bool | isTtBar () const |
check if the event can be classified as ttbar More... | |
const reco::GenParticle * | lepton (bool excludeTauLeptons=false) const |
get lepton for semi-leptonic or full leptonic decays More... | |
const reco::GenParticle * | leptonBar (bool excludeTauLeptons=false) const |
get anti-lepton for semi-leptonic or full leptonic decays More... | |
const reco::GenParticle * | leptonicDecayB (bool excludeTauLeptons=false) const |
get b of leptonic decay branch More... | |
const reco::GenParticle * | leptonicDecayTop (bool excludeTauLeptons=false) const |
get top of leptonic decay branch More... | |
std::vector< const reco::GenParticle * > | leptonicDecayTopRadiation (bool excludeTauLeptons=false) const |
gluons as radiated from the leptonicly decaying top quark More... | |
const reco::GenParticle * | leptonicDecayW (bool excludeTauLeptons=false) const |
get W of leptonic decay branch More... | |
const reco::GenParticle * | neutrino (bool excludeTauLeptons=false) const |
get neutrino for semi-leptonic or full leptonic decays More... | |
const reco::GenParticle * | neutrinoBar (bool excludeTauLeptons=false) const |
get anti-neutrino for semi-leptonic or full leptonic decays More... | |
WDecay::LeptonType | semiLeptonicChannel () const |
return decay channel; all leptons including taus are allowed More... | |
const reco::GenParticle * | singleLepton (bool excludeTauLeptons=false) const |
return single lepton if available; 0 else More... | |
const reco::GenParticle * | singleNeutrino (bool excludeTauLeptons=false) const |
return single neutrino if available; 0 else More... | |
const math::XYZTLorentzVector * | topPair () const |
return combined 4-vector of top and topBar More... | |
TtGenEvent () | |
empty constructor More... | |
TtGenEvent (reco::GenParticleRefProd &decaySubset, reco::GenParticleRefProd &initSubset) | |
default constructor from decaySubset and initSubset More... | |
~TtGenEvent () override | |
default destructor More... | |
Public Member Functions inherited from TopGenEvent | |
const reco::GenParticle * | b () const |
return b quark if available; 0 else More... | |
const reco::GenParticle * | bBar () const |
return anti-b quark if available; 0 else More... | |
const reco::GenParticle * | candidate (int id, unsigned int parentId=0) const |
get candidate with given pdg id if available; 0 else More... | |
const reco::GenParticle * | daughterQuarkBarOfWMinus () const |
return anti-quark daughter of anti-W boson More... | |
const reco::GenParticle * | daughterQuarkBarOfWPlus () const |
return anti-quark daughter of W boson More... | |
const reco::GenParticle * | daughterQuarkOfTop (bool invertCharge=false) const |
return daughter quark of top quark (which can have flavor b, s or d) More... | |
const reco::GenParticle * | daughterQuarkOfTopBar () const |
return daughter quark of anti-top quark (which can have flavor b, s or d) More... | |
const reco::GenParticle * | daughterQuarkOfWMinus () const |
return quark daughter of anti-W boson More... | |
const reco::GenParticle * | daughterQuarkOfWPlus (bool invertQuarkCharge=false, bool invertBosonCharge=false) const |
return quark daughter quark of W boson More... | |
const reco::GenParticle * | eMinus () const |
return electron if available; 0 else More... | |
const reco::GenParticle * | ePlus () const |
return positron if available; 0 else More... | |
const reco::GenParticleCollection & | initialPartons () const |
return particles of initial partons More... | |
std::vector< const reco::GenParticle * > | lightQuarks (bool includingBQuarks=false) const |
return all light quarks or all quarks including b's More... | |
const reco::GenParticle * | muMinus () const |
return muon if available; 0 else More... | |
const reco::GenParticle * | muPlus () const |
return anti-muon if available; 0 else More... | |
int | numberOfBQuarks (bool fromTopQuark=true) const |
return number of b quarks in the decay chain More... | |
int | numberOfLeptons (bool fromWBoson=true) const |
return number of leptons in the decay chain More... | |
int | numberOfLeptons (WDecay::LeptonType type, bool fromWBoson=true) const |
return number of leptons in the decay chain More... | |
const reco::GenParticleCollection & | particles () const |
return particles of decay chain More... | |
void | print () const |
std::vector< const reco::GenParticle * > | radiatedGluons (int pdgId) const |
return radiated gluons from particle with pdgId More... | |
const reco::GenParticle * | tauMinus () const |
return tau if available; 0 else More... | |
const reco::GenParticle * | tauPlus () const |
return anti-tau if available; 0 else More... | |
const reco::GenParticle * | top () const |
return top if available; 0 else More... | |
const reco::GenParticle * | topBar () const |
return anti-top if available; 0 else More... | |
TopGenEvent () | |
empty constructor More... | |
TopGenEvent (reco::GenParticleRefProd &decaySubset, reco::GenParticleRefProd &iniSubset) | |
default constructor More... | |
std::vector< const reco::GenParticle * > | topSisters () const |
return number of top anti-top sisters More... | |
const reco::GenParticle * | wMinus () const |
return W minus if available; 0 else More... | |
const reco::GenParticle * | wPlus () const |
return W plus if available; 0 else More... | |
virtual | ~TopGenEvent () |
default destructor More... | |
Protected Attributes | |
math::XYZTLorentzVector | topPair_ |
combined 4-vector of top and topBar More... | |
Protected Attributes inherited from TopGenEvent | |
reco::GenParticleRefProd | initPartons_ |
reference to the list of initial partons (has to be kept in the event!) More... | |
reco::GenParticleRefProd | parts_ |
reference to the top decay chain (has to be kept in the event!) More... | |
Private Member Functions | |
bool | isNumberOfLeptons (bool excludeTauLeptons, int nlep) const |
Class derived from the TopGenEvent for ttbar events.
The structure holds reference information to the generator particles of the decay chains for each top quark and of the initial partons and provides access and administration. The derived class contains a few additional getters with respect to its base class.
Definition at line 18 of file TtGenEvent.h.
|
inline |
empty constructor
Definition at line 23 of file TtGenEvent.h.
References TopDecaySubset_cfi::decaySubset, and TopInitSubset_cfi::initSubset.
TtGenEvent::TtGenEvent | ( | reco::GenParticleRefProd & | decaySubset, |
reco::GenParticleRefProd & | initSubset | ||
) |
default constructor from decaySubset and initSubset
Definition at line 10 of file TtGenEvent.cc.
References TopDecaySubset_cfi::decaySubset, TopGenEvent::initPartons_, TopInitSubset_cfi::initSubset, p4, TopGenEvent::parts_, TopGenEvent::top(), TopGenEvent::topBar(), and topPair_.
|
inlineoverride |
bool TtGenEvent::fromGluonFusion | ( | ) | const |
check if the tops were produced from a pair of gluons
Definition at line 19 of file TtGenEvent.cc.
References TopGenEvent::initPartons_, and common_cff::pdgId.
Referenced by TopGenEventAnalyzer::analyze(), and isTtBar().
bool TtGenEvent::fromQuarkAnnihilation | ( | ) | const |
check if the tops were produced from qqbar
Definition at line 29 of file TtGenEvent.cc.
References funct::abs(), TopGenEvent::initPartons_, common_cff::pdgId, and TopDecayID::tID.
Referenced by TopGenEventAnalyzer::analyze(), and isTtBar().
std::pair< WDecay::LeptonType, WDecay::LeptonType > TtGenEvent::fullLeptonicChannel | ( | ) | const |
Definition at line 51 of file TtGenEvent.cc.
References funct::abs(), TopDecayID::elecID, isFullLeptonic(), WDecay::kElec, WDecay::kMuon, WDecay::kNone, WDecay::kTau, lepton(), leptonBar(), TopDecayID::muonID, common_cff::pdgId, and TopDecayID::tauID.
Referenced by isFullLeptonic(), and isSemiLeptonic().
const reco::GenParticle * TtGenEvent::hadronicDecayB | ( | bool | excludeTauLeptons = false | ) | const |
get b of hadronic decay branch
Definition at line 196 of file TtGenEvent.cc.
References funct::abs(), TopDecayID::bID, reco::flavour(), mps_fire::i, TopGenEvent::parts_, common_cff::pdgId, and singleLepton().
Referenced by TtSemiEvtSolution::getGenHadb(), isSemiLeptonic(), TtSemiEvtSolutionMaker::produce(), and TtSemiLepEvtPartons::vec().
const reco::GenParticle * TtGenEvent::hadronicDecayQuark | ( | bool | invertFlavor = false | ) | const |
get light quark of hadronic decay branch
Definition at line 166 of file TtGenEvent.cc.
References funct::abs(), Exception, reco::flavour(), edm::errors::InvalidReference, TopGenEvent::parts_, singleLepton(), TopDecayID::tID, w, and TopDecayID::WID.
Referenced by TtSemiLepHypGenMatch::buildHypo(), TtSemiEvtSolution::getGenHadp(), hadronicDecayQuarkBar(), isSemiLeptonic(), TtSemiEvtSolutionMaker::produce(), and TtSemiLepEvtPartons::vec().
|
inline |
get light anti-quark of hadronic decay branch
Definition at line 72 of file TtGenEvent.h.
References hadronicDecayQuark(), hadronicDecayTopRadiation(), lepton(), leptonBar(), leptonicDecayTopRadiation(), neutrino(), and neutrinoBar().
Referenced by TtSemiLepHypGenMatch::buildHypo(), TtSemiEvtSolution::getGenHadq(), TtSemiEvtSolutionMaker::produce(), and TtSemiLepEvtPartons::vec().
const reco::GenParticle * TtGenEvent::hadronicDecayTop | ( | bool | excludeTauLeptons = false | ) | const |
get top of hadronic decay branch
Definition at line 231 of file TtGenEvent.cc.
References funct::abs(), reco::flavour(), mps_fire::i, TopGenEvent::parts_, common_cff::pdgId, singleLepton(), and TopDecayID::tID.
Referenced by TtSemiEvtSolution::getGenHadt(), hadronicDecayTopRadiation(), and isSemiLeptonic().
std::vector< const reco::GenParticle * > TtGenEvent::hadronicDecayTopRadiation | ( | bool | excludeTauLeptons = false | ) | const |
gluons as radiated from the hadronicly decaying top quark
Definition at line 307 of file TtGenEvent.cc.
References hadronicDecayTop(), common_cff::pdgId, TopGenEvent::radiatedGluons(), and TopDecayID::tID.
Referenced by hadronicDecayQuarkBar().
const reco::GenParticle * TtGenEvent::hadronicDecayW | ( | bool | excludeTauLeptons = false | ) | const |
get W of hadronic decay branch
Definition at line 213 of file TtGenEvent.cc.
References funct::abs(), reco::flavour(), mps_fire::i, TopGenEvent::parts_, common_cff::pdgId, singleLepton(), and TopDecayID::WID.
Referenced by TtSemiEvtSolution::getGenHadW(), and isSemiLeptonic().
|
inline |
check if the event can be classified as full hadronic
Definition at line 36 of file TtGenEvent.h.
References isNumberOfLeptons(), and isTtBar().
Referenced by TtFullHadSignalSelMVATrainer::analyze(), TtHadEvtSolution::setGenEvt(), and TtFullHadEvtPartons::vec().
|
inline |
check if the event can be classified as full leptonic
Definition at line 40 of file TtGenEvent.h.
References isNumberOfLeptons(), isTtBar(), and semiLeptonicChannel().
Referenced by TtFullLepHypGenMatch::buildHypo(), TtFullLepHypGenMatch::buildMatchingNeutrinos(), fullLeptonicChannel(), isSemiLeptonic(), TtDilepLRSignalSelObservables::operator()(), TtDilepEvtSolution::setGenEvt(), and TtFullLepEvtPartons::vec().
|
inline |
check if the event is full leptonic with the lepton being of typeA or typeB irrelevant of order; all leptons including taus are allowed
Definition at line 102 of file TtGenEvent.h.
References plotBeamSpotDB::first, fullLeptonicChannel(), and edm::second().
|
inlineprivate |
check whether the number of leptons among the daughters of the W boson is nlep or not; there is an option to exclude taus from the list of leptons to consider
Definition at line 98 of file TtGenEvent.h.
References WDecay::kTau, and TopGenEvent::numberOfLeptons().
Referenced by isFullHadronic(), isFullLeptonic(), and isSemiLeptonic().
|
inline |
check if the event can be classified as semi-laptonic
Definition at line 38 of file TtGenEvent.h.
References isNumberOfLeptons(), and isTtBar().
Referenced by TtSemiLepSignalSelMVATrainer::analyze(), ResolutionCreator::analyze(), TtSemiLepHypGenMatch::findMatchingLepton(), TtDilepLRSignalSelObservables::operator()(), TtSemiLRJetCombObservables::operator()(), semiLeptonicChannel(), TtSemiEvtSolution::setGenEvt(), singleLepton(), singleNeutrino(), and TtSemiLepEvtPartons::vec().
|
inline |
check if the event is semi-leptonic with the lepton being of typeA; all leptons including taus are allowed
Definition at line 45 of file TtGenEvent.h.
References semiLeptonicChannel().
|
inline |
check if the event is semi-leptonic with the lepton being of typeA or typeB; all leptons including taus are allowed
Definition at line 47 of file TtGenEvent.h.
References fullLeptonicChannel(), hadronicDecayB(), hadronicDecayQuark(), hadronicDecayTop(), hadronicDecayW(), isFullLeptonic(), leptonicDecayB(), leptonicDecayTop(), leptonicDecayW(), semiLeptonicChannel(), singleLepton(), and singleNeutrino().
|
inline |
check if the event can be classified as ttbar
Definition at line 30 of file TtGenEvent.h.
References fromGluonFusion(), fromQuarkAnnihilation(), TopGenEvent::top(), and TopGenEvent::topBar().
Referenced by TopGenEventAnalyzer::analyze(), TtFullHadSignalSelMVATrainer::analyze(), TtFullLepHypGenMatch::buildMatchingNeutrinos(), TtSemiLepHypGenMatch::findMatchingLepton(), isFullHadronic(), isFullLeptonic(), isSemiLeptonic(), and TtDilepLRSignalSelObservables::operator()().
const reco::GenParticle * TtGenEvent::lepton | ( | bool | excludeTauLeptons = false | ) | const |
get lepton for semi-leptonic or full leptonic decays
Definition at line 70 of file TtGenEvent.cc.
References funct::abs(), reco::flavour(), mps_fire::i, reco::isLepton(), TopGenEvent::parts_, common_cff::pdgId, and TopDecayID::WID.
Referenced by TtFullLepHypGenMatch::buildHypo(), fullLeptonicChannel(), TtDilepEvtSolution::getGenLepm(), and hadronicDecayQuarkBar().
const reco::GenParticle * TtGenEvent::leptonBar | ( | bool | excludeTauLeptons = false | ) | const |
get anti-lepton for semi-leptonic or full leptonic decays
Definition at line 86 of file TtGenEvent.cc.
References funct::abs(), reco::flavour(), mps_fire::i, reco::isLepton(), TopGenEvent::parts_, common_cff::pdgId, and TopDecayID::WID.
Referenced by TtFullLepHypGenMatch::buildHypo(), fullLeptonicChannel(), TtDilepEvtSolution::getGenLepp(), and hadronicDecayQuarkBar().
const reco::GenParticle * TtGenEvent::leptonicDecayB | ( | bool | excludeTauLeptons = false | ) | const |
get b of leptonic decay branch
Definition at line 248 of file TtGenEvent.cc.
References funct::abs(), TopDecayID::bID, reco::flavour(), mps_fire::i, TopGenEvent::parts_, common_cff::pdgId, and singleLepton().
Referenced by TtSemiEvtSolution::getGenLepb(), isSemiLeptonic(), TtSemiEvtSolutionMaker::produce(), and TtSemiLepEvtPartons::vec().
const reco::GenParticle * TtGenEvent::leptonicDecayTop | ( | bool | excludeTauLeptons = false | ) | const |
get top of leptonic decay branch
Definition at line 283 of file TtGenEvent.cc.
References funct::abs(), reco::flavour(), mps_fire::i, TopGenEvent::parts_, common_cff::pdgId, singleLepton(), and TopDecayID::tID.
Referenced by TtSemiEvtSolution::getGenLept(), isSemiLeptonic(), and leptonicDecayTopRadiation().
std::vector< const reco::GenParticle * > TtGenEvent::leptonicDecayTopRadiation | ( | bool | excludeTauLeptons = false | ) | const |
gluons as radiated from the leptonicly decaying top quark
Definition at line 299 of file TtGenEvent.cc.
References leptonicDecayTop(), common_cff::pdgId, TopGenEvent::radiatedGluons(), and TopDecayID::tID.
Referenced by hadronicDecayQuarkBar().
const reco::GenParticle * TtGenEvent::leptonicDecayW | ( | bool | excludeTauLeptons = false | ) | const |
get W of leptonic decay branch
Definition at line 265 of file TtGenEvent.cc.
References funct::abs(), reco::flavour(), mps_fire::i, TopGenEvent::parts_, common_cff::pdgId, singleLepton(), and TopDecayID::WID.
Referenced by TtSemiEvtSolution::getGenLepW(), and isSemiLeptonic().
const reco::GenParticle * TtGenEvent::neutrino | ( | bool | excludeTauLeptons = false | ) | const |
get neutrino for semi-leptonic or full leptonic decays
Definition at line 118 of file TtGenEvent.cc.
References funct::abs(), reco::flavour(), mps_fire::i, reco::isNeutrino(), TopGenEvent::parts_, common_cff::pdgId, and TopDecayID::WID.
Referenced by TtFullLepHypGenMatch::buildMatchingNeutrinos(), TtDilepEvtSolution::getGenN(), and hadronicDecayQuarkBar().
const reco::GenParticle * TtGenEvent::neutrinoBar | ( | bool | excludeTauLeptons = false | ) | const |
get anti-neutrino for semi-leptonic or full leptonic decays
Definition at line 134 of file TtGenEvent.cc.
References funct::abs(), reco::flavour(), mps_fire::i, reco::isNeutrino(), TopGenEvent::parts_, common_cff::pdgId, and TopDecayID::WID.
Referenced by TtFullLepHypGenMatch::buildMatchingNeutrinos(), TtDilepEvtSolution::getGenNbar(), and hadronicDecayQuarkBar().
WDecay::LeptonType TtGenEvent::semiLeptonicChannel | ( | ) | const |
return decay channel; all leptons including taus are allowed
Definition at line 39 of file TtGenEvent.cc.
References funct::abs(), TopDecayID::elecID, isSemiLeptonic(), WDecay::kElec, WDecay::kMuon, WDecay::kNone, WDecay::kTau, TopDecayID::muonID, common_cff::pdgId, singleLepton(), and TopDecayID::tauID.
Referenced by TtSemiLepJetCombMVATrainer::analyze(), TtSemiLepSignalSelMVATrainer::analyze(), isFullLeptonic(), and isSemiLeptonic().
const reco::GenParticle * TtGenEvent::singleLepton | ( | bool | excludeTauLeptons = false | ) | const |
return single lepton if available; 0 else
Definition at line 102 of file TtGenEvent.cc.
References funct::abs(), mps_fire::i, reco::isLepton(), isSemiLeptonic(), TopGenEvent::parts_, common_cff::pdgId, and TopDecayID::WID.
Referenced by TtSemiLepHypGenMatch::findMatchingLepton(), TtSemiEvtSolution::getGenLepl(), hadronicDecayB(), hadronicDecayQuark(), hadronicDecayTop(), hadronicDecayW(), isSemiLeptonic(), leptonicDecayB(), leptonicDecayTop(), leptonicDecayW(), TtDilepLRSignalSelObservables::operator()(), and semiLeptonicChannel().
const reco::GenParticle * TtGenEvent::singleNeutrino | ( | bool | excludeTauLeptons = false | ) | const |
return single neutrino if available; 0 else
Definition at line 150 of file TtGenEvent.cc.
References funct::abs(), mps_fire::i, reco::isNeutrino(), isSemiLeptonic(), TopGenEvent::parts_, common_cff::pdgId, and TopDecayID::WID.
Referenced by ResolutionCreator::analyze(), TtSemiEvtSolution::getGenLepn(), and isSemiLeptonic().
|
inline |
return combined 4-vector of top and topBar
Definition at line 87 of file TtGenEvent.h.
Referenced by TopGenEventAnalyzer::analyze().
|
protected |
combined 4-vector of top and topBar
Definition at line 87 of file TtGenEvent.h.
Referenced by TtGenEvent().