ATLAS Offline Software
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MuonGMR4::WireGroupDesign Class Reference

#include <WireGroupDesign.h>

Inheritance diagram for MuonGMR4::WireGroupDesign:
Collaboration diagram for MuonGMR4::WireGroupDesign:

Classes

struct  wireGroup
 helper construct to cache the number of wires in each group as well as the accumulated number of wires from the previous groups. More...
 

Public Types

using CheckVector2D = std::optional< Amg::Vector2D >
 

Public Member Functions

 WireGroupDesign ()=default
 
bool operator< (const WireGroupDesign &other) const
 set sorting operator More...
 
void declareGroup (const unsigned int x)
 Adds a new group of wires to the design. More...
 
unsigned int numWiresInGroup (unsigned int groupNum) const
 Returns the number of wires in a given group. More...
 
unsigned int numPitchesToGroup (unsigned int groupNum) const
 Returns the number of wire pitches to reach the given group. More...
 
unsigned int nAllWires () const
 Returns the number of all wires. More...
 
CheckVector2D wirePosition (unsigned int groupNum, unsigned int wireNum) const
 Returns the positition of the i-th wire in the g-th group groupNum [1; numStrips() wire number [1; numWiresInGroup() More...
 
CheckVector2D leftWireEdge (unsigned int groupNum, unsigned int wireNum) const
 Returns the edge point at negative y. More...
 
CheckVector2D rightWireEdge (unsigned int groupNum, unsigned int wireNum) const
 Returns the edge point at positive y. More...
 
int stripNumber (const Amg::Vector2D &pos) const override
 Calculates the number of the strip whose center is closest to the given point. More...
 
std::pair< int, int > wireNumber (const Amg::Vector2D &extPos) const
 Returns a pair where the first component indicate the wire group number and the second one returns the number of the closest wire in the group. More...
 
double wireLength (unsigned int groupNum, unsigned int wireNum) const
 Returns the length of the i-th wire in group j. More...
 
double wireCutout () const
 Extract the wireCutout for a wireGroup layer. More...
 
void defineWireCutout (const double wireCutout)
 Define the wirelength available for digitization in a gasGap. More...
 
double stripPitch () const
 Distance between two adjacent strips. More...
 
double stripWidth () const
 Width of a strip. More...
 
virtual int numStrips () const
 Number of strips on the panel. More...
 
void defineStripLayout (Amg::Vector2D &&posFirst, const double stripPitch, const double stripWidth, const int numStrips, const int numFirst=1)
 Defines the layout of the strip detector by specifing the position of the first strip w.r.t. More...
 
double halfWidth () const
 Returns the half height of the strip panel. More...
 
double shortHalfHeight () const
 Returns the shorter half height of the panel. More...
 
double longHalfHeight () const
 Returns the longer half height of the panel. More...
 
bool hasStereoAngle () const
 Returns whether a stereo angle is defined. More...
 
double stereoAngle () const
 Returns the value of the stereo angle. More...
 
bool isFlipped () const
 Returns whether the trapezoid is flipped. More...
 
void defineTrapezoid (double HalfShortY, double HalfLongY, double HalfHeight)
 Defines the edges of the trapezoid. More...
 
void defineTrapezoid (double HalfShortY, double HalfLongY, double HalfHeight, double sAngle)
 Defines the edges of the trapezoid with stereo angle. More...
 
void flipTrapezoid ()
 Flips the edges of the trapezoid boundaries by 90 degrees clockwise. More...
 
double distanceToStrip (const Amg::Vector2D &pos, int strip) const
 Returns the distance to the strip center along x. More...
 
int firstStripNumber () const
 Returns the number of the first strip. More...
 
CheckVector2D leftEdge (int stripNumb) const
 Returns the left edge of the strip (Global numbering scheme) More...
 
CheckVector2D rightEdge (int stripNumb) const
 Returns the right edge of the strip (Global numbering scheme) More...
 
CheckVector2D center (int stripNumb) const
 Returns the bisector of the strip (Global numbering scheme) More...
 
bool operator< (const StripDesign &other) const
 Odering operator. More...
 
virtual double stripLength (int stripNumb) const
 Returns length of the strip. More...
 
bool insideTrapezoid (const Amg::Vector2D &extPos) const
 Checks whether an external point is inside the trapezoidal area. More...
 
const Amg::Vector2DcornerBotLeft () const
 Returns the bottom left corner of the trapezoid. More...
 
const Amg::Vector2DcornerBotRight () const
 Returns the bottom right corner of the trapezoid. More...
 
const Amg::Vector2DcornerTopLeft () const
 Returns the top left corner of the trapezoid. More...
 
const Amg::Vector2DcornerTopRight () const
 Returns the top right corner of the trapezoid. More...
 
const Amg::Vector2DedgeDirBottom () const
 Returns the unit vector pointing from the bottom left -> right corner. More...
 
const Amg::Vector2DedgeDirTop () const
 Returns the unit vector pointing from the top left -> right corner. More...
 
const Amg::Vector2DedgeDirLeft () const
 Returns the unit vector pointing from the left bottom -> top corner. More...
 
const Amg::Vector2DedgeDirRight () const
 Returns the unit vector pointing from the right bottom -> top corner. More...
 
double lenTopEdge () const
 Length of the the edge from top left -> top right. More...
 
double lenLeftEdge () const
 Length of the edge from bottom left -> top left. More...
 
double lenBottomEdge () const
 Length of the edge from bottom left -> bottom right. More...
 
double lenRightEdge () const
 Length of the dge from bottom right -> top right. More...
 
const Amg::Vector2DstripNormal () const
 Vector pointing to the next strip. More...
 
const Amg::Vector2DstripDir () const
 Vector pointing along the strip. More...
 
const Amg::Vector2DfirstStripPos () const
 Vector indicating the first strip position. More...
 
void defineDiamond (double HalfShortY, double HalfLongY, double HalfHeight, double yCutout)
 Defines the edges of the sTGC diamond L3 sector. More...
 
double yCutout () const
 Returns the cutout of the diamond. More...
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Protected Member Functions

bool insideBoundaries (const Amg::Vector2D &pos) const
 Checks wheather the internal point is inside hte trapezoidal area. More...
 
virtual CheckVector2D leftInterSect (int stripNum, bool uncapped=false) const
 Returns the intersection of a given strip with the left or right edge of the trapezoid If uncapped is set to false and the strip is a routed strip, then the intersection onto the corresponding bottom / top edges are returned. More...
 
CheckVector2D leftInterSect (const Amg::Vector2D &stripPos, bool uncapped=false) const
 
virtual CheckVector2D rightInterSect (int stripNum, bool uncapped=false) const
 
CheckVector2D rightInterSect (const Amg::Vector2D &stripPos, bool uncapped=false) const
 
CheckVector2D stripCenter (int stripNum) const
 Returns the geometrical center of a given strip. More...
 

Private Types

using wireGrpVector = std::vector< wireGroup >
 
using wireGrpVectorItr = wireGrpVector::const_iterator
 

Private Member Functions

void print (std::ostream &ostr) const override final
 Dump properties to the ostr. More...
 
Amg::Vector2D stripPosition (int stripNum) const override final
 Returns the center of the wire group. More...
 
void setStereoAngle (double stereo)
 
void resetDirCache ()
 Resets the cache of the directions. More...
 
 AmgSymMatrix (2) m_etaToStereo
 Matrix to translate from nominal -> stereo frame. More...
 
 AmgSymMatrix (2) m_stereoToEta
 Matrixt to translate from stereo -> nominal frame. More...
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

wireGrpVector m_groups {}
 
double m_wireCutout {0}
 Wire length available for digitization in a gas Gap. More...
 
int m_channelShift {1}
 Shift between the 0-th readout channel and the first strip described by the panel. More...
 
int m_numStrips {0}
 Number of all strips. More...
 
double m_stripPitch {0.}
 Distance between 2 adjacent strip centers. More...
 
double m_stripWidth {0.}
 Width of each strip line. More...
 
Amg::Vector2D m_firstStripPos {Amg::Vector2D::Zero()}
 First strip position. More...
 
Amg::Vector2D m_stripDir {Amg::Vector2D::UnitY()}
 Orientiation of the strips along the panel. More...
 
Amg::Vector2D m_stripNormal {Amg::Vector2D::UnitX()}
 Vector pointing from strip N to the next strip. More...
 
bool m_isFlipped {false}
 Flag telling whether the trapezoid has been flipped. More...
 
bool m_hasStereo {false}
 Flag telling whether the strip design has a stereo angle or not. More...
 
double m_stereoAngle {0.}
 Stereo angle of the strip design. More...
 
Amg::Vector2D m_bottomLeft {Amg::Vector2D::Zero()}
 Bottom left point of the trapezoid. More...
 
Amg::Vector2D m_topLeft {Amg::Vector2D::Zero()}
 Top right point of the trapezoid. More...
 
Amg::Vector2D m_topRight {Amg::Vector2D::Zero()}
 Bottom right point of the trapezoid. More...
 
Amg::Vector2D m_bottomRight {Amg::Vector2D::Zero()}
 Bottom right point of the trapezoid. More...
 
CxxUtils::CachedUniquePtr< Amg::Vector2Dm_dirTopEdge {}
 Vector describing the top edge of the trapzoid (top left -> top right) More...
 
CxxUtils::CachedUniquePtr< Amg::Vector2Dm_dirBotEdge {}
 Vector describing the bottom edge of the trapezoid (bottom left -> bottom right) More...
 
CxxUtils::CachedUniquePtr< Amg::Vector2Dm_dirLeftEdge {}
 Vector describing the left adge of the trapezoid (bottom left -> top left) More...
 
CxxUtils::CachedUniquePtr< Amg::Vector2Dm_dirRightEdge {}
 Vector describing the right edge of the trapezoid (bottom right -> top right) More...
 
double m_lenSlopEdge {0.}
 Length of the edge connecting the short with the long egde. More...
 
double m_shortHalfY {0.}
 Trapezoid dimensions. More...
 
double m_longHalfY {0.}
 
double m_halfX {0.}
 
double m_yCutout {0.}
 Stores the diamond cutout length from the SQLite DB file. More...
 
double m_cutLongEdge {0.}
 Lenght of the line segment that's cut from the long edge to make the trapezoid diamond shaped. More...
 
std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Detailed Description

Definition at line 23 of file WireGroupDesign.h.

Member Typedef Documentation

◆ CheckVector2D

using MuonGMR4::StripDesign::CheckVector2D = std::optional<Amg::Vector2D>
inherited

Definition at line 82 of file StripDesign.h.

◆ wireGrpVector

Definition at line 85 of file WireGroupDesign.h.

◆ wireGrpVectorItr

using MuonGMR4::WireGroupDesign::wireGrpVectorItr = wireGrpVector::const_iterator
private

Definition at line 86 of file WireGroupDesign.h.

Constructor & Destructor Documentation

◆ WireGroupDesign()

MuonGMR4::WireGroupDesign::WireGroupDesign ( )
default

Member Function Documentation

◆ AmgSymMatrix() [1/2]

MuonGMR4::StripDesign::AmgSymMatrix ( )
inlineprivateinherited

Matrix to translate from nominal -> stereo frame.

Definition at line 175 of file StripDesign.h.

175 {AmgSymMatrix(2)::Identity()};

◆ AmgSymMatrix() [2/2]

MuonGMR4::StripDesign::AmgSymMatrix ( )
inlineprivateinherited

Matrixt to translate from stereo -> nominal frame.

Definition at line 177 of file StripDesign.h.

177 {AmgSymMatrix(2)::Identity()};

◆ center()

CheckVector2D MuonGMR4::StripDesign::center ( int  stripNumb) const
inherited

Returns the bisector of the strip (Global numbering scheme)

◆ cornerBotLeft()

const Amg::Vector2D& MuonGMR4::StripDesign::cornerBotLeft ( ) const
inherited

Returns the bottom left corner of the trapezoid.

◆ cornerBotRight()

const Amg::Vector2D& MuonGMR4::StripDesign::cornerBotRight ( ) const
inherited

Returns the bottom right corner of the trapezoid.

◆ cornerTopLeft()

const Amg::Vector2D& MuonGMR4::StripDesign::cornerTopLeft ( ) const
inherited

Returns the top left corner of the trapezoid.

◆ cornerTopRight()

const Amg::Vector2D& MuonGMR4::StripDesign::cornerTopRight ( ) const
inherited

Returns the top right corner of the trapezoid.

◆ declareGroup()

void MuonGMR4::WireGroupDesign::declareGroup ( const unsigned int  x)

Adds a new group of wires to the design.

Definition at line 32 of file WireGroupDesign.cxx.

32  {
33  m_groups.emplace_back(numWires, nAllWires());
34  }

◆ defineDiamond()

void MuonGMR4::StripDesign::defineDiamond ( double  HalfShortY,
double  HalfLongY,
double  HalfHeight,
double  yCutout 
)
inherited

Defines the edges of the sTGC diamond L3 sector.

define a trapezoid region to preserve the functionality of intersect functions in StripDesign class

Definition at line 82 of file StripDesign.cxx.

83  {
85  double HalfLongYuncut = HalfLongY + yCutout * (HalfLongY - HalfShortY)/(2*HalfHeight - yCutout);
86  defineTrapezoid(HalfShortY, HalfLongYuncut, HalfHeight);
88  m_longHalfY = HalfLongY;
90  }

◆ defineStripLayout()

void MuonGMR4::StripDesign::defineStripLayout ( Amg::Vector2D &&  posFirst,
const double  stripPitch,
const double  stripWidth,
const int  numStrips,
const int  numFirst = 1 
)
inherited

Defines the layout of the strip detector by specifing the position of the first strip w.r.t.

the layer center, the pitch to the next strip, the corresponding width of each strip, the total number of strips and finally the number of the first strip in the global numbering scheme

Definition at line 107 of file StripDesign.cxx.

111  {
112  m_channelShift = numFirst;
116  m_firstStripPos = std::move(posFirst);
117  }

◆ defineTrapezoid() [1/2]

void MuonGMR4::StripDesign::defineTrapezoid ( double  HalfShortY,
double  HalfLongY,
double  HalfHeight 
)
inherited

Defines the edges of the trapezoid.

Definition at line 69 of file StripDesign.cxx.

69  {
70  m_bottomLeft = Amg::Vector2D{-HalfHeight, -HalfShortY};
71  m_bottomRight = Amg::Vector2D{HalfHeight, -HalfLongY};
72  m_topLeft = Amg::Vector2D{-HalfHeight, HalfShortY};
73  m_topRight = Amg::Vector2D{HalfHeight, HalfLongY};
74 
75  m_shortHalfY = HalfShortY;
76  m_longHalfY = HalfLongY;
77  m_halfX = HalfHeight;
78  m_lenSlopEdge = std::hypot(2.*HalfHeight, HalfShortY - HalfLongY);
79  resetDirCache();
80  m_isFlipped = false;
81  }

◆ defineTrapezoid() [2/2]

void MuonGMR4::StripDesign::defineTrapezoid ( double  HalfShortY,
double  HalfLongY,
double  HalfHeight,
double  sAngle 
)
inherited

Defines the edges of the trapezoid with stereo angle.

The stereo angle is defined as the angle going from the nominal scheme to the stereo scheme

Definition at line 54 of file StripDesign.cxx.

54  {
55  defineTrapezoid(HalfShortY,HalfLongY, HalfHeight);
56  setStereoAngle(sAngle);
57  }

◆ defineWireCutout()

void MuonGMR4::WireGroupDesign::defineWireCutout ( const double  wireCutout)

Define the wirelength available for digitization in a gasGap.

Definition at line 61 of file WireGroupDesign.cxx.

◆ distanceToStrip()

double MuonGMR4::StripDesign::distanceToStrip ( const Amg::Vector2D pos,
int  strip 
) const
inherited

Returns the distance to the strip center along x.

◆ edgeDirBottom()

const Amg::Vector2D& MuonGMR4::StripDesign::edgeDirBottom ( ) const
inherited

Returns the unit vector pointing from the bottom left -> right corner.

◆ edgeDirLeft()

const Amg::Vector2D& MuonGMR4::StripDesign::edgeDirLeft ( ) const
inherited

Returns the unit vector pointing from the left bottom -> top corner.

◆ edgeDirRight()

const Amg::Vector2D& MuonGMR4::StripDesign::edgeDirRight ( ) const
inherited

Returns the unit vector pointing from the right bottom -> top corner.

◆ edgeDirTop()

const Amg::Vector2D& MuonGMR4::StripDesign::edgeDirTop ( ) const
inherited

Returns the unit vector pointing from the top left -> right corner.

◆ firstStripNumber()

int MuonGMR4::StripDesign::firstStripNumber ( ) const
inherited

Returns the number of the first strip.

◆ firstStripPos()

const Amg::Vector2D& MuonGMR4::StripDesign::firstStripPos ( ) const
inherited

Vector indicating the first strip position.

◆ flipTrapezoid()

void MuonGMR4::StripDesign::flipTrapezoid ( )
inherited

Flips the edges of the trapezoid boundaries by 90 degrees clockwise.

yCutOut defined for the sTGC detectors. Move the edges to the uncut trapezoid version Deal with the cutOut in the intersect

Definition at line 91 of file StripDesign.cxx.

91  {
92  if (m_isFlipped) {
93  ATH_MSG_WARNING("It's impossible to flip a trapezoid twice. Swap short and long lengths");
94  return;
95  }
96  m_isFlipped = true;
97 
104  resetDirCache();
105  }

◆ halfWidth()

double MuonGMR4::StripDesign::halfWidth ( ) const
inherited

Returns the half height of the strip panel.

◆ hasStereoAngle()

bool MuonGMR4::StripDesign::hasStereoAngle ( ) const
inherited

Returns whether a stereo angle is defined.

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ insideBoundaries()

bool MuonGMR4::StripDesign::insideBoundaries ( const Amg::Vector2D pos) const
protectedinherited

Checks wheather the internal point is inside hte trapezoidal area.

◆ insideTrapezoid()

bool MuonGMR4::StripDesign::insideTrapezoid ( const Amg::Vector2D extPos) const
inherited

Checks whether an external point is inside the trapezoidal area.

◆ isFlipped()

bool MuonGMR4::StripDesign::isFlipped ( ) const
inherited

Returns whether the trapezoid is flipped.

◆ leftEdge()

CheckVector2D MuonGMR4::StripDesign::leftEdge ( int  stripNumb) const
inherited

Returns the left edge of the strip (Global numbering scheme)

◆ leftInterSect() [1/2]

CheckVector2D MuonGMR4::StripDesign::leftInterSect ( const Amg::Vector2D stripPos,
bool  uncapped = false 
) const
protectedinherited

◆ leftInterSect() [2/2]

virtual CheckVector2D MuonGMR4::StripDesign::leftInterSect ( int  stripNum,
bool  uncapped = false 
) const
protectedvirtualinherited

Returns the intersection of a given strip with the left or right edge of the trapezoid If uncapped is set to false and the strip is a routed strip, then the intersection onto the corresponding bottom / top edges are returned.

Reimplemented in MuonGMR4::RadialStripDesign.

◆ leftWireEdge()

CheckVector2D MuonGMR4::WireGroupDesign::leftWireEdge ( unsigned int  groupNum,
unsigned int  wireNum 
) const

Returns the edge point at negative y.

Parameters
groupNum[1; numStrips()]
wireNum[1; numWiresInGroup()]
Returns

◆ lenBottomEdge()

double MuonGMR4::StripDesign::lenBottomEdge ( ) const
inherited

Length of the edge from bottom left -> bottom right.

◆ lenLeftEdge()

double MuonGMR4::StripDesign::lenLeftEdge ( ) const
inherited

Length of the edge from bottom left -> top left.

◆ lenRightEdge()

double MuonGMR4::StripDesign::lenRightEdge ( ) const
inherited

Length of the dge from bottom right -> top right.

◆ lenTopEdge()

double MuonGMR4::StripDesign::lenTopEdge ( ) const
inherited

Length of the the edge from top left -> top right.

◆ longHalfHeight()

double MuonGMR4::StripDesign::longHalfHeight ( ) const
inherited

Returns the longer half height of the panel.

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level  lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ nAllWires()

unsigned int MuonGMR4::WireGroupDesign::nAllWires ( ) const

Returns the number of all wires.

Definition at line 35 of file WireGroupDesign.cxx.

35  {
36  return m_groups.empty() ? 0 : m_groups.back().accumlWires + m_groups.back().numWires;
37  }

◆ numPitchesToGroup()

unsigned int MuonGMR4::WireGroupDesign::numPitchesToGroup ( unsigned int  groupNum) const

Returns the number of wire pitches to reach the given group.

Definition at line 49 of file WireGroupDesign.cxx.

49  {
50  unsigned int grpIdx = groupNum - firstStripNumber();
51  if (grpIdx >= m_groups.size()) {
52  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The group number "<<groupNum
53  <<" is out of range. Expect ["<<firstStripNumber()
54  <<"-"<<m_groups.size()+firstStripNumber()<<").");
55  return 0;
56  }
57  return m_groups[grpIdx].accumlWires;
58  }

◆ numStrips()

virtual int MuonGMR4::StripDesign::numStrips ( ) const
virtualinherited

Number of strips on the panel.

Reimplemented in MuonGMR4::RadialStripDesign.

◆ numWiresInGroup()

unsigned int MuonGMR4::WireGroupDesign::numWiresInGroup ( unsigned int  groupNum) const

Returns the number of wires in a given group.

Definition at line 39 of file WireGroupDesign.cxx.

39  {
40  unsigned int grpIdx = groupNum - firstStripNumber();
41  if (grpIdx >= m_groups.size()) {
42  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The group number "<<groupNum
43  <<" is out of range. Expect ["<<firstStripNumber()
44  <<"-"<<m_groups.size()+firstStripNumber()<<").");
45  return 0;
46  }
47  return m_groups[grpIdx].numWires;
48  }

