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...
 
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...
 
const MdtReadoutElementcomplementaryRE () const
 Returns the pointer to the other readout element inside the muon station. 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...
 
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 18 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 211 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 171 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 294 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ asBuiltRefFrame()

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

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 209 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 215 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

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

◆ complementaryRE()

const MdtReadoutElement* MuonGMR4::MdtReadoutElement::complementaryRE ( ) const

Returns the pointer to the other readout element inside the muon station.

◆ 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 189 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

191  {
192  return distanceToReadout(measHash, globalToLocalTrans(ctx, measHash) * globPoint);
193 
194 }

◆ 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 195 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 405 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 142 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

143  {
144  return localToGlobalTrans(ctx, hash).translation();
145 }

◆ 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 155 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 51 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 147 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

147  {
148  return toTubeFrame(hash).translation();
149 }

◆ 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 46 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

46  {
48  layerNumber(measHash) + 1,
49  tubeNumber(measHash) + 1);
50 }

◆ 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 150 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 205 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

205  {
206  m_reOtherMl = other;
207 }

◆ 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 160 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 165 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 177 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 224 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx.

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

◆ 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 232 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 236 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 238 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
MuonGMR4::MdtReadoutElement::parameterBook::boundFactory
std::shared_ptr< Acts::SurfaceBoundFactory > boundFactory
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:64
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::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:209
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:147
add-xsec-uncert-quadrature-N.alpha
alpha
Definition: add-xsec-uncert-quadrature-N.py:110
MuonGMR4::MdtReadoutElement::parameterBook::removedTubes
std::set< IdentifierHash > removedTubes
List of tube places without tubes.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:30
python.SystemOfUnits.mm
float mm
Definition: SystemOfUnits.py:98
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:238
python.CaloAddPedShiftConfig.args
args
Definition: CaloAddPedShiftConfig.py:47
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:27
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:183
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
Amg::y
@ y
Definition: GeoPrimitives.h:35
MuonGMR4::MdtReadoutElement::activeTubeLength
double activeTubeLength(const IdentifierHash &hash) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:171
MuonGMR4::MdtReadoutElement::readOutPos
Amg::Vector3D readOutPos(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global position of the readout card.
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
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:60
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:46
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)
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
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:56
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:177
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:230
MuonGMR4::MdtReadoutElement::moduleWidthS
double moduleWidthS() const
Returns the length of the bottom edge of the chamber (short width)
z
#define z
python.SystemOfUnits.micrometer
float micrometer
Definition: SystemOfUnits.py:80
MuonGMR4::MuonReadoutElement::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the pointer to the muonIdHelperSvc.
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:56
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:29
MdtAsBuiltPar::tubeSide_t::NEG
@ NEG
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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:41
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:211
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:37
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:215
MuonGMR4::MdtReadoutElement::parameterBook::endPlugLength
double endPlugLength
Depth of the endplug into the active tube volume.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:41
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:232
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:53
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:108
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
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:15
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:43
MuonGMR4::MdtReadoutElement::parameterBook::longHalfX
double longHalfX
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:54
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:165
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:294
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:224
calibdata.tube
tube
Definition: calibdata.py:30
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
python.SystemOfUnits.ms
float ms
Definition: SystemOfUnits.py:148