|
| GenPUProtonProducer (const edm::ParameterSet &) |
|
std::shared_ptr< ConvertParticle > | 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 |
|
| ~GenPUProtonProducer () override |
|
| EDProducer ()=default |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDProducerBase () override |
|
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) |
|
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) |
|
|
typedef EDProducerBase | ModuleType |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >> |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
static const std::string & | baseType () |
|
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
|
static void | prevalidate (ConfigurationDescriptions &descriptions) |
|
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 132 of file GenPUProtonProducer.cc.
Definition at line 190 of file GenPUProtonProducer.cc.
References MixCollection< T >::MixItr::bunch(), bunchList_, DEFINE_FWK_MODULE, spr::find(), GenParticle::GenParticle, edm::Event::getByToken(), edm::Event::getRun(), edm::Run::index(), LogDebug, minPz_, mixToken_, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, edm::Handle< T >::product(), edm::Event::put(), and select_.
192 size_t totalSize = 0;
198 npiles = cfhepmcprod->size();
200 LogDebug(
"GenPUProtonProducer") <<
" Number of pile-up events : " << npiles << endl;
202 for(
size_t icf = 0; icf < npiles; ++icf){
203 LogDebug(
"GenPUProtonProducer") <<
"CF " << icf <<
" size : " << cfhepmcprod->getObject(icf).GetEvent()->particles_size() << endl;
204 totalSize += cfhepmcprod->getObject(icf).GetEvent()->particles_size();
206 LogDebug(
"GenPUProtonProducer") <<
"Total size : " << totalSize << endl;
209 auto candsPtr = std::make_unique<GenParticleCollection>();
213 ConvertParticle
const& convertParticle_ = *runCache( evt.getRun().index() );
216 unsigned int total_number_of_protons = 0;
219 for( mixHepMC_itr = cfhepmcprod->begin() ; mixHepMC_itr != cfhepmcprod->end() ; ++mixHepMC_itr, ++idx_mix ){
220 int bunch = mixHepMC_itr.
bunch();
224 auto event = (*mixHepMC_itr).GetEvent();
226 size_t num_particles =
event->particles_size();
229 unsigned int number_of_protons = 0;
230 for(
auto p =
event->particles_begin() ;
p !=
event->particles_end() ; ++
p ) {
234 convertParticle_( cand, part );
236 cands.push_back( cand );
239 LogDebug(
"GenPUProtonProducer") <<
"Idx : " << idx_mix <<
" Bunch : " << bunch
240 <<
" Number of particles : " << num_particles
241 <<
" Number of protons : " << number_of_protons << endl;
243 total_number_of_protons += number_of_protons;
246 LogDebug(
"GenPUProtonProducer") <<
"Total number of protons : " << total_number_of_protons << endl;
247 LogDebug(
"GenPUProtonProducer") <<
"Output collection size : " << cands.size() << endl;
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
std::vector< int > bunchList_
edm::EDGetTokenT< CrossingFrame< edm::HepMCProduct > > mixToken_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
T const * product() const