|
| FlatRandomMultiParticlePGunProducer (const ParameterSet &pset) |
|
virtual void | produce (Event &e, const EventSetup &es) override |
|
virtual | ~FlatRandomMultiParticlePGunProducer () |
|
| 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 |
|
virtual | ~BaseFlatGunProducer () |
|
| EDProducer ()=default |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
virtual | ~EDProducerBase () |
|
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) |
|
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) |
|
Definition at line 50 of file FlatRandomMultiParticlePGunProducer.cc.
References funct::abs(), funct::cos(), gather_cfg::cout, PVValHelper::eta, edm::EventID::event(), JetChargeProducer_cfi::exp, edm::BaseFlatGunProducer::fAddAntiParticle, edm::BaseFlatGunProducer::fEvt, edm::BaseFlatGunProducer::fMaxEta, fMaxP_, edm::BaseFlatGunProducer::fMaxPhi, edm::BaseFlatGunProducer::fMinEta, fMinP_, edm::BaseFlatGunProducer::fMinPhi, edm::BaseFlatGunProducer::fPartIDs, edm::BaseFlatGunProducer::fPDGTable, fProbParticle_, edm::BaseFlatGunProducer::fVerbosity, GenParticle::GenParticle, edm::RandomNumberGenerator::getEngine(), edm::EventBase::id(), ResonanceBuilder::mass, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, source_particleGun_cfi::ParticleID, CastorDigiValidation::PartID, phi, edm::Event::put(), diffTwoXMLs::r1, funct::sin(), mathSSE::sqrt(), edm::Event::streamID(), and theta().
58 std::cout <<
"FlatRandomMultiParticlePGunProducer: Begin New Event Generation" << std::endl ;
65 fEvt =
new HepMC::GenEvent() ;
72 HepMC::GenVertex* Vtx =
new HepMC::GenVertex( HepMC::FourVector(0.,0.,0.));
77 double r1 = CLHEP::RandFlat::shoot(engine, 0., 1.);
78 for (
unsigned int ip=0; ip<
fPartIDs.size(); ip++) {
88 double mom = CLHEP::RandFlat::shoot(engine,
fMinP_,
fMaxP_);
93 double mass = PData->mass().value() ;
94 double energy =
sqrt(mom*mom + mass*mass);
96 double px = mom*
sin(theta)*
cos(phi);
97 double py = mom*
sin(theta)*
sin(phi);
98 double pz = mom*
cos(theta);
100 HepMC::FourVector
p(px,py,pz,energy) ;
103 Part->suggest_barcode(barcode);
104 Vtx->add_particle_out(Part);
107 HepMC::FourVector ap(-px,-py,-pz,energy) ;
111 APart->suggest_barcode(barcode);
112 Vtx->add_particle_out(APart);
115 fEvt->add_vertex(Vtx) ;
117 fEvt->set_signal_process_id(20) ;
123 std::unique_ptr<HepMCProduct> BProduct(
new HepMCProduct()) ;
124 BProduct->addHepMCData(
fEvt );
131 std::cout <<
" FlatRandomMultiParticlePGunProducer : Event Generation Done " << std::endl;
EventNumber_t event() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
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)
std::vector< int > fPartIDs
HepPDT::ParticleData ParticleData
std::vector< double > fProbParticle_
StreamID streamID() const