◆ operator<() [1/2]

bool MuonGMR4::StripDesign::operator< ( const StripDesign other) const
inherited

Odering operator.

Definition at line 26 of file StripDesign.cxx.

26  {
36  static const GeoTrf::TransformSorter trfSorter{};
37  return trfSorter(m_firstStripPos, other.m_firstStripPos);
38  }

◆ operator<() [2/2]

bool MuonGMR4::WireGroupDesign::operator< ( const WireGroupDesign other) const

set sorting operator

Definition at line 21 of file WireGroupDesign.cxx.

21  {
22  if (other.m_groups.size() != m_groups.size()) {
23  return m_groups.size() < other.m_groups.size();
24  }
25  for (unsigned int grp = 0; grp < m_groups.size(); ++grp) {
26  if (m_groups[grp].numWires != other.m_groups[grp].numWires) {
27  return m_groups[grp].numWires < other.m_groups[grp].numWires;
28  }
29  }
30  return static_cast<const StripDesign&>(*this) < other;
31  }

◆ print()

void MuonGMR4::WireGroupDesign::print ( std::ostream &  ostr) const
finaloverrideprivatevirtual

Dump properties to the ostr.

Reimplemented from MuonGMR4::StripDesign.

Definition at line 8 of file WireGroupDesign.cxx.

