CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
RPCSimAsymmetricCls Class Reference

#include <RPCSimAsymmetricCls.h>

Inheritance diagram for RPCSimAsymmetricCls:
RPCSim

Public Member Functions

int getClSize (float posX, CLHEP::HepRandomEngine *)
 
int getClSize (uint32_t id, float posX, CLHEP::HepRandomEngine *)
 
 RPCSimAsymmetricCls (const edm::ParameterSet &config)
 
void simulate (const RPCRoll *roll, const edm::PSimHitContainer &rpcHits, CLHEP::HepRandomEngine *) override
 
void simulateNoise (const RPCRoll *, CLHEP::HepRandomEngine *) override
 
unsigned int slice (float posX)
 
 ~RPCSimAsymmetricCls () override
 
- Public Member Functions inherited from RPCSim
const DigiSimLinksdigiSimLinks () const
 
virtual void fillDigis (int rollDetId, RPCDigiCollection &digis)
 
RPCSimSetUpgetRPCSimSetUp ()
 
const RPCDigiSimLinksrpcDigiSimLinks () const
 
void setRPCSimSetUp (RPCSimSetUp *setup)
 
virtual ~RPCSim ()
 

Private Member Functions

void init () override
 

Private Attributes

RPCSynchronizer_rpcSync
 
double aveCls
 
double aveEff
 
std::vector< double > clsForDetId
 
std::map< int, std::vector
< double > > 
clsMap
 
double dtimCs
 
bool eledig
 
double frate
 
double gate
 
std::ifstream * infile
 
double lbGate
 
int N_hits
 
int nbxing
 
double rate
 
double resEle
 
double resRPC
 
bool rpcdigiprint
 
double sspeed
 
std::vector< double > sum_clsize
 
double timOff
 

Additional Inherited Members

- Public Types inherited from RPCSim
typedef edm::DetSet
< StripDigiSimLink
DigiSimLinks
 
typedef edm::DetSet
< RPCDigiSimLink
RPCDigiSimLinks
 
- Protected Types inherited from RPCSim
typedef std::multimap
< std::pair< unsigned int, int >
, const PSimHit *, std::less
< std::pair< unsigned int, int > > > 
DetectorHitMap
 
- Protected Member Functions inherited from RPCSim
virtual void addLinks (unsigned int strip, int bx)
 
 RPCSim (const edm::ParameterSet &config)
 
- Protected Attributes inherited from RPCSim
std::set< RPCDigiirpc_digis
 
std::set< std::pair< int, int > > strips
 
DetectorHitMap theDetectorHitMap
 
DigiSimLinks theDigiSimLinks
 
RPCDigiSimLinks theRpcDigiSimLinks
 
RPCSimSetUptheSimSetUp
 

Detailed Description

Definition at line 30 of file RPCSimAsymmetricCls.h.

Constructor & Destructor Documentation

RPCSimAsymmetricCls::RPCSimAsymmetricCls ( const edm::ParameterSet config)

Definition at line 40 of file RPCSimAsymmetricCls.cc.

References _rpcSync, aveCls, aveEff, gather_cfg::cout, dtimCs, eledig, frate, gate, edm::ParameterSet::getParameter(), lbGate, nbxing, rate, resEle, resRPC, rpcdigiprint, sspeed, and timOff.

