6 #include "CLHEP/Random/RandFlat.h" 7 #include "CLHEP/Random/RandPoissonQ.h" 8 #include "CLHEP/Random/RandGaussQ.h" 15 averageNoiseRate_(
config.getParameter<double>(
"averageNoiseRate")),
16 bxWidth_(
config.getParameter<double>(
"bxWidth")),
17 minBunch_(
config.getParameter<
int>(
"minBunch")),
18 maxBunch_(
config.getParameter<
int>(
"maxBunch")) {}
24 CLHEP::HepRandomEngine* engine,
28 const int nstrips(
roll->nstrips());
29 double trStripArea(0.0);
30 if (gemId.region() == 0) {
31 throw cms::Exception(
"Geometry") <<
"GEMNoiseModel::simulate() - this GEM id is from barrel, which cannot happen.";
34 const float striplength(top_->stripLength());
35 trStripArea = (
roll->pitch()) * striplength;
36 float trArea(trStripArea * nstrips);
40 CLHEP::RandPoissonQ randPoissonQ(*engine, aveIntrinsicNoise);
41 const int n_intrHits(randPoissonQ.fire());
43 for (
int k = 0;
k < n_intrHits;
k++) {
44 const int centralStrip(static_cast<int>(CLHEP::RandFlat::shoot(engine, 1, nstrips)));
45 const int time_hit(static_cast<int>(CLHEP::RandFlat::shoot(engine, nBxing)) +
minBunch_);
46 strips_.emplace(centralStrip, time_hit);
void simulate(const GEMEtaPartition *, const edm::PSimHitContainer &, CLHEP::HepRandomEngine *, Strips &, DetectorHitMap &) override
GEMNoiseModel(const edm::ParameterSet &)
std::multimap< std::pair< unsigned int, int >, const PSimHit *, std::less< std::pair< unsigned int, int > > > DetectorHitMap
std::set< std::pair< int, int > > Strips
std::vector< PSimHit > PSimHitContainer
~GEMNoiseModel() override