8  {
9  ostr<<"Dimension -- width x height [mm]: "<<halfWidth() * Gaudi::Units::mm<<" x ";
10  ostr<<shortHalfHeight()<<"/"<<longHalfHeight()<<" [mm], ";
11  if (hasStereoAngle()) ostr<<"stereo angle: "<<stereoAngle() / Gaudi::Units::deg<<", ";
12  ostr<<"position first strip "<<Amg::toString(center(firstStripNumber()).value_or(Amg::Vector2D::Zero()),1);
13  ostr<<" *** Trapezoid edges "<<Amg::toString(cornerBotLeft(),1)<<" - "<<Amg::toString(cornerBotRight(), 1)<<" --- ";
14  ostr<<Amg::toString(cornerTopLeft(), 1)<<" - "<<Amg::toString(cornerTopRight(), 1);
15  ostr<<" -- numWireGroups: "<<m_groups.size()<<", wire pitch: "<<stripPitch()<<", nWires: [";
16  for (const wireGroup & grp : m_groups){
17  ostr<<grp.numWires<<",";
18  }
19  ostr<<"] ";
20  }

◆ resetDirCache()

void MuonGMR4::StripDesign::resetDirCache ( )
privateinherited

Resets the cache of the directions.

Definition at line 118 of file StripDesign.cxx.