40  : RPCSim(config) {
41  aveEff = config.getParameter<double>("averageEfficiency");
42  aveCls = config.getParameter<double>("averageClusterSize");
43  resRPC = config.getParameter<double>("timeResolution");
44  timOff = config.getParameter<double>("timingRPCOffset");
45  dtimCs = config.getParameter<double>("deltatimeAdjacentStrip");
46  resEle = config.getParameter<double>("timeJitter");
47  sspeed = config.getParameter<double>("signalPropagationSpeed");
48  lbGate = config.getParameter<double>("linkGateWidth");
49  rpcdigiprint = config.getParameter<bool>("printOutDigitizer");
50  eledig = config.getParameter<bool>("digitizeElectrons");
51 
52  rate = config.getParameter<double>("Rate");
53  nbxing = config.getParameter<int>("Nbxing");
54  gate = config.getParameter<double>("Gate");
55  frate = config.getParameter<double>("Frate");
56 
57  if (rpcdigiprint) {
58  std::cout << "Average Efficiency = " << aveEff << std::endl;
59  std::cout << "Average Cluster Size = " << aveCls << " strips" << std::endl;
60  std::cout << "RPC Time Resolution = " << resRPC << " ns" << std::endl;
61  std::cout << "RPC Signal formation time = " << timOff << " ns" << std::endl;
62  std::cout << "RPC adjacent strip delay = " << dtimCs << " ns" << std::endl;
63  std::cout << "Electronic Jitter = " << resEle << " ns" << std::endl;
64  std::cout << "Signal propagation time = " << sspeed << " x c" << std::endl;
65  std::cout << "Link Board Gate Width = " << lbGate << " ns" << std::endl;
66  }
67 
68  _rpcSync = new RPCSynchronizer(config);
69 }
RPCSim(const edm::ParameterSet &config)
Definition: RPCSim.cc:5
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
RPCSynchronizer * _rpcSync
tuple cout
Definition: gather_cfg.py:144
RPCSimAsymmetricCls::~RPCSimAsymmetricCls ( )
override

Definition at line 71 of file RPCSimAsymmetricCls.cc.

References _rpcSync.

71 { delete _rpcSync; }
RPCSynchronizer * _rpcSync

Member Function Documentation

