ATLAS Offline Software
Loading...
Searching...
No Matches
RpcPanel Struct Reference

#include <RPCDQUtils.h>

Collaboration diagram for RpcPanel:

Public Member Functions

 RpcPanel ()=default
 RpcPanel (Identifier id, const RpcIdHelper &rpcIdHelper)
 RpcPanel (const Muon::IMuonIdHelperSvc &idHelperSvc, const MuonGM::RpcReadoutElement *readoutEl_, const int doubletZ_, const int doubletPhi_, const int gasgap_, const int measPhi_)
void FillRpcId (Identifier id, const RpcIdHelper &rpcIdHelper)
void SetPanelIndex (int index)
std::string getOnlineConvention () const
std::pair< int, int > getSectorLayer () const
std::string getElementStr () const
bool operator== (const RpcPanel &rhs) const
bool operator< (const RpcPanel &rhs) const
bool operator> (const RpcPanel &rhs) const

Public Attributes

const MuonGM::RpcReadoutElementreadoutEl {nullptr}
Identifier panelId {0}
bool panel_valid {false}
std::string panel_str {}
std::string panel_name {}
std::string stationNameStr {}
int stationName {0}
int stationEta {0}
int stationPhi {0}
int doubletR {0}
int doubletZ {0}
int doubletPhi {0}
int gasGap {0}
int measPhi {-1}
int panel_index {-1}
unsigned NHit_perEvt {0}

Detailed Description

Definition at line 20 of file RPCDQUtils.h.

Constructor & Destructor Documentation

◆ RpcPanel() [1/3]

RpcPanel::RpcPanel ( )
default

◆ RpcPanel() [2/3]

RpcPanel::RpcPanel ( Identifier id,
const RpcIdHelper & rpcIdHelper )

Definition at line 22 of file RPCDQUtils.cxx.

22 {
23 FillRpcId(id, rpcIdHelper);
24}
void FillRpcId(Identifier id, const RpcIdHelper &rpcIdHelper)

◆ RpcPanel() [3/3]

RpcPanel::RpcPanel ( const Muon::IMuonIdHelperSvc & idHelperSvc,
const MuonGM::RpcReadoutElement * readoutEl_,
const int doubletZ_,
const int doubletPhi_,
const int gasgap_,
const int measPhi_ )

Definition at line 49 of file RPCDQUtils.cxx.

53 : readoutEl(readoutEl_),
54 doubletR(readoutEl_->getDoubletR()),
55 doubletZ(doubletZ_),
56 doubletPhi(doubletPhi_),
57 gasGap(gasgap_),
58 measPhi(measPhi_) {
59 const RpcIdHelper &rpcIdHelper = idHelperSvc.rpcIdHelper();
60 const Identifier readEl_id = readoutEl->identify();
61
62 stationName = rpcIdHelper.stationName(readEl_id);
64
65 stationEta = rpcIdHelper.stationEta(readEl_id);
66 stationPhi = rpcIdHelper.stationPhi(readEl_id);
67
68 //
69 // Get Identifier for this panel
70 //
71 panelId =
74 if (panel_valid) {
75 panel_str = idHelperSvc.toString(panelId);
77 } else {
78 panel_str = idHelperSvc.toString(panelId) + " - INVALID ID";
79 }
80}
int getDoubletR() const
return DoubletR value for the given readout element
int stationEta(const Identifier &id) const
int stationPhi(const Identifier &id) const
int stationName(const Identifier &id) const
const std::string & stationNameString(const int &index) const
virtual const RpcIdHelper & rpcIdHelper() const =0
access to RpcIdHelper
virtual std::string toString(const Identifier &id) const =0
print all fields to string
Identifier panelID(const Identifier &padID, int gasGap, int measuresPhi) const
bool panel_valid
Definition RPCDQUtils.h:30
int stationEta
Definition RPCDQUtils.h:39
int doubletZ
Definition RPCDQUtils.h:42
std::string panel_name
Definition RPCDQUtils.h:32
const MuonGM::RpcReadoutElement * readoutEl
Definition RPCDQUtils.h:27
Identifier panelId
Definition RPCDQUtils.h:29
int gasGap
Definition RPCDQUtils.h:44
int doubletR
Definition RPCDQUtils.h:41
int measPhi
Definition RPCDQUtils.h:45
std::string stationNameStr
Definition RPCDQUtils.h:33
int stationPhi
Definition RPCDQUtils.h:40
int doubletPhi
Definition RPCDQUtils.h:43
int stationName
Definition RPCDQUtils.h:38
std::string panel_str
Definition RPCDQUtils.h:31
std::string getOnlineConvention() const

Member Function Documentation

