ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
MuonGM::MdtReadoutElement Class Referencefinal

#include <MdtReadoutElement.h>

Inheritance diagram for MuonGM::MdtReadoutElement:
Collaboration diagram for MuonGM::MdtReadoutElement:

Classes

struct  GeoInfo
 

Public Member Functions

 MdtReadoutElement (GeoVFullPhysVol *pv, const std::string &stName, MuonDetectorManager *mgr)
 
 ~MdtReadoutElement ()=default
 
unsigned int nMDTinStation () const
 How many MDT chambers are in the station. More...
 
void setNMdtInStation (unsigned int numMdt)
 
bool barrel () const
 Returns whether the chamber is in the barrel (Assement on first later in stationName) More...
 
bool endcap () const
 Returns whether the chamber is in the endcap. More...
 
int getMultilayer () const
 Returns the multilayer represented by the readout element. More...
 
int getNLayers () const
 Returns the number of tube layers inside the multilayer. More...
 
int getNtubesperlayer () const
 Returns the number of tubes in each tube layer. More...
 
int getNtubesinastep () const
 Returns the number of tubes in the endcap trapezoid sharing the same length. More...
 
void setMultilayer (const int ml)
 Sets the multilayer number. More...
 
void setNLayers (const int nl)
 Sets the number of layers. More...
 
bool getWireFirstLocalCoordAlongZ (int tubeLayer, double &coord) const
 
bool getWireFirstLocalCoordAlongR (int tubeLayer, double &coord) const
 
bool containsId (const Identifier &id) const override
 
double tubeLength (const int tubeLayer, const int tube) const
 
double getActiveTubeLength (const int tubeLayer, const int tube) const
 
double getWireLength (const int tubeLayer, const int tube) const
 
double tubeLength (const Identifier &id) const
 
double innerTubeRadius () const
 Returns the inner tube radius excluding the aluminium walls. More...
 
double outerTubeRadius () const
 Returns the tube radius taking the thickness of the tubes into account. More...
 
double tubePitch () const
 Returns the distance between 2 tubes in a tube layer. More...
 
const Amg::Transform3DlocalToGlobalTransf (const Identifier &id) const
 
const Amg::Transform3DlocalToGlobalTransf (const int tubeLayer, const int tube) const
 
Amg::Transform3D nodeform_localToGlobalTransf (const Identifier &id) const
 
Amg::Transform3D nodeform_localToGlobalTransf (const int tubeLayer, const int tube) const
 
Amg::Transform3D globalToLocalTransf (const int tubeLayer, const int tube) const
 
Amg::Transform3D globalToLocalTransf (const Identifier &id) const
 
Amg::Transform3D nodeform_globalToLocalTransf (const Identifier &id) const
 
Amg::Transform3D nodeform_globalToLocalTransf (const int tubeLayer, const int tube) const
 
Amg::Vector3D localTubePos (const Identifier &id) const
 
Amg::Vector3D localTubePos (const int tubelayer, const int tube) const
 
Amg::Vector3D nodeform_localTubePos (const Identifier &id) const
 
Amg::Vector3D nodeform_localTubePos (const int tubelayer, const int tube) const
 
Amg::Vector3D tubePos (const Identifier &id) const
 Returns the global position of the given tube. More...
 
Amg::Vector3D tubePos (const int tubelayer, const int tube) const
 
Amg::Vector3D nodeform_tubePos (const Identifier &id) const
 Returns the global position of the tube excluding the B-line & As-built corrections. More...
 
Amg::Vector3D nodeform_tubePos (const int tubelayer, const int tube) const
 
double signedRODistanceFromTubeCentre (const Identifier &id) const
 
double signedRODistanceFromTubeCentre (const int tubeLayer, const int tube) const
 
double RODistanceFromTubeCentre (const Identifier &id) const
 
double RODistanceFromTubeCentre (const int tubeLayer, const int tube) const
 
double distanceFromRO (const Amg::Vector3D &GlobalHitPosition, const Identifier &id) const
 
double distanceFromRO (const Amg::Vector3D &GlobalHitPosition, const int tubelayer, const int tube) const
 
int isAtReadoutSide (const Amg::Vector3D &GlobalHitPosition, const Identifier &id) const
 
int isAtReadoutSide (const Amg::Vector3D &GlobalHitPosition, const int tubelayer, const int tube) const
 
Amg::Vector3D localROPos (const Identifier &id) const
 
Amg::Vector3D localROPos (const int tubelayer, const int tube) const
 
Amg::Vector3D ROPos (const int tubelayer, const int tube) const
 
Amg::Vector3D ROPos (const Identifier &id) const
 
Amg::Vector3D tubeFrame_localROPos (const int tubelayer, const int tube) const
 
Amg::Vector3D tubeFrame_localROPos (const Identifier &id) const
 
void setBLinePar (const BLinePar *bLine)
 
void clearBLinePar ()
 
const BLinePargetBLinePar () const
 
void clearCache () override final
 
void fillCache () override final
 
virtual const Trk::Surfacesurface () const override final
 Return surface associated with this detector element. More...
 
