ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
GasGapData Struct Reference

#include <RPCDQUtils.h>

Collaboration diagram for GasGapData:

Public Member Functions

 GasGapData (const Muon::IMuonIdHelperSvc &idHelperSvc, const MuonGM::RpcReadoutElement *_readoutEl, const int _doubletZ, const int _doubletPhi, const unsigned _gasgap)
 
void computeTrackDistanceToGasGap (ExResult &result, const xAOD::TrackParticle &track) const
 
void computeTrackDistanceToGasGap (ExResult &result, const Trk::TrackParameters *trackParam) const
 

Public Attributes

const MuonGM::RpcReadoutElementreadoutEl
 
Identifier gapid {0}
 
bool gapid_valid {false}
 
std::string gapid_str
 
int stationName
 
int stationEta
 
int stationPhi
 
int doubletR
 
int doubletZ
 
int doubletPhi
 
unsigned gasgap
 
unsigned NetaStrips {0}
 
unsigned NphiStrips {0}
 
double minStripEta {10.0}
 
double maxStripEta {-10.0}
 
double minStripPhi {10.0}
 
double maxStripPhi {-10.0}
 
double localTrackPosY {0.0}
 
double localTrackPosZ {0.0}
 
std::pair< std::shared_ptr< RpcPanel >, std::shared_ptr< RpcPanel > > RpcPanel_eta_phi
 

Detailed Description

Definition at line 98 of file RPCDQUtils.h.

Constructor & Destructor Documentation

◆ GasGapData()

GasGapData::GasGapData ( const Muon::IMuonIdHelperSvc idHelperSvc,
const MuonGM::RpcReadoutElement _readoutEl,
const int  _doubletZ,
const int  _doubletPhi,
const unsigned  _gasgap 
)

Definition at line 221 of file RPCDQUtils.cxx.

225  : readoutEl(_readoutEl),
226  doubletR(_readoutEl->getDoubletR()),
227  doubletZ(_doubletZ),
228  doubletPhi(_doubletPhi),
229  gasgap(_gasgap) {
230  const RpcIdHelper &rpcIdHelper = idHelperSvc.rpcIdHelper();
231  const Identifier readEl_id = readoutEl->identify();
232 
233  stationName = rpcIdHelper.stationName(readEl_id);
234  stationEta = rpcIdHelper.stationEta(readEl_id);
235  stationPhi = rpcIdHelper.stationPhi(readEl_id);
236 
237  //
238  // Get Identifier for this gas gap
239  //
242 
243  if (gapid_valid) {
244  gapid_str = idHelperSvc.toString(gapid);
245  } else {
246  gapid_str = idHelperSvc.toString(gapid) + " - INVALID ID";
247  }
248 
251 
252  // Determine gas gap span in eta
253  const Identifier etaIdFirst{rpcIdHelper.channelID(gapid, doubletZ, doubletPhi, gasgap, false, 1)};
254  const Amg::Vector3D glbPos_etaStrip_1st = readoutEl->stripPos(etaIdFirst);
255  double eta_etaStrip_1st = glbPos_etaStrip_1st.eta();
256 
257  const Identifier etaIdLast{rpcIdHelper.channelID(gapid, doubletZ, doubletPhi, gasgap, false, NetaStrips)};
258  const Amg::Vector3D glbPos_etaStrip_last = readoutEl->stripPos(etaIdLast);
259  double eta_etaStrip_last = glbPos_etaStrip_last.eta();
260 
261  if (eta_etaStrip_1st < eta_etaStrip_last) {
262  minStripEta = eta_etaStrip_1st;
263  maxStripEta = eta_etaStrip_last;
264  } else {
265  minStripEta = eta_etaStrip_last;
266  maxStripEta = eta_etaStrip_1st;
267  }
268 
269  //
270  // Determine gas gap span in phi
271  //
272  const Identifier phiIdFirst{rpcIdHelper.channelID(gapid, doubletZ, doubletPhi, gasgap, true, 1)};
273  const Amg::Vector3D glbPos_phiStrip_1st = readoutEl->stripPos(phiIdFirst);
274  double phi_phiStrip_1st = glbPos_phiStrip_1st.phi();
275 
276  const Identifier phiIdLast{rpcIdHelper.channelID(gapid, doubletZ, doubletPhi, gasgap, true, NphiStrips)};
277  const Amg::Vector3D glbPos_phiStrip_last = readoutEl->stripPos(phiIdLast);
278  double phi_phiStrip_last = glbPos_phiStrip_last.phi();
279 
280  if (phi_phiStrip_1st < phi_phiStrip_last) {
281  minStripPhi = phi_phiStrip_1st;
282  maxStripPhi = phi_phiStrip_last;
283  } else {
284  minStripPhi = phi_phiStrip_last;
285  maxStripPhi = phi_phiStrip_1st;
286  }
287 }

