ATLAS Offline Software
Public Types | Public Member Functions | List of all members
MuonCalib::MuonFixedIdManipulator Class Reference

#include <MuonFixedIdManipulator.h>

Collaboration diagram for MuonCalib::MuonFixedIdManipulator:

Public Types

enum  StationIndex {
  BI = 0, BM, BO, BE,
  EIA, EMA, EOA, EEA,
  EIC, EMC, EOC, EEC,
  CSA, CSC, StationUnknown = 999
}
 enum defining station layers More...
 
enum  PhiStationIndex {
  RPCBMR1 = 0, RPCBMR2, RPCBO, T4,
  T1, T2, T3, CS,
  PhiStationUnknown = 999
}
 enum defining trigger phi layers More...
 

Public Member Functions

PhiStationIndex phiStationLayerIndex (const MuonFixedId &id) const
 return phi station layer index for a give identifier More...
 
StationIndex stationLayerIndex (const MuonFixedId &id) const
 returns station layer index for a give identifier More...
 
MuonFixedId stationLayerIdentifier (const MuonFixedId &id) const
 returns a station layer identifier for the give identifier
More...
 
MuonFixedId stationLayerIdentifier (StationIndex stIndex) const
 returns a station layer identifier for the give station index More...
 
MuonFixedId stationIdentifier (const MuonFixedId &id, bool mapOnMdts=false) const
 returns station Identifier for the give id MDT: station name (BMS)/eta/phi RPC: name of associated MDT station TGC: station name (T1)/eta/phi More...
 
MuonFixedId chamberIdentifier (const MuonFixedId &id) const
 returns chamber Identifier for the give id, same as stationIdentifier RPC: includes doubletR More...
 
MuonFixedId moduleIdentifier (const MuonFixedId &id, bool includeMeasuresPhi=false) const
 returns layer Identifier for the give id MDT: station name/eta/phi/ml/lay RPC: station name/eta/phi/double [R,Z,phi]/measuresPhi (if selected) TGC: More...
 
MuonFixedId gasGapIdentifier (const MuonFixedId &id, bool includeMeasuresPhi=false) const
 returns gas gap Identifier for the give id MDT: same as tube identifier RPC: station name/eta/phi/double [R,Z,phi]/lay/measuresPhi (if selected) TGC: More...
 
bool measuresPhi (const MuonFixedId &id) const
 returns whether this is a phi measurement More...
 
bool isEndcap (const MuonFixedId &id) const
 returns whether this is a phi measurement More...
 

Detailed Description

Definition at line 14 of file MuonFixedIdManipulator.h.

Member Enumeration Documentation

◆ PhiStationIndex

enum defining trigger phi layers

Enumerator
RPCBMR1 
RPCBMR2 
RPCBO 
T4 
T1 
T2 
T3 
CS 
PhiStationUnknown 

Definition at line 19 of file MuonFixedIdManipulator.h.

19 { RPCBMR1 = 0, RPCBMR2, RPCBO, T4, T1, T2, T3, CS, PhiStationUnknown = 999 };

◆ StationIndex

enum defining station layers

Enumerator
BI 
BM 
BO 
BE 
EIA 
EMA 
EOA 
EEA 
EIC 
EMC 
EOC 
EEC 
CSA 
CSC 
StationUnknown 

Definition at line 17 of file MuonFixedIdManipulator.h.

17 { BI = 0, BM, BO, BE, EIA, EMA, EOA, EEA, EIC, EMC, EOC, EEC, CSA, CSC, StationUnknown = 999 };

Member Function Documentation

◆ chamberIdentifier()

MuonFixedId MuonCalib::MuonFixedIdManipulator::chamberIdentifier ( const MuonFixedId id) const

returns chamber Identifier for the give id, same as stationIdentifier RPC: includes doubletR

Definition at line 154 of file MuonFixedIdManipulator.cxx.

154  {
155  MuonFixedId newId = stationIdentifier(id);
156  if (id.is_rpc()) newId.setRpcDoubletR(id.rpcDoubletR());
157  return newId;
158  }

