CMS 3D CMS Logo

RPCCompDetId.h
Go to the documentation of this file.
1 #ifndef MuonDetId_RPCCompDetId_h
2 #define MuonDetId_RPCCompDetId_h
3 // -*- C++ -*-
4 //
5 // Package: MuonDetId
6 // Class : RPCCompDetId
7 //
13 //
14 // Author: Marcello Maggi
15 // Created: Wed Nov 2 12:09:10 CET 2011
16 //
19 #include <string>
20 
21 class RPCCompDetId :public DetId {
22 
23  public:
24 
25  RPCCompDetId();
26 
29  RPCCompDetId(uint32_t id);
30  RPCCompDetId(DetId id);
31 
32 
34  RPCCompDetId(int region,
35  int ring,
36  int station,
37  int sector,
38  int layer,
39  int subsector,
40  int type);
41 
43  RPCCompDetId(const std::string& dbname, int type);
44 
46  bool operator < (const RPCCompDetId& r) const;
47 
48  int region() const;
49  int ring() const;
50  int wheel() const;
51  int station() const;
52  int disk() const;
53  int sector() const;
54  int layer() const;
55  int subsector() const;
56  int type() const;
57  std::string dbname() const;
58 
59  static const int minRegionId= -1;
60  static const int maxRegionId= 1;
61  static const int allRegionId=minRegionId-1;
62 
63  static const int minRingForwardId= 1;
64  static const int maxRingForwardId= 3;
65  static const int minRingBarrelId= -2;
66  static const int maxRingBarrelId= 2;
67  static const int RingBarrelOffSet= 3;
68  static const int allRingId=minRingBarrelId-1;
69 
70  static const int minStationId= 1;
71  static const int maxStationId= 4;
72  static const int allStationId=minStationId-1;
73 
74  static const int minSectorId= 1;
75  static const int maxSectorId= 36;
76  static const int minSectorBarrelId= 1;
77  static const int maxSectorBarrelId= 12;
78  static const int minSectorForwardId= 1;
79  static const int maxSectorForwardId= 36;
80  static const int allSectorId=minSectorId-1;
81 
82  static const int minLayerId= 1;
83  static const int maxLayerId= 2;
84  static const int allLayerId=minLayerId-1;
85 
86 
87  static const int minSubSectorId= 1;
88  static const int maxSubSectorId= 2;
89  static const int allSubSectorId=minSubSectorId-1;
90 
91  private:
92  static const int RegionNumBits_ = 2;
93  static const int RegionStartBit_ = 0;
94  static const int RegionMask_ = 0X3;
95 
96  static const int RingNumBits_ = 3;
97  static const int RingStartBit_ = RegionStartBit_+RegionNumBits_;
98  static const unsigned int RingMask_ = 0X7;
99 
100  static const int StationNumBits_ = 3;
101  static const int StationStartBit_ = RingStartBit_+RingNumBits_;
102  static const unsigned int StationMask_ = 0X7;
103 
104  static const int SectorNumBits_ = 6;
105  static const int SectorStartBit_ = StationStartBit_+StationNumBits_;
106  static const unsigned int SectorMask_ = 0X3F;
107 
108  static const int LayerNumBits_ = 2;
109  static const int LayerStartBit_ = SectorStartBit_+SectorNumBits_;
110  static const unsigned int LayerMask_ = 0X3;
111 
112  static const int SubSectorNumBits_ = 2;
113  static const int SubSectorStartBit_ = LayerStartBit_+LayerNumBits_;
114  static const unsigned int SubSectorMask_ = 0X3;
115 
116 
117  private:
118  void init(int region,
119  int ring,
120  int station,
121  int sector,
122  int layer,
123  int subsector);
124 
125  void init();
126  void initGas();
127  std::string gasDBname() const;
128  private:
130  int _type;
131 
132 }; // RPCCompDetId
133 
134 std::ostream& operator<<( std::ostream& os, const RPCCompDetId& id );
135 
136 #endif
type
Definition: HCALResponse.h:21
std::string _dbname
Definition: RPCCompDetId.h:129
static const int RegionMask_
Definition: RPCCompDetId.h:94
static const int maxStationId
Definition: RPCCompDetId.h:71
static const int minRingBarrelId
Definition: RPCCompDetId.h:65
static const int allRegionId
Definition: RPCCompDetId.h:61
static const int maxSubSectorId
Definition: RPCCompDetId.h:88
static const int allSubSectorId
Definition: RPCCompDetId.h:89
static const int RingNumBits_
Definition: RPCCompDetId.h:96
static const int allRingId
Definition: RPCCompDetId.h:68
static const unsigned int LayerMask_
Definition: RPCCompDetId.h:110
static const int allSectorId
Definition: RPCCompDetId.h:80
static const int RegionStartBit_
Definition: RPCCompDetId.h:93
static const int maxSectorBarrelId
Definition: RPCCompDetId.h:77
int sector() const
Definition: RPCCompDetId.cc:98
static const int minSubSectorId
Definition: RPCCompDetId.h:87
int type() const
static const int minSectorBarrelId
Definition: RPCCompDetId.h:76
static const int StationStartBit_
Definition: RPCCompDetId.h:101
static const int RingStartBit_
Definition: RPCCompDetId.h:97
int subsector() const
static const int minRegionId
Definition: RPCCompDetId.h:59
std::string gasDBname() const
static const int SubSectorStartBit_
Definition: RPCCompDetId.h:113
static const int allStationId
Definition: RPCCompDetId.h:72
static const int SubSectorNumBits_
Definition: RPCCompDetId.h:112
static const int maxLayerId
Definition: RPCCompDetId.h:83
static const int minStationId
Definition: RPCCompDetId.h:70
std::string dbname() const
static const int allLayerId
Definition: RPCCompDetId.h:84
static const unsigned int StationMask_
Definition: RPCCompDetId.h:102
int station() const
Definition: RPCCompDetId.cc:84
static const unsigned int SectorMask_
Definition: RPCCompDetId.h:106
static const int maxRingBarrelId
Definition: RPCCompDetId.h:66
static const int LayerNumBits_
Definition: RPCCompDetId.h:108
Definition: DetId.h:18
static const int RegionNumBits_
Definition: RPCCompDetId.h:92
static const unsigned int SubSectorMask_
Definition: RPCCompDetId.h:114
static const int maxRegionId
Definition: RPCCompDetId.h:60
static const int minSectorForwardId
Definition: RPCCompDetId.h:78
static const int minSectorId
Definition: RPCCompDetId.h:74
static const int RingBarrelOffSet
Definition: RPCCompDetId.h:67
static const int SectorNumBits_
Definition: RPCCompDetId.h:104
static const int minRingForwardId
Definition: RPCCompDetId.h:63
static const int maxSectorId
Definition: RPCCompDetId.h:75
static const int maxRingForwardId
Definition: RPCCompDetId.h:64
static const int minLayerId
Definition: RPCCompDetId.h:82
std::ostream & operator<<(std::ostream &os, const RPCCompDetId &id)
static const int StationNumBits_
Definition: RPCCompDetId.h:100
int wheel() const
Definition: RPCCompDetId.cc:76
static const int maxSectorForwardId
Definition: RPCCompDetId.h:79
int layer() const
bool operator<(const RPCCompDetId &r) const
Sort Operator based on the name.
Definition: RPCCompDetId.cc:60
static const unsigned int RingMask_
Definition: RPCCompDetId.h:98
int region() const
Definition: RPCCompDetId.cc:65
int disk() const
Definition: RPCCompDetId.cc:89
static const int LayerStartBit_
Definition: RPCCompDetId.h:109
static const int SectorStartBit_
Definition: RPCCompDetId.h:105
int ring() const
Definition: RPCCompDetId.cc:70