Member Function Documentation

◆ computeTrackDistanceToGasGap() [1/2]

void GasGapData::computeTrackDistanceToGasGap ( ExResult result,
const Trk::TrackParameters trackParam 
) const

Definition at line 329 of file RPCDQUtils.cxx.

330  {
331  /*
332  This function:
333  - computes minum DR distance between track and RpcReadoutElement
334  - do this before expensive call to extrapolator
335  */
336 
337  const double deta1 = std::abs(minStripEta - trackParam->position().eta());
338  const double deta2 = std::abs(maxStripEta - trackParam->position().eta());
339 
340  const double dphi1 = std::abs(
341  xAOD::P4Helpers::deltaPhi(minStripPhi, trackParam->position().phi()));
342  const double dphi2 = std::abs(
343  xAOD::P4Helpers::deltaPhi(maxStripPhi, trackParam->position().phi()));
344 
345  result.minTrackGasGapDEta = std::min<double>(deta1, deta2);
346  result.minTrackGasGapDPhi = std::min<double>(dphi1, dphi2);
347 
348  //
349  // Now check if trackParam->position() position is between min and max - if
350  // true, set distance to zero
351  //
352  if (minStripEta <= trackParam->position().eta() &&
353  trackParam->position().eta() <= maxStripEta) {
354  result.minTrackGasGapDEta = 0.0;
355  }
356  if (minStripPhi <= trackParam->position().phi() &&
357  trackParam->position().phi() <= maxStripPhi) {
358  result.minTrackGasGapDPhi = 0.0;
359  }
360 
361  //
362  // Compute min DR to this gas gap
363  //
364  result.minTrackGasGapDR =
365  std::sqrt(result.minTrackGasGapDEta * result.minTrackGasGapDEta +
366  result.minTrackGasGapDPhi * result.minTrackGasGapDPhi);
367 }

◆ computeTrackDistanceToGasGap() [2/2]

void GasGapData::computeTrackDistanceToGasGap ( ExResult result,
const xAOD::TrackParticle track 
) const

Definition at line 290 of file RPCDQUtils.cxx.

291  {
292  /*
293  This function:
294  - computes minum DR distance between track and RpcReadoutElement
295  - do this before expensive call to extrapolator
296  */
297 
298  const double deta1 = std::abs(minStripEta - track.eta());
299  const double deta2 = std::abs(maxStripEta - track.eta());
300 
301  const double dphi1 =
302  std::abs(xAOD::P4Helpers::deltaPhi(minStripPhi, track.phi()));
303  const double dphi2 =
304  std::abs(xAOD::P4Helpers::deltaPhi(maxStripPhi, track.phi()));
305 
306  result.minTrackGasGapDEta = std::min<double>(deta1, deta2);
307  result.minTrackGasGapDPhi = std::min<double>(dphi1, dphi2);
308 
309  //
310  // Now check if track position is between min and max - if true, set
311  // distance to zero
312  //
313  if (minStripEta <= track.eta() && track.eta() <= maxStripEta) {
314  result.minTrackGasGapDEta = 0.0;
315  }
316  if (minStripPhi <= track.phi() && track.phi() <= maxStripPhi) {
317  result.minTrackGasGapDPhi = 0.0;
318  }
319 
320  //
321  // Compute min DR to this gas gap
322  //
323  result.minTrackGasGapDR =
324  std::sqrt(result.minTrackGasGapDEta * result.minTrackGasGapDEta +
325  result.minTrackGasGapDPhi * result.minTrackGasGapDPhi);
326 }

Member Data Documentation

◆ doubletPhi

int GasGapData::doubletPhi

Definition at line 119 of file RPCDQUtils.h.

◆ doubletR

int GasGapData::doubletR

Definition at line 117 of file RPCDQUtils.h.

◆ doubletZ

int GasGapData::doubletZ

Definition at line 118 of file RPCDQUtils.h.

◆ gapid

Identifier GasGapData::gapid {0}

Definition at line 110 of file RPCDQUtils.h.

◆ gapid_str

std::string GasGapData::gapid_str

Definition at line 112 of file RPCDQUtils.h.

◆ gapid_valid

bool GasGapData::gapid_valid {false}

Definition at line 111 of file RPCDQUtils.h.

◆ gasgap

unsigned GasGapData::gasgap