◆ gasGapIdentifier()

MuonFixedId MuonCalib::MuonFixedIdManipulator::gasGapIdentifier ( const MuonFixedId id,
bool  includeMeasuresPhi = false 
) const

returns gas gap Identifier for the give id MDT: same as tube identifier RPC: station name/eta/phi/double [R,Z,phi]/lay/measuresPhi (if selected) TGC:

Definition at line 176 of file MuonFixedIdManipulator.cxx.

176  {
177  MuonFixedId newId = moduleIdentifier(id, includeMeasuresPhi);
178  if (id.is_mdt()) {
179  newId.setMdtMultilayer(id.mdtMultilayer());
180  newId.setMdtTubeLayer(id.mdtTubeLayer());
181  } else if (id.is_rpc()) {
182  newId.setRpcGasGap(id.rpcGasGap());
183 
184  } else if (id.is_tgc()) {
185  newId.setTgcGasGap(id.tgcGasGap());
186 
187  } else if (id.is_csc()) {
188  newId.setCscWireLayer(id.cscWireLayer());
189  }
190  return newId;
191  }

◆ isEndcap()

bool MuonCalib::MuonFixedIdManipulator::isEndcap ( const MuonFixedId id) const
inline

returns whether this is a phi measurement

Definition at line 77 of file MuonFixedIdManipulator.h.

77  {
78  if (!id.isValid()) return false;
79  if (id.is_rpc()) return false;
80  if (id.is_csc()) return true;
81  if (id.is_tgc()) return true;
82  if (id.stationNameString()[0] == 'E') return true;
83  return false;
84  }

◆ measuresPhi()

bool MuonCalib::MuonFixedIdManipulator::measuresPhi ( const MuonFixedId id) const
inline

returns whether this is a phi measurement

Definition at line 67 of file MuonFixedIdManipulator.h.

67  {
68  if (id.is_rpc())
69  return id.rpcMeasuresPhi();
70  else if (id.is_tgc())
71  return id.tgcIsStrip();
72  else if (id.is_csc())
73  return id.cscMeasuresPhi();
74  return false;
75  }

◆ moduleIdentifier()

MuonFixedId MuonCalib::MuonFixedIdManipulator::moduleIdentifier ( const MuonFixedId id,
bool  includeMeasuresPhi = false 
) const

returns layer Identifier for the give id MDT: station name/eta/phi/ml/lay RPC: station name/eta/phi/double [R,Z,phi]/measuresPhi (if selected) TGC:

Definition at line 160 of file MuonFixedIdManipulator.cxx.

160  {
161  MuonFixedId newId = stationIdentifier(id, false);
162  if (id.is_rpc()) {
163  newId.setRpcDoubletZ(id.rpcDoubletZ());
164  newId.setRpcDoubletPhi(id.rpcDoubletPhi());
165  if (includeMeasuresPhi) newId.setRpcMeasuresPhi(newId.rpcMeasuresPhi());
166 
167  } else if (id.is_tgc()) {
168  if (includeMeasuresPhi) newId.setTgcIsStrip(newId.tgcIsStrip());
169 
170  } else if (id.is_csc()) {
171  if (includeMeasuresPhi) newId.setCscMeasuresPhi(newId.cscMeasuresPhi());
172  }
173  return newId;
174  }

◆ phiStationLayerIndex()

MuonFixedIdManipulator::PhiStationIndex MuonCalib::MuonFixedIdManipulator::phiStationLayerIndex ( const MuonFixedId id) const

return phi station layer index for a give identifier

Definition at line 9 of file MuonFixedIdManipulator.cxx.

