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

#include <MdtReadoutElement.h>

Inheritance diagram for MuonGMR4::MdtReadoutElement:
Collaboration diagram for MuonGMR4::MdtReadoutElement:

Classes

struct  defineArgs
 
struct  parameterBook
 Set of parameters to describe a MDT chamber. More...
 

Public Member Functions

 MdtReadoutElement (defineArgs &&args)
 
virtual ~MdtReadoutElement ()
 
const parameterBookgetParameters () const
 
ActsTrk::DetectorType detectorType () const override final
 Overload from the ActsTrk::IDetectorElement. More...
 
double thickness () const override final
 Overload from the Acts::DetectorElement (2 * halfheight) More...
 
StatusCode initElement () override final
 Element initialization. More...
 
unsigned int multilayer () const
 Returns the multi layer of the MdtReadoutElement. More...
 
unsigned int numLayers () const
 Returns the number of tube layer. More...
 
unsigned int numTubesInLay () const
 Returns the number of tubes per layer. More...
 
IdentifierHash measurementHash (const Identifier &measId) const override final
 Constructs the identifier hash from the full measurement Identifier. More...
 
IdentifierHash layerHash (const Identifier &measId) const override final
 Transforms the Identifier into the layer hash. More...
 
Identifier measurementId (const IdentifierHash &measHash) const override final
 Converts the measurement hash back to the full Identifier. More...
 
bool isValid (const IdentifierHash &measHash) const
 
bool isBarrel () const
 States whether the chamber is built into the barrel or not. More...
 
double tubePitch () const
 Returns the pitch between 2 tubes in a layer. More...
 
double innerTubeRadius () const
 Returns the inner tube radius. More...
 
double tubeRadius () const
 Adds the thickness of the tube wall onto the radius. More...
 
double moduleWidthS () const
 Returns the length of the bottom edge of the chamber (short width) More...
 
double moduleWidthL () const
 Returns the length of the top edge of the chamber (top width) More...
 
double moduleHeight () const
 Returns the height of the chamber (Distance bottom - topWidth) More...
 
double moduleThickness () const
 Returns the thickness of the chamber. More...
 
Amg::Vector3D globalTubePos (const ActsGeometryContext &ctx, const Identifier &measId) const
 Returns the global position of the tube center. More...
 
Amg::Vector3D globalTubePos (const ActsGeometryContext &ctx, const IdentifierHash &hash) const
 
Amg::Vector3D readOutPos (const ActsGeometryContext &ctx, const Identifier &measId) const
 Returns the global position of the readout card. More...
 
Amg::Vector3D readOutPos (const ActsGeometryContext &ctx, const IdentifierHash &measId) const
 
Amg::Vector3D highVoltPos (const ActsGeometryContext &ctx, const Identifier &measId) const
 Returns the global position of the High Voltage connectors. More...
 
Amg::Vector3D highVoltPos (const ActsGeometryContext &ctx, const IdentifierHash &measId) const
 
double distanceToReadout (const ActsGeometryContext &ctx, const Identifier &measId, const Amg::Vector3D &globPoint) const
 Returns the distance along the wire from the readout card The distance is given as the delta z of the readout card in the local tube frame. More...
 
double distanceToReadout (const ActsGeometryContext &ctx, const IdentifierHash &measHash, const Amg::Vector3D &globPoint) const
 
double distanceToReadout (const IdentifierHash &measHash, const Amg::Vector3D &localPoint) const
 Returns the distance to the readout assuming that the parsed point is expressed in the local coordinate system of the tube. More...
 
double activeTubeLength (const IdentifierHash &hash) const
 
double tubeLength (const IdentifierHash &hash) const
 
double wireLength (const IdentifierHash &hash) const
 
double uncutTubeLength (const IdentifierHash &tubeHash) const
 Returns the uncut tube length. More...
 
void setComplementaryReadoutEle (const MdtReadoutElement *other)
 Set the link to the second readout element inside the muon station. More...
 
Amg::Vector3D bLineReferencePoint () const
 Returns the fixed point of the B-line & as-bult defromation model expressed in the as-built frame. More...
 
Amg::Vector3D localTubePos (const IdentifierHash &hash) const
 Returns the tube position in the chamber coordinate frame (Not applying the B-line corrections) More...
 
const GeoAlignableTransform * alignableTransform () const
 Returnsthe alignable transform of the readout element. More...
 
Identifier identify () const override final
 Return the athena identifier. More...
 
IdentifierHash identHash () const
 Returns the Identifier has of the Element that is Identical to the detElHash from the id_helper class. More...
 
int stationName () const
 Returns the stationName (BIS, BOS, etc) encoded into the integer. More...
 
int stationEta () const
 Returns the stationEta (positive A site, negative O site) More...
 
int stationPhi () const
 Returns the stationPhi (1-8) -> sector (2*phi - (isSmall)) More...
 
Muon::MuonStationIndex::ChIndex chamberIndex () const
 Returns the chamber index of the Identifier (MMS & STS) have the same chamber Index (EIS) More...
 
const std::string & chamberDesign () const
 The chamber design refers to the construction parameters of a readout element. More...
 
const Muon::IMuonIdHelperSvcidHelperSvc () const
 Returns the pointer to the muonIdHelperSvc. More...
 
Amg::Vector3D center (const ActsGeometryContext &ctx) const
 Returns the detector center (Which is the same as the detector center of the first measurement layer) More...
 
Amg::Vector3D center (const ActsGeometryContext &ctx, const Identifier &id) const
 Returns the center of a given detector layer using the complete Identifier of the measurement. More...
 
Amg::Vector3D center (const ActsGeometryContext &ctx, const IdentifierHash &hash) const
 Returns the center of a given detector layer using the Identifier hash of the measurement. More...
 
Amg::Transform3D globalToLocalTrans (const ActsGeometryContext &ctx) const
 Transformations to translate between local <-> global coordinates. More...
 
Amg::Transform3D globalToLocalTrans (const ActsGeometryContext &ctx, const Identifier &id) const
 Returns the global to local transformation into the rest frame of a given measurement layer. More...
 
Amg::Transform3D globalToLocalTrans (const ActsGeometryContext &ctx, const IdentifierHash &hash) const
 Returns the global to local transformation into the rest frame of a given measurement layer. More...
 
const Amg::Transform3DlocalToGlobalTrans (const ActsGeometryContext &ctx) const
 Returns the local to global transformation into the ATLAS coordinate system. More...
 
const Amg::Transform3DlocalToGlobalTrans (const ActsGeometryContext &ctx, const Identifier &id) const
 
const Amg::Transform3DlocalToGlobalTrans (const ActsGeometryContext &ctx, const IdentifierHash &id) const
 
const Amg::Transform3Dtransform (const Acts::GeometryContext &gctx) const override final
 Returns the transformation to the origin of the chamber coordinate system. More...
 
const Acts::Surface & surface () const override final
 Returns the surface associated to the readout element plane. More...
 
Acts::Surface & surface () override final
 
const Acts::Surface & surface (const IdentifierHash &hash) const
 Returns the sufrface associated to a wire / measurement plane in the detector. More...
 
Acts::Surface & surface (const IdentifierHash &hash)
 
std::shared_ptr< Acts::Surface > surfacePtr (const IdentifierHash &hash) const
 Returns the pointer associated to a certain wire / plane. More...
 
void setChamberLink (const Chamber *chamber)
 Sets the link to the enclosing chamber. More...
 
void setSectorLink (const SpectrometerSector *envelope)
 Set the link to the enclosing sector envelope. More...
 
const SpectrometerSectormsSector () const
 Returns the pointer to the envelope volume enclosing all chambers in the sector. More...
 
const Chamberchamber () const
 Returns the pointer to the chamber enclosing this readout element. More...
 
std::vector< std::shared_ptr< Acts::Surface > > getSurfaces () const
 Returns all surfaces that are associated with the active readout planes. More...
 
void releaseUnAlignedTrfs () const
 Releases all cached transforms that are not connected with alignment. More...
 
unsigned int storeAlignedTransforms (const ActsTrk::DetectorAlignStore &store) const override final
 Caches the aligned transformation in the provided store. Returns the number of cached elements. 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...
 

Static Public Member Functions

static unsigned int tubeNumber (const IdentifierHash &hash)
 Transforms the idenfier hash into a tube number ranging from (0- numTubesInLay()-1) More...
 
static unsigned int layerNumber (const IdentifierHash &hash)
 Transforms the identifier hash into a layer number ranging from (0-numLayers()-1) More...
 
static IdentifierHash measurementHash (unsigned int layerNumber, unsigned int tubeNumber)
 Transform the layer and tube number to the measurementHash. More...
 
static IdentifierHash layerHash (const IdentifierHash &measHash)
 

Protected Member Functions

const Amg::Transform3DtoStation (const ActsTrk::DetectorAlignStore *alignStore) const
 Returns the local -> global transformation to go from the volume center origin. More...
 
template<class MuonDetImpl >
StatusCode insertTransform (const IdentifierHash &hash)
 Inserts a transfomration for caching. More...
 
StatusCode createGeoTransform ()
 
StatusCode strawSurfaceFactory (const IdentifierHash &hash, std::shared_ptr< Acts::LineBounds > lBounds)
 
StatusCode planeSurfaceFactory (const IdentifierHash &hash, std::shared_ptr< Acts::PlanarBounds > pBounds)
 

Static Protected Member Functions

static IdentifierHash geoTransformHash ()
 Returns the hash that is associated with the surface cache holding the transformation that is placing the ReadoutElement inside the ATLAS coordinate system. More...
 

Private Types