virtual const Trk::SaggedLineSurfacesurface (const Identifier &id) const override final
 Return surface associated with this identifier, which should come from the PrepRawData object (i.e. More...
 
virtual const Trk::SaggedLineSurfacesurface (const int tubeLayer, const int tube) const
 
virtual const Trk::SurfaceBoundsbounds () const override final
 Return the boundaries of the element. More...
 
virtual const Trk::CylinderBoundsbounds (const Identifier &id) const override final
 Return the boundaries of the surface associated with this identifier. More...
 
virtual const Trk::CylinderBoundsbounds (const int tubeLayer, const int tube) const
 
virtual const Amg::Transform3Dtransform (const Identifier &id) const override final
 Return local to global transform associated with this identifier. More...
 
virtual const Amg::Transform3Dtransform () const override final
 Return local to global transform. More...
 
const Amg::Transform3Dtransform (const int tubeLayer, const int tube) const
 
virtual const Amg::Vector3Dcenter (const Identifier &) const override final
 Return the center of the surface associated with this identifier In the case of silicon it returns the same as center() More...
 
virtual const Amg::Vector3Dcenter () const override final
 Return the center of the element. More...
 
const Amg::Vector3Dcenter (const int tubeLayer, const int tube) const
 
virtual const Amg::Vector3Dnormal (const Identifier &) const override final
 Return the normal of the surface associated with this identifier In the case of silicon it returns the same as normal() More...
 
virtual const Amg::Vector3Dnormal () const override final
 Return the normal of the element. More...
 
std::vector< const Trk::Surface * > surfaces () const
 returns all the surfaces contained in this detector element More...
 
Amg::Transform3D tubeToMultilayerTransf (const Identifier &id) const
 
Amg::Transform3D tubeToMultilayerTransf (const int tubeLayer, const int tube) const
 
Identifier identify () const override final
 Returns the ATLAS Identifier of the MuonReadOutElement. More...
 
IdentifierHash identifyHash () const override final
 Returns the IdentifierHash of the MuonStation, i.e. More...
 
IdentifierHash detectorElementHash () const
 Returns the IdentifierHash of the detector element. More...
 
void setIdentifier (const Identifier &id)
 Sets the Identifier, hashes & station names. More...
 
int getStationIndex () const
 
int getStationEta () const
 
int getStationPhi () const
 
const Amg::Vector3D globalPosition () const
 
const Amg::Transform3DabsTransform () const
 
const Amg::Transform3DdefTransform () const
 
virtual Amg::Vector3D AmdbLRSToGlobalCoords (const Amg::Vector3D &x) const
 
virtual Amg::Transform3D AmdbLRSToGlobalTransform () const
 
virtual Amg::Vector3D GlobalToAmdbLRSCoords (const Amg::Vector3D &x) const
 
virtual Amg::Transform3D GlobalToAmdbLRSTransform () const
 
std::string getTechnologyType () const
 
const std::string & getTechnologyName () const
 
void setTechnologyName (const std::string &str)
 
std::string getStationType () const
 
const std::string & getStationName () const
 
void setStationName (const std::string &)
 
double getSsize () const
 
double getRsize () const
 
double getZsize () const
 
double getLongSsize () const
 
double getLongRsize () const
 
double getLongZsize () const
 
double getStationS () const
 Seems to be exclusively used by the MDTs --> Move it to MdtReadoutElement. More...
 
void setStationS (double)
 
void setLongSsize (double)
 
void setLongRsize (double)
 
void setLongZsize (double)
 
void setSsize (double)
 
void setRsize (double)
 
void setZsize (double)
 
bool largeSector () const
 
bool smallSector () const
 
bool sideA () const
 
bool sideC () const
 
void setParentStationPV (const PVConstLink &)
 
void setParentStationPV ()
 
PVConstLink parentStationPV () const
 
const MuonStationparentMuonStation () const
 
void setParentMuonStation (const MuonStation *)
 
Amg::Transform3D toParentStation () const
 
Amg::Vector3D parentMuonStationPos () const
 
int getIndexOfREinMuonStation () const
 
bool hasCutouts () const
 
void setHasCutouts (bool flag)
 
void refreshCache ()
 
const Muon::IMuonIdHelperSvcidHelperSvc () const
 
Trk::DetectorElemType detectorType () const override final
 Return the Detector element type. More...
 
std::string detectorTypeString () const
 Returns a string of the Detector element type. More...
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Protected Member Functions

const MuonDetectorManagermanager () const
 

Protected Attributes

double m_Ssize {-9999.}
 
double m_Rsize {-9999.}
 
double m_Zsize {-9999.}
 
double m_LongSsize {-9999.}
 
double m_LongRsize {-9999.}
 
double m_LongZsize {-9999.}
 size in the specified direction More...
 
std::string m_techname {"TTT0"}
 MDT or RPC or TGC or CSC plus a two digits subtype; example RPC17. More...
 
std::string m_statname {"XXX0"}
 examples are BMS5, CSS1, EML1 More...
 
int m_caching {-1}
 0 if we want to avoid caching geometry info for tracking interface More...
 
bool m_hasCutouts {false}
 true is there are cutouts in the readdout-element More...
 

Private Member Functions

void geoInitDone ()
 
double getTubeLengthForCaching (const int tubeLayer, const int tube) const
 
double getNominalTubeLengthWoCutouts (const int tubeLayer, const int tube) const
 
Amg::Vector3D localNominalTubePosWoCutouts (const int tubelayer, const int tube) const
 
const Amg::Transform3DfromIdealToDeformed (const int tubelayer, const int tube) const
 
Amg::Vector3D posOnDefChamWire (const Amg::Vector3D &locAMDBPos, const double width_narrow, const double width_wide, const double height, const double thickness, const Amg::Vector3D &fixedPoint) const
 
void wireEndpointsAsBuilt (Amg::Vector3D &locAMDBWireEndP, Amg::Vector3D &locAMDBWireEndN, const int tubelayer, const int tube) const
 
Amg::Transform3D globalTransform (const Amg::Vector3D &tubePos, const Amg::Transform3D &toDeform) const
 
std::unique_ptr< GeoInfomakeGeoInfo (const int tubelayer, const int tube) const
 
const GeoInfogeoInfo (const int tubeLayer, const int tube) const
 
Amg::Transform3D deformedTransform (const int tubelayer, const int tube) const
 
void setIndexOfREinMuonStation ()
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Static Private Member Functions

static Amg::Transform3D tubeToMultilayerTransf (const Amg::Vector3D &tubePos, const Amg::Transform3D &toDeform)
 

Private Attributes

const MdtIdHelperm_idHelper {idHelperSvc()->mdtIdHelper()}
 
const int m_stIdx_BIS {m_idHelper.stationNameIndex("BIS")}
 
const int m_stIdx_BOL {m_idHelper.stationNameIndex("BOL")}
 
unsigned int m_nMDTinStation {0}
 
int m_multilayer {0}
 
int m_nlayers {-1}
 
double m_tubepitch {-9999.}
 
double m_tubelayerpitch {-9999.}
 
int m_ntubesperlayer {-1}
 
int m_nsteps {-1}
 
int m_ntubesinastep {-1}
 
double m_tubelenStepSize {-9999.}
 
double m_cutoutShift {-9999.}
 
double m_endpluglength {-9999.}
 
double m_deadlength {-9999.}
 
bool m_inBarrel {false}
 
std::array< double, maxnstepsm_tubelength {make_array<double, maxnsteps>(-9999.)}
 
std::array< double, maxnlayersm_firstwire_x {make_array<double, maxnlayers>(-9999.)}
 
std::array< double, maxnlayersm_firstwire_y {make_array<double, maxnlayers>(-9999.)}
 
double m_innerRadius {-9999.}
 
double m_tubeWallThickness {-9999.}
 
CxxUtils::CachedValue< int > m_zsignRO_tubeFrame {}
 
std::vector< CxxUtils::CachedUniquePtr< GeoInfo > > m_tubeGeo {}
 
std::vector< CxxUtils::CachedUniquePtr< GeoInfo > > m_backupTubeGeo {}
 
std::vector< CxxUtils::CachedUniquePtr< Amg::Transform3D > > m_deformTransf {}
 
const BLineParm_BLinePar {nullptr}
 
CxxUtils::CachedValue< Amg::Vector3Dm_elemNormal {}
 
std::vector< CxxUtils::CachedUniquePtr< Trk::SaggedLineSurface > > m_tubeSurfaces {}
 
std::vector< CxxUtils::CachedUniquePtr< Trk::CylinderBounds > > m_tubeBounds {}
 
std::atomic< bool > m_haveTubeSurfaces {false}
 Flag whether any elements have been inserted into the corresponding vectors. More...
 
std::atomic< bool > m_haveTubeGeo {false}
 
std::atomic< bool > m_haveTubeBounds {false}
 
std::atomic< bool > m_haveDeformTransf {false}
 
CxxUtils::CachedUniquePtr< Trk::Surfacem_associatedSurface {}
 
CxxUtils::CachedUniquePtr< Trk::SurfaceBoundsm_associatedBounds {}
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {"Muon::MuonIdHelperSvc/MuonIdHelperSvc", "MuonDetectorManager"}
 
Trk::DetectorElemType m_type {Trk::DetectorElemType::SolidState}
 
Identifier m_id {0}
 extended data-collection identifier More...
 
IdentifierHash m_idhash {0}
 data-collection hash identifier More...
 
IdentifierHash m_detectorElIdhash {0}
 detector element hash identifier More...
 
int m_indexOfREinMuonStation {-999}
 index of this RE in the mother MuonStation More...
 
double m_stationS {0.}
 
int m_stIdx {-1}
 Identifier field of the station index. More...
 
int m_eta {-1}
 Identifier field of the station eta. More...
 
int m_phi {-1}
 Identifier field of the station phi. More...
 
PVConstLink m_parentStationPV {nullptr}
 
const MuonStationm_parentMuonStation {nullptr}
 
MuonDetectorManagerm_muon_mgr {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...
 

Friends

class MuonGMR4::ReadoutGeomCnvAlg
 
class MuonChamber
 
class MuonChamberLite
 

Detailed Description

Definition at line 51 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h.

Constructor & Destructor Documentation

◆ MdtReadoutElement()

MuonGM::MdtReadoutElement::MdtReadoutElement ( GeoVFullPhysVol *  pv,
const std::string &  stName,
MuonDetectorManager mgr 
)

Definition at line 61 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

61  :
63  // get the setting of the caching flag from the manager
64  m_inBarrel = stName[0]== 'B';
65 
66  setStationName(stName);
67  }

◆ ~MdtReadoutElement()

MuonGM::MdtReadoutElement::~MdtReadoutElement ( )
default

Member Function Documentation

◆ absTransform()

const Amg::Transform3D & MuonGM::MuonReadoutElement::absTransform ( ) const
inlineinherited

Definition at line 210 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

210 { return getMaterialGeom()->getAbsoluteTransform(); }

◆ AmdbLRSToGlobalCoords()

Amg::Vector3D MuonGM::MuonReadoutElement::AmdbLRSToGlobalCoords ( const Amg::Vector3D x) const
virtualinherited

Reimplemented in MuonGM::sTgcReadoutElement, and MuonGM::MMReadoutElement.

Definition at line 141 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

141  {
142  return AmdbLRSToGlobalTransform() * x;
143  }

◆ AmdbLRSToGlobalTransform()

Amg::Transform3D MuonGM::MuonReadoutElement::AmdbLRSToGlobalTransform ( ) const
virtualinherited

◆ barrel()

bool MuonGM::MdtReadoutElement::barrel ( ) const

Returns whether the chamber is in the barrel (Assement on first later in stationName)

◆ bounds() [1/3]

const Trk::SurfaceBounds & MuonGM::MdtReadoutElement::bounds ( ) const
finaloverridevirtual

Return the boundaries of the element.

Implements Trk::TrkDetElementBase.

Definition at line 916 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

916  {
917  if (!m_associatedBounds) {
918  if (barrel()) {
919  m_associatedBounds.set(
920  std::make_unique<Trk::RectangleBounds>(getSsize() / 2., getZsize() / 2.));
921  } else {
922  m_associatedBounds.set(std::make_unique<Trk::TrapezoidBounds>(
923  getSsize() / 2., getLongSsize() / 2., getRsize() / 2.));
924  }
925  }
926  return *m_associatedBounds;
927  }

◆ bounds() [2/3]

virtual const Trk::CylinderBounds& MuonGM::MdtReadoutElement::bounds ( const Identifier id) const
finaloverridevirtual

Return the boundaries of the surface associated with this identifier.

For TRT this will be a straw, while for silicon it returns the same as bounds()

Implements Trk::TrkDetElementBase.

◆ bounds() [3/3]

const Trk::CylinderBounds & MuonGM::MdtReadoutElement::bounds ( const int  tubeLayer,
const int  tube 
) const
virtual

Definition at line 856 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

856  {
857  int istep = 0;
858  int ntot_steps = m_nsteps;
859 
860  if (hasCutouts() && manager()->MinimalGeoFlag() == 0) {
861  ntot_steps = m_nlayers * m_ntubesperlayer;
862  istep = (tubeLayer - 1) * m_ntubesperlayer + tube - 1;
863  } else {
864  if (endcap()) istep = int((tube - 1) / m_ntubesinastep);
865 
866  if (istep < 0 || istep >= ntot_steps) {
867  ATH_MSG_WARNING( "bounds for Element named "<< " with tech. " << getTechnologyType()
868  << " DEid = " << idHelperSvc()->toStringDetEl(identify()) << " called with: tubeL, tube " << tubeLayer << " " << tube
869  << "; step " << istep << " out of range 0-" << m_nsteps - 1 << " m_ntubesinastep " << m_ntubesinastep );
870  ATH_MSG_WARNING( "Please run in DEBUG mode to get extra diagnostic; setting istep = 0" );
871  }
872  }
873  if ((unsigned int)istep >= m_tubeBounds.size()) {
874  THROW_EXCEPTION(__func__<<"("<<tubeLayer<<","<<tube<<") but m_tubeBounds.size()="<<m_tubeBounds.size()<<" for "<<
875  idHelperSvc()->toStringDetEl(identify()));
876  }
878  if (!ptr) {
879  double tubelength = getTubeLengthForCaching(tubeLayer, tube);
880  ptr.set(std::make_unique<Trk::CylinderBounds>(innerTubeRadius(), 0.5 * tubelength - m_deadlength));
881  if (!m_haveTubeBounds) m_haveTubeBounds = true;
882  }
883  return *ptr;
884  }

◆ center() [1/3]

const Amg::Vector3D & MuonGM::MdtReadoutElement::center ( ) const
finaloverridevirtual

Return the center of the element.

Implements Trk::TrkDetElementBase.

Definition at line 914 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

914 { return surface().center(); }

◆ center() [2/3]

virtual const Amg::Vector3D& MuonGM::MdtReadoutElement::center ( const Identifier id) const
finaloverridevirtual

Return the center of the surface associated with this identifier In the case of silicon it returns the same as center()

Implements Trk::TrkDetElementBase.

◆ center() [3/3]

const Amg::Vector3D & MuonGM::MdtReadoutElement::center ( const int  tubeLayer,
const int  tube 
) const

Definition at line 885 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

885 { return geoInfo(tubeLayer, tube).m_center; }

◆ clearBLinePar()

void MuonGM::MdtReadoutElement::clearBLinePar ( )

Definition at line 70 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

70 { m_BLinePar = nullptr; }

◆ clearCache()

void MuonGM::MdtReadoutElement::clearCache ( )
finaloverridevirtual

Implements MuonGM::MuonReadoutElement.

Definition at line 928 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

928  {
929  ATH_MSG_DEBUG( "Clearing cache for ReadoutElement " << idHelperSvc()->toStringDetEl(identify()) );
930  if (m_associatedSurface) {
931  m_associatedSurface.release();
932  }
933  else ATH_MSG_VERBOSE( "no associated surface to be deleted" );
934 
935  if (m_associatedBounds) {
936  m_associatedBounds.release();
937  } ATH_MSG_VERBOSE( "no associated bounds to be deleted" );
939  if (m_haveTubeSurfaces) {
940  m_haveTubeSurfaces = false;
941  for (auto& s : m_tubeSurfaces) { s.release(); }
942  }
943  if (m_haveTubeGeo) {
944  m_haveTubeGeo = false;
945  for (auto& g : m_tubeGeo) { g.release(); }
946  }
947  if (m_haveTubeBounds) {
948  m_haveTubeBounds = false;
949  for (auto& b : m_tubeBounds) { b.release(); }
950  }
951  // reset here the deform-related transforms
952  if (m_haveDeformTransf) {
953  m_haveDeformTransf = false;
954  for (auto& d : m_deformTransf) { d.release(); }
955  }
956  }

◆ containsId()

bool MuonGM::MdtReadoutElement::containsId ( const Identifier id) const
overridevirtual

Implements MuonGM::MuonReadoutElement.

Definition at line 1029 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

1029  {
1030  if (idHelperSvc()->detElId(id) != identify()) return false;
1031  int layer = m_idHelper.tubeLayer(id);
1032  if (layer < 1 || layer > getNLayers()) return false;
1033  int tube = m_idHelper.tube(id);
1034  return tube >= 1 && tube <= getNtubesperlayer();
1035  }

◆ deformedTransform()

Amg::Transform3D MuonGM::MdtReadoutElement::deformedTransform ( const int  tubelayer,
const int  tube 
) const
private

Definition at line 462 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

462  {
463 
464  const MuonStation* ms = parentMuonStation();
465  if ( !ms->hasBLines() && !ms->hasMdtAsBuiltParams()) {
466  return Amg::Transform3D::Identity();
467  }
468  const Amg::Vector3D fixedPoint = ms->getBlineFixedPointInAmdbLRS();
469 
470 
471  // Chamber parameters
472  double width_narrow = m_Ssize;
473  double width_wide = m_LongSsize;
474  double height = barrel() ? ms->ZsizeMdtStation() : ms->RsizeMdtStation();
475  double thickness = barrel() ? ms->RsizeMdtStation() : ms->ZsizeMdtStation();
476 
477 
478 
479  ATH_MSG_VERBOSE("Calculate deformed transform "<<idHelperSvc()->toStringDetEl(identify())
480  <<", layer: "<<tubeLayer<<", tube: "<<tube
481  <<", fixedPoint: "<<Amg::toString(fixedPoint)<<" / "
482  <<Amg::toString(ms->getGeoTransform()->getDefTransform() *ms->getNativeToAmdbLRS().inverse()* fixedPoint)
483  <<", height: "<<height<<", thickness: "<<thickness
484  <<", ideal tube: "<<Amg::toString(localNominalTubePosWoCutouts(tubeLayer,tube)));
485 
486 #ifndef NDEBUG
487  double heightML = barrel() ? m_Zsize : m_Rsize;
488  double thicknessML = barrel() ? m_Rsize : m_Zsize;
489  if (std::abs(height - heightML) > 10.) {
490  ATH_MSG_DEBUG( "RE " << idHelperSvc()->toStringDetEl(identify())
491  << "Different ML and MDTStation length in the precision coord.direction --- MultiLayerHeight, MDTstationHeigh "
492  << heightML << " " << height << " MultiLayerThickness, MDTstationThickness " << thicknessML << " " << thickness);
493  }
494 #endif
495  // Chamber dimension in Z is defined with extraneous glue width. Correct for it
496  double glue = (tubePitch() - 2. * outerTubeRadius());
497  height -= glue;
498 
499  // Calculate transformation from native to AMDB.
500  const Amg::Transform3D toAMDB = ms->getNativeToAmdbLRS() * toParentStation();
501  const Amg::Transform3D fromAMDB = toAMDB.inverse();
502 
503  // Get positions of the wire center and end without deformations
504  Amg::Vector3D pt_center = localNominalTubePosWoCutouts(tubeLayer, tube);
505  double halftubelen = 0.5 * getNominalTubeLengthWoCutouts(tubeLayer, tube);
506 
507  // Compute tube ends in AMDB coordinates
508  Amg::Vector3D pt_end1 = toAMDB * pt_center + halftubelen * Amg::Vector3D::UnitX(); // s>0 side
509  Amg::Vector3D pt_end2 = toAMDB * pt_center - halftubelen * Amg::Vector3D::UnitX(); // s>0 side
510 
511  Amg::Vector3D pt_end1_new = pt_end1;
512  Amg::Vector3D pt_end2_new = pt_end2;
513 
514  // if there are as built parameters ... apply them here
515  if (ms->hasMdtAsBuiltParams()) {
516  wireEndpointsAsBuilt(pt_end1_new, pt_end2_new, tubeLayer, tube);
517  }
518 
519  // if there are deformation parameters ... apply them here
520  if (ms->hasBLines()) {
521 
522  // Get positions after the deformations applied
523  // first wire end point
524  pt_end1_new = posOnDefChamWire(pt_end1_new, width_narrow, width_wide, height, thickness, fixedPoint);
525 
526  // second wire end point
527  pt_end2_new = posOnDefChamWire(pt_end2_new, width_narrow, width_wide, height, thickness, fixedPoint);
528  }
529 
530  // Switch tube ends back to MGM coordinates
531  pt_end1 = fromAMDB * pt_end1;
532  pt_end2 = fromAMDB * pt_end2;
533  pt_end1_new = fromAMDB * pt_end1_new;
534  pt_end2_new = fromAMDB * pt_end2_new;
535 
536  // Calculate deformation. Make sure that the wire length stays the same.
537  // Code in positionOnDeformedChamber does not provide this by default.
538  // Break transformation into translation of the wire center and the rotation of the wire
539  // Move to the coordinate system originated at the wire center, then rotate the wire, then
540  // move wire center to the new position
541  const Amg::Vector3D pt_center_new = 0.5 * (pt_end1_new + pt_end2_new);
542  const Amg::Transform3D to_center{Amg::getTranslate3D(-pt_center)};
543  const Amg::Transform3D from_center{Amg::getTranslate3D(pt_center_new)};
544  const Amg::Vector3D old_direction = (pt_end2 - pt_end1).unit();
545  const Amg::Vector3D new_direction = (pt_end2_new - pt_end1_new).unit();
546  const Amg::Vector3D rotation_vector = old_direction.cross(new_direction);
547 
548 
549  Amg::Transform3D deformedTransform{Amg::Transform3D::Identity()};
550  if (rotation_vector.mag() > 10. * std::numeric_limits<double>::epsilon()) {
551  const Amg::AngleAxis3D wire_rotation(std::asin(rotation_vector.mag()), rotation_vector.unit());
552  deformedTransform = from_center * wire_rotation * to_center;
553  } else {
554  deformedTransform = from_center * to_center;
555  }
556  ATH_MSG_VERBOSE("To center "<<GeoTrf::toString(to_center)<<" from: "<<GeoTrf::toString(from_center)<<
557  " -- direction: "<<GeoTrf::toString(old_direction)<<" vs. "<<GeoTrf::toString(new_direction)
558  <<" --> rot: "<<GeoTrf::toString(rotation_vector)<<" ==> "<<GeoTrf::toString(deformedTransform,true));
559  return deformedTransform;
560  }

◆ defTransform()

const Amg::Transform3D & MuonGM::MuonReadoutElement::defTransform ( ) const
inlineinherited

Definition at line 212 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

212 { return getMaterialGeom()->getDefAbsoluteTransform(); }

◆ detectorElementHash()

IdentifierHash MuonGM::MuonReadoutElement::detectorElementHash ( ) const
inlineinherited

Returns the IdentifierHash of the detector element.

Unlike the identifyHash, this hash is unique for each readout element

Definition at line 186 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

186 { return m_detectorElIdhash; }

◆ detectorType()

Trk::DetectorElemType MuonGM::MuonReadoutElement::detectorType ( ) const
inlinefinaloverridevirtualinherited

Return the Detector element type.

Implements Trk::TrkDetElementBase.

Definition at line 138 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

138 { return m_type; }

◆ detectorTypeString()

std::string Trk::TrkDetElementBase::detectorTypeString ( ) const
inherited

Returns a string of the Detector element type.

Definition at line 10 of file TrkDetElementBase.cxx.

10  {
11  auto type = detectorType();
13  return "SolidState";
15  return "Silicon";
16  else if (type == Trk::DetectorElemType::TRT)
17  return "TRT";
18  else if (type == Trk::DetectorElemType::Csc)
19  return "Csc";
20  else if (type == Trk::DetectorElemType::Mdt)
21  return "Mdt";
22  else if (type == Trk::DetectorElemType::Rpc)
23  return "Rpc";
24  else if (type == Trk::DetectorElemType::Tgc)
25  return "Tgc";
27  return "sTgc";
28  else if (type == Trk::DetectorElemType::MM)
29  return "Mm";
30  return "Unknown";
31 }

◆ distanceFromRO() [1/2]

double MuonGM::MdtReadoutElement::distanceFromRO ( const Amg::Vector3D GlobalHitPosition,
const Identifier id 
) const

◆ distanceFromRO() [2/2]

double MuonGM::MdtReadoutElement::distanceFromRO ( const Amg::Vector3D GlobalHitPosition,
const int  tubelayer,
const int  tube 
) const

Definition at line 190 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

190  {
191  // x is given in the global reference frame
192  const Amg::Vector3D cPos = center(tubeLayer, tube);
193  const Amg::Vector3D roPos = ROPos(tubeLayer, tube);
194  const Amg::Vector3D c_ro = cPos - roPos;
195  const Amg::Vector3D x_ro = x - roPos;
196 
197  double scalprod = c_ro.dot(x_ro);
198  double wlen = getWireLength(tubeLayer, tube);
199  if (wlen > 10. * CLHEP::mm)
200  scalprod = std::abs(2. * scalprod / getWireLength(tubeLayer, tube));
201  else {
202  ATH_MSG_WARNING( " Distance of Point " <<Amg::toString(x) << " from RO side cannot be calculated (=0) since wirelength = " << wlen );
203  scalprod = 0.;
204  }
205  return scalprod;
206  }

◆ endcap()

bool MuonGM::MdtReadoutElement::endcap ( ) const

Returns whether the chamber is in the endcap.

◆ fillCache()

void MuonGM::MdtReadoutElement::fillCache ( )
finaloverridevirtual

Implements MuonGM::MuonReadoutElement.

Definition at line 967 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

967  {
968  ATH_MSG_DEBUG( "Filling cache for ReadoutElement " << idHelperSvc()->toStringDetEl(identify()));
969 
970  const Trk::PlaneSurface* tmpSurface = dynamic_cast<const Trk::PlaneSurface*>(&surface()); //<! filling m_associatedSurface
971  const Trk::SurfaceBounds* tmpBounds = nullptr; //<! filling m_associatedBounds
972  if (barrel())
973  tmpBounds = dynamic_cast<const Trk::RectangleBounds*>(&bounds());
974  else
975  tmpBounds = dynamic_cast<const Trk::TrapezoidBounds*>(&bounds());
976  ATH_MSG_VERBOSE( "global Surface / Bounds pointers " << tmpSurface << " " << tmpBounds );
977  ATH_MSG_VERBOSE( "global Normal " << normal() );
978 
979  const Trk::CylinderBounds* tmpCil = nullptr;
980  const Trk::SaggedLineSurface* tmpSaggL = nullptr;
982  Amg::Transform3D myTransform{Amg::Transform3D::Identity()};
983  for (int tl = 1; tl <= getNLayers(); ++tl) {
984  for (int tube = 1; tube <= getNtubesperlayer(); ++tube) {
985  // in case of BMG chambers, do not check the 'dead' tubes
986  // (the tubes are numbered from 1-54 for each however there are cutouts for the
987  // alignment system where no tubes are built-in, meaning, those tubes do not exist/are 'dead')
988  if (manager()->mdtIdHelper()->isBMG(identify())) {
989  PVConstLink cv = getMaterialGeom();
990  // usually the tube number corresponds to the child number, however for
991  // BMG chambers full tubes are skipped during the building process
992  // therefore the matching needs to be done via the volume ID
993  int packed_id = tube + maxNTubesPerLayer * tl;
994  bool found = false;
995  geoGetIds(
996  [&](int id) {
997  if (!found && id == packed_id) {
998  myTransform = transform(tl, tube); //<! filling m_tubeTransf
999  myPoint = center(tl, tube); //<! filling m_tubeCenter
1000  tmpCil = dynamic_cast<const Trk::CylinderBounds*>(&bounds(tl, tube)); //<! filling m_tubeBounds
1001  tmpSaggL = dynamic_cast<const Trk::SaggedLineSurface*>(&surface(tl, tube)); //<! filling m_tubeSurfaces
1002  found = true;
1003  }
1004  },
1005  &*cv);
1006  if (found) {
1007  ATH_MSG_VERBOSE( "tubeLayer/tube " << tl << " " << tube << " transform at origin "
1008  << Amg::toString(myTransform.linear()) );
1009  ATH_MSG_VERBOSE( "tubeLayer/tube " << tl << " " << tube << " tube center " << myPoint );
1010  ATH_MSG_VERBOSE( "tubeLayer/tube " << tl << " " << tube << " tube bounds pointer " << tmpCil );
1011  ATH_MSG_VERBOSE( "tubeLayer/tube " << tl << " " << tube << " tube surface pointer " << tmpSaggL );
1012  }
1013  } else {
1014  // print in order to compute !!!
1015  myTransform = transform(tl, tube); //<! filling m_tubeTransf
1016  myPoint = center(tl, tube); //<! filling m_tubeCenter
1017  tmpCil = dynamic_cast<const Trk::CylinderBounds*>(&bounds(tl, tube)); //<! filling m_tubeBounds
1018  tmpSaggL = dynamic_cast<const Trk::SaggedLineSurface*>(&surface(tl, tube)); //<! filling m_tubeSurfaces
1019  ATH_MSG_VERBOSE( "tubeLayer/tube " << tl << " " << tube << " transform at origin "
1020  << Amg::toString(myTransform.translation()) );
1021  ATH_MSG_VERBOSE( "tubeLayer/tube " << tl << " " << tube << " tube center " << myPoint );
1022  ATH_MSG_VERBOSE( "tubeLayer/tube " << tl << " " << tube << " tube bounds pointer " << tmpCil );
1023  ATH_MSG_VERBOSE( "tubeLayer/tube " << tl << " " << tube << " tube surface pointer " << tmpSaggL );
1024  }
1025  }
1026  }
1027  }

◆ fromIdealToDeformed()

const Amg::Transform3D & MuonGM::MdtReadoutElement::fromIdealToDeformed ( const int  tubelayer,
const int  tube 
) const
private

Definition at line 434 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

434  {
435  size_t itube = (tubeLayer - 1) * m_ntubesperlayer + tube - 1;
436  if (itube >= m_deformTransf.size()) {
437  ATH_MSG_WARNING(__func__<<"() :"<<__LINE__<< " called with tubeLayer or tube out of range in chamber "
438  << idHelperSvc()->toStringDetEl(identify()) << " : layer " << tubeLayer << " max " << m_nlayers << " tube " << tube
439  << " max " << m_ntubesperlayer << " will compute deformation for first tube in this chamber" );
440  ATH_MSG_WARNING( "Please run in DEBUG mode to get extra diagnostic" );
441  itube = 0;
442  }
443 
445  if (!ptr) {
446  Amg::Transform3D trans = deformedTransform(tubeLayer, tube);
447  ptr.set(std::make_unique<Amg::Transform3D>(std::move(trans)));
449  }
450  return *ptr;
451  }

◆ geoInfo()

const MdtReadoutElement::GeoInfo & MuonGM::MdtReadoutElement::geoInfo ( const int  tubeLayer,
const int  tube 
) const
private

Definition at line 811 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

811  {
812  size_t itube = (tubeLayer - 1) * m_ntubesperlayer + tube - 1;
813  if (itube >= m_tubeGeo.size()) {
814  ATH_MSG_WARNING(__func__<<"() :"<<__LINE__<<" called with tubeLayer or tube out of range in chamber "
815  << idHelperSvc()->toStringDetEl(identify()) << " : layer " << tubeLayer << " max " << m_nlayers << " tube " << tube
816  << " max " << m_ntubesperlayer << " will compute transform for first tube in this chamber" );
817  ATH_MSG_WARNING( "Please run in DEBUG mode to get extra diagnostic" );
818  itube = 0;
819  }
820 
822  if (!ptr) {
823  ptr.set(makeGeoInfo(tubeLayer, tube));
824  if (!m_haveTubeGeo) m_haveTubeGeo = true;
825  }
826  return *ptr;
827  }

◆ geoInitDone()

void MuonGM::MdtReadoutElement::geoInitDone ( )
private

Definition at line 94 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

94  {
98 
99  int ntot_steps = m_nsteps;
100  if (hasCutouts() && manager()->MinimalGeoFlag() == 0) { ntot_steps = m_nlayers * m_ntubesperlayer; }
101  m_tubeBounds.resize(ntot_steps);
102  }

◆ getActiveTubeLength()

double MuonGM::MdtReadoutElement::getActiveTubeLength ( const int  tubeLayer,
const int  tube 
) const

◆ getBLinePar()

const BLinePar* MuonGM::MdtReadoutElement::getBLinePar ( ) const
inline

◆ getIndexOfREinMuonStation()

int MuonGM::MuonReadoutElement::getIndexOfREinMuonStation ( ) const
inherited

◆ getLongRsize()

double MuonGM::MuonReadoutElement::getLongRsize ( ) const
inlineinherited

◆ getLongSsize()

double MuonGM::MuonReadoutElement::getLongSsize ( ) const
inlineinherited

◆ getLongZsize()

double MuonGM::MuonReadoutElement::getLongZsize ( ) const
inlineinherited

◆ getMultilayer()

int MuonGM::MdtReadoutElement::getMultilayer ( ) const

Returns the multilayer represented by the readout element.

◆ getNLayers()

int MuonGM::MdtReadoutElement::getNLayers ( ) const

Returns the number of tube layers inside the multilayer.

◆ getNominalTubeLengthWoCutouts()

double MuonGM::MdtReadoutElement::getNominalTubeLengthWoCutouts ( const int  tubeLayer,
const int  tube 
) const
private

Definition at line 408 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

408  {
409  if (barrel())
410  return m_Ssize;
411  else {
412  int istep = int((tube - 1) / m_ntubesinastep);
413  if (istep < 0 || istep >= m_nsteps) {
414  ATH_MSG_WARNING( "getNominalTubeLengthWoCutouts for Element named " << idHelperSvc()->toStringDetEl(identify())
415  << " called with: tubeL, tube " << tubeLayer
416  << " " << tube << "; step " << istep << " out of range 0-" << m_nsteps - 1 << " m_ntubesinastep " << m_ntubesinastep);
417  istep = 0;
418  }
419  return m_tubelength[istep];
420  }
421  }

◆ getNtubesinastep()

int MuonGM::MdtReadoutElement::getNtubesinastep ( ) const

Returns the number of tubes in the endcap trapezoid sharing the same length.

◆ getNtubesperlayer()

int MuonGM::MdtReadoutElement::getNtubesperlayer ( ) const

Returns the number of tubes in each tube layer.

◆ getRsize()

double MuonGM::MuonReadoutElement::getRsize ( ) const
inlineinherited

◆ getSsize()

double MuonGM::MuonReadoutElement::getSsize ( ) const
inlineinherited

◆ getStationEta()

int MuonGM::MuonReadoutElement::getStationEta ( ) const
inlineinherited

◆ getStationIndex()

int MuonGM::MuonReadoutElement::getStationIndex ( ) const
inlineinherited

◆ getStationName()

const std::string & MuonGM::MuonReadoutElement::getStationName ( ) const
inlineinherited

◆ getStationPhi()

int MuonGM::MuonReadoutElement::getStationPhi ( ) const
inlineinherited

◆ getStationS()

double MuonGM::MuonReadoutElement::getStationS ( ) const
inlineinherited

Seems to be exclusively used by the MDTs --> Move it to MdtReadoutElement.

Definition at line 202 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

202 { return m_stationS; }

◆ getStationType()

std::string MuonGM::MuonReadoutElement::getStationType ( ) const
inlineinherited

Definition at line 189 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

189 { return m_statname.substr(0,3); }

◆ getTechnologyName()

const std::string & MuonGM::MuonReadoutElement::getTechnologyName ( ) const
inlineinherited

◆ getTechnologyType()

std::string MuonGM::MuonReadoutElement::getTechnologyType ( ) const
inlineinherited

Definition at line 187 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

187 { return m_techname.substr(0, 3); }

◆ getTubeLengthForCaching()

double MuonGM::MdtReadoutElement::getTubeLengthForCaching ( const int  tubeLayer,
const int  tube 
) const
private

Definition at line 104 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

104  {
105  double nominalTubeLength = 0.;
106  if (barrel())
107  nominalTubeLength = m_Ssize;
108  else {
109  int istep = int((tube - 1) / m_ntubesinastep);
110  if (istep < 0 || istep >= m_nsteps) {
111  ATH_MSG_WARNING( "getTubeLenght for Element with tech. " << getTechnologyType()
112  << " DEid = " << idHelperSvc()->toStringDetEl(identify()) << " called with: tubeL, tube " << tubeLayer << " " << tube
113  << "; step " << istep << " out of range 0-" << m_nsteps - 1 << " m_ntubesinastep " << m_ntubesinastep );
114  istep = 0;
115  }
116  nominalTubeLength = m_tubelength[istep];
117  }
118 
119  double tlength = nominalTubeLength;
120 
121  if (hasCutouts()) {
122  if (manager()->MinimalGeoFlag() == 0) {
123  ATH_MSG_VERBOSE( " MdtReadoutElement " <<idHelperSvc()->toStringDetEl(identify())
124  << " has cutouts, check for real tube length for tubeLayer, tube " << tubeLayer << " " << tube );
125  PVConstLink cv = getMaterialGeom(); // it is "Multilayer"
126  int nGrandchildren = cv->getNChildVols();
127  if (nGrandchildren <= 0) return tlength;
128  // child vol 0 is foam; 1 to (nGrandchildren-1) should be tubes
129  int ii = (tubeLayer - 1) * m_ntubesperlayer + tube;
130  // BIS78 only (the BIS7 of Run1/2 has no cutouts, thus, this block won't be reached)
131  if ((getStationIndex() == m_stIdx_BIS && std::abs(getStationEta()) == 7)) --ii;
132  if (m_idHelper.isBMG(identify())) {
133  // usually the tube number corresponds to the child number, however for
134  // BMG chambers full tubes are skipped during the building process
135  // therefore the matching needs to be done via the volume ID
136  int packed_id = tube + maxNTubesPerLayer * tubeLayer;
137  int kk = 0;
138  bool found = false;
139  geoGetIds(
140  [&](int id) {
141  if (!found && id == packed_id) {
142  ii = kk;
143  found = true;
144  }
145  ++kk;
146  }, cv);
147  if (found) {
148  ATH_MSG_DEBUG( " MdtReadoutElement tube match found for BMG - input : tube(" << tube << "), layer("
149  << tubeLayer << ") - output match : tube(" << ii % maxNTubesPerLayer << "), layer(" << ii / maxNTubesPerLayer
150  << ")" );
151  }
152  }
153  if (ii >= nGrandchildren) {
154  ATH_MSG_WARNING( " MdtReadoutElement " << idHelperSvc()->toStringDetEl(identify()) << " has cutouts, nChild = " << nGrandchildren
155  << " --- getTubeLength is looking for child with index ii=" << ii << " for tubeL and tube = " << tubeLayer << " "
156  << tube );
157  ATH_MSG_WARNING( "returning nominalTubeLength " );
158  return tlength;
159  }
160  if (ii < 0) {
161  ATH_MSG_WARNING( " MdtReadoutElement " << idHelperSvc()->toStringDetEl(identify()) << " has cutouts, nChild = " << nGrandchildren
162  << " --- getTubeLength is looking for child with index ii=" << ii << " for tubeL and tube = " << tubeLayer << " "
163  << tube );
164  ATH_MSG_WARNING( "returning nominalTubeLength " );
165  return tlength;
166  }
167  PVConstLink physChild = cv->getChildVol(ii);
168  const GeoShape* shape = physChild->getLogVol()->getShape();
169  if (shape == nullptr) return tlength;
170  const GeoTube* theTube = dynamic_cast<const GeoTube*>(shape);
171  if (theTube != nullptr)
172  tlength = 2. * theTube->getZHalfLength();
173  else
174  ATH_MSG_WARNING( "PhysChild with index " << ii
175  << " out of (tubeLayer-1)*m_ntubesperlayer+tube with tl=" << tubeLayer << " tubes/lay=" << m_ntubesperlayer
176  << " t=" << tube << " for MdtReadoutElement " << idHelperSvc()->toStringDetEl(identify()) );
177  }
178  if (std::abs(tlength - nominalTubeLength) > 0.1) {
179  ATH_MSG_VERBOSE( "Tube " << tube << " in tubeLayer = " << tubeLayer
180  << " is affected by a cutout: eff. length = " << tlength << " while nominal = " << nominalTubeLength
181  << " in station " << idHelperSvc()->toStringDetEl(identify()));
182  } else {
183  ATH_MSG_VERBOSE( "Tube " << tube << " in tubeLayer = " << tubeLayer
184  << " is NOT affected by the cutout: eff. length = " << tlength << " while nominal = " << nominalTubeLength);
185  }
186  }
187  return tlength;
188  }

◆ getWireFirstLocalCoordAlongR()

bool MuonGM::MdtReadoutElement::getWireFirstLocalCoordAlongR ( int  tubeLayer,
double &  coord 
) const

Definition at line 87 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

87  {
88  coord = -9999.;
89  if (tubeLayer > getNLayers() || tubeLayer < 1) return false;
90  coord = m_firstwire_y[tubeLayer - 1];
91  return true;
92  }

◆ getWireFirstLocalCoordAlongZ()

bool MuonGM::MdtReadoutElement::getWireFirstLocalCoordAlongZ ( int  tubeLayer,
double &  coord 
) const

Definition at line 81 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

81  {
82  coord = -9999.;
83  if (tubeLayer > getNLayers() || tubeLayer < 1) return false;
84  coord = m_firstwire_x[tubeLayer - 1];
85  return true;
86  }

◆ getWireLength()

double MuonGM::MdtReadoutElement::getWireLength ( const int  tubeLayer,
const int  tube 
) const

◆ getZsize()

double MuonGM::MuonReadoutElement::getZsize ( ) const
inlineinherited

◆ globalPosition()

const Amg::Vector3D MuonGM::MuonReadoutElement::globalPosition ( ) const
inherited

Definition at line 47 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

47 { return absTransform().translation(); }

◆ GlobalToAmdbLRSCoords()

Amg::Vector3D MuonGM::MuonReadoutElement::GlobalToAmdbLRSCoords ( const Amg::Vector3D x) const
virtualinherited

Reimplemented in MuonGM::sTgcReadoutElement, and MuonGM::MMReadoutElement.

Definition at line 149 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

149  {
150  return GlobalToAmdbLRSTransform() * x;
151  }

◆ GlobalToAmdbLRSTransform()

Amg::Transform3D MuonGM::MuonReadoutElement::GlobalToAmdbLRSTransform ( ) const
virtualinherited

◆ globalToLocalTransf() [1/2]

Amg::Transform3D MuonGM::MdtReadoutElement::globalToLocalTransf ( const Identifier id) const

◆ globalToLocalTransf() [2/2]

Amg::Transform3D MuonGM::MdtReadoutElement::globalToLocalTransf ( const int  tubeLayer,
const int  tube 
) const

Definition at line 401 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

401  {
402  return transform(tubeLayer, tube).inverse();
403  }

◆ globalTransform()

Amg::Transform3D MuonGM::MdtReadoutElement::globalTransform ( const Amg::Vector3D tubePos,
const Amg::Transform3D toDeform 
) const
private

Definition at line 392 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

392  {
393  return transform() * tubeToMultilayerTransf(tubePos, toDeform);
394  }

◆ hasCutouts()

bool MuonGM::MuonReadoutElement::hasCutouts ( ) const
inlineinherited

◆ identify()

Identifier MuonGM::MuonReadoutElement::identify ( ) const
inlinefinaloverridevirtualinherited

Returns the ATLAS Identifier of the MuonReadOutElement.

Usually the Identifier corresponds to the first channel covered by the Element

Implements Trk::TrkDetElementBase.

Definition at line 184 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

184 { return m_id; }

◆ identifyHash()

IdentifierHash MuonGM::MuonReadoutElement::identifyHash ( ) const
inlinefinaloverridevirtualinherited

Returns the IdentifierHash of the MuonStation, i.e.

2 readoutelements with same sationIndex, stationEta, stationPhi have the same identifiyHash

Implements Trk::TrkDetElementBase.

Definition at line 185 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

185 { return m_idhash; }

◆ idHelperSvc()

const Muon::IMuonIdHelperSvc* MuonGM::MuonReadoutElement::idHelperSvc ( ) const
inlineinherited

◆ 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 MuonGM::MdtReadoutElement::innerTubeRadius ( ) const

Returns the inner tube radius excluding the aluminium walls.

◆ isAtReadoutSide() [1/2]

int MuonGM::MdtReadoutElement::isAtReadoutSide ( const Amg::Vector3D GlobalHitPosition,
const Identifier id 
) const

◆ isAtReadoutSide() [2/2]

int MuonGM::MdtReadoutElement::isAtReadoutSide ( const Amg::Vector3D GlobalHitPosition,
const int  tubelayer,
const int  tube 
) const

Definition at line 208 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

208  {
209  double distance = distanceFromRO(GlobalHitPosition, tubeLayer, tube);
210  if (distance < 0) {
211  ATH_MSG_WARNING( "isAtReadoutSide() - GlobalHitPosition appears to be outside the tube volume " << distance );
212  return 1;
213  } else if (distance <= getWireLength(tubeLayer, tube) / 2.)
214  return 1;
215  else if (distance < getWireLength(tubeLayer, tube))
216  return -1;
217  else {
218  ATH_MSG_WARNING( "isAtReadoutSide() - GlobalHitPosition appears to be outside the tube volume " << distance );
219  return -1;
220  }
221  }

◆ largeSector()

bool MuonGM::MuonReadoutElement::largeSector ( ) const
inherited

Definition at line 49 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

49  {
50  // this doesn't apply to TGC
51  if(m_statname.size() >= 3){
52  char c = m_statname[2];
53  if (c == 'L')
54  return true;
55  else if (c == 'S')
56  return false;
57  else {
58  if (c == 'E' || c == 'F' || c == 'G') return false;
59  if (c == 'M' || c == 'R') return true;
60  }
61  }
62  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" largeSector() - is this station a larger sector answer is no for readout element "<<m_idHelperSvc->toStringDetEl(identify()));
63  throw std::runtime_error("Unknown sector");
64  return false;
65  }

