CMS 3D CMS Logo

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

#include <RPCDetId.h>

Inheritance diagram for RPCDetId:
DetId

Public Member Functions

void buildfromDB (int region, int ring, int layer, int sector, const std::string &subsector, const std::string &roll, const std::string &dbname)
 
void buildfromTrIndex (int trIndex)
 Built from the trigger det Index. More...
 
RPCDetId chamberId () const
 Return the corresponding ChamberId. More...
 
int layer () const
 
bool operator< (const RPCDetId &r) const
 Sort Operator based on the raw detector id. More...
 
int region () const
 Region id: 0 for Barrel, +/-1 For +/- Endcap. More...
 
int ring () const
 
int roll () const
 
 RPCDetId ()
 
 RPCDetId (uint32_t id)
 
 RPCDetId (DetId id)
 
 RPCDetId (int region, int ring, int station, int sector, int layer, int subsector, int roll)
 Construct from fully qualified identifier. More...
 
int sector () const
 Sector id: the group of chambers at same phi (and increasing r) More...
 
int station () const
 
int subsector () const
 SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel, from 1 to 6 in Endcap) More...
 
int trIndex () const
 
- Public Member Functions inherited from DetId
Detector det () const
 get the detector field from this detid More...
 
 DetId ()
 Create an empty or null id (also for persistence) More...
 
 DetId (uint32_t id)
 Create an id from a raw number. More...
 
 DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
bool null () const
 is this a null id ? More...
 
 operator uint32_t () const
 
bool operator!= (DetId id) const
 inequality More...
 
uint32_t operator() () const
 
bool operator< (DetId id) const
 comparison More...
 
bool operator== (DetId id) const
 equality More...
 
uint32_t rawId () const
 get the raw id More...
 
int subdetId () const
 get the contents of the subdetector field (not cast into any detector's numbering enum) More...
 

Static Public Attributes

static const int maxLayerId = 2
 
static const int maxRegionId = 1
 
static const int maxRingBarrelId = 2
 
static const int maxRingForwardId = 3
 
static const int maxRollId = 4
 
static const int maxSectorBarrelId = 12
 
static const int maxSectorForwardId = 6
 
static const int maxSectorId = 12
 
static const int maxStationId = 4
 
static const int maxSubSectorBarrelId = 4
 
static const int maxSubSectorForwardId = 6
 
static const int maxSubSectorId = 6
 
static const int minLayerId = 1
 
static const int minRegionId = -1
 
static const int minRingBarrelId = -2
 
static const int minRingForwardId = 1
 
static const int minRollId = 0
 
static const int minSectorBarrelId = 1
 
static const int minSectorForwardId = 1
 
static const int minSectorId = 0
 
static const int minStationId = 1
 
static const int minSubSectorBarrelId = 1
 
static const int minSubSectorForwardId = 1
 
static const int minSubSectorId = 0
 
static const int RingBarrelOffSet = 3
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 

Private Member Functions

void init (int region, int ring, int station, int sector, int layer, int subsector, int roll)
 

Private Attributes

int trind
 

Static Private Attributes

static const uint32_t chamberIdMask_ = ~(RollMask_<<RollStartBit_)
 
static const unsigned int LayerMask_ = 0X1
 
static const int LayerNumBits_ = 1
 
static const int LayerStartBit_ = SectorStartBit_+SectorNumBits_
 
static const int RegionMask_ = 0X3
 
static const int RegionNumBits_ = 2
 
static const int RegionStartBit_ = 0
 
static const unsigned int RingMask_ = 0X7
 
static const int RingNumBits_ = 3
 
static const int RingStartBit_ = RegionStartBit_+RegionNumBits_
 
static const unsigned int RollMask_ = 0X7
 
static const int RollNumBits_ = 3
 
static const int RollStartBit_ = SubSectorStartBit_+SubSectorNumBits_
 
static const unsigned int SectorMask_ = 0XF
 
static const int SectorNumBits_ = 4
 
static const int SectorStartBit_ = StationStartBit_+StationNumBits_
 
static const unsigned int StationMask_ = 0X3
 
static const int StationNumBits_ = 2
 
static const int StationStartBit_ = RingStartBit_+RingNumBits_
 
static const unsigned int SubSectorMask_ = 0X7
 
static const int SubSectorNumBits_ = 3
 
static const int SubSectorStartBit_ = LayerStartBit_+LayerNumBits_
 

Additional Inherited Members

- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5
}
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

DetUnit identifier for RPCs

Date:
2008/06/05 15:01:31
Version
Id:
RPCDetId.h,v 1.22 2008/06/05 15:01:31 mmaggi Exp
Revision:
1.22
Author
Ilaria Segoni

Definition at line 20 of file RPCDetId.h.

Constructor & Destructor Documentation

RPCDetId::RPCDetId ( )

Definition at line 12 of file RPCDetId.cc.

Referenced by chamberId().

int trind
Definition: RPCDetId.h:211
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:28
static const int RPC
Definition: MuonSubdetId.h:16
RPCDetId::RPCDetId ( uint32_t  id)

Construct from a packed id. It is required that the Detector part of id is Muon and the SubDet part is RPC, otherwise an exception is thrown.

Definition at line 15 of file RPCDetId.cc.

References DetId::det(), edm::hlt::Exception, DetId::Muon, MuonSubdetId::RPC, and DetId::subdetId().

