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 () | |
ModuleDescription const & | moduleDescription () const |
virtual | ~EDProducer () |
Public Member Functions inherited from edm::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
std::vector < edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
void | resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel) |
virtual | ~ProducerBase () noexcept(false) |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
EDConsumerBase () | |
EDConsumerBase (EDConsumerBase const &)=delete | |
EDConsumerBase (EDConsumerBase &&)=default | |
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
std::vector < ProductResolverIndexAndSkipBit > const & | itemsToGetFromEvent () const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
virtual | ~EDConsumerBase () noexcept(false) |
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... | |
MCTruthHelper< HepMC::GenParticle > | mcTruthHelper_ |
MCTruthHelper< reco::GenParticle > | mcTruthHelperGenParts_ |
edm::EDGetTokenT < CrossingFrame < edm::HepMCProduct > > | mixToken_ |
bool | saveBarCodes_ |
save bar-codes More... | |
edm::EDGetTokenT < edm::HepMCProduct > | srcToken_ |
source collection name More... | |
bool | useCF_ |
std::vector< edm::EDGetTokenT < edm::HepMCProduct > > | vectorSrcTokens_ |
Additional Inherited Members | |
Public Types inherited from edm::EDProducer | |
typedef EDProducer | ModuleType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
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::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 26 of file GenParticleProducer.cc.
GenParticleProducer::GenParticleProducer | ( | const edm::ParameterSet & | cfg | ) |
constructor
Definition at line 91 of file GenParticleProducer.cc.
References HLT_FULL_cff::alias, edm::ParameterSet::getParameter(), HLT_FULL_cff::InputTag, mixToken_, saveBarCodes_, srcToken_, AlCaHLTBitMon_QueryRunRegistry::string, and useCF_.
GenParticleProducer::~GenParticleProducer | ( | ) |
int GenParticleProducer::chargeTimesThree | ( | int | id | ) | const |
Definition at line 114 of file GenParticleProducer.cc.
References abortOnUnknownPDGCode_, funct::abs(), chargeM_, chargeMap_, chargeP_, Exception, f, edm::errors::LogicError, and PDGCacheMax.
Referenced by convertParticle().
bool GenParticleProducer::convertParticle | ( | reco::GenParticle & | cand, |
const HepMC::GenParticle * | part | ||
) |
Definition at line 280 of file GenParticleProducer.cc.
References chargeTimesThree(), MCTruthHelper< P >::fillGenStatusFlags(), mcTruthHelper_, mmToCm, p4, benchmark_cfg::pdgId, reco::GenParticle::setCollisionId(), reco::LeafCandidate::setP4(), reco::LeafCandidate::setPdgId(), reco::LeafCandidate::setStatus(), reco::LeafCandidate::setThreeCharge(), reco::LeafCandidate::setVertex(), reco::GenParticle::statusFlags(), and findQualityFiles::v.
Referenced by produce().
bool GenParticleProducer::fillDaughters | ( | reco::GenParticleCollection & | cand, |
const HepMC::GenParticle * | part, | ||
size_t | index | ||
) |
Definition at line 300 of file GenParticleProducer.cc.
References barcodes_, GenParticle::GenParticle, cmsHarvester::index, visualization-live-secondInstance_cfg::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 317 of file GenParticleProducer.cc.
References barcodes_, begin, end, GenParticle::GenParticle, hltrates_dqm_sourceclient-live_cfg::offset, and AlCaHLTBitMon_ParallelJobs::p.
Referenced by produce().
|
overridevirtual |
process one event
fill indices
Implements edm::EDProducer.
Definition at line 128 of file GenParticleProducer.cc.
References funct::abs(), barcodes_, chargeM_, chargeMap_, chargeP_, convertParticle(), ztail::d, doSubEvent_, Exception, f, fillDaughters(), fillIndices(), firstEvent_, GenParticle::GenParticle, edm::Event::getByToken(), edm::EventSetup::getData(), edm::HepMCProduct::GetEvent(), MixCollection< T >::getObject(), edm::Event::getRefBeforePut(), i, edm::RefProd< T >::id(), edm::errors::InvalidReference, LogDebug, mixToken_, mmToCm, mmToNs, eostools::move(), hltrates_dqm_sourceclient-live_cfg::offset, AlCaHLTBitMon_ParallelJobs::p, PDGCacheMax, benchmark_cfg::pdgId, position, edm::Handle< T >::product(), edm::Event::put(), ref_, reco::CompositeRefCandidateT< D >::resetDaughters(), saveBarCodes_, MixCollection< T >::size(), findQualityFiles::size, srcToken_, and useCF_.
|
private |
unknown code treatment flag
Definition at line 51 of file GenParticleProducer.cc.
Referenced by chargeTimesThree().
std::map<int, size_t> GenParticleProducer::barcodes_ |
Definition at line 39 of file GenParticleProducer.cc.
Referenced by fillDaughters(), fillIndices(), and produce().
|
private |
Definition at line 55 of file GenParticleProducer.cc.
Referenced by chargeTimesThree(), and produce().
|
private |
Definition at line 56 of file GenParticleProducer.cc.
Referenced by chargeTimesThree(), and produce().
|
private |
charge indices
Definition at line 55 of file GenParticleProducer.cc.
Referenced by chargeTimesThree(), and produce().
|
private |
|
private |
whether the first event was looked at
Definition at line 49 of file GenParticleProducer.cc.
Referenced by produce().
|
private |
Definition at line 62 of file GenParticleProducer.cc.
Referenced by convertParticle().
|
private |
Definition at line 63 of file GenParticleProducer.cc.
|
private |
Definition at line 46 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
reco::GenParticleRefProd GenParticleProducer::ref_ |
Definition at line 40 of file GenParticleProducer.cc.
Referenced by fillDaughters(), and produce().
|
private |
save bar-codes
Definition at line 53 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
source collection name
Definition at line 44 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
Definition at line 60 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
Definition at line 45 of file GenParticleProducer.cc.