CMS 3D CMS Logo

List of all members | Public Types | Static Public Member Functions
MuonHitHelper Class Reference

#include <MuonHitHelper.h>

Public Types

enum  CSCType {
  CSC_ALL = 0, CSC_ME11, CSC_ME1a, CSC_ME1b,
  CSC_ME12, CSC_ME13, CSC_ME21, CSC_ME22,
  CSC_ME31, CSC_ME32, CSC_ME41, CSC_ME42
}
 CSC chamber types, according to CSCDetId::iChamberType() More...
 
enum  DTType {
  DT_ALL = 0, DT_MB01, DT_MB02, DT_MB03,
  DT_MB04, DT_MB11p, DT_MB12p, DT_MB13p,
  DT_MB14p, DT_MB21p, DT_MB22p, DT_MB23p,
  DT_MB24p, DT_MB11n, DT_MB12n, DT_MB13n,
  DT_MB14n, DT_MB21n, DT_MB22n, DT_MB23n,
  DT_MB24n
}
 DT chamber types. More...
 
enum  GEMType { GEM_ALL = 0, GEM_ME11, GEM_ME21 }
 GEM chamber types. More...
 
enum  RPCType {
  RPC_ALL = 0, RPC_ME12, RPC_ME13, RPC_ME22,
  RPC_ME23, RPC_ME31, RPC_ME32, RPC_ME33,
  RPC_ME41, RPC_ME42, RPC_ME43, RPC_MB01,
  RPC_MB02, RPC_MB03, RPC_MB04, RPC_MB11p,
  RPC_MB12p, RPC_MB13p, RPC_MB14p, RPC_MB21p,
  RPC_MB22p, RPC_MB23p, RPC_MB24p, RPC_MB11n,
  RPC_MB12n, RPC_MB13n, RPC_MB14n, RPC_MB21n,
  RPC_MB22n, RPC_MB23n, RPC_MB24n
}
 RPC endcap chamber types. More...
 

Static Public Member Functions

static int chamber (const DetId &id)
 
static bool isCSC (unsigned int detId)
 
static bool isDT (unsigned int detId)
 check detid type More...
 
static bool isGEM (unsigned int detId)
 
static bool isME0 (unsigned int detId)
 
static bool isRPC (unsigned int detId)
 
static int toCSCType (int st, int ri)
 
static int toDTType (int wh, int st)
 
static int toGEMType (int st, int ri)
 
static int toRPCType (int re, int st, int ri)
 

Detailed Description

Definition at line 11 of file MuonHitHelper.h.

Member Enumeration Documentation

◆ CSCType

CSC chamber types, according to CSCDetId::iChamberType()

Enumerator
CSC_ALL 
CSC_ME11 
CSC_ME1a 
CSC_ME1b 
CSC_ME12 
CSC_ME13 
CSC_ME21 
CSC_ME22 
CSC_ME31 
CSC_ME32 
CSC_ME41 
CSC_ME42 

Definition at line 14 of file MuonHitHelper.h.

14  {
15  CSC_ALL = 0,
16  CSC_ME11,
17  CSC_ME1a,
18  CSC_ME1b,
19  CSC_ME12,
20  CSC_ME13,
21  CSC_ME21,
22  CSC_ME22,
23  CSC_ME31,
24  CSC_ME32,
25  CSC_ME41,
26  CSC_ME42
27  };

◆ DTType

DT chamber types.

Enumerator
DT_ALL 
DT_MB01 
DT_MB02 
DT_MB03 
DT_MB04 
DT_MB11p 
DT_MB12p 
DT_MB13p 
DT_MB14p 
DT_MB21p 
DT_MB22p 
DT_MB23p 
DT_MB24p 
DT_MB11n 
DT_MB12n 
DT_MB13n 
DT_MB14n 
DT_MB21n 
DT_MB22n 
DT_MB23n 
DT_MB24n 

Definition at line 68 of file MuonHitHelper.h.

