1 #ifndef SimMuon_GEMDigitizer_GEMDigiProducer_h
2 #define SimMuon_GEMDigitizer_GEMDigiProducer_h
35 class HepRandomEngine;
63 produces<GEMDigiCollection>();
64 produces<GEMDigiSimLinks>(
"GEM");
67 if (!rng.isAvailable()) {
69 <<
"GEMDigiProducer::GEMDigiProducer() - RandomNumberGeneratorService is not present in configuration file.\n"
70 <<
"Add the service in the configuration file or remove the modules that require it.";
77 geom_token_ = esConsumes<GEMGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
87 desc.
add<
double>(
"signalPropagationSpeed", 0.66);
88 desc.
add<
double>(
"timeResolution", 5.);
89 desc.
add<
double>(
"timeJitter", 1.0);
90 desc.
add<
double>(
"averageShapingTime", 50.0);
91 desc.
add<
double>(
"averageEfficiency", 0.98);
92 desc.
add<
double>(
"averageNoiseRate", 0.001);
96 desc.
add<
int>(
"minBunch", -5);
97 desc.
add<
int>(
"maxBunch", 3);
99 desc.
add<
bool>(
"fixedRollRadius",
true);
101 desc.
add<
bool>(
"digitizeOnlyMuons",
false);
102 desc.
add<
bool>(
"simulateBkgNoise",
false);
104 desc.
add<
bool>(
"simulateNoiseCLS",
true);
105 desc.
add<
bool>(
"simulateElectronBkg",
true);
107 desc.
add<
bool>(
"simulateIntrinsicNoise",
false);
108 desc.
add<
bool>(
"bx0filter",
false);
110 desc.
add<
double>(
"instLumi", 7.5);
112 desc.
add<
double>(
"rateFact", 1.0);
114 desc.
add<
double>(
"bxWidth", 25E-9);
115 desc.
add<
double>(
"referenceInstLumi", 5.);
117 desc.
add<
double>(
"resolutionX", 0.03);
123 desc.
add<
double>(
"GE11ModNeuBkgParam0", 5710.23);
124 desc.
add<
double>(
"GE11ModNeuBkgParam1", -43.3928);
125 desc.
add<
double>(
"GE11ModNeuBkgParam2", 0.0863681);
126 desc.
add<
double>(
"GE21ModNeuBkgParam0", 1440.44);
127 desc.
add<
double>(
"GE21ModNeuBkgParam1", -7.48607);
128 desc.
add<
double>(
"GE21ModNeuBkgParam2", 0.0103078);
129 desc.
add<
double>(
"GE11ElecBkgParam0", 406.249);
130 desc.
add<
double>(
"GE11ElecBkgParam1", -2.90939);
131 desc.
add<
double>(
"GE11ElecBkgParam2", 0.00548191);
132 desc.
add<
double>(
"GE21ElecBkgParam0", 97.0505);
133 desc.
add<
double>(
"GE21ElecBkgParam1", -43.3928);
134 desc.
add<
double>(
"GE21ElecBkgParam2", 00.000550599);
136 descriptions.
add(
"simMuonGEMDigisDef", desc);
155 auto digis = std::make_unique<GEMDigiCollection>();
156 auto gemDigiSimLinks = std::make_unique<GEMDigiSimLinks>();
159 std::map<uint32_t, edm::PSimHitContainer> hitMap;
160 for (
const auto&
hit : hits) {
167 for (
const auto& roll : etaPartitions) {
169 const uint32_t rawId(detId.rawId());
170 const auto&
simHits(hitMap[rawId]);
172 LogDebug(
"GEMDigiProducer") <<
"GEMDigiProducer: found " << simHits.size() <<
" hit(s) in eta partition" << rawId;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
~GEMDigiProducer() override
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geom_token_
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
GEMDigiProducer(const edm::ParameterSet &ps)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::unique_ptr< GEMDigiModule > gemDigiModule_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< CrossingFrame< PSimHit > > cf_token
T const * product() const
void beginRun(const edm::Run &, const edm::EventSetup &) override
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const GEMGeometry * geometry_
void produce(edm::Event &, const edm::EventSetup &) override
StreamID streamID() const
edm::DetSetVector< GEMDigiSimLink > GEMDigiSimLinks
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const