ATLAS Offline Software
Loading...
Searching...
No Matches
MuonGM::MuonStripDesign Struct Reference

#include <MuonStripDesign.h>

Collaboration diagram for MuonGM::MuonStripDesign:

Public Member Functions

double distanceToReadout (const Amg::Vector2D &pos) const
 distance to readout
double distanceToReadout (double locY) const
int stripNumber (const Amg::Vector2D &pos) const
 calculate local strip number, range 1=nstrips like identifiers.
int stripNumber (double locX) const
bool stripPosition (int strip, Amg::Vector2D &pos) const
 calculate local strip position for a given strip number

Public Attributes

int nstrips {0}
double stripPitch {0.}
double invStripPitch {0.}
double stripLength {0.}
double stripWidth
double readoutLocY {0.}
double signY {0.}
Amg::Vector2D firstStripPos {Amg::Vector2D::Zero()}

Detailed Description

Definition at line 18 of file MuonStripDesign.h.

Member Function Documentation

◆ distanceToReadout() [1/2]

double MuonGM::MuonStripDesign::distanceToReadout ( const Amg::Vector2D & pos) const
inline

distance to readout

Definition at line 41 of file MuonStripDesign.h.

41{ return distanceToReadout(pos.y()); }
double distanceToReadout(const Amg::Vector2D &pos) const
distance to readout

◆ distanceToReadout() [2/2]

double MuonGM::MuonStripDesign::distanceToReadout ( double locY) const
inline

Definition at line 43 of file MuonStripDesign.h.

43 {
44 return std::clamp(locY - readoutLocY, 0., stripLength);
45 }

◆ stripNumber() [1/2]

int MuonGM::MuonStripDesign::stripNumber ( const Amg::Vector2D & pos) const
inline

calculate local strip number, range 1=nstrips like identifiers.

Returns -1 if out of range

Definition at line 47 of file MuonStripDesign.h.

47{ return stripNumber(pos.x()); }
int stripNumber(const Amg::Vector2D &pos) const
calculate local strip number, range 1=nstrips like identifiers.

◆ stripNumber() [2/2]

int MuonGM::MuonStripDesign::stripNumber ( double locX) const
inline

Definition at line 49 of file MuonStripDesign.h.

49 {
50 int st = (locX - firstStripPos.x()) * invStripPitch + 1.5;
51 if (st < 1) return -1;
52 if (st > nstrips) return -1;
53 return st;
54 }
@ locX
Definition ParamDefs.h:37

◆ stripPosition()

bool MuonGM::MuonStripDesign::stripPosition ( int strip,
Amg::Vector2D & pos ) const
inline

calculate local strip position for a given strip number

Definition at line 56 of file MuonStripDesign.h.

56 {
57 if (st < 1 || st > nstrips) return false;
58 pos[0] = firstStripPos.x() + stripPitch * (st - 1);
59 pos[1] = firstStripPos.y();
60 return true;
61 }

Member Data Documentation

◆ firstStripPos

Amg::Vector2D MuonGM::MuonStripDesign::firstStripPos {Amg::Vector2D::Zero()}

Definition at line 27 of file MuonStripDesign.h.

27{Amg::Vector2D::Zero()};

◆ invStripPitch

double MuonGM::MuonStripDesign::invStripPitch {0.}

Definition at line 22 of file MuonStripDesign.h.

22{0.};

◆ nstrips

int MuonGM::MuonStripDesign::nstrips {0}

Definition at line 20 of file MuonStripDesign.h.

20{0};

◆ readoutLocY

double MuonGM::MuonStripDesign::readoutLocY {0.}

Definition at line 25 of file MuonStripDesign.h.

25{0.};

◆ signY

double MuonGM::MuonStripDesign::signY {0.}

Definition at line 26 of file MuonStripDesign.h.

26{0.};

◆ stripLength

double MuonGM::MuonStripDesign::stripLength {0.}

Definition at line 23 of file MuonStripDesign.h.

23{0.};

◆ stripPitch

double MuonGM::MuonStripDesign::stripPitch {0.}

Definition at line 21 of file MuonStripDesign.h.

21{0.};

◆ stripWidth

double MuonGM::MuonStripDesign::stripWidth

Definition at line 24 of file MuonStripDesign.h.


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