9  {
10  if (id.is_mdt()) return PhiStationUnknown;
11 
12  std::string stName = id.stationNumberToFixedStationString(id.stationName());
13  if (id.is_rpc()) {
14  if (stName[1] == 'M') {
15  if (id.rpcDoubletR() == 1)
16  return RPCBMR1;
17  else
18  return RPCBMR2;
19  }
20  return RPCBO;
21  }
22 
23  if (id.is_tgc()) {
24  if (stName[1] == '4') return T4;
25  if (stName[1] == '1') return T1;
26  if (stName[1] == '2') return T2;
27  return T3;
28  }
29  if (id.is_csc()) return CS;
30 
31  return PhiStationUnknown;
32  }

◆ stationIdentifier()

MuonFixedId MuonCalib::MuonFixedIdManipulator::stationIdentifier ( const MuonFixedId id,
bool  mapOnMdts = false 
) const

returns station Identifier for the give id MDT: station name (BMS)/eta/phi RPC: name of associated MDT station TGC: station name (T1)/eta/phi

Definition at line 130 of file MuonFixedIdManipulator.cxx.

130  {
131  MuonFixedId newId;
132  if (id.is_mdt()) {
133  newId.set_mdt();
134  } else if (id.is_rpc()) {
135  if (mapOnMdts) {
136  // map RPC onto MDT chamber
137  newId.set_mdt();
138  } else {
139  newId.set_rpc();
140  newId.setRpcDoubletR(id.rpcDoubletR());
141  }
142  } else if (id.is_tgc()) {
143  newId.set_tgc();
144  } else if (id.is_csc()) {
145  newId.set_csc();
146  newId.setCscChamberLayer(id.cscChamberLayer());
147  }
148  newId.setStationName(id.stationName());
149  newId.setStationEta(id.eta());
150  newId.setStationPhi(id.phi());
151  return newId;
152  }

◆ stationLayerIdentifier() [1/2]

MuonFixedId MuonCalib::MuonFixedIdManipulator::stationLayerIdentifier ( const MuonFixedId id) const

returns a station layer identifier for the give identifier

Definition at line 34 of file MuonFixedIdManipulator.cxx.

34  {
36  }

◆ stationLayerIdentifier() [2/2]

MuonFixedId MuonCalib::MuonFixedIdManipulator::stationLayerIdentifier ( StationIndex  stIndex) const

returns a station layer identifier for the give station index

Definition at line 38 of file MuonFixedIdManipulator.cxx.

38  {
39  MuonFixedId newId;
40 
41  if (stIndex == CSA) {
42  newId.set_csc();
43  newId.setStationEta(-1);
44  }
45  if (stIndex == CSC) {
46  newId.set_csc();
47  newId.setStationEta(1);
48  }
49 
50  newId.set_mdt();
51  int stName = 0;
52  int eta = 1;
53  if (stIndex == BI)
54  stName = 1;
55  else if (stIndex == BM)
56  stName = 3;
57  else if (stIndex == BO)
58  stName = 5;
59  else if (stIndex == BE)
60  stName = 7;
61  else if (stIndex == EIA)
62  stName = 14;
63  else if (stIndex == EMA)
64  stName = 19;
65  else if (stIndex == EOA)
66  stName = 22;
67  else if (stIndex == EEA)
68  stName = 16;
69  else if (stIndex == EIC) {
70  stName = 14;
71  eta = -1;
72  } else if (stIndex == EMC) {
73  stName = 19;
74  eta = -1;
75  } else if (stIndex == EOC) {
76  stName = 22;
77  eta = -1;
78  } else if (stIndex == EEC) {
79  stName = 16;
80  eta = -1;
81  }
82  newId.setStationName(stName);
83  newId.setStationEta(eta);
84  return newId;
85  }

◆ stationLayerIndex()

MuonFixedIdManipulator::StationIndex MuonCalib::MuonFixedIdManipulator::stationLayerIndex ( const MuonFixedId id) const

returns station layer index for a give identifier

Definition at line 87 of file MuonFixedIdManipulator.cxx.

