1 #ifndef SimMuon_GEMDigitizer_GEMDigiProducer_h 2 #define SimMuon_GEMDigitizer_GEMDigiProducer_h 34 class HepRandomEngine;
62 produces<GEMDigiCollection>();
63 produces<GEMDigiSimLinks>(
"GEM");
66 if (!rng.isAvailable()) {
68 <<
"GEMDigiProducer::GEMDigiProducer() - RandomNumberGeneratorService is not present in configuration file.\n" 69 <<
"Add the service in the configuration file or remove the modules that require it.";
76 geom_token_ = esConsumes<GEMGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
86 desc.add<
double>(
"signalPropagationSpeed", 0.66);
87 desc.add<
double>(
"timeResolution", 5.);
88 desc.add<
double>(
"timeJitter", 1.0);
89 desc.add<
double>(
"averageShapingTime", 50.0);
90 desc.add<
double>(
"averageEfficiency", 0.98);
91 desc.add<
double>(
"averageNoiseRate", 0.001);
95 desc.add<
int>(
"minBunch", -5);
96 desc.add<
int>(
"maxBunch", 3);
98 desc.add<
bool>(
"fixedRollRadius",
true);
100 desc.add<
bool>(
"digitizeOnlyMuons",
false);
101 desc.add<
bool>(
"simulateBkgNoise",
false);
103 desc.add<
bool>(
"simulateNoiseCLS",
true);
104 desc.add<
bool>(
"simulateElectronBkg",
true);
106 desc.add<
bool>(
"simulateIntrinsicNoise",
false);
107 desc.add<
bool>(
"bx0filter",
false);
109 desc.add<
double>(
"instLumi", 7.5);
111 desc.add<
double>(
"rateFact", 1.0);
113 desc.add<
double>(
"bxWidth", 25E-9);
114 desc.add<
double>(
"referenceInstLumi", 5.);
116 desc.add<
double>(
"resolutionX", 0.03);
122 desc.add<
double>(
"GE11ModNeuBkgParam0", 5710.23);
123 desc.add<
double>(
"GE11ModNeuBkgParam1", -43.3928);
124 desc.add<
double>(
"GE11ModNeuBkgParam2", 0.0863681);
125 desc.add<
double>(
"GE21ModNeuBkgParam0", 1440.44);
126 desc.add<
double>(
"GE21ModNeuBkgParam1", -7.48607);
127 desc.add<
double>(
"GE21ModNeuBkgParam2", 0.0103078);
128 desc.add<
double>(
"GE11ElecBkgParam0", 406.249);
129 desc.add<
double>(
"GE11ElecBkgParam1", -2.90939);
130 desc.add<
double>(
"GE11ElecBkgParam2", 0.00548191);
131 desc.add<
double>(
"GE21ElecBkgParam0", 97.0505);
132 desc.add<
double>(
"GE21ElecBkgParam1", -43.3928);
133 desc.add<
double>(
"GE21ElecBkgParam2", 00.000550599);
135 descriptions.
add(
"simMuonGEMDigisDef",
desc);
146 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
154 auto digis = std::make_unique<GEMDigiCollection>();
155 auto gemDigiSimLinks = std::make_unique<GEMDigiSimLinks>();
158 std::map<uint32_t, edm::PSimHitContainer> hitMap;
166 for (
const auto& roll : etaPartitions) {
168 const uint32_t rawId(detId.rawId());
169 const auto&
simHits(hitMap[rawId]);
171 LogDebug(
"GEMDigiProducer") <<
"GEMDigiProducer: found " <<
simHits.size() <<
" hit(s) in eta partition" << rawId;
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
T const * product() const
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
~GEMDigiProducer() override
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geom_token_
GEMDigiProducer(const edm::ParameterSet &ps)
std::unique_ptr< GEMDigiModule > gemDigiModule_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< CrossingFrame< PSimHit > > cf_token
void beginRun(const edm::Run &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const GEMGeometry * geometry_
void produce(edm::Event &, const edm::EventSetup &) override
edm::DetSetVector< GEMDigiSimLink > GEMDigiSimLinks
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.