CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::CosMuoGenProducer Class Reference

#include <CosMuoGenProducer.h>

Inheritance diagram for edm::CosMuoGenProducer:
edm::one::EDProducer< EndRunProducer, one::WatchLuminosityBlocks > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CosMuoGenProducer (const ParameterSet &)
 
 ~CosMuoGenProducer () override
 
- Public Member Functions inherited from edm::one::EDProducer< EndRunProducer, one::WatchLuminosityBlocks >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () 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 EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
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
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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)
 

Private Member Functions

void beginLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
void clear ()
 
void endLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
void endRunProduce (Run &r, const EventSetup &es) override
 
void produce (Event &e, const EventSetup &es) override
 

Private Attributes

bool AllMu
 
double ClayLayerWidth
 
bool cmVerbosity_
 
std::unique_ptr< CosmicMuonGeneratorCosMuoGen
 
double ELSF
 
double extCrossSect
 
double extFilterEff
 
bool isInitialized_
 
double MaxEn
 
double MaxP
 
double MaxPh
 
double MaxS
 
double MaxT
 
double MinEn
 
double MinP
 
double MinP_CMS
 
double MinPh
 
double MinS
 
double MinT
 
bool MTCCHalf
 
bool MultiMuon
 
int32_t MultiMuonFileFirstEvent
 
std::string MultiMuonFileName
 
int32_t MultiMuonNmin
 
double NuPrdAlt
 
double PlugVtx
 
double PlugVtz
 
int32_t RanS
 
double RTarget
 
bool TIFOnly_constant
 
bool TIFOnly_linear
 
bool TrackerOnly
 
double VarRhoAir
 
double VarRhoClay
 
double VarRhoPlug
 
double VarRhoRock
 
double VarRhoWall
 
double ZCTarget
 
double ZTarget
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 21 of file CosMuoGenProducer.h.

Constructor & Destructor Documentation

◆ CosMuoGenProducer()

edm::CosMuoGenProducer::CosMuoGenProducer ( const ParameterSet pset)

Definition at line 11 of file CosMuoGenProducer.cc.

