test
CMS 3D CMS Logo

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

#include <RPCGeomServ.h>

Public Member Functions

virtual bool aclockwise ()
 
virtual std::string chambername ()
 
virtual int chambernr ()
 
std::vector< int > channelInChip ()
 
virtual int eta_partition ()
 
virtual bool inverted ()
 
virtual std::string name ()
 
 RPCGeomServ (const RPCDetId &id)
 
virtual int segment ()
 
virtual std::string shortname ()
 
virtual bool zpositive ()
 
virtual ~RPCGeomServ ()
 

Protected Member Functions

 RPCGeomServ ()
 

Protected Attributes

bool _a
 
std::string _cn
 
int _cnr
 
const RPCDetId_id
 
std::string _n
 
std::string _sn
 
int _t
 
bool _z
 

Detailed Description

Definition at line 8 of file RPCGeomServ.h.

Constructor & Destructor Documentation

RPCGeomServ::RPCGeomServ ( const RPCDetId id)
RPCGeomServ::~RPCGeomServ ( void  )
virtual

Definition at line 16 of file RPCGeomServ.cc.

17 {}
RPCGeomServ::RPCGeomServ ( )
protected

Definition at line 532 of file RPCGeomServ.cc.

532  : _id(0), _n(""), _sn(""), _cn(""), _t (-99), _z(false), _a(false)
533 {}
std::string _sn
Definition: RPCGeomServ.h:29
std::string _n
Definition: RPCGeomServ.h:28
std::string _cn
Definition: RPCGeomServ.h:30
const RPCDetId * _id
Definition: RPCGeomServ.h:27

Member Function Documentation

bool RPCGeomServ::aclockwise ( )
virtual

Definition at line 507 of file RPCGeomServ.cc.

References _a, _id, _t, RPCDetId::layer(), RPCDetId::region(), RPCDetId::ring(), and RPCDetId::sector().

508 {
509  if (_id->region()==0 && _t<-90 ){
510  if (_id->ring() > 0){
511  if (_id->layer()==2){
512  _a=false;
513  }
514  }else if(_id->ring() <0){
515  if (_id->layer()==1){
516  _a=false;
517  }
518  }else if(_id->ring() ==0) {
519  if ((_id->sector() == 1 || _id->sector() == 4 ||
520  _id->sector() == 5 || _id->sector() == 8 ||
521  _id->sector() == 9 || _id->sector() == 12) && _id->layer()==1)
522  _a=false;
523  else if ((_id->sector() == 2 || _id->sector() == 3 ||
524  _id->sector() == 6 || _id->sector() == 7 ||
525  _id->sector() == 10|| _id->sector() == 11) && _id->layer()==2)
526  _a=false;
527  }
528  }
529  return _a;
530 }
int ring() const
Definition: RPCDetId.h:72
int layer() const
Definition: RPCDetId.h:108
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
const RPCDetId * _id
Definition: RPCGeomServ.h:27
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
std::string RPCGeomServ::chambername ( )
virtual

Definition at line 122 of file RPCGeomServ.cc.

References _cn, _id, RPCDetId::layer(), RPCDetId::region(), HLT_25ns10e33_v2_cff::region, relativeConstraints::ring, RPCDetId::ring(), RPCDetId::sector(), segment(), relativeConstraints::station, RPCDetId::station(), and RPCDetId::subsector().

Referenced by RPCMonitorDigi::bookHistograms(), RPCMonitorDigi::bookRollME(), RPCDqmClient::getMonitorElements(), and RPCMonitorDigi::performSourceOperation().

