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 29 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 24 of file RPCDQUtils.cxx.

24 {
25 FillRpcId(id, rpcIdHelper);
26}
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 51 of file RPCDQUtils.cxx.

55 : readoutEl(readoutEl_),
56 doubletR(readoutEl_->getDoubletR()),
57 doubletZ(doubletZ_),
58 doubletPhi(doubletPhi_),
59 gasGap(gasgap_),
60 measPhi(measPhi_) {
61 const RpcIdHelper &rpcIdHelper = idHelperSvc.rpcIdHelper();
62 const Identifier readEl_id = readoutEl->identify();
63
64 stationName = rpcIdHelper.stationName(readEl_id);
66
67 stationEta = rpcIdHelper.stationEta(readEl_id);
68 stationPhi = rpcIdHelper.stationPhi(readEl_id);
69
70 //
71 // Get Identifier for this panel
72 //
73 panelId =
76 if (panel_valid) {
77 panel_str = idHelperSvc.toString(panelId);
79 } else {
80 panel_str = idHelperSvc.toString(panelId) + " - INVALID ID";
81 }
82}
int getDoubletR() const
return DoubletR value for the given readout element
int stationEta(const Identifier &id) const
const std::string & stationNameString(const Identifier &id) const
int stationPhi(const Identifier &id) const
int stationName(const Identifier &id) 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:39
int stationEta
Definition RPCDQUtils.h:48
int doubletZ
Definition RPCDQUtils.h:51
std::string panel_name
Definition RPCDQUtils.h:41
const MuonGM::RpcReadoutElement * readoutEl
Definition RPCDQUtils.h:36
Identifier panelId
Definition RPCDQUtils.h:38
int gasGap
Definition RPCDQUtils.h:53
int doubletR
Definition RPCDQUtils.h:50
int measPhi
Definition RPCDQUtils.h:54
std::string stationNameStr
Definition RPCDQUtils.h:42
int stationPhi
Definition RPCDQUtils.h:49
int doubletPhi
Definition RPCDQUtils.h:52
int stationName
Definition RPCDQUtils.h:47
std::string panel_str
Definition RPCDQUtils.h:40
std::string getOnlineConvention() const

Member Function Documentation

◆ FillRpcId()

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

Definition at line 29 of file RPCDQUtils.cxx.

29 {
30 //
31 // Read RPC data
32 //
33 stationName = rpcIdHelper.stationName(id);
34 stationEta = rpcIdHelper.stationEta(id);
35 stationPhi = rpcIdHelper.stationPhi(id);
36 doubletR = rpcIdHelper.doubletR(id);
37 doubletZ = rpcIdHelper.doubletZ(id);
38 doubletPhi = rpcIdHelper.doubletPhi(id);
39 gasGap = rpcIdHelper.gasGap(id);
40 measPhi = rpcIdHelper.measuresPhi(id);
41
42 panelId =
45
46 // panel_index = stationName*6144 + stationPhi*768 + (stationEta+9)*48 +
47 // doubletR*24 + doubletPhi*12 + doubletZ*4 + gasGap*2 + measPhi;
48}
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 90 of file RPCDQUtils.cxx.

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

◆ getOnlineConvention()

std::string RpcPanel::getOnlineConvention ( ) const

Definition at line 122 of file RPCDQUtils.cxx.

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

◆ getSectorLayer()

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

Definition at line 186 of file RPCDQUtils.cxx.

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

◆ operator<()

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

Definition at line 112 of file RPCDQUtils.cxx.

112 {
113 return this->panel_index < rhs.panel_index;
114}
int panel_index
Definition RPCDQUtils.h:55

◆ operator==()

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

Definition at line 99 of file RPCDQUtils.cxx.

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

◆ operator>()

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

Definition at line 117 of file RPCDQUtils.cxx.

117 {
118 return this->panel_index > rhs.panel_index;
119}

◆ SetPanelIndex()

void RpcPanel::SetPanelIndex ( int index)

Definition at line 85 of file RPCDQUtils.cxx.

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

Member Data Documentation

◆ doubletPhi

int RpcPanel::doubletPhi {0}

Definition at line 52 of file RPCDQUtils.h.

52{0};

◆ doubletR

int RpcPanel::doubletR {0}

Definition at line 50 of file RPCDQUtils.h.

50{0};

◆ doubletZ

int RpcPanel::doubletZ {0}

Definition at line 51 of file RPCDQUtils.h.

51{0};

◆ gasGap

int RpcPanel::gasGap {0}

Definition at line 53 of file RPCDQUtils.h.

53{0};

◆ measPhi

int RpcPanel::measPhi {-1}

Definition at line 54 of file RPCDQUtils.h.

54{-1};

◆ NHit_perEvt

unsigned RpcPanel::NHit_perEvt {0}

Definition at line 56 of file RPCDQUtils.h.

56{0};

◆ panel_index

int RpcPanel::panel_index {-1}

Definition at line 55 of file RPCDQUtils.h.

55{-1};

◆ panel_name

std::string RpcPanel::panel_name {}

Definition at line 41 of file RPCDQUtils.h.

41{};

◆ panel_str

std::string RpcPanel::panel_str {}

Definition at line 40 of file RPCDQUtils.h.

40{};

◆ panel_valid

bool RpcPanel::panel_valid {false}

Definition at line 39 of file RPCDQUtils.h.

39{false};

◆ panelId

Identifier RpcPanel::panelId {0}

Definition at line 38 of file RPCDQUtils.h.

38{0};

◆ readoutEl

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

Definition at line 36 of file RPCDQUtils.h.

36{nullptr};

◆ stationEta

int RpcPanel::stationEta {0}

Definition at line 48 of file RPCDQUtils.h.

48{0};

◆ stationName

int RpcPanel::stationName {0}

Definition at line 47 of file RPCDQUtils.h.

47{0};

◆ stationNameStr

std::string RpcPanel::stationNameStr {}

Definition at line 42 of file RPCDQUtils.h.

42{};

◆ stationPhi

int RpcPanel::stationPhi {0}

Definition at line 49 of file RPCDQUtils.h.

49{0};

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