|
| 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 |
|
| 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 |
|
std::vector< bool > const & | recordProvenanceList () 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) |
|
TypeLabelList const & | typeLabelList () const |
| used by the fwk to register the list of products of this module More...
|
|
| ~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 |
|
ESResolverIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESResolverIndex > 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 |
|
void | selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDProducerBase | ModuleType |
|
template<typename T > |
using | BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T > |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
template<Transition Tr = Transition::Event> |
auto | produces (std::string instanceName) noexcept |
| declare what type of product will make and with which optional label More...
|
|
template<Transition B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<BranchType B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces () |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<Transition Tr = Transition::Event> |
auto | produces () noexcept |
|
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 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) |
|
CloseByParticleGunProducer::CloseByParticleGunProducer |
( |
const ParameterSet & |
pset | ) |
|
Definition at line 25 of file CloseByParticleGunProducer.cc.
References Exception, fControlledByEta, fControlledByREta, fDelta, fEtaMax, fEtaMin, fFlatPtGeneration, fLogSpacedVar, fMaxVarSpread, fNParticles, fOffsetFirst, fOverlapping, fPartIDs, fPhiMax, fPhiMin, fPointing, fRandomShoot, fRMax, fRMin, fTMax, fTMin, fUseDeltaT, fVarMax, fVarMin, fZMax, fZMin, edm::ParameterSet::getParameter(), dqm-mbProfile::log, log_fVarMax, log_fVarMin, and muonDTDigis_cfi::pset.
32 <<
" Conflicting configuration, cannot have both ControlledByEta and ControlledByREta ";
41 <<
" Please choose a minimum energy greater than 1 GeV, otherwise time " 42 "information may be invalid or not reliable";
44 throw cms::Exception(
"CloseByParticleGunProducer") <<
" Minimum energy must be greater than zero for log spacing";
54 throw cms::Exception(
"CloseByParticleGunProducer") <<
" Please fix MinEta and MaxEta values in the configuration";
59 throw cms::Exception(
"CloseByParticleGunProducer") <<
" Please fix RMin and RMax values in the configuration";
66 throw cms::Exception(
"CloseByParticleGunProducer") <<
" Please fix ZMin and ZMax values in the configuration";
75 <<
" Can't generate non pointing FlatPt samples; please disable FlatPt generation or generate pointing sample";
85 throw cms::Exception(
"CloseByParticleGunProducer") <<
" Please fix TMin and TMax values in the configuration";
89 produces<HepMCProduct>(
"unsmeared");
90 produces<GenEventInfoProduct>();
T getParameter(std::string const &) const
BaseFlatGunProducer(const ParameterSet &)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_fieldToken
std::vector< int > fPartIDs
void CloseByParticleGunProducer::produce |
( |
Event & |
e, |
|
|
const EventSetup & |
es |
|
) |
| |
|
overrideprivatevirtual |
Implements edm::one::EDProducerBase.
Definition at line 138 of file CloseByParticleGunProducer.cc.
References funct::abs(), funct::cos(), MillePedeFileConverter_cfg::e, hcalRecHitTable_cff::energy, JetChargeProducer_cfi::exp, fControlledByEta, fControlledByREta, fDelta, l1ScoutingRun3::ugmt::fEta(), fEtaMax, fEtaMin, edm::BaseFlatGunProducer::fEvt, fFlatPtGeneration, fLogSpacedVar, fMaxVarSpread, fNParticles, fOffsetFirst, fOverlapping, fPartIDs, edm::BaseFlatGunProducer::fPDGTable, fPhiMax, fPhiMin, fPointing, hydjet2DefaultParameters_cff::fR, fRandomShoot, fRMax, fRMin, hydjet2DefaultParameters_cff::fT, fTMax, fTMin, fUseDeltaT, fVarMax, fVarMin, edm::BaseFlatGunProducer::fVerbosity, fZMax, fZMin, genParticles2HepMC_cfi::genEventInfo, GenParticle::GenParticle, edm::EventSetup::getData(), edm::RandomNumberGenerator::getEngine(), ZgammaFilter_cfi::HepMCProduct, log_fVarMax, log_fVarMin, LogDebug, m_fieldToken, EgHLTOffHistBins_cfi::mass, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, LHEGenericFilter_cfi::ParticleID, genfragment_ptgun_cfg::PartID, partIdx(), funct::pow(), multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, CosmicsPD_Skims::radius, funct::sin(), HLTSiStripMonitoring_cff::speed, mathSSE::sqrt(), theta(), simBeamSpotPI::timeOffset, and x.
140 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
143 LogDebug(
"CloseByParticleGunProducer") <<
" CloseByParticleGunProducer : Begin New Event Generation" << endl;
158 fZ = CLHEP::RandFlat::shoot(engine,
fZMin,
fZMax);
183 for (
unsigned int ip = 0; ip < numParticles; ++ip) {
185 fR = CLHEP::RandFlat::shoot(engine, tmpR -
fDelta, tmpR +
fDelta);
204 double mass = PData->mass().value();
206 double mom,
px,
py, pz;
210 double mom2 = fVar * fVar -
mass *
mass;
225 double energy2 = mom * mom +
mass *
mass;
237 p.setX(momentum.x());
238 p.setY(momentum.y());
239 p.setZ(momentum.z());
243 double pathLength = 0.;
244 const double speed =
p.pz() /
p.e() * c_light / CLHEP::cm;
245 if (PData->charge()) {
248 (c_light * field.inTesla({0.f, 0.f, 0.f}).
z());
250 pathLength =
std::sqrt(arc * arc + fZ * fZ);
259 HepMC::GenVertex* Vtx =
260 new HepMC::GenVertex(HepMC::FourVector(
x * CLHEP::cm,
y * CLHEP::cm, fZ * CLHEP::cm,
timeOffset));
263 Part->suggest_barcode(barcode);
266 Vtx->add_particle_out(Part);
272 fEvt->add_vertex(Vtx);
275 fEvt->set_event_number(
e.id().event());
276 fEvt->set_signal_process_id(20);
283 BProduct->addHepMCData(
fEvt);
290 LogDebug(
"CloseByParticleGunProducer") <<
" CloseByParticleGunProducer : Event Generation Done " << endl;
static unsigned int partIdx(const InputGenJetsParticleSelector::ParticleVector &p, const reco::Candidate *particle)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Sin< T >::type sin(const T &t)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_fieldToken
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
Geom::Theta< T > theta() const
Power< A, B >::type pow(const A &a, const B &b)