CMS 3D CMS Logo

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 ()
 
- 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< StripDigiSimLinkDigiSimLinks
 
typedef edm::DetSet< RPCDigiSimLinkRPCDigiSimLinks
 
- 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 41 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.

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

Definition at line 76 of file RPCSimAsymmetricCls.cc.

References _rpcSync.

77 {
78  delete _rpcSync;
79 }
RPCSynchronizer * _rpcSync

Member Function Documentation

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

Definition at line 102 of file RPCSimAsymmetricCls.cc.

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

Referenced by simulate().

103 {
104  std::map< int, std::vector<double> > clsMap = getRPCSimSetUp()->getClsMap();
105 
106  int cnt = 1;
107  int min = 1;
108  double func=0.0;
109  std::vector<double> sum_clsize;
110 
111  double rr_cl = CLHEP::RandFlat::shoot(engine);
112  LogDebug ("RPCSimAsymmetricCls")<<"[RPCSimAsymmetricCls::getClSize] Fired RandFlat :: "<<rr_cl;
113 
114  if(0.0 <= posX && posX < 0.2) {
115  func = (clsMap[1])[(clsMap[1]).size()-1]*(rr_cl);
116  sum_clsize = clsMap[1];
117  }
118  if(0.2 <= posX && posX < 0.4) {
119  func = (clsMap[2])[(clsMap[2]).size()-1]*(rr_cl);
120  sum_clsize = clsMap[2];
121  }
122  if(0.4 <= posX && posX < 0.6) {
123  func = (clsMap[3])[(clsMap[3]).size()-1]*(rr_cl);
124  sum_clsize = clsMap[3];
125  }
126  if(0.6 <= posX && posX < 0.8) {
127  func = (clsMap[4])[(clsMap[4]).size()-1]*(rr_cl);
128  sum_clsize = clsMap[4];
129  }
130  if(0.8 <= posX && posX < 1.0) {
131  func = (clsMap[5])[(clsMap[5]).size()-1]*(rr_cl);
132  sum_clsize = clsMap[5];
133  }
134 
135  for(vector<double>::iterator iter = sum_clsize.begin();
136  iter != sum_clsize.end(); ++iter){
137  cnt++;
138  if(func > (*iter)){
139  min = cnt;
140  }
141  else if(func < (*iter)){
142  break;
143  }
144  }
145  return min;
146 }
#define LogDebug(id)
std::map< int, std::vector< double > > clsMap
RPCSimSetUp * getRPCSimSetUp()
Definition: RPCSim.h:50
std::vector< double > sum_clsize
const std::map< int, std::vector< double > > & getClsMap()
Definition: RPCSimSetUp.cc:397
T min(T a, T b)
Definition: MathUtil.h:58
int RPCSimAsymmetricCls::getClSize ( uint32_t  id,
float  posX,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 81 of file RPCSimAsymmetricCls.cc.

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

82 {
84 
85  int cnt = 1;
86  int min = 1;
87 
88  double rr_cl = CLHEP::RandFlat::shoot(engine);
89  LogDebug ("RPCSimAsymmetricCls")<<"[RPCSimAsymmetricCls::getClSize] Fired RandFlat :: "<<rr_cl;
90  for(unsigned int i = 0 ; i < clsForDetId.size(); i++){
91  cnt++;
92  if(rr_cl > clsForDetId[i]){
93  min = cnt;
94  }
95  else if(rr_cl < clsForDetId[i]){
96  break;
97  }
98  }
99  return min;
100 }
#define LogDebug(id)
const std::vector< double > & getAsymmetricClsDistribution(uint32_t id, uint32_t slice)
Definition: RPCSimSetUp.cc:426
RPCSimSetUp * getRPCSimSetUp()
Definition: RPCSim.h:50
std::vector< double > clsForDetId
T min(T a, T b)
Definition: MathUtil.h:58
unsigned int slice(float posX)
void RPCSimAsymmetricCls::init ( void  )
inlineoverrideprivatevirtual

Implements RPCSim.

Definition at line 48 of file RPCSimAsymmetricCls.h.

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

Implements RPCSim.

Definition at line 149 of file RPCSimAsymmetricCls.cc.

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

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

Implements RPCSim.

Definition at line 327 of file RPCSimAsymmetricCls.cc.

References objects.autophobj::float, frate, gate, RPCSim::getRPCSimSetUp(), mps_fire::i, RPCRoll::id(), 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, TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.

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

Definition at line 402 of file RPCSimAsymmetricCls.cc.

Referenced by getClSize(), and simulate().

402  {
403 
404  if(0.0 <= posX && posX < 0.2) {
405  return 0;
406  }
407  else if(0.2 <= posX && posX < 0.4) {
408  return 1;
409  }
410  else if(0.4 <= posX && posX < 0.6) {
411  return 2;
412  }
413  else if(0.6 <= posX && posX < 0.8) {
414  return 3;
415  }
416  else if(0.8 <= posX && posX < 1.0) {
417  return 4;
418  }
419  else return 2;
420 }

Member Data Documentation

RPCSynchronizer* RPCSimAsymmetricCls::_rpcSync
private

Definition at line 72 of file RPCSimAsymmetricCls.h.

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

double RPCSimAsymmetricCls::aveCls
private

Definition at line 51 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

double RPCSimAsymmetricCls::aveEff
private

Definition at line 48 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

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

Definition at line 69 of file RPCSimAsymmetricCls.h.

Referenced by getClSize().

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

Definition at line 67 of file RPCSimAsymmetricCls.h.

Referenced by getClSize().

double RPCSimAsymmetricCls::dtimCs
private

Definition at line 54 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

bool RPCSimAsymmetricCls::eledig
private

Definition at line 59 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulate().

double RPCSimAsymmetricCls::frate
private

Definition at line 65 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulateNoise().

double RPCSimAsymmetricCls::gate
private

Definition at line 64 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulateNoise().

std::ifstream* RPCSimAsymmetricCls::infile
private

Definition at line 70 of file RPCSimAsymmetricCls.h.

double RPCSimAsymmetricCls::lbGate
private

Definition at line 57 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

int RPCSimAsymmetricCls::N_hits
private

Definition at line 61 of file RPCSimAsymmetricCls.h.

Referenced by simulateNoise().

int RPCSimAsymmetricCls::nbxing
private

Definition at line 62 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulateNoise().

double RPCSimAsymmetricCls::rate
private

Definition at line 63 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

double RPCSimAsymmetricCls::resEle
private

Definition at line 55 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

double RPCSimAsymmetricCls::resRPC
private

Definition at line 52 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

bool RPCSimAsymmetricCls::rpcdigiprint
private

Definition at line 58 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

double RPCSimAsymmetricCls::sspeed
private

Definition at line 56 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

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

Definition at line 68 of file RPCSimAsymmetricCls.h.

Referenced by getClSize().

double RPCSimAsymmetricCls::timOff
private

Definition at line 53 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().