68  {
69  DT_ALL = 0,
70  DT_MB01,
71  DT_MB02,
72  DT_MB03,
73  DT_MB04,
74  DT_MB11p,
75  DT_MB12p,
76  DT_MB13p,
77  DT_MB14p,
78  DT_MB21p,
79  DT_MB22p,
80  DT_MB23p,
81  DT_MB24p,
82  DT_MB11n,
83  DT_MB12n,
84  DT_MB13n,
85  DT_MB14n,
86  DT_MB21n,
87  DT_MB22n,
88  DT_MB23n,
89  DT_MB24n
90  };

◆ GEMType

GEM chamber types.

Enumerator
GEM_ALL 
GEM_ME11 
GEM_ME21 

Definition at line 30 of file MuonHitHelper.h.

30 { GEM_ALL = 0, GEM_ME11, GEM_ME21 };

◆ RPCType

RPC endcap chamber types.

Enumerator
RPC_ALL 
RPC_ME12 
RPC_ME13 
RPC_ME22 
RPC_ME23 
RPC_ME31 
RPC_ME32 
RPC_ME33 
RPC_ME41 
RPC_ME42 
RPC_ME43 
RPC_MB01 
RPC_MB02 
RPC_MB03 
RPC_MB04 
RPC_MB11p 
RPC_MB12p 
RPC_MB13p 
RPC_MB14p 
RPC_MB21p 
RPC_MB22p 
RPC_MB23p 
RPC_MB24p 
RPC_MB11n 
RPC_MB12n 
RPC_MB13n 
RPC_MB14n 
RPC_MB21n 
RPC_MB22n 
RPC_MB23n 
RPC_MB24n 

Definition at line 33 of file MuonHitHelper.h.

33  {
34  RPC_ALL = 0,
35  RPC_ME12,
36  RPC_ME13,
37  RPC_ME22,
38  RPC_ME23,
39  RPC_ME31,
40  RPC_ME32,
41  RPC_ME33,
42  RPC_ME41,
43  RPC_ME42,
44  RPC_ME43,
45  RPC_MB01,
46  RPC_MB02,
47  RPC_MB03,
48  RPC_MB04,
49  RPC_MB11p,
50  RPC_MB12p,
51  RPC_MB13p,
52  RPC_MB14p,
53  RPC_MB21p,
54  RPC_MB22p,
55  RPC_MB23p,
56  RPC_MB24p,
57  RPC_MB11n,
58  RPC_MB12n,
59  RPC_MB13n,
60  RPC_MB14n,
61  RPC_MB21n,
62  RPC_MB22n,
63  RPC_MB23n,
64  RPC_MB24n
65  };

Member Function Documentation

◆ chamber()

int MuonHitHelper::chamber ( const DetId id)
static

Definition at line 23 of file MuonHitHelper.cc.

23  {
24  if (id.det() != DetId::Detector::Muon)
25  return -99;
26  int chamberN = 0;
27  switch (id.subdetId()) {
28  case MuonSubdetId::GEM:
29  chamberN = GEMDetId(id).chamber();
30  break;
31  case MuonSubdetId::RPC:
32  // works only for endcap!!
33  chamberN = RPCDetId(id).sector();
34  break;
35  case MuonSubdetId::CSC:
36  chamberN = CSCDetId(id).chamber();
37  break;
38  case MuonSubdetId::ME0:
39  chamberN = ME0DetId(id).chamber();
40  break;
41  case MuonSubdetId::DT:
42  chamberN = DTChamberId(id).sector();
43  break;
44  };
45  return chamberN;
46 }

References ME0DetId::chamber(), CSCDetId::chamber(), GEMDetId::chamber(), MuonSubdetId::CSC, MuonSubdetId::DT, MuonSubdetId::GEM, MuonSubdetId::ME0, dumpRecoGeometry_cfg::Muon, MuonSubdetId::RPC, DTChamberId::sector(), and RPCDetId::sector().