using tubeSide_t = MdtAsBuiltPar::tubeSide_t
 Moves the wire endpoints according to the as-built model. More...
 
using TransformCacheMap = std::unordered_map< IdentifierHash, std::unique_ptr< ActsTrk::TransformCache > >
 Cache all local to global transformations. More...
 

Private Member Functions

Amg::Transform3D toChamberLayer (const IdentifierHash &hash) const
 Returns the transformation into the rest frame of the tube x-axis: Pointing towards the next layer y-axis: Pointing parallel to the wire layer z-axis: Pointing along the wire. More...
 
Amg::Transform3D toTubeFrame (const IdentifierHash &hash) const
 Returns the transformation into the rest frame of the tube x-axis: Pointing towards the next layer y-axis: Pointing parallel to the wire layer z-axis: Pointing along the wire. More...
 
Amg::Transform3D fromIdealToDeformed (const IdentifierHash &tubeHash, const ActsTrk::DetectorAlignStore *store) const
 Applies the B & as-built parameters. More...
 
Amg::Vector3D wireEndpointAsBuilt (const MdtAsBuiltPar &asBuilt, const IdentifierHash &tubeHash, const Amg::Vector3D &nominalEnd, const tubeSide_t side) const
 
Amg::Vector3D applyBlineCorrections (const BLinePar &bline, const Amg::Vector3D &localTubeEndPoint, const Amg::Vector3D &fixedPoint, const double thickness) const
 Apply the B-line model correction to a tube endpoint. More...
 
Amg::Transform3D asBuiltRefFrame () const
 Returns the transformation to go into the reference frame of the as-buit & b-line model starting from the readout element frame. More...
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

parameterBook m_pars {}
 defining parameter set More...
 
const MdtIdHelperm_idHelper {idHelperSvc()->mdtIdHelper()}
 Detector identifier helper to quickly extract the ID fields. More...
 
int m_stML {m_idHelper.multilayer(identify())}
 Identifier index of the multilayer (1-2) More...
 
bool m_isBarrel {m_idHelper.isBarrel(identify())}
 Flag defining whether the chamber is barrel or not. More...
 
const MdtReadoutElementm_reOtherMl {this}
 Complementary readout element. More...
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {"Muon::MuonIdHelperSvc/MuonIdHelperSvc", "MuonReadoutElement"}
 
const defineArgs m_args {}
 
IdentifierHash m_detElHash {}
 Cache of the detector element hash. More...
 
Muon::MuonStationIndex::ChIndex m_chIdx {Muon::MuonStationIndex::ChIndex::ChUnknown}
 Cache the chamber index of the Identifier. More...
 
int m_stName {-1}
 Cache the station name of the identifier. More...
 
int m_stEta {-1}
 Cache the station eta of the identifier. More...
 
int m_stPhi {-1}
 Cache the station phi of the identifier. More...
 
TransformCacheMap m_localToGlobalCaches
 
ActsTrk::SurfaceCacheSet m_surfaces
 Cache of all associated surfaces. More...
 
const SpectrometerSectorm_msSectorLink {}
 Pointer to the associated MS-sector & MuonChamber. More...
 
const Chamberm_chambLink {nullptr}
 
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 22 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h.

Member Typedef Documentation

◆ TransformCacheMap

using MuonGMR4::MuonReadoutElement::TransformCacheMap = std::unordered_map<IdentifierHash, std::unique_ptr<ActsTrk::TransformCache> >
privateinherited

Cache all local to global transformations.

Definition at line 210 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h.

◆ tubeSide_t

Moves the wire endpoints according to the as-built model.

Parameters
asBuiltAs-built model parameters
tubeHashMeasurement hash of the considered tube
nominalEndTube end of a nominally uncut tube
sideDoes the end represent positive or negative z

Definition at line 218 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h.

Constructor & Destructor Documentation

◆ MdtReadoutElement()

MuonGMR4::MdtReadoutElement::MdtReadoutElement ( defineArgs &&  args)

◆ ~MdtReadoutElement()

MuonGMR4::MdtReadoutElement::~MdtReadoutElement ( )
virtualdefault

Member Function Documentation

◆ activeTubeLength()

double MuonGMR4::MdtReadoutElement::activeTubeLength ( const IdentifierHash hash) const

Definition at line 173 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

173  {
174  const unsigned int layer = layerNumber(hash);
175  const unsigned int tube = tubeNumber(hash);
176  const MdtTubeLayer& zeroT{*m_pars.tubeLayers[layer]};
177  return 2. * zeroT.tubeHalfLength(tube);
178 }

◆ alignableTransform()

const GeoAlignableTransform* MuonGMR4::MuonReadoutElement::alignableTransform ( ) const
inherited

Returnsthe alignable transform of the readout element.

◆ applyBlineCorrections()

Amg::Vector3D MuonGMR4::MdtReadoutElement::applyBlineCorrections ( const BLinePar bline,
const Amg::Vector3D localTubeEndPoint,
const Amg::Vector3D fixedPoint,
const double  thickness 
) const
private

Apply the B-line model correction to a tube endpoint.

Parameters
blineSet of b-line parameters
localTubeEndPointEndpoint of the tube to correct
fixedPointPoint in the chamber that's invariant in the b-line model
thicknessThickness of the two multilayers

Definition at line 296 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

299  {
300 
301  using Parameter = BLinePar::Parameter;
302  Amg::Vector3D deformedPos{localTubeEndPoint};
303  // MDT deformations like tube bow: bz,bp,bn bend the tube while the wire endpoints are not affected
304  // => the wire keeps it's nominal straight line trajectory but it is not concentric to the tube
305  // ==> in this function bz, bp and bn are ignored or set to 0
306  // MDT deformations that extend/contract the wire longitudinally (while keeping it straight):
307  // delta_s from eg and tr are irrelevant for the tube geometry
308  // and for the wire trajectory => set to 0 here
309  // (should be applied as a correction to the
310  // tube lenght => tube surface bounds
311  // =++>>>> effect in tracking just through the gravitational sagging TOTALLY NEGLIGIBLE=> ignore)
312  // pg is irrelevant for tracking purposes and (at least for the endcaps) is applies to the internal bars only, not to the tubes !!!
313  // =++>>>> IGNORE IT
314  // ep,en: bend the tube by moving (differently) the endplugs ===> the wire straight trajectory is moved w.r.t. the nominal one
315  // in addition the tubes keep their nominal position at the center => the wire is not concentric to
316  // the tube delta_s from ep,en must also be considered for the implementation of the realistic tube
317  // trajectory induced by ep,en
318  // tw,sp,sn,pg (for deltaT and deltaZ) are geometrical effects, that impact on tracking and keep the wire straight.
319  const double chamberHeight = std::max(moduleHeight(), m_reOtherMl->moduleHeight());
320 
321 
322  // NOTE s0,z0,t0 are the coord. in the amdb frame of this point: the origin of the frame can be different than the fixed point for
323  // deformations s0mdt,z0mdt,t0mdt
324  // (always equal to the point at lowest t,z and s=0 of the MDT stack)
325  double s0 = deformedPos.x();
326  double z0 = deformedPos.y();
327  double t0 = deformedPos.z();
328  ATH_MSG_VERBOSE( "** In "<<__func__<<" - moduleWidthS, moduleWidthL(), length, thickness, " << moduleWidthS() << " " << moduleWidthL()
329  << " " << chamberHeight << " " << chamberThickness << " " );
330  ATH_MSG_VERBOSE( "** In "<<__func__<<" - going to correct for B-line the position of Point at " << Amg::toString(deformedPos));
331 
332  double s0mdt = s0; // always I think !
333  if (std::abs(fixedPoint.x()) > 0.01) s0mdt = s0 - fixedPoint.x();
334  double z0mdt = z0; // unless in the D section of this station there's a dy diff. from 0 for the innermost MDT multilayer (sometimes
335  // in the barrel)
336  // unless in the D section of this station there's a dz diff. from 0 for the innermost MDT multilayer (often in barrel)
337  if (std::abs(fixedPoint.y()) > 0.01) z0mdt = z0 - fixedPoint.y();
338  double t0mdt = t0;
339  if (std::abs(fixedPoint.z()) > 0.01) t0mdt = t0 - fixedPoint.z();
340  if (z0mdt < 0 || t0mdt < 0) {
341  ATH_MSG_WARNING(""<<__func__<<": correcting the local position of a point outside the mdt station (2 multilayers) volume -- RE "
342  << idHelperSvc()->toStringDetEl(identify()) << " local point: szt=" << s0 << " " << z0 << " " << t0
343  << " fixedPoint " <<Amg::toString(fixedPoint) );
344  }
345  ATH_MSG_VERBOSE( "** In "<<__func__<<" - correct for offset of B-line fixed point " << s0mdt << " " << z0mdt << " " << t0mdt);
346 
347  const double width_actual = moduleWidthS() + (moduleWidthL() - moduleWidthS()) * (z0mdt / chamberHeight);
348  const double s_rel = s0mdt / (width_actual / 2.);
349  const double z_rel = (z0mdt - chamberHeight / 2.) / (chamberHeight / 2.);
350  const double t_rel = (t0mdt - chamberThickness / 2.) / (chamberThickness / 2.);
351 
352  ATH_MSG_VERBOSE( "** In "<<__func__<<" - width_actual, s_rel, z_rel, t_rel " << width_actual << " " << s_rel << " "
353  << z_rel << " " << t_rel );
354  double ds{0.},dz{0.},dt{0.};
355 
356  // sp, sn - cross plate sag out of plane
357  if ( bline.getParameter(Parameter::sp) || bline.getParameter(Parameter::sn)) {
358  double ztmp = z_rel * z_rel - 1;
359  dt += 0.5 * (bline.getParameter(Parameter::sp) + bline.getParameter(Parameter::sn)) * ztmp
360  + 0.5 * (bline.getParameter(Parameter::sp) - bline.getParameter(Parameter::sn)) * ztmp * s_rel;
361  }
362 
363  // tw - twist
364  if (bline.getParameter(Parameter::tw)) {
365  dt -= bline.getParameter(Parameter::tw) * s_rel * z_rel;
366  dz += bline.getParameter(Parameter::tw) * s_rel * t_rel * chamberThickness / chamberHeight;
367  ATH_MSG_VERBOSE( "** In "<<__func__<<": tw=" << bline.getParameter(Parameter::tw) << " dt, dz " << dt << " " << dz );
368  }
369 
370  constexpr double expansionScale = BLinePar::expansionScale;
371  // eg - global expansion
372  if (bline.getParameter(Parameter::eg)) {
373  double egppm = bline.getParameter(Parameter::eg) * expansionScale;
374  ds += 0.;
375  dz += z0mdt * egppm;
376  dt += t0mdt * egppm;
377  }
378 
379  // ep, en - local expansion
380  //
381  // Imporant note: the chamber height and length, as they denoted in Christoph's talk,
382  // correspond to thickness and height parameters of this function;
383  //
384 
385  if (bline.getParameter(Parameter::ep) || bline.getParameter(Parameter::en)) {
386  const double ep = bline.getParameter(Parameter::ep) * expansionScale;
387  const double en = bline.getParameter(Parameter::en) * expansionScale;
388  const double phi = 0.5 * (ep + en) * s_rel * s_rel + 0.5 * (ep - en) * s_rel;
389  const double localDt = phi * (t0mdt - chamberThickness / 2.);
390  const double localDz = phi * (z0mdt - chamberHeight / 2.);
391  dt += localDt;
392  dz += localDz;
393  }
394 
395  ATH_MSG_VERBOSE( "posOnDefChamStraighWire: ds,z,t = " << ds << " " << dz << " " << dt );
396  deformedPos[0] = s0 + ds;
397  deformedPos[1] = z0 + dz;
398  deformedPos[2] = t0 + dt;
399 
400 
401  return deformedPos;
402 }