15  :DetId(id),trind(0) {
16  // std::cout<<" constructor of the RPCDetId" <<std::endl;
18  throw cms::Exception("InvalidDetId") << "RPCDetId ctor:"
19  << " det: " << det()
20  << " subdet: " << subdetId()
21  << " is not a valid RPC id";
22  }
23 }
int trind
Definition: RPCDetId.h:211
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:28
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
static const int RPC
Definition: MuonSubdetId.h:16
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
RPCDetId::RPCDetId ( DetId  id)

Definition at line 24 of file RPCDetId.cc.

References DetId::det(), edm::hlt::Exception, DetId::Muon, MuonSubdetId::RPC, and DetId::subdetId().

24  :DetId(id),trind(0) {
25  // std::cout<<" constructor of the RPCDetId" <<std::endl;
27  throw cms::Exception("InvalidDetId") << "RPCDetId ctor:"
28  << " det: " << det()
29  << " subdet: " << subdetId()
30  << " is not a valid RPC id";
31  }
32 }
int trind
Definition: RPCDetId.h:211
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:28
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
static const int RPC
Definition: MuonSubdetId.h:16
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
RPCDetId::RPCDetId ( int  region,
int  ring,
int  station,
int  sector,
int  layer,
int  subsector,
int  roll 
)

Construct from fully qualified identifier.

Definition at line 36 of file RPCDetId.cc.

References init().

36  :
38 {
40 }
void init(int region, int ring, int station, int sector, int layer, int subsector, int roll)
Definition: RPCDetId.cc:211
int trind
Definition: RPCDetId.h:211
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:28
int roll() const
Definition: RPCDetId.h:122
int ring() const
Definition: RPCDetId.h:74
int layer() const
Definition: RPCDetId.h:110
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:104
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
Definition: RPCDetId.h:116
static const int RPC
Definition: MuonSubdetId.h:16
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:65
int station() const
Definition: RPCDetId.h:98

Member Function Documentation

void RPCDetId::buildfromDB ( int  region,
int  ring,
int  layer,
int  sector,
const std::string &  subsector,
const std::string &  roll,
const std::string &  dbname 
)

Definition at line 44 of file RPCDetId.cc.

References abs, Reference_intrackfit_cff::barrel, buildfromTrIndex(), gather_cfg::cout, layer(), ring(), sector(), station(), subsector(), and trIndex().

Referenced by DBSpecToDetUnit::operator()().

47  {
48 
49  bool barrel = (region==0);
50  //STATION
51  int station = -1;
52  if (barrel) {
53  if (trlayer==1 || trlayer==2) station = 1;
54  else if (trlayer==3 || trlayer==4) station = 2;
55  else station = trlayer-2;
56  } else {
57  station = abs(ring);
58  }
59 
60  //LAYER
61  int layer = 1;
62  if (barrel && station==1) layer = trlayer;
63  if (barrel && station==2) layer = trlayer-2;
64 
65  //SUBSECTOR
66  int subsector = 1;
67 
68  if (barrel) {
69  if (station==3 && subs=="+") subsector = 2;
70  if (station==4 &&
71  ( sector==1 || sector==2 || sector==3
72  || sector==5 || sector==6
73  || sector==7 || sector==8
74  || sector==10 || sector==12)
75  && (subs=="+")) {
76  subsector = 2;
77  }
78 
79  if (station==4 && sector==4) {
80  if (subs=="--") subsector=1;
81  if (subs=="-") subsector=2;
82  if (subs=="+") subsector=3;
83  if (subs=="++") subsector=4;
84  }
85  }
86 
87  // ROLL
88  int iroll=0;
89 
90  if (roll=="Backward" || roll=="A") iroll = 1;
91  else if (roll=="Central" || roll=="B") iroll = 2;
92  else if (roll=="Forward" || roll=="C") iroll = 3;
93  else if (roll=="D") iroll = 4;
94  else {
95  std::cout << "** RPC: DBSpecToDetUnit, how to assigne roll to: "
96  <<roll<<" ???" << std::endl;
97  }
98 
99  int trIndex = 0;
100  if(barrel){
101  //cout <<" BARREL: " << endl;
102  int eta_id = 6+ring;
103  int plane_id = station;
104  if(trlayer==2) plane_id=5;
105  if(trlayer==4) plane_id=6;
106  int sector_id = sector*3;
107  int copy_id = subsector;
108  int roll_id = iroll;
109  trIndex=(eta_id*10000+plane_id*1000+sector_id*10+copy_id)*10+roll_id;
110  }
111  else {
112  // cout << "ENDCAP : " << endl;
113  int eta_id = trlayer;
114  if(ring>0) eta_id = 12-trlayer;
115  int plane_id = abs(ring);
116  int sector_id = sector;
117 
118  if (region <0){
119  if (sector_id < 20 ){
120  sector_id = 19+ 1-sector_id;
121  }else{
122  sector_id = 36+20-sector_id;
123  }
124  }
125  sector_id-=1;
126 
127  //
128  int copy_id = 1;
129  int roll_id = iroll;
130  trIndex=(eta_id*10000+plane_id*1000+sector_id*10+copy_id)*10+ roll_id;
131  }
132  this->buildfromTrIndex(trIndex);
133 }
void buildfromTrIndex(int trIndex)
Built from the trigger det Index.
Definition: RPCDetId.cc:136
#define abs(x)
Definition: mlp_lapack.h:159
int roll() const
Definition: RPCDetId.h:122
int ring() const
Definition: RPCDetId.h:74
int layer() const
Definition: RPCDetId.h:110
int trIndex() const
Definition: RPCDetId.h:127
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:104
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
Definition: RPCDetId.h:116
tuple cout
Definition: gather_cfg.py:41
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:65
int station() const
Definition: RPCDetId.h:98
void RPCDetId::buildfromTrIndex ( int  trIndex)