123 {
124  if( _cn.size() < 1 )
125  {
126  int station = _id->station();
127  int region = _id->region();
128  int ring = _id->ring();
129  int layer = _id->layer();
130  int sector = _id->sector();
131  int subsector = _id->subsector();
132 
133  std::stringstream os;
134 
135  if( region == 0 )
136  {
137  os << "W";
138 
139  os << std::setw(2) << std::setfill('+') << ring
140  << std::setfill(' ') << "_";
141 
142  os << "RB" << station;
143  if ( station <= 2 ) {
144 
145  (layer == 1 ) ? os << "in" : os << "out";
146 
147  }else if( station > 2 )
148  {
149  if( sector == 4 && station == 4 )
150  {
151  if( subsector == 1 )
152  {
153  os << "--";
154  }
155  else if( subsector == 2 )
156  {
157  os << "-";
158  }
159  else if( subsector == 3 )
160  {
161  os << "+";
162  }
163  else if( subsector == 4 )
164  {
165  os <<"++";
166  }
167  }
168 
169  if( station == 3 )
170  {
171  if( subsector == 1 )
172  os << "-";
173  else
174  os << "+";
175  }
176  else if( station == 4
177  && sector != 9
178  && sector != 11
179  && sector != 4 )
180  {
181  if( subsector == 1 )
182  os << "-";
183  else
184  os << "+";
185  }
186  }
187 
188  os << "_";
189  os << "S" << std::setw(2) << std::setfill('0')
190  << sector << std::setfill(' ');
191  }
192  else
193  {
194  os << "RE";
195 
196  os << std::setw(2) << std::setfill('+') << station * region
197  << std::setfill(' ') << "_";
198 
199  os << "R" << ring;
200  os << "_CH" << std::setw(2) << std::setfill('0') << this->segment();
201  }
202  _cn = os.str();
203  }
204  return _cn;
205 }
int ring() const
Definition: RPCDetId.h:72
int layer() const
Definition: RPCDetId.h:108
virtual int segment()
Definition: RPCGeomServ.cc:469
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
std::string _cn
Definition: RPCGeomServ.h:30
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
Definition: RPCDetId.h:114
const RPCDetId * _id
Definition: RPCGeomServ.h:27
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96
int RPCGeomServ::chambernr ( )
virtual

Definition at line 326 of file RPCGeomServ.cc.

References _cnr, _id, RPCDetId::layer(), RPCDetId::roll(), RPCDetId::sector(), RPCDetId::station(), and RPCDetId::subsector().

327 {
328 
329  // Station1
330  if( _id->station() ==1) {
331 
332  // in
333  if(_id->layer() ==1) {
334 
335  if(_id->roll()==1)
336  _cnr = 1;
337  else
338  _cnr = 2;
339  }
340  //out
341  else
342  {
343  if(_id->roll()==1)
344  _cnr = 3;
345  else
346  _cnr = 4;
347 
348  }
349  }
350 
351 
352  //Station 2
353  if (_id->station()==2) {
354 
355  //in
356  if(_id->layer()==1) {
357 
358  if(_id->roll()==1)//backward
359  _cnr = 5;
360  if(_id->roll()==3)//forward
361  _cnr=6;
362  if(_id->roll()==2)//middle
363  _cnr=7;
364  }
365  //out
366  else {
367 
368  if(_id->roll()==2)
369 
370  _cnr=7;
371 
372  if(_id->roll()==1)
373  _cnr=8;
374  if(_id->roll()==3)
375  _cnr=9;
376 
377  }
378  }
379 
380  //RB3- RB3+
381  if(_id->station()==3)
382  {
383  if(_id->subsector()==1) {
384 
385  if(_id->roll()==1)
386  _cnr=10;
387  else
388  _cnr=11;
389  }
390  else {
391 
392  if(_id->roll()==1)
393  _cnr=12;
394  else
395  _cnr=13;
396  }
397 
398  }
399 
400  //RB4
401  if(_id->station()==4) {
402 
403  if (_id->sector()== 4) {
404 
405  if ( _id->subsector()==2){//RB4-
406 
407  if(_id->roll()==1)
408  _cnr=14;
409  else
410  _cnr=15;
411 
412  }
413 
414  if ( _id->subsector()==3){//RB4+
415 
416  if(_id->roll()==1)
417  _cnr=16;
418  else
419  _cnr=17;
420 
421  }
422 
423  if ( _id->subsector()==1) {//RB4--
424 
425  if(_id->roll()==1)
426  _cnr=18;
427  else
428  _cnr=19;
429  }
430 
431  if ( _id->subsector()==4){//RB4++
432 
433  if(_id->roll()==1)
434  _cnr=20;
435  else
436  _cnr=21;
437 
438  }
439 
440  }
441 
442  else
443 
444  {
445  if(_id->subsector()==1) {
446 
447  if(_id->roll()==1)
448  _cnr=14;
449  else
450  _cnr=15;
451  }
452  else {
453 
454  if(_id->roll()==1)
455  _cnr=16;
456  else
457  _cnr=17;
458  }
459  }
460  }
461 
462 
463  // _cnr=10;
464  return _cnr;
465 
466 }
int roll() const
Definition: RPCDetId.h:120
int layer() const
Definition: RPCDetId.h:108
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
Definition: RPCDetId.h:114
const RPCDetId * _id
Definition: RPCGeomServ.h:27
int station() const
Definition: RPCDetId.h:96
std::vector< int > RPCGeomServ::channelInChip ( void  )

