ATLAS Offline Software
Loading...
Searching...
No Matches
MuonPadDesign Struct Reference

Parameters defining the design of the readout sTGC pads. More...

#include <MuonPadDesign.h>

Inheritance diagram for MuonPadDesign:
Collaboration diagram for MuonPadDesign:

Public Types

enum  padCorners { botLeft =0 , botRight , topLeft , topRight }
using CornerArray = std::array<Amg::Vector2D, 4>
 calculate local channel corners for a given channel number

Public Member Functions

 MuonPadDesign ()
std::pair< int, int > etaPhiId (const int channel) const
int channelId (const std::pair< int, int > &padId) const
double distanceToChannel (const Amg::Vector2D &pos, bool measPhi, int channel=0) const
 distance to channel - residual
Amg::Vector2D distanceToPad (const Amg::Vector2D &pos, int channel) const
bool withinSensitiveArea (const Amg::Vector2D &pos) const
 whether pos is within the sensitive area of the module
double minSensitiveY () const
 lowest y (local) of the sensitive volume
double maxSensitiveY () const
 highest y (local) of the sensitive volume
double maxAbsSensitiveX (const double &y) const
 largest (abs, local) x of the sensitive volume
std::pair< int, int > channelNumber (const Amg::Vector2D &pos) const
 calculate local channel number, range 1=nstrips like identifiers.
bool channelPosition (const std::pair< int, int > &pad, Amg::Vector2D &pos) const
 calculate local channel position for a given channel number
bool channelPosition (const int channel, Amg::Vector2D &pos) const
bool channelCorners (const std::pair< int, int > &pad, CornerArray &corners) const
bool channelCorners (const int channel, CornerArray &corners) const
double channelWidth (const Amg::Vector2D &pos, bool measPhi, bool preciseMeas=false) const
 calculate local channel width
double gasGapThickness () const
 thickness of gas gap
void setR (double R)
 access to cache
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Public Attributes

int padEtaMin {0}
int padEtaMax {0}
double inputRowPitch {0.}
double inputPhiPitch {0.}
double signY {0.}
double firstRowPos {0.}
double firstPhiPos {0.}
double Length {0.}
double sWidth {0.}
double lWidth {0.}
double Size {0.}
double thickness {0.}
double radialDistance {0.}
 DT-2015-11-29 distance from the beamline to the center of the module.
double sPadWidth {0.}
double lPadWidth {0.}
double xFrame {0.}
double ysFrame {0.}
double ylFrame {0.}
double yCutout {0.}
int nPadH {0}
int nPadColumns {0}
double PadPhiShift {0.}
int etasign {0}
int isLargeSector {0}
double sectorOpeningAngle {0.}
bool isConvertedFromPhaseII {false}

Static Public Attributes

static constexpr double largeSectorOpeningAngle {28.0}
static constexpr double smallSectorOpeningAngle {17.0}

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels).
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging).

Detailed Description

Parameters defining the design of the readout sTGC pads.

The parameters below are the ones from the parameter book. The naming convention used here refers to the one explained on p.90 ("naming of .xml tags and .h variables") of https://twiki.cern.ch/twiki/bin/view/Atlas/NSWParameterBook#Parameter_book

Note that the pads do not exist as objects in memory. Instead, a MuonPadDesign is defined for each layer in a module. From the readout parameters one can map position <-> channel:

  • for each sim hit position identify the pad (channel)
  • for each channel determine the center position

Definition at line 37 of file MuonPadDesign.h.

Member Typedef Documentation

◆ CornerArray

calculate local channel corners for a given channel number

Definition at line 98 of file MuonPadDesign.h.

Member Enumeration Documentation

◆ padCorners

Enumerator
botLeft 
botRight 
topLeft 
topRight 

Definition at line 99 of file MuonPadDesign.h.

Constructor & Destructor Documentation

◆ MuonPadDesign()

Definition at line 12 of file MuonPadDesign.cxx.

12: AthMessaging{"MuonPadDesign"}{}
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.

Member Function Documentation