12  : //RanS(pset.getParameter<int>("RanSeed", 123456)), //get seed now from Framework
13  MinP(pset.getParameter<double>("MinP")),
14  MinP_CMS(pset.getParameter<double>("MinP_CMS")),
15  MaxP(pset.getParameter<double>("MaxP")),
16  MinT(pset.getParameter<double>("MinTheta")),
17  MaxT(pset.getParameter<double>("MaxTheta")),
18  MinPh(pset.getParameter<double>("MinPhi")),
19  MaxPh(pset.getParameter<double>("MaxPhi")),
20  MinS(pset.getParameter<double>("MinT0")),
21  MaxS(pset.getParameter<double>("MaxT0")),
22  ELSF(pset.getParameter<double>("ElossScaleFactor")),
23  RTarget(pset.getParameter<double>("RadiusOfTarget")),
24  ZTarget(pset.getParameter<double>("ZDistOfTarget")),
25  ZCTarget(pset.getParameter<double>("ZCentrOfTarget")),
26  TrackerOnly(pset.getParameter<bool>("TrackerOnly")),
27  MultiMuon(pset.getParameter<bool>("MultiMuon")),
28  MultiMuonFileName(pset.getParameter<std::string>("MultiMuonFileName")),
29  MultiMuonFileFirstEvent(pset.getParameter<int>("MultiMuonFileFirstEvent")),
30  MultiMuonNmin(pset.getParameter<int>("MultiMuonNmin")),
31  TIFOnly_constant(pset.getParameter<bool>("TIFOnly_constant")),
32  TIFOnly_linear(pset.getParameter<bool>("TIFOnly_linear")),
33  MTCCHalf(pset.getParameter<bool>("MTCCHalf")),
34  PlugVtx(pset.getParameter<double>("PlugVx")),
35  PlugVtz(pset.getParameter<double>("PlugVz")),
36  VarRhoAir(pset.getParameter<double>("RhoAir")),
37  VarRhoWall(pset.getParameter<double>("RhoWall")),
38  VarRhoRock(pset.getParameter<double>("RhoRock")),
39  VarRhoClay(pset.getParameter<double>("RhoClay")),
40  VarRhoPlug(pset.getParameter<double>("RhoPlug")),
41  ClayLayerWidth(pset.getParameter<double>("ClayWidth")),
42  MinEn(pset.getParameter<double>("MinEnu")),
43  MaxEn(pset.getParameter<double>("MaxEnu")),
44  NuPrdAlt(pset.getParameter<double>("NuProdAlt")),
45  AllMu(pset.getParameter<bool>("AcptAllMu")),
46  extCrossSect(pset.getUntrackedParameter<double>("crossSection", -1.)),
47  extFilterEff(pset.getUntrackedParameter<double>("filterEfficiency", -1.)),
48  cmVerbosity_(pset.getParameter<bool>("Verbosity")),
49  isInitialized_(false) {
50  //if not specified (i.e. negative) then use MinP also for MinP_CMS
51  if (MinP_CMS < 0)
52  MinP_CMS = MinP;
53 
54  // set up the generator
55  CosMuoGen = std::make_unique<CosmicMuonGenerator>();
56  // Begin JMM change
57  // CosMuoGen->setNumberOfEvents(numberEventsInRun());
58  CosMuoGen->setNumberOfEvents(999999999);
59  // End of JMM change
60  CosMuoGen->setRanSeed(RanS);
61  CosMuoGen->setMinP(MinP);
62  CosMuoGen->setMinP_CMS(MinP_CMS);
63  CosMuoGen->setMaxP(MaxP);
64  CosMuoGen->setMinTheta(MinT);
65  CosMuoGen->setMaxTheta(MaxT);
66  CosMuoGen->setMinPhi(MinPh);
67  CosMuoGen->setMaxPhi(MaxPh);
68  CosMuoGen->setMinT0(MinS);
69  CosMuoGen->setMaxT0(MaxS);
70  CosMuoGen->setElossScaleFactor(ELSF);
71  CosMuoGen->setRadiusOfTarget(RTarget);
72  CosMuoGen->setZDistOfTarget(ZTarget);
73  CosMuoGen->setZCentrOfTarget(ZCTarget);
74  CosMuoGen->setTrackerOnly(TrackerOnly);
75  CosMuoGen->setMultiMuon(MultiMuon);
76  CosMuoGen->setMultiMuonFileName(MultiMuonFileName);
77  CosMuoGen->setMultiMuonFileFirstEvent(MultiMuonFileFirstEvent);
78  CosMuoGen->setMultiMuonNmin(MultiMuonNmin);
79  CosMuoGen->setTIFOnly_constant(TIFOnly_constant);
80  CosMuoGen->setTIFOnly_linear(TIFOnly_linear);
81  CosMuoGen->setMTCCHalf(MTCCHalf);
82  CosMuoGen->setPlugVx(PlugVtx);
83  CosMuoGen->setPlugVz(PlugVtz);
84  CosMuoGen->setRhoAir(VarRhoAir);
85  CosMuoGen->setRhoWall(VarRhoWall);
86  CosMuoGen->setRhoRock(VarRhoRock);
87  CosMuoGen->setRhoClay(VarRhoClay);
88  CosMuoGen->setRhoPlug(VarRhoPlug);
89  CosMuoGen->setClayWidth(ClayLayerWidth);
90  CosMuoGen->setMinEnu(MinEn);
91  CosMuoGen->setMaxEnu(MaxEn);
92  CosMuoGen->setNuProdAlt(NuPrdAlt);
93  CosMuoGen->setAcptAllMu(AllMu);
94  produces<HepMCProduct>("unsmeared");
95  produces<GenEventInfoProduct>();
96  produces<GenRunInfoProduct, edm::Transition::EndRun>();
97 }