118  {
119  m_dirTopEdge.release();
120  m_dirBotEdge.release();
121  m_dirLeftEdge.release();
122  m_dirRightEdge.release();
123  }

◆ rightEdge()

CheckVector2D MuonGMR4::StripDesign::rightEdge ( int  stripNumb) const
inherited

Returns the right edge of the strip (Global numbering scheme)

◆ rightInterSect() [1/2]

CheckVector2D MuonGMR4::StripDesign::rightInterSect ( const Amg::Vector2D stripPos,
bool  uncapped = false 
) const
protectedinherited

◆ rightInterSect() [2/2]

virtual CheckVector2D MuonGMR4::StripDesign::rightInterSect ( int  stripNum,
bool  uncapped = false 
) const
protectedvirtualinherited

Reimplemented in MuonGMR4::RadialStripDesign.

◆ rightWireEdge()

CheckVector2D MuonGMR4::WireGroupDesign::rightWireEdge ( unsigned int  groupNum,
unsigned int  wireNum 
) const

Returns the edge point at positive y.

Parameters
groupNum[1; numStrips()]
wireNum[1; numWiresInGroup()]
Returns

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

◆ setStereoAngle()

void MuonGMR4::StripDesign::setStereoAngle ( double  stereo)
privateinherited

Definition at line 59 of file StripDesign.cxx.