int RPCSimAsymmetricCls::getClSize ( float  posX,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 92 of file RPCSimAsymmetricCls.cc.

References clsMap, cms::cuda::func, RPCSimSetUp::getClsMap(), RPCSim::getRPCSimSetUp(), LogDebug, min(), and sum_clsize.

Referenced by simulate().

92  {
93  std::map<int, std::vector<double> > clsMap = getRPCSimSetUp()->getClsMap();
94 
95  int cnt = 1;
96  int min = 1;
97  double func = 0.0;
98  std::vector<double> sum_clsize;
99 
100  double rr_cl = CLHEP::RandFlat::shoot(engine);
101  LogDebug("RPCSimAsymmetricCls") << "[RPCSimAsymmetricCls::getClSize] Fired RandFlat :: " << rr_cl;
102 
103  if (0.0 <= posX && posX < 0.2) {
104  func = (clsMap[1])[(clsMap[1]).size() - 1] * (rr_cl);
105  sum_clsize = clsMap[1];
106  }
107  if (0.2 <= posX && posX < 0.4) {
108  func = (clsMap[2])[(clsMap[2]).size() - 1] * (rr_cl);
109  sum_clsize = clsMap[2];
110  }
111  if (0.4 <= posX && posX < 0.6) {
112  func = (clsMap[3])[(clsMap[3]).size() - 1] * (rr_cl);
113  sum_clsize = clsMap[3];
114  }
115  if (0.6 <= posX && posX < 0.8) {
116  func = (clsMap[4])[(clsMap[4]).size() - 1] * (rr_cl);
117  sum_clsize = clsMap[4];
118  }
119  if (0.8 <= posX && posX < 1.0) {
120  func = (clsMap[5])[(clsMap[5]).size() - 1] * (rr_cl);
121  sum_clsize = clsMap[5];
122  }
123 
124  for (vector<double>::iterator iter = sum_clsize.begin(); iter != sum_clsize.end(); ++iter) {
125  cnt++;
126  if (func > (*iter)) {
127  min = cnt;
128  } else if (func < (*iter)) {
129  break;
130  }
131  }
132  return min;
133 }
RPCSimSetUp * getRPCSimSetUp()
Definition: RPCSim.h:45
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
std::map< int, std::vector< double > > clsMap
std::vector< double > sum_clsize
const std::map< int, std::vector< double > > & getClsMap()
Definition: RPCSimSetUp.cc:450
T min(T a, T b)
Definition: MathUtil.h:58
#define LogDebug(id)
int RPCSimAsymmetricCls::getClSize ( uint32_t  id,
float  posX,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 73 of file RPCSimAsymmetricCls.cc.

References clsForDetId, RPCSimSetUp::getAsymmetricClsDistribution(), RPCSim::getRPCSimSetUp(), mps_fire::i, LogDebug, min(), and slice().

73  {
74  std::vector<double> clsForDetId = getRPCSimSetUp()->getAsymmetricClsDistribution(id, slice(posX));
75 
76  int cnt = 1;
77  int min = 1;
78 
79  double rr_cl = CLHEP::RandFlat::shoot(engine);
80  LogDebug("RPCSimAsymmetricCls") << "[RPCSimAsymmetricCls::getClSize] Fired RandFlat :: " << rr_cl;
81  for (unsigned int i = 0; i < clsForDetId.size(); i++) {
82  cnt++;
83  if (rr_cl > clsForDetId[i]) {
84  min = cnt;
85  } else if (rr_cl < clsForDetId[i]) {
86  break;
87  }
88  }
89  return min;
90 }
const std::vector< double > & getAsymmetricClsDistribution(uint32_t id, uint32_t slice)
Definition: RPCSimSetUp.cc:477
RPCSimSetUp * getRPCSimSetUp()
Definition: RPCSim.h:45
std::vector< double > clsForDetId
T min(T a, T b)
Definition: MathUtil.h:58
unsigned int slice(float posX)
#define LogDebug(id)
void RPCSimAsymmetricCls::init ( void  )
inlineoverrideprivatevirtual

Implements RPCSim.

Definition at line 44 of file RPCSimAsymmetricCls.h.

44 {};
void RPCSimAsymmetricCls::simulate ( const RPCRoll roll,
const edm::PSimHitContainer rpcHits,
CLHEP::HepRandomEngine *  engine 
)
overridevirtual

Implements RPCSim.

Definition at line 135 of file RPCSimAsymmetricCls.cc.

References _rpcSync, RPCRoll::centreOfStrip(), Topology::channel(), haddnano::cl, edm::DetSet< T >::clear(), eledig, RPCSimSetUp::getAsymmetryForCls(), getClSize(), RPCSim::getRPCSimSetUp(), RPCSynchronizer::getSimHitBx(), mps_fire::i, RPCRoll::id(), LogDebug, RPCGeomServ::name(), RPCRoll::nstrips(), hltrates_dqm_sourceclient-live_cfg::offset, DetId::rawId(), RPCSynchronizer::setRPCSimSetUp(), slice(), RPCRoll::specs(), AlCaHLTBitMon_QueryRunRegistry::string, RPCRoll::strip(), RPCSim::strips, RPCSim::theDetectorHitMap, RPCSim::theRpcDigiSimLinks, RPCRollSpecs::topology(), and PV3DBase< T, PVType, FrameType >::x().

137  {
140  theDetectorHitMap.clear();
142 
143  RPCDetId rpcId = roll->id();
144  RPCGeomServ RPCname(rpcId);
145  std::string nameRoll = RPCname.name();
146 
147  const Topology& topology = roll->specs()->topology();
148  for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin(); _hit != rpcHits.end(); ++_hit) {
149  if (!eledig && _hit->particleType() == 11)
150  continue;
151  // Here I hould check if the RPC are up side down;
152  const LocalPoint& entr = _hit->entryPoint();
153 
154  int time_hit = _rpcSync->getSimHitBx(&(*_hit), engine);
155  float posX = roll->strip(_hit->localPosition()) - static_cast<int>(roll->strip(_hit->localPosition()));
156 
157  std::vector<float> veff = (getRPCSimSetUp())->getEff(rpcId.rawId());
158 
159 #ifdef EDM_ML_DEBUG
160  std::stringstream veffstream;
161  veffstream << "[";
162  for (std::vector<float>::iterator veffIt = veff.begin(); veffIt != veff.end(); ++veffIt) {
163  veffstream << (*veffIt) << ",";
164  }
165  veffstream << "]";
166  std::string veffstr = veffstream.str();
167  LogDebug("RPCSimAsymmetricCls") << "Get Eff from RPCSimSetup for detId = " << rpcId.rawId() << " :: " << veffstr;
168 #endif
169 
170  // Efficiency
171  int centralStrip = topology.channel(entr) + 1;
172  float fire = CLHEP::RandFlat::shoot(engine);
173  LogDebug("RPCSimAsymmetricCls") << "[RPCSimAsymmetricCls::simulate] Fired RandFlat :: " << fire << " --> < "
174  << veff[centralStrip - 1] << " ? --> " << ((fire < veff[centralStrip - 1]) ? 1 : 0);
175 
176  if (fire < veff[centralStrip - 1]) {
177  LogDebug("RPCSimAsymmetricCls") << "Detector is Efficient for this simhit";
178 
179  int fstrip = centralStrip;
180  int lstrip = centralStrip;
181 
182  // Compute the cluster size
183 
184  //double w = CLHEP::RandFlat::shoot(engine);
185  //LogDebug ("RPCSimAsymmetricCls")<<"[RPCSimAsymmetricCls::simulate] Fired RandFlat :: "<<w<<" (w is not used)";
186  //if (w < 1.e-10) w=1.e-10;
187 
188  int clsize = this->getClSize(rpcId.rawId(), posX, engine); // This is for cluster size chamber by chamber
189  LogDebug("RPCSimAsymmetricCls") << "Clustersize = " << clsize;
190 
191  std::vector<int> cls;
192 
193  cls.push_back(centralStrip);
194  if (clsize > 1) {
195  for (int cl = 0; cl < (clsize - 1) / 2; cl++) {
196  if (centralStrip - cl - 1 >= 1) {
197  fstrip = centralStrip - cl - 1;
198  cls.push_back(fstrip);
199  }
200  if (centralStrip + cl + 1 <= roll->nstrips()) {
201  lstrip = centralStrip + cl + 1;
202  cls.push_back(lstrip);
203  }
204  }
205  if (clsize % 2 == 0) { //even cluster size is a special case
206  if (clsize > 5) {
207  // insert the last strip according to the
208  // simhit position in the central strip
209  // needed for cls > 5, because higher cluster size has no asymmetry
210  // and thus is treated like in the old parametrization
211  double deltaw = roll->centreOfStrip(centralStrip).x() - entr.x();
212  if (deltaw < 0.) {
213  if (lstrip < roll->nstrips()) {
214  lstrip++;
215  cls.push_back(lstrip);
216  }
217  } else {
218  if (fstrip > 1) {
219  fstrip--;
220  cls.push_back(fstrip);
221  }
222  }
223  } else {
224  // needed for correct initial position for even cluster size
225  // in case of asymmetric cluster size
226  if (lstrip < roll->nstrips()) {
227  lstrip++;
228  cls.push_back(lstrip);
229  }
230  }
231  }
232  }
233 
234  //Now calculate the shift according to the distribution
235  float fire1 = CLHEP::RandFlat::shoot(engine);
236  LogDebug("RPCSimAsymmetricCls") << "[RPCSimAsymmetricCls::simulate] Fired RandFlat :: " << fire1
237  << " (fire1 is used for a shift of the cluster)";
238 
239  int strip_shift = 0;
240 
241  int offset;
242 
243  if (clsize % 2 == 0) {
244  offset = 2;
245  } else {
246  offset = 1;
247  }
248 
249  //No shift (asymmetry) for higher cluster size.
250  if (clsize > 5) {
251  strip_shift = 0;
252  } else {
253  std::vector<double> TMPclsAsymmForDetId = getRPCSimSetUp()->getAsymmetryForCls(rpcId, slice(posX), clsize);
254 
255  for (unsigned int i = 0; i < TMPclsAsymmForDetId.size(); i++) {
256  if (fire1 < TMPclsAsymmForDetId[i]) {
257  strip_shift = i - offset;
258  break;
259  }
260  }
261  }
262 
263  vector<int> shifted_cls; // vector to hold shifted strips
264  shifted_cls.clear();
265 
266  int min_strip = 100;
267  int max_strip = 0;
268 
269  //correction for the edges
270  for (std::vector<int>::iterator i = cls.begin(); i != cls.end(); i++) {
271  if (*i + strip_shift < min_strip) {
272  min_strip = *i + strip_shift;
273  }
274  if (*i + strip_shift > max_strip) {
275  max_strip = *i + strip_shift;
276  }
277  }
278 
279  if (min_strip < 1 || max_strip - roll->nstrips() > 0) {
280  strip_shift = 0;
281  }
282 
283  //Now shift the cluster
284  for (std::vector<int>::iterator i = cls.begin(); i != cls.end(); i++) {
285  shifted_cls.push_back(*i + strip_shift);
286  }
287  for (std::vector<int>::iterator i = shifted_cls.begin(); i != shifted_cls.end(); i++) {
288  // Check the timing of the adjacent strip
289  if (*i != centralStrip) {
290  double fire2 = CLHEP::RandFlat::shoot(engine);
291  LogDebug("RPCSimAsymmetricCls") << "[RPCSimAsymmetricCls::simulate] Fired RandFlat :: " << fire2
292  << " (check whether adjacent strips are efficient)";
293  if (fire2 < veff[*i - 1]) {
294  std::pair<int, int> digi(*i, time_hit);
295  strips.insert(digi);
296  LogDebug("RPCSimAsymmetricCls")
297  << "RPC Digi inserted :: Signl :: DetId :: " << rpcId << " = " << rpcId.rawId() << " ==> digi <"
298  << digi.first << "," << digi.second << ">";
299 
300  theDetectorHitMap.insert(DetectorHitMap::value_type(digi, &(*_hit)));
301  }
302  } else {
303  std::pair<int, int> digi(*i, time_hit);
304  theDetectorHitMap.insert(DetectorHitMap::value_type(digi, &(*_hit)));
305 
306  strips.insert(digi);
307  LogDebug("RPCSimAsymmetricCls") << "RPC Digi inserted :: Signl :: DetId :: " << rpcId << " = "
308  << rpcId.rawId() << " ==> digi <" << digi.first << "," << digi.second << ">";
309  }
310  }
311  }
312  }
313 }
float strip(const LocalPoint &lp) const
Definition: RPCRoll.cc:35
LocalPoint centreOfStrip(int strip) const
Definition: RPCRoll.cc:26
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:68
void setRPCSimSetUp(RPCSimSetUp *simsetup)
int nstrips() const
Definition: RPCRoll.cc:24
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
RPCSimSetUp * getRPCSimSetUp()
Definition: RPCSim.h:45
const RPCRollSpecs * specs() const
Definition: RPCRoll.cc:14
int getSimHitBx(const PSimHit *, CLHEP::HepRandomEngine *)
tuple cl
Definition: haddnano.py:49
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
Definition: RPCSim.h:33
RPCDetId id() const
Definition: RPCRoll.cc:16
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:55
virtual int channel(const LocalPoint &p) const =0
const Topology & topology() const override
Definition: RPCRollSpecs.cc:36
const std::vector< double > & getAsymmetryForCls(uint32_t id, uint32_t slice, uint32_t cls)
Definition: RPCSimSetUp.cc:541
int getClSize(float posX, CLHEP::HepRandomEngine *)
RPCSynchronizer * _rpcSync
void clear()
Definition: DetSet.h:71
T x() const
Definition: PV3DBase.h:59
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:70
unsigned int slice(float posX)
#define LogDebug(id)
void RPCSimAsymmetricCls::simulateNoise ( const RPCRoll roll,
CLHEP::HepRandomEngine *  engine 
)
overridevirtual

Implements RPCSim.

Definition at line 315 of file RPCSimAsymmetricCls.cc.

References frate, gate, RPCSim::getRPCSimSetUp(), mps_fire::i, RPCRoll::id(), dqmiolumiharvest::j, RectangularStripTopology::localPosition(), TrapezoidalStripTopology::localPosition(), LogDebug, N_hits, RPCGeomServ::name(), nbxing, RPCRoll::nstrips(), DetId::rawId(), RPCDetId::region(), AlCaHLTBitMon_QueryRunRegistry::string, RectangularStripTopology::stripLength(), TrapezoidalStripTopology::stripLength(), RPCSim::strips, RPCRoll::topology(), x, hlt_dqm_clientPB-live_cfg::xmax, and hlt_dqm_clientPB-live_cfg::xmin.

315  {
316  RPCDetId rpcId = roll->id();
317 
318  RPCGeomServ RPCname(rpcId);
319  std::string nameRoll = RPCname.name();
320 
321  std::vector<float> vnoise = (getRPCSimSetUp())->getNoise(rpcId.rawId());
322  std::vector<float> veff = (getRPCSimSetUp())->getEff(rpcId.rawId());
323 
324  LogDebug("RPCSimAsymmetricCls") << "[RPCSimAsymmetricCls::simulateNoise] Treating DetId :: " << rpcId << " = "
325  << rpcId.rawId() << " which has " << roll->nstrips() << " strips";
326 
327 #ifdef EDM_ML_DEBUG
328  std::stringstream vnoisestream;
329  vnoisestream << "[";
330  for (std::vector<float>::iterator vnoiseIt = vnoise.begin(); vnoiseIt != vnoise.end(); ++vnoiseIt) {
331  vnoisestream << (*vnoiseIt) << ",";
332  }
333  vnoisestream << "]";
334  std::string vnoisestr = vnoisestream.str();
335  LogDebug("RPCSimAsymmetricCls") << "Get Noise from RPCSimSetup for detId = " << rpcId.rawId() << " :: vector with "
336  << vnoise.size() << "entries :: " << vnoisestr;
337 #endif
338 
339  unsigned int nstrips = roll->nstrips();
340  double area = 0.0;
341 
342  if (rpcId.region() == 0) {
343  const RectangularStripTopology* top_ = dynamic_cast<const RectangularStripTopology*>(&(roll->topology()));
344  float xmin = (top_->localPosition(0.)).x();
345  float xmax = (top_->localPosition((float)roll->nstrips())).x();
346  float striplength = (top_->stripLength());
347  area = striplength * (xmax - xmin);
348  } else {
349  const TrapezoidalStripTopology* top_ = dynamic_cast<const TrapezoidalStripTopology*>(&(roll->topology()));
350  float xmin = (top_->localPosition(0.)).x();
351  float xmax = (top_->localPosition((float)roll->nstrips())).x();
352  float striplength = (top_->stripLength());
353  area = striplength * (xmax - xmin);
354  }
355 
356  LogDebug("RPCSimAsymmetricCls") << "Noise :: vnoise.size() = " << vnoise.size();
357 
358  for (unsigned int j = 0; j < vnoise.size(); ++j) {
359  if (j >= nstrips)
360  break;
361 
362  // The efficiency of 0% does not imply on the noise rate.
363  // If the strip is masked the noise rate should be 0 Hz/cm^2
364  // if(veff[j] == 0) continue;
365 
366  // double ave = vnoise[j]*nbxing*gate*area*1.0e-9*frate;
367  // The vnoise is the noise rate per strip, so we shout multiply not
368  // by the chamber area,
369  // but the strip area which is area/((float)roll->nstrips()));
370  double ave = vnoise[j] * nbxing * gate * area * 1.0e-9 * frate / ((float)roll->nstrips());
371  LogDebug("RPCSimAsymmetricCls") << "Noise :: strip " << j << " Average = " << ave
372  << " = vnoise[j]*nbxing*gate*area*1.0e-9*frate/((float)roll->nstrips()) = "
373  << vnoise[j] << "*" << nbxing << "*" << gate << "*" << area << "*" << 1.0e-9 << "*"
374  << frate << "/" << ((float)roll->nstrips());
375 
376  CLHEP::RandPoissonQ randPoissonQ(*engine, ave);
377  N_hits = randPoissonQ.fire();
378  LogDebug("RPCSimAsymmetricCls") << "[RPCSimAsymmetricCls::simulateNoise] Fired RandPoissonQ :: " << N_hits;
379  LogDebug("RPCSimAsymmetricCls") << "Noise :: Amount of Noise Hits for DetId :: " << rpcId << " = " << rpcId.rawId()
380  << " = N_hits = randPoissonQ.fire() = " << N_hits;
381 
382  for (int i = 0; i < N_hits; i++) {
383  double time2 = CLHEP::RandFlat::shoot((nbxing * gate) / gate);
384  LogDebug("RPCSimAsymmetricCls") << "[RPCSimAsymmetricCls::simulateNoise] Fired RandFlat :: " << time2;
385  int time_hit = (static_cast<int>(time2) - nbxing / 2);
386  std::pair<int, int> digi(j + 1, time_hit);
387  strips.insert(digi);
388  LogDebug("RPCSimAsymmetricCls") << "RPC Digi inserted :: Noise :: DetId :: " << rpcId << " = " << rpcId.rawId()
389  << " ==> digi <" << digi.first << "," << digi.second << ">";
390  }
391  }
392 }
LocalPoint localPosition(float strip) const override
int nstrips() const
Definition: RPCRoll.cc:24
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
RPCSimSetUp * getRPCSimSetUp()
Definition: RPCSim.h:45
float stripLength() const override
RPCDetId id() const
Definition: RPCRoll.cc:16
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:55
const Topology & topology() const override
Definition: RPCRoll.cc:18
float stripLength() const override
det heigth (strip length in the middle)
LocalPoint localPosition(float strip) const override
#define LogDebug(id)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:53
unsigned int RPCSimAsymmetricCls::slice ( float  posX)

Definition at line 394 of file RPCSimAsymmetricCls.cc.

Referenced by getClSize(), and simulate().

394  {
395  if (0.0 <= posX && posX < 0.2) {
396  return 0;
397  } else if (0.2 <= posX && posX < 0.4) {
398  return 1;
399  } else if (0.4 <= posX && posX < 0.6) {
400  return 2;
401  } else if (0.6 <= posX && posX < 0.8) {
402  return 3;
403  } else if (0.8 <= posX && posX < 1.0) {
404  return 4;
405  } else
406  return 2;
407 }

Member Data Documentation

RPCSynchronizer* RPCSimAsymmetricCls::_rpcSync
private

Definition at line 69 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), simulate(), and ~RPCSimAsymmetricCls().