Built from the trigger det Index.

Definition at line 136 of file RPCDetId.cc.

References init(), layer(), region(), ring(), roll(), sector(), station(), subsector(), trind, and trIndex().

Referenced by RPCNumberingScheme::baseNumberToUnitNumber(), and buildfromDB().

137 {
138  trind = trIndex;
139  int eta_id = trIndex/100000;
140  int region=0;
141  int ring =0;
142  if (eta_id <=3 ){
143  region = -1;
144  ring = eta_id;
145  }
146  else if (eta_id >=9 ) {
147  region = 1;
148  ring = 12-eta_id;
149  }
150  else{
151  region = 0;
152  ring = eta_id - 6;
153  }
154  trIndex = trIndex%100000;
155  int plane_id = trIndex/10000;
156  int station=0;
157  int layer=0;
158  if (plane_id <=4){
159  station = plane_id;
160  layer = 1;
161  }
162  else{
163  station = plane_id -4;
164  layer = 2;
165  }
166  trIndex = trIndex%10000;
167  int sector_id = trIndex/100;
168  if (region!=0) {
169  if ( !(ring == 1 && station > 1 && region==1)) {
170  sector_id+=1;
171  if (sector_id==37)sector_id=1;
172  }
173  }
174  if (region==-1){
175  if (sector_id < 20 ){
176  sector_id = 19+ 1-sector_id;
177  }else{
178  sector_id = 36+20-sector_id;
179  }
180  }
181  trIndex = trIndex%100;
182  int copy_id = trIndex/10;
183  int sector=(sector_id-1)/3+1;
184  if (region!=0) {
185  sector=(sector+1)/2;
186  }
187  int subsector=0;
188  if ( region == 0 ) {
189  subsector = copy_id;
190  }
191  else {
192  if ( ring == 1 && station > 1) {
193  // 20 degree chambers
194  subsector = ((sector_id+1)/2-1)%3+1;
195  }else {
196  // 10 degree chambers
197  subsector = (sector_id-1)%6+1;
198  }
199 // std::cout <<" RE"<<station*region<<"/"<<ring<<" sector_id "<<sector_id
200 // << " sector "<<sector <<" sub "<<subsector<<std::endl;
201  }
202 
203 
204  int roll=trIndex%10;
205  this->init(region,ring,station,sector,layer,subsector,roll);
206 }
void init(int region, int ring, int station, int sector, int layer, int subsector, int roll)
Definition: RPCDetId.cc:211
int trind
Definition: RPCDetId.h:211
int roll() const
Definition: RPCDetId.h:122
int ring() const
Definition: RPCDetId.h:74
int layer() const
Definition: RPCDetId.h:110
int trIndex() const
Definition: RPCDetId.h:127
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:104
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
Definition: RPCDetId.h:116
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:65
int station() const
Definition: RPCDetId.h:98
RPCDetId RPCDetId::chamberId ( ) const
inline

Return the corresponding ChamberId.

Definition at line 132 of file RPCDetId.h.

References chamberIdMask_, DetId::id_, and RPCDetId().

132  {
133  return RPCDetId(id_ & chamberIdMask_);
134  }
RPCDetId()
Definition: RPCDetId.cc:12
uint32_t id_
Definition: DetId.h:57
static const uint32_t chamberIdMask_
Definition: RPCDetId.h:200
void RPCDetId::init ( int  region,
int  ring,
int  station,
int  sector,
int  layer,
int  subsector,
int  roll 
)
private

Definition at line 211 of file RPCDetId.cc.

References edm::hlt::Exception, DetId::id_, LayerMask_, LayerStartBit_, maxLayerId, maxRegionId, maxRingBarrelId, maxRingForwardId, maxRollId, maxSectorId, maxStationId, maxSubSectorId, minLayerId, minRegionId, minRingBarrelId, minRingForwardId, minSectorId, minStationId, minSubSectorId, RegionMask_, RegionStartBit_, RingBarrelOffSet, RingMask_, RingStartBit_, roll(), RollMask_, RollStartBit_, SectorMask_, SectorStartBit_, StationMask_, StationStartBit_, SubSectorMask_, and SubSectorStartBit_.

Referenced by buildfromTrIndex(), and RPCDetId().