◆ asBuiltRefFrame()

Amg::Transform3D MuonGMR4::MdtReadoutElement::asBuiltRefFrame ( ) const
private

Returns the transformation to go into the reference frame of the as-buit & b-line model starting from the readout element frame.

Definition at line 211 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

211  {
212  return alignableTransform()->getDefTransform().inverse()*
213  getMaterialGeom()->getParent()->getX() *
214  getMaterialGeom()->getX();
215 }

◆ bLineReferencePoint()

Amg::Vector3D MuonGMR4::MdtReadoutElement::bLineReferencePoint ( ) const

Returns the fixed point of the B-line & as-bult defromation model expressed in the as-built frame.

Definition at line 217 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

217  {
218  /* The fix point is the point that's closest to the interaction point.
219  / Recall that the readout element origin is expressed in the geometric centre &
220  the x-axis points upwards. The point is then transformed into the Muon station frame */
221  const MdtReadoutElement* refEle{multilayer() == 1 ? this : m_reOtherMl};
222  return refEle->asBuiltRefFrame()*(-0.5*( refEle->moduleThickness() *Amg::Vector3D::UnitX() +
223  (stationEta() >0 || !isBarrel() ? 1. : -1.)*refEle->moduleHeight() * Amg::Vector3D::UnitZ()));
224 }

◆ center() [1/3]

Amg::Vector3D MuonGMR4::MuonReadoutElement::center ( const ActsGeometryContext ctx) const
inherited

Returns the detector center (Which is the same as the detector center of the first measurement layer)

◆ center() [2/3]

Amg::Vector3D MuonGMR4::MuonReadoutElement::center ( const ActsGeometryContext ctx,
const Identifier id 
) const
inherited

Returns the center of a given detector layer using the complete Identifier of the measurement.

◆ center() [3/3]

Amg::Vector3D MuonGMR4::MuonReadoutElement::center ( const ActsGeometryContext ctx,
const IdentifierHash hash 
) const
inherited

Returns the center of a given detector layer using the Identifier hash of the measurement.

◆ chamber()

const Chamber* MuonGMR4::MuonReadoutElement::chamber ( ) const
inherited

Returns the pointer to the chamber enclosing this readout element.

◆ chamberDesign()

const std::string& MuonGMR4::MuonReadoutElement::chamberDesign ( ) const
inherited

The chamber design refers to the construction parameters of a readout element.

Used for the retrieval of the chamber parameters E.g. the chambers BOL1A8 & BOL2A8 are identical in terms of number of tubes, dimensions etc.

◆ chamberIndex()

Muon::MuonStationIndex::ChIndex MuonGMR4::MuonReadoutElement::chamberIndex ( ) const
inherited

Returns the chamber index of the Identifier (MMS & STS) have the same chamber Index (EIS)

◆ createGeoTransform()

StatusCode MuonGMR4::MuonReadoutElement::createGeoTransform ( )
protectedinherited

Check that the alignable node has been assigned

Definition at line 36 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

36  {
38  if(!alignableTransform()) {
39  ATH_MSG_FATAL("The readout element "<<idHelperSvc()->toStringDetEl(identify())<<" has no assigned alignable node");
40  return StatusCode::FAILURE;
41  }
42  return insertTransform<MuonReadoutElement>(geoTransformHash());
43 }

◆ detectorType()

ActsTrk::DetectorType MuonGMR4::MdtReadoutElement::detectorType ( ) const
inlinefinaloverridevirtual

◆ distanceToReadout() [1/3]

double MuonGMR4::MdtReadoutElement::distanceToReadout ( const ActsGeometryContext ctx,
const Identifier measId,
const Amg::Vector3D globPoint 
) const

Returns the distance along the wire from the readout card The distance is given as the delta z of the readout card in the local tube frame.

◆ distanceToReadout() [2/3]

double MuonGMR4::MdtReadoutElement::distanceToReadout ( const ActsGeometryContext ctx,
const IdentifierHash measHash,
const Amg::Vector3D globPoint 
) const

Definition at line 191 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

193  {
194  return distanceToReadout(measHash, globalToLocalTrans(ctx, measHash) * globPoint);
195 
196 }

◆ distanceToReadout() [3/3]

double MuonGMR4::MdtReadoutElement::distanceToReadout ( const IdentifierHash measHash,
const Amg::Vector3D localPoint 
) const

Returns the distance to the readout assuming that the parsed point is expressed in the local coordinate system of the tube.

I.e. the wire points along the z-axis