◆ channelCorners() [1/2]

bool MuonPadDesign::channelCorners ( const int channel,
CornerArray & corners ) const

Definition at line 153 of file MuonPadDesign.cxx.

153 {
154 return channelCorners(etaPhiId(channel), corners);
155}
std::pair< int, int > etaPhiId(const int channel) const
bool channelCorners(const std::pair< int, int > &pad, CornerArray &corners) const

◆ channelCorners() [2/2]

bool MuonPadDesign::channelCorners ( const std::pair< int, int > & pad,
CornerArray & corners ) const

Definition at line 156 of file MuonPadDesign.cxx.

156 {
157 // DG-2015-11-30: todo check whether the offset subtraction is still needed
158 int iEta = pad.first; // -1 + padEtaMin;
159 int iPhi = pad.second; // -1 + padPhiMin;
160 // bool invalid_indices = iEta<1 || iPhi<1; // DG-2015-11-30 do we still need to check this?
161 // if(invalid_indices) return false;
162 // double yBot = -0.5*Length + firstRowPos + ysFrame + iEta*inputRowPitch;
163 // double yTop = -0.5*Length + firstRowPos + ysFrame + (iEta+1)*inputRowPitch;
164
166 double yBot = 0., yTop = 0.;
167 if (iEta == 1) {
168 yBot = yCutout ? -(Size - yCutout) : -0.5 * Size;
169 yTop = yBot + firstRowPos;
170 } else if (iEta > 1) {
171 yBot = yCutout ? -(Size - yCutout) + firstRowPos + (iEta - 2) * inputRowPitch
172 : -0.5 * Size + firstRowPos + (iEta - 2) * inputRowPitch;
173 yTop = yBot + inputRowPitch;
174 if (iEta == nPadH) yTop = maxSensitiveY();
175 } else { // Unkwown ieta
176 return false;
177 }
179
180 // restrict y to the module sensitive area
181 double minY = minSensitiveY();
182 double maxY = maxSensitiveY();
183 if (yBot < minY) yBot = minY;
184 if (yTop > maxY) yTop = maxY;
185
186 // here L/R are defined as if you were looking from the IP to the
187 // detector (same a clockwise/counterclockwise phi but shorter)
188 double phiRight = firstPhiPos + (iPhi - 2) * inputPhiPitch;
189 double phiLeft = firstPhiPos + (iPhi - 1) * inputPhiPitch;
190
191 const double tanRight = std::tan(phiRight *CLHEP::degree);
192 const double tanLeft = std::tan(phiLeft *CLHEP::degree);
193 double xBotRight = -(yBot + radialDistance) * tanRight;
194 double xBotLeft = -(yBot + radialDistance) * tanLeft;
195 double xTopRight = -(yTop + radialDistance) * tanRight;
196 double xTopLeft = -(yTop + radialDistance) * tanLeft;
197
198 const double cosRight = (radialDistance + yBot) / std::hypot(xBotRight, (radialDistance + yBot));
199 const double cosLeft = (radialDistance + yBot) / std::hypot(xBotLeft, (radialDistance + yBot));
200
201 xBotRight += 1.*PadPhiShift*cosRight;
202 xBotLeft += 1.*PadPhiShift*cosLeft;
203 xTopRight += 1.*PadPhiShift*cosRight;
204 xTopLeft += 1.*PadPhiShift*cosLeft;
205
206 // For the R3 geometry converted from Phase II, we are shifting the gasgap center
207 // to the center of the gap for L3, originally defined at the cutout base.
208 // Hence, we are defining an offset, yCutoutOffset to be used in the pad corner calculations.
209 double yCutoutOffset{0.};
211 yCutoutOffset = 24.74;
212 }
213 // Adjust outer columns
214 // No staggering from fuziness in the outer edges
215 if (iPhi == 1) {
216 double yLength = yCutout ? Size - yCutout + yCutoutOffset: Size;
217 xBotRight = 0.5 * (sPadWidth + (lPadWidth - sPadWidth) * (yBot - minY) / yLength);
218 xTopRight = 0.5 * (sPadWidth + (lPadWidth - sPadWidth) * (yTop - minY) / yLength);
219 }
220 if (iPhi == nPadColumns) {
221 double yLength = yCutout ? Size - yCutout + yCutoutOffset: Size;
222 xBotLeft = -0.5 * (sPadWidth + (lPadWidth - sPadWidth) * (yBot - minY) / yLength);
223 xTopLeft = -0.5 * (sPadWidth + (lPadWidth - sPadWidth) * (yTop - minY) / yLength);
224 }
225
226 // Adjust for cutout region
227 if (yCutout && (yTop - yCutoutOffset) > 0) {
228 float cutoutXpos = 0.5 * lPadWidth;
229 if (iPhi == 1) {
230 xTopRight = cutoutXpos;
231 if (yBot - yCutoutOffset > 0) xBotRight = cutoutXpos;
232 } else if (iPhi == nPadColumns) {
233 xTopLeft = -1.0 * cutoutXpos;
234 if (yBot - yCutoutOffset > 0) xBotLeft = -1.0 * cutoutXpos;
235 }
236 }
237 if (yBot > yTop) {
238 ATH_MSG_VERBOSE("Swap top and bottom side "<<pad.first<<"/"<<pad.second);
239 std::swap(yBot, yTop);
240 }
241 if (xBotLeft > xBotRight) {
242 ATH_MSG_VERBOSE("Swap bottom left and right points "<<pad.first<<"/"<<pad.second);
243 std::swap(xBotLeft, xBotRight);
244 }
245 if (xTopLeft > xTopRight) {
246 ATH_MSG_VERBOSE("Swap top left and right points "<<pad.first<<"/"<<pad.second);
247 std::swap(xTopLeft, xTopRight);
248 }
249 corners[botLeft] = Amg::Vector2D(xBotLeft, yBot);
250 corners[botRight] = Amg::Vector2D(xBotRight, yBot);
251 corners[topLeft] = Amg::Vector2D(xTopLeft, yTop);
252 corners[topRight] = Amg::Vector2D(xTopRight, yTop);
253 return true;
254}
#define ATH_MSG_VERBOSE(x,...)
Eigen::Matrix< double, 2, 1 > Vector2D
@ iPhi
Definition ParamDefs.h:47
void swap(ElementLinkVector< DOBJ > &lhs, ElementLinkVector< DOBJ > &rhs)
setScale setgFexType iEta
double maxSensitiveY() const
highest y (local) of the sensitive volume
double minSensitiveY() const
lowest y (local) of the sensitive volume
double radialDistance
DT-2015-11-29 distance from the beamline to the center of the module.
double inputRowPitch
bool isConvertedFromPhaseII
double inputPhiPitch