213 {
214  int minRing=0;
215  int maxRing=RPCDetId::maxRingForwardId;
216  if (!region)
217  {
220  }
221 
222  if ( region < minRegionId || region > maxRegionId ||
223  ring < minRing || ring > maxRing ||
224  station < minStationId || station > maxStationId ||
225  sector < minSectorId || sector > maxSectorId ||
226  layer < minLayerId || layer > maxLayerId ||
227  subsector < minSubSectorId || subsector > maxSubSectorId ||
228  roll < minRollId || roll > maxRollId) {
229  throw cms::Exception("InvalidDetId") << "RPCDetId ctor:"
230  << " Invalid parameters: "
231  << " region "<<region
232  << " ring "<<ring
233  << " station "<<station
234  << " sector "<<sector
235  << " layer "<<layer
236  << " subsector "<<subsector
237  << " roll "<<roll
238  << std::endl;
239  }
240 
241 
242  int regionInBits=region-minRegionId;
243  int ringInBits =0;
244  if(region != 0) ringInBits = ring - minRingForwardId;
245  if(!region) ringInBits = ring + RingBarrelOffSet - minRingBarrelId;
246 
247  int stationInBits=station-minStationId;
248  int sectorInBits=sector-(minSectorId+1);
249  int layerInBits=layer-minLayerId;
250  int subSectorInBits=subsector-(minSubSectorId+1);
251  int rollInBits=roll;
252 
253  id_ |= ( regionInBits & RegionMask_) << RegionStartBit_ |
254  ( ringInBits & RingMask_) << RingStartBit_ |
255  ( stationInBits & StationMask_) << StationStartBit_ |
256  ( sectorInBits & SectorMask_) << SectorStartBit_ |
257  ( layerInBits & LayerMask_) << LayerStartBit_ |
258  ( subSectorInBits & SubSectorMask_) << SubSectorStartBit_ |
259  ( rollInBits & RollMask_) << RollStartBit_ ;
260 
261 }
static const int maxStationId
Definition: RPCDetId.h:147
static const unsigned int RingMask_
Definition: RPCDetId.h:177
static const int SubSectorStartBit_
Definition: RPCDetId.h:193
static const int maxLayerId
Definition: RPCDetId.h:157
static const int maxRingForwardId
Definition: RPCDetId.h:141
static const int minRingBarrelId
Definition: RPCDetId.h:142
static const int minSubSectorId
Definition: RPCDetId.h:159
static const int LayerStartBit_
Definition: RPCDetId.h:189
static const int minSectorId
Definition: RPCDetId.h:149
static const int StationStartBit_
Definition: RPCDetId.h:180
int roll() const
Definition: RPCDetId.h:122
static const unsigned int SectorMask_
Definition: RPCDetId.h:186
static const int minRegionId
Definition: RPCDetId.h:137
static const unsigned int LayerMask_
Definition: RPCDetId.h:190
int ring() const
Definition: RPCDetId.h:74
static const int maxSubSectorId
Definition: RPCDetId.h:160
static const int RingStartBit_
Definition: RPCDetId.h:176
static const int RegionStartBit_
Definition: RPCDetId.h:172
static const int RegionMask_
Definition: RPCDetId.h:173
static const unsigned int SubSectorMask_
Definition: RPCDetId.h:194
static const int maxRollId
Definition: RPCDetId.h:167
static const int SectorStartBit_
Definition: RPCDetId.h:185
static const int RingBarrelOffSet
Definition: RPCDetId.h:144
static const int maxRegionId
Definition: RPCDetId.h:138
static const int minStationId
Definition: RPCDetId.h:146
static const int RollStartBit_
Definition: RPCDetId.h:197
static const unsigned int StationMask_
Definition: RPCDetId.h:181
int layer() const
Definition: RPCDetId.h:110
uint32_t id_
Definition: DetId.h:57
static const int maxRingBarrelId
Definition: RPCDetId.h:143
static const int maxSectorId
Definition: RPCDetId.h:150
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:104
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
Definition: RPCDetId.h:116
static const int minRingForwardId
Definition: RPCDetId.h:140
static const unsigned int RollMask_
Definition: RPCDetId.h:198
static const int minLayerId
Definition: RPCDetId.h:156
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:65
int station() const
Definition: RPCDetId.h:98
int RPCDetId::layer ( ) const
inline

Layer id: each station can have two layers of chambers: layer 1 is the inner chamber and layer 2 is the outer chamber (when present) Only in Barrel: RB1 and RB2.

Definition at line 110 of file RPCDetId.h.

References DetId::id_, LayerMask_, LayerStartBit_, and minLayerId.

Referenced by RPCGeomServ::aclockwise(), RPCEfficiency::analyze(), RPCMonitorSync::bookDetUnitME(), RPCMonitorDigi::bookRollME(), RPCGeometryBuilderFromCondDB::build(), buildfromDB(), buildfromTrIndex(), RPCGeometryBuilderFromDDD::buildGeometry(), RPCStripsRing::calculateHwPlane(), RPCGeomServ::chambername(), RPCGeomServ::chambernr(), RPCGeomServ::channelInChip(), rpcdqm::utils::detId2ChamberLabel(), rpcdqm::utils::detId2ChamberNr(), rpcdqm::utils::detId2RollNr(), RPCMonitorSync::endJob(), RPCEfficiencySecond::endRun(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), fireworks::info(), HSCPValidator::makeSimDigiPlotsRPC(), RPCGeomServ::name(), RBCProcessRPCSimDigis::next(), RBCProcessRPCDigis::next(), operator<(), RPCMonitorDigi::performSourceOperation(), MuonSimHitProducer::produce(), RPCMonitorSync::readRPCDAQStrips(), reco::HitPattern::set(), and RPCGeomServ::shortname().

