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 public:
23  RPCCompDetId();
24 
27  RPCCompDetId(uint32_t id);
28  RPCCompDetId(DetId id);
29 
31  RPCCompDetId(int region, int ring, int station, int sector, int layer, int subsector, int type);
32 
34  RPCCompDetId(const std::string& dbname, int type);
35 
37  bool operator<(const RPCCompDetId& r) const;
38 
39  int region() const;
40  int ring() const;
41  int wheel() const;
42  int station() const;
43  int disk() const;
44  int sector() const;
45  int layer() const;
46  int subsector() const;
47  int type() const;
48  std::string dbname() const;
49 
50  static const int minRegionId = -1;
51  static const int maxRegionId = 1;
52  static const int allRegionId = minRegionId - 1;
53 
54  static const int minRingForwardId = 1;
55  static const int maxRingForwardId = 3;
56  static const int minRingBarrelId = -2;
57  static const int maxRingBarrelId = 2;
58  static const int RingBarrelOffSet = 3;
59  static const int allRingId = minRingBarrelId - 1;
60 
61  static const int minStationId = 1;
62  static const int maxStationId = 4;
63  static const int allStationId = minStationId - 1;
64 
65  static const int minSectorId = 1;
66  static const int maxSectorId = 36;
67  static const int minSectorBarrelId = 1;
68  static const int maxSectorBarrelId = 12;
69  static const int minSectorForwardId = 1;
70  static const int maxSectorForwardId = 36;
71  static const int allSectorId = minSectorId - 1;
72 
73  static const int minLayerId = 1;
74  static const int maxLayerId = 2;
75  static const int allLayerId = minLayerId - 1;
76 
77  static const int minSubSectorId = 1;
78  static const int maxSubSectorId = 2;
79  static const int allSubSectorId = minSubSectorId - 1;
80 
81 private:
82  static const int RegionNumBits_ = 2;
83  static const int RegionStartBit_ = 0;
84  static const int RegionMask_ = 0X3;
85 
86  static const int RingNumBits_ = 3;
88  static const unsigned int RingMask_ = 0X7;
89 
90  static const int StationNumBits_ = 3;
92  static const unsigned int StationMask_ = 0X7;
93 
94  static const int SectorNumBits_ = 6;
96  static const unsigned int SectorMask_ = 0X3F;
97 
98  static const int LayerNumBits_ = 2;
100  static const unsigned int LayerMask_ = 0X3;
101 
102  static const int SubSectorNumBits_ = 2;
104  static const unsigned int SubSectorMask_ = 0X3;
105 
106 private:
107  void init(int region, int ring, int station, int sector, int layer, int subsector);
108 
109  void init();
110  void initGas();
111  std::string gasDBname() const;
112 
113 private:
115  int _type;
116 
117 }; // RPCCompDetId
118 
119 std::ostream& operator<<(std::ostream& os, const RPCCompDetId& id);
120 
121 #endif
RPCCompDetId::allRingId
static const int allRingId
Definition: RPCCompDetId.h:59
RPCCompDetId::station
int station() const
Definition: RPCCompDetId.cc:56
RPCCompDetId::maxSectorForwardId
static const int maxSectorForwardId
Definition: RPCCompDetId.h:70
RPCCompDetId::allSectorId
static const int allSectorId
Definition: RPCCompDetId.h:71
RPCCompDetId::minSubSectorId
static const int minSubSectorId
Definition: RPCCompDetId.h:77
RPCCompDetId::RingMask_
static const unsigned int RingMask_
Definition: RPCCompDetId.h:88
RPCCompDetId::maxSectorBarrelId
static const int maxSectorBarrelId
Definition: RPCCompDetId.h:68
RPCCompDetId::type
int type() const
Definition: RPCCompDetId.cc:71
RPCCompDetId::operator<
bool operator<(const RPCCompDetId &r) const
Sort Operator based on the name.
Definition: RPCCompDetId.cc:43
RPCCompDetId::SectorStartBit_
static const int SectorStartBit_
Definition: RPCCompDetId.h:95
RPCCompDetId::RegionMask_
static const int RegionMask_
Definition: RPCCompDetId.h:84
RPCCompDetId::minRegionId
static const int minRegionId
Definition: RPCCompDetId.h:50
RPCCompDetId::SubSectorStartBit_
static const int SubSectorStartBit_
Definition: RPCCompDetId.h:103
RPCCompDetId::maxStationId
static const int maxStationId
Definition: RPCCompDetId.h:62
RPCCompDetId::minRingBarrelId
static const int minRingBarrelId
Definition: RPCCompDetId.h:56
RPCCompDetId::minStationId
static const int minStationId
Definition: RPCCompDetId.h:61
RPCCompDetId::gasDBname
std::string gasDBname() const
Definition: RPCCompDetId.cc:201
RPCCompDetId::maxSubSectorId
static const int maxSubSectorId
Definition: RPCCompDetId.h:78
RPCCompDetId::maxLayerId
static const int maxLayerId
Definition: RPCCompDetId.h:74
DetId
Definition: DetId.h:17
operator<<
std::ostream & operator<<(std::ostream &os, const RPCCompDetId &id)
Definition: RPCCompDetId.cc:242
RPCCompDetId::RPCCompDetId
RPCCompDetId()
Definition: RPCCompDetId.cc:17
RPCCompDetId::LayerMask_
static const unsigned int LayerMask_
Definition: RPCCompDetId.h:100
RPCCompDetId::allSubSectorId
static const int allSubSectorId
Definition: RPCCompDetId.h:79
RPCCompDetId::RegionStartBit_
static const int RegionStartBit_
Definition: RPCCompDetId.h:83
RPCCompDetId::disk
int disk() const
Definition: RPCCompDetId.cc:58
RPCCompDetId::region
int region() const
Definition: RPCCompDetId.cc:45
RPCCompDetId::layer
int layer() const
Definition: RPCCompDetId.cc:67
RPCCompDetId::minSectorBarrelId
static const int minSectorBarrelId
Definition: RPCCompDetId.h:67
RPCCompDetId::StationStartBit_
static const int StationStartBit_
Definition: RPCCompDetId.h:91
RPCCompDetId::RingStartBit_
static const int RingStartBit_
Definition: RPCCompDetId.h:87
RPCCompDetId::SubSectorMask_
static const unsigned int SubSectorMask_
Definition: RPCCompDetId.h:104
RPCCompDetId::RegionNumBits_
static const int RegionNumBits_
Definition: RPCCompDetId.h:82
RPCCompDetId::minSectorForwardId
static const int minSectorForwardId
Definition: RPCCompDetId.h:69
RPCCompDetId::ring
int ring() const
Definition: RPCCompDetId.cc:47
RPCCompDetId
Definition: RPCCompDetId.h:21
RPCCompDetId::RingBarrelOffSet
static const int RingBarrelOffSet
Definition: RPCCompDetId.h:58
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
RPCCompDetId::SectorNumBits_
static const int SectorNumBits_
Definition: RPCCompDetId.h:94
RPCCompDetId::dbname
std::string dbname() const
Definition: RPCCompDetId.cc:73
RPCCompDetId::allStationId
static const int allStationId
Definition: RPCCompDetId.h:63
RPCCompDetId::SubSectorNumBits_
static const int SubSectorNumBits_
Definition: RPCCompDetId.h:102
RPCCompDetId::initGas
void initGas()
Definition: RPCCompDetId.cc:116
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RPCCompDetId::minLayerId
static const int minLayerId
Definition: RPCCompDetId.h:73
alignCSCRings.r
r
Definition: alignCSCRings.py:93
RPCCompDetId::allLayerId
static const int allLayerId
Definition: RPCCompDetId.h:75
RPCCompDetId::StationMask_
static const unsigned int StationMask_
Definition: RPCCompDetId.h:92
RPCCompDetId::StationNumBits_
static const int StationNumBits_
Definition: RPCCompDetId.h:90
RPCCompDetId::SectorMask_
static const unsigned int SectorMask_
Definition: RPCCompDetId.h:96
DetId.h
RPCCompDetId::LayerStartBit_
static const int LayerStartBit_
Definition: RPCCompDetId.h:99
RPCCompDetId::_dbname
std::string _dbname
Definition: RPCCompDetId.h:114
RPCCompDetId::maxRingBarrelId
static const int maxRingBarrelId
Definition: RPCCompDetId.h:57
RPCCompDetId::wheel
int wheel() const
Definition: RPCCompDetId.cc:49
RPCCompDetId::sector
int sector() const
Definition: RPCCompDetId.cc:65
Exception.h
RPCCompDetId::LayerNumBits_
static const int LayerNumBits_
Definition: RPCCompDetId.h:98
RPCCompDetId::maxRegionId
static const int maxRegionId
Definition: RPCCompDetId.h:51
RPCCompDetId::minSectorId
static const int minSectorId
Definition: RPCCompDetId.h:65
RPCCompDetId::subsector
int subsector() const
Definition: RPCCompDetId.cc:69
RPCCompDetId::allRegionId
static const int allRegionId
Definition: RPCCompDetId.h:52
RPCCompDetId::minRingForwardId
static const int minRingForwardId
Definition: RPCCompDetId.h:54
RPCCompDetId::init
void init()
Definition: RPCCompDetId.cc:110
RPCCompDetId::RingNumBits_
static const int RingNumBits_
Definition: RPCCompDetId.h:86
RPCCompDetId::_type
int _type
Definition: RPCCompDetId.h:115
RPCCompDetId::maxSectorId
static const int maxSectorId
Definition: RPCCompDetId.h:66
RPCCompDetId::maxRingForwardId
static const int maxRingForwardId
Definition: RPCCompDetId.h:55