ATLAS Offline Software
Loading...
Searching...
No Matches
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
249 NetaStrips = readoutEl->NetaStrips();
250 NphiStrips = readoutEl->NphiStrips();
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}
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
virtual const RpcIdHelper & rpcIdHelper() const =0
access to RpcIdHelper
virtual std::string toString(const Identifier &id) const =0
print all fields to string
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
Identifier gapID(const Identifier &padID, int gasGap) const
Eigen::Matrix< double, 3, 1 > Vector3D
double minStripEta
Definition RPCDQUtils.h:124
Identifier gapid
Definition RPCDQUtils.h:110
unsigned NetaStrips
Definition RPCDQUtils.h:122
bool gapid_valid
Definition RPCDQUtils.h:111
const MuonGM::RpcReadoutElement * readoutEl
Definition RPCDQUtils.h:108
int stationName
Definition RPCDQUtils.h:114
double maxStripEta
Definition RPCDQUtils.h:125
unsigned NphiStrips
Definition RPCDQUtils.h:123
std::string gapid_str
Definition RPCDQUtils.h:112
double maxStripPhi
Definition RPCDQUtils.h:127
double minStripPhi
Definition RPCDQUtils.h:126
unsigned gasgap
Definition RPCDQUtils.h:120

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}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
const Amg::Vector3D & position() const
Access method for the position.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[

◆ 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 =
303 const double dphi2 =
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.

110{0};

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

111{false};

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

128{0.0};

◆ localTrackPosZ

double GasGapData::localTrackPosZ {0.0}

Definition at line 129 of file RPCDQUtils.h.

129{0.0};

◆ maxStripEta

double GasGapData::maxStripEta {-10.0}

Definition at line 125 of file RPCDQUtils.h.

125{-10.0};

◆ maxStripPhi

double GasGapData::maxStripPhi {-10.0}

Definition at line 127 of file RPCDQUtils.h.

127{-10.0};

◆ minStripEta

double GasGapData::minStripEta {10.0}

Definition at line 124 of file RPCDQUtils.h.

124{10.0};

◆ minStripPhi

double GasGapData::minStripPhi {10.0}

Definition at line 126 of file RPCDQUtils.h.

126{10.0};

◆ NetaStrips

unsigned GasGapData::NetaStrips {0}

Definition at line 122 of file RPCDQUtils.h.

122{0};

◆ NphiStrips

unsigned GasGapData::NphiStrips {0}

Definition at line 123 of file RPCDQUtils.h.

123{0};

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