110  {
111  return int((id_>>LayerStartBit_) & LayerMask_) + minLayerId;
112  }
static const int LayerStartBit_
Definition: RPCDetId.h:189
static const unsigned int LayerMask_
Definition: RPCDetId.h:190
uint32_t id_
Definition: DetId.h:57
static const int minLayerId
Definition: RPCDetId.h:156
bool RPCDetId::operator< ( const RPCDetId r) const
inline

Sort Operator based on the raw detector id.

Definition at line 42 of file RPCDetId.h.

References layer(), DetId::rawId(), and station().

42  {
43  if (r.station() == this->station()){
44  if (this->layer() == r.layer()){
45  return this->rawId()<r.rawId();
46  }
47  else{
48  return (this->layer() < r.layer());
49  }
50  }
51  else {
52  return this->station() < r.station();
53  }
54  }
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
int layer() const
Definition: RPCDetId.h:110
int station() const
Definition: RPCDetId.h:98
int RPCDetId::region ( ) const
inline

Region id: 0 for Barrel, +/-1 For +/- Endcap.

Definition at line 65 of file RPCDetId.h.

References DetId::id_, minRegionId, RegionMask_, and RegionStartBit_.

Referenced by RPCGeomServ::aclockwise(), RPCPointVsRecHit::analyze(), RPCRecHitValid::analyze(), RPCDigiValid::analyze(), RPCEfficiency::beginRun(), RPCMonitorSync::bookDetUnitME(), RPCEfficiency::bookDetUnitSeg(), RPCEfficiencySecond::bookDetUnitSeg(), RPCMonitorDigi::bookRollME(), RPCGeometryBuilderFromCondDB::build(), buildfromTrIndex(), RPCGeometryBuilderFromDDD::buildGeometry(), RPCStripsRing::calculateHwPlane(), RPCGeomServ::chambername(), RPCGeomServ::channelInChip(), RPCSeedPattern::checkSegment(), RPCClusterSizeTest::clientOperation(), RPCDeadChannelTest::clientOperation(), rpcdqm::utils::detId2ChamberLabel(), rpcdqm::utils::detId2ChamberNr(), rpcdqm::utils::detId2RollNr(), RPCMonitorSync::endJob(), RPCBxTest::endRun(), RPCEfficiencySecond::endRun(), RPCGeomServ::eta_partition(), RPCNoisyStripTest::fillGlobalME(), RPCOccupancyTest::fillGlobalME(), RPCMultiplicityTest::fillGlobalME(), GlobalHitsAnalyzer::fillMuon(), GlobalHitsProdHist::fillMuon(), GlobalHitsProducer::fillMuon(), GlobalDigisAnalyzer::fillMuon(), RPCRecHitFilter::filter(), RPCNoise::filter(), RPCBookFolderStructure::folderStructure(), DetIdInfo::info(), fireworks::info(), RPCCosmicSeedrecHitFinder::iscorssEdge(), L1TRPCTPG::L1TRPCBookME(), HSCPValidator::makeSimDigiPlotsRPC(), RPCGeomServ::name(), ObjectMap::ObjectMap(), ObjectMap2::ObjectMap2(), ObjectMap2CSC::ObjectMap2CSC(), ObjectMapCSC::ObjectMapCSC(), RPCMonitorDigi::performSourceOperation(), ring(), RPCStripsRing::RPCStripsRing(), reco::HitPattern::set(), RPCGeomServ::shortname(), RPCSimSimple::simulateNoise(), RPCSimTriv::simulateNoise(), RPCSimParam::simulateNoise(), RPCSimAverageNoise::simulateNoise(), RPCSimAverageNoiseEffCls::simulateNoise(), RPCSimAverage::simulateNoise(), RPCSimAverageNoiseEff::simulateNoise(), TracktoRPC::TracktoRPC(), ValidateGeometry::validateRPCGeometry(), and RPCGeomServ::zpositive().

65  {
66  return int((id_>>RegionStartBit_) & RegionMask_) + minRegionId;
67  }
static const int minRegionId
Definition: RPCDetId.h:137
static const int RegionStartBit_
Definition: RPCDetId.h:172
static const int RegionMask_
Definition: RPCDetId.h:173
uint32_t id_
Definition: DetId.h:57
int RPCDetId::ring ( ) const
inline

Ring id: Wheel number in Barrel (from -2 to +2) Ring Number in Endcap (from 1 to 3) Ring has a different meaning in Barrel and Endcap! In Barrel it is wheel, in Endcap it is the physical ring located on a disk (a disk contains three rings). In Endcap the ring is the group of chambers with same r (distance of beam axis) and increasing phi

Definition at line 74 of file RPCDetId.h.

References edm::hlt::Exception, DetId::id_, minRingBarrelId, minRingForwardId, region(), sistrip::ring_, RingBarrelOffSet, RingMask_, and RingStartBit_.