◆ channelId()

int MuonGM::MuonPadDesign::channelId ( const std::pair< int, int > & padId) const
inline

Definition at line 115 of file MuonPadDesign.h.

115 {
116 return 1 + (padId.first - 1) + (padId.second - 1 ) * 18;
117 }

◆ channelNumber()

std::pair< int, int > MuonPadDesign::channelNumber ( const Amg::Vector2D & pos) const

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

Returns -1 if out of range

Definition at line 38 of file MuonPadDesign.cxx.

38 {
39 /* Changes in this package are due to new geometry implementations
40 * Correct active area position and inclusion of proper QL3 shape.
41 * coordinates (0,0) now point to the center of the active region, not gas volume
42 * for QL3, where ycutout !=0, (0,0) is at start of ycutout */
43
44 // perform check of the sensitive area
45 std::pair<int, int> result(-1, -1);
46
47 // padEta
48 double y1 = yCutout ? Size - yCutout + pos.y() : 0.5 * Size + pos.y(); // distance from small edge to hit
49 double padEtadouble;
50 int padEta = 0;
51 // padPhi
52 // To obtain the pad number of a given position, its easier to apply the
53 // pad staggering to the position instead of the pad: apply -PadPhiShift.
54 // Pad corners and positions however fully account for their staggering
55 double locPhi = std::atan(-1.0 * pos.x() / (radialDistance + pos.y())) / CLHEP::degree;
56 double maxlocPhi = std::atan(maxAbsSensitiveX(pos.y()) / (radialDistance + pos.y())) / CLHEP::degree;
57 double fuzziedX = pos.x() - 1. * PadPhiShift * std::cos(locPhi * CLHEP::degree);
58 double fuzziedlocPhi = std::atan(-1.0 * fuzziedX / (radialDistance + pos.y())) / CLHEP::degree;
59
60 bool below_half_length = (y1 < 0);
61 bool outside_phi_range = (std::abs(locPhi) > maxlocPhi) || (std::abs(fuzziedlocPhi) > maxlocPhi);
62
63 if (withinSensitiveArea(pos) && !below_half_length) {
64 if (y1 > firstRowPos) {
65 //+1 for firstRow, +1 because a remainder means another row (3.1=4)
66 padEtadouble = ((y1 - firstRowPos) / inputRowPitch) + 1 + 1;
67 padEta = padEtadouble;
68 } else if (y1 >= 0) {
69 padEta = 1;
70 }
71 double padPhidouble;
72 // These are separated as the hits on the pads closest to the side edges are not fuzzied
73 // We must do a correction in order to stay consistent with indexing
74 if (outside_phi_range)
75 padPhidouble = (locPhi - firstPhiPos) / inputPhiPitch;
76 else // Look for the index of the fuzzied hit
77 padPhidouble = (fuzziedlocPhi - firstPhiPos) / inputPhiPitch;
78 int padPhi = padPhidouble + 2; //(+1 because remainder means next column e.g. 1.1=2, +1 so rightmostcolumn=1)
79
80 // adjust indices if necessary
81 if (padEta == nPadH + 1) { padEta -= 1; } // the top row can be bigger, therefore it is really in the nPadH row.
82 if (padPhi == 0) { padPhi = 1; } // adjust rightmost
83 if (padPhi == nPadColumns + 1) { padPhi = nPadColumns; } // adjust lefmost
84
85 // final check on range
86 bool ieta_out_of_range = (padEta > nPadH + 1);
87 bool iphi_out_of_range = (padPhi < 0 || padPhi > nPadColumns + 1);
88 bool index_out_of_range = ieta_out_of_range or iphi_out_of_range;
89 if (index_out_of_range) {
90 std::stringstream sstr{};
91 if (ieta_out_of_range){
92 sstr<<__FILE__<<":"<<__LINE__<<" "<<__func__<<"() eta out of range "
93 <<Amg::toString(pos, 2)<<" (ieta, iphi) = ("<<padEta<<","<<padPhi<<").";
94 } else {
95 sstr<<__FILE__<<":"<<__LINE__<<" "<<__func__<<"() phi out of range "
96 <<Amg::toString(pos, 2)<<" (ieta, iphi) = ("<<padEta<<","<<padPhi<<").";
97 }
98 throw std::runtime_error(sstr.str());
99
100 } else {
101 result = std::make_pair(padEta, padPhi);
102 }
103 }
104 return result;
105}
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
@ locPhi
local polar
Definition ParamDefs.h:45
bool withinSensitiveArea(const Amg::Vector2D &pos) const
whether pos is within the sensitive area of the module
double maxAbsSensitiveX(const double &y) const
largest (abs, local) x of the sensitive volume

