ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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 }

◆ 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 }

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 }

◆ 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 }

◆ 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 }

◆ 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 }

Member Data Documentation

◆ doubletPhi

int RpcPanel::doubletPhi {0}

Definition at line 43 of file RPCDQUtils.h.

◆ doubletR

int RpcPanel::doubletR {0}

Definition at line 41 of file RPCDQUtils.h.

◆ doubletZ

int RpcPanel::doubletZ {0}

Definition at line 42 of file RPCDQUtils.h.

◆ gasGap

int RpcPanel::gasGap {0}

Definition at line 44 of file RPCDQUtils.h.

◆ measPhi

int RpcPanel::measPhi {-1}

Definition at line 45 of file RPCDQUtils.h.

◆ NHit_perEvt

unsigned RpcPanel::NHit_perEvt {0}

Definition at line 47 of file RPCDQUtils.h.

◆ panel_index

int RpcPanel::panel_index {-1}

Definition at line 46 of file RPCDQUtils.h.

◆ panel_name

std::string RpcPanel::panel_name {}

Definition at line 32 of file RPCDQUtils.h.

◆ panel_str

std::string RpcPanel::panel_str {}

Definition at line 31 of file RPCDQUtils.h.

◆ panel_valid

bool RpcPanel::panel_valid {false}

Definition at line 30 of file RPCDQUtils.h.

◆ panelId

Identifier RpcPanel::panelId {0}

Definition at line 29 of file RPCDQUtils.h.

◆ readoutEl

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

Definition at line 27 of file RPCDQUtils.h.

◆ stationEta

int RpcPanel::stationEta {0}

Definition at line 39 of file RPCDQUtils.h.

◆ stationName

int RpcPanel::stationName {0}

Definition at line 38 of file RPCDQUtils.h.

◆ stationNameStr

std::string RpcPanel::stationNameStr {}

Definition at line 33 of file RPCDQUtils.h.

◆ stationPhi

int RpcPanel::stationPhi {0}

Definition at line 40 of file RPCDQUtils.h.


The documentation for this struct was generated from the following files:
RpcPanel::stationPhi
int stationPhi
Definition: RPCDQUtils.h:40
RpcIdHelper::doubletZ
int doubletZ(const Identifier &id) const
Definition: RpcIdHelper.cxx:1061
RpcPanel::doubletPhi
int doubletPhi
Definition: RPCDQUtils.h:43
RpcPanel::FillRpcId
void FillRpcId(Identifier id, const RpcIdHelper &rpcIdHelper)
Definition: RPCDQUtils.cxx:27
RpcIdHelper::measuresPhi
bool measuresPhi(const Identifier &id) const override
Definition: RpcIdHelper.cxx:1067
RpcPanel::readoutEl
const MuonGM::RpcReadoutElement * readoutEl
Definition: RPCDQUtils.h:27
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:800
RpcIdHelper
Definition: RpcIdHelper.h:51
RpcPanel::gasGap
int gasGap
Definition: RPCDQUtils.h:44
RpcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: RpcIdHelper.cxx:1065
RpcPanel::stationEta
int stationEta
Definition: RPCDQUtils.h:39
MuonGM::RpcReadoutElement::getDoubletR
int getDoubletR() const
return DoubletR value for the given readout element
RpcPanel::getOnlineConvention
std::string getOnlineConvention() const
Definition: RPCDQUtils.cxx:120
RpcIdHelper::doubletR
int doubletR(const Identifier &id) const
Definition: RpcIdHelper.cxx:1059
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
RpcPanel::doubletR
int doubletR
Definition: RPCDQUtils.h:41
RpcIdHelper::panelID
Identifier panelID(const Identifier &padID, int gasGap, int measuresPhi) const
Definition: RpcIdHelper.cxx:878
RpcPanel::panel_index
int panel_index
Definition: RPCDQUtils.h:46
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:810
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:854
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
RpcPanel::doubletZ
int doubletZ
Definition: RPCDQUtils.h:42
RpcPanel::panel_valid
bool panel_valid
Definition: RPCDQUtils.h:30
RpcPanel::panelId
Identifier panelId
Definition: RPCDQUtils.h:29
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:805
RpcPanel::stationName
int stationName
Definition: RPCDQUtils.h:38
DeMoScan.index
string index
Definition: DeMoScan.py:364
Muon::IMuonIdHelperSvc::toString
virtual std::string toString(const Identifier &id) const =0
print all fields to string
MuonGM::MuonReadoutElement::identify
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:184
RpcPanel::panel_name
std::string panel_name
Definition: RPCDQUtils.h:32
Muon::IMuonIdHelperSvc::rpcIdHelper
virtual const RpcIdHelper & rpcIdHelper() const =0
access to RpcIdHelper
RpcPanel::stationNameStr
std::string stationNameStr
Definition: RPCDQUtils.h:33
RpcPanel::measPhi
int measPhi
Definition: RPCDQUtils.h:45
RpcIdHelper::doubletPhi
int doubletPhi(const Identifier &id) const
Definition: RpcIdHelper.cxx:1063
RpcPanel::panel_str
std::string panel_str
Definition: RPCDQUtils.h:31
Identifier
Definition: IdentifierFieldParser.cxx:14