Referenced by geometryXMLparser.CSCAlignable::index().

◆ isCSC()

bool MuonHitHelper::isCSC ( unsigned int  detId)
static

Definition at line 11 of file MuonHitHelper.cc.

11  {
12  return (DetId(detId)).det() == DetId::Muon && (DetId(detId)).subdetId() == MuonSubdetId::CSC;
13 }

References MuonSubdetId::CSC, and DetId::Muon.

◆ isDT()

bool MuonHitHelper::isDT ( unsigned int  detId)
static

◆ isGEM()

bool MuonHitHelper::isGEM ( unsigned int  detId)
static

Definition at line 7 of file MuonHitHelper.cc.

7  {
8  return (DetId(detId)).det() == DetId::Muon && (DetId(detId)).subdetId() == MuonSubdetId::GEM;
9 }

References MuonSubdetId::GEM, and DetId::Muon.

Referenced by GEMSimHitMatcher::hitsInSuperChamber(), and GEMSimHitMatcher::simHitsGEMCentralPosition().

◆ isME0()

bool MuonHitHelper::isME0 ( unsigned int  detId)
static

Definition at line 19 of file MuonHitHelper.cc.

19  {
20  return (DetId(detId)).det() == DetId::Muon && (DetId(detId)).subdetId() == MuonSubdetId::ME0;
21 }

References MuonSubdetId::ME0, and DetId::Muon.

◆ isRPC()

bool MuonHitHelper::isRPC ( unsigned int  detId)
static

Definition at line 15 of file MuonHitHelper.cc.

15  {
16  return (DetId(detId)).det() == DetId::Muon && (DetId(detId)).subdetId() == MuonSubdetId::RPC;
17 }

References DetId::Muon, and MuonSubdetId::RPC.

◆ toCSCType()

int MuonHitHelper::toCSCType ( int  st,
int  ri 
)
static

Definition at line 195 of file MuonHitHelper.cc.

195  {
196  if (st == 1) {
197  if (ri == 0)
198  return CSC_ME11;
199  if (ri == 1)
200  return CSC_ME1b;
201  if (ri == 2)
202  return CSC_ME12;
203  if (ri == 3)
204  return CSC_ME13;
205  if (ri == 4)
206  return CSC_ME1a;
207  } else if (st == 2) {
208  if (ri == 1)
209  return CSC_ME21;
210  if (ri == 2)
211  return CSC_ME22;
212  } else if (st == 3) {
213  if (ri == 1)
214  return CSC_ME31;
215  if (ri == 2)
216  return CSC_ME32;
217  } else if (st == 4) {
218  if (ri == 1)
219  return CSC_ME41;
220  if (ri == 2)
221  return CSC_ME42;
222  }
223  return CSC_ALL;
224 }

References CSC_ALL, CSC_ME11, CSC_ME12, CSC_ME13, CSC_ME1a, CSC_ME1b, CSC_ME21, CSC_ME22, CSC_ME31, CSC_ME32, CSC_ME41, and CSC_ME42.

Referenced by CSCSimHitMatcher::chamberIds(), CSCSimHitMatcher::detIds(), CSCDigiMatcher::selectDetIds(), and CSCStubMatcher::selectDetIds().

◆ toDTType()

int MuonHitHelper::toDTType ( int  wh,
int  st 
)
static

Definition at line 141 of file MuonHitHelper.cc.