◆ channelPosition() [1/2]

bool MuonPadDesign::channelPosition ( const int channel,
Amg::Vector2D & pos ) const

Definition at line 108 of file MuonPadDesign.cxx.

108 {
109 return channelPosition(etaPhiId(channel), pos);
110}
bool channelPosition(const std::pair< int, int > &pad, Amg::Vector2D &pos) const
calculate local channel position for a given channel number

◆ channelPosition() [2/2]

bool MuonPadDesign::channelPosition ( const std::pair< int, int > & pad,
Amg::Vector2D & pos ) const

calculate local channel position for a given channel number

Definition at line 111 of file MuonPadDesign.cxx.

111 {
112 CornerArray corners{make_array<Amg::Vector2D, 4>(Amg::Vector2D::Zero())};
113 channelCorners(pad, corners);
114 pos = 0.25 * (corners[botLeft] + corners[botRight] + corners[topLeft] + corners[topRight]);
115 return true;
116}
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
Definition ArrayHelper.h:10
std::array< Amg::Vector2D, 4 > CornerArray
calculate local channel corners for a given channel number

◆ channelWidth()

double MuonGM::MuonPadDesign::channelWidth ( const Amg::Vector2D & pos,
bool measPhi,
bool preciseMeas = false ) const
inline

calculate local channel width