Definition at line 120 of file RPCDQUtils.h.

◆ localTrackPosY

double GasGapData::localTrackPosY {0.0}

Definition at line 128 of file RPCDQUtils.h.

◆ localTrackPosZ

double GasGapData::localTrackPosZ {0.0}

Definition at line 129 of file RPCDQUtils.h.

◆ maxStripEta

double GasGapData::maxStripEta {-10.0}

Definition at line 125 of file RPCDQUtils.h.

◆ maxStripPhi

double GasGapData::maxStripPhi {-10.0}

Definition at line 127 of file RPCDQUtils.h.

◆ minStripEta

double GasGapData::minStripEta {10.0}

Definition at line 124 of file RPCDQUtils.h.

◆ minStripPhi

double GasGapData::minStripPhi {10.0}

Definition at line 126 of file RPCDQUtils.h.

◆ NetaStrips

unsigned GasGapData::NetaStrips {0}

Definition at line 122 of file RPCDQUtils.h.

◆ NphiStrips

unsigned GasGapData::NphiStrips {0}

Definition at line 123 of file RPCDQUtils.h.

◆ readoutEl

const MuonGM::RpcReadoutElement* GasGapData::readoutEl

Definition at line 108 of file RPCDQUtils.h.

◆ RpcPanel_eta_phi

std::pair<std::shared_ptr<RpcPanel>, std::shared_ptr<RpcPanel> > GasGapData::RpcPanel_eta_phi

Definition at line 132 of file RPCDQUtils.h.

◆ stationEta

int GasGapData::stationEta

Definition at line 115 of file RPCDQUtils.h.

◆ stationName

int GasGapData::stationName

Definition at line 114 of file RPCDQUtils.h.

◆ stationPhi

int GasGapData::stationPhi

Definition at line 116 of file RPCDQUtils.h.


The documentation for this struct was generated from the following files:
GasGapData::gasgap
unsigned gasgap
Definition: RPCDQUtils.h:120
get_generator_info.result
result
Definition: get_generator_info.py:21
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
GasGapData::minStripEta
double minStripEta
Definition: RPCDQUtils.h:124
GasGapData::NphiStrips
unsigned NphiStrips
Definition: RPCDQUtils.h:123
GasGapData::gapid
Identifier gapid
Definition: RPCDQUtils.h:110
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
GasGapData::doubletR
int doubletR
Definition: RPCDQUtils.h:117
xAOD::P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: xAODP4Helpers.h:69
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:800
RpcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
Definition: RpcIdHelper.cxx:939
GasGapData::readoutEl
const MuonGM::RpcReadoutElement * readoutEl
Definition: RPCDQUtils.h:108
RpcIdHelper
Definition: RpcIdHelper.h:51
MuonGM::RpcReadoutElement::getDoubletR
int getDoubletR() const
return DoubletR value for the given readout element
GasGapData::minStripPhi
double minStripPhi
Definition: RPCDQUtils.h:126
GasGapData::NetaStrips
unsigned NetaStrips
Definition: RPCDQUtils.h:122
GasGapData::gapid_str
std::string gapid_str
Definition: RPCDQUtils.h:112
GasGapData::stationName
int stationName
Definition: RPCDQUtils.h:114
GasGapData::stationEta
int stationEta
Definition: RPCDQUtils.h:115
MuonGM::RpcReadoutElement::NphiStrips
int NphiStrips() const
returns the number of phi strips
MuonGM::RpcReadoutElement::NetaStrips
int NetaStrips() const
returns the number of eta strips
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:810
GasGapData::doubletZ
int doubletZ
Definition: RPCDQUtils.h:118
MuonGM::RpcReadoutElement::stripPos
Amg::Vector3D stripPos(const Identifier &id) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:177
RpcIdHelper::gapID
Identifier gapID(const Identifier &padID, int gasGap) const
Definition: RpcIdHelper.cxx:925
GasGapData::maxStripEta
double maxStripEta
Definition: RPCDQUtils.h:125
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:805
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
GasGapData::maxStripPhi
double maxStripPhi
Definition: RPCDQUtils.h:127
GasGapData::doubletPhi
int doubletPhi
Definition: RPCDQUtils.h:119
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
GasGapData::stationPhi
int stationPhi
Definition: RPCDQUtils.h:116
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Muon::IMuonIdHelperSvc::rpcIdHelper
virtual const RpcIdHelper & rpcIdHelper() const =0
access to RpcIdHelper
GasGapData::gapid_valid
bool gapid_valid
Definition: RPCDQUtils.h:111
Identifier
Definition: IdentifierFieldParser.cxx:14