Public Member Functions | |
int | chargeTimesThree (int) const |
bool | convertParticle (reco::GenParticle &cand, const HepMC::GenParticle *part) |
bool | fillDaughters (reco::GenParticleCollection &cand, const HepMC::GenParticle *part, size_t index) |
bool | fillIndices (const HepMC::GenEvent *mc, std::vector< const HepMC::GenParticle * > &particles, std::vector< int > &barCodeVector, int offset) |
GenParticleProducer (const edm::ParameterSet &) | |
constructor More... | |
virtual void | produce (edm::Event &e, const edm::EventSetup &) override |
process one event More... | |
~GenParticleProducer () | |
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 &) |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
virtual | ~ProducerBase () |
Public Member Functions inherited from edm::EDConsumerBase | |
EDConsumerBase () | |
ProductHolderIndex | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const |
void | itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
virtual | ~EDConsumerBase () |
Public Attributes | |
std::map< int, size_t > | barcodes_ |
reco::GenParticleRefProd | ref_ |
Private Attributes | |
bool | abortOnUnknownPDGCode_ |
unknown code treatment flag More... | |
std::vector< int > | chargeM_ |
std::map< int, int > | chargeMap_ |
std::vector< int > | chargeP_ |
charge indices More... | |
bool | doSubEvent_ |
input & output modes More... | |
bool | firstEvent_ |
whether the first event was looked at More... | |
std::string | mixLabel_ |
bool | saveBarCodes_ |
save bar-codes More... | |
edm::InputTag | src_ |
source collection name More... | |
bool | useCF_ |
std::vector< std::string > | vectorSrc_ |
Additional Inherited Members | |
Public Types inherited from edm::EDProducer | |
typedef EDProducer | ModuleType |
typedef WorkerT< EDProducer > | WorkerType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
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 | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
ConsumesCollector | consumesCollector () |
Use a ConsumesCollector to gather consumes information from helper functions. More... | |
template<typename ProductType , BranchType B = InEvent> | |
void | consumesMany () |
void | consumesMany (const TypeToGet &id) |
template<BranchType B> | |
void | consumesMany (const TypeToGet &id) |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
Definition at line 25 of file GenParticleProducer.cc.
GenParticleProducer::GenParticleProducer | ( | const edm::ParameterSet & | cfg | ) |
constructor
Definition at line 86 of file GenParticleProducer.cc.
References doSubEvent_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), mixLabel_, saveBarCodes_, src_, AlCaHLTBitMon_QueryRunRegistry::string, useCF_, and vectorSrc_.
GenParticleProducer::~GenParticleProducer | ( | ) |
int GenParticleProducer::chargeTimesThree | ( | int | id | ) | const |
Definition at line 112 of file GenParticleProducer.cc.
References abortOnUnknownPDGCode_, abs, chargeM_, chargeMap_, chargeP_, edm::hlt::Exception, f, edm::errors::LogicError, RecoTau_DiTaus_pt_20-420_cfg::ParticleID, and PDGCacheMax.
Referenced by convertParticle().
bool GenParticleProducer::convertParticle | ( | reco::GenParticle & | cand, |
const HepMC::GenParticle * | part | ||
) |
Definition at line 277 of file GenParticleProducer.cc.
References chargeTimesThree(), mmToCm, p4, benchmark_cfg::pdgId, reco::GenParticle::setCollisionId(), reco::LeafCandidate::setP4(), reco::LeafCandidate::setPdgId(), reco::LeafCandidate::setStatus(), reco::LeafCandidate::setThreeCharge(), reco::LeafCandidate::setVertex(), and findQualityFiles::v.
Referenced by produce().
bool GenParticleProducer::fillDaughters | ( | reco::GenParticleCollection & | cand, |
const HepMC::GenParticle * | part, | ||
size_t | index | ||
) |
Definition at line 296 of file GenParticleProducer.cc.
References barcodes_, configurableAnalysis::GenParticle, getHLTprescales::index, m, ref_, and edm::second().
Referenced by produce().
bool GenParticleProducer::fillIndices | ( | const HepMC::GenEvent * | mc, |
std::vector< const HepMC::GenParticle * > & | particles, | ||
std::vector< int > & | barCodeVector, | ||
int | offset | ||
) |
Definition at line 313 of file GenParticleProducer.cc.
References barcodes_, begin, end, configurableAnalysis::GenParticle, customizeTrackingMonitorSeedNumber::idx, evf::evtn::offset(), and AlCaHLTBitMon_ParallelJobs::p.
Referenced by produce().
|
overridevirtual |
process one event
fill indices
Implements edm::EDProducer.
Definition at line 126 of file GenParticleProducer.cc.
References abs, barcodes_, chargeM_, chargeMap_, chargeP_, convertParticle(), doSubEvent_, edm::hlt::Exception, fillDaughters(), fillIndices(), firstEvent_, configurableAnalysis::GenParticle, edm::Event::getByLabel(), edm::EventSetup::getData(), edm::HepMCProduct::GetEvent(), MixCollection< T >::getObject(), edm::Event::getRefBeforePut(), patZpeak::handle, i, edm::RefProd< T >::id(), edm::errors::InvalidReference, LogDebug, mixLabel_, evf::evtn::offset(), AlCaHLTBitMon_ParallelJobs::p, RecoTau_DiTaus_pt_20-420_cfg::ParticleID, PDGCacheMax, benchmark_cfg::pdgId, edm::Handle< T >::product(), edm::Event::put(), ref_, reco::CompositeRefCandidateT< D >::resetDaughters(), saveBarCodes_, MixCollection< T >::size(), findQualityFiles::size, src_, useCF_, and vectorSrc_.
|
private |
unknown code treatment flag
Definition at line 50 of file GenParticleProducer.cc.
Referenced by chargeTimesThree().
std::map<int, size_t> GenParticleProducer::barcodes_ |
Definition at line 38 of file GenParticleProducer.cc.
Referenced by fillDaughters(), fillIndices(), and produce().
|
private |
Definition at line 54 of file GenParticleProducer.cc.
Referenced by chargeTimesThree(), and produce().
|
private |
Definition at line 55 of file GenParticleProducer.cc.
Referenced by chargeTimesThree(), and produce().
|
private |
charge indices
Definition at line 54 of file GenParticleProducer.cc.
Referenced by chargeTimesThree(), and produce().
|
private |
input & output modes
Definition at line 58 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
whether the first event was looked at
Definition at line 48 of file GenParticleProducer.cc.
Referenced by produce().
|
private |
Definition at line 45 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
reco::GenParticleRefProd GenParticleProducer::ref_ |
Definition at line 39 of file GenParticleProducer.cc.
Referenced by fillDaughters(), and produce().
|
private |
save bar-codes
Definition at line 52 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
source collection name
Definition at line 43 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
Definition at line 59 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
Definition at line 44 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().