87  {
88  std::string stName = id.stationNumberToFixedStationString(id.stationName());
89  if (stName[0] == 'B') {
90  if (stName[1] == 'I') return BI;
91  if (stName[1] == 'M') return BM;
92  if (stName[1] == 'O') return BO;
93  if (stName[1] == 'E') return BE;
94  } else {
95  int eta = id.eta();
96  if (stName[1] == 'I') {
97  if (eta < 0)
98  return EIA;
99  else
100  return EIC;
101  }
102  if (stName[1] == 'M') {
103  if (eta < 0)
104  return EMA;
105  else
106  return EMC;
107  }
108  if (stName[1] == 'O') {
109  if (eta < 0)
110  return EOA;
111  else
112  return EOC;
113  }
114  if (stName[1] == 'E') {
115  if (eta < 0)
116  return EEA;
117  else
118  return EEC;
119  }
120  if (stName[2] == 'C') {
121  if (eta < 0)
122  return CSA;
123  else
124  return CSC;
125  }
126  }
127  return StationUnknown;
128  }

The documentation for this class was generated from the following files:
createDCubeDigitHistograms.mdtTubeLayer
mdtTubeLayer
Definition: createDCubeDigitHistograms.py:111
MuonCalib::MuonFixedIdManipulator::EMA
@ EMA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::stationLayerIdentifier
MuonFixedId stationLayerIdentifier(const MuonFixedId &id) const
returns a station layer identifier for the give identifier
Definition: MuonFixedIdManipulator.cxx:34
MuonCalib::MuonFixedIdManipulator::CSA
@ CSA
Definition: MuonFixedIdManipulator.h:17
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
MuonCalib::MuonFixedIdManipulator::BM
@ BM
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::T1
@ T1
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::BO
@ BO
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::EOC
@ EOC
Definition: MuonFixedIdManipulator.h:17
createDCubeHistograms.cscWireLayer
cscWireLayer
Definition: createDCubeHistograms.py:87
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
MuonCalib::MuonFixedIdManipulator::CS
@ CS
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::RPCBMR1
@ RPCBMR1
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::EMC
@ EMC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::EEC
@ EEC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::RPCBMR2
@ RPCBMR2
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::T2
@ T2
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::BI
@ BI
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::moduleIdentifier
MuonFixedId moduleIdentifier(const MuonFixedId &id, bool includeMeasuresPhi=false) const
returns layer Identifier for the give id MDT: station name/eta/phi/ml/lay RPC: station name/eta/phi/d...
Definition: MuonFixedIdManipulator.cxx:160
MuonCalib::MuonFixedIdManipulator::EIA
@ EIA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::T3
@ T3
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::EEA
@ EEA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::stationIdentifier
MuonFixedId stationIdentifier(const MuonFixedId &id, bool mapOnMdts=false) const
returns station Identifier for the give id MDT: station name (BMS)/eta/phi RPC: name of associated MD...
Definition: MuonFixedIdManipulator.cxx:130
createDCubeDigitHistograms.rpcGasGap
rpcGasGap
Definition: createDCubeDigitHistograms.py:60
MuonCalib::MuonFixedIdManipulator::RPCBO
@ RPCBO
Definition: MuonFixedIdManipulator.h:19
createDCubeHistograms.tgcGasGap
tgcGasGap
Definition: createDCubeHistograms.py:107
MuonCalib::MuonFixedIdManipulator::stationLayerIndex
StationIndex stationLayerIndex(const MuonFixedId &id) const
returns station layer index for a give identifier
Definition: MuonFixedIdManipulator.cxx:87
MuonCalib::MuonFixedIdManipulator::EIC
@ EIC
Definition: MuonFixedIdManipulator.h:17
createDCubeDigitHistograms.mdtMultilayer
mdtMultilayer
Definition: createDCubeDigitHistograms.py:112
MuonCalib::MuonFixedIdManipulator::StationUnknown
@ StationUnknown
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::EOA
@ EOA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::T4
@ T4
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::CSC
@ CSC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::PhiStationUnknown
@ PhiStationUnknown
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::BE
@ BE
Definition: MuonFixedIdManipulator.h:17