Public Member Functions | |
bool | convertParticle (reco::GenParticle &cand, const HepMC::GenParticle *part, const IDto3Charge &id2Charge) const |
bool | fillDaughters (reco::GenParticleCollection &cand, const HepMC::GenParticle *part, reco::GenParticleRefProd const &ref, size_t index, std::unordered_map< int, size_t > &barcodes) const |
bool | fillIndices (const HepMC::GenEvent *mc, std::vector< const HepMC::GenParticle * > &particles, std::vector< int > &barCodeVector, int offset, std::unordered_map< int, size_t > &barcodes) const |
GenParticleProducer (const edm::ParameterSet &) | |
constructor More... | |
std::shared_ptr< IDto3Charge > | globalBeginRun (const edm::Run &, const edm::EventSetup &) const override |
void | globalEndRun (edm::Run const &, edm::EventSetup const &) const override |
void | produce (edm::StreamID, edm::Event &e, const edm::EventSetup &) const override |
process one event More... | |
~GenParticleProducer () override | |
destructor More... | |
Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< IDto3Charge > > | |
EDProducer ()=default | |
bool | wantsGlobalLuminosityBlocks () const final |
bool | wantsGlobalRuns () const final |
bool | wantsStreamLuminosityBlocks () const final |
bool | wantsStreamRuns () const final |
Public Member Functions inherited from edm::global::EDProducerBase | |
EDProducerBase () | |
ModuleDescription const & | moduleDescription () const |
~EDProducerBase () override | |
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 () | |
std::vector< edm::ProductResolverIndex > const & | putTokenIndexToProductResolverIndex () const |
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, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel) |
virtual | ~ProducerBase () noexcept(false) |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
void | convertCurrentProcessAlias (std::string const &processName) |
Convert "@currentProcess" in InputTag process names to the actual current process name. More... | |
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 & | itemsToGetFrom (BranchType iType) 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 |
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
virtual | ~EDConsumerBase () noexcept(false) |
Private Attributes | |
bool | abortOnUnknownPDGCode_ |
unknown code treatment flag More... | |
bool | doSubEvent_ |
input & output modes 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::global::EDProducerBase | |
typedef EDProducerBase | ModuleType |
Public Types inherited from edm::ProducerBase | |
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >> |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Static Public Member Functions inherited from edm::global::EDProducerBase | |
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 79 of file GenParticleProducer.cc.
GenParticleProducer::GenParticleProducer | ( | const edm::ParameterSet & | cfg | ) |
constructor
Definition at line 138 of file GenParticleProducer.cc.
References met_cff::alias, edm::ParameterSet::getParameter(), mixToken_, saveBarCodes_, srcToken_, AlCaHLTBitMon_QueryRunRegistry::string, and useCF_.
|
override |
bool GenParticleProducer::convertParticle | ( | reco::GenParticle & | cand, |
const HepMC::GenParticle * | part, | ||
const IDto3Charge & | id2Charge | ||
) | const |
Definition at line 297 of file GenParticleProducer.cc.
References MCTruthHelper< P >::fillGenStatusFlags(), mcTruthHelper_, mmToCm, p4, common_cff::pdgId, reco::GenParticle::setCollisionId(), reco::LeafCandidate::setP4(), reco::LeafCandidate::setPdgId(), reco::LeafCandidate::setStatus(), reco::LeafCandidate::setThreeCharge(), reco::LeafCandidate::setVertex(), reco::GenParticle::statusFlags(), findQualityFiles::v, and badGlobalMuonTaggersAOD_cff::vtx.
Referenced by produce().
bool GenParticleProducer::fillDaughters | ( | reco::GenParticleCollection & | cand, |
const HepMC::GenParticle * | part, | ||
reco::GenParticleRefProd const & | ref, | ||
size_t | index, | ||
std::unordered_map< int, size_t > & | barcodes | ||
) | const |
Definition at line 317 of file GenParticleProducer.cc.
References GenParticle::GenParticle, diffTreeTool::index, funct::m, 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, | ||
std::unordered_map< int, size_t > & | barcodes | ||
) | const |
Definition at line 334 of file GenParticleProducer.cc.
References begin, DEFINE_FWK_MODULE, end, GenParticle::GenParticle, training_settings::idx, PFRecoTauDiscriminationByIsolation_cfi::offset, and AlCaHLTBitMon_ParallelJobs::p.
Referenced by produce().
|
override |
Definition at line 159 of file GenParticleProducer.cc.
References abortOnUnknownPDGCode_, and edm::EventSetup::getData().
|
inlineoverride |
Definition at line 89 of file GenParticleProducer.cc.
References GenParticle::GenParticle, diffTreeTool::index, CaloTowersParam_cfi::mc, PFRecoTauDiscriminationByIsolation_cfi::offset, and HadronAndPartonSelector_cfi::particles.
|
override |
process one event
fill indices
Definition at line 165 of file GenParticleProducer.cc.
References convertParticle(), edmIntegrityCheck::d, doSubEvent_, Exception, f, fillDaughters(), fillIndices(), GenParticle::GenParticle, edm::Event::getByToken(), edm::HepMCProduct::GetEvent(), MixCollection< T >::getObject(), edm::Event::getRefBeforePut(), edm::Event::getRun(), mps_fire::i, edm::RefProd< C >::id(), edm::Run::index(), edm::errors::InvalidReference, LogDebug, CaloTowersParam_cfi::mc, mixToken_, mmToCm, mmToNs, eostools::move(), PFRecoTauDiscriminationByIsolation_cfi::offset, HadronAndPartonSelector_cfi::particles, position, edm::Handle< T >::product(), edm::Event::put(), reco::CompositeRefCandidateT< D >::resetDaughters(), saveBarCodes_, MixCollection< T >::size(), findQualityFiles::size, srcToken_, and useCF_.
|
private |
unknown code treatment flag
Definition at line 102 of file GenParticleProducer.cc.
Referenced by globalBeginRun().
|
private |
input & output modes
Definition at line 107 of file GenParticleProducer.cc.
Referenced by produce().
|
private |
Definition at line 110 of file GenParticleProducer.cc.
Referenced by convertParticle().
|
private |
Definition at line 111 of file GenParticleProducer.cc.
|
private |
Definition at line 99 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
save bar-codes
Definition at line 104 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
source collection name
Definition at line 97 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
Definition at line 108 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
Definition at line 98 of file GenParticleProducer.cc.