Definition at line 139 of file MuonPadDesign.h.

139 {
140 // get Eta and Phi indices, and corner positions of given pad
141 const std::pair<int, int>& pad = channelNumber(pos);
142 std::array<Amg::Vector2D,4> corners{make_array<Amg::Vector2D, 4>(Amg::Vector2D::Zero())};
143 channelCorners(pad, corners);
144
145 // For eta pad measurement, return height of given pad
146 if (!measPhi) return corners.at(2)[1] - corners.at(0)[1];
147
148 // Return the width at the top of the pads
149 /* This is used by default and allows for track/segment association to pads to work correctly
150 In these cases, the given position of the pad is always its centre so we can not know the
151 precise position where we want to compute the width so its best to give a larger value
152 */
153 if (!preciseMeas) return corners.at(3)[0] - corners.at(2)[0];
154
155 // Return precise Phi width for a given precise position on the pad
156 /* This is only used when the precise position of a hit, track or segment is known on the pad
157 Only to be used in specific cases, like in the digitization when we need to know the exact
158 width along a certain point in the pad, e.g. for charge sharing.
159 */
160
161 double WidthTop = corners.at(3)[0] - corners.at(2)[0];
162 double WidthBot = corners.at(1)[0] - corners.at(0)[0];
163 return WidthBot + (WidthTop - WidthBot) * (pos.y() - corners.at(0)[1]) / (corners.at(2)[1]-corners.at(0)[1]);
164 }
bool channelCorners(const std::pair< int, int > &pad, CornerArray &corners) const
std::pair< int, int > channelNumber(const Amg::Vector2D &pos) const
calculate local channel number, range 1=nstrips like identifiers.

◆ distanceToChannel()

double MuonGM::MuonPadDesign::distanceToChannel ( const Amg::Vector2D & pos,
bool measPhi,
int channel = 0 ) const
inline

distance to channel - residual

Definition at line 119 of file MuonPadDesign.h.

119 {
120 // if channel number not provided, get the nearest channel ( mostly for validation purposes )
121
122 std::pair<int, int> pad{};
123 if (channel < 1) { // retrieve nearest pad indices
124 pad = channelNumber(pos);
125 } else { // hardcode - or add a member saving idHelper max
126 pad = etaPhiId(channel);
127 }
128
129 Amg::Vector2D chPos{Amg::Vector2D::Zero()};
130 if (!channelPosition(pad, chPos)) return -10000.;
131
132 if (!measPhi) return (pos.y() - chPos.y());
133
134 // the "phi" distance to be compared with channel width (taking into account the stereo angle)
135
136 return (pos.x() - chPos.x());
137 }
bool channelPosition(const std::pair< int, int > &pad, Amg::Vector2D &pos) const
calculate local channel position for a given channel number
std::pair< int, int > etaPhiId(const int channel) const

◆ distanceToPad()

In terms of y the hit could be in the pad

Hit is inside the pad

Definition at line 117 of file MuonPadDesign.cxx.

