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 107 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 223 of file RPCDQUtils.cxx.

227 : readoutEl(readoutEl_),
228 doubletR(readoutEl_->getDoubletR()),
229 doubletZ(doubletZ_),
230 doubletPhi(doubletPhi_),
231 gasgap(gasgap_) {
232 const RpcIdHelper &rpcIdHelper = idHelperSvc.rpcIdHelper();
233 const Identifier readEl_id = readoutEl->identify();
234
235 stationName = rpcIdHelper.stationName(readEl_id);
236 stationEta = rpcIdHelper.stationEta(readEl_id);
237 stationPhi = rpcIdHelper.stationPhi(readEl_id);
238
239 //
240 // Get Identifier for this gas gap
241 //
244
245 if (gapid_valid) {
246 gapid_str = idHelperSvc.toString(gapid);
247 } else {
248 gapid_str = idHelperSvc.toString(gapid) + " - INVALID ID";
249 }
250
251 NetaStrips = readoutEl->NetaStrips();
252 NphiStrips = readoutEl->NphiStrips();
253
254 // Determine gas gap span in eta
255 const Identifier etaIdFirst{rpcIdHelper.channelID(gapid, doubletZ, doubletPhi, gasgap, false, 1)};
256 const Amg::Vector3D glbPos_etaStrip_1st = readoutEl->stripPos(etaIdFirst);
257 double eta_etaStrip_1st = glbPos_etaStrip_1st.eta();
258
259 const Identifier etaIdLast{rpcIdHelper.channelID(gapid, doubletZ, doubletPhi, gasgap, false, NetaStrips)};
260 const Amg::Vector3D glbPos_etaStrip_last = readoutEl->stripPos(etaIdLast);
261 double eta_etaStrip_last = glbPos_etaStrip_last.eta();
262
263 if (eta_etaStrip_1st < eta_etaStrip_last) {
264 minStripEta = eta_etaStrip_1st;
265 maxStripEta = eta_etaStrip_last;
266 } else {
267 minStripEta = eta_etaStrip_last;
268 maxStripEta = eta_etaStrip_1st;
269 }
270
271 //
272 // Determine gas gap span in phi
273 //
274 const Identifier phiIdFirst{rpcIdHelper.channelID(gapid, doubletZ, doubletPhi, gasgap, true, 1)};
275 const Amg::Vector3D glbPos_phiStrip_1st = readoutEl->stripPos(phiIdFirst);
276 double phi_phiStrip_1st = glbPos_phiStrip_1st.phi();
277
278 const Identifier phiIdLast{rpcIdHelper.channelID(gapid, doubletZ, doubletPhi, gasgap, true, NphiStrips)};
279 const Amg::Vector3D glbPos_phiStrip_last = readoutEl->stripPos(phiIdLast);
280 double phi_phiStrip_last = glbPos_phiStrip_last.phi();
281
282 if (phi_phiStrip_1st < phi_phiStrip_last) {
283 minStripPhi = phi_phiStrip_1st;
284 maxStripPhi = phi_phiStrip_last;
285 } else {
286 minStripPhi = phi_phiStrip_last;
287 maxStripPhi = phi_phiStrip_1st;
288 }
289}
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:133
Identifier gapid
Definition RPCDQUtils.h:119
unsigned NetaStrips
Definition RPCDQUtils.h:131
bool gapid_valid
Definition RPCDQUtils.h:120
const MuonGM::RpcReadoutElement * readoutEl
Definition RPCDQUtils.h:117
int stationName
Definition RPCDQUtils.h:123
double maxStripEta
Definition RPCDQUtils.h:134
unsigned NphiStrips
Definition RPCDQUtils.h:132
std::string gapid_str
Definition RPCDQUtils.h:121
double maxStripPhi
Definition RPCDQUtils.h:136
double minStripPhi
Definition RPCDQUtils.h:135
unsigned gasgap
Definition RPCDQUtils.h:129

Member Function Documentation

◆ computeTrackDistanceToGasGap() [1/2]

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

Definition at line 331 of file RPCDQUtils.cxx.

