|
| FlatRandomPtAndDxyGunProducer (const ParameterSet &pset) |
|
void | produce (Event &e, const EventSetup &es) override |
|
| ~FlatRandomPtAndDxyGunProducer () 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 | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndRuns () 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) |
|
ProducesCollector | producesCollector () |
|
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) |
|
bool | fAddAntiParticle |
|
HepMC::GenEvent * | fEvt |
|
double | fMaxEta |
|
double | fMaxPhi |
|
double | fMinEta |
|
double | fMinPhi |
|
std::vector< int > | fPartIDs |
|
ESHandle< HepPDT::ParticleDataTable > | fPDGTable |
|
int | fVerbosity |
|
void FlatRandomPtAndDxyGunProducer::produce |
( |
Event & |
e, |
|
|
const EventSetup & |
es |
|
) |
| |
|
override |
Definition at line 40 of file FlatRandomPtAndDxyGunProducer.cc.
References funct::abs(), ConeH_, ConeRadius_, funct::cos(), gather_cfg::cout, DistanceToAPEX_, PVValHelper::dxy, dxyMax_, dxyMin_, HCALHighEnergyHPDFilter_cfi::energy, PVValHelper::eta, edm::EventID::event(), edm::BaseFlatGunProducer::fAddAntiParticle, edm::BaseFlatGunProducer::fEvt, edm::BaseFlatGunProducer::fMaxEta, edm::BaseFlatGunProducer::fMaxPhi, fMaxPt, edm::BaseFlatGunProducer::fMinEta, edm::BaseFlatGunProducer::fMinPhi, fMinPt, edm::BaseFlatGunProducer::fPartIDs, edm::BaseFlatGunProducer::fPDGTable, edm::BaseFlatGunProducer::fVerbosity, genParticles2HepMC_cfi::genEventInfo, GenParticle::GenParticle, edm::RandomNumberGenerator::getEngine(), GenLeadTrackFilter_cfi::HepMCProduct, mps_fire::i, edm::EventBase::id(), dqmiolumiharvest::j, lxyMax_, lzMax_, EgHLTOffHistBins_cfi::mass, eostools::move(), or, AlCaHLTBitMon_ParallelJobs::p, LHEGenericFilter_cfi::ParticleID, genfragment_ptgun_cfg::PartID, DiDispStaMuonMonitor_cfi::pt, edm::Event::put(), multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, funct::sin(), mathSSE::sqrt(), edm::Event::streamID(), and V0Monitor_cff::v0.
45 cout <<
" FlatRandomPtAndDxyGunProducer : Begin New Event Generation" << endl;
58 for (
unsigned int ip = 0; ip <
fPartIDs.size(); ++ip) {
71 bool passLoop =
false;
72 while (not passLoop) {
77 float dxysign = CLHEP::RandFlat::shoot(engine, -1, 1);
81 px = pt *
cos(phi_vtx);
82 py = pt *
sin(phi_vtx);
83 for (
int i = 0;
i < 10000;
i++) {
85 vy = (pt * dxy + vx *
py) / px;
86 lxy =
sqrt(vx * vx + vy * vy);
87 if (lxy <
abs(
lxyMax_) and (vx * px + vy * py) > 0) {
96 for (
int j = 0;
j < 100;
j++) {
97 vz = CLHEP::RandFlat::shoot(engine, 0.0,
lzMax_);
99 if (v0 <= 0
or lxy * lxy / (ConeTheta * ConeTheta) > v0 * v0) {
106 passLoop = (passLxy and passLz);
112 HepMC::GenVertex* Vtx1 =
new HepMC::GenVertex(HepMC::FourVector(vx, vy, vz));
116 double mass = PData->mass().value();
117 double energy2 = px * px + py * py + pz * pz + mass *
mass;
119 HepMC::FourVector
p(px, py, pz, energy);
121 Part->suggest_barcode(barcode);
123 Vtx1->add_particle_out(Part);
124 fEvt->add_vertex(Vtx1);
127 HepMC::GenVertex* Vtx2 =
new HepMC::GenVertex(HepMC::FourVector(-vx, -vy, -vz));
128 HepMC::FourVector ap(-px, -py, -pz, energy);
130 if (PartID == 22 || PartID == 23) {
134 APart->suggest_barcode(barcode);
136 Vtx2->add_particle_out(APart);
137 fEvt->add_vertex(Vtx2);
141 fEvt->set_signal_process_id(20);
148 BProduct->addHepMCData(
fEvt);
155 cout <<
" FlatRandomPtAndDxyGunProducer : End New Event Generation" << endl;
EventNumber_t event() const
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
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
std::vector< int > fPartIDs
HepPDT::ParticleData ParticleData
StreamID streamID() const