Parameters
measHashIdentifierHash of the tube
localPointExternal local point inside the tube (No check is made whether that's the case).

The position of the readout chip is at the negative tube side

Definition at line 197 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

198  {
200  const unsigned int layer = layerNumber(measHash);
201  const unsigned int tube = tubeNumber(measHash);
202  const MdtTubeLayer& zeroT{*m_pars.tubeLayers[layer]};
203  const double readOutPos = m_pars.readoutSide * zeroT.tubeHalfLength(tube);
204  return std::abs(readOutPos - localPoint.z());
205 }

◆ fromIdealToDeformed()

Amg::Transform3D MuonGMR4::MdtReadoutElement::fromIdealToDeformed ( const IdentifierHash tubeHash,
const ActsTrk::DetectorAlignStore store 
) const
private

Applies the B & as-built parameters.

No deformation parameters were parsed at all

No deformation parameters were stored for this particular readout element

Relative sign to calculate the thickness. If multilayer == 1, we want the lower point and the upper point otherwise.

Move the tube into the center

Apply as-built correction

Switch tube ends back to MGM coordinates

Definition at line 404 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

405  {
406 
408  if (!store || !store->internalAlignment) {
409  ATH_MSG_VERBOSE("No deformed transformation available "<<idHelperSvc()->toString(measurementId(tubeHash)));
410 
411  return Amg::Transform3D::Identity();
412  }
413 #ifdef SIMULATIONBASE
414  return Amg::Transform3D::Identity();
415 #else
416  using ChamberDistortions = MdtAlignmentStore::chamberDistortions;
417 
419  const ChamberDistortions distortPars = static_cast<const MdtAlignmentStore&>(*store->internalAlignment).getDistortion(identify());
420  if (!distortPars) {
421  ATH_MSG_VERBOSE("No set of deformation parameters is in the DB for "<<idHelperSvc()->toString(measurementId(tubeHash)));
422  return Amg::Transform3D::Identity();
423  }
424 
425  const Amg::Vector3D fixedPoint{bLineReferencePoint()};
426 
427 
428  const double height = std::max(moduleHeight(), m_reOtherMl->moduleHeight()) -
429  (tubePitch() - 2. * tubeRadius());
430 
431  const Amg::Transform3D toAMDB{asBuiltRefFrame()};
434  const double relSign = (multilayer() == 1 ? -1. : 1.);
435  const double modHalfThick{0.5*relSign*moduleThickness()},
436  modHalTHickO{-0.5*relSign*m_reOtherMl->moduleThickness()};
437 
438  const double thickness = relSign*( (toAMDB* (modHalfThick*Amg::Vector3D::UnitX())) -
439  (m_reOtherMl->asBuiltRefFrame()*(modHalTHickO* Amg::Vector3D::UnitX()))).z();
440 
441 
442  Amg::Vector3D idealTube = localTubePos(tubeHash);
444  idealTube[Amg::y] = 0.;
445 
446  Amg::Vector3D positiveEnd = toAMDB * (idealTube + 0.5 * uncutTubeLength(tubeHash) * Amg::Vector3D::UnitY());
447  Amg::Vector3D negativeEnd = toAMDB * (idealTube - 0.5 * uncutTubeLength(tubeHash) * Amg::Vector3D::UnitY());
449  if (distortPars.asBuilt) {
450  positiveEnd = wireEndpointAsBuilt(*distortPars.asBuilt, tubeHash, positiveEnd, tubeSide_t::POS);
451  negativeEnd = wireEndpointAsBuilt(*distortPars.asBuilt, tubeHash, negativeEnd, tubeSide_t::NEG);
452  }
453  Amg::Vector3D positiveEndBline{positiveEnd};
454  Amg::Vector3D negativeEndBline{negativeEnd};
455  if (distortPars.bLine) {
456  positiveEndBline = applyBlineCorrections(*distortPars.bLine, positiveEndBline, fixedPoint, thickness);
457  negativeEndBline = applyBlineCorrections(*distortPars.bLine, negativeEndBline, fixedPoint, thickness);
458  }
459 
460  ATH_MSG_VERBOSE("Calculate the deformation parameters of "<<idHelperSvc()->toString(measurementId(tubeHash))
461  <<", ideal tube "<<Amg::toString(idealTube)
462  <<", fixed point "<<Amg::toString(fixedPoint)
463  <<"/ "<<Amg::toString(alignableTransform()->getDefTransform() * fixedPoint)
464  <<", thickness: "<<thickness<<", height: "<<height);
465 
466  const Amg::Transform3D fromAMDB{toAMDB.inverse()};
468  positiveEnd = fromAMDB * positiveEnd;
469  negativeEnd = fromAMDB * negativeEnd;
470  positiveEndBline = fromAMDB * positiveEndBline;
471  negativeEndBline = fromAMDB * negativeEndBline;
472 
473  // Calculate deformation. Make sure that the wire length stays the same.
474  // Code in positionOnDeformedChamber does not provide this by default.
475  // Break transformation into translation of the wire center and the rotation of the wire
476  // Move to the coordinate system originated at the wire center, then rotate the wire, then
477  // move wire center to the new position
478  const Amg::Transform3D to_center{Amg::getTranslate3D(-idealTube)};
479  const Amg::Transform3D from_center{Amg::getTranslate3D( 0.5 * (positiveEndBline + negativeEndBline))};
480  const Amg::Vector3D old_direction = (positiveEnd - negativeEnd).unit();
481  const Amg::Vector3D new_direction = (positiveEndBline - negativeEndBline).unit();
482  const Amg::Vector3D rotation_vector = old_direction.cross(new_direction);
483 
484  Amg::Transform3D deformedTransform{Amg::Transform3D::Identity()};
485  if (rotation_vector.mag() > 10. * std::numeric_limits<double>::epsilon()) {
486  const Amg::AngleAxis3D wire_rotation(std::asin(rotation_vector.mag()), rotation_vector.unit());
487  deformedTransform = from_center * wire_rotation * to_center;
488  } else {
489  deformedTransform = from_center * to_center;
490  }
491  ATH_MSG_VERBOSE("To center "<<GeoTrf::toString(to_center)<<" from: "<<GeoTrf::toString(from_center)<<
492  " -- direction: "<<GeoTrf::toString(old_direction)<<" vs. "<<GeoTrf::toString(new_direction)
493  <<" --> rot: "<<GeoTrf::toString(rotation_vector)<<" ==> "<<GeoTrf::toString(deformedTransform,true));
494  return deformedTransform;
495 #endif
496 }

◆ geoTransformHash()

IdentifierHash MuonGMR4::MuonReadoutElement::geoTransformHash ( )
staticprotectedinherited

Returns the hash that is associated with the surface cache holding the transformation that is placing the ReadoutElement inside the ATLAS coordinate system.

Definition at line 44 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

44  {
45  static const IdentifierHash hash{static_cast<unsigned>(~0)-1};
46  return hash;
47 }

◆ getParameters()

const MdtReadoutElement::parameterBook & MuonGMR4::MdtReadoutElement::getParameters ( ) const

◆ getSurfaces()

std::vector< std::shared_ptr< Acts::Surface > > MuonGMR4::MuonReadoutElement::getSurfaces ( ) const
inherited

Returns all surfaces that are associated with the active readout planes.

Definition at line 152 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

152  {
153  std::vector<std::shared_ptr<Acts::Surface>> surfaces{};
154  surfaces.reserve(m_surfaces.size());
155  for (const std::unique_ptr<SurfaceCache>& cache : m_surfaces) {
156  if (cache->hash() != geoTransformHash()) {
157  surfaces.push_back(cache->getSurface());
158  ATH_MSG_VERBOSE("Add surface "<<idHelperSvc()->toString(cache->identify())
159  <<std::endl<<(surfaces.back()->bounds()));
160  }
161  }
162  return surfaces;
163 }

◆ globalToLocalTrans() [1/3]

Amg::Transform3D MuonGMR4::MuonReadoutElement::globalToLocalTrans ( const ActsGeometryContext ctx) const
inherited

Transformations to translate between local <-> global coordinates.

They follow the common ATLAS conventations that the origin is located in the center of the detector layer x-axis: Points towards the sky y-axis: Points towards the edges of ATLAS z-axis: Points along the beamline The transformations always include the corrections from the A-Lines of the alignment system Returns the global to local transformation into the rest frame of the detector (Coincides with the first measurement layer)

Definition at line 78 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

78  {
79  return globalToLocalTrans(ctx, geoTransformHash());
80 }

◆ globalToLocalTrans() [2/3]

Amg::Transform3D MuonGMR4::MuonReadoutElement::globalToLocalTrans ( const ActsGeometryContext ctx,
const Identifier id 
) const
inherited

Returns the global to local transformation into the rest frame of a given measurement layer.

◆ globalToLocalTrans() [3/3]

Amg::Transform3D MuonGMR4::MuonReadoutElement::globalToLocalTrans ( const ActsGeometryContext ctx,
const IdentifierHash hash 
) const
inherited

Returns the global to local transformation into the rest frame of a given measurement layer.

◆ globalTubePos() [1/2]

Amg::Vector3D MuonGMR4::MdtReadoutElement::globalTubePos ( const ActsGeometryContext ctx,
const Identifier measId 
) const

Returns the global position of the tube center.

◆ globalTubePos() [2/2]

Amg::Vector3D MuonGMR4::MdtReadoutElement::globalTubePos ( const ActsGeometryContext ctx,
const IdentifierHash hash 
) const

Definition at line 144 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

145  {
146  return localToGlobalTrans(ctx, hash).translation();
147 }

◆ highVoltPos() [1/2]

Amg::Vector3D MuonGMR4::MdtReadoutElement::highVoltPos ( const ActsGeometryContext ctx,
const Identifier measId 
) const

Returns the global position of the High Voltage connectors.

◆ highVoltPos() [2/2]

Amg::Vector3D MuonGMR4::MdtReadoutElement::highVoltPos ( const ActsGeometryContext ctx,
const IdentifierHash measId 
) const

Definition at line 157 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

158  {
159  return localToGlobalTrans(ctx, hash) *
160  (-0.5*activeTubeLength(hash) * m_pars.readoutSide * Amg::Vector3D::UnitZ());
161 }

◆ identHash()

IdentifierHash MuonGMR4::MuonReadoutElement::identHash ( ) const
inherited

Returns the Identifier has of the Element that is Identical to the detElHash from the id_helper class.

◆ identify()

Identifier MuonGMR4::MuonReadoutElement::identify ( ) const
finaloverridevirtualinherited

Return the athena identifier.

The Identifier is identical with the first measurment channel in readout element (E.g. Strip 1 in Layer 1 in the NSW)

Implements ActsTrk::IDetectorElementBase.

◆ idHelperSvc()

const Muon::IMuonIdHelperSvc* MuonGMR4::MuonReadoutElement::idHelperSvc ( ) const
inherited

Returns the pointer to the muonIdHelperSvc.

◆ initElement()

StatusCode MuonGMR4::MdtReadoutElement::initElement ( )
finaloverridevirtual

Element initialization.

First check whether we're having tubes

Create bounds that are representing the surface planes of each tube layer & the readout element itself

Coordinate system of the trapezoid is in the center while the tubes are defined w.r.t. to the chamber edge. Move first tube into the proper position

Cache the transformations to the chamber layers

Cache the transformations to the tube layers

Ensure that all linear transformations are rotations

Ensure that all tubes have the same pitch

Implements MuonGMR4::MuonReadoutElement.

Definition at line 52 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

52  {
55  if (!numLayers() || !numTubesInLay()) {
56  ATH_MSG_FATAL("The readout element "<< idHelperSvc()->toStringDetEl(identify())<<" has no tubes. Please check "<<std::endl<<m_pars);
57  return StatusCode::FAILURE;
58  }
59  if (m_pars.tubePitch<=tubeRadius()) {
60  ATH_MSG_FATAL("The tubes of "<<idHelperSvc()->toStringDetEl(identify())<<" will fall together on a single point. Please check "<<std::endl<<m_pars);
61  return StatusCode::FAILURE;
62  }
63 #ifndef SIMULATIONBASE
67  m_pars.halfY)));
68 #endif
69 
72  std::optional<Amg::Vector3D> prevLayPos{std::nullopt};
73 
74  for (unsigned int lay =1 ; lay <= numLayers() ; ++lay) {
76  const IdentifierHash layHash = measurementHash(lay,0);
77  ATH_CHECK(insertTransform<MdtReadoutElement>(layHash));
78 #ifdef SIMULATIONBASE_REMOVEPLANESURFACE
81  m_pars.halfY)));
82 #endif
83  std::optional<Amg::Vector3D> prevTubePos{std::nullopt};
85  MdtTubeLayer& layer = *m_pars.tubeLayers[lay-1];
86 
87  for (unsigned int tube = 1; tube <= numTubesInLay(); ++ tube) {
88  const IdentifierHash idHash = measurementHash(lay,tube);
89  if (m_pars.removedTubes.count(idHash)) {
90  prevTubePos = std::nullopt;
91  continue;
92  }
93  ATH_CHECK(insertTransform<MdtReadoutElement>(idHash));
94 #ifndef SIMULATIONBASE
95  ATH_CHECK(strawSurfaceFactory(idHash, m_pars.tubeBounds->make_bounds(innerTubeRadius(), 0.5*tubeLength(idHash))));
96 #endif
97  GeoTrf::Transform3D tubeFrame = layer.tubeTransform(tubeNumber(idHash));
99  const AmgSymMatrix(3) tubeRot = tubeFrame.linear();
100  if (std::abs(tubeRot.determinant()- 1.) > std::numeric_limits<float>::epsilon()){
101  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Transformation matrix is not a pure rotation for "<<
102  idHelperSvc()->toStringDetEl(identify())<<" in layer: "<<lay<<", tube: "<<tube
103  <<Amg::toString(tubeFrame));
104  return StatusCode::FAILURE;
105  }
107  const Amg::Vector3D tubePos = tubeFrame.translation();
108 
109  constexpr double pitchTolerance = 20. * Gaudi::Units::micrometer;
110  if (prevTubePos) {
111  const double dR = std::abs((tubePos - (*prevTubePos)).z());
112  if (std::abs(dR - tubePitch()) > pitchTolerance) {
113  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Detected irregular tube in "<<
114  idHelperSvc()->toStringDetEl(identify())<<" in layer: "<<lay<<", tube: "<<tube
115  <<". Expected tube pitch: "<<tubePitch()<<" measured tube pitch: "
116  <<dR<<" tube position: "<<Amg::toString(tubePos,2)
117  <<" previous: "<<Amg::toString((*prevTubePos), 2));
118  return StatusCode::FAILURE;
119  }
120  }
121  if (prevLayPos && tube == 1) {
122  const double dR = (tubePos - (*prevLayPos)).mag();
123  if (std::abs(dR - tubePitch()) > pitchTolerance) {
124  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Detected irregular layer pitch in "<<
125  idHelperSvc()->toStringDetEl(identify())<<" for layer "<<lay
126  <<". Expected tube pitch: "<<tubePitch()<<" measured tube pitch: "
127  <<dR<<" tube position: "<<Amg::toString(tubePos,2)
128  <<" previous:"<<Amg::toString((*prevLayPos), 2));
129  }
130  }
131  if (tube == 1) {
132  prevLayPos = std::make_optional<Amg::Vector3D>(tubePos);
133  }
134  prevTubePos = std::make_optional<Amg::Vector3D>(tubePos);
135  }
136  }
137 #ifndef SIMULATIONBASE
138  m_pars.tubeBounds.reset();
139  m_pars.layerBounds.reset();
140 #endif
141  return StatusCode::SUCCESS;
142 }

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