Referenced by RPCGeomServ::aclockwise(), RPCPointVsRecHit::analyze(), RPCRecHitValid::analyze(), RPCDigiValid::analyze(), RPCEfficiency::analyze(), RPCEfficiency::beginRun(), RPCMonitorSync::bookDetUnitME(), RPCMonitorDigi::bookRollME(), RPCGeometryBuilderFromCondDB::build(), buildfromDB(), buildfromTrIndex(), RPCGeometryBuilderFromDDD::buildGeometry(), RPCGeomServ::chambername(), RPCClusterSizeTest::clientOperation(), RPCDeadChannelTest::clientOperation(), CSCSegtoRPC::CSCSegtoRPC(), rpcdqm::utils::detId2RollNr(), RPCMonitorSync::endJob(), RPCBxTest::endRun(), RPCEfficiencySecond::endRun(), RPCGeomServ::eta_partition(), RPCNoisyStripTest::fillGlobalME(), RPCOccupancyTest::fillGlobalME(), RPCMultiplicityTest::fillGlobalME(), GlobalDigisAnalyzer::fillMuon(), RPCRecHitFilter::filter(), RPCBookFolderStructure::folderStructure(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), fireworks::info(), MuonRPCDetLayerGeometryBuilder::isFront(), L1TRPCTPG::L1TRPCBookME(), RPCGeomServ::name(), RBCProcessRPCSimDigis::next(), RBCProcessRPCDigis::next(), ObjectMap::ObjectMap(), ObjectMap2::ObjectMap2(), ObjectMap2CSC::ObjectMap2CSC(), ObjectMapCSC::ObjectMapCSC(), RPCMonitorDigi::performSourceOperation(), MuonSimHitProducer::produce(), RPCStripsRing::RPCStripsRing(), RPCGeomServ::segment(), RPCGeomServ::shortname(), TracktoRPC::TracktoRPC(), and RPCGeomServ::zpositive().

74  {
75 
76  int ring_= (id_>>RingStartBit_) & RingMask_;
77 
78  if(ring_ <RingBarrelOffSet){
79 
80  if(this->region() == 0)
81  {
82  throw cms::Exception("InvalidDetId") << "RPCDetId ctor:"
83  << " Ring - Region Inconsistency, "
84  << " region "<< this->region()
85  << " ring "<<ring_
86  << std::endl;
87  }
88 
89  return int(ring_ + minRingForwardId);
90 
91  } else { // if(ring_ >= RingBarrelOffSet)
92  return int(ring_ - RingBarrelOffSet + minRingBarrelId);
93  }
94  }
static const unsigned int RingMask_
Definition: RPCDetId.h:177
static const int minRingBarrelId
Definition: RPCDetId.h:142
static const char ring_[]
static const int RingStartBit_
Definition: RPCDetId.h:176
static const int RingBarrelOffSet
Definition: RPCDetId.h:144
uint32_t id_
Definition: DetId.h:57
static const int minRingForwardId
Definition: RPCDetId.h:140
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:65
int RPCDetId::roll ( ) const
inline

Roll id (also known as eta partition): each chamber is divided along the strip direction in two or three parts (rolls) for Barrel and two, three or four parts for endcap

Definition at line 122 of file RPCDetId.h.

References DetId::id_, RollMask_, and RollStartBit_.

Referenced by RPCEfficiency::analyze(), RPCMonitorSync::bookDetUnitME(), buildfromTrIndex(), RPCGeomServ::chambernr(), RPCClusterSizeTest::clientOperation(), RPCDeadChannelTest::clientOperation(), rpcdqm::utils::detId2RollNr(), RPCMonitorSync::endJob(), RPCGeomServ::eta_partition(), RPCNoisyStripTest::fillGlobalME(), RPCOccupancyTest::fillGlobalME(), RPCMultiplicityTest::fillGlobalME(), DetIdInfo::info(), fireworks::info(), init(), RPCGeomServ::name(), RPCMonitorDigi::performSourceOperation(), MuonSimHitProducer::produce(), RPCMonitorSync::readRPCDAQStrips(), and RPCGeomServ::shortname().

122  {
123  return int((id_>>RollStartBit_) & RollMask_); // value 0 is used as wild card
124  }
static const int RollStartBit_
Definition: RPCDetId.h:197
uint32_t id_
Definition: DetId.h:57
static const unsigned int RollMask_
Definition: RPCDetId.h:198
int RPCDetId::sector ( ) const
inline

Sector id: the group of chambers at same phi (and increasing r)

Definition at line 104 of file RPCDetId.h.

References DetId::id_, minSectorId, SectorMask_, and SectorStartBit_.

Referenced by RPCGeomServ::aclockwise(), RPCEfficiency::beginRun(), RPCMonitorSync::bookDetUnitME(), RPCGeometryBuilderFromCondDB::build(), buildfromDB(), buildfromTrIndex(), RPCGeometryBuilderFromDDD::buildGeometry(), RPCGeomServ::chambername(), RPCGeomServ::chambernr(), RPCGeomServ::channelInChip(), RPCClusterSizeTest::clientOperation(), RPCDeadChannelTest::clientOperation(), rpcdqm::utils::detId2ChamberLabel(), rpcdqm::utils::detId2ChamberNr(), rpcdqm::utils::detId2RollNr(), RPCMonitorSync::endJob(), RPCEfficiencySecond::endRun(), RPCNoisyStripTest::fillGlobalME(), RPCOccupancyTest::fillGlobalME(), RPCMultiplicityTest::fillGlobalME(), RPCRecHitFilter::filter(), RPCBookFolderStructure::folderStructure(), geometryXMLparser.DTAlignable::index(), DetIdInfo::info(), fireworks::info(), MuonRPCDetLayerGeometryBuilder::isFront(), L1TRPCTPG::L1TRPCBookME(), RPCGeomServ::name(), RBCProcessRPCSimDigis::next(), RBCProcessRPCDigis::next(), ObjectMap::ObjectMap(), ObjectMap2::ObjectMap2(), RPCMonitorDigi::performSourceOperation(), MuonSimHitProducer::produce(), RPCGeomServ::segment(), RPCGeomServ::shortname(), TracktoRPC::TracktoRPC(), and RPCGeomServ::zpositive().