141  {
142  if (wh == -2) {
143  if (st == 1)
144  return DT_MB21n;
145  if (st == 2)
146  return DT_MB22n;
147  if (st == 3)
148  return DT_MB23n;
149  if (st == 4)
150  return DT_MB24n;
151  }
152  if (wh == -1) {
153  if (st == 1)
154  return DT_MB11n;
155  if (st == 2)
156  return DT_MB12n;
157  if (st == 3)
158  return DT_MB13n;
159  if (st == 4)
160  return DT_MB14n;
161  }
162  if (wh == 0) {
163  if (st == 1)
164  return DT_MB01;
165  if (st == 2)
166  return DT_MB02;
167  if (st == 3)
168  return DT_MB03;
169  if (st == 4)
170  return DT_MB04;
171  }
172  if (wh == 1) {
173  if (st == 1)
174  return DT_MB11p;
175  if (st == 2)
176  return DT_MB12p;
177  if (st == 3)
178  return DT_MB13p;
179  if (st == 4)
180  return DT_MB14p;
181  }
182  if (wh == 2) {
183  if (st == 1)
184  return DT_MB21p;
185  if (st == 2)
186  return DT_MB22p;
187  if (st == 3)
188  return DT_MB23p;
189  if (st == 4)
190  return DT_MB24p;
191  }
192  return DT_ALL;
193 }

References DT_ALL, DT_MB01, DT_MB02, DT_MB03, DT_MB04, DT_MB11n, DT_MB11p, DT_MB12n, DT_MB12p, DT_MB13n, DT_MB13p, DT_MB14n, DT_MB14p, DT_MB21n, DT_MB21p, DT_MB22n, DT_MB22p, DT_MB23n, DT_MB23p, DT_MB24n, and DT_MB24p.

Referenced by DTSimHitMatcher::chamberIds(), and DTSimHitMatcher::detIds().

◆ toGEMType()

int MuonHitHelper::toGEMType ( int  st,
int  ri 
)
static

Definition at line 49 of file MuonHitHelper.cc.

49  {
50  if (st == 1) {
51  if (ri == 1)
52  return GEM_ME11;
53  } else if (st == 2) {
54  if (ri == 1)
55  return GEM_ME21;
56  }
57  return GEM_ALL;
58 }

References GEM_ALL, GEM_ME11, and GEM_ME21.

Referenced by GEMSimHitMatcher::chamberIds(), GEMSimHitMatcher::detIds(), and GEMDigiMatcher::selectDetIds().

◆ toRPCType()

int MuonHitHelper::toRPCType ( int  re,
int  st,
int  ri 
)
static

Definition at line 60 of file MuonHitHelper.cc.

60  {
61  // endcap
62  if (std::abs(re) == 1) {
63  if (st == 1) {
64  if (ri == 2)
65  return RPC_ME12;
66  if (ri == 3)
67  return RPC_ME13;
68  } else if (st == 2) {
69  if (ri == 2)
70  return RPC_ME22;
71  if (ri == 3)
72  return RPC_ME23;
73  } else if (st == 3) {
74  if (ri == 1)
75  return RPC_ME31;
76  if (ri == 2)
77  return RPC_ME32;
78  if (ri == 3)
79  return RPC_ME33;
80  } else if (st == 4) {
81  if (ri == 1)
82  return RPC_ME41;
83  if (ri == 2)
84  return RPC_ME42;
85  if (ri == 3)
86  return RPC_ME43;
87  }
88  }
89  // Barrel
90  else {
91  if (ri == -2) {
92  if (st == 1)
93  return RPC_MB21n;
94  if (st == 2)
95  return RPC_MB22n;
96  if (st == 3)
97  return RPC_MB23n;
98  if (st == 4)
99  return RPC_MB24n;
100  } else if (ri == -1) {
101  if (st == 1)
102  return RPC_MB11n;
103  if (st == 2)
104  return RPC_MB12n;
105  if (st == 3)
106  return RPC_MB13n;
107  if (st == 4)
108  return RPC_MB14n;
109  } else if (ri == 0) {
110  if (st == 1)
111  return RPC_MB01;
112  if (st == 2)
113  return RPC_MB02;
114  if (st == 3)
115  return RPC_MB03;
116  if (st == 4)
117  return RPC_MB04;
118  } else if (ri == 1) {
119  if (st == 1)
120  return RPC_MB11p;
121  if (st == 2)
122  return RPC_MB12p;
123  if (st == 3)
124  return RPC_MB13p;
125  if (st == 4)
126  return RPC_MB14p;
127  } else if (ri == 2) {
128  if (st == 1)
129  return RPC_MB21p;
130  if (st == 2)
131  return RPC_MB22p;
132  if (st == 3)
133  return RPC_MB23p;
134  if (st == 4)
135  return RPC_MB24p;
136  }
137  }
138  return RPC_ALL;
139 }