Definition at line 277 of file RPCGeomServ.cc.

References _id, RPCDetId::region(), RPCDetId::sector(), relativeConstraints::station, RPCDetId::station(), and RPCDetId::subsector().

278 {
279  std::vector<int> chipCh(4,8);//Endcap
280 
281  if(_id->region()==0){//Barrel
282  chipCh.clear();
283 
284  int station = _id->station();
285 
286  if (station<3 && _id->layer()==1){ // i.e. RB1in ||RB2in
287  chipCh.push_back(7);
288  chipCh.push_back(8);
289  }else if (station == 1 || station == 3){//i.e. RB1out || RB3
290  chipCh.push_back(7);
291  chipCh.push_back(7);
292  }else if (station == 2){// i.e. RB2out
293  chipCh.push_back(6);
294  chipCh.push_back(8);
295  }else if (_id->sector() == 4 || _id->sector()==10 ||(_id->sector() == 8 && _id->subsector()!=1) || (_id->sector() == 12 && _id->subsector()==1)){
296  chipCh.push_back(6);//i.e. Sector 4 & 10 RB4 and Sector 8 &12 RB4+
297  chipCh.push_back(6);
298  }else {
299  chipCh.push_back(8);
300  chipCh.push_back(8);
301  }
302  }
303 
304  return chipCh;
305 }
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
Definition: RPCDetId.h:114
const RPCDetId * _id
Definition: RPCGeomServ.h:27
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96
int RPCGeomServ::eta_partition ( )
virtual

Definition at line 309 of file RPCGeomServ.cc.

References _id, _t, inverted(), RPCDetId::region(), RPCDetId::ring(), and RPCDetId::roll().

Referenced by RPCStripsRing::getRingId(), and RPCStripsRing::RPCStripsRing().

310 {
311  if (_t<-90){
312  if (_id->region() == 0 ){
313  if (this->inverted()) {
314  _t = 3*(_id->ring())+ (3-_id->roll())-1;
315  }else{
316  _t = 3*(_id->ring())+ _id->roll()-2;
317  }
318  }else{
319  _t = _id->region() * (3*(3-_id->ring()) + _id->roll() + 7);
320  }
321  }
322  return _t;
323 }
int roll() const
Definition: RPCDetId.h:120
int ring() const
Definition: RPCDetId.h:72
virtual bool inverted()
Definition: RPCGeomServ.cc:480
const RPCDetId * _id
Definition: RPCGeomServ.h:27
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
bool RPCGeomServ::inverted ( )
virtual

Definition at line 480 of file RPCGeomServ.cc.

References zpositive().

Referenced by eta_partition().

481 {
482  // return !(this->zpositive() && this->aclockwise());
483  return !(this->zpositive());
484 }
virtual bool zpositive()
Definition: RPCGeomServ.cc:488
std::string RPCGeomServ::name ( void  )
virtual

Definition at line 20 of file RPCGeomServ.cc.

References _id, _n, RPCDetId::layer(), RPCDetId::region(), HLT_25ns10e33_v2_cff::region, relativeConstraints::ring, RPCDetId::ring(), RPCDetId::roll(), RPCDetId::sector(), segment(), relativeConstraints::station, RPCDetId::station(), and RPCDetId::subsector().

Referenced by cuy.divideElement::__init__(), cuy.plotElement::__init__(), cuy.additionElement::__init__(), cuy.superimposeElement::__init__(), cuy.graphElement::__init__(), config.CFG::__str__(), RPCEfficiency::analyze(), RPCMonitorDigi::bookHistograms(), RPCMonitorDigi::bookRollME(), validation.Sample::digest(), RPCEfficiencySecond::dqmEndJob(), DTSegtoRPC::DTSegtoRPC(), RPCDqmClient::getMonitorElements(), VIDSelectorBase.VIDSelectorBase::initialize(), HSCPValidator::makeSimDigiPlotsRPC(), RPCMonitorDigi::performSourceOperation(), RPCSimAverageNoiseEff::simulate(), RPCSimAsymmetricCls::simulate(), RPCSimAverageNoiseEff::simulateNoise(), RPCSimAsymmetricCls::simulateNoise(), and TracktoRPC::TracktoRPC().