104  {
105  return int((id_>>SectorStartBit_) & SectorMask_) + (minSectorId+1);
106  }
static const int minSectorId
Definition: RPCDetId.h:149
static const unsigned int SectorMask_
Definition: RPCDetId.h:186
static const int SectorStartBit_
Definition: RPCDetId.h:185
uint32_t id_
Definition: DetId.h:57
int RPCDetId::station ( ) const
inline

Station id : For Barrel: the four groups of chambers at same r (distance from beam axis) and increasing phi For Endcap: the three groups of chambers at same z (distance from interaction point), i.e. the disk

Definition at line 98 of file RPCDetId.h.

References DetId::id_, minStationId, StationMask_, and StationStartBit_.

Referenced by RPCPointVsRecHit::analyze(), RPCRecHitValid::analyze(), RPCDigiValid::analyze(), RPCEfficiency::analyze(), RPCEfficiency::beginRun(), RPCMonitorSync::bookDetUnitME(), RPCMonitorDigi::bookRollME(), RPCGeometryBuilderFromCondDB::build(), buildfromDB(), buildfromTrIndex(), RPCGeometryBuilderFromDDD::buildGeometry(), reco::helper::JetMuonHitsIDHelper::calculate(), RPCStripsRing::calculateHwPlane(), RPCGeomServ::chambername(), RPCGeomServ::chambernr(), RPCGeomServ::channelInChip(), RPCSeedPattern::checkSegment(), RPCClusterSizeTest::clientOperation(), RPCDeadChannelTest::clientOperation(), ResidualRefitting::CollectTrackHits(), CSCSegtoRPC::CSCSegtoRPC(), rpcdqm::utils::detId2ChamberLabel(), rpcdqm::utils::detId2ChamberNr(), rpcdqm::utils::detId2RollNr(), RPCMonitorSync::endJob(), RPCBxTest::endRun(), RPCEfficiencySecond::endRun(), RPCNoisyStripTest::fillGlobalME(), RPCOccupancyTest::fillGlobalME(), RPCMultiplicityTest::fillGlobalME(), RPCRecHitFilter::filter(), RPCBookFolderStructure::folderStructure(), GlobalMuonRefitter::getRidOfSelectStationHits(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), fireworks::info(), MuonRPCDetLayerGeometryBuilder::isFront(), L1TRPCTPG::L1TRPCBookME(), HSCPValidator::makeSimDigiPlotsRPC(), TrackTransformerForGlobalCosmicMuons::MuonKeep(), RPCGeomServ::name(), RBCProcessRPCSimDigis::next(), RBCProcessRPCDigis::next(), ObjectMap::ObjectMap(), ObjectMap2::ObjectMap2(), ObjectMap2CSC::ObjectMap2CSC(), ObjectMapCSC::ObjectMapCSC(), operator<(), RPCMonitorDigi::performSourceOperation(), MuonSimHitProducer::produce(), ResidualRefitting::ReturnSector(), ResidualRefitting::ReturnStation(), RPCGeomServ::segment(), GlobalMuonRefitter::selectMuonHits(), reco::HitPattern::set(), RPCGeomServ::shortname(), TAMuonChamberMatch::station(), reco::MuonChamberMatch::station(), and TracktoRPC::TracktoRPC().

98  {
99  return int((id_>>StationStartBit_) & StationMask_) + minStationId;
100  }
static const int StationStartBit_
Definition: RPCDetId.h:180
static const int minStationId
Definition: RPCDetId.h:146
static const unsigned int StationMask_
Definition: RPCDetId.h:181
uint32_t id_
Definition: DetId.h:57
int RPCDetId::subsector ( ) const
inline
int RPCDetId::trIndex ( ) const
inline

Definition at line 127 of file RPCDetId.h.

References trind.

Referenced by buildfromDB(), and buildfromTrIndex().

127  {
128  return trind;
129  }
int trind
Definition: RPCDetId.h:211

Member Data Documentation

const uint32_t RPCDetId::chamberIdMask_ = ~(RollMask_<<RollStartBit_)
staticprivate

Definition at line 200 of file RPCDetId.h.

Referenced by chamberId().

const unsigned int RPCDetId::LayerMask_ = 0X1
staticprivate

Definition at line 190 of file RPCDetId.h.

Referenced by init(), and layer().

const int RPCDetId::LayerNumBits_ = 1
staticprivate

Definition at line 188 of file RPCDetId.h.

const int RPCDetId::LayerStartBit_ = SectorStartBit_+SectorNumBits_
staticprivate

Definition at line 189 of file RPCDetId.h.

Referenced by init(), and layer().

const int RPCDetId::maxLayerId = 2
static
const int RPCDetId::maxRegionId = 1
static

Definition at line 138 of file RPCDetId.h.

Referenced by init().

const int RPCDetId::maxRingBarrelId = 2
static

Definition at line 143 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildBarrelLayers(), and init().