◆ localNominalTubePosWoCutouts()

Amg::Vector3D MuonGM::MdtReadoutElement::localNominalTubePosWoCutouts ( const int  tubelayer,
const int  tube 
) const
private

Definition at line 422 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

422  {
423  double xtube{0.}, ztube{0.};
424  if (barrel()) {
425  xtube = -m_Rsize / 2. + m_firstwire_y[tubeLayer - 1];
426  ztube = -m_Zsize / 2. + m_firstwire_x[tubeLayer - 1] + (tube - 1) * m_tubepitch;
427  } else {
428  xtube = -m_Zsize / 2. + m_firstwire_y[tubeLayer - 1];
429  ztube = -m_Rsize / 2. + m_firstwire_x[tubeLayer - 1] + (tube - 1) * m_tubepitch;
430  }
431  return Amg::Vector3D{xtube, 0., ztube};
432  }

◆ localROPos() [1/2]

Amg::Vector3D MuonGM::MdtReadoutElement::localROPos ( const Identifier id) const

◆ localROPos() [2/2]

Amg::Vector3D MuonGM::MdtReadoutElement::localROPos ( const int  tubelayer,
const int  tube 
) const

Definition at line 286 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

286  {
287  return tubeToMultilayerTransf(tubeLayer, tube) * tubeFrame_localROPos(tubeLayer, tube);
288  }