References funct::abs(), RPC_ALL, RPC_MB01, RPC_MB02, RPC_MB03, RPC_MB04, RPC_MB11n, RPC_MB11p, RPC_MB12n, RPC_MB12p, RPC_MB13n, RPC_MB13p, RPC_MB14n, RPC_MB14p, RPC_MB21n, RPC_MB21p, RPC_MB22n, RPC_MB22p, RPC_MB23n, RPC_MB23p, RPC_MB24n, RPC_MB24p, RPC_ME12, RPC_ME13, RPC_ME22, RPC_ME23, RPC_ME31, RPC_ME32, RPC_ME33, RPC_ME41, RPC_ME42, and RPC_ME43.

Referenced by RPCSimHitMatcher::chamberIds(), and RPCSimHitMatcher::detIds().

MuonHitHelper::RPC_MB12n
Definition: MuonHitHelper.h:58
MuonSubdetId::GEM
static constexpr int GEM
Definition: MuonSubdetId.h:14
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
MuonHitHelper::DT_MB14n
Definition: MuonHitHelper.h:85
MuonHitHelper::DT_MB14p
Definition: MuonHitHelper.h:77
MuonHitHelper::CSC_ME11
Definition: MuonHitHelper.h:16
MuonHitHelper::DT_MB24p
Definition: MuonHitHelper.h:81
RPCDetId
Definition: RPCDetId.h:16
MuonHitHelper::CSC_ME42
Definition: MuonHitHelper.h:26
MuonHitHelper::CSC_ME1a
Definition: MuonHitHelper.h:17
MuonHitHelper::DT_MB01
Definition: MuonHitHelper.h:70
MuonHitHelper::RPC_ME31
Definition: MuonHitHelper.h:39
MuonHitHelper::CSC_ALL
Definition: MuonHitHelper.h:15
MuonHitHelper::RPC_ME12
Definition: MuonHitHelper.h:35
MuonHitHelper::RPC_MB13n
Definition: MuonHitHelper.h:59
MuonHitHelper::DT_MB22n
Definition: MuonHitHelper.h:87
MuonHitHelper::DT_MB02
Definition: MuonHitHelper.h:71
MuonHitHelper::RPC_MB21p
Definition: MuonHitHelper.h:53
MuonHitHelper::RPC_MB12p
Definition: MuonHitHelper.h:50
MuonHitHelper::RPC_MB22p
Definition: MuonHitHelper.h:54
MuonHitHelper::DT_MB11n
Definition: MuonHitHelper.h:82
MuonHitHelper::RPC_ME13
Definition: MuonHitHelper.h:36
MuonHitHelper::DT_MB11p
Definition: MuonHitHelper.h:74
DetId
Definition: DetId.h:17
MuonHitHelper::RPC_ME32
Definition: MuonHitHelper.h:40
MuonHitHelper::RPC_ME23
Definition: MuonHitHelper.h:38
MuonHitHelper::RPC_MB23p
Definition: MuonHitHelper.h:55
MuonHitHelper::CSC_ME41
Definition: MuonHitHelper.h:25
MuonHitHelper::RPC_MB21n
Definition: MuonHitHelper.h:61
MuonHitHelper::RPC_MB22n
Definition: MuonHitHelper.h:62
MuonHitHelper::RPC_ME33
Definition: MuonHitHelper.h:41
MuonHitHelper::DT_MB13p
Definition: MuonHitHelper.h:76
MuonHitHelper::RPC_MB11n
Definition: MuonHitHelper.h:57
MuonHitHelper::GEM_ME11
Definition: MuonHitHelper.h:30
MuonHitHelper::CSC_ME13
Definition: MuonHitHelper.h:20
MuonHitHelper::CSC_ME12
Definition: MuonHitHelper.h:19
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
MuonHitHelper::RPC_MB04
Definition: MuonHitHelper.h:48
MuonHitHelper::RPC_ME41
Definition: MuonHitHelper.h:42
MuonHitHelper::RPC_ALL
Definition: MuonHitHelper.h:34
GEMDetId::chamber
constexpr int chamber() const
Definition: GEMDetId.h:177
MuonHitHelper::DT_MB23n
Definition: MuonHitHelper.h:88
MuonHitHelper::DT_MB21n
Definition: MuonHitHelper.h:86
MuonHitHelper::DT_MB21p
Definition: MuonHitHelper.h:78
MuonHitHelper::DT_MB23p
Definition: MuonHitHelper.h:80
GEMDetId
Definition: GEMDetId.h:17
CSCDetId
Definition: CSCDetId.h:26
MuonHitHelper::DT_MB12n
Definition: MuonHitHelper.h:83
MuonHitHelper::RPC_ME43
Definition: MuonHitHelper.h:44
MuonHitHelper::CSC_ME22
Definition: MuonHitHelper.h:22
dumpRecoGeometry_cfg.Muon
Muon
Definition: dumpRecoGeometry_cfg.py:190
MuonHitHelper::RPC_MB14p
Definition: MuonHitHelper.h:52
MuonHitHelper::CSC_ME21
Definition: MuonHitHelper.h:21
CSCDetId::chamber
int chamber() const
Definition: CSCDetId.h:62
MuonHitHelper::CSC_ME31
Definition: MuonHitHelper.h:23
MuonHitHelper::GEM_ME21
Definition: MuonHitHelper.h:30
ME0DetId
Definition: ME0DetId.h:16
MuonHitHelper::DT_MB04
Definition: MuonHitHelper.h:73
MuonSubdetId::ME0
static constexpr int ME0
Definition: MuonSubdetId.h:15
MuonHitHelper::RPC_MB24p
Definition: MuonHitHelper.h:56
MuonHitHelper::RPC_ME22
Definition: MuonHitHelper.h:37
MuonHitHelper::RPC_MB24n
Definition: MuonHitHelper.h:64
MuonHitHelper::DT_MB22p
Definition: MuonHitHelper.h:79
MuonHitHelper::DT_MB12p
Definition: MuonHitHelper.h:75
MuonHitHelper::CSC_ME1b
Definition: MuonHitHelper.h:18
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
MuonHitHelper::RPC_MB03
Definition: MuonHitHelper.h:47
MuonHitHelper::RPC_MB02
Definition: MuonHitHelper.h:46
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
RPCDetId::sector
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:81
MuonHitHelper::DT_ALL
Definition: MuonHitHelper.h:69
ME0DetId::chamber
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: ME0DetId.h:41
MuonHitHelper::DT_MB24n
Definition: MuonHitHelper.h:89
MuonHitHelper::RPC_MB11p
Definition: MuonHitHelper.h:49
MuonHitHelper::GEM_ALL
Definition: MuonHitHelper.h:30
MuonHitHelper::DT_MB13n
Definition: MuonHitHelper.h:84
MuonHitHelper::RPC_MB13p
Definition: MuonHitHelper.h:51
DetId::Muon
Definition: DetId.h:26
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DTChamberId
Definition: DTChamberId.h:14
MuonHitHelper::RPC_ME42
Definition: MuonHitHelper.h:43
MuonHitHelper::RPC_MB23n
Definition: MuonHitHelper.h:63
MuonHitHelper::DT_MB03
Definition: MuonHitHelper.h:72
MuonHitHelper::RPC_MB14n
Definition: MuonHitHelper.h:60
MuonHitHelper::RPC_MB01
Definition: MuonHitHelper.h:45
MuonHitHelper::CSC_ME32
Definition: MuonHitHelper.h:24