21 {
22  if( _n.size() < 1 )
23  {
24  int station = _id->station();
25  int region = _id->region();
26  int roll = _id->roll();
27  int ring = _id->ring();
28  int layer = _id->layer();
29  int sector = _id->sector();
30  int subsector = _id->subsector();
31 
32  std::stringstream os;
33 
34  if( region == 0 )
35  {
36  os << "W";
37  os << std::setw(2) << std::setfill('+') << ring
38  << std::setfill(' ') << "_";
39 
40  os << "RB" << station;
41  if ( station <= 2){
42  (layer == 1 ) ? os << "in" : os << "out";
43 
44  }else if( station > 2 )
45  {
46  if( sector == 4 && station == 4 )
47  {
48  if( subsector == 1 )
49  {
50  os << "--";
51  }
52  else if( subsector == 2 )
53  {
54  os << "-";
55  }
56  else if( subsector == 3 )
57  {
58  os << "+";
59  }
60  else if( subsector == 4 )
61  {
62  os << "++";
63  }
64  }
65 
66  if( station == 3 )
67  {
68  if( subsector == 1 )
69  os << "-";
70  else
71  os << "+";
72  }
73  else if( station == 4
74  && sector != 9
75  && sector !=11
76  && sector != 4 )
77  {
78  if( subsector == 1 )
79  os << "-";
80  else
81  os << "+";
82  }
83  }
84 
85  os << "_";
86  os << "S" << std::setw(2) << std::setfill('0')
87  << sector << std::setfill(' ');
88  if( roll == 1 )
89  os << "_Backward";
90  else if( roll == 3 )
91  os << "_Forward";
92  else if( roll == 2 )
93  os << "_Middle";
94  }
95  else
96  {
97  os << "RE";
98 
99  os << std::setw(2) << std::setfill('+') << station * region
100  << std::setfill(' ') << "_";
101 
102  os << "R" << ring;
103  os << "_CH" << std::setw(2) << std::setfill('0') << this->segment();
104 
105  if( roll == 1 )
106  os << "_A";
107  else if( roll == 2 )
108  os << "_B";
109  else if( roll == 3 )
110  os << "_C";
111  else if( roll == 4 )
112  os << "_D";
113  else if( roll == 5 )
114  os << "_E";
115  }
116  _n = os.str();
117  }
118  return _n;
119 }
std::string _n
Definition: RPCGeomServ.h:28
int roll() const
Definition: RPCDetId.h:120
int ring() const
Definition: RPCDetId.h:72
int layer() const
Definition: RPCDetId.h:108
virtual int segment()
Definition: RPCGeomServ.cc:469
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
Definition: RPCDetId.h:114
const RPCDetId * _id
Definition: RPCGeomServ.h:27
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96
int RPCGeomServ::segment ( void  )
virtual

Definition at line 469 of file RPCGeomServ.cc.

References _id, relativeConstraints::ring, RPCDetId::ring(), RPCDetId::sector(), relativeConstraints::station, RPCDetId::station(), and RPCDetId::subsector().

Referenced by RPCEfficiency::bookHistograms(), chambername(), RPCClusterSizeTest::clientOperation(), RPCDeadChannelTest::clientOperation(), CSCObjectMap::CSCObjectMap(), CSCSegtoRPC::CSCSegtoRPC(), RPCEfficiencySecond::dqmEndJob(), RPCMultiplicityTest::fillGlobalME(), RPCNoisyStripTest::fillGlobalME(), RPCOccupancyTest::fillGlobalME(), name(), RPCMonitorDigi::performSourceOperation(), and TracktoRPC::TracktoRPC().

