Public Member Functions | |
GenParticlePruner (const edm::ParameterSet &) | |
Public Member Functions inherited from edm::stream::EDProducer<> | |
EDProducer ()=default | |
Public Member Functions inherited from edm::stream::EDProducerBase | |
EDProducerBase () | |
ModuleDescription const & | moduleDescription () const |
virtual | ~EDProducerBase () |
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 |
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 |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
virtual | ~EDConsumerBase () noexcept(false) |
Private Member Functions | |
void | flagDaughters (const reco::GenParticle &, int) |
void | flagMothers (const reco::GenParticle &, int) |
void | getDaughterKeys (std::vector< size_t > &, std::vector< size_t > &, const reco::GenParticleRefVector &) const |
void | getMotherKeys (std::vector< size_t > &, std::vector< size_t > &, const reco::GenParticleRefVector &) const |
void | parse (const std::string &selection, helper::SelectCode &code, std::string &cut) const |
void | produce (edm::Event &, const edm::EventSetup &) override |
void | recursiveFlagDaughters (size_t, const reco::GenParticleCollection &, int, std::vector< size_t > &) |
void | recursiveFlagMothers (size_t, const reco::GenParticleCollection &, int, std::vector< size_t > &) |
Private Attributes | |
bool | firstEvent_ |
std::vector< int > | flags_ |
std::vector< size_t > | indices_ |
int | keepOrDropAll_ |
std::vector< std::pair< StringCutObjectSelector< reco::GenParticle >, helper::SelectCode > > | select_ |
std::vector< std::string > | selection_ |
edm::EDGetTokenT< reco::GenParticleCollection > | srcToken_ |
Additional Inherited Members | |
Public Types inherited from edm::stream::EDProducer<> | |
typedef CacheContexts< T... > | CacheTypes |
typedef CacheTypes::GlobalCache | GlobalCache |
typedef AbilityChecker< T... > | HasAbility |
typedef CacheTypes::LuminosityBlockCache | LuminosityBlockCache |
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > | LuminosityBlockContext |
typedef CacheTypes::LuminosityBlockSummaryCache | LuminosityBlockSummaryCache |
typedef CacheTypes::RunCache | RunCache |
typedef RunContextT< RunCache, GlobalCache > | RunContext |
typedef CacheTypes::RunSummaryCache | RunSummaryCache |
Public Types inherited from edm::stream::EDProducerBase | |
typedef EDProducerAdaptorBase | 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::stream::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 22 of file GenParticlePruner.cc.
GenParticlePruner::GenParticlePruner | ( | const edm::ParameterSet & | cfg | ) |
Definition at line 95 of file GenParticlePruner.cc.
|
private |
Definition at line 104 of file GenParticlePruner.cc.
References edm::RefVector< C, T, F >::begin(), reco::CompositeRefCandidateT< D >::daughterRefVector(), BPhysicsValidation_cfi::daughters, edm::RefVector< C, T, F >::end(), flags_, and mps_fire::i.
Referenced by produce().
|
private |
Definition at line 110 of file GenParticlePruner.cc.
References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), flags_, mps_fire::i, and reco::CompositeRefCandidateT< D >::motherRefVector().
Referenced by produce().
|
private |
Definition at line 275 of file GenParticlePruner.cc.
References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), spr::find(), flags_, training_settings::idx, edm::Ref< C, T, F >::key(), and edm::RefVector< C, T, F >::size().
Referenced by produce().
|
private |
Definition at line 296 of file GenParticlePruner.cc.
References edm::RefVector< C, T, F >::begin(), DEFINE_FWK_MODULE, edm::RefVector< C, T, F >::end(), spr::find(), flags_, training_settings::idx, edm::Ref< C, T, F >::key(), and edm::RefVector< C, T, F >::size().
Referenced by produce().
|
private |
Definition at line 49 of file GenParticlePruner.cc.
References helper::SelectCode::all_, EnergyCorrector::c, mps_alisetup::command, edm::errors::Configuration, helper::SelectCode::daughtersDepth_, Exception, f, helper::SelectCode::kAll, helper::SelectCode::kDrop, helper::SelectCode::keepOrDrop_, helper::SelectCode::kFirst, helper::SelectCode::kKeep, helper::SelectCode::kNone, helper::SelectCode::mothersDepth_, gen::n, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by produce().
|
overrideprivate |
Definition at line 154 of file GenParticlePruner.cc.
References reco::CompositeRefCandidateT< D >::addDaughter(), reco::CompositeRefCandidateT< D >::addMother(), helper::SelectCode::all_, edm::errors::Configuration, TkAlMuonSelectors_cfi::cut, reco::CompositeRefCandidateT< D >::daughterRefVector(), drop, Exception, firstEvent_, flagDaughters(), flagMothers(), flags_, relval_steps::gen(), GenParticle::GenParticle, edm::Event::getByToken(), getDaughterKeys(), getMotherKeys(), edm::Event::getRefBeforePut(), mps_fire::i, diffTreeTool::index, indices_, keep, helper::SelectCode::keepOrDrop_, keepOrDropAll_, WDecay::kNone, reco::CompositeRefCandidateT< D >::motherRefVector(), eostools::move(), gen::n, MillePedeFileConverter_cfg::out, AlCaHLTBitMon_ParallelJobs::p, parse(), edm::Event::put(), recursiveFlagDaughters(), recursiveFlagMothers(), cuy::rep, PdgEntryReplacer::replace(), select_, selection_, TrackRefitter_38T_cff::src, srcToken_, and reco::GenParticle::statusFlags().
|
private |
Definition at line 116 of file GenParticlePruner.cc.
References edm::RefVector< C, T, F >::begin(), BPhysicsValidation_cfi::daughters, edm::RefVector< C, T, F >::end(), spr::find(), flags_, mps_fire::i, and diffTreeTool::index.
Referenced by produce().
|
private |
Definition at line 135 of file GenParticlePruner.cc.
References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), spr::find(), flags_, mps_fire::i, and diffTreeTool::index.
Referenced by produce().
|
private |
Definition at line 27 of file GenParticlePruner.cc.
Referenced by produce().
|
private |
Definition at line 32 of file GenParticlePruner.cc.
Referenced by flagDaughters(), flagMothers(), getDaughterKeys(), getMotherKeys(), produce(), recursiveFlagDaughters(), and recursiveFlagMothers().
|
private |
Definition at line 33 of file GenParticlePruner.cc.
Referenced by produce().
|
private |
Definition at line 29 of file GenParticlePruner.cc.
Referenced by produce().
|
private |
Definition at line 31 of file GenParticlePruner.cc.
Referenced by produce().
|
private |
Definition at line 30 of file GenParticlePruner.cc.
Referenced by produce().
|
private |
Definition at line 28 of file GenParticlePruner.cc.
Referenced by produce().