References AllMu, ClayLayerWidth, CosMuoGen, ELSF, MaxEn, MaxP, MaxPh, MaxS, MaxT, MinEn, MinP, MinP_CMS, MinPh, MinS, MinT, MTCCHalf, MultiMuon, MultiMuonFileFirstEvent, MultiMuonFileName, MultiMuonNmin, NuPrdAlt, PlugVtx, PlugVtz, RanS, RTarget, TIFOnly_constant, TIFOnly_linear, TrackerOnly, VarRhoAir, VarRhoClay, VarRhoPlug, VarRhoRock, VarRhoWall, ZCTarget, and ZTarget.

◆ ~CosMuoGenProducer()

edm::CosMuoGenProducer::~CosMuoGenProducer ( )
override

Definition at line 99 of file CosMuoGenProducer.cc.

99 { clear(); }

References clear().

Member Function Documentation

◆ beginLuminosityBlock()

void edm::CosMuoGenProducer::beginLuminosityBlock ( LuminosityBlock const &  lumi,
EventSetup const &   
)
overrideprivate

Definition at line 101 of file CosMuoGenProducer.cc.

101  {
102  if (!isInitialized_) {
103  isInitialized_ = true;
104  RandomEngineSentry<CosmicMuonGenerator> randomEngineSentry(CosMuoGen.get(), lumi.index());
105  CosMuoGen->initialize(randomEngineSentry.randomEngine());
106  }
107 }

◆ clear()

void edm::CosMuoGenProducer::clear ( void  )
private

Definition at line 125 of file CosMuoGenProducer.cc.

125 {}

◆ endLuminosityBlock()

void edm::CosMuoGenProducer::endLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
inlineoverrideprivate

Definition at line 28 of file CosMuoGenProducer.h.

28 {}

◆ endRunProduce()

void edm::CosMuoGenProducer::endRunProduce ( Run r,
const EventSetup es 
)
overrideprivate

Definition at line 109 of file CosMuoGenProducer.cc.

109  {
110  std::unique_ptr<GenRunInfoProduct> genRunInfo(new GenRunInfoProduct());
111 
112  double cs = CosMuoGen->getRate(); // flux in Hz, not s^-1m^-2
113  if (MultiMuon)
114  genRunInfo->setInternalXSec(0.);
115  else
116  genRunInfo->setInternalXSec(cs);
117  genRunInfo->setExternalXSecLO(extCrossSect);
118  genRunInfo->setFilterEfficiency(extFilterEff);
119 
120  run.put(std::move(genRunInfo));
121 
122  CosMuoGen->terminate();
123 }

References fwrapper::cs, eostools::move(), CMSCGENproducer_cfi::MultiMuon, and writedatasetfile::run.

◆ produce()

void edm::CosMuoGenProducer::produce ( Event e,
const EventSetup es 
)
overrideprivatevirtual

Implements edm::one::EDProducerBase.

Definition at line 127 of file CosMuoGenProducer.cc.

