|
| CloseByParticleGunProducer (const ParameterSet &) |
|
| ~CloseByParticleGunProducer () override |
|
| BaseFlatGunProducer (const ParameterSet &) |
|
void | beginRun (const edm::Run &r, const edm::EventSetup &) override |
|
void | endRun (edm::Run const &r, const edm::EventSetup &) override |
|
void | endRunProduce (edm::Run &r, const edm::EventSetup &) override |
|
| ~BaseFlatGunProducer () override |
|
| EDProducer ()=default |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
bool | hasAbilityToProduceInLumis () const final |
|
bool | hasAbilityToProduceInRuns () const final |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
bool | wantsStreamLuminosityBlocks () const |
|
bool | wantsStreamRuns () 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) |
|
| ~ProducerBase () noexcept(false) override |
|
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 |
|
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) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
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 9 of file CloseByParticleGunProducer.h.
void CloseByParticleGunProducer::produce |
( |
Event & |
e, |
|
|
const EventSetup & |
es |
|
) |
| |
|
overrideprivate |
Definition at line 57 of file CloseByParticleGunProducer.cc.
References funct::abs(), EnergyCorrector::c, constexpr, funct::cos(), edm::EventID::event(), fDelta, fEnMax, fEnMin, edm::BaseFlatGunProducer::fEvt, fNParticles, fOverlapping, fPartIDs, edm::BaseFlatGunProducer::fPDGTable, fPhiMax, fPhiMin, fPointing, fRandomShoot, fRMax, fRMin, edm::BaseFlatGunProducer::fVerbosity, fZMax, fZMin, particlelevel_cff::genEventInfo, GenParticle::GenParticle, edm::RandomNumberGenerator::getEngine(), mps_fire::i, edm::EventBase::id(), LogDebug, ResonanceBuilder::mass, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, source_particleGun_cfi::ParticleID, HadronAndPartonSelector_cfi::particles, CastorDigiValidation::PartID, partIdx(), edm::Event::put(), funct::sin(), mathSSE::sqrt(), edm::Event::streamID(), and hgcalLayerClusters_cff::timeOffset.
64 LogDebug(
"CloseByParticleGunProducer") <<
" CloseByParticleGunProducer : Begin New Event Generation" << endl ;
74 for(
int i=0;
i<numParticles;
i++){
76 particles.push_back(
fPartIDs[partIdx]);
80 double fR = CLHEP::RandFlat::shoot(engine,
fRMin,
fRMax);
81 double fZ = CLHEP::RandFlat::shoot(engine,
fZMin,
fZMax);
85 for (
unsigned int ip=0; ip<particles.size(); ++ip)
89 fR = CLHEP::RandFlat::shoot(engine,tmpR-
fDelta,tmpR+
fDelta);
90 phi = CLHEP::RandFlat::shoot(engine, tmpPhi-
fDelta/fR, tmpPhi+
fDelta/fR);
95 double fEn = CLHEP::RandFlat::shoot(engine,
fEnMin,
fEnMax);
96 int PartID = particles[ip] ;
98 double mass = PData->mass().value() ;
99 double mom =
sqrt(fEn*fEn-mass*mass);
106 double x=fR*
cos(phi);
107 double y=fR*
sin(phi);
110 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(HepMC::FourVector(x*cm,y*cm,fZ*cm,timeOffset));
112 HepMC::FourVector
p(px,py,pz,energy) ;
117 p.setX(momentum.x());
118 p.setY(momentum.y());
119 p.setZ(momentum.z());
122 Part->suggest_barcode( barcode );
125 Vtx->add_particle_out(Part);
131 fEvt->add_vertex(Vtx);
136 fEvt->set_signal_process_id(20);
144 BProduct->addHepMCData(
fEvt );
152 LogDebug(
"CloseByParticleGunProducer") <<
" CloseByParticleGunProducer : Event Generation Done " << endl;
EventNumber_t event() const
static unsigned int partIdx(const InputGenJetsParticleSelector::ParticleVector &p, const reco::Candidate *particle)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Sin< T >::type sin(const T &t)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
ESHandle< HepPDT::ParticleDataTable > fPDGTable
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
HepPDT::ParticleData ParticleData
XYZVectorD XYZVector
spatial vector with cartesian internal representation
std::vector< int > fPartIDs
StreamID streamID() const