◆ localToGlobalTransf() [1/2]

const Amg::Transform3D& MuonGM::MdtReadoutElement::localToGlobalTransf ( const Identifier id) const

◆ localToGlobalTransf() [2/2]

const Amg::Transform3D& MuonGM::MdtReadoutElement::localToGlobalTransf ( const int  tubeLayer,
const int  tube 
) const

◆ localTubePos() [1/2]

Amg::Vector3D MuonGM::MdtReadoutElement::localTubePos ( const Identifier id) const

◆ localTubePos() [2/2]

Amg::Vector3D MuonGM::MdtReadoutElement::localTubePos ( const int  tubelayer,
const int  tube 
) const

Definition at line 292 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

292  {
293  return fromIdealToDeformed(tubeLayer, tube) * nodeform_localTubePos(tubeLayer, tube);
294  }

◆ makeGeoInfo()

std::unique_ptr< MdtReadoutElement::GeoInfo > MuonGM::MdtReadoutElement::makeGeoInfo ( const int  tubelayer,
const int  tube 
) const
private

Definition at line 806 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

806  {
808  return std::make_unique<GeoInfo>(std::move(transform));
809  }

◆ manager()

const MuonDetectorManager * MuonGM::MuonReadoutElement::manager ( ) const
inlineprotectedinherited

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

◆ nMDTinStation()

unsigned int MuonGM::MdtReadoutElement::nMDTinStation ( ) const
inline

How many MDT chambers are in the station.

Definition at line 62 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h.

62  {
63  return m_nMDTinStation;
64  }

◆ nodeform_globalToLocalTransf() [1/2]

Amg::Transform3D MuonGM::MdtReadoutElement::nodeform_globalToLocalTransf ( const Identifier id) const

◆ nodeform_globalToLocalTransf() [2/2]

Amg::Transform3D MuonGM::MdtReadoutElement::nodeform_globalToLocalTransf ( const int  tubeLayer,
const int  tube 
) const

Definition at line 405 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

405  {
406  return nodeform_localToGlobalTransf(tubeLayer, tube).inverse();
407  }

◆ nodeform_localToGlobalTransf() [1/2]

Amg::Transform3D MuonGM::MdtReadoutElement::nodeform_localToGlobalTransf ( const Identifier id) const

◆ nodeform_localToGlobalTransf() [2/2]

Amg::Transform3D MuonGM::MdtReadoutElement::nodeform_localToGlobalTransf ( const int  tubeLayer,
const int  tube 
) const

Definition at line 398 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

398  {
399  return globalTransform(nodeform_localTubePos(tubeLayer, tube), Amg::Transform3D::Identity());
400  }

◆ nodeform_localTubePos() [1/2]

Amg::Vector3D MuonGM::MdtReadoutElement::nodeform_localTubePos ( const Identifier id) const

◆ nodeform_localTubePos() [2/2]

Amg::Vector3D MuonGM::MdtReadoutElement::nodeform_localTubePos ( const int  tubelayer,
const int  tube 
) const

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

296  {
297  ATH_MSG_VERBOSE( " Computing LocalTubePos for "<< idHelperSvc()->toStringDetEl(identify())
298  << "/" << tubeLayer << "/" << tube );
299  double xtube{0.}, ytube{0.}, ztube{0.};
300  if (barrel()) {
301  xtube = -m_Rsize / 2. + m_firstwire_y[tubeLayer - 1];
302  ztube = -m_Zsize / 2. + m_firstwire_x[tubeLayer - 1] + (tube - 1) * m_tubepitch;
303  } else {
304  xtube = -m_Zsize / 2. + m_firstwire_y[tubeLayer - 1];
305  ztube = -m_Rsize / 2. + m_firstwire_x[tubeLayer - 1] + (tube - 1) * m_tubepitch;
306  }
307  Amg::Vector3D tubePos{xtube, ytube, ztube};
308  if (hasCutouts()) {
309  if (manager()->MinimalGeoFlag() == 0) {
310  ATH_MSG_DEBUG( " MdtReadoutElement " << idHelperSvc()->toStringDetEl(identify()) << " has cutouts, check for real position of tubes " );
311  PVConstLink cv = getMaterialGeom(); // it is "Multilayer"
312  int nGrandchildren = cv->getNChildVols();
313  // child vol 0 is foam; 1 to (nGrandchildren-1) should be tubes
314  int ii = (tubeLayer - 1) * m_ntubesperlayer + tube;
315 
316  // BIS78 only (the BIS7 of Run1/2 has no cutouts, thus, this block won't be reached)
317  if ((getStationIndex() == m_stIdx_BIS && std::abs(getStationEta()) == 7)) --ii;
318  if (m_idHelper.isBMG(identify())) {
319  // usually the tube number corresponds to the child number, however for
320  // BMG chambers full tubes are skipped during the building process
321  // therefore the matching needs to be done via the volume ID
322  int packed_id = tube + maxNTubesPerLayer * tubeLayer;
323  int kk = 0;
324  bool found = false;
325  geoGetIds(
326  [&](int id) {
327  if (!found && id == packed_id) {
328  ii = kk;
329  found = true;
330  }
331  ++kk;
332  },
333  &*cv);
334  if (found) {
335  ATH_MSG_DEBUG( " MdtReadoutElement tube match found for BMG - input : tube(" << tube << "), layer("
336  << tubeLayer << ") - output match : tube(" << ii % maxNTubesPerLayer << "), layer(" << ii / maxNTubesPerLayer
337  << ")" );
338  }
339  }
340  GeoTrf::Transform3D tubeTrans = cv->getXToChildVol(ii);
341  PVConstLink tv = cv->getChildVol(ii);
342  constexpr double maxtol = 0.0000001;
343 
344  if (std::abs(xtube - tubeTrans(0, 3)) > maxtol || std::abs(ztube - tubeTrans(2, 3)) > maxtol) {
345  THROW_EXCEPTION(__func__<<"("<<tubeLayer<<","<<tube<<")"<<" - mismatch between local from tube-id/pitch/cutout position"<<
346  Amg::toString(tubePos)<<" and GeoModel "<< Amg::toString(tubeTrans.linear().col(3))<<" for detector element "<<
347  idHelperSvc()->toStringDetEl(identify()) <<"There are "<<nGrandchildren<<" child volumes and "<<
348  (m_ntubesperlayer * m_nlayers)<<" are expected. There should be "<<m_nlayers<<" and "<<
349  m_ntubesperlayer<<" tubes per layer");
350  }
351  if (tubeTrans(1, 3) > maxtol) {
352 
353  ATH_MSG_DEBUG( "This a tube with cutout stName/Eta/Phi/ml/tl/t = " << idHelperSvc()->toStringDetEl(identify())
354  << "/" << tubeLayer << "/" << tube);
355  // check only for tubes actually shifted
356  if (std::abs(m_cutoutShift - tubeTrans(1, 3)) > maxtol) {
357  THROW_EXCEPTION(__func__<<"("<<tubeLayer<<","<<tube<<")"<<" - mismatch between local from tube-id/pitch/cutout position"<<
358  Amg::toString(tubePos)<<" and GeoModel "<< Amg::toString(tubeTrans.linear().col(3))<<" for detector element "<<
359  idHelperSvc()->toStringDetEl(identify()) <<"There are "<<nGrandchildren<<" child volumes and "<<
360  (m_ntubesperlayer * m_nlayers)<<" are expected. There should be "<<m_nlayers<<" and "<<
361  m_ntubesperlayer<<" tubes per layer");
362  }
363  }
364 
365  Amg::Vector3D x = tubeTrans.translation();
366  if (tube > m_ntubesperlayer || tubeLayer > m_nlayers) { x = tubePos; }
367  return x;
368  }
369  }
370  return tubePos;
371  }