◆ innerTubeRadius()

double MuonGMR4::MdtReadoutElement::innerTubeRadius ( ) const

Returns the inner tube radius.

◆ insertTransform()

template<class MuonDetImpl >
StatusCode MuonGMR4::MuonReadoutElement::insertTransform ( const IdentifierHash hash)
protectedinherited

Inserts a transfomration for caching.

◆ isBarrel()

bool MuonGMR4::MdtReadoutElement::isBarrel ( ) const

States whether the chamber is built into the barrel or not.

◆ isValid()

bool MuonGMR4::MdtReadoutElement::isValid ( const IdentifierHash measHash) const

◆ layerHash() [1/2]

IdentifierHash MuonGMR4::MdtReadoutElement::layerHash ( const Identifier measId) const
finaloverridevirtual

Transforms the Identifier into the layer hash.

Implements MuonGMR4::MuonReadoutElement.

◆ layerHash() [2/2]

static IdentifierHash MuonGMR4::MdtReadoutElement::layerHash ( const IdentifierHash measHash)
static

◆ layerNumber()

static unsigned int MuonGMR4::MdtReadoutElement::layerNumber ( const IdentifierHash hash)
static

Transforms the identifier hash into a layer number ranging from (0-numLayers()-1)

◆ localToGlobalTrans() [1/3]

const Amg::Transform3D & MuonGMR4::MuonReadoutElement::localToGlobalTrans ( const ActsGeometryContext ctx) const
inherited

Returns the local to global transformation into the ATLAS coordinate system.

Definition at line 81 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

81  {
82  return localToGlobalTrans(ctx, geoTransformHash());
83 }

◆ localToGlobalTrans() [2/3]

const Amg::Transform3D& MuonGMR4::MuonReadoutElement::localToGlobalTrans ( const ActsGeometryContext ctx,
const Identifier id 
) const
inherited

◆ localToGlobalTrans() [3/3]

const Amg::Transform3D & MuonGMR4::MuonReadoutElement::localToGlobalTrans ( const ActsGeometryContext ctx,
const IdentifierHash id 
) const
inherited

Definition at line 50 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

51  {
52  TransformCacheMap::const_iterator cache = m_localToGlobalCaches.find(hash);
53  if (cache != m_localToGlobalCaches.end()) return cache->second->getTransform(ctx.getStore(detectorType()).get());
54  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" "<<__func__<<"() -- "
55  <<idHelperSvc()->toStringDetEl(identify())<<" hash: "<<hash<<" is unknown.");
56  return dummyTrans;
57 }

◆ localTubePos()

Amg::Vector3D MuonGMR4::MdtReadoutElement::localTubePos ( const IdentifierHash hash) const

Returns the tube position in the chamber coordinate frame (Not applying the B-line corrections)

Definition at line 149 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

149  {
150  return toTubeFrame(hash).translation();
151 }

◆ measurementHash() [1/2]

IdentifierHash MuonGMR4::MdtReadoutElement::measurementHash ( const Identifier measId) const
finaloverridevirtual

Constructs the identifier hash from the full measurement Identifier.

The hash is always defined w.r.t the specific detector element and used to access the information in memory quickly

Implements MuonGMR4::MuonReadoutElement.

◆ measurementHash() [2/2]

static IdentifierHash MuonGMR4::MdtReadoutElement::measurementHash ( unsigned int  layerNumber,
unsigned int  tubeNumber 
)
static

Transform the layer and tube number to the measurementHash.

◆ measurementId()

Identifier MuonGMR4::MdtReadoutElement::measurementId ( const IdentifierHash measHash) const
finaloverridevirtual

Converts the measurement hash back to the full Identifier.

Implements MuonGMR4::MuonReadoutElement.

Definition at line 47 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

47  {
49  layerNumber(measHash) + 1,
50  tubeNumber(measHash) + 1);
51 }

◆ moduleHeight()

double MuonGMR4::MdtReadoutElement::moduleHeight ( ) const

Returns the height of the chamber (Distance bottom - topWidth)

◆ moduleThickness()

double MuonGMR4::MdtReadoutElement::moduleThickness ( ) const

Returns the thickness of the chamber.

◆ moduleWidthL()

double MuonGMR4::MdtReadoutElement::moduleWidthL ( ) const

Returns the length of the top edge of the chamber (top width)

◆ moduleWidthS()

double MuonGMR4::MdtReadoutElement::moduleWidthS ( ) const

Returns the length of the bottom edge of the chamber (short width)

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

◆ msSector()

const SpectrometerSector* MuonGMR4::MuonReadoutElement::msSector ( ) const
inherited

Returns the pointer to the envelope volume enclosing all chambers in the sector.

◆ multilayer()

unsigned int MuonGMR4::MdtReadoutElement::multilayer ( ) const

Returns the multi layer of the MdtReadoutElement.

◆ numLayers()

unsigned int MuonGMR4::MdtReadoutElement::numLayers ( ) const

Returns the number of tube layer.

◆ numTubesInLay()

unsigned int MuonGMR4::MdtReadoutElement::numTubesInLay ( ) const

Returns the number of tubes per layer.

◆ planeSurfaceFactory()

StatusCode MuonGMR4::MuonReadoutElement::planeSurfaceFactory ( const IdentifierHash hash,
std::shared_ptr< Acts::PlanarBounds >  pBounds 
)
protectedinherited

Definition at line 125 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

125  {
126 
127  //get the local to global transform cache
128  TransformCacheMap::const_iterator transformCache = m_localToGlobalCaches.find(hash);
129  if (transformCache == m_localToGlobalCaches.end()) {
130  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" - "<<idHelperSvc()->toString(identify())
131  <<" no transform cache available for hash "<<hash);
132  return StatusCode::FAILURE;
133  }
134  auto insert_itr = m_surfaces.insert(std::make_unique<ActsTrk::SurfaceCache>(transformCache->second.get()));
135  if(!insert_itr.second){
136  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" - "<<idHelperSvc()->toString(identify())
137  <<" Insertion to muon surface cache failed for hash "<<hash);
138  return StatusCode::FAILURE;
139  }
140  //Create a plane surface for the surface cache
141  (*insert_itr.first)->setSurface(Acts::Surface::makeShared<Acts::PlaneSurface>(pBounds, **insert_itr.first));
142  return StatusCode::SUCCESS;
143 }