127  {
128  RandomEngineSentry<CosmicMuonGenerator> randomEngineSentry(CosMuoGen.get(), e.streamID());
129 
130  // generate event
131  if (!MultiMuon) {
132  CosMuoGen->nextEvent();
133  } else {
134  bool success = CosMuoGen->nextMultiEvent();
135  if (!success)
136  std::cout << "CosMuoGenProducer.cc: CosMuoGen->nextMultiEvent() failed!" << std::endl;
137  }
138 
139  if (Debug) {
140  std::cout << "CosMuoGenProducer.cc: CosMuoGen->EventWeight=" << CosMuoGen->EventWeight
141  << " CosMuoGen: Nmuons=" << CosMuoGen->Id_sf.size() << std::endl;
142  std::cout << "CosMuoGen->Id_at=" << CosMuoGen->Id_at << " CosMuoGen->Vx_at=" << CosMuoGen->Vx_at
143  << " CosMuoGen->Vy_at=" << CosMuoGen->Vy_at << " CosMuoGen->Vz_at=" << CosMuoGen->Vz_at
144  << " CosMuoGen->T0_at=" << CosMuoGen->T0_at << std::endl;
145  std::cout << " Px=" << CosMuoGen->Px_at << " Py=" << CosMuoGen->Py_at << " Pz=" << CosMuoGen->Pz_at << std::endl;
146  for (unsigned int i = 0; i < CosMuoGen->Id_sf.size(); ++i) {
147  std::cout << "Id_sf[" << i << "]=" << CosMuoGen->Id_sf[i] << " Vx_sf[" << i << "]=" << CosMuoGen->Vx_sf[i]
148  << " Vy_sf=" << CosMuoGen->Vy_sf[i] << " Vz_sf=" << CosMuoGen->Vz_sf[i]
149  << " T0_sf=" << CosMuoGen->T0_sf[i] << " Px_sf=" << CosMuoGen->Px_sf[i]
150  << " Py_sf=" << CosMuoGen->Py_sf[i] << " Pz_sf=" << CosMuoGen->Pz_sf[i] << std::endl;
151  std::cout << "phi_sf=" << atan2(CosMuoGen->Px_sf[i], CosMuoGen->Pz_sf[i]) << std::endl;
152  std::cout << "Id_ug[" << i << "]=" << CosMuoGen->Id_ug[i] << " Vx_ug[" << i << "]=" << CosMuoGen->Vx_ug[i]
153  << " Vy_ug=" << CosMuoGen->Vy_ug[i] << " Vz_ug=" << CosMuoGen->Vz_ug[i]
154  << " T0_ug=" << CosMuoGen->T0_ug[i] << " Px_ug=" << CosMuoGen->Px_ug[i]
155  << " Py_ug=" << CosMuoGen->Py_ug[i] << " Pz_ug=" << CosMuoGen->Pz_ug[i] << std::endl;
156  std::cout << "phi_ug=" << atan2(CosMuoGen->Px_ug[i], CosMuoGen->Pz_ug[i]) << std::endl;
157  ;
158  }
159  }
160 
161  auto fEvt = std::make_unique<HepMC::GenEvent>();
162 
163  HepMC::GenVertex* Vtx_at = new HepMC::GenVertex(HepMC::FourVector(CosMuoGen->Vx_at, //[mm]
164  CosMuoGen->Vy_at, //[mm]
165  CosMuoGen->Vz_at, //[mm]
166  CosMuoGen->T0_at)); //[mm]
167  //cout << "CosMuoGenProducer.cc: Vy_at=" << CosMuoGen->Vy_at << endl;
168  HepMC::FourVector p_at(CosMuoGen->Px_at, CosMuoGen->Py_at, CosMuoGen->Pz_at, CosMuoGen->E_at);
169  HepMC::GenParticle* Part_at = new HepMC::GenParticle(p_at, CosMuoGen->Id_at, 3); //Comment mother particle in
170  Vtx_at->add_particle_in(Part_at);
171 
172  //loop here in case of multi muon events (else just one iteration)
173  for (unsigned int i = 0; i < CosMuoGen->Id_sf.size(); ++i) {
174  HepMC::FourVector p_sf(CosMuoGen->Px_sf[i], CosMuoGen->Py_sf[i], CosMuoGen->Pz_sf[i], CosMuoGen->E_sf[i]);
175  HepMC::GenParticle* Part_sf_in = new HepMC::GenParticle(p_sf, CosMuoGen->Id_sf[i], 3); //Comment daughter particle
176  Vtx_at->add_particle_out(Part_sf_in);
177 
178  HepMC::GenVertex* Vtx_sf = new HepMC::GenVertex(
179  HepMC::FourVector(CosMuoGen->Vx_sf[i], CosMuoGen->Vy_sf[i], CosMuoGen->Vz_sf[i], CosMuoGen->T0_sf[i])); //[mm]
180  HepMC::GenParticle* Part_sf_out = new HepMC::GenParticle(p_sf, CosMuoGen->Id_sf[i], 3); //Comment daughter particle
181 
182  Vtx_sf->add_particle_in(Part_sf_in);
183  Vtx_sf->add_particle_out(Part_sf_out);
184 
185  fEvt->add_vertex(Vtx_sf); //one per muon
186 
187  HepMC::GenVertex* Vtx_ug = new HepMC::GenVertex(
188  HepMC::FourVector(CosMuoGen->Vx_ug[i], CosMuoGen->Vy_ug[i], CosMuoGen->Vz_ug[i], CosMuoGen->T0_ug[i])); //[mm]
189 
190  HepMC::FourVector p_ug(CosMuoGen->Px_ug[i], CosMuoGen->Py_ug[i], CosMuoGen->Pz_ug[i], CosMuoGen->E_ug[i]);
191  HepMC::GenParticle* Part_ug = new HepMC::GenParticle(p_ug, CosMuoGen->Id_ug[i], 1); //Final state daughter particle
192 
193  Vtx_ug->add_particle_in(Part_sf_out);
194  Vtx_ug->add_particle_out(Part_ug);
195 
196  fEvt->add_vertex(Vtx_ug); //one per muon
197  }
198 
199  fEvt->add_vertex(Vtx_at);
200  fEvt->set_signal_process_vertex(Vtx_at);
201 
202  fEvt->set_event_number(e.id().event());
203  fEvt->set_signal_process_id(13);
204 
205  fEvt->weights().push_back(CosMuoGen->EventWeight); // just one event weight
206  fEvt->weights().push_back(CosMuoGen->Trials); // int Trials number (unweighted)
207 
208  if (cmVerbosity_)
209  fEvt->print();
210 
211  std::unique_ptr<GenEventInfoProduct> genEventInfo(new GenEventInfoProduct(fEvt.get()));
212  e.put(std::move(genEventInfo));
213 
214  //This causes fEvt to be deleted
215  std::unique_ptr<HepMCProduct> CMProduct(new HepMCProduct());
216  CMProduct->addHepMCData(fEvt.release());
217  e.put(std::move(CMProduct), "unsmeared");
218 }