◆ nodeform_tubePos() [1/2]

Amg::Vector3D MuonGM::MdtReadoutElement::nodeform_tubePos ( const Identifier id) const

Returns the global position of the tube excluding the B-line & As-built corrections.

◆ nodeform_tubePos() [2/2]

Amg::Vector3D MuonGM::MdtReadoutElement::nodeform_tubePos ( const int  tubelayer,
const int  tube 
) const

Definition at line 373 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

373  {
374  return transform() * nodeform_localTubePos(tubeLayer, tube);
375  }

◆ normal() [1/2]

const Amg::Vector3D & MuonGM::MdtReadoutElement::normal ( ) const
finaloverridevirtual

Return the normal of the element.

Implements Trk::TrkDetElementBase.

Definition at line 886 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

886  {
887  if (!m_elemNormal.isValid()) { m_elemNormal.set(transform().linear() * Amg::Vector3D::UnitX()); }
888  return *m_elemNormal.ptr();
889  }

◆ normal() [2/2]

virtual const Amg::Vector3D& MuonGM::MdtReadoutElement::normal ( const Identifier id) const
finaloverridevirtual

Return the normal of the surface associated with this identifier In the case of silicon it returns the same as normal()

Implements Trk::TrkDetElementBase.

◆ outerTubeRadius()

double MuonGM::MdtReadoutElement::outerTubeRadius ( ) const

Returns the tube radius taking the thickness of the tubes into account.

◆ parentMuonStation()

const MuonStation * MuonGM::MuonReadoutElement::parentMuonStation ( ) const
inherited

◆ parentMuonStationPos()

Amg::Vector3D MuonGM::MuonReadoutElement::parentMuonStationPos ( ) const
inherited

Definition at line 137 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

137  {
138  return parentMuonStation()->getTransform().translation();
139  }

◆ parentStationPV()

PVConstLink MuonGM::MuonReadoutElement::parentStationPV ( ) const
inherited

◆ posOnDefChamWire()

Amg::Vector3D MuonGM::MdtReadoutElement::posOnDefChamWire ( const Amg::Vector3D locAMDBPos,
const double  width_narrow,
const double  width_wide,
const double  height,
const double  thickness,
const Amg::Vector3D fixedPoint 
) const
private

Definition at line 583 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

588  {
589 
590  using Parameter = BLinePar::Parameter;
591  const double sp = m_BLinePar->getParameter(Parameter::sp);
592  const double sn = m_BLinePar->getParameter(Parameter::sn);
593  const double tw = m_BLinePar->getParameter(Parameter::tw);
594  const double eg = m_BLinePar->getParameter(Parameter::eg);
595  double ep = m_BLinePar->getParameter(Parameter::ep);
597  // S.Spagnolo Feb.6, 2011, modified by P.F Giraud, 2015-01-17
598  // This version does not implement deformations modifying only the second
599  // coordinate, or leaving the end-plug positions unchanged.
600  // This version should be called only with the coordinates of the end-plugs
601  // as argument, as is done in fromIdealToDeformed
602 
603  // MDT deformations like tube bow: bz,bp,bn bend the tube while the wire endpoints are not affected
604  // => the wire keeps it's nominal straight line trajectory but it is not concentric to the tube
605  // ==> in this function bz, bp and bn are ignored or set to 0
606  // MDT deformations that extend/contract the wire longitudinally (while keeping it straight):
607  // delta_s from eg and tr are irrelevant for the tube geometry
608  // and for the wire trajectory => set to 0 here
609  // (should be applied as a correction to the
610  // tube lenght => tube surface bounds
611  // =++>>>> effect in tracking just through the gravitational sagging TOTALLY NEGLIGIBLE=> ignore)
612  // pg is irrelevant for tracking purposes and (at least for the endcaps) is applies to the internal bars only, not to the tubes !!!
613  // =++>>>> IGNORE IT
614  // ep,en: bend the tube by moving (differently) the endplugs ===> the wire straight trajectory is moved w.r.t. the nominal one
615  // in addition the tubes keep their nominal position at the center => the wire is not concentric to
616  // the tube delta_s from ep,en must also be considered for the implementation of the realistic tube
617  // trajectory induced by ep,en
618  // tw,sp,sn,pg (for deltaT and deltaZ) are geometrical effects, that impact on tracking and keep the wire straight.
619 
620 
621 
622  Amg::Vector3D deformPos(locAMDBPos);
623 
624  // 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
625  // deformations s0mdt,z0mdt,t0mdt
626  // (always equal to the point at lowest t,z and s=0 of the MDT stack)
627  double s0 = locAMDBPos.x();
628  double z0 = locAMDBPos.y();
629  double t0 = locAMDBPos.z();
630  ATH_MSG_VERBOSE( "** In "<<__func__<<" - width_narrow, width_wide, length, thickness, " << width_narrow << " " << width_wide
631  << " " << height << " " << thickness << " " );
632  ATH_MSG_VERBOSE( "** In "<<__func__<<" - going to correct for B-line the position of Point at " << s0 << " " << z0 << " "
633  << t0 << " in the amdb-szt frame" );
634 
635  double s0mdt = s0; // always I think !
636  if (std::abs(fixedPoint.x()) > 0.01) s0mdt = s0 - fixedPoint.x();
637  double z0mdt = z0; // unless in the D section of this station there's a dy diff. from 0 for the innermost MDT multilayer (sometimes
638  // in the barrel)
639  if (std::abs(fixedPoint.y()) > 0.01) z0mdt = z0 - fixedPoint.y();
640  double t0mdt =
641  t0; // unless in the D section of this station there's a dz diff. from 0 for the innermost MDT multilayer (often in barrel)
642  if (std::abs(fixedPoint.z()) > 0.01) t0mdt = t0 - fixedPoint.z();
643  if (z0mdt < 0 || t0mdt < 0) {
644  ATH_MSG_WARNING(""<<__func__<<": correcting the local position of a point outside the mdt station (2 multilayers) volume -- RE "
645  << idHelperSvc()->toStringDetEl(identify()) << " local point: szt=" << s0 << " " << z0 << " " << t0
646  << " fixedPoint " <<Amg::toString(fixedPoint) );
647  }
648  ATH_MSG_VERBOSE( "** In "<<__func__<<" - correct for offset of B-line fixed point " << s0mdt << " " << z0mdt << " " << t0mdt);
649 
650  double ds{0.},dz{0.},dt{0.};
651  double width_actual = width_narrow + (width_wide - width_narrow) * (z0mdt / height);
652  double s_rel = s0mdt / (width_actual / 2.);
653  double z_rel = (z0mdt - height / 2.) / (height / 2.);
654  double t_rel = (t0mdt - thickness / 2.) / (thickness / 2.);
655 
656  ATH_MSG_VERBOSE( "** In "<<__func__<<" - width_actual, s_rel, z_rel, t_rel " << width_actual << " " << s_rel << " "
657  << z_rel << " " << t_rel );
658 
659  // sp, sn - cross plate sag out of plane
660  if ((sp != 0) || (sn != 0)) {
661  double ztmp = z_rel * z_rel - 1;
662  dt += 0.5 * (sp + sn) * ztmp + 0.5 * (sp - sn) * ztmp * s_rel;
663  }
664 
665  // tw - twist
666  if (tw != 0) {
667  dt -= tw * s_rel * z_rel;
668  dz += tw * s_rel * t_rel * thickness / height;
669  ATH_MSG_VERBOSE( "** In "<<__func__<<": tw=" << tw << " dt, dz " << dt << " " << dz );
670  }
671 
672  // eg - global expansion
673  if (eg != 0) {
674  double egppm = eg / 1000.;
675  ds += 0.;
676  dz += z0mdt * egppm;
677  dt += t0mdt * egppm;
678  }
679 
680  // ep, en - local expansion
681  //
682  // Imporant note: the chamber height and length, as they denoted in Christoph's talk,
683  // correspond to thickness and height parameters of this function;
684  //
685 
686  if ((ep != 0) || (en != 0)) {
687  ep = ep / 1000.;
688  en = en / 1000.;
689  double phi = 0.5 * (ep + en) * s_rel * s_rel + 0.5 * (ep - en) * s_rel;
690  double localDt = phi * (t0mdt - thickness / 2.);
691  double localDz = phi * (z0mdt - height / 2.);
692  dt += localDt;
693  dz += localDz;
694  }
695 
696  ATH_MSG_VERBOSE( "posOnDefChamStraighWire: ds,z,t = " << ds << " " << dz << " " << dt );
697  deformPos[0] = s0 + ds;
698  deformPos[1] = z0 + dz;
699  deformPos[2] = t0 + dt;
700 
701  return deformPos;
702  }

◆ refreshCache()

void MuonGM::MuonReadoutElement::refreshCache ( )
inherited

Definition at line 177 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

177  {
178  clearCache();
179  fillCache();
180  }

◆ RODistanceFromTubeCentre() [1/2]

double MuonGM::MdtReadoutElement::RODistanceFromTubeCentre ( const Identifier id) const

◆ RODistanceFromTubeCentre() [2/2]

double MuonGM::MdtReadoutElement::RODistanceFromTubeCentre ( const int  tubeLayer,
const int  tube 
) const

Definition at line 222 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

222  {
223  return getWireLength(tubeLayer, tube) / 2.;
224  }

◆ ROPos() [1/2]

Amg::Vector3D MuonGM::MdtReadoutElement::ROPos ( const Identifier id) const

◆ ROPos() [2/2]

Amg::Vector3D MuonGM::MdtReadoutElement::ROPos ( const int  tubelayer,
const int  tube 
) const

Definition at line 289 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

289  {
290  return transform(tubeLayer, tube) * tubeFrame_localROPos(tubeLayer, tube);
291  }

◆ setBLinePar()

void MuonGM::MdtReadoutElement::setBLinePar ( const BLinePar bLine)

Definition at line 958 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

958  {
959  ATH_MSG_DEBUG( "Setting B-line for " << idHelperSvc()->toStringDetEl(identify()) );
960  if (m_BLinePar == bLine) {
961  return;
962  }
963  m_BLinePar = bLine;
964  refreshCache();
965  }

◆ setHasCutouts()

void MuonGM::MuonReadoutElement::setHasCutouts ( bool  flag)
inlineinherited

◆ setIdentifier()

void MuonGM::MuonReadoutElement::setIdentifier ( const Identifier id)
inherited

Sets the Identifier, hashes & station names.

Definition at line 156 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

156  {
157  m_id = id;
158  if (!m_idHelperSvc->isMuon(id)) {
159  ATH_MSG_FATAL("The Identifier "<<m_idHelperSvc->toString(id)<<" is not a muon one.");
160  throw std::runtime_error("Invalid Identifier set");
161  }
162  m_stIdx = m_idHelperSvc->stationName(id);
163  m_eta = m_idHelperSvc->stationEta(id);
164  m_phi = m_idHelperSvc->stationPhi(id);
165  m_idhash = m_idHelperSvc->moduleHash(id);
166  m_detectorElIdhash = m_idHelperSvc->detElementHash(id);
167  }

◆ setIndexOfREinMuonStation()

void MuonGM::MuonReadoutElement::setIndexOfREinMuonStation ( )
privateinherited

Definition at line 104 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

104  {
105  PVConstLink par = parentStationPV();
106  if (par == PVConstLink(nullptr)) {
107  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" No parent station found for "<<m_idHelperSvc->toStringDetEl(identify()));
108  throw std::runtime_error("Parent station is a nullptr");
109  }
110  Query<unsigned int> c = par->indexOf(getMaterialGeom());
111  if (c.isValid()) {
113  } else
115  }

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

◆ setLongRsize()

void MuonGM::MuonReadoutElement::setLongRsize ( double  v)
inherited

◆ setLongSsize()

void MuonGM::MuonReadoutElement::setLongSsize ( double  v)
inherited

◆ setLongZsize()

void MuonGM::MuonReadoutElement::setLongZsize ( double  v)
inherited

◆ setMultilayer()

void MuonGM::MdtReadoutElement::setMultilayer ( const int  ml)

Sets the multilayer number.

Definition at line 68 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

68 { m_multilayer = ml; }

◆ setNLayers()

void MuonGM::MdtReadoutElement::setNLayers ( const int  nl)

Sets the number of layers.

Definition at line 69 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

69 { m_nlayers = nl; }

◆ setNMdtInStation()

void MuonGM::MdtReadoutElement::setNMdtInStation ( unsigned int  numMdt)
inline

◆ setParentMuonStation()

void MuonGM::MuonReadoutElement::setParentMuonStation ( const MuonStation mstat)
inherited

Definition at line 128 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

128  {
129  m_parentMuonStation = mstat;
130  if (mstat->getPhysVol()) {
131  setParentStationPV(mstat->getPhysVol());
132  }
133  }

◆ setParentStationPV() [1/2]

void MuonGM::MuonReadoutElement::setParentStationPV ( )
inherited