470 {
471  int nsub = 6;
472  int station = _id->station();
473  int ring = _id->ring();
474  ( ring == 1 && station > 1 ) ? nsub = 3 : nsub = 6;
475 
476  return( _id->subsector() + nsub * ( _id->sector() - 1 ));
477 }
int ring() const
Definition: RPCDetId.h:72
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
Definition: RPCDetId.h:114
const RPCDetId * _id
Definition: RPCGeomServ.h:27
int station() const
Definition: RPCDetId.h:96
std::string RPCGeomServ::shortname ( void  )
virtual

Definition at line 208 of file RPCGeomServ.cc.

References _id, _sn, RPCDetId::layer(), RPCDetId::region(), HLT_25ns10e33_v2_cff::region, relativeConstraints::ring, RPCDetId::ring(), RPCDetId::roll(), RPCDetId::sector(), relativeConstraints::station, RPCDetId::station(), and RPCDetId::subsector().

Referenced by RPCEfficiencySecond::dqmEndJob().

209 {
210  if( _sn.size() < 1 )
211  {
212  int station = _id->station();
213  int region = _id->region();
214  int roll = _id->roll();
215  int ring = _id->ring();
216  int layer = _id->layer();
217  int sector = _id->sector();
218  int subsector = _id->subsector();
219 
220  std::stringstream os;
221 
222  if( region == 0 )
223  {
224  os << "RB" << station;
225  if( station <= 2 ){
226 
227  (layer == 1 ) ? os << "in" : os << "out";
228 
229  }
230  else
231  {
232  if( sector == 4 && station == 4 )
233  {
234  if( subsector == 1 )
235  {
236  os << "--";
237  }
238  else if( subsector == 2 )
239  {
240  os << ",-";
241  }
242  else if( subsector == 3 )
243  {
244  os << "+";
245  }
246  else if( subsector == 4 )
247  {
248  os << "++";
249  }
250  }
251  else
252  {
253  if( subsector == 1 )
254  os << ",-";
255  else
256  os << "+";
257  }
258  }
259  if( roll == 1 )
260  os << " B";
261  else if( roll == 3 )
262  os << " F";
263  else if( roll == 2 )
264  os << " M";
265  }
266  else
267  {
268  os << "Ri" << ring << " Su" << subsector;
269  }
270  _sn = os.str();
271  }
272  return _sn;
273 }
std::string _sn
Definition: RPCGeomServ.h:29
int roll() const
Definition: RPCDetId.h:120
int ring() const
Definition: RPCDetId.h:72
int layer() const
Definition: RPCDetId.h:108
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
Definition: RPCDetId.h:114
const RPCDetId * _id
Definition: RPCGeomServ.h:27
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96
bool RPCGeomServ::zpositive ( )
virtual

Definition at line 488 of file RPCGeomServ.cc.

References _id, _t, _z, RPCDetId::region(), RPCDetId::ring(), and RPCDetId::sector().

Referenced by inverted().

489 {
490  if (_id->region()==0 && _t<-90 ){
491  if (_id->ring()<0){
492  _z=false;
493  }
494  if (_id->ring()==0){
495  if (_id->sector() == 1 || _id->sector() == 4 ||
496  _id->sector() == 5 || _id->sector() == 8 ||
497  _id->sector() == 9 || _id->sector() == 12){
498  _z=false;
499  }
500  }
501  }
502 
503  return _z;
504 }
int ring() const
Definition: RPCDetId.h:72
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
const RPCDetId * _id
Definition: RPCGeomServ.h:27
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63

Member Data Documentation

bool RPCGeomServ::_a
protected

Definition at line 34 of file RPCGeomServ.h.

Referenced by aclockwise().

std::string RPCGeomServ::_cn
protected

Definition at line 30 of file RPCGeomServ.h.

Referenced by chambername().

int RPCGeomServ::_cnr
protected

Definition at line 32 of file RPCGeomServ.h.

Referenced by chambernr().

const RPCDetId* RPCGeomServ::_id
protected
std::string RPCGeomServ::_n
protected

Definition at line 28 of file RPCGeomServ.h.

Referenced by name().

std::string RPCGeomServ::_sn
protected

Definition at line 29 of file RPCGeomServ.h.

Referenced by shortname().

int RPCGeomServ::_t
protected

Definition at line 31 of file RPCGeomServ.h.

Referenced by aclockwise(), eta_partition(), and zpositive().

bool RPCGeomServ::_z
protected

Definition at line 33 of file RPCGeomServ.h.

Referenced by zpositive().