test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTChamberId.h
Go to the documentation of this file.
1 #ifndef MuonDetId_DTChamberId_H
2 #define MuonDetId_DTChamberId_H
3 
11 
12 #include <iosfwd>
13 
14 class DTChamberId : public DetId {
15 public:
18  DTChamberId();
19 
20 
26  DTChamberId(uint32_t id);
27  DTChamberId(DetId id);
28 
29 
33  DTChamberId(int wheel,
34  int station,
35  int sector);
36 
37 
41  DTChamberId(const DTChamberId& chId);
42 
43 
45  int wheel() const {
46  return int((id_>>wheelStartBit_) & wheelMask_)+ minWheelId -1;
47  }
48 
49 
51  int station() const {
52  return ((id_>>stationStartBit_) & stationMask_);
53  }
54 
55 
61  int sector() const {
62  return ((id_>>sectorStartBit_)& sectorMask_);
63  }
64 
65 
67  static const int minStationId= 1;
69  static const int maxStationId= 4;
71  static const int minSectorId= 0;
73  static const int maxSectorId= 14;
75  static const int minWheelId= -2;
77  static const int maxWheelId= 2;
79  static const int minSuperLayerId= 0;
81  static const int maxSuperLayerId= 3;
83  static const int minLayerId= 0;
85  static const int maxLayerId= 4;
87  static const int minWireId= 0;
89  static const int maxWireId= 97;
90 
91 
92  protected:
94  static const int wireNumBits_= 7;
95  static const int wireStartBit_= 3;
96  static const int layerNumBits_= 3;
98  static const int slayerNumBits_= 2;
100  static const int wheelNumBits_ = 3;
102  static const int sectorNumBits_= 4;
105  static const int stationNumBits_= 3;
107 
108 
109  static const uint32_t wheelMask_= 0x7;
110  static const uint32_t stationMask_= 0x7;
111  static const uint32_t sectorMask_= 0xf;
112  static const uint32_t slMask_= 0x3;
113  static const uint32_t lMask_= 0x7;
114  static const uint32_t wireMask_= 0x7f;
115 
116  static const uint32_t layerIdMask_= ~(wireMask_<<wireStartBit_);
117  static const uint32_t slIdMask_ = ~((wireMask_<<wireStartBit_) |
119  static const uint32_t chamberIdMask_ = ~((wireMask_<<wireStartBit_) |
122 
123  // Perform a consistency check of the id with a DT Id
124  // It thorows an exception if this is not the case
125  void checkMuonId();
126 
127 };
128 
129 
130 std::ostream& operator<<( std::ostream& os, const DTChamberId& id );
131 
132 #endif
133 
static const int minSectorId
lowest sector id. 0 indicates all sectors (a station)
Definition: DTChamberId.h:71
static const int slayerNumBits_
Definition: DTChamberId.h:98
static const int wireNumBits_
two bits would be enough, but we could use the number &quot;0&quot; as a wildcard
Definition: DTChamberId.h:94
static const int minStationId
lowest station id
Definition: DTChamberId.h:67
static const int sectorNumBits_
Definition: DTChamberId.h:102
static const uint32_t slIdMask_
Definition: DTChamberId.h:117
static const int sectorStartBit_
Definition: DTChamberId.h:103
static const uint32_t layerIdMask_
Definition: DTChamberId.h:116
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
static const int wireStartBit_
Definition: DTChamberId.h:95
static const int wheelStartBit_
Definition: DTChamberId.h:101
static const int maxWireId
highest wire id (chambers have 48 to 96 wires)
Definition: DTChamberId.h:89
static const uint32_t stationMask_
Definition: DTChamberId.h:110
static const int maxLayerId
highest layer id
Definition: DTChamberId.h:85
static const int minWireId
lowest wire id (numbering starts from 1 or 2). 0 indicates a full layer
Definition: DTChamberId.h:87
static const int stationNumBits_
two bits would be enough, but we could use the number &quot;0&quot; as a wildcard
Definition: DTChamberId.h:105
static const uint32_t slMask_
Definition: DTChamberId.h:112
static const int minLayerId
lowest layer id. 0 indicates a full SL
Definition: DTChamberId.h:83
static const int wheelNumBits_
Definition: DTChamberId.h:100
void checkMuonId()
Definition: DTChamberId.cc:57
static const int maxSuperLayerId
highest superlayer id
Definition: DTChamberId.h:81
static const uint32_t sectorMask_
Definition: DTChamberId.h:111
static const int maxStationId
highest station id
Definition: DTChamberId.h:69
static const int layerStartBit_
Definition: DTChamberId.h:97
static const int minWheelId
lowest wheel number
Definition: DTChamberId.h:75
static const uint32_t lMask_
Definition: DTChamberId.h:113
Definition: DetId.h:18
static const int maxWheelId
highest wheel number
Definition: DTChamberId.h:77
uint32_t id_
Definition: DetId.h:55
static const int minSuperLayerId
loweset super layer id. 0 indicates a full chamber
Definition: DTChamberId.h:79
int sector() const
Definition: DTChamberId.h:61
static const uint32_t chamberIdMask_
Definition: DTChamberId.h:119
static const uint32_t wireMask_
Definition: DTChamberId.h:114
static const uint32_t wheelMask_
Definition: DTChamberId.h:109
static const int slayerStartBit_
Definition: DTChamberId.h:99
static const int stationStartBit_
Definition: DTChamberId.h:106
int station() const
Return the station number.
Definition: DTChamberId.h:51
static const int layerNumBits_
Definition: DTChamberId.h:96
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
static const int maxSectorId
highest sector id.
Definition: DTChamberId.h:73