332 {
333 /*
334 This function:
335 - computes minum DR distance between track and RpcReadoutElement
336 - do this before expensive call to extrapolator
337 */
338
339 const double deta1 = std::abs(minStripEta - trackParam->position().eta());
340 const double deta2 = std::abs(maxStripEta - trackParam->position().eta());
341
342 const double dphi1 = std::abs(
343 xAOD::P4Helpers::deltaPhi(minStripPhi, trackParam->position().phi()));
344 const double dphi2 = std::abs(
345 xAOD::P4Helpers::deltaPhi(maxStripPhi, trackParam->position().phi()));
346
347 result.minTrackGasGapDEta = std::min<double>(deta1, deta2);
348 result.minTrackGasGapDPhi = std::min<double>(dphi1, dphi2);
349
350 //
351 // Now check if trackParam->position() position is between min and max - if
352 // true, set distance to zero
353 //
355 trackParam->position().eta() <= maxStripEta) {
356 result.minTrackGasGapDEta = 0.0;
357 }
359 trackParam->position().phi() <= maxStripPhi) {
360 result.minTrackGasGapDPhi = 0.0;
361 }
362
363 //
364 // Compute min DR to this gas gap
365 //
366 result.minTrackGasGapDR =
367 std::sqrt(result.minTrackGasGapDEta * result.minTrackGasGapDEta +
368 result.minTrackGasGapDPhi * result.minTrackGasGapDPhi);
369}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
const Amg::Vector3D & position() const
Access method for the position.
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
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 292 of file RPCDQUtils.cxx.

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

Member Data Documentation

◆ doubletPhi

int GasGapData::doubletPhi

Definition at line 128 of file RPCDQUtils.h.

◆ doubletR

int GasGapData::doubletR

Definition at line 126 of file RPCDQUtils.h.

◆ doubletZ

int GasGapData::doubletZ

Definition at line 127 of file RPCDQUtils.h.

◆ gapid

Identifier GasGapData::gapid {0}

Definition at line 119 of file RPCDQUtils.h.

119{0};

◆ gapid_str

std::string GasGapData::gapid_str

Definition at line 121 of file RPCDQUtils.h.

◆ gapid_valid

bool GasGapData::gapid_valid {false}

Definition at line 120 of file RPCDQUtils.h.

120{false};

◆ gasgap

unsigned GasGapData::gasgap

Definition at line 129 of file RPCDQUtils.h.

◆ localTrackPosY

double GasGapData::localTrackPosY {0.0}

Definition at line 137 of file RPCDQUtils.h.

137{0.0};

◆ localTrackPosZ

double GasGapData::localTrackPosZ {0.0}

Definition at line 138 of file RPCDQUtils.h.

138{0.0};

◆ maxStripEta

double GasGapData::maxStripEta {-10.0}

Definition at line 134 of file RPCDQUtils.h.

134{-10.0};

◆ maxStripPhi

double GasGapData::maxStripPhi {-10.0}

Definition at line 136 of file RPCDQUtils.h.

136{-10.0};

◆ minStripEta

double GasGapData::minStripEta {10.0}

Definition at line 133 of file RPCDQUtils.h.

133{10.0};

◆ minStripPhi

double GasGapData::minStripPhi {10.0}

Definition at line 135 of file RPCDQUtils.h.

135{10.0};

◆ NetaStrips

unsigned GasGapData::NetaStrips {0}

Definition at line 131 of file RPCDQUtils.h.

131{0};

◆ NphiStrips

unsigned GasGapData::NphiStrips {0}

Definition at line 132 of file RPCDQUtils.h.

132{0};

◆ readoutEl

const MuonGM::RpcReadoutElement* GasGapData::readoutEl

Definition at line 117 of file RPCDQUtils.h.

◆ RpcPanel_eta_phi

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

Definition at line 141 of file RPCDQUtils.h.

◆ stationEta

int GasGapData::stationEta

Definition at line 124 of file RPCDQUtils.h.

◆ stationName

int GasGapData::stationName

Definition at line 123 of file RPCDQUtils.h.

◆ stationPhi

int GasGapData::stationPhi

Definition at line 125 of file RPCDQUtils.h.


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