CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 ()
 
- 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 ()
 

Private Attributes

RPCSynchronizer_rpcSync
 
double aveCls
 
double aveEff
 
std::vector< double > clsForDetId
 
std::map< int, std::vector
< double > > 
clsMap
 
double dtimCs
 
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< 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, 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 
55  rate=config.getParameter<double>("Rate");
56  nbxing=config.getParameter<int>("Nbxing");
57  gate=config.getParameter<double>("Gate");
58  frate=config.getParameter<double>("Frate");
59 
60  if (rpcdigiprint) {
61  std::cout <<"Average Efficiency = "<<aveEff<<std::endl;
62  std::cout <<"Average Cluster Size = "<<aveCls<<" strips"<<std::endl;
63  std::cout <<"RPC Time Resolution = "<<resRPC<<" ns"<<std::endl;
64  std::cout <<"RPC Signal formation time = "<<timOff<<" ns"<<std::endl;
65  std::cout <<"RPC adjacent strip delay = "<<dtimCs<<" ns"<<std::endl;
66  std::cout <<"Electronic Jitter = "<<resEle<<" ns"<<std::endl;
67  std::cout <<"Signal propagation time = "<<sspeed<<" x c"<<std::endl;
68  std::cout <<"Link Board Gate Width = "<<lbGate<<" ns"<<std::endl;
69  }
70 
71  _rpcSync = new RPCSynchronizer(config);
72 
73 }
T getParameter(std::string const &) const
RPCSim(const edm::ParameterSet &config)
Definition: RPCSim.cc:5
RPCSynchronizer * _rpcSync
tuple cout
Definition: gather_cfg.py:145
RPCSimAsymmetricCls::~RPCSimAsymmetricCls ( )

Definition at line 75 of file RPCSimAsymmetricCls.cc.

References _rpcSync.

76 {
77  delete _rpcSync;
78 }
RPCSynchronizer * _rpcSync

Member Function Documentation

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

Definition at line 101 of file RPCSimAsymmetricCls.cc.

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

Referenced by simulate().

102 {
103  std::map< int, std::vector<double> > clsMap = getRPCSimSetUp()->getClsMap();
104 
105  int cnt = 1;
106  int min = 1;
107  double func=0.0;
108  std::vector<double> sum_clsize;
109 
110  double rr_cl = CLHEP::RandFlat::shoot(engine);
111  LogDebug ("RPCSimAsymmetricCls")<<"[RPCSimAsymmetricCls::getClSize] Fired RandFlat :: "<<rr_cl;
112 
113  if(0.0 <= posX && posX < 0.2) {
114  func = (clsMap[1])[(clsMap[1]).size()-1]*(rr_cl);
115  sum_clsize = clsMap[1];
116  }
117  if(0.2 <= posX && posX < 0.4) {
118  func = (clsMap[2])[(clsMap[2]).size()-1]*(rr_cl);
119  sum_clsize = clsMap[2];
120  }
121  if(0.4 <= posX && posX < 0.6) {
122  func = (clsMap[3])[(clsMap[3]).size()-1]*(rr_cl);
123  sum_clsize = clsMap[3];
124  }
125  if(0.6 <= posX && posX < 0.8) {
126  func = (clsMap[4])[(clsMap[4]).size()-1]*(rr_cl);
127  sum_clsize = clsMap[4];
128  }
129  if(0.8 <= posX && posX < 1.0) {
130  func = (clsMap[5])[(clsMap[5]).size()-1]*(rr_cl);
131  sum_clsize = clsMap[5];
132  }
133 
134  for(vector<double>::iterator iter = sum_clsize.begin();
135  iter != sum_clsize.end(); ++iter){
136  cnt++;
137  if(func > (*iter)){
138  min = cnt;
139  }
140  else if(func < (*iter)){
141  break;
142  }
143  }
144  return min;
145 }
#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 80 of file RPCSimAsymmetricCls.cc.

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

81 {
82  std::vector<double> clsForDetId = getRPCSimSetUp()->getAsymmetricClsDistribution(id,slice(posX));
83 
84  int cnt = 1;
85  int min = 1;
86 
87  double rr_cl = CLHEP::RandFlat::shoot(engine);
88  LogDebug ("RPCSimAsymmetricCls")<<"[RPCSimAsymmetricCls::getClSize] Fired RandFlat :: "<<rr_cl;
89  for(unsigned int i = 0 ; i < clsForDetId.size(); i++){
90  cnt++;
91  if(rr_cl > clsForDetId[i]){
92  min = cnt;
93  }
94  else if(rr_cl < clsForDetId[i]){
95  break;
96  }
97  }
98  return min;
99 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
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  )
inlineprivatevirtual

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 148 of file RPCSimAsymmetricCls.cc.

References _rpcSync, RPCRoll::centreOfStrip(), Topology::channel(), GetRecoTauVFromDQM_MC_cff::cl, edm::DetSet< T >::clear(), RPCSimSetUp::getAsymmetryForCls(), getClSize(), RPCSim::getRPCSimSetUp(), RPCSynchronizer::getSimHitBx(), i, RPCRoll::id(), LogDebug, RPCGeomServ::name(), RPCRoll::nstrips(), hltrates_dqm_sourceclient-live_cfg::offset, HLT_FULL_cff::particleType, 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().

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

References compareJSON::const, frate, gate, RPCSim::getRPCSimSetUp(), i, RPCRoll::id(), 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, SiStripMonitorClusterAlca_cfi::xmax, and SiStripMonitorClusterAlca_cfi::xmin.

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

Referenced by getClSize(), and simulate().

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

Member Data Documentation

RPCSynchronizer* RPCSimAsymmetricCls::_rpcSync
private

Definition at line 71 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 68 of file RPCSimAsymmetricCls.h.

Referenced by getClSize().

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

Definition at line 66 of file RPCSimAsymmetricCls.h.

Referenced by getClSize().

double RPCSimAsymmetricCls::dtimCs
private

Definition at line 54 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().

double RPCSimAsymmetricCls::frate
private

Definition at line 64 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulateNoise().

double RPCSimAsymmetricCls::gate
private

Definition at line 63 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulateNoise().

std::ifstream* RPCSimAsymmetricCls::infile
private

Definition at line 69 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 60 of file RPCSimAsymmetricCls.h.

Referenced by simulateNoise().

int RPCSimAsymmetricCls::nbxing
private

Definition at line 61 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls(), and simulateNoise().

double RPCSimAsymmetricCls::rate
private

Definition at line 62 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 67 of file RPCSimAsymmetricCls.h.

Referenced by getClSize().

double RPCSimAsymmetricCls::timOff
private

Definition at line 53 of file RPCSimAsymmetricCls.h.

Referenced by RPCSimAsymmetricCls().