◆ readOutPos() [1/2]

Amg::Vector3D MuonGMR4::MdtReadoutElement::readOutPos ( const ActsGeometryContext ctx,
const Identifier measId 
) const

Returns the global position of the readout card.

◆ readOutPos() [2/2]

Amg::Vector3D MuonGMR4::MdtReadoutElement::readOutPos ( const ActsGeometryContext ctx,
const IdentifierHash measId 
) const

Definition at line 152 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

153  {
154  return localToGlobalTrans(ctx, hash) *
155  (0.5*activeTubeLength(hash) * m_pars.readoutSide * Amg::Vector3D::UnitZ());
156 }

◆ releaseUnAlignedTrfs()

void MuonGMR4::MuonReadoutElement::releaseUnAlignedTrfs ( ) const
inherited

Releases all cached transforms that are not connected with alignment.

Definition at line 62 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

62  {
63  for (const auto& cache : m_localToGlobalCaches) {
64  cache.second->releaseNominalCache();
65  }
66 }

◆ setChamberLink()

void MuonGMR4::MuonReadoutElement::setChamberLink ( const Chamber chamber)
inherited

Sets the link to the enclosing chamber.

Definition at line 145 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

145  {
147 }

◆ setComplementaryReadoutEle()

void MuonGMR4::MdtReadoutElement::setComplementaryReadoutEle ( const MdtReadoutElement other)

Set the link to the second readout element inside the muon station.

Parameters
other pointer to the readoutElement

Definition at line 207 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

207  {
208  m_reOtherMl = other;
209 }

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

◆ setSectorLink()

void MuonGMR4::MuonReadoutElement::setSectorLink ( const SpectrometerSector envelope)
inherited

Set the link to the enclosing sector envelope.

Definition at line 148 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

148  {
149  m_msSectorLink = envelope;
150 }

◆ stationEta()

int MuonGMR4::MuonReadoutElement::stationEta ( ) const
inherited

Returns the stationEta (positive A site, negative O site)

◆ stationName()

int MuonGMR4::MuonReadoutElement::stationName ( ) const
inherited

Returns the stationName (BIS, BOS, etc) encoded into the integer.

◆ stationPhi()

int MuonGMR4::MuonReadoutElement::stationPhi ( ) const
inherited

Returns the stationPhi (1-8) -> sector (2*phi - (isSmall))

◆ storeAlignedTransforms()

unsigned int MuonGMR4::MuonReadoutElement::storeAlignedTransforms ( const ActsTrk::DetectorAlignStore store) const
finaloverridevirtualinherited

Caches the aligned transformation in the provided store. Returns the number of cached elements.

Implements ActsTrk::IDetectorElement.

Definition at line 68 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

68  {
69  if (store.detType != detectorType()) return 0;
70  unsigned int aligned{0};
71  for (const auto& cache : m_localToGlobalCaches) {
72  cache.second->getTransform(&store);
73  ++aligned;
74  }
75  return aligned;
76 }

◆ strawSurfaceFactory()

StatusCode MuonGMR4::MuonReadoutElement::strawSurfaceFactory ( const IdentifierHash hash,
std::shared_ptr< Acts::LineBounds >  lBounds 
)
protectedinherited

Definition at line 102 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

103  {
104 
105  //get the local to global transform cache
106  TransformCacheMap::const_iterator transformCache = m_localToGlobalCaches.find(hash);
107  if (transformCache == m_localToGlobalCaches.end()) {
108  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" - "<<idHelperSvc()->toString(identify())
109  <<" no transform cache available for hash "<<hash);
110  return StatusCode::FAILURE;
111  }
112 
113  auto insert_itr = m_surfaces.insert(std::make_unique<ActsTrk::SurfaceCache>(transformCache->second.get()));
114  if(!insert_itr.second){
115  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" - "<<idHelperSvc()->toString(identify())
116  <<" Insertion to muon surface cache failed for hash "<<hash);
117  return StatusCode::FAILURE;
118  }
119  //Create straw surface for the surface cache
120  (*insert_itr.first)->setSurface(Acts::Surface::makeShared<Acts::StrawSurface>(lBounds, **insert_itr.first));
121  return StatusCode::SUCCESS;
122 
123 }

◆ surface() [1/4]

const Acts::Surface & MuonGMR4::MuonReadoutElement::surface ( ) const
finaloverrideinherited

Returns the surface associated to the readout element plane.

Definition at line 97 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

97 { return surface(geoTransformHash()); }

◆ surface() [2/4]

Acts::Surface & MuonGMR4::MuonReadoutElement::surface ( )
finaloverrideinherited

◆ surface() [3/4]

Acts::Surface & MuonGMR4::MuonReadoutElement::surface ( const IdentifierHash hash)
inherited

◆ surface() [4/4]

const Acts::Surface & MuonGMR4::MuonReadoutElement::surface ( const IdentifierHash hash) const
inherited

Returns the sufrface associated to a wire / measurement plane in the detector.

Definition at line 99 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

99 { return *surfacePtr(hash); }

◆ surfacePtr()

std::shared_ptr< Acts::Surface > MuonGMR4::MuonReadoutElement::surfacePtr ( const IdentifierHash hash) const
inherited

Returns the pointer associated to a certain wire / plane.

Definition at line 89 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

89  {
90  ActsTrk::SurfaceCacheSet::const_iterator cache = m_surfaces.find(hash);
91  if(cache != m_surfaces.end()) return (*cache)->getSurface();
92  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" "<<__func__<<"() -- Hash "<<hash
93  <<" is unknown to "<<idHelperSvc()->toStringDetEl(identify()));
94  return nullptr;
95 }

◆ thickness()

double MuonGMR4::MdtReadoutElement::thickness ( ) const
finaloverride

Overload from the Acts::DetectorElement (2 * halfheight)

◆ toChamberLayer()

Amg::Transform3D MuonGMR4::MdtReadoutElement::toChamberLayer ( const IdentifierHash hash) const
private

Returns the transformation into the rest frame of the tube x-axis: Pointing towards the next layer y-axis: Pointing parallel to the wire layer z-axis: Pointing along the wire.

Definition at line 162 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

162  {
163  const unsigned int layer = layerNumber(hash);
164  const MdtTubeLayer& zeroT{*m_pars.tubeLayers[layer]};
165  return zeroT.layerTransform();
166 }

◆ toStation()

const Amg::Transform3D & MuonGMR4::MuonReadoutElement::toStation ( const ActsTrk::DetectorAlignStore alignStore) const
protectedinherited

Returns the local -> global transformation to go from the volume center origin.

Definition at line 59 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

59  {
60  return getMaterialGeom()->getAbsoluteTransform(alignStore ? alignStore->geoModelAlignment.get() : nullptr);
61 }

◆ toTubeFrame()

Amg::Transform3D MuonGMR4::MdtReadoutElement::toTubeFrame ( const IdentifierHash hash) const
private

Returns the transformation into the rest frame of the tube x-axis: Pointing towards the next layer y-axis: Pointing parallel to the wire layer z-axis: Pointing along the wire.

Definition at line 167 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

167  {
168  const unsigned int layer = layerNumber(hash);
169  const unsigned int tube = tubeNumber(hash);
170  const MdtTubeLayer& zeroT{*m_pars.tubeLayers[layer]};
171  return zeroT.tubeTransform(tube);
172 }

◆ transform()

const Acts::Transform3 & MuonGMR4::MuonReadoutElement::transform ( const Acts::GeometryContext &  gctx) const
finaloverrideinherited

Returns the transformation to the origin of the chamber coordinate system.

Definition at line 85 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx.

85  {
86  const ActsGeometryContext *gctx = anygctx.get<const ActsGeometryContext *>();
87  return localToGlobalTrans(*gctx, geoTransformHash());
88 }

◆ tubeLength()

double MuonGMR4::MdtReadoutElement::tubeLength ( const IdentifierHash hash) const

◆ tubeNumber()

static unsigned int MuonGMR4::MdtReadoutElement::tubeNumber ( const IdentifierHash hash)
static

Transforms the idenfier hash into a tube number ranging from (0- numTubesInLay()-1)

◆ tubePitch()

double MuonGMR4::MdtReadoutElement::tubePitch ( ) const

Returns the pitch between 2 tubes in a layer.

◆ tubeRadius()

double MuonGMR4::MdtReadoutElement::tubeRadius ( ) const

Adds the thickness of the tube wall onto the radius.

◆ uncutTubeLength()

double MuonGMR4::MdtReadoutElement::uncutTubeLength ( const IdentifierHash tubeHash) const

Returns the uncut tube length.

Definition at line 179 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

179  {
180  const unsigned int layer = layerNumber(tubeHash);
181  const unsigned int tube = tubeNumber(tubeHash);
182  const MdtTubeLayer& zeroT{*m_pars.tubeLayers[layer]};
183  return 2.*zeroT.uncutHalfLength(tube);
184 }

◆ wireEndpointAsBuilt()

Amg::Vector3D MuonGMR4::MdtReadoutElement::wireEndpointAsBuilt ( const MdtAsBuiltPar asBuilt,
const IdentifierHash tubeHash,
const Amg::Vector3D nominalEnd,
const tubeSide_t  side 
) const
private

Definition at line 226 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

