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 | |
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 | |
std::vector< ConsumesInfo > | consumesInfo () const |
EDConsumerBase () | |
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
std::vector < ProductHolderIndexAndSkipBit > const & | itemsToGetFromEvent () const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) 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... | |
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 |
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::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 26 of file GenParticleProducer.cc.
GenParticleProducer::GenParticleProducer | ( | const edm::ParameterSet & | cfg | ) |
constructor
Definition at line 90 of file GenParticleProducer.cc.
References HLT_25ns14e33_v1_cff::alias, edm::ParameterSet::getParameter(), HLT_25ns14e33_v1_cff::InputTag, mixToken_, saveBarCodes_, srcToken_, AlCaHLTBitMon_QueryRunRegistry::string, and useCF_.
GenParticleProducer::~GenParticleProducer | ( | ) |
int GenParticleProducer::chargeTimesThree | ( | int | id | ) | const |
Definition at line 111 of file GenParticleProducer.cc.
References abortOnUnknownPDGCode_, funct::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 266 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 286 of file GenParticleProducer.cc.
References barcodes_, GenParticle::GenParticle, cmsHarvester::index, contentValuesFiles::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 303 of file GenParticleProducer.cc.
References barcodes_, begin, end, GenParticle::GenParticle, customizeTrackingMonitorSeedNumber::idx, HLT_25ns14e33_v1_cff::offset, and AlCaHLTBitMon_ParallelJobs::p.
Referenced by produce().
|
overridevirtual |
process one event
fill indices
Implements edm::EDProducer.
Definition at line 125 of file GenParticleProducer.cc.
References funct::abs(), barcodes_, chargeM_, chargeMap_, chargeP_, convertParticle(), doSubEvent_, edm::hlt::Exception, 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_, HLT_25ns14e33_v1_cff::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, 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.