59  {
60  if (std::abs(sAngle) < std::numeric_limits<float>::epsilon()) return;
61  m_stereoAngle = sAngle;
62  m_hasStereo = true;
63  m_etaToStereo = Eigen::Rotation2D{sAngle};
64  m_stereoToEta = Eigen::Rotation2D{-sAngle};
65  m_stripDir = m_stereoToEta * m_stripDir;
66  m_stripNormal = m_stereoToEta * m_stripNormal;
67  }

◆ shortHalfHeight()

double MuonGMR4::StripDesign::shortHalfHeight ( ) const
inherited

Returns the shorter half height of the panel.

◆ stereoAngle()

double MuonGMR4::StripDesign::stereoAngle ( ) const
inherited

Returns the value of the stereo angle.

◆ stripCenter()

CheckVector2D MuonGMR4::StripDesign::stripCenter ( int  stripNum) const
protectedinherited

Returns the geometrical center of a given strip.

◆ stripDir()

const Amg::Vector2D& MuonGMR4::StripDesign::stripDir ( ) const
inherited

Vector pointing along the strip.

◆ stripLength()

virtual double MuonGMR4::StripDesign::stripLength ( int  stripNumb) const
virtualinherited

Returns length of the strip.

Reimplemented in MuonGMR4::RadialStripDesign.