References gather_cfg::cout, Debug, MillePedeFileConverter_cfg::e, genParticles2HepMC_cfi::genEventInfo, GenParticle::GenParticle, ZgammaFilter_cfi::HepMCProduct, mps_fire::i, eostools::move(), CMSCGENproducer_cfi::MultiMuon, and summarizeEdmComparisonLogfiles::success.

Member Data Documentation

◆ AllMu

bool edm::CosMuoGenProducer::AllMu
private

Definition at line 78 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ ClayLayerWidth

double edm::CosMuoGenProducer::ClayLayerWidth
private

Definition at line 71 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ cmVerbosity_

bool edm::CosMuoGenProducer::cmVerbosity_
private

Definition at line 86 of file CosMuoGenProducer.h.

◆ CosMuoGen

std::unique_ptr<CosmicMuonGenerator> edm::CosMuoGenProducer::CosMuoGen
private

Definition at line 84 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ ELSF

double edm::CosMuoGenProducer::ELSF
private

Definition at line 46 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ extCrossSect

double edm::CosMuoGenProducer::extCrossSect
private

Definition at line 81 of file CosMuoGenProducer.h.

◆ extFilterEff

double edm::CosMuoGenProducer::extFilterEff
private

Definition at line 82 of file CosMuoGenProducer.h.

◆ isInitialized_

bool edm::CosMuoGenProducer::isInitialized_
private

Definition at line 88 of file CosMuoGenProducer.h.

◆ MaxEn

double edm::CosMuoGenProducer::MaxEn
private

Definition at line 75 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MaxP

double edm::CosMuoGenProducer::MaxP
private

Definition at line 39 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MaxPh

double edm::CosMuoGenProducer::MaxPh
private

Definition at line 43 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MaxS

double edm::CosMuoGenProducer::MaxS
private

Definition at line 45 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MaxT

double edm::CosMuoGenProducer::MaxT
private

Definition at line 41 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MinEn

double edm::CosMuoGenProducer::MinEn
private

Definition at line 74 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MinP

double edm::CosMuoGenProducer::MinP
private

Definition at line 37 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MinP_CMS

double edm::CosMuoGenProducer::MinP_CMS
private

Definition at line 38 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MinPh

double edm::CosMuoGenProducer::MinPh
private

Definition at line 42 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MinS

double edm::CosMuoGenProducer::MinS
private

Definition at line 44 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MinT

double edm::CosMuoGenProducer::MinT
private