double RPCSimAsymmetricCls::aveCls
private

Definition at line 48 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

double RPCSimAsymmetricCls::aveEff
private

Definition at line 44 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

std::vector<double> RPCSimAsymmetricCls::clsForDetId
private

Definition at line 66 of file RPCSimAsymmetricCls.h.

Referenced by getClSize().

std::map<int, std::vector<double> > RPCSimAsymmetricCls::clsMap
private

Definition at line 64 of file RPCSimAsymmetricCls.h.

Referenced by getClSize().

double RPCSimAsymmetricCls::dtimCs
private

Definition at line 51 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

bool RPCSimAsymmetricCls::eledig
private

Definition at line 56 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulate().

double RPCSimAsymmetricCls::frate
private

Definition at line 62 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulateNoise().

double RPCSimAsymmetricCls::gate
private

Definition at line 61 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulateNoise().

std::ifstream* RPCSimAsymmetricCls::infile
private

Definition at line 67 of file RPCSimAsymmetricCls.h.

double RPCSimAsymmetricCls::lbGate
private

Definition at line 54 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

int RPCSimAsymmetricCls::N_hits
private

Definition at line 58 of file RPCSimAsymmetricCls.h.

Referenced by simulateNoise().

int RPCSimAsymmetricCls::nbxing
private

Definition at line 59 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulateNoise().

double RPCSimAsymmetricCls::rate
private

Definition at line 60 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

double RPCSimAsymmetricCls::resEle
private

Definition at line 52 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

double RPCSimAsymmetricCls::resRPC
private

Definition at line 49 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

bool RPCSimAsymmetricCls::rpcdigiprint
private

Definition at line 55 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

double RPCSimAsymmetricCls::sspeed
private

Definition at line 53 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

std::vector<double> RPCSimAsymmetricCls::sum_clsize
private

Definition at line 65 of file RPCSimAsymmetricCls.h.

Referenced by getClSize().

double RPCSimAsymmetricCls::timOff
private

Definition at line 50 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().