Module to produce the subset of generator particles directly contained in top decay chains. More...
#include "TopQuarkAnalysis/TopEventProducers/interface/TopDecaySubset.h"
Public Types | |
enum | FillMode { kStable, kME } |
enum | ShowerModel { kStart =-1, kNone, kPythia, kHerwig } |
classification of potential shower types More... | |
Public Types inherited from edm::EDProducer | |
typedef EDProducer | ModuleType |
typedef WorkerT< EDProducer > | WorkerType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Member Functions | |
virtual void | produce (edm::Event &event, const edm::EventSetup &setup) |
write output into the event More... | |
TopDecaySubset (const edm::ParameterSet &cfg) | |
default constructor More... | |
~TopDecaySubset () | |
default destructor More... | |
Public Member Functions inherited from edm::EDProducer | |
EDProducer () | |
virtual | ~EDProducer () |
Public Member Functions inherited from edm::ProducerBase | |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
boost::function< void(const BranchDescription &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
virtual | ~ProducerBase () |
Private Member Functions | |
void | addDaughters (int &idx, const reco::GenParticle::const_iterator part, reco::GenParticleCollection &target, bool recursive=true) |
recursively fill vector for all further decay particles of a given particle More... | |
void | addRadiation (int &idx, const reco::GenParticle::const_iterator part, reco::GenParticleCollection &target) |
fill vector including all radiations from quarks originating from W/top More... | |
ShowerModel | checkShowerModel (const std::vector< const reco::GenParticle * > &tops) const |
check the decay chain for the used shower model More... | |
void | checkWBosons (std::vector< const reco::GenParticle * > &tops) const |
check whether W bosons are contained in the original gen particle listing More... | |
void | clearReferences () |
clear references More... | |
void | fillListing (const std::vector< const reco::GenParticle * > &tops, reco::GenParticleCollection &target) |
fill output vector for full decay chain More... | |
void | fillReferences (const reco::GenParticleRefProd &refProd, reco::GenParticleCollection &target) |
fill references for output vector More... | |
std::vector< const reco::GenParticle * > | findTops (const reco::GenParticleCollection &parts) |
find top quarks in list of input particles More... | |
reco::Particle::LorentzVector | p4 (const std::vector< const reco::GenParticle * >::const_iterator top, int statusFlag) |
calculate lorentz vector from input (dedicated to top reconstruction) More... | |
reco::Particle::LorentzVector | p4 (const reco::GenParticle::const_iterator part, int statusFlag) |
calculate lorentz vector from input More... | |
Private Attributes | |
bool | addRadiation_ |
add radiation or not? More... | |
FillMode | fillMode_ |
int | motherPartIdx_ |
std::map< int, std::vector< int > > | refs_ |
management of daughter indices for fillRefs More... | |
ShowerModel | showerModel_ |
parton shower mode (filled in checkShowerModel) More... | |
edm::InputTag | src_ |
input tag for the genParticle source More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from edm::EDProducer | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
Protected Member Functions inherited from edm::EDProducer | |
CurrentProcessingContext const * | currentContext () const |
Protected Member Functions inherited from edm::ProducerBase | |
template<class TProducer , class TMethod > | |
void | callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod) |
Module to produce the subset of generator particles directly contained in top decay chains.
The module produces the subset of generator particles directly contained in top decay chains. The particles are saved as a collection of reco::GenParticles. Depending on the configuration of the module, the 4-vector kinematics can be taken from the status-3 particles (ME before parton showering) or from the status-2 particles (after parton showering), additionally radiated gluons may be considered during the creation of the subset or not.
Definition at line 27 of file TopDecaySubset.h.
supported modes to fill the new vectors of gen particles
Enumerator | |
---|---|
kStable | |
kME |
Definition at line 32 of file TopDecaySubset.h.
classification of potential shower types
Enumerator | |
---|---|
kStart | |
kNone | |
kPythia | |
kHerwig |
Definition at line 34 of file TopDecaySubset.h.
|
explicit |
default constructor
Definition at line 8 of file TopDecaySubset.cc.
References edm::hlt::Exception, fillMode_, edm::ParameterSet::getParameter(), kME, kStable, and alignBH_cfg::mode.
TopDecaySubset::~TopDecaySubset | ( | ) |
|
private |
recursively fill vector for all further decay particles of a given particle
Definition at line 375 of file TopDecaySubset.cc.
References reco::Candidate::begin(), reco::Candidate::end(), and refs_.
Referenced by fillListing().
|
private |
fill vector including all radiations from quarks originating from W/top
Definition at line 354 of file TopDecaySubset.cc.
References reco::Candidate::begin(), reco::Candidate::end(), reco::Candidate::pdgId(), refs_, and TopDecayID::stable.
Referenced by fillListing().
|
private |
check the decay chain for the used shower model
check the decay chain for the exploited shower model
Definition at line 84 of file TopDecaySubset.cc.
References abs, reco::CompositeRefCandidateT< D >::begin(), reco::CompositeRefCandidateT< D >::end(), edm::hlt::Exception, kHerwig, kNone, kPythia, edm::errors::LogicError, reco::CompositeRefCandidateT< D >::numberOfDaughters(), reco::Candidate::numberOfDaughters(), reco::Candidate::pdgId(), reco::LeafCandidate::pdgId(), TopDecayID::stable, reco::Candidate::status(), TopDecayID::tID, and TopDecayID::WID.
Referenced by produce().
|
private |
check whether W bosons are contained in the original gen particle listing
check whether the W boson is contained in the original gen particle listing
Definition at line 124 of file TopDecaySubset.cc.
References abs, reco::CompositeRefCandidateT< D >::begin(), reco::Candidate::begin(), reco::CompositeRefCandidateT< D >::end(), reco::Candidate::end(), lhef::isContained(), kPythia, edm::errors::LogicError, showerModel_, TopDecayID::stable, TopDecayID::unfrag, and TopDecayID::WID.
Referenced by produce().
|
private |
clear references
Definition at line 396 of file TopDecaySubset.cc.
References motherPartIdx_, and refs_.
Referenced by produce().
|
private |
fill output vector for full decay chain
Definition at line 168 of file TopDecaySubset.cc.
References abs, addDaughters(), addRadiation(), addRadiation_, reco::CompositeRefCandidateT< D >::begin(), reco::Candidate::begin(), TopDecayID::bID, reco::CompositeRefCandidateT< D >::end(), reco::Candidate::end(), funct::false, fillMode_, configurableAnalysis::GenParticle, TopDecayID::glueID, kME, kPythia, edm::errors::LogicError, reco::CompositeRefCandidateT< D >::mother(), motherPartIdx_, reco::CompositeRefCandidateT< D >::numberOfMothers(), p4(), reco::Candidate::p4(), reco::Candidate::pdgId(), reco::LeafCandidate::pdgId(), refs_, showerModel_, TopDecayID::stable, reco::Candidate::status(), lumiQTWidget::t, filterCSVwithJSON::target, TopDecayID::tauID, reco::Candidate::threeCharge(), reco::LeafCandidate::threeCharge(), TopDecayID::tID, funct::true, TopDecayID::unfrag, reco::Candidate::vertex(), reco::LeafCandidate::vertex(), and TopDecayID::WID.
Referenced by produce().
|
private |
fill references for output vector
Definition at line 407 of file TopDecaySubset.cc.
References reco::CompositeRefCandidateT< D >::addDaughter(), edm::hlt::Exception, edm::errors::InvalidReference, AlCaHLTBitMon_ParallelJobs::p, and refs_.
Referenced by produce().
|
private |
find top quarks in list of input particles
Definition at line 72 of file TopDecaySubset.cc.
References abs, lumiQTWidget::t, TopDecayID::tID, and TopDecayID::unfrag.
Referenced by produce().
|
private |
calculate lorentz vector from input (dedicated to top reconstruction)
calculate lorentz vector from input
Definition at line 280 of file TopDecaySubset.cc.
References abs, AlCaHLTBitMon_ParallelJobs::p, TopDecayID::unfrag, and TopDecayID::WID.
Referenced by fillListing(), and p4().
|
private |
calculate lorentz vector from input
calculate lorentz vector from input (dedicated to top reconstruction)
Definition at line 321 of file TopDecaySubset.cc.
References abs, reco::Candidate::begin(), reco::Candidate::end(), AlCaHLTBitMon_ParallelJobs::p, p4(), reco::Candidate::p4(), TopDecayID::stable, TopDecayID::unfrag, and TopDecayID::WID.
|
virtual |
write output into the event
Implements edm::EDProducer.
Definition at line 36 of file TopDecaySubset.cc.
References checkShowerModel(), checkWBosons(), clearReferences(), fillListing(), fillReferences(), findTops(), kNone, kStart, showerModel_, alcazmumu_cfi::src, src_, and filterCSVwithJSON::target.
|
private |
|
private |
print the whole list of input particles or not? mode of decaySubset creation
Definition at line 73 of file TopDecaySubset.h.
Referenced by fillListing(), and TopDecaySubset().
|
private |
index in new evt listing of parts with daughters; has to be set to -1 in produce to deliver consistent results!
Definition at line 80 of file TopDecaySubset.h.
Referenced by clearReferences(), and fillListing().
|
private |
management of daughter indices for fillRefs
Definition at line 82 of file TopDecaySubset.h.
Referenced by addDaughters(), addRadiation(), clearReferences(), fillListing(), and fillReferences().
|
private |
parton shower mode (filled in checkShowerModel)
Definition at line 75 of file TopDecaySubset.h.
Referenced by checkWBosons(), fillListing(), and produce().
|
private |
input tag for the genParticle source
Definition at line 68 of file TopDecaySubset.h.
Referenced by produce().