229  {
230 
231 
232  ATH_MSG_VERBOSE( "Applying as-built parameters for chamber " << idHelperSvc()->toString(measurementId(tubeHash)));
233 
234 
236  using multilayer_t = MdtAsBuiltPar::multilayer_t;
237  const multilayer_t ml = (multilayer() == 1) ? multilayer_t::ML1 : multilayer_t::ML2;
238 
239  const IdentifierHash refLayer{measurementHash((ml == multilayer_t::ML1) ? numLayers() : 1, 1)};
240  const Amg::Vector3D refTube{localTubePos(refLayer)};
241 
242 
243  const double sideSign = 0.5*(1.- 2.*(side ==tubeSide_t::NEG));
244  // Compute the reference for the as-built parameters
245  const Amg::Vector3D reference_point = asBuiltRefFrame() *
246  Amg::Vector3D {refTube.x() + (1. - 2.*(ml == multilayer_t::ML2)) * tubeRadius(),
247  sideSign*uncutTubeLength(refLayer),
248  -0.5*moduleHeight()};
249  ATH_MSG_VERBOSE("AMDB transform "<<" "<<idHelperSvc()->toStringDetEl(identify())<<
250  " "<<GeoTrf::toString(asBuiltRefFrame(), true)<<", reference point: "<<Amg::toString(reference_point));
251 
252 
253  const int tubeLayer = layerNumber(tubeHash);
254  const int tube = tubeNumber(tubeHash);
255  const int layer_delta = ml == multilayer_t::ML1 ? numLayers() - tubeLayer : tubeLayer +1;
256 
257 
258  // Get the As-Built parameters for this ML and side of the chamber
259  const double zpitch = params.zpitch(ml, side);
260  const double ypitch = params.ypitch(ml, side);
261  const double stagg = params.stagg(ml, side);
262  const double alpha = params.alpha(ml, side);
263  const double y0 = params.y0(ml, side);
264  const double z0 = params.z0(ml, side);
265 
266  const Amg::Transform3D planeRot{Amg::getRotateX3D(-alpha)};
267  ATH_MSG_VERBOSE("Rotation angle "<<(alpha/Gaudi::Units::deg));
268 
269  // Find the vector from the reference_point to the endplug
270  // 0 for layer 1 and 3, 1 for layer 2 and 4
271  const double offset_stagg = 0.5 * zpitch * stagg * ( (layer_delta-1) % 2);
272  const Amg::Vector3D endPlug = planeRot * Amg::Vector3D{0.,
273  tube* zpitch + offset_stagg,
274  (layer_delta-1) * ypitch};
275 
276  // Calculate x position, which varies for endcap chambers
277  const double xshift = sideSign*(uncutTubeLength(tubeHash) - uncutTubeLength(refLayer));
278  ATH_MSG_VERBOSE("Off set staggering "<<offset_stagg<<", layer_delta: "<<layer_delta<<", zpitch: "<<zpitch<<", ypitch: "<<ypitch
279  <<", xshift: "<<xshift);
280 
281  Amg::Vector3D ret(reference_point.x() + xshift,
282  reference_point.y() + z0 + endPlug.y(),
283  reference_point.z() + y0 + endPlug.z());
284 
285 
286  if ((ret - wireEnd).mag() > 3. * Gaudi::Units::mm) {
287  ATH_MSG_WARNING( "Large as-built correction for chamber " << idHelperSvc()->toString(measurementId(tubeHash))
288  << ", side "<< (side == tubeSide_t::POS ? "positive" : "negative")
289  << ", endpoint "<<Amg::toString(wireEnd)<<", return: "<<Amg::toString(ret));
290  }
291  ATH_MSG_VERBOSE((side == tubeSide_t::POS ? "positive" : "negative")<<" wire end has moved from "
292  <<Amg::toString(wireEnd)<<" to "<<Amg::toString(ret)<<" End plug: "<<Amg::toString(endPlug));
293  return ret;
294 }

◆ wireLength()

double MuonGMR4::MdtReadoutElement::wireLength ( const IdentifierHash hash) const

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_args

const defineArgs MuonGMR4::MuonReadoutElement::m_args {}
privateinherited

◆ m_chambLink

const Chamber* MuonGMR4::MuonReadoutElement::m_chambLink {nullptr}
privateinherited

◆ m_chIdx

Muon::MuonStationIndex::ChIndex MuonGMR4::MuonReadoutElement::m_chIdx {Muon::MuonStationIndex::ChIndex::ChUnknown}
privateinherited

◆ m_detElHash

IdentifierHash MuonGMR4::MuonReadoutElement::m_detElHash {}
privateinherited

Cache of the detector element hash.

Definition at line 200 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h.

◆ m_idHelper

const MdtIdHelper& MuonGMR4::MdtReadoutElement::m_idHelper {idHelperSvc()->mdtIdHelper()}
private

Detector identifier helper to quickly extract the ID fields.

Definition at line 244 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonGMR4::MuonReadoutElement::m_idHelperSvc {"Muon::MuonIdHelperSvc/MuonIdHelperSvc", "MuonReadoutElement"}
privateinherited

◆ m_imsg

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

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_isBarrel

bool MuonGMR4::MdtReadoutElement::m_isBarrel {m_idHelper.isBarrel(identify())}
private

Flag defining whether the chamber is barrel or not.

Definition at line 248 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h.

◆ m_localToGlobalCaches

TransformCacheMap MuonGMR4::MuonReadoutElement::m_localToGlobalCaches
privateinherited

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

const SpectrometerSector* MuonGMR4::MuonReadoutElement::m_msSectorLink {}
privateinherited

Pointer to the associated MS-sector & MuonChamber.

Definition at line 216 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_pars

parameterBook MuonGMR4::MdtReadoutElement::m_pars {}
private

◆ m_reOtherMl

const MdtReadoutElement* MuonGMR4::MdtReadoutElement::m_reOtherMl {this}
private

Complementary readout element.

Definition at line 250 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h.

◆ m_stEta

int MuonGMR4::MuonReadoutElement::m_stEta {-1}
privateinherited

Cache the station eta of the identifier.

Definition at line 206 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h.

◆ m_stML

int MuonGMR4::MdtReadoutElement::m_stML {m_idHelper.multilayer(identify())}
private

◆ m_stName

int MuonGMR4::MuonReadoutElement::m_stName {-1}
privateinherited

Cache the station name of the identifier.

Definition at line 204 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h.

◆ m_stPhi

int MuonGMR4::MuonReadoutElement::m_stPhi {-1}
privateinherited

Cache the station phi of the identifier.

Definition at line 208 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h.

◆ m_surfaces

ActsTrk::SurfaceCacheSet MuonGMR4::MuonReadoutElement::m_surfaces
privateinherited

Cache of all associated surfaces.