Definition at line 77 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

77  {
78  if (m_parentStationPV) return;
79 
80  std::string::size_type npos;
81  PVConstLink pStat = PVConstLink(nullptr);
82  PVConstLink myphysvol(getMaterialGeom());
83 
84  std::string name = (myphysvol->getLogVol())->getName();
85  if ((npos = name.find("Station")) != std::string::npos) {
86  pStat = myphysvol;
87  } else {
88  for (unsigned int k = 0; k < 10; k++) {
89  pStat = myphysvol->getParent();
90  if (pStat == PVConstLink(nullptr)) break;
91  name = (pStat->getLogVol())->getName();
92  if ((npos = name.find("Station")) != std::string::npos) { break; }
93  myphysvol = pStat;
94  }
95  }
96  m_parentStationPV = pStat;
98  }

◆ setParentStationPV() [2/2]

void MuonGM::MuonReadoutElement::setParentStationPV ( const PVConstLink &  x)
inherited

◆ setRsize()

void MuonGM::MuonReadoutElement::setRsize ( double  v)
inherited

◆ setSsize()

void MuonGM::MuonReadoutElement::setSsize ( double  v)
inherited

◆ setStationName()

void MuonGM::MuonReadoutElement::setStationName ( const std::string &  str)
inherited

◆ setStationS()

void MuonGM::MuonReadoutElement::setStationS ( double  v)
inherited

◆ setTechnologyName()

void MuonGM::MuonReadoutElement::setTechnologyName ( const std::string &  str)
inherited

◆ setZsize()

void MuonGM::MuonReadoutElement::setZsize ( double  v)
inherited

◆ sideA()

bool MuonGM::MuonReadoutElement::sideA ( ) const
inlineinherited

◆ sideC()

bool MuonGM::MuonReadoutElement::sideC ( ) const
inlineinherited

◆ signedRODistanceFromTubeCentre() [1/2]

double MuonGM::MdtReadoutElement::signedRODistanceFromTubeCentre ( const Identifier id) const

◆ signedRODistanceFromTubeCentre() [2/2]

double MuonGM::MdtReadoutElement::signedRODistanceFromTubeCentre ( const int  tubeLayer,
const int  tube 
) const

Definition at line 225 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

225  {
226  // it is a signed quantity:
227  // the sign corresponds to the sign of the z coordinate of the RO endplug in the tube
228  // reference frame
229  int amdb_plus_minus1 = 1;
230  if (!m_zsignRO_tubeFrame.isValid()) {
231  const MuonStation* ms = parentMuonStation();
232  if (std::abs(ms->xAmdbCRO()) > 10.) {
233  Amg::Vector3D tem = ms->xAmdbCRO()* Amg::Vector3D::UnitX();
234  Amg::Transform3D amdbToGlobal{ms->getAmdbLRSToGlobal()};
235  Amg::Vector3D temGlo = amdbToGlobal * tem;
236  Amg::Vector3D ROtubeFrame = nodeform_globalToLocalTransf(tubeLayer, tube) * temGlo;
237  if (ROtubeFrame.z() < 0)
239  else
241  }
242  }
243  // if no CRO in a chamber in AMDB (BIS in layout R), use the standard convention for RO-HV side
244  if (!m_zsignRO_tubeFrame.isValid()) {
245  int sign = 0;
246  if (barrel()) {
247  if (sideA()) {
248  if (largeSector())
249  sign = -1;
250  else
251  sign = 1;
252  } else {
253  if (largeSector())
254  sign = 1;
255  else
256  sign = -1;
257  }
258  // a special case is BIS in sector 12
259  if (getStationName().substr(0, 3) == "BIS" && getStationPhi() == 6) sign = -sign;
260  } else {
261  if (sideA()) {
262  if (largeSector())
263  sign = 1;
264  else
265  sign = -1;
266  } else {
267  if (largeSector())
268  sign = -1;
269  else
270  sign = 1;
271  }
272  }
274  }
275  amdb_plus_minus1 = *m_zsignRO_tubeFrame.ptr();
276  if (amdb_plus_minus1 == 0) {
277  ATH_MSG_WARNING( "Unable to get the sign of RO side; signedRODistancefromTubeCenter returns 0" );
278  }
279 
280  return amdb_plus_minus1 * getWireLength(tubeLayer, tube) / 2.;
281  }

◆ smallSector()

bool MuonGM::MuonReadoutElement::smallSector ( ) const
inherited

Definition at line 67 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

67  {
68  // this doesn't apply to TGC
69  return (!largeSector());
70  }

◆ surface() [1/3]

const Trk::Surface & MuonGM::MdtReadoutElement::surface ( ) const
finaloverridevirtual

Return surface associated with this detector element.

Implements Trk::TrkDetElementBase.

Definition at line 891 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

891  {
892  if (!m_associatedSurface) {
893  Amg::RotationMatrix3D muonTRotation(transform().rotation());
894  Amg::RotationMatrix3D surfaceTRotation;
895  surfaceTRotation.col(0) = muonTRotation.col(1);
896  surfaceTRotation.col(1) = muonTRotation.col(2);
897  surfaceTRotation.col(2) = muonTRotation.col(0);
898 
899  Amg::Transform3D trans3D(surfaceTRotation);
900  trans3D.pretranslate(transform().translation());
901 
902  if (barrel()) {
903  m_associatedSurface.set(std::make_unique<Trk::PlaneSurface>(Amg::Transform3D(trans3D), getSsize() * 0.5,
904  getZsize() * 0.5));
905  } else {
906  m_associatedSurface.set(std::make_unique<Trk::PlaneSurface>(Amg::Transform3D(trans3D), getSsize() * 0.5,
907  getLongSsize() * 0.5,
908  getRsize() * 0.5));
909  }
910  }
911  return *m_associatedSurface;
912  }

◆ surface() [2/3]

virtual const Trk::SaggedLineSurface& MuonGM::MdtReadoutElement::surface ( const Identifier id) const
finaloverridevirtual

Return surface associated with this identifier, which should come from the PrepRawData object (i.e.

Surface s = PRD.detElement().surface( PRD.identify() ). This is only really relevant for the TRT (where there are several surfaces per detector element). For other detector elements it will just return surface() ... the Identifier is ignored.

Implements Trk::TrkDetElementBase.

◆ surface() [3/3]

const Trk::SaggedLineSurface & MuonGM::MdtReadoutElement::surface ( const int  tubeLayer,
const int  tube 
) const
virtual

Definition at line 833 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

833  {
834 
835  int ntot_tubes = m_nlayers * m_ntubesperlayer;
836  int itube = (tubeLayer - 1) * m_ntubesperlayer + tube - 1;
837  // consistency checks
838  if (itube >= ntot_tubes) {
839  ATH_MSG_WARNING( "surface called with tubeLayer or tube out of range in chamber "
840  << idHelperSvc()->toStringDetEl(identify()) << " : layer " << tubeLayer << " max " << m_nlayers << " tube " << tube
841  << " max " << m_ntubesperlayer << " will compute surface for first tube in this chamber" );
842  ATH_MSG_WARNING( "Please run in DEBUG mode to get extra diagnostic" );
843  itube = 0;
844  }
845 
847  if (!ptr) {
848  double wireTension = 350;
849  if (getStationIndex() == m_stIdx_BOL) wireTension = 285;
850  Identifier id = m_idHelper.channelID(identify(), getMultilayer(), tubeLayer, tube);
851  ptr.set(std::make_unique<Trk::SaggedLineSurface>(*this, id, getWireLength(tubeLayer, tube), wireTension, linearDensity));
853  }
854  return *ptr;
855  }

◆ surfaces()

std::vector< const Trk::Surface * > MuonGM::MdtReadoutElement::surfaces ( ) const

returns all the surfaces contained in this detector element

Definition at line 71 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

71  {
72  std::vector<const Trk::Surface*> elementSurfaces;
73  elementSurfaces.reserve(m_tubeSurfaces.size() + 1);
74  if (m_associatedSurface) { elementSurfaces.push_back(m_associatedSurface.get()); }
75  for (const auto& s : m_tubeSurfaces) {
76  if (s) elementSurfaces.push_back(s.get());
77  }
78  return elementSurfaces;
79  }

◆ toParentStation()

Amg::Transform3D MuonGM::MuonReadoutElement::toParentStation ( ) const
inherited

Definition at line 117 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

117  {
118  PVConstLink par = parentStationPV();
119  if (par == PVConstLink(nullptr)) {
120  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" No parent station found for "<<m_idHelperSvc->toStringDetEl(identify()));
121  throw std::runtime_error("Parent station is a nullptr");
122  }
123 
124  if (m_indexOfREinMuonStation >= 0) return par->getXToChildVol((unsigned int)m_indexOfREinMuonStation);
125  return GeoTrf::Transform3D::Identity();
126  }

◆ transform() [1/3]

virtual const Amg::Transform3D& MuonGM::MdtReadoutElement::transform ( ) const
finaloverridevirtual

Return local to global transform.

Implements Trk::TrkDetElementBase.

◆ transform() [2/3]

virtual const Amg::Transform3D& MuonGM::MdtReadoutElement::transform ( const Identifier id) const
finaloverridevirtual

Return local to global transform associated with this identifier.

Implements Trk::TrkDetElementBase.

◆ transform() [3/3]

const Amg::Transform3D & MuonGM::MdtReadoutElement::transform ( const int  tubeLayer,
const int  tube 
) const

Definition at line 829 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

829  {
830  return geoInfo(tubeLayer, tube).m_transform;
831  }

◆ tubeFrame_localROPos() [1/2]

Amg::Vector3D MuonGM::MdtReadoutElement::tubeFrame_localROPos ( const Identifier id) const

◆ tubeFrame_localROPos() [2/2]

Amg::Vector3D MuonGM::MdtReadoutElement::tubeFrame_localROPos ( const int  tubelayer,
const int  tube 
) const

Definition at line 283 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

283  {
284  return signedRODistanceFromTubeCentre(tubeLayer, tube) * Amg::Vector3D::UnitZ();
285  }

◆ tubeLength() [1/2]

double MuonGM::MdtReadoutElement::tubeLength ( const Identifier id) const

◆ tubeLength() [2/2]

double MuonGM::MdtReadoutElement::tubeLength ( const int  tubeLayer,
const int  tube 
) const

◆ tubePitch()

double MuonGM::MdtReadoutElement::tubePitch ( ) const

Returns the distance between 2 tubes in a tube layer.

◆ tubePos() [1/2]

Amg::Vector3D MuonGM::MdtReadoutElement::tubePos ( const Identifier id) const

Returns the global position of the given tube.

◆ tubePos() [2/2]

Amg::Vector3D MuonGM::MdtReadoutElement::tubePos ( const int  tubelayer,
const int  tube 
) const

Definition at line 376 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

376  {
377  return transform() * localTubePos(tubeLayer, tube);
378  }

◆ tubeToMultilayerTransf() [1/3]

Amg::Transform3D MuonGM::MdtReadoutElement::tubeToMultilayerTransf ( const Amg::Vector3D tubePos,
const Amg::Transform3D toDeform 
)
staticprivate

Definition at line 395 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

395  {
396  return toDeform * Amg::Translation3D{tubePos} * Amg::getRotateX3D(90. * CLHEP::deg);
397  }

◆ tubeToMultilayerTransf() [2/3]

Amg::Transform3D MuonGM::MdtReadoutElement::tubeToMultilayerTransf ( const Identifier id) const

◆ tubeToMultilayerTransf() [3/3]

Amg::Transform3D MuonGM::MdtReadoutElement::tubeToMultilayerTransf ( const int  tubeLayer,
const int  tube 
) const

Definition at line 379 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

379  {
381  fromIdealToDeformed(tubeLayer, tube));
382  }

◆ wireEndpointsAsBuilt()

void MuonGM::MdtReadoutElement::wireEndpointsAsBuilt ( Amg::Vector3D locAMDBWireEndP,
Amg::Vector3D locAMDBWireEndN,
const int  tubelayer,
const int  tube 
) const
private

Definition at line 716 of file MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx.

717  {
719  if (!params) {
720  ATH_MSG_WARNING( "Cannot find Mdt AsBuilt parameters for chamber " << idHelperSvc()->toStringDetEl(identify()) );
721  return;
722  }
723 
724  ATH_MSG_VERBOSE( "Applying as-built parameters for chamber " << idHelperSvc()->toStringDetEl(identify())
725  << " tubeLayer=" << tubeLayer << " tube=" << tube);
726 
727  constexpr int nsid = 2;
728  using tubeSide_t = MdtAsBuiltPar::tubeSide_t;
729  using multilayer_t = MdtAsBuiltPar::multilayer_t;
730  std::array<MdtAsBuiltPar::tubeSide_t, nsid> tubeSide{tubeSide_t::POS, tubeSide_t::NEG};
731  std::array<Amg::Vector3D, nsid> wireEnd{locAMDBWireEndP, locAMDBWireEndN};
732  multilayer_t ml = (getMultilayer() == 1) ? multilayer_t::ML1 : multilayer_t::ML2;
733 
734  const double xmin = *std::min_element(m_firstwire_x.begin(), m_firstwire_x.begin() + m_nlayers) - outerTubeRadius();
735  const int ref_layer = (ml == multilayer_t::ML1) ? m_nlayers : 1;
736  const double y_offset = (ml == multilayer_t::ML1) ? outerTubeRadius() : -outerTubeRadius();
737 
738  for (int isid = 0; isid < nsid; ++isid) { // first s>0 then s<0
739  // Compute the reference for the as-built parameters
740  double xref{0.}, yref{0.}, zref{0.};
741  if (barrel()) {
742  xref = -m_Rsize / 2. + m_firstwire_y[ref_layer - 1] + y_offset;
743  zref = -m_Zsize / 2. + xmin;
744  } else {
745  xref = -m_Zsize / 2. + m_firstwire_y[ref_layer - 1] + y_offset;
746  zref = -m_Rsize / 2. + xmin;
747  }
749  Amg::Vector3D reference_point{xref, yref, zref};
750 
751  reference_point = toAMDB * reference_point;
752 
753  if (isid == 0)
754  reference_point = reference_point + 0.5 * getNominalTubeLengthWoCutouts(ref_layer, 1) * Amg::Vector3D::UnitX();
755  else
756  reference_point = reference_point -0.5 * getNominalTubeLengthWoCutouts(ref_layer, 1) * Amg::Vector3D::UnitX();
757 
758  ATH_MSG_VERBOSE("AMDB transform "<<idHelperSvc()->toStringDetEl(identify())<<
759  " "<<GeoTrf::toString(toAMDB, true)<<", reference point: "<<Amg::toString(reference_point));
760 
761  int layer_delta = tubeLayer;
762  if (ml == multilayer_t::ML1) layer_delta = m_nlayers + 1 - tubeLayer;
763 
764  // Get the As-Built parameters for this ML and side of the chamber
765  double zpitch = params->zpitch(ml, tubeSide[isid]);
766  double ypitch = params->ypitch(ml, tubeSide[isid]);
767  double stagg = (double)params->stagg(ml, tubeSide[isid]);
768  double alpha = params->alpha(ml, tubeSide[isid]);
769  double y0 = params->y0(ml, tubeSide[isid]);
770  double z0 = params->z0(ml, tubeSide[isid]);
771 
772  // Find the vector from the reference_point to the endplug
773  int do_stagg = (layer_delta - 1) % 2; // 0 for layer 1 and 3, 1 for layer 2 and 4
774  double offset_stagg = ((double)do_stagg) * 0.5 * zpitch * stagg;
775  Amg::Vector3D end_plug(0., (tube - 1.0) * zpitch + offset_stagg, (layer_delta - 1) * ypitch);
776 
777  const Amg::Transform3D amgTransf{Amg::getRotateX3D(-alpha)};
778  end_plug = amgTransf * end_plug;
779 
780  // Calculate x position, which varies for endcap chambers
781  double xshift = 0.;
782  if (isid == 0)
783  xshift = 0.5 * getNominalTubeLengthWoCutouts(tubeLayer, tube) - 0.5 * getNominalTubeLengthWoCutouts(ref_layer, 1);
784  else
785  xshift = -0.5 * getNominalTubeLengthWoCutouts(tubeLayer, tube) + 0.5 * getNominalTubeLengthWoCutouts(ref_layer, 1);
786 
787  Amg::Vector3D ret(reference_point.x() + xshift, reference_point.y() + z0 + end_plug.y(),
788  reference_point.z() + y0 + end_plug.z());
789 
790  // Warn if result of calculation is too far off
791  // BIL1A13 has as-built parameters up to 3mm off, giving the size of the cut
792  if ((ret - wireEnd[isid]).mag() > 3. * CLHEP::mm) {
793  ATH_MSG_WARNING( "Large as-built correction for chamber " << idHelperSvc()->toStringDetEl(identify()) << ", side "
794  << isid << ", Delta " << Amg::toString(ret - wireEnd[isid]) );
795  }
796  ATH_MSG_VERBOSE(( tubeSide[isid] == tubeSide_t::POS ? "positive" : "negative")<<" wire end has moved from "
797  <<Amg::toString(wireEnd[isid])<<" to "<<Amg::toString(ret));
798 
799  // Save the result
800  if (tubeSide[isid] == tubeSide_t::POS)
801  locAMDBWireEndP = ret;
802  else
803  locAMDBWireEndN = ret;
804  }
805  }