const int RPCDetId::maxRingForwardId = 3
static

Definition at line 141 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildEndcapLayers(), and init().

const int RPCDetId::maxRollId = 4
static
const int RPCDetId::maxSectorBarrelId = 12
static

Definition at line 152 of file RPCDetId.h.

const int RPCDetId::maxSectorForwardId = 6
static

Definition at line 154 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildLayer().

const int RPCDetId::maxSectorId = 12
static

Definition at line 150 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildBarrelLayers(), and init().

const int RPCDetId::maxStationId = 4
static
const int RPCDetId::maxSubSectorBarrelId = 4
static

Definition at line 162 of file RPCDetId.h.

const int RPCDetId::maxSubSectorForwardId = 6
static

Definition at line 164 of file RPCDetId.h.

const int RPCDetId::maxSubSectorId = 6
static

Definition at line 160 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildBarrelLayers(), and init().

const int RPCDetId::minLayerId = 1
static
const int RPCDetId::minRegionId = -1
static

Definition at line 137 of file RPCDetId.h.

Referenced by init(), and region().

const int RPCDetId::minRingBarrelId = -2
static

Definition at line 142 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildBarrelLayers(), init(), and ring().

const int RPCDetId::minRingForwardId = 1
static

Definition at line 140 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildEndcapLayers(), init(), and ring().

const int RPCDetId::minRollId = 0
static
const int RPCDetId::minSectorBarrelId = 1
static

Definition at line 151 of file RPCDetId.h.

const int RPCDetId::minSectorForwardId = 1
static

Definition at line 153 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildLayer().

const int RPCDetId::minSectorId = 0
static

Definition at line 149 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildBarrelLayers(), init(), and sector().

const int RPCDetId::minStationId = 1
static

Definition at line 146 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildBarrelLayers(), init(), and station().

const int RPCDetId::minSubSectorBarrelId = 1
static

Definition at line 161 of file RPCDetId.h.

const int RPCDetId::minSubSectorForwardId = 1
static

Definition at line 163 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildLayer().

const int RPCDetId::minSubSectorId = 0
static

Definition at line 159 of file RPCDetId.h.

Referenced by MuonRPCDetLayerGeometryBuilder::buildBarrelLayers(), init(), and subsector().

const int RPCDetId::RegionMask_ = 0X3
staticprivate

Definition at line 173 of file RPCDetId.h.

Referenced by init(), and region().

const int RPCDetId::RegionNumBits_ = 2
staticprivate

Definition at line 171 of file RPCDetId.h.

const int RPCDetId::RegionStartBit_ = 0
staticprivate

Definition at line 172 of file RPCDetId.h.

Referenced by init(), and region().

const int RPCDetId::RingBarrelOffSet = 3
static

Definition at line 144 of file RPCDetId.h.

Referenced by init(), and ring().

const unsigned int RPCDetId::RingMask_ = 0X7
staticprivate

Definition at line 177 of file RPCDetId.h.

Referenced by init(), and ring().

const int RPCDetId::RingNumBits_ = 3
staticprivate

Definition at line 175 of file RPCDetId.h.

const int RPCDetId::RingStartBit_ = RegionStartBit_+RegionNumBits_
staticprivate

Definition at line 176 of file RPCDetId.h.

Referenced by init(), and ring().

const unsigned int RPCDetId::RollMask_ = 0X7
staticprivate

Definition at line 198 of file RPCDetId.h.

Referenced by init(), and roll().

const int RPCDetId::RollNumBits_ = 3
staticprivate

Definition at line 196 of file RPCDetId.h.

const int RPCDetId::RollStartBit_ = SubSectorStartBit_+SubSectorNumBits_
staticprivate

Definition at line 197 of file RPCDetId.h.

Referenced by init(), and roll().

const unsigned int RPCDetId::SectorMask_ = 0XF
staticprivate

Definition at line 186 of file RPCDetId.h.

Referenced by init(), and sector().

const int RPCDetId::SectorNumBits_ = 4
staticprivate

Definition at line 184 of file RPCDetId.h.

const int RPCDetId::SectorStartBit_ = StationStartBit_+StationNumBits_
staticprivate

Definition at line 185 of file RPCDetId.h.

Referenced by init(), and sector().

const unsigned int RPCDetId::StationMask_ = 0X3
staticprivate

Definition at line 181 of file RPCDetId.h.

Referenced by init(), and station().

const int RPCDetId::StationNumBits_ = 2
staticprivate

Definition at line 179 of file RPCDetId.h.

const int RPCDetId::StationStartBit_ = RingStartBit_+RingNumBits_
staticprivate

Definition at line 180 of file RPCDetId.h.

Referenced by init(), and station().

const unsigned int RPCDetId::SubSectorMask_ = 0X7
staticprivate

Definition at line 194 of file RPCDetId.h.

Referenced by init(), and subsector().

const int RPCDetId::SubSectorNumBits_ = 3
staticprivate

Definition at line 192 of file RPCDetId.h.

const int RPCDetId::SubSectorStartBit_ = LayerStartBit_+LayerNumBits_
staticprivate

Definition at line 193 of file RPCDetId.h.

Referenced by init(), and subsector().

int RPCDetId::trind
private

Definition at line 211 of file RPCDetId.h.

Referenced by buildfromTrIndex(), and trIndex().