Definition at line 40 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MTCCHalf

bool edm::CosMuoGenProducer::MTCCHalf
private

Definition at line 58 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MultiMuon

bool edm::CosMuoGenProducer::MultiMuon
private

Definition at line 52 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MultiMuonFileFirstEvent

int32_t edm::CosMuoGenProducer::MultiMuonFileFirstEvent
private

Definition at line 54 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MultiMuonFileName

std::string edm::CosMuoGenProducer::MultiMuonFileName
private

Definition at line 53 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ MultiMuonNmin

int32_t edm::CosMuoGenProducer::MultiMuonNmin
private

Definition at line 55 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ NuPrdAlt

double edm::CosMuoGenProducer::NuPrdAlt
private

Definition at line 76 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ PlugVtx

double edm::CosMuoGenProducer::PlugVtx
private

Definition at line 62 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ PlugVtz

double edm::CosMuoGenProducer::PlugVtz
private

Definition at line 63 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ RanS

int32_t edm::CosMuoGenProducer::RanS
private

Definition at line 36 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ RTarget

double edm::CosMuoGenProducer::RTarget
private

Definition at line 47 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ TIFOnly_constant

bool edm::CosMuoGenProducer::TIFOnly_constant
private

Definition at line 56 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ TIFOnly_linear

bool edm::CosMuoGenProducer::TIFOnly_linear
private

Definition at line 57 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ TrackerOnly

bool edm::CosMuoGenProducer::TrackerOnly
private

Definition at line 51 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ VarRhoAir

double edm::CosMuoGenProducer::VarRhoAir
private

Definition at line 66 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ VarRhoClay

double edm::CosMuoGenProducer::VarRhoClay
private

Definition at line 69 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ VarRhoPlug

double edm::CosMuoGenProducer::VarRhoPlug
private

Definition at line 70 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ VarRhoRock

double edm::CosMuoGenProducer::VarRhoRock
private

Definition at line 68 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ VarRhoWall

double edm::CosMuoGenProducer::VarRhoWall
private

Definition at line 67 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ ZCTarget

double edm::CosMuoGenProducer::ZCTarget
private

Definition at line 50 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

◆ ZTarget

double edm::CosMuoGenProducer::ZTarget
private

Definition at line 48 of file CosMuoGenProducer.h.

Referenced by CosMuoGenProducer().