Definition at line 214 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.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
SGTest::store
TestStore store
Definition: TestStore.cxx:23
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:260
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonGMR4::MuonReadoutElement::m_chambLink
const Chamber * m_chambLink
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:217
MuonGMR4::MdtReadoutElement::parameterBook::tubeBounds
ActsTrk::SurfaceBoundSetPtr< Acts::LineBounds > tubeBounds
Sets of surface bounds which is shared amongst all readout elements used to assign the same bound obj...
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:69
MuonGMR4::MdtReadoutElement::asBuiltRefFrame
Amg::Transform3D asBuiltRefFrame() const
Returns the transformation to go into the reference frame of the as-buit & b-line model starting from...
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:211
MuonGMR4::MuonReadoutElement::chamber
const Chamber * chamber() const
Returns the pointer to the chamber enclosing this readout element.
MuonGMR4::MdtReadoutElement::localTubePos
Amg::Vector3D localTubePos(const IdentifierHash &hash) const
Returns the tube position in the chamber coordinate frame (Not applying the B-line corrections)
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:149
MuonGMR4::MdtReadoutElement::parameterBook::removedTubes
std::set< IdentifierHash > removedTubes
List of tube places without tubes.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:35
MuonGMR4::MdtReadoutElement::numTubesInLay
unsigned int numTubesInLay() const
Returns the number of tubes per layer.
ParticleTest.eg
eg
Definition: ParticleTest.py:29
ActsTrk::DetectorAlignStore::geoModelAlignment
std::shared_ptr< GeoAlignmentStore > geoModelAlignment
Store containing the aligned GeoModel nodes.
Definition: DetectorAlignStore.h:31
MuonGMR4::MdtReadoutElement::m_reOtherMl
const MdtReadoutElement * m_reOtherMl
Complementary readout element.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:250
MuonGMR4::MdtReadoutElement::parameterBook::layerBounds
ActsTrk::SurfaceBoundSetPtr< Acts::TrapezoidBounds > layerBounds
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:70
MuonGMR4::MuonReadoutElement::m_localToGlobalCaches
TransformCacheMap m_localToGlobalCaches
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:211
MuonGMR4::MdtReadoutElement::parameterBook::tubeLayers
std::vector< MdtTubeLayerPtr > tubeLayers
Vector defining the position of all tubes in each tube layer.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:32
MuonGMR4::MuonReadoutElement::surface
const Acts::Surface & surface() const override final
Returns the surface associated to the readout element plane.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:97
MuonGMR4::MdtReadoutElement::tubeLength
double tubeLength(const IdentifierHash &hash) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:185
MuonGMR4::MdtReadoutElement::isBarrel
bool isBarrel() const
States whether the chamber is built into the barrel or not.
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
MuonGMR4::MdtReadoutElement::moduleThickness
double moduleThickness() const
Returns the thickness of the chamber.
MuonGMR4::MdtReadoutElement::measurementHash
static IdentifierHash measurementHash(unsigned int layerNumber, unsigned int tubeNumber)
Transform the layer and tube number to the measurementHash.
MuonGMR4::MuonReadoutElement::m_surfaces
ActsTrk::SurfaceCacheSet m_surfaces
Cache of all associated surfaces.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:214
ALFA_EventTPCnv_Dict::t0
std::vector< ALFA_RawData_p1 > t0
Definition: ALFA_EventTPCnvDict.h:42
Amg::y
@ y
Definition: GeoPrimitives.h:35
MuonGMR4::MdtReadoutElement::activeTubeLength
double activeTubeLength(const IdentifierHash &hash) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:173
MuonGMR4::MdtReadoutElement::readOutPos
Amg::Vector3D readOutPos(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global position of the readout card.
MCP::ScaleSmearParam::s0
@ s0
deg
#define deg
Definition: SbPolyhedron.cxx:17
MdtAsBuiltPar::multilayer_t
multilayer_t
MDT multi-layer index.
Definition: MdtAsBuiltPar.h:28
MuonGMR4::MuonReadoutElement::createGeoTransform
StatusCode createGeoTransform()
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:36
ActsTrk::IDetectorElementBase::detectorType
virtual DetectorType detectorType() const =0
Returns the detector element type.
MuonGMR4::MuonReadoutElement::globalToLocalTrans
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:78
BLinePar::getParameter
float getParameter(const Parameter p) const
Returns a given parameter.
Definition: BLinePar.h:40
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonGMR4::MdtReadoutElement::tubeRadius
double tubeRadius() const
Adds the thickness of the tube wall onto the radius.
MuonGMR4::MdtReadoutElement::parameterBook::readoutSide
double readoutSide
Is the readout chip at positive or negative Z?
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:65
TRT::Hit::side
@ side
Definition: HitInfo.h:83
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
MuonGMR4::MdtReadoutElement::measurementId
Identifier measurementId(const IdentifierHash &measHash) const override final
Converts the measurement hash back to the full Identifier.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:47
MuonGMR4::MdtReadoutElement::multilayer
unsigned int multilayer() const
Returns the multi layer of the MdtReadoutElement.
MdtAlignmentStore
Helper struct to cache simulatenously the As-built and the BLine corrections of the Mdts for fast acc...
Definition: MdtAlignmentStore.h:19
MuonGMR4::MdtReadoutElement::layerNumber
static unsigned int layerNumber(const IdentifierHash &hash)
Transforms the identifier hash into a layer number ranging from (0-numLayers()-1)
ActsGeometryContext::getStore
AlignmentStorePtr & getStore(const DetectorType type)
Returns the mutable alignable store for the ATLAS detector type (Pixel, Mdt, etc.)
Definition: ActsGeometryContext.h:33
MuonGMR4::MdtReadoutElement::parameterBook::halfY
double halfY
Length ~ number of tubes.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:61
MuonGMR4::MuonReadoutElement::MuonReadoutElement
MuonReadoutElement()=delete
Amg::getRotateX3D
Amg::Transform3D getRotateX3D(double angle)
get a rotation transformation around X-axis
Definition: GeoPrimitivesHelpers.h:252
MuonGMR4::MdtReadoutElement::uncutTubeLength
double uncutTubeLength(const IdentifierHash &tubeHash) const
Returns the uncut tube length.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:179
MdtAlignmentStore::chamberDistortions
Helper struct to store the pointer to the Mdt distrotion parameters, namely the As-built and the BLin...
Definition: MdtAlignmentStore.h:25
BLinePar::expansionScale
static constexpr double expansionScale
Definition: BLinePar.h:35
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::MdtReadoutElement::m_pars
parameterBook m_pars
defining parameter set
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:242
MuonGMR4::MdtReadoutElement::moduleWidthS
double moduleWidthS() const
Returns the length of the bottom edge of the chamber (short width)
z
#define z
MuonGMR4::MuonReadoutElement::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the pointer to the muonIdHelperSvc.
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonGMR4::MdtReadoutElement::numLayers
unsigned int numLayers() const
Returns the number of tube layer.
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
dumpNswErrorDb.linear
def linear
Definition: dumpNswErrorDb.py:23
MdtAsBuiltPar::tubeSide_t::NEG
@ NEG
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.SystemOfUnits.micrometer
int micrometer
Definition: SystemOfUnits.py:71
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonGMR4::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius.
MuonGMR4::MdtReadoutElement::moduleHeight
double moduleHeight() const
Returns the height of the chamber (Distance bottom - topWidth)
MdtAsBuiltPar::tubeSide_t
tubeSide_t
MDT tube side.
Definition: MdtAsBuiltPar.h:33
MuonR4::SegmentFit::ParamDefs::y0
@ y0
ActsTrk::DetectorType::Mdt
@ Mdt
MuonSpectrometer.
MdtIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
Definition: MdtIdHelper.cxx:659
MuonGMR4::MdtReadoutElement::distanceToReadout
double distanceToReadout(const ActsGeometryContext &ctx, const Identifier &measId, const Amg::Vector3D &globPoint) const
Returns the distance along the wire from the readout card The distance is given as the delta z of the...
MuonGMR4::MuonReadoutElement::geoTransformHash
static IdentifierHash geoTransformHash()
Returns the hash that is associated with the surface cache holding the transformation that is placing...
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:44
MuonGMR4::MuonReadoutElement::alignableTransform
const GeoAlignableTransform * alignableTransform() const
Returnsthe alignable transform of the readout element.
PlotCalibFromCool.en
en
Definition: PlotCalibFromCool.py:399
MuonGMR4::MdtReadoutElement::MdtReadoutElement
MdtReadoutElement(defineArgs &&args)
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:42
MuonGMR4::MuonReadoutElement::strawSurfaceFactory
StatusCode strawSurfaceFactory(const IdentifierHash &hash, std::shared_ptr< Acts::LineBounds > lBounds)
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:102
MuonGMR4::MuonReadoutElement::identify
Identifier identify() const override final
Return the athena identifier.
MuonGMR4::MdtReadoutElement::tubeSide_t
MdtAsBuiltPar::tubeSide_t tubeSide_t
Moves the wire endpoints according to the as-built model.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:218
MuonGMR4::MdtReadoutElement::tubePitch
double tubePitch() const
Returns the pitch between 2 tubes in a layer.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGMR4::MdtReadoutElement::parameterBook::tubePitch
double tubePitch
Distance between 2 tubes in the layer.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:42
MuonGMR4::MdtReadoutElement::thickness
double thickness() const override final
Overload from the Acts::DetectorElement (2 * halfheight)
MuonGMR4::MdtReadoutElement::tubeNumber
static unsigned int tubeNumber(const IdentifierHash &hash)
Transforms the idenfier hash into a tube number ranging from (0- numTubesInLay()-1)
MuonGMR4::MdtReadoutElement::bLineReferencePoint
Amg::Vector3D bLineReferencePoint() const
Returns the fixed point of the B-line & as-bult defromation model expressed in the as-built frame.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:217
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
MuonGMR4::MdtReadoutElement::parameterBook::endPlugLength
double endPlugLength
Depth of the endplug into the active tube volume.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:46
BLinePar::Parameter
Parameter
Definition: BLinePar.h:21
MuonGMR4::MdtReadoutElement::m_idHelper
const MdtIdHelper & m_idHelper
Detector identifier helper to quickly extract the ID fields.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:244
MuonGMR4::MdtReadoutElement::parameterBook::shortHalfX
double shortHalfX
The chambers have either a rectangular or a trapezoidal shape to first approximation.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:58
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
MuonGMR4::MuonReadoutElement::planeSurfaceFactory
StatusCode planeSurfaceFactory(const IdentifierHash &hash, std::shared_ptr< Acts::PlanarBounds > pBounds)
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:125
MuonGMR4::MuonReadoutElement::surfacePtr
std::shared_ptr< Acts::Surface > surfacePtr(const IdentifierHash &hash) const
Returns the pointer associated to a certain wire / plane.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:89
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:21
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
MuonGMR4::MdtReadoutElement::parameterBook::deadLength
double deadLength
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:48
MuonGMR4::MdtReadoutElement::parameterBook::longHalfX
double longHalfX
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:59
MuonGMR4::MuonReadoutElement::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:81
MdtAsBuiltPar::tubeSide_t::POS
@ POS
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
MuonGMR4::MuonReadoutElement::stationEta
int stationEta() const
Returns the stationEta (positive A site, negative O site)
MuonGMR4::MdtReadoutElement::toTubeFrame
Amg::Transform3D toTubeFrame(const IdentifierHash &hash) const
Returns the transformation into the rest frame of the tube x-axis: Pointing towards the next layer y-...
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:167
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
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::MdtReadoutElement::moduleWidthL
double moduleWidthL() const
Returns the length of the top edge of the chamber (top width)
MuonGMR4::MdtReadoutElement::applyBlineCorrections
Amg::Vector3D applyBlineCorrections(const BLinePar &bline, const Amg::Vector3D &localTubeEndPoint, const Amg::Vector3D &fixedPoint, const double thickness) const
Apply the B-line model correction to a tube endpoint.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:296
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:26
MuonGMR4::MdtReadoutElement::wireEndpointAsBuilt
Amg::Vector3D wireEndpointAsBuilt(const MdtAsBuiltPar &asBuilt, const IdentifierHash &tubeHash, const Amg::Vector3D &nominalEnd, const tubeSide_t side) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:226
calibdata.tube
tube
Definition: calibdata.py:31
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
MuonGMR4::MuonReadoutElement::m_msSectorLink
const SpectrometerSector * m_msSectorLink
Pointer to the associated MS-sector & MuonChamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:216
Amg::getTranslate3D
Amg::Transform3D getTranslate3D(const double X, const double Y, const double Z)
: Returns a shift transformation along an arbitrary axis
Definition: GeoPrimitivesHelpers.h:289