|
| FlatRandomOneOverPtGunProducer (const ParameterSet &pset) |
|
void | produce (Event &e, const EventSetup &es) override |
|
| ~FlatRandomOneOverPtGunProducer () 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 |
|
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) |
|
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) |
|
bool | fAddAntiParticle |
|
HepMC::GenEvent * | fEvt |
|
double | fMaxEta |
|
double | fMaxPhi |
|
double | fMinEta |
|
double | fMinPhi |
|
std::vector< int > | fPartIDs |
|
ESHandle< HepPDT::ParticleDataTable > | fPDGTable |
|
int | fVerbosity |
|
void FlatRandomOneOverPtGunProducer::produce |
( |
Event & |
e, |
|
|
const EventSetup & |
es |
|
) |
| |
|
override |
Definition at line 39 of file FlatRandomOneOverPtGunProducer.cc.
References funct::abs(), funct::cos(), PVValHelper::eta, edm::EventID::event(), JetChargeProducer_cfi::exp, edm::BaseFlatGunProducer::fAddAntiParticle, edm::BaseFlatGunProducer::fEvt, edm::BaseFlatGunProducer::fMaxEta, fMaxOneOverPt, edm::BaseFlatGunProducer::fMaxPhi, edm::BaseFlatGunProducer::fMinEta, fMinOneOverPt, edm::BaseFlatGunProducer::fMinPhi, edm::BaseFlatGunProducer::fPartIDs, edm::BaseFlatGunProducer::fPDGTable, edm::BaseFlatGunProducer::fVerbosity, particlelevel_cff::genEventInfo, GenParticle::GenParticle, edm::RandomNumberGenerator::getEngine(), edm::EventBase::id(), cmsBatch::log, LogDebug, ResonanceBuilder::mass, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, source_particleGun_cfi::ParticleID, CastorDigiValidation::PartID, phi, EnergyCorrector::pt, edm::Event::put(), funct::sin(), mathSSE::sqrt(), edm::Event::streamID(), theta(), and geometryCSVtoXML::xx.
44 LogDebug(
"ParticleGun") <<
" FlatRandomOneOverPtGunProducer : Begin New Event Generation";
53 fEvt =
new HepMC::GenEvent() ;
59 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(HepMC::FourVector(0.,0.,0.));
64 for (
unsigned int ip=0; ip<
fPartIDs.size(); ++ip) {
66 double xx = CLHEP::RandFlat::shoot(engine, 0.0, 1.0);
71 if (pt != 0) pt = 1./
pt;
75 double mass = PData->mass().value() ;
77 double mom = pt/
sin(theta) ;
78 double px = pt*
cos(phi) ;
79 double py = pt*
sin(phi) ;
80 double pz = mom*
cos(theta) ;
81 double energy2= mom*mom + mass*
mass ;
82 double energy =
sqrt(energy2) ;
83 HepMC::FourVector
p(px,py,pz,energy) ;
85 Part->suggest_barcode( barcode ) ;
87 Vtx->add_particle_out(Part);
88 LogDebug(
"ParticleGun") <<
"FlatRandomOneOverPtGunProducer: Event generated with pt:eta:phi " << pt <<
" " << eta <<
" " << phi <<
" (" << theta/CLHEP::deg <<
":" << phi/CLHEP::deg <<
")";
91 HepMC::FourVector ap(-px,-py,-pz,energy) ;
93 if ( PartID == 22 || PartID == 23 ) {
97 APart->suggest_barcode( barcode ) ;
99 Vtx->add_particle_out(APart) ;
104 fEvt->add_vertex(Vtx) ;
106 fEvt->set_signal_process_id(20) ;
112 std::unique_ptr<HepMCProduct> BProduct(
new HepMCProduct()) ;
113 BProduct->addHepMCData(
fEvt );
119 LogDebug(
"ParticleGun") <<
" FlatRandomOneOverPtGunProducer : Event Generation Done ";
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
StreamID streamID() const