CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GEMNoiseModel Class Reference

#include <GEMNoiseModel.h>

Inheritance diagram for GEMNoiseModel:
GEMDigiModel

Public Member Functions

 GEMNoiseModel (const edm::ParameterSet &)
 
void simulate (const GEMEtaPartition *, const edm::PSimHitContainer &, CLHEP::HepRandomEngine *, Strips &, DetectorHitMap &) override
 
 ~GEMNoiseModel () override
 
- Public Member Functions inherited from GEMDigiModel
void setGeometry (const GEMGeometry *geom)
 
virtual ~GEMDigiModel ()
 

Private Attributes

double averageNoiseRate_
 
double bxWidth_
 
int maxBunch_
 
int minBunch_
 

Additional Inherited Members

- Protected Member Functions inherited from GEMDigiModel
 GEMDigiModel (const edm::ParameterSet &)
 
- Protected Attributes inherited from GEMDigiModel
const GEMGeometrygeometry_
 

Detailed Description

Definition at line 23 of file GEMNoiseModel.h.

Constructor & Destructor Documentation

◆ GEMNoiseModel()

GEMNoiseModel::GEMNoiseModel ( const edm::ParameterSet config)

Definition at line 13 of file GEMNoiseModel.cc.

15  averageNoiseRate_(config.getParameter<double>("averageNoiseRate")),
16  bxWidth_(config.getParameter<double>("bxWidth")),
17  minBunch_(config.getParameter<int>("minBunch")),
18  maxBunch_(config.getParameter<int>("maxBunch")) {}

◆ ~GEMNoiseModel()

GEMNoiseModel::~GEMNoiseModel ( )
override

Definition at line 20 of file GEMNoiseModel.cc.

20 {}

Member Function Documentation

◆ simulate()

void GEMNoiseModel::simulate ( const GEMEtaPartition roll,
const edm::PSimHitContainer ,
CLHEP::HepRandomEngine *  engine,
Strips strips_,
DetectorHitMap detectorHitMap_ 
)
overridevirtual

Implements GEMDigiModel.

Definition at line 22 of file GEMNoiseModel.cc.

26  {
27  const GEMDetId& gemId(roll->id());
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.";
32  }
33  const GEMStripTopology* top_(dynamic_cast<const GEMStripTopology*>(&(roll->topology())));
34  const float striplength(top_->stripLength());
35  trStripArea = (roll->pitch()) * striplength;
36  float trArea(trStripArea * nstrips);
37  const int nBxing(maxBunch_ - minBunch_ + 1);
38  //simulate intrinsic noise
39  const double aveIntrinsicNoise(averageNoiseRate_ * nBxing * trArea * bxWidth_);
40  CLHEP::RandPoissonQ randPoissonQ(*engine, aveIntrinsicNoise);
41  const int n_intrHits(randPoissonQ.fire());
42 
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);
47  }
48  //end simulate intrinsic noise
49 
50  return;
51 }

References averageNoiseRate_, bxWidth_, Exception, GEMEtaPartition::id(), dqmdumpme::k, maxBunch_, minBunch_, GEMEtaPartition::nstrips(), GEMEtaPartition::pitch(), and GEMEtaPartition::topology().

Member Data Documentation

◆ averageNoiseRate_

double GEMNoiseModel::averageNoiseRate_
private

Definition at line 33 of file GEMNoiseModel.h.

Referenced by simulate().

◆ bxWidth_

double GEMNoiseModel::bxWidth_
private

Definition at line 34 of file GEMNoiseModel.h.

Referenced by simulate().

◆ maxBunch_

int GEMNoiseModel::maxBunch_
private

Definition at line 36 of file GEMNoiseModel.h.

Referenced by simulate().

◆ minBunch_

int GEMNoiseModel::minBunch_
private

Definition at line 35 of file GEMNoiseModel.h.

Referenced by simulate().

GEMNoiseModel::maxBunch_
int maxBunch_
Definition: GEMNoiseModel.h:36
GEMEtaPartition::nstrips
int nstrips() const
number of readout strips in partition
Definition: GEMEtaPartition.cc:24
GEMStripTopology
Definition: GEMStripTopology.h:11
config
Definition: config.py:1
GEMNoiseModel::averageNoiseRate_
double averageNoiseRate_
Definition: GEMNoiseModel.h:33
GEMNoiseModel::minBunch_
int minBunch_
Definition: GEMNoiseModel.h:35
dqmdumpme.k
k
Definition: dqmdumpme.py:60
GEMDetId
Definition: GEMDetId.h:18
GEMEtaPartition::topology
const Topology & topology() const override
Definition: GEMEtaPartition.cc:14
GEMEtaPartition::id
GEMDetId id() const
Definition: GEMEtaPartition.h:18
GEMNoiseModel::bxWidth_
double bxWidth_
Definition: GEMNoiseModel.h:34
GEMEtaPartition::pitch
float pitch() const
Definition: GEMEtaPartition.cc:41
GEMDigiModel::GEMDigiModel
GEMDigiModel(const edm::ParameterSet &)
Definition: GEMDigiModel.h:48
Exception
Definition: hltDiff.cc:246