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 | |
EDProducer (const EDProducer &)=delete | |
bool | hasAbilityToProduceInBeginLumis () const final |
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
bool | hasAbilityToProduceInBeginRuns () const final |
bool | hasAbilityToProduceInEndLumis () const final |
bool | hasAbilityToProduceInEndProcessBlocks () const final |
bool | hasAbilityToProduceInEndRuns () const final |
EDProducer & | operator= (const EDProducer &)=delete |
bool | wantsGlobalLuminosityBlocks () const final |
bool | wantsGlobalRuns () const final |
bool | wantsInputProcessBlocks () const final |
bool | wantsProcessBlocks () 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 |
std::vector< bool > const & | recordProvenanceList () 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) |
TypeLabelList const & | typeLabelList () const |
used by the fwk to register the list of products of this module More... | |
~ProducerBase () noexcept(false) override | |
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 | |
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (edm::Transition iTrans) const |
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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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 | selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) |
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
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_ |
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > | particleTableToken_ |
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::ProducerBase | |
template<Transition Tr = Transition::Event> | |
auto | produces (std::string instanceName) noexcept |
declare what type of product will make and with which optional label More... | |
template<Transition B> | |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
template<BranchType B> | |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
template<typename ProductType , Transition B> | |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
template<class ProductType > | |
BranchAliasSetterT< ProductType > | produces () |
template<typename ProductType , BranchType B> | |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
template<typename ProductType , BranchType B> | |
BranchAliasSetterT< ProductType > | produces () |
template<class ProductType > | |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
template<typename ProductType , Transition B> | |
BranchAliasSetterT< ProductType > | produces () |
template<Transition Tr = Transition::Event> | |
auto | produces () noexcept |
ProducesCollector | producesCollector () |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
template<BranchType B = InEvent> | |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes () |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag const &tag) |
template<Transition Tr = Transition::Event> | |
constexpr auto | esConsumes () |
template<Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag tag) |
template<Transition Tr = Transition::Event> | |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
Used with EventSetupRecord::doGet. More... | |
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) |
void | resetItemsToGetFrom (BranchType iType) |
Definition at line 81 of file GenParticleProducer.cc.
GenParticleProducer::GenParticleProducer | ( | const edm::ParameterSet & | cfg | ) |
constructor
Definition at line 149 of file GenParticleProducer.cc.
References SiStripOfflineCRack_cfg::alias, looper::cfg, HLT_2022v12_cff::InputTag, mixToken_, particleTableToken_, 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 318 of file GenParticleProducer.cc.
References MCTruthHelper< P >::fillGenStatusFlags(), mcTruthHelper_, mmToCm, EgammaValidation_cff::pdgId, findQualityFiles::v, bphysicsOniaDQM_cfi::vertex, and extraflags_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 340 of file GenParticleProducer.cc.
References HLT_2022v12_cff::cands, GenParticle::GenParticle, visualization-live-secondInstance_cfg::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 360 of file GenParticleProducer.cc.
References mps_fire::end, GenParticle::GenParticle, heavyIonCSV_trainingSettings::idx, CaloTowersParam_cfi::mc, hltrates_dqm_sourceclient-live_cfg::offset, AlCaHLTBitMon_ParallelJobs::p, and ecalTrigSettings_cff::particles.
Referenced by produce().
|
override |
Definition at line 172 of file GenParticleProducer.cc.
References abortOnUnknownPDGCode_, edm::EventSetup::getHandle(), and particleTableToken_.
|
inlineoverride |
Definition at line 91 of file GenParticleProducer.cc.
|
overridevirtual |
process one event
fill indices
Implements edm::global::EDProducerBase.
Definition at line 177 of file GenParticleProducer.cc.
References HLT_2022v12_cff::cands, convertParticle(), ztail::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, dataCertificationJetMET_cfi::isHI, LogDebug, CaloTowersParam_cfi::mc, mixToken_, mmToCm, mmToNs, eostools::move(), nsub, hltrates_dqm_sourceclient-live_cfg::offset, ecalTrigSettings_cff::particles, position, edm::Handle< T >::product(), edm::Event::put(), saveBarCodes_, MixCollection< T >::size(), findQualityFiles::size, srcToken_, and useCF_.
|
private |
unknown code treatment flag
Definition at line 113 of file GenParticleProducer.cc.
Referenced by globalBeginRun().
|
private |
input & output modes
Definition at line 118 of file GenParticleProducer.cc.
Referenced by produce().
|
private |
Definition at line 121 of file GenParticleProducer.cc.
Referenced by convertParticle().
|
private |
Definition at line 122 of file GenParticleProducer.cc.
|
private |
Definition at line 109 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
Definition at line 110 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and globalBeginRun().
|
private |
save bar-codes
Definition at line 115 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
source collection name
Definition at line 107 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
Definition at line 119 of file GenParticleProducer.cc.
Referenced by GenParticleProducer(), and produce().
|
private |
Definition at line 108 of file GenParticleProducer.cc.