117 {
118 CornerArray corners{make_array<Amg::Vector2D, 4>(Amg::Vector2D::Zero())};
119 channelCorners(channel, corners);
120
121 Amg::Vector2D leftEdge = corners[topLeft] - corners[botLeft];
122 const double lenLeft = std::hypot(leftEdge.x(), leftEdge.y());
123 leftEdge /= lenLeft;
124 const double leftIsect = Amg::intersect<2>(pos, Amg::Vector2D::UnitX(),
125 corners[botLeft], leftEdge).value_or(1.e9);
126
127 const Amg::Vector2D leftPad = corners[botLeft] + leftIsect * leftEdge;
128 const Amg::Vector2D rightPad = corners[botRight] + leftIsect * (corners[topRight] - corners[botRight]).unit();
129 const double deltaX = pos.x() - leftPad.x();
130 const double lenX = rightPad.x() - leftPad.x();
131
133 if (leftIsect >= 0. && leftIsect <= lenLeft) {
135 if (deltaX >= 0. && deltaX < lenX) {
136 return Amg::Vector2D::Zero();
137 } else if (deltaX < 0.) {
138 return deltaX * Amg::Vector2D::UnitX();
139 }
140 return (deltaX - lenX) * Amg::Vector2D::UnitX();
141 }
142 if (deltaX > 0. && deltaX < lenX) {
143 return (leftIsect < 0 ? corners[botRight].y() - pos.y()
144 : pos.y() - corners[topRight].y())* Amg::Vector2D::UnitY();
145 }
146 return (leftIsect < 0 ? corners[botRight].y() - pos.y()
147 : pos.y() - corners[topRight].y())* Amg::Vector2D::UnitY() +
148 (deltaX < 0. ? deltaX : (deltaX - lenX) )* Amg::Vector2D::UnitX();
149
150}
detray::unit< scalar_t > unit
#define y
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.

◆ etaPhiId()

std::pair< int, int > MuonGM::MuonPadDesign::etaPhiId ( const int channel) const
inline

Definition at line 112 of file MuonPadDesign.h.

112 {
113 return std::make_pair( ((channel -1) % 18) + 1, ( (channel -1) / 18) + 1);
114 }

◆ gasGapThickness()

double MuonGM::MuonPadDesign::gasGapThickness ( ) const
inline

thickness of gas gap

Definition at line 166 of file MuonPadDesign.h.

166{ return thickness; }

◆ 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 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)
int outputLevel(const IMessageSvc *ims, const std::string &source)

◆ maxAbsSensitiveX()

double MuonPadDesign::maxAbsSensitiveX ( const double & y) const

largest (abs, local) x of the sensitive volume

Definition at line 26 of file MuonPadDesign.cxx.

26 {
27 double half_openingAngle = sectorOpeningAngle / 2.0;
28 if (isLargeSector && yCutout) { // if QL3
29 if (y > 0) // In cutout region
30 return 0.5 * lPadWidth;
31 else
32 return y * std::tan(half_openingAngle * CLHEP::degree) + 0.5 * lPadWidth;
33 }
34 return (y - Size * 0.5) * std::tan(half_openingAngle * CLHEP::degree) + 0.5 * lPadWidth;
35
36}
double sectorOpeningAngle

◆ maxSensitiveY()

double MuonPadDesign::maxSensitiveY ( ) const

highest y (local) of the sensitive volume

Definition at line 24 of file MuonPadDesign.cxx.

24{ return yCutout ? yCutout : 0.5 * Size; }

◆ minSensitiveY()

double MuonPadDesign::minSensitiveY ( ) const

lowest y (local) of the sensitive volume

Definition at line 22 of file MuonPadDesign.cxx.

22{ return yCutout ? -(Size - yCutout) : -0.5 * Size; }

◆ 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 167 of file AthMessaging.h.

168{
169 MsgStream* ms = m_msg_tls.get();
170 if (!ms) {
171 if (!m_initialized.test_and_set()) initMessaging();
172 ms = new MsgStream(m_imsg,m_nm);
173 m_msg_tls.reset( ms );
174 }
175
176 ms->setLevel (m_lvl);
177 return *ms;
178}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels).
void initMessaging() const
Initialize our message level and MessageSvc.

◆ 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 182 of file AthMessaging.h.