Friends And Related Function Documentation

◆ MuonChamber

friend class MuonChamber
friend

◆ MuonChamberLite

friend class MuonChamberLite
friend

◆ MuonGMR4::ReadoutGeomCnvAlg

friend class MuonGMR4::ReadoutGeomCnvAlg
friend

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_associatedBounds

CxxUtils::CachedUniquePtr<Trk::SurfaceBounds> MuonGM::MdtReadoutElement::m_associatedBounds {}
private

◆ m_associatedSurface

CxxUtils::CachedUniquePtr<Trk::Surface> MuonGM::MdtReadoutElement::m_associatedSurface {}
private

◆ m_backupTubeGeo

std::vector<CxxUtils::CachedUniquePtr<GeoInfo> > MuonGM::MdtReadoutElement::m_backupTubeGeo {}
private

◆ m_BLinePar

const BLinePar* MuonGM::MdtReadoutElement::m_BLinePar {nullptr}
private

◆ m_caching

int MuonGM::MuonReadoutElement::m_caching {-1}
protectedinherited

0 if we want to avoid caching geometry info for tracking interface

Definition at line 156 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_cutoutShift

double MuonGM::MdtReadoutElement::m_cutoutShift {-9999.}
private

◆ m_deadlength

double MuonGM::MdtReadoutElement::m_deadlength {-9999.}
private

◆ m_deformTransf

std::vector<CxxUtils::CachedUniquePtr<Amg::Transform3D> > MuonGM::MdtReadoutElement::m_deformTransf {}
private

◆ m_detectorElIdhash

IdentifierHash MuonGM::MuonReadoutElement::m_detectorElIdhash {0}
privateinherited

detector element hash identifier

Definition at line 167 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_elemNormal

CxxUtils::CachedValue<Amg::Vector3D> MuonGM::MdtReadoutElement::m_elemNormal {}
private

◆ m_endpluglength

double MuonGM::MdtReadoutElement::m_endpluglength {-9999.}
private

◆ m_eta

int MuonGM::MuonReadoutElement::m_eta {-1}
privateinherited

Identifier field of the station eta.

Definition at line 175 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_firstwire_x

std::array<double, maxnlayers> MuonGM::MdtReadoutElement::m_firstwire_x {make_array<double, maxnlayers>(-9999.)}
private

◆ m_firstwire_y

std::array<double, maxnlayers> MuonGM::MdtReadoutElement::m_firstwire_y {make_array<double, maxnlayers>(-9999.)}
private

◆ m_hasCutouts

bool MuonGM::MuonReadoutElement::m_hasCutouts {false}
protectedinherited

true is there are cutouts in the readdout-element

Definition at line 158 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_haveDeformTransf

std::atomic<bool> MuonGM::MdtReadoutElement::m_haveDeformTransf {false}
mutableprivate

◆ m_haveTubeBounds

std::atomic<bool> MuonGM::MdtReadoutElement::m_haveTubeBounds {false}
mutableprivate

◆ m_haveTubeGeo

std::atomic<bool> MuonGM::MdtReadoutElement::m_haveTubeGeo {false}
mutableprivate

◆ m_haveTubeSurfaces

std::atomic<bool> MuonGM::MdtReadoutElement::m_haveTubeSurfaces {false}
mutableprivate

Flag whether any elements have been inserted into the corresponding vectors.

Used to speed up the clear-cache operations for the case where the vectors are empty.

Definition at line 265 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h.

◆ m_id

Identifier MuonGM::MuonReadoutElement::m_id {0}
privateinherited

extended data-collection identifier

Definition at line 165 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_idhash

IdentifierHash MuonGM::MuonReadoutElement::m_idhash {0}
privateinherited

data-collection hash identifier

Definition at line 166 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_idHelper

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

◆ m_idHelperSvc

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

◆ m_imsg

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

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_inBarrel

bool MuonGM::MdtReadoutElement::m_inBarrel {false}
private

◆ m_indexOfREinMuonStation

int MuonGM::MuonReadoutElement::m_indexOfREinMuonStation {-999}
privateinherited

index of this RE in the mother MuonStation

Definition at line 169 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_innerRadius

double MuonGM::MdtReadoutElement::m_innerRadius {-9999.}
private

◆ m_LongRsize

double MuonGM::MuonReadoutElement::m_LongRsize {-9999.}
protectedinherited

◆ m_LongSsize

double MuonGM::MuonReadoutElement::m_LongSsize {-9999.}
protectedinherited

◆ m_LongZsize

double MuonGM::MuonReadoutElement::m_LongZsize {-9999.}
protectedinherited

size in the specified direction

Definition at line 148 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_lvl

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

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_msg_tls

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

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

Definition at line 132 of file AthMessaging.h.

◆ m_multilayer

int MuonGM::MdtReadoutElement::m_multilayer {0}
private

◆ m_muon_mgr

MuonDetectorManager* MuonGM::MuonReadoutElement::m_muon_mgr {nullptr}
privateinherited

◆ m_nlayers

int MuonGM::MdtReadoutElement::m_nlayers {-1}
private

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_nMDTinStation

unsigned int MuonGM::MdtReadoutElement::m_nMDTinStation {0}
private

◆ m_nsteps

int MuonGM::MdtReadoutElement::m_nsteps {-1}
private

◆ m_ntubesinastep

int MuonGM::MdtReadoutElement::m_ntubesinastep {-1}
private

◆ m_ntubesperlayer

int MuonGM::MdtReadoutElement::m_ntubesperlayer {-1}
private

◆ m_parentMuonStation

const MuonStation* MuonGM::MuonReadoutElement::m_parentMuonStation {nullptr}
privateinherited

◆ m_parentStationPV

PVConstLink MuonGM::MuonReadoutElement::m_parentStationPV {nullptr}
privateinherited

◆ m_phi

int MuonGM::MuonReadoutElement::m_phi {-1}
privateinherited

Identifier field of the station phi.

Definition at line 177 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_Rsize

double MuonGM::MuonReadoutElement::m_Rsize {-9999.}
protectedinherited

◆ m_Ssize

double MuonGM::MuonReadoutElement::m_Ssize {-9999.}
protectedinherited

◆ m_stationS

double MuonGM::MuonReadoutElement::m_stationS {0.}
privateinherited

◆ m_statname

std::string MuonGM::MuonReadoutElement::m_statname {"XXX0"}
protectedinherited

examples are BMS5, CSS1, EML1

Definition at line 154 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_stIdx

int MuonGM::MuonReadoutElement::m_stIdx {-1}
privateinherited

Identifier field of the station index.

Definition at line 173 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_stIdx_BIS

const int MuonGM::MdtReadoutElement::m_stIdx_BIS {m_idHelper.stationNameIndex("BIS")}
private

◆ m_stIdx_BOL

const int MuonGM::MdtReadoutElement::m_stIdx_BOL {m_idHelper.stationNameIndex("BOL")}
private

◆ m_techname

std::string MuonGM::MuonReadoutElement::m_techname {"TTT0"}
protectedinherited

MDT or RPC or TGC or CSC plus a two digits subtype; example RPC17.

Definition at line 152 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

◆ m_tubeBounds

std::vector<CxxUtils::CachedUniquePtr<Trk::CylinderBounds> > MuonGM::MdtReadoutElement::m_tubeBounds {}
private

◆ m_tubeGeo

std::vector<CxxUtils::CachedUniquePtr<GeoInfo> > MuonGM::MdtReadoutElement::m_tubeGeo {}
private

◆ m_tubelayerpitch

double MuonGM::MdtReadoutElement::m_tubelayerpitch {-9999.}
private

◆ m_tubelength

std::array<double, maxnsteps> MuonGM::MdtReadoutElement::m_tubelength {make_array<double, maxnsteps>(-9999.)}
private

◆ m_tubelenStepSize

double MuonGM::MdtReadoutElement::m_tubelenStepSize {-9999.}
private

◆ m_tubepitch

double MuonGM::MdtReadoutElement::m_tubepitch {-9999.}
private

◆ m_tubeSurfaces

std::vector<CxxUtils::CachedUniquePtr<Trk::SaggedLineSurface> > MuonGM::MdtReadoutElement::m_tubeSurfaces {}
private

◆ m_tubeWallThickness

double MuonGM::MdtReadoutElement::m_tubeWallThickness {-9999.}
private

◆ m_type

Trk::DetectorElemType MuonGM::MuonReadoutElement::m_type {Trk::DetectorElemType::SolidState}
privateinherited

◆ m_zsignRO_tubeFrame

CxxUtils::CachedValue<int> MuonGM::MdtReadoutElement::m_zsignRO_tubeFrame {}
private

◆ m_Zsize

double MuonGM::MuonReadoutElement::m_Zsize {-9999.}
protectedinherited