◆ FillRpcId()

void RpcPanel::FillRpcId ( Identifier id,
const RpcIdHelper & rpcIdHelper )

Definition at line 27 of file RPCDQUtils.cxx.

27 {
28 //
29 // Read RPC data
30 //
31 stationName = rpcIdHelper.stationName(id);
32 stationEta = rpcIdHelper.stationEta(id);
33 stationPhi = rpcIdHelper.stationPhi(id);
34 doubletR = rpcIdHelper.doubletR(id);
35 doubletZ = rpcIdHelper.doubletZ(id);
36 doubletPhi = rpcIdHelper.doubletPhi(id);
37 gasGap = rpcIdHelper.gasGap(id);
38 measPhi = rpcIdHelper.measuresPhi(id);
39
40 panelId =
43
44 // panel_index = stationName*6144 + stationPhi*768 + (stationEta+9)*48 +
45 // doubletR*24 + doubletPhi*12 + doubletZ*4 + gasGap*2 + measPhi;
46}
int gasGap(const Identifier &id) const override
get the hashes
int doubletPhi(const Identifier &id) const
int doubletR(const Identifier &id) const
bool measuresPhi(const Identifier &id) const override
int doubletZ(const Identifier &id) const

◆ getElementStr()

std::string RpcPanel::getElementStr ( ) const

Definition at line 88 of file RPCDQUtils.cxx.

88 {
89 std::ostringstream ele_key;
90
91 ele_key << stationName << "_" << stationEta << "_" << stationPhi << "_"
92 << doubletR << "_" << doubletZ;
93 return ele_key.str();
94}

◆ getOnlineConvention()

std::string RpcPanel::getOnlineConvention ( ) const

Definition at line 120 of file RPCDQUtils.cxx.

120 {
121 const std::string mystring_name = stationNameStr;
122 const std::string mystring_eta = std::to_string(std::abs(stationEta));
123 const std::string mystring_dPhi = "DP" + std::to_string(doubletPhi) + ".";
124 const std::string mystring_gap = "Ly" + std::to_string(gasGap - 1) + ".";
125 const std::string mystring_dZ = "DZ" + std::to_string(doubletZ);
126
127 std::string mystring_phi;
128 std::string mystring_side;
129 std::string mystring_PICO; // pivot or confirm
130 std::string mystring_ETAPHI;
131
132 int myphi_part = (2 * stationPhi) - 1;
133
134 if (stationEta > 0) {
135 mystring_side = "A";
136 } else if (stationEta < 0) {
137 mystring_side = "C";
138 } else {
139 mystring_side = "N";
140 } // N: NULL, "ETA NOT DEFINED"
141
142 if (stationName == 3 || stationName == 5 || stationName == 8 ||
143 stationName == 9 || stationName == 10) {
144 myphi_part += 1;
145 }
146
147 if (myphi_part < 10) {
148 mystring_phi = "0" + std::to_string(myphi_part);
149 } else {
150 mystring_phi = std::to_string(myphi_part);
151 }
152
153 if ((stationNameStr == "BMS" && doubletR == 1) ||
154 (stationNameStr == "BML" && doubletR == 1) ||
155 (stationNameStr == "BMF" && doubletR == 1)) {
156 mystring_PICO = ".CO.";
157 } else if ((stationNameStr == "BMS" && doubletR == 2) ||
158 (stationNameStr == "BML" && doubletR == 2) ||
159 (stationNameStr == "BMF" && doubletR == 2)) {
160 mystring_PICO = ".PI.";
161 } else if ((stationNameStr == "BOS" && doubletR == 1) ||
162 (stationNameStr == "BOL" && doubletR == 1) ||
163 (stationNameStr == "BOF" && doubletR == 1) ||
164 (stationNameStr == "BOG" && doubletR == 1)) {
165 mystring_PICO = ".CO.";
166 } else {
167 // mystring_PICO = ".PIVOT_CONFIRMED_NOT_DEFINED.";
168 mystring_PICO =
169 ".NU" + std::to_string(doubletR) + "."; // NU: NULL, Not defined
170 }
171
172 if (measPhi == 0) {
173 mystring_ETAPHI = "ETA.";
174 } else {
175 mystring_ETAPHI = "PHI.";
176 }
177
178 return mystring_name + mystring_eta + mystring_side + mystring_phi +
179 mystring_PICO + mystring_dPhi + mystring_gap + mystring_dZ +
180 mystring_ETAPHI;
181}

◆ getSectorLayer()

std::pair< int, int > RpcPanel::getSectorLayer ( ) const

Definition at line 184 of file RPCDQUtils.cxx.