183{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ 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 user did not set explicit message level we have to initialize
154 // the messaging and retrieve the default via the MessageSvc.
155 if (m_lvl==MSG::NIL && !m_initialized.test_and_set()) initMessaging();
156
157 if (m_lvl <= lvl) {
158 msg() << lvl;
159 return true;
160 } else {
161 return false;
162 }
163}

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

◆ setR()

void MuonGM::MuonPadDesign::setR ( double R)
inline

access to cache

Definition at line 109 of file MuonPadDesign.h.

109{ this->radialDistance = R; }
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)

◆ withinSensitiveArea()

whether pos is within the sensitive area of the module

Definition at line 13 of file MuonPadDesign.cxx.

13 {
14 double top_H1 = maxSensitiveY();
15 double bot_H2 = minSensitiveY();
16 double max_x = maxAbsSensitiveX(pos.y());
17 bool y_in_range = (pos.y() <= top_H1 and pos.y() >= bot_H2);
18 bool x_in_range = std::abs(pos.x()) <= max_x + 0.01;
19 return y_in_range and x_in_range;
20}

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.

◆ etasign

Definition at line 65 of file MuonPadDesign.h.

65{0};

◆ firstPhiPos

Definition at line 47 of file MuonPadDesign.h.

47{0.};

◆ firstRowPos

Definition at line 46 of file MuonPadDesign.h.

46{0.};

◆ inputPhiPitch

Definition at line 44 of file MuonPadDesign.h.

44{0.};

◆ inputRowPitch

Definition at line 43 of file MuonPadDesign.h.

43{0.};

◆ isConvertedFromPhaseII

Definition at line 68 of file MuonPadDesign.h.

68{false};

◆ isLargeSector

Definition at line 66 of file MuonPadDesign.h.

66{0};

◆ largeSectorOpeningAngle

double MuonGM::MuonPadDesign::largeSectorOpeningAngle {28.0}
staticconstexpr

Definition at line 69 of file MuonPadDesign.h.

69{28.0};

◆ Length

Definition at line 49 of file MuonPadDesign.h.

49{0.};

◆ lPadWidth

Definition at line 57 of file MuonPadDesign.h.

57{0.};

◆ lWidth

Definition at line 51 of file MuonPadDesign.h.

51{0.};

◆ m_imsg

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

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_lvl

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

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

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

◆ nPadColumns

Definition at line 63 of file MuonPadDesign.h.

63{0};

◆ nPadH

Definition at line 62 of file MuonPadDesign.h.

62{0};

◆ padEtaMax

Definition at line 41 of file MuonPadDesign.h.

41{0};

◆ padEtaMin

Definition at line 40 of file MuonPadDesign.h.

40{0};

◆ PadPhiShift

Definition at line 64 of file MuonPadDesign.h.

64{0.};

◆ radialDistance

DT-2015-11-29 distance from the beamline to the center of the module.

Definition at line 54 of file MuonPadDesign.h.

54{0.};

◆ sectorOpeningAngle

Definition at line 67 of file MuonPadDesign.h.

67{0.};

◆ signY

Definition at line 45 of file MuonPadDesign.h.

45{0.};

◆ Size

Definition at line 52 of file MuonPadDesign.h.

52{0.};

◆ smallSectorOpeningAngle

double MuonGM::MuonPadDesign::smallSectorOpeningAngle {17.0}
staticconstexpr

Definition at line 70 of file MuonPadDesign.h.

70{17.0};

◆ sPadWidth

Definition at line 56 of file MuonPadDesign.h.

56{0.};

◆ sWidth

Definition at line 50 of file MuonPadDesign.h.

50{0.};

◆ thickness

Definition at line 53 of file MuonPadDesign.h.

53{0.};

◆ xFrame

Definition at line 58 of file MuonPadDesign.h.

58{0.};

◆ yCutout

Definition at line 61 of file MuonPadDesign.h.

61{0.};

◆ ylFrame

Definition at line 60 of file MuonPadDesign.h.

60{0.};

◆ ysFrame

Definition at line 59 of file MuonPadDesign.h.

59{0.};

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