◆ stripNormal()

const Amg::Vector2D& MuonGMR4::StripDesign::stripNormal ( ) const
inherited

Vector pointing to the next strip.

◆ stripNumber()

int MuonGMR4::WireGroupDesign::stripNumber ( const Amg::Vector2D pos) const
overridevirtual

Calculates the number of the strip whose center is closest to the given point.

If the point is outside of the panel, -1 is returned

Reimplemented from MuonGMR4::StripDesign.

◆ stripPitch()

double MuonGMR4::StripDesign::stripPitch ( ) const
inherited

Distance between two adjacent strips.

◆ stripPosition()

Amg::Vector2D MuonGMR4::WireGroupDesign::stripPosition ( int  stripNum) const
finaloverrideprivatevirtual

Returns the center of the wire group.

Reimplemented from MuonGMR4::StripDesign.

◆ stripWidth()

double MuonGMR4::StripDesign::stripWidth ( ) const
inherited

Width of a strip.

◆ wireCutout()

double MuonGMR4::WireGroupDesign::wireCutout ( ) const

Extract the wireCutout for a wireGroup layer.

Definition at line 59 of file WireGroupDesign.cxx.

59 {return m_wireCutout;}

◆ wireLength()

double MuonGMR4::WireGroupDesign::wireLength ( unsigned int  groupNum,
unsigned int  wireNum 
) const

Returns the length of the i-th wire in group j.

◆ wireNumber()

std::pair<int, int> MuonGMR4::WireGroupDesign::wireNumber ( const Amg::Vector2D extPos) const

Returns a pair where the first component indicate the wire group number and the second one returns the number of the closest wire in the group.

◆ wirePosition()

CheckVector2D MuonGMR4::WireGroupDesign::wirePosition ( unsigned int  groupNum,
unsigned int  wireNum 
) const

