|
| 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 noexcept final |
|
bool | wantsGlobalRuns () const noexcept final |
|
bool | wantsInputProcessBlocks () const noexcept final |
|
bool | wantsProcessBlocks () const noexcept final |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
bool | wantsStreamLuminosityBlocks () const noexcept |
|
bool | wantsStreamRuns () const noexcept |
|
| ~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 fControlledByEta, fDelta, fEtaMax, fEtaMin, fFlatPtGeneration, fMaxVarSpread, fNParticles, fOffsetFirst, fOverlapping, fPartIDs, fPhiMax, fPhiMin, fPointing, fRandomShoot, fRMax, fRMin, fTMax, fTMin, fUseDeltaT, fVarMax, fVarMin, fZMax, fZMin, edm::ParameterSet::getParameter(), and muonDTDigis_cfi::pset.
34 LogError(
"CloseByParticleGunProducer") <<
" Please choose a minimum energy greater than 1 GeV, otherwise time " 35 "information may be invalid or not reliable";
40 LogError(
"CloseByParticleGunProducer") <<
" Please fix MinEta and MaxEta values in the configuration";
45 LogError(
"CloseByParticleGunProducer") <<
" Please fix RMin and RMax values in the configuration";
55 LogError(
"CloseByParticleGunProducer")
56 <<
" Can't generate non pointing FlatPt samples; please disable FlatPt generation or generate pointing sample";
66 LogError(
"CloseByParticleGunProducer") <<
" Please fix TMin and TMax values in the configuration";
70 produces<HepMCProduct>(
"unsmeared");
71 produces<GenEventInfoProduct>();
T getParameter(std::string const &) const
Log< level::Error, false > LogError
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 117 of file CloseByParticleGunProducer.cc.
References funct::abs(), funct::cos(), MillePedeFileConverter_cfg::e, hcalRecHitTable_cff::energy, JetChargeProducer_cfi::exp, fControlledByEta, fDelta, l1ScoutingRun3::ugmt::fEta(), fEtaMax, fEtaMin, edm::BaseFlatGunProducer::fEvt, fFlatPtGeneration, 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, 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.
119 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
122 LogDebug(
"CloseByParticleGunProducer") <<
" CloseByParticleGunProducer : Begin New Event Generation" << endl;
132 double fZ = CLHEP::RandFlat::shoot(engine,
fZMin,
fZMax);
154 for (
unsigned int ip = 0; ip < numParticles; ++ip) {
156 fR = CLHEP::RandFlat::shoot(engine, tmpR -
fDelta, tmpR +
fDelta);
170 double mass = PData->mass().value();
172 double mom,
px,
py, pz;
176 double mom2 = fVar * fVar -
mass *
mass;
191 double energy2 = mom * mom +
mass *
mass;
203 p.setX(momentum.x());
204 p.setY(momentum.y());
205 p.setZ(momentum.z());
209 double pathLength = 0.;
210 const double speed =
p.pz() /
p.e() * c_light / CLHEP::cm;
211 if (PData->charge()) {
214 (c_light * field.inTesla({0.f, 0.f, 0.f}).
z());
216 pathLength =
std::sqrt(arc * arc + fZ * fZ);
225 HepMC::GenVertex* Vtx =
226 new HepMC::GenVertex(HepMC::FourVector(
x * CLHEP::cm,
y * CLHEP::cm, fZ * CLHEP::cm,
timeOffset));
229 Part->suggest_barcode(barcode);
232 Vtx->add_particle_out(Part);
238 fEvt->add_vertex(Vtx);
241 fEvt->set_event_number(
e.id().event());
242 fEvt->set_signal_process_id(20);
249 BProduct->addHepMCData(
fEvt);
256 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)