GenEventInfoProduct
Definition: GenEventInfoProduct.h:17
edm::CosMuoGenProducer::VarRhoClay
double VarRhoClay
Definition: CosMuoGenProducer.h:69
edm::CosMuoGenProducer::VarRhoAir
double VarRhoAir
Definition: CosMuoGenProducer.h:66
mps_fire.i
i
Definition: mps_fire.py:428
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:47
edm::CosMuoGenProducer::TIFOnly_constant
bool TIFOnly_constant
Definition: CosMuoGenProducer.h:56
ZgammaFilter_cfi.HepMCProduct
HepMCProduct
Definition: ZgammaFilter_cfi.py:9
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::CosMuoGenProducer::MaxPh
double MaxPh
Definition: CosMuoGenProducer.h:43
edm::CosMuoGenProducer::MultiMuonFileName
std::string MultiMuonFileName
Definition: CosMuoGenProducer.h:53
edm::CosMuoGenProducer::MaxT
double MaxT
Definition: CosMuoGenProducer.h:41
edm::CosMuoGenProducer::MinP_CMS
double MinP_CMS
Definition: CosMuoGenProducer.h:38
edm::CosMuoGenProducer::PlugVtz
double PlugVtz
Definition: CosMuoGenProducer.h:63
edm::CosMuoGenProducer::MinEn
double MinEn
Definition: CosMuoGenProducer.h:74
edm::CosMuoGenProducer::VarRhoPlug
double VarRhoPlug
Definition: CosMuoGenProducer.h:70
Debug
const bool Debug
Definition: CosmicMuonParameters.h:12
edm::CosMuoGenProducer::cmVerbosity_
bool cmVerbosity_
Definition: CosMuoGenProducer.h:86
edm::CosMuoGenProducer::ZCTarget
double ZCTarget
Definition: CosMuoGenProducer.h:50
edm::CosMuoGenProducer::MaxP
double MaxP
Definition: CosMuoGenProducer.h:39
edm::CosMuoGenProducer::ZTarget
double ZTarget
Definition: CosMuoGenProducer.h:48
edm::CosMuoGenProducer::MinP
double MinP
Definition: CosMuoGenProducer.h:37
edm::CosMuoGenProducer::TIFOnly_linear
bool TIFOnly_linear
Definition: CosMuoGenProducer.h:57
edm::CosMuoGenProducer::VarRhoWall
double VarRhoWall
Definition: CosMuoGenProducer.h:67
summarizeEdmComparisonLogfiles.success
success
Definition: summarizeEdmComparisonLogfiles.py:114
edm::CosMuoGenProducer::AllMu
bool AllMu
Definition: CosMuoGenProducer.h:78
edm::CosMuoGenProducer::RTarget
double RTarget
Definition: CosMuoGenProducer.h:47
GenRunInfoProduct
Definition: GenRunInfoProduct.h:8
edm::CosMuoGenProducer::clear
void clear()
Definition: CosMuoGenProducer.cc:125
edm::CosMuoGenProducer::VarRhoRock
double VarRhoRock
Definition: CosMuoGenProducer.h:68
edm::CosMuoGenProducer::NuPrdAlt
double NuPrdAlt
Definition: CosMuoGenProducer.h:76
edm::CosMuoGenProducer::MinT
double MinT
Definition: CosMuoGenProducer.h:40
edm::CosMuoGenProducer::ELSF
double ELSF
Definition: CosMuoGenProducer.h:46
edm::CosMuoGenProducer::RanS
int32_t RanS
Definition: CosMuoGenProducer.h:36
edm::CosMuoGenProducer::CosMuoGen
std::unique_ptr< CosmicMuonGenerator > CosMuoGen
Definition: CosMuoGenProducer.h:84
edm::CosMuoGenProducer::isInitialized_
bool isInitialized_
Definition: CosMuoGenProducer.h:88
edm::CosMuoGenProducer::PlugVtx
double PlugVtx
Definition: CosMuoGenProducer.h:62
edm::CosMuoGenProducer::ClayLayerWidth
double ClayLayerWidth
Definition: CosMuoGenProducer.h:71
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::CosMuoGenProducer::MaxEn
double MaxEn
Definition: CosMuoGenProducer.h:75
edm::CosMuoGenProducer::MultiMuonNmin
int32_t MultiMuonNmin
Definition: CosMuoGenProducer.h:55
edm::CosMuoGenProducer::MinS
double MinS
Definition: CosMuoGenProducer.h:44
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
eostools.move
def move(src, dest)
Definition: eostools.py:511
writedatasetfile.run
run
Definition: writedatasetfile.py:27
genParticles2HepMC_cfi.genEventInfo
genEventInfo
Definition: genParticles2HepMC_cfi.py:6
edm::CosMuoGenProducer::extFilterEff
double extFilterEff
Definition: CosMuoGenProducer.h:82
edm::CosMuoGenProducer::TrackerOnly
bool TrackerOnly
Definition: CosMuoGenProducer.h:51
edm::CosMuoGenProducer::MTCCHalf
bool MTCCHalf
Definition: CosMuoGenProducer.h:58
edm::CosMuoGenProducer::MinPh
double MinPh
Definition: CosMuoGenProducer.h:42
lumi
Definition: LumiSectionData.h:20
edm::CosMuoGenProducer::MaxS
double MaxS
Definition: CosMuoGenProducer.h:45
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::CosMuoGenProducer::extCrossSect
double extCrossSect
Definition: CosMuoGenProducer.h:81
edm::CosMuoGenProducer::MultiMuon
bool MultiMuon
Definition: CosMuoGenProducer.h:52
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
edm::CosMuoGenProducer::MultiMuonFileFirstEvent
int32_t MultiMuonFileFirstEvent
Definition: CosMuoGenProducer.h:54