Returns the positition of the i-th wire in the g-th group groupNum [1; numStrips() wire number [1; numWiresInGroup()

◆ yCutout()

double MuonGMR4::StripDesign::yCutout ( ) const
inherited

Returns the cutout of the diamond.

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_bottomLeft

Amg::Vector2D MuonGMR4::StripDesign::m_bottomLeft {Amg::Vector2D::Zero()}
privateinherited

Bottom left point of the trapezoid.

Definition at line 179 of file StripDesign.h.

◆ m_bottomRight

Amg::Vector2D MuonGMR4::StripDesign::m_bottomRight {Amg::Vector2D::Zero()}
privateinherited

Bottom right point of the trapezoid.

Definition at line 185 of file StripDesign.h.

◆ m_channelShift

int MuonGMR4::StripDesign::m_channelShift {1}
privateinherited

Shift between the 0-th readout channel and the first strip described by the panel.

Definition at line 152 of file StripDesign.h.

◆ m_cutLongEdge

double MuonGMR4::StripDesign::m_cutLongEdge {0.}
privateinherited

Lenght of the line segment that's cut from the long edge to make the trapezoid diamond shaped.

Definition at line 206 of file StripDesign.h.

◆ m_dirBotEdge

CxxUtils::CachedUniquePtr<Amg::Vector2D> MuonGMR4::StripDesign::m_dirBotEdge {}
privateinherited

Vector describing the bottom edge of the trapezoid (bottom left -> bottom right)

Definition at line 190 of file StripDesign.h.

◆ m_dirLeftEdge

CxxUtils::CachedUniquePtr<Amg::Vector2D> MuonGMR4::StripDesign::m_dirLeftEdge {}
privateinherited

Vector describing the left adge of the trapezoid (bottom left -> top left)

Definition at line 192 of file StripDesign.h.

◆ m_dirRightEdge

CxxUtils::CachedUniquePtr<Amg::Vector2D> MuonGMR4::StripDesign::m_dirRightEdge {}
privateinherited

Vector describing the right edge of the trapezoid (bottom right -> top right)

Definition at line 194 of file StripDesign.h.

◆ m_dirTopEdge

CxxUtils::CachedUniquePtr<Amg::Vector2D> MuonGMR4::StripDesign::m_dirTopEdge {}
privateinherited

Vector describing the top edge of the trapzoid (top left -> top right)

Definition at line 188 of file StripDesign.h.

◆ m_firstStripPos

Amg::Vector2D MuonGMR4::StripDesign::m_firstStripPos {Amg::Vector2D::Zero()}
privateinherited

First strip position.

Definition at line 160 of file StripDesign.h.

◆ m_groups

wireGrpVector MuonGMR4::WireGroupDesign::m_groups {}
private

Definition at line 87 of file WireGroupDesign.h.

◆ m_halfX

double MuonGMR4::StripDesign::m_halfX {0.}
privateinherited

Definition at line 200 of file StripDesign.h.

◆ m_hasStereo

bool MuonGMR4::StripDesign::m_hasStereo {false}
privateinherited

Flag telling whether the strip design has a stereo angle or not.

Definition at line 170 of file StripDesign.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_isFlipped

bool MuonGMR4::StripDesign::m_isFlipped {false}
privateinherited

Flag telling whether the trapezoid has been flipped.

Definition at line 168 of file StripDesign.h.

◆ m_lenSlopEdge

double MuonGMR4::StripDesign::m_lenSlopEdge {0.}
privateinherited

Length of the edge connecting the short with the long egde.

Definition at line 196 of file StripDesign.h.

◆ m_longHalfY

double MuonGMR4::StripDesign::m_longHalfY {0.}
privateinherited

Definition at line 199 of file StripDesign.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_numStrips

int MuonGMR4::StripDesign::m_numStrips {0}
privateinherited

Number of all strips.

Definition at line 154 of file StripDesign.h.

◆ m_shortHalfY

double MuonGMR4::StripDesign::m_shortHalfY {0.}
privateinherited

Trapezoid dimensions.

Definition at line 198 of file StripDesign.h.

◆ m_stereoAngle

double MuonGMR4::StripDesign::m_stereoAngle {0.}
privateinherited

Stereo angle of the strip design.

Definition at line 172 of file StripDesign.h.

◆ m_stripDir

Amg::Vector2D MuonGMR4::StripDesign::m_stripDir {Amg::Vector2D::UnitY()}
privateinherited

Orientiation of the strips along the panel.

Definition at line 163 of file StripDesign.h.

◆ m_stripNormal

Amg::Vector2D MuonGMR4::StripDesign::m_stripNormal {Amg::Vector2D::UnitX()}
privateinherited

Vector pointing from strip N to the next strip.

Definition at line 165 of file StripDesign.h.

◆ m_stripPitch

double MuonGMR4::StripDesign::m_stripPitch {0.}
privateinherited

Distance between 2 adjacent strip centers.

Definition at line 156 of file StripDesign.h.

◆ m_stripWidth

double MuonGMR4::StripDesign::m_stripWidth {0.}
privateinherited

Width of each strip line.

Definition at line 158 of file StripDesign.h.

◆ m_topLeft

Amg::Vector2D MuonGMR4::StripDesign::m_topLeft {Amg::Vector2D::Zero()}
privateinherited

Top right point of the trapezoid.

Definition at line 181 of file StripDesign.h.

◆ m_topRight

Amg::Vector2D MuonGMR4::StripDesign::m_topRight {Amg::Vector2D::Zero()}
privateinherited

Bottom right point of the trapezoid.

Definition at line 183 of file StripDesign.h.

◆ m_wireCutout

double MuonGMR4::WireGroupDesign::m_wireCutout {0}
private

Wire length available for digitization in a gas Gap.

Definition at line 89 of file WireGroupDesign.h.

◆ m_yCutout

double MuonGMR4::StripDesign::m_yCutout {0.}
privateinherited

Stores the diamond cutout length from the SQLite DB file.

Definition at line 203 of file StripDesign.h.


The documentation for this class was generated from the following files:
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
MuonGMR4::StripDesign::cornerTopLeft
const Amg::Vector2D & cornerTopLeft() const
Returns the top left corner of the trapezoid.
MuonGMR4::StripDesign::m_cutLongEdge
double m_cutLongEdge
Lenght of the line segment that's cut from the long edge to make the trapezoid diamond shaped.
Definition: StripDesign.h:206
MuonGMR4::StripDesign::stereoAngle
double stereoAngle() const
Returns the value of the stereo angle.
MuonGMR4::StripDesign::m_lenSlopEdge
double m_lenSlopEdge
Length of the edge connecting the short with the long egde.
Definition: StripDesign.h:196
MuonGMR4::StripDesign::m_channelShift
int m_channelShift
Shift between the 0-th readout channel and the first strip described by the panel.
Definition: StripDesign.h:152
MuonGMR4::StripDesign::isFlipped
bool isFlipped() const
Returns whether the trapezoid is flipped.
MuonGMR4::WireGroupDesign::m_groups
wireGrpVector m_groups
Definition: WireGroupDesign.h:87
MuonGMR4::WireGroupDesign::wireCutout
double wireCutout() const
Extract the wireCutout for a wireGroup layer.
Definition: WireGroupDesign.cxx:59
MuonGMR4::StripDesign::m_shortHalfY
double m_shortHalfY
Trapezoid dimensions.
Definition: StripDesign.h:198
MuonGMR4::StripDesign::cornerBotLeft
const Amg::Vector2D & cornerBotLeft() const
Returns the bottom left corner of the trapezoid.
MuonGMR4::StripDesign::setStereoAngle
void setStereoAngle(double stereo)
Definition: StripDesign.cxx:59
MuonGMR4::StripDesign::m_stereoAngle
double m_stereoAngle
Stereo angle of the strip design.
Definition: StripDesign.h:172
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonGMR4::StripDesign::numStrips
virtual int numStrips() const
Number of strips on the panel.
MuonGMR4::StripDesign::m_dirRightEdge
CxxUtils::CachedUniquePtr< Amg::Vector2D > m_dirRightEdge
Vector describing the right edge of the trapezoid (bottom right -> top right)
Definition: StripDesign.h:194
deg
#define deg
Definition: SbPolyhedron.cxx:17
MuonGMR4::StripDesign::m_stripNormal
Amg::Vector2D m_stripNormal
Vector pointing from strip N to the next strip.
Definition: StripDesign.h:165
MuonGMR4::WireGroupDesign::nAllWires
unsigned int nAllWires() const
Returns the number of all wires.
Definition: WireGroupDesign.cxx:35
MuonGMR4::StripDesign::m_topLeft
Amg::Vector2D m_topLeft
Top right point of the trapezoid.
Definition: StripDesign.h:181
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
MuonGMR4::StripDesign::m_stripPitch
double m_stripPitch
Distance between 2 adjacent strip centers.
Definition: StripDesign.h:156
MuonGMR4::StripDesign::longHalfHeight
double longHalfHeight() const
Returns the longer half height of the panel.
MuonGMR4::StripDesign::StripDesign
StripDesign()
Definition: StripDesign.cxx:21
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonGMR4::StripDesign::m_bottomRight
Amg::Vector2D m_bottomRight
Bottom right point of the trapezoid.
Definition: StripDesign.h:185
MuonGMR4::StripDesign::shortHalfHeight
double shortHalfHeight() const
Returns the shorter half height of the panel.
MuonGMR4::StripDesign::m_firstStripPos
Amg::Vector2D m_firstStripPos
First strip position.
Definition: StripDesign.h:160
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
MuonGMR4::StripDesign::m_dirLeftEdge
CxxUtils::CachedUniquePtr< Amg::Vector2D > m_dirLeftEdge
Vector describing the left adge of the trapezoid (bottom left -> top left)
Definition: StripDesign.h:192
MuonGMR4::StripDesign::yCutout
double yCutout() const
Returns the cutout of the diamond.
MuonGMR4::StripDesign::m_yCutout
double m_yCutout
Stores the diamond cutout length from the SQLite DB file.
Definition: StripDesign.h:203
MuonGMR4::StripDesign::stripWidth
double stripWidth() const
Width of a strip.
MuonGMR4::StripDesign::defineTrapezoid
void defineTrapezoid(double HalfShortY, double HalfLongY, double HalfHeight)
Defines the edges of the trapezoid.
Definition: StripDesign.cxx:69
MuonGMR4::WireGroupDesign::m_wireCutout
double m_wireCutout
Wire length available for digitization in a gas Gap.
Definition: WireGroupDesign.h:89
MuonGMR4::StripDesign::firstStripNumber
int firstStripNumber() const
Returns the number of the first strip.
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
MuonGMR4::StripDesign::cornerTopRight
const Amg::Vector2D & cornerTopRight() const
Returns the top right corner of the trapezoid.
MuonGMR4::StripDesign::center
CheckVector2D center(int stripNumb) const
Returns the bisector of the strip (Global numbering scheme)
MuonGMR4::StripDesign::m_dirBotEdge
CxxUtils::CachedUniquePtr< Amg::Vector2D > m_dirBotEdge
Vector describing the bottom edge of the trapezoid (bottom left -> bottom right)
Definition: StripDesign.h:190
MuonGMR4::StripDesign::m_hasStereo
bool m_hasStereo
Flag telling whether the strip design has a stereo angle or not.
Definition: StripDesign.h:170
MuonGMR4::StripDesign::m_stripWidth
double m_stripWidth
Width of each strip line.
Definition: StripDesign.h:158
MuonGMR4::StripDesign::m_longHalfY
double m_longHalfY
Definition: StripDesign.h:199
MuonGMR4::StripDesign::AmgSymMatrix
AmgSymMatrix(2) m_etaToStereo
Matrix to translate from nominal -> stereo frame.
Definition: StripDesign.h:175
MuonGMR4::StripDesign::halfWidth
double halfWidth() const
Returns the half height of the strip panel.
MuonGMR4::StripDesign::m_isFlipped
bool m_isFlipped
Flag telling whether the trapezoid has been flipped.
Definition: StripDesign.h:168
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
MuonGMR4::StripDesign::m_dirTopEdge
CxxUtils::CachedUniquePtr< Amg::Vector2D > m_dirTopEdge
Vector describing the top edge of the trapzoid (top left -> top right)
Definition: StripDesign.h:188
MuonGMR4::StripDesign::cornerBotRight
const Amg::Vector2D & cornerBotRight() const
Returns the bottom right corner of the trapezoid.
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonGMR4::StripDesign::resetDirCache
void resetDirCache()
Resets the cache of the directions.
Definition: StripDesign.cxx:118
MuonGMR4::StripDesign::m_bottomLeft
Amg::Vector2D m_bottomLeft
Bottom left point of the trapezoid.
Definition: StripDesign.h:179
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonGMR4::StripDesign::m_stripDir
Amg::Vector2D m_stripDir
Orientiation of the strips along the panel.
Definition: StripDesign.h:163
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
MuonGMR4::StripDesign::hasStereoAngle
bool hasStereoAngle() const
Returns whether a stereo angle is defined.
ORDER_PROP
#define ORDER_PROP(PROP)
Helper macro to facilliate the ordering.
Definition: StripDesign.cxx:13
MuonGMR4::StripDesign::stripPitch
double stripPitch() const
Distance between two adjacent strips.
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
MuonGMR4::StripDesign::m_halfX
double m_halfX
Definition: StripDesign.h:200
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
MuonGMR4::StripDesign::m_topRight
Amg::Vector2D m_topRight
Bottom right point of the trapezoid.
Definition: StripDesign.h:183
MuonGMR4::StripDesign::m_numStrips
int m_numStrips
Number of all strips.
Definition: StripDesign.h:154
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32