|
| 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 |
|
| EDProducer (const EDProducer &)=delete |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
bool | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndProcessBlocks () const final |
|
bool | hasAbilityToProduceInEndRuns () const final |
|
const EDProducer & | operator= (const EDProducer &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsInputProcessBlocks () const final |
|
bool | wantsProcessBlocks () 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 |
|
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex >
const & | esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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 | selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) |
|
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) |
|
ProducesCollector | producesCollector () |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
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<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
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) |
|
void | resetItemsToGetFrom (BranchType iType) |
|
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 |
|
) |
| |
|
overridevirtual |
Implements edm::one::EDProducerBase.
Definition at line 37 of file FlatRandomOneOverPtGunProducer.cc.
References funct::abs(), funct::cos(), relval_parameters_module::energy, PVValHelper::eta, edm::EventID::event(), funct::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, GenParticle::GenParticle, edm::RandomNumberGenerator::getEngine(), edm::EventBase::id(), log, LogDebug, ResonanceBuilder::mass, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, phi, DiDispStaMuonMonitor_cfi::pt, edm::Event::put(), funct::sin(), mathSSE::sqrt(), edm::Event::streamID(), and theta().
41 LogDebug(
"ParticleGun") <<
" FlatRandomOneOverPtGunProducer : Begin New Event Generation";
56 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(HepMC::FourVector(0., 0., 0.));
61 for (
unsigned int ip = 0; ip <
fPartIDs.size(); ++ip) {
62 double xx = CLHEP::RandFlat::shoot(engine, 0.0, 1.0);
70 double mass = PData->mass().value();
72 double mom = pt /
sin(theta);
73 double px = pt *
cos(phi);
74 double py = pt *
sin(phi);
75 double pz = mom *
cos(theta);
76 double energy2 = mom * mom + mass *
mass;
78 HepMC::FourVector
p(px, py, pz, energy);
80 Part->suggest_barcode(barcode);
82 Vtx->add_particle_out(Part);
83 LogDebug(
"ParticleGun") <<
"FlatRandomOneOverPtGunProducer: Event generated with pt:eta:phi " << pt <<
" " << eta
84 <<
" " << phi <<
" (" << theta / CLHEP::deg <<
":" << phi / CLHEP::deg <<
")";
87 HepMC::FourVector ap(-px, -py, -pz, energy);
88 int APartID = -PartID;
89 if (PartID == 22 || PartID == 23) {
93 APart->suggest_barcode(barcode);
95 Vtx->add_particle_out(APart);
99 fEvt->add_vertex(Vtx);
101 fEvt->set_signal_process_id(20);
107 std::unique_ptr<HepMCProduct> BProduct(
new HepMCProduct());
108 BProduct->addHepMCData(
fEvt);
114 LogDebug(
"ParticleGun") <<
" FlatRandomOneOverPtGunProducer : Event Generation Done ";
EventNumber_t event() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static std::vector< std::string > checklist log
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
Exp< T >::type exp(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)
std::vector< int > fPartIDs
HepPDT::ParticleData ParticleData
StreamID streamID() const