184 {
185 // {'2':'BML', '3':'BMS', '4':'BOL', '5':'BOS', '8':'BMF' , '9':'BOF',
186 // '10':'BOG', '53':'BME'}
187 int sector = 0;
188 int layer = 0;
189
190 if (stationName == 2 || stationName == 53) {
191 sector = stationPhi * 2 - 1;
192 layer = (doubletR - 1) * 2 + gasGap;
193 } else if (stationName == 4) {
194 sector = stationPhi * 2 - 1;
195 layer = 4 + (doubletR - 1) * 2 + gasGap;
196 } else if (stationName == 3 || stationName == 8) {
197 sector = stationPhi * 2;
198 layer = (doubletR - 1) * 2 + gasGap;
199 } else if (stationName == 5 || stationName == 9 || stationName == 10) {
200 sector = stationPhi * 2;
201 layer = 4 + (doubletR - 1) * 2 + gasGap;
202 }
203 if (stationEta < 0)
204 sector = -1 * sector;
205
206 std::pair<int, int> sec_layer(sector, layer);
207
208 return sec_layer;
209}
@ layer
Definition HitInfo.h:79

◆ operator<()

bool RpcPanel::operator< ( const RpcPanel & rhs) const

Definition at line 110 of file RPCDQUtils.cxx.

110 {
111 return this->panel_index < rhs.panel_index;
112}
int panel_index
Definition RPCDQUtils.h:46

◆ operator==()

bool RpcPanel::operator== ( const RpcPanel & rhs) const

Definition at line 97 of file RPCDQUtils.cxx.

97 {
98 if (this->stationName == rhs.stationName &&
99 this->stationPhi == rhs.stationPhi &&
100 this->stationEta == rhs.stationEta && this->doubletR == rhs.doubletR &&
101 this->doubletPhi == rhs.doubletPhi && this->doubletZ == rhs.doubletZ &&
102 this->gasGap == rhs.gasGap && this->measPhi == rhs.measPhi) {
103 return true;
104 } else {
105 return false;
106 }
107}

◆ operator>()

bool RpcPanel::operator> ( const RpcPanel & rhs) const

Definition at line 115 of file RPCDQUtils.cxx.

115 {
116 return this->panel_index > rhs.panel_index;
117}

◆ SetPanelIndex()

void RpcPanel::SetPanelIndex ( int index)

Definition at line 83 of file RPCDQUtils.cxx.

83 {
85}
str index
Definition DeMoScan.py:362

Member Data Documentation

◆ doubletPhi

int RpcPanel::doubletPhi {0}

Definition at line 43 of file RPCDQUtils.h.

43{0};

◆ doubletR

int RpcPanel::doubletR {0}

Definition at line 41 of file RPCDQUtils.h.

41{0};

◆ doubletZ

int RpcPanel::doubletZ {0}

Definition at line 42 of file RPCDQUtils.h.

42{0};

◆ gasGap

int RpcPanel::gasGap {0}

Definition at line 44 of file RPCDQUtils.h.

44{0};

◆ measPhi

int RpcPanel::measPhi {-1}

Definition at line 45 of file RPCDQUtils.h.

45{-1};

◆ NHit_perEvt

unsigned RpcPanel::NHit_perEvt {0}

Definition at line 47 of file RPCDQUtils.h.

47{0};

◆ panel_index

int RpcPanel::panel_index {-1}

Definition at line 46 of file RPCDQUtils.h.

46{-1};

◆ panel_name

std::string RpcPanel::panel_name {}

Definition at line 32 of file RPCDQUtils.h.

32{};

◆ panel_str

std::string RpcPanel::panel_str {}

Definition at line 31 of file RPCDQUtils.h.

31{};

◆ panel_valid

bool RpcPanel::panel_valid {false}

Definition at line 30 of file RPCDQUtils.h.

30{false};

◆ panelId

Identifier RpcPanel::panelId {0}

Definition at line 29 of file RPCDQUtils.h.

29{0};

◆ readoutEl

const MuonGM::RpcReadoutElement* RpcPanel::readoutEl {nullptr}

Definition at line 27 of file RPCDQUtils.h.

27{nullptr};

◆ stationEta

int RpcPanel::stationEta {0}

Definition at line 39 of file RPCDQUtils.h.

39{0};

◆ stationName

int RpcPanel::stationName {0}

Definition at line 38 of file RPCDQUtils.h.

38{0};

◆ stationNameStr

std::string RpcPanel::stationNameStr {}

Definition at line 33 of file RPCDQUtils.h.

33{};

◆ stationPhi

int RpcPanel::stationPhi {0}

Definition at line 40 of file RPCDQUtils.h.

40{0};

The documentation for this struct was generated from the following files: