CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: RPCCompDetId.h,v 1.1 2011/11/05 10:39:53 mmaggi Exp $
17 //
20 #include <string>
21 
22 class RPCCompDetId :public DetId {
23 
24  public:
25 
26  RPCCompDetId();
27 
30  RPCCompDetId(uint32_t id);
31  RPCCompDetId(DetId id);
32 
33 
35  RPCCompDetId(int region,
36  int ring,
37  int station,
38  int sector,
39  int layer,
40  int subsector,
41  int type);
42 
44  RPCCompDetId(const std::string& dbname, int type);
45 
47  bool operator < (const RPCCompDetId& r) const;
48 
49  int region() const;
50  int ring() const;
51  int wheel() const;
52  int station() const;
53  int disk() const;
54  int sector() const;
55  int layer() const;
56  int subsector() const;
57  int type() const;
58  std::string dbname() const;
59 
60  static const int minRegionId= -1;
61  static const int maxRegionId= 1;
62  static const int allRegionId=minRegionId-1;
63 
64  static const int minRingForwardId= 1;
65  static const int maxRingForwardId= 3;
66  static const int minRingBarrelId= -2;
67  static const int maxRingBarrelId= 2;
68  static const int RingBarrelOffSet= 3;
69  static const int allRingId=minRingBarrelId-1;
70 
71  static const int minStationId= 1;
72  static const int maxStationId= 4;
73  static const int allStationId=minStationId-1;
74 
75  static const int minSectorId= 1;
76  static const int maxSectorId= 36;
77  static const int minSectorBarrelId= 1;
78  static const int maxSectorBarrelId= 12;
79  static const int minSectorForwardId= 1;
80  static const int maxSectorForwardId= 36;
81  static const int allSectorId=minSectorId-1;
82 
83  static const int minLayerId= 1;
84  static const int maxLayerId= 2;
85  static const int allLayerId=minLayerId-1;
86 
87 
88  static const int minSubSectorId= 1;
89  static const int maxSubSectorId= 2;
90  static const int allSubSectorId=minSubSectorId-1;
91 
92  private:
93  static const int RegionNumBits_ = 2;
94  static const int RegionStartBit_ = 0;
95  static const int RegionMask_ = 0X3;
96 
97  static const int RingNumBits_ = 3;
99  static const unsigned int RingMask_ = 0X7;
100 
101  static const int StationNumBits_ = 3;
103  static const unsigned int StationMask_ = 0X7;
104 
105  static const int SectorNumBits_ = 6;
107  static const unsigned int SectorMask_ = 0X3F;
108 
109  static const int LayerNumBits_ = 2;
111  static const unsigned int LayerMask_ = 0X3;
112 
113  static const int SubSectorNumBits_ = 2;
115  static const unsigned int SubSectorMask_ = 0X3;
116 
117 
118  private:
119  void init(int region,
120  int ring,
121  int station,
122  int sector,
123  int layer,
124  int subsector);
125 
126  void init();
127  void initGas();
128  std::string gasDBname() const;
129  private:
130  std::string _dbname;
131  int _type;
132 
133 }; // RPCCompDetId
134 
135 std::ostream& operator<<( std::ostream& os, const RPCCompDetId& id );
136 
137 #endif
type
Definition: HCALResponse.h:22
std::string _dbname
Definition: RPCCompDetId.h:130
static const int RegionMask_
Definition: RPCCompDetId.h:95
static const int maxStationId
Definition: RPCCompDetId.h:72
static const int minRingBarrelId
Definition: RPCCompDetId.h:66
static const int allRegionId
Definition: RPCCompDetId.h:62
static const int maxSubSectorId
Definition: RPCCompDetId.h:89
static const int allSubSectorId
Definition: RPCCompDetId.h:90
static const int RingNumBits_
Definition: RPCCompDetId.h:97
static const int allRingId
Definition: RPCCompDetId.h:69
static const unsigned int LayerMask_
Definition: RPCCompDetId.h:111
static const int allSectorId
Definition: RPCCompDetId.h:81
static const int RegionStartBit_
Definition: RPCCompDetId.h:94
static const int maxSectorBarrelId
Definition: RPCCompDetId.h:78
int sector() const
Definition: RPCCompDetId.cc:99
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
static const int minSubSectorId
Definition: RPCCompDetId.h:88
int type() const
static const int minSectorBarrelId
Definition: RPCCompDetId.h:77
static const int StationStartBit_
Definition: RPCCompDetId.h:102
static const int RingStartBit_
Definition: RPCCompDetId.h:98
int subsector() const
static const int minRegionId
Definition: RPCCompDetId.h:60
std::string gasDBname() const
static const int SubSectorStartBit_
Definition: RPCCompDetId.h:114
static const int allStationId
Definition: RPCCompDetId.h:73
static const int SubSectorNumBits_
Definition: RPCCompDetId.h:113
static const int maxLayerId
Definition: RPCCompDetId.h:84
static const int minStationId
Definition: RPCCompDetId.h:71
std::string dbname() const
static const int allLayerId
Definition: RPCCompDetId.h:85
static const unsigned int StationMask_
Definition: RPCCompDetId.h:103
int station() const
Definition: RPCCompDetId.cc:85
static const unsigned int SectorMask_
Definition: RPCCompDetId.h:107
static const int maxRingBarrelId
Definition: RPCCompDetId.h:67
static const int LayerNumBits_
Definition: RPCCompDetId.h:109
Definition: DetId.h:20
static const int RegionNumBits_
Definition: RPCCompDetId.h:93
static const unsigned int SubSectorMask_
Definition: RPCCompDetId.h:115
static const int maxRegionId
Definition: RPCCompDetId.h:61
static const int minSectorForwardId
Definition: RPCCompDetId.h:79
static const int minSectorId
Definition: RPCCompDetId.h:75
static const int RingBarrelOffSet
Definition: RPCCompDetId.h:68
static const int SectorNumBits_
Definition: RPCCompDetId.h:105
static const int minRingForwardId
Definition: RPCCompDetId.h:64
static const int maxSectorId
Definition: RPCCompDetId.h:76
static const int maxRingForwardId
Definition: RPCCompDetId.h:65
static const int minLayerId
Definition: RPCCompDetId.h:83
static const int StationNumBits_
Definition: RPCCompDetId.h:101
int wheel() const
Definition: RPCCompDetId.cc:77
static const int maxSectorForwardId
Definition: RPCCompDetId.h:80
int layer() const
bool operator<(const RPCCompDetId &r) const
Sort Operator based on the name.
Definition: RPCCompDetId.cc:61
static const unsigned int RingMask_
Definition: RPCCompDetId.h:99
int region() const
Definition: RPCCompDetId.cc:66
int disk() const
Definition: RPCCompDetId.cc:90
static const int LayerStartBit_
Definition: RPCCompDetId.h:110
static const int SectorStartBit_
Definition: RPCCompDetId.h:106
int ring() const
Definition: RPCCompDetId.cc:71