The documentation for this class was generated from the following files:
MdtIdHelper::isBMG
bool isBMG(const Identifier &id) const
is this a BMG chamber
Definition: MdtIdHelper.cxx:734
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
MuonGM::MdtReadoutElement::wireEndpointsAsBuilt
void wireEndpointsAsBuilt(Amg::Vector3D &locAMDBWireEndP, Amg::Vector3D &locAMDBWireEndN, const int tubelayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:716
Trk::RectangleBounds
Definition: RectangleBounds.h:38
MuonGM::MdtReadoutElement::m_firstwire_x
std::array< double, maxnlayers > m_firstwire_x
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:229
CxxUtils::CachedValue::reset
void reset()
Reset the value to invalid.
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:260
MuonGM::MdtReadoutElement::getNLayers
int getNLayers() const
Returns the number of tube layers inside the multilayer.
MuonGM::MuonReadoutElement::AmdbLRSToGlobalTransform
virtual Amg::Transform3D AmdbLRSToGlobalTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:145
MuonGM::MuonDetectorManager::MinimalGeoFlag
int MinimalGeoFlag() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:250
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonGM::MuonReadoutElement::m_statname
std::string m_statname
examples are BMS5, CSS1, EML1
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:154
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
MuonGM::MdtReadoutElement::m_ntubesinastep
int m_ntubesinastep
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:222
MuonGM::MuonReadoutElement::absTransform
const Amg::Transform3D & absTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:210
MuonGM::MuonReadoutElement::m_id
Identifier m_id
extended data-collection identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:165
MuonGM::MdtReadoutElement::center
virtual const Amg::Vector3D & center() const override final
Return the center of the element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:914
MuonGM::MdtReadoutElement::m_stIdx_BOL
const int m_stIdx_BOL
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:213
MuonGM::MuonReadoutElement::m_techname
std::string m_techname
MDT or RPC or TGC or CSC plus a two digits subtype; example RPC17.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:152
MuonGM::MuonReadoutElement::m_Zsize
double m_Zsize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:145
MuonGM::MdtReadoutElement::m_deformTransf
std::vector< CxxUtils::CachedUniquePtr< Amg::Transform3D > > m_deformTransf
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:254
MuonGM::MdtReadoutElement::geoInfo
const GeoInfo & geoInfo(const int tubeLayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:811
MuonGM::MuonReadoutElement::m_LongRsize
double m_LongRsize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:147
ParticleTest.eg
eg
Definition: ParticleTest.py:29
MuonGM::MuonReadoutElement::m_eta
int m_eta
Identifier field of the station eta.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:175
MuonGM::MuonReadoutElement::m_detectorElIdhash
IdentifierHash m_detectorElIdhash
detector element hash identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:167
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MuonGM::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
MuonGM::MuonReadoutElement::fillCache
virtual void fillCache()=0
MuonGM::MdtReadoutElement::makeGeoInfo
std::unique_ptr< GeoInfo > makeGeoInfo(const int tubelayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:806
Trk::DetectorElemType::Tgc
@ Tgc
MuonGM::MdtReadoutElement::m_ntubesperlayer
int m_ntubesperlayer
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:220
hist_file_dump.d
d
Definition: hist_file_dump.py:137
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
Trk::DetectorElemType::TRT
@ TRT
MuonGM::MdtReadoutElement::localNominalTubePosWoCutouts
Amg::Vector3D localNominalTubePosWoCutouts(const int tubelayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:422
MuonGM::MdtReadoutElement::m_haveTubeBounds
std::atomic< bool > m_haveTubeBounds
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:267
MuonGM::MdtReadoutElement::tubePitch
double tubePitch() const
Returns the distance between 2 tubes in a tube layer.
CxxUtils::CachedUniquePtrT
Cached pointer with atomic update.
Definition: CachedUniquePtr.h:54
MuonGM::MdtReadoutElement::globalTransform
Amg::Transform3D globalTransform(const Amg::Vector3D &tubePos, const Amg::Transform3D &toDeform) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:392
MuonGM::MuonReadoutElement::largeSector
bool largeSector() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:49
MuonGM::MuonReadoutElement::GlobalToAmdbLRSTransform
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:153
MuonGM::MdtReadoutElement::m_haveTubeGeo
std::atomic< bool > m_haveTubeGeo
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:266
MuonGM::MuonStation::getTransform
Amg::Transform3D getTransform() const
Definition: MuonStation.h:169
ALFA_EventTPCnv_Dict::t0
std::vector< ALFA_RawData_p1 > t0
Definition: ALFA_EventTPCnvDict.h:42
MuonGM::MuonReadoutElement::m_Ssize
double m_Ssize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:143
MuonGM::MuonReadoutElement::getZsize
double getZsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:198
MuonGM::MdtReadoutElement::bounds
virtual const Trk::SurfaceBounds & bounds() const override final
Return the boundaries of the element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:916
MuonGM::MdtReadoutElement::nodeform_localTubePos
Amg::Vector3D nodeform_localTubePos(const Identifier &id) const
MuonGM::MdtReadoutElement::nodeform_localToGlobalTransf
Amg::Transform3D nodeform_localToGlobalTransf(const Identifier &id) const
MuonGM::MdtReadoutElement::m_idHelper
const MdtIdHelper & m_idHelper
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:211
MCP::ScaleSmearParam::s0
@ s0
deg
#define deg
Definition: SbPolyhedron.cxx:17
MuonGM::MuonReadoutElement::setParentStationPV
void setParentStationPV()
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:77
MdtAsBuiltPar::multilayer_t
multilayer_t
MDT multi-layer index.
Definition: MdtAsBuiltPar.h:28
MdtIdHelper::tubeLayer
int tubeLayer(const Identifier &id) const
Definition: MdtIdHelper.cxx:724
MuonGM::MdtReadoutElement::getTubeLengthForCaching
double getTubeLengthForCaching(const int tubeLayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:104
MuonGM::MuonReadoutElement::m_parentMuonStation
const MuonStation * m_parentMuonStation
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:180
MuonGM::MdtReadoutElement::barrel
bool barrel() const
Returns whether the chamber is in the barrel (Assement on first later in stationName)
MuonGM::MuonReadoutElement::m_type
Trk::DetectorElemType m_type
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:164
MuonGM::MuonReadoutElement::m_stationS
double m_stationS
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:171
MuonGM::MdtReadoutElement::transform
virtual const Amg::Transform3D & transform() const override final
Return local to global transform.
MuonGM::MdtReadoutElement::m_tubeBounds
std::vector< CxxUtils::CachedUniquePtr< Trk::CylinderBounds > > m_tubeBounds
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:259
MuonGM::MdtReadoutElement::m_zsignRO_tubeFrame
CxxUtils::CachedValue< int > m_zsignRO_tubeFrame
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:233
BLinePar::getParameter
float getParameter(const Parameter p) const
Returns a given parameter.
Definition: BLinePar.h:40
MuonGM::MdtReadoutElement::normal
virtual const Amg::Vector3D & normal() const override final
Return the normal of the element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:886
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
THROW_EXCEPTION
#define THROW_EXCEPTION(MSG)
Definition: MMReadoutElement.cxx:48
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
MuonGM::MuonReadoutElement::getLongSsize
double getLongSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:199
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
x
#define x
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
MuonGM::MuonReadoutElement::setIndexOfREinMuonStation
void setIndexOfREinMuonStation()
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:104
MuonGM::MdtReadoutElement::m_cutoutShift
double m_cutoutShift
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:224
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
Trk::DetectorElemType::Csc
@ Csc
dumpTruth.getName
getName
Definition: dumpTruth.py:34
Trk::TrkDetElementBase::detectorType
virtual DetectorElemType detectorType() const =0
Return the Detector element type.
MuonGM::MdtReadoutElement::m_firstwire_y
std::array< double, maxnlayers > m_firstwire_y
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:230
MuonGM::MdtReadoutElement::distanceFromRO
double distanceFromRO(const Amg::Vector3D &GlobalHitPosition, const Identifier &id) const
MuonGM::MuonReadoutElement::m_phi
int m_phi
Identifier field of the station phi.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:177
MuonGM::MdtReadoutElement::deformedTransform
Amg::Transform3D deformedTransform(const int tubelayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:462
MuonGM::MuonReadoutElement::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:136
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
MuonGM::MuonReadoutElement::getSsize
double getSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:196
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
Trk::DetectorElemType::Silicon
@ Silicon
MuonGM::MdtReadoutElement::getWireLength
double getWireLength(const int tubeLayer, const int tube) const
python.changerun.kk
list kk
Definition: changerun.py:41
MuonGM::MuonReadoutElement::refreshCache
void refreshCache()
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:177
Amg::getRotateX3D
Amg::Transform3D getRotateX3D(double angle)
get a rotation transformation around X-axis
Definition: GeoPrimitivesHelpers.h:252
MuonGM::MuonReadoutElement::clearCache
virtual void clearCache()=0
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
MuonGM::MuonReadoutElement::getStationName
const std::string & getStationName() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:190
MuonGM::MdtReadoutElement::fromIdealToDeformed
const Amg::Transform3D & fromIdealToDeformed(const int tubelayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:434
MuonGM::MdtReadoutElement::m_haveTubeSurfaces
std::atomic< bool > m_haveTubeSurfaces
Flag whether any elements have been inserted into the corresponding vectors.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:265
Trk::DetectorElemType::SolidState
@ SolidState
MuonGM::MdtReadoutElement::m_haveDeformTransf
std::atomic< bool > m_haveDeformTransf
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:268
MuonGM::MdtReadoutElement::localTubePos
Amg::Vector3D localTubePos(const Identifier &id) const
xmin
double xmin
Definition: listroot.cxx:60
MuonGM::MuonReadoutElement::m_Rsize
double m_Rsize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:144
MuonGM::MdtReadoutElement::GeoInfo::m_transform
Amg::Transform3D m_transform
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:245
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
MuonGM::MdtReadoutElement::m_nMDTinStation
unsigned int m_nMDTinStation
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:215
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGM::MdtReadoutElement::m_tubeSurfaces
std::vector< CxxUtils::CachedUniquePtr< Trk::SaggedLineSurface > > m_tubeSurfaces
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:258
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
xAOD::rotation
rotation
Definition: TrackSurface_v1.cxx:15
Trk::CylinderBounds
Definition: CylinderBounds.h:46
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonGM::MuonReadoutElement::parentMuonStation
const MuonStation * parentMuonStation() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:135
master.flag
bool flag
Definition: master.py:29
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
dumpNswErrorDb.linear
def linear
Definition: dumpNswErrorDb.py:23
MuonGM::MdtReadoutElement::m_stIdx_BIS
const int m_stIdx_BIS
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:212
MuonGM::MdtReadoutElement::outerTubeRadius
double outerTubeRadius() const
Returns the tube radius taking the thickness of the tubes into account.
MuonGM::MuonReadoutElement::m_parentStationPV
PVConstLink m_parentStationPV
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:179
MdtIdHelper::tube
int tube(const Identifier &id) const
Definition: MdtIdHelper.cxx:726
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
MuonGM::MdtReadoutElement::m_elemNormal
CxxUtils::CachedValue< Amg::Vector3D > m_elemNormal
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:257
MuonGM::MuonStation::getNativeToAmdbLRS
const Amg::Transform3D & getNativeToAmdbLRS() const
Definition: MuonStation.h:182
MuonGM::MdtReadoutElement::getMultilayer
int getMultilayer() const
Returns the multilayer represented by the readout element.
MuonGM::MuonReadoutElement::manager
const MuonDetectorManager * manager() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:204
MuonGM::MuonReadoutElement::m_hasCutouts
bool m_hasCutouts
true is there are cutouts in the readdout-element
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:158
MuonGM::MuonReadoutElement::getTechnologyType
std::string getTechnologyType() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:187
MuonGM::MuonDetectorManager::mdtIdHelper
const MdtIdHelper * mdtIdHelper() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:229
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
MuonGM::MdtReadoutElement::m_deadlength
double m_deadlength
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:226
MuonGM::MdtReadoutElement::m_inBarrel
bool m_inBarrel
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:227
MuonGM::MdtReadoutElement::signedRODistanceFromTubeCentre
double signedRODistanceFromTubeCentre(const Identifier &id) const
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
MuonGM::MuonReadoutElement::setStationName
void setStationName(const std::string &)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:169
MuonGM::MuonReadoutElement::m_LongSsize
double m_LongSsize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:146
MdtAsBuiltPar::tubeSide_t
tubeSide_t
MDT tube side.
Definition: MdtAsBuiltPar.h:33
Trk::DetectorElemType::sTgc
@ sTgc
MuonR4::SegmentFit::ParamDefs::y0
@ y0
MuonGM::MdtReadoutElement::posOnDefChamWire
Amg::Vector3D posOnDefChamWire(const Amg::Vector3D &locAMDBPos, const double width_narrow, const double width_wide, const double height, const double thickness, const Amg::Vector3D &fixedPoint) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:583
MuonGM::MdtReadoutElement::m_BLinePar
const BLinePar * m_BLinePar
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:256
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MdtIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
Definition: MdtIdHelper.cxx:659
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
MuonGM::MuonReadoutElement::m_idhash
IdentifierHash m_idhash
data-collection hash identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:166
PlotCalibFromCool.en
en
Definition: PlotCalibFromCool.py:399
MuonGM::MdtReadoutElement::getNominalTubeLengthWoCutouts
double getNominalTubeLengthWoCutouts(const int tubeLayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:408
MuonGM::MdtReadoutElement::m_tubeGeo
std::vector< CxxUtils::CachedUniquePtr< GeoInfo > > m_tubeGeo
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:252
MuonGM::MdtReadoutElement::endcap
bool endcap() const
Returns whether the chamber is in the endcap.
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGM::MdtReadoutElement::tubeToMultilayerTransf
Amg::Transform3D tubeToMultilayerTransf(const Identifier &id) const
MuonGM::MdtReadoutElement::nodeform_globalToLocalTransf
Amg::Transform3D nodeform_globalToLocalTransf(const Identifier &id) const
MuonGM::MuonReadoutElement::m_LongZsize
double m_LongZsize
size in the specified direction
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:148
JetVoronoiDiagramHelpers::coord
double coord
Definition: JetVoronoiDiagramHelpers.h:45
Trk::TrapezoidBounds
Definition: TrapezoidBounds.h:43
MuonGM::MdtReadoutElement::m_associatedBounds
CxxUtils::CachedUniquePtr< Trk::SurfaceBounds > m_associatedBounds
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:272
MuonGM::MdtReadoutElement::ROPos
Amg::Vector3D ROPos(const int tubelayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:289
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
python.PyAthena.v
v
Definition: PyAthena.py:154
MuonGM::MdtReadoutElement::tubeFrame_localROPos
Amg::Vector3D tubeFrame_localROPos(const int tubelayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:283
BLinePar::Parameter
Parameter
Definition: BLinePar.h:21
MuonGM::MuonReadoutElement::toParentStation
Amg::Transform3D toParentStation() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:117
geoGetIds
void geoGetIds(FUNCTION f, const GeoGraphNode *node, int depthLimit=1)
Template helper for running the visitor.
Definition: GeoGetIds.h:82
MuonGM::MuonReadoutElement::getStationIndex
int getStationIndex() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:192
MuonGM::MuonReadoutElement::m_muon_mgr
MuonDetectorManager * m_muon_mgr
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:181
MdtAsBuiltPar
Container classifier the MDT as-built parameters See parameter description in http://atlas-muon-align...
Definition: MdtAsBuiltPar.h:18
MuonGM::MdtReadoutElement::tubePos
Amg::Vector3D tubePos(const Identifier &id) const
Returns the global position of the given tube.
Trk::DetectorElemType::MM
@ MM
MuonGM::MuonReadoutElement::getRsize
double getRsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:197
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
Trk::DetectorElemType::Rpc
@ Rpc
MuonGM::MdtReadoutElement::m_tubelength
std::array< double, maxnsteps > m_tubelength
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:228
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
MuonGM::MdtReadoutElement::m_multilayer
int m_multilayer
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:216
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonGM::MuonReadoutElement::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:163
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
MuonGM::MuonReadoutElement::identify
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:184
MuonGM::MuonStation::getMdtAsBuiltParams
const MdtAsBuiltPar * getMdtAsBuiltParams() const
Definition: MuonStation.cxx:369
MuonGM::MdtReadoutElement::surface
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:891
python.changerun.pv
pv
Definition: changerun.py:81
MuonGM::MdtReadoutElement::m_nsteps
int m_nsteps
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:221
MuonGM::MdtReadoutElement::GeoInfo::m_center
Amg::Vector3D m_center
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:246
Trk::SaggedLineSurface
Definition: SaggedLineSurface.h:35
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
MuonGM::MuonReadoutElement::m_indexOfREinMuonStation
int m_indexOfREinMuonStation
index of this RE in the mother MuonStation
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:169
MuonGM::MuonReadoutElement::m_stIdx
int m_stIdx
Identifier field of the station index.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:173
dqt_zlumi_alleff_HIST.tl
tl
Definition: dqt_zlumi_alleff_HIST.py:73
MuonGM::MuonReadoutElement::sideA
bool sideA() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:207
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
MuonGM::MdtReadoutElement::m_tubepitch
double m_tubepitch
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:218
MuonGM::MdtReadoutElement::getNtubesperlayer
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
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
MuonGM::MuonReadoutElement::hasCutouts
bool hasCutouts() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:126
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
python.compressB64.c
def c
Definition: compressB64.py:93
MuonGM::MuonReadoutElement::MuonReadoutElement
MuonReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:34
MuonGM::MuonReadoutElement::parentStationPV
PVConstLink parentStationPV() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:100
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:26
MuonGM::MdtReadoutElement::m_associatedSurface
CxxUtils::CachedUniquePtr< Trk::Surface > m_associatedSurface
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:271
calibdata.tube
tube
Definition: calibdata.py:31
MuonGM::MdtReadoutElement::m_nlayers
int m_nlayers
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:217
MuonGM::MuonReadoutElement::getStationPhi
int getStationPhi() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:194
MuonGM::MuonReadoutElement::getStationEta
int getStationEta() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:193
Trk::DetectorElemType::Mdt
@ Mdt
fitman.k
k
Definition: fitman.py:528
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
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
Identifier
Definition: IdentifierFieldParser.cxx:14