Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
Muon::MuonStationBuilder Class Referencefinal

#include <MuonStationBuilder.h>

Inheritance diagram for Muon::MuonStationBuilder:
Collaboration diagram for Muon::MuonStationBuilder:

Public Types

using GMInfo = std::pair< Amg::Transform3D, int >
 
using DetachedVolVec = std::vector< std::unique_ptr< Trk::DetachedTrackingVolume > >
 
using DetachedVolumeVec = std::vector< std::unique_ptr< DetachedTrackingVolume > >
 

Public Member Functions

 MuonStationBuilder (const std::string &, const std::string &, const IInterface *)
 
virtual ~MuonStationBuilder ()=default
 
virtual StatusCode initialize () override
 
virtual DetachedVolumeVec buildDetachedTrackingVolumes (bool blend=false) const override
 
DetachedVolVec buildDetachedTrackingVolumesImpl (const MuonGM::MuonDetectorManager *muonMgr, bool blend=false) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
 DeclareInterfaceID (IDetachedTrackingVolumeBuilder, 1, 0)
 Creates the InterfaceID and interfaceID() method. More...
 

Protected Member Functions

std::vector< std::pair< const GeoVPhysVol *, std::vector< GMInfo > > > retrieveGMsensitive (const MuonGM::MuonDetectorManager *muonMgr) const
 
std::unique_ptr< Trk::DetachedTrackingVolumebuildDetachedTrackingVolumeType (const MuonGM::MuonDetectorManager *muonMgr, const GeoVPhysVol *gv, const GMInfo &info) const
 
void glueComponents (Trk::DetachedTrackingVolume *) const
 
void encloseLayers (const Trk::DetachedTrackingVolume *) const
 
void identifyLayers (Trk::DetachedTrackingVolume *, Identifier, int, int, const MuonGM::MuonDetectorManager *) const
 
void identifyNSWLayers (Trk::DetachedTrackingVolume &station, const Identifier &id) const
 
void identifyPrototype (Trk::TrackingVolume &station, int eta, int phi, const Amg::Transform3D &transf, const MuonGM::MuonDetectorManager *muonMgr) const
 
Identifier resolveId (const std::string &vname, const GMInfo &gm_info, int &eta, int &phi, const MuonGM::MuonDetectorManager *muonMgr) const
 
void checkLayerId (std::string_view comment, const MuonGM::MuonDetectorManager *muonMgr, Identifier id, const Trk::Layer *lay) const
 
void getNSWStationsForTranslation (const GeoVPhysVol *pv, const std::string &name, const Amg::Transform3D &, std::vector< std::pair< std::pair< const GeoLogVol *, Trk::MaterialProperties * >, std::vector< Amg::Transform3D >>> &vols, std::vector< std::string > &volNames) const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
 
ToolHandle< Muon::MuonStationTypeBuilderm_muonStationTypeBuilder
 Helper Tool to create TrackingVolume Arrays. More...
 
ToolHandle< Trk::ITrackingVolumeHelperm_trackingVolumeHelper
 Helper Tool to create TrackingVolumes. More...
 
Trk::Material m_muonMaterial
 the material More...
 
Trk::GMTreeBrowser m_gmBrowser
 
Trk::VolumeConverter m_volumeConverter
 material converter More...
 
Trk::GeoMaterialConverter m_materialConverter
 
Gaudi::Property< bool > m_buildBarrel {this, "BuildBarrelStations", true}
 
Gaudi::Property< bool > m_buildEndcap {this, "BuildEndcapStations", true}
 
Gaudi::Property< bool > m_buildCsc {this, "BuildCSCStations", true}
 
Gaudi::Property< bool > m_buildTgc {this, "BuildTGCStations", true}
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

const MuonGM::MuonDetectorManagerm_muonMgr = nullptr
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

The Muon::MuonStationBuilder retrieves muon stations from Muon Geometry Tree prototypes built with help of Muon::MuonStationTypeBuilder

by Sarka.nosp@m..Tod.nosp@m.orova.nosp@m.@cer.nosp@m.n.ch

Definition at line 20 of file MuonStationBuilder.h.

Member Typedef Documentation

◆ DetachedVolumeVec

using Trk::IDetachedTrackingVolumeBuilder::DetachedVolumeVec = std::vector<std::unique_ptr<DetachedTrackingVolume> >
inherited

Definition at line 37 of file IDetachedTrackingVolumeBuilder.h.

◆ DetachedVolVec

using Muon::MuonStationBuilderImpl::DetachedVolVec = std::vector<std::unique_ptr<Trk::DetachedTrackingVolume> >
inherited

Definition at line 48 of file MuonStationBuilderImpl.h.

◆ GMInfo

using Muon::MuonStationBuilderImpl::GMInfo = std::pair<Amg::Transform3D, int>
inherited

Definition at line 44 of file MuonStationBuilderImpl.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonStationBuilder()

Muon::MuonStationBuilder::MuonStationBuilder ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 8 of file MuonStationBuilder.cxx.

12  declareInterface<Trk::IDetachedTrackingVolumeBuilder>(this);
13 }

◆ ~MuonStationBuilder()

virtual Muon::MuonStationBuilder::~MuonStationBuilder ( )
virtualdefault

Member Function Documentation

◆ buildDetachedTrackingVolumes()

Muon::MuonStationBuilder::DetachedVolVec Muon::MuonStationBuilder::buildDetachedTrackingVolumes ( bool  blend = false) const
overridevirtual

◆ buildDetachedTrackingVolumesImpl()

MuonStationBuilderImpl::DetachedVolVec Muon::MuonStationBuilderImpl::buildDetachedTrackingVolumesImpl ( const MuonGM::MuonDetectorManager muonMgr,
bool  blend = false 
) const
inherited

Definition at line 99 of file MuonStationBuilderImpl.cxx.

99  {
100 
101  DetachedVolVec translatedStations{};
102 
103  // retrieve muon station branches from GeoModel tree
104  std::vector<std::pair<const GeoVPhysVol*, std::vector<GMInfo>>> stations = retrieveGMsensitive(muonMgr);
105 
106  for (const auto& mstation : stations) {
107  // build prototype
108  std::unique_ptr<Trk::DetachedTrackingVolume> msType = buildDetachedTrackingVolumeType(muonMgr, mstation.first,
109  mstation.second[0]);
110  if (!msType) {
111  continue;
112  }
113  // clone prototype
114  std::string name = mstation.first->getLogVol()->getName();
115  // NSW prototypes built at position
116  if (name.substr(0, 4) == "sTGC" || name.substr(0, 2) == "MM") {
117  for (unsigned int i = 0; i < mstation.second.size(); i++) {
118  std::string sName = name.substr(name.find('-') + 1);
119  Identifier nswId = m_muonStationTypeBuilder->identifyNSW(sName, mstation.second[i].first);
120  // clone station from prototype
121  Amg::Transform3D trdef(mstation.second[i].first *
122  mstation.second[0].first.inverse());
123  std::unique_ptr<Trk::DetachedTrackingVolume> newStat{msType->clone(name, trdef)};
124  // identify layer representation
125  Trk::Layer* layer = (newStat->layerRepresentation());
126  layer->setLayerType(nswId.get_identifier32().get_compact());
127  // identify layers
128  identifyNSWLayers(*newStat, nswId);
129  // collect
130  translatedStations.push_back(std::move(newStat));
131  } // end clone NSW stations
132  } else {
133  for (auto gminfo : mstation.second) {
134  // clone station from prototype
135  std::unique_ptr<Trk::DetachedTrackingVolume> newStat{msType->clone(name, gminfo.first)};
136  // identify layer representation
137  Trk::Layer* layer = newStat->layerRepresentation();
138  int eta{0}, phi{0};
139  Identifier stId = resolveId(name, gminfo, eta, phi, muonMgr);
140  layer->setLayerType(stId.get_identifier32().get_compact());
141  // glue components
142  glueComponents(newStat.get());
143  // identify layers
144  identifyLayers(newStat.get(), stId, eta, phi, muonMgr);
145  // collect
146  translatedStations.push_back(std::move(newStat));
147  } // end clone non-NSW
148  }
149  } // end loop over prototypes
150 
151  ATH_MSG_DEBUG( "returns " << translatedStations.size() << " stations");
152  return translatedStations;
153 }

◆ buildDetachedTrackingVolumeType()

std::unique_ptr< Trk::DetachedTrackingVolume > Muon::MuonStationBuilderImpl::buildDetachedTrackingVolumeType ( const MuonGM::MuonDetectorManager muonMgr,
const GeoVPhysVol *  gv,
const GMInfo info 
) const
protectedinherited

Definition at line 920 of file MuonStationBuilderImpl.cxx.

922  {
923  const GeoLogVol* clv = cv->getLogVol();
924  const std::string& vname = clv->getName();
925  ATH_MSG_DEBUG(name() << " building station prototype for " << cv->getLogVol()->getName());
927  MuonStationTypeBuilder::Cache cache{};
928 
929  std::unique_ptr<Trk::DetachedTrackingVolume> typeStat{};
930 
931  if (vname.substr(0, 4) == "sTGC" || vname.substr(0, 2) == "MM") {
932  std::string sName = vname.substr(vname.find('-') + 1);
933  Identifier nswId = m_muonStationTypeBuilder->identifyNSW(sName, gmInfo.first);
934 
935  if (vname.substr(0, 4) == "sTGC" && m_idHelperSvc->issTgc(nswId)) {
936  return m_muonStationTypeBuilder->process_sTGC(nswId, cv, gmInfo.first);
937  } else if (vname.substr(0, 2) == "MM" && m_idHelperSvc->isMM(nswId)) {
938  return m_muonStationTypeBuilder->process_MM(nswId, cv, gmInfo.first);
939  }
940  }
941 
942  if (!m_buildBarrel && vname.compare(0, 1, "B") == 0)
943  return typeStat;
944  if (!m_buildEndcap && vname.compare(0, 1, "E") == 0)
945  return typeStat;
946  if (!m_buildCsc && vname.compare(0, 1, "C") == 0)
947  return typeStat;
948  if (!m_buildTgc && vname.compare(0, 1, "T") == 0)
949  return typeStat;
950 
951  int etaphi = gmInfo.second; // retrieve eta/phi indexes
952  int sign = (etaphi < 0) ? -1 : 1;
953  etaphi = sign * etaphi;
954  int is_mirr = etaphi / 1000;
955  etaphi = etaphi - is_mirr * 1000;
956  int eta = etaphi / 100;
957  int phi = etaphi - eta * 100;
958  eta = eta * sign;
959  const MuonGM::MuonStation* gmStation = muonMgr->getMuonStation(vname.substr(0, 3), eta, phi);
960  if (!gmStation) {
961  gmStation = muonMgr->getMuonStation(vname.substr(0, 4), eta, phi);
962  }
963  // assembly ?
964  if (!gmStation) {
965  int etaphi = gmInfo.second; // retrieve eta/phi indexes
966  int a_etaphi = static_cast<int>(etaphi / 100000);
967  int sideC = static_cast<int>(a_etaphi / 10000);
968  a_etaphi -= sideC * 10000;
969  is_mirr = static_cast<int>(a_etaphi / 1000);
970  a_etaphi -= is_mirr * 1000;
971  eta = static_cast<int>(a_etaphi / 100);
972  phi = a_etaphi - eta * 100;
973  if (sideC)
974  eta *= -1;
975  gmStation = muonMgr->getMuonStation(vname.substr(0, 3), eta, phi);
976  }
977  //
978  std::string stname = (vname.compare(0, 1, "T") == 0) ? vname : (clv->getName()).substr(0, vname.size() - 8);
979  //
980  if (stname.compare(0, 1, "B") == 0 && eta < 0) {
981  stname = (clv->getName()).substr(0, vname.size() - 8) + "-";
982  }
983  ATH_MSG_VERBOSE(" new station type " << stname << "," << clv->getShape()->type());
984  ATH_MSG_VERBOSE(" prototype built from eta, phi:" << eta << "," << phi);
985 
986  if (stname.compare(0, 2, "CS") == 0 || stname.compare(0, 1, "T") == 0) {
987 
988  if (stname.compare(0, 2, "CS") == 0) {
989  auto csc_station = m_muonStationTypeBuilder->processCscStation(cv, stname, cache);
990  // create layer representation
991  auto layerRepr = m_muonStationTypeBuilder->createLayerRepresentation(*csc_station);
992  // create prototype as detached tracking volume
993  auto layerVec = std ::make_unique<std::vector<Trk::Layer*>>(Muon::release(layerRepr.second));
994  typeStat = std::make_unique<Trk::DetachedTrackingVolume>(stname, csc_station.release(),
995  layerRepr.first.release(), layerVec.release());
996  } else {
997  std::unique_ptr<Trk::TrackingVolume> tgc_station{m_muonStationTypeBuilder->processTgcStation(cv, cache)};
998  // create layer representation
999  auto layerRepr = m_muonStationTypeBuilder->createLayerRepresentation(*tgc_station);
1000  // create prototype as detached tracking volume
1001  auto layerVec = std ::make_unique<std::vector<Trk::Layer*>>(Muon::release(layerRepr.second));
1002  typeStat = std::make_unique<Trk::DetachedTrackingVolume>(stname, tgc_station.release(),
1003  layerRepr.first.release(), layerVec.release());
1004  }
1005 
1006  } else {
1007  const GeoShape* shapeS = clv->getShape();
1008  while (shapeS->type() != "Trd") {
1009  if (shapeS->type() == "Shift") {
1010  const GeoShapeShift* shift = dynamic_cast<const GeoShapeShift*>(shapeS);
1011  shapeS = shift->getOp();
1012  } else if (shapeS->type() == "Subtraction") {
1013  const GeoShapeSubtraction* sub = dynamic_cast<const GeoShapeSubtraction*>(shapeS);
1014  shapeS = sub->getOpA();
1015  } else if (shapeS->type() == "Union") {
1016  const GeoShapeUnion* uni = dynamic_cast<const GeoShapeUnion*>(shapeS);
1017  shapeS = uni->getOpA();
1018  } else {
1019  ATH_MSG_WARNING("unexpected station shape ? "<< shapeS->type() << ", station not built");
1020  break;
1021  }
1022  }
1023  const GeoTrd* trd = dynamic_cast<const GeoTrd*>(shapeS);
1024 
1025  double halfX1{0.}, halfX2{0.}, halfY1{0.}, halfY2{0.}, halfZ{0.};
1026  if (trd) {
1027  //
1028  halfX1 = trd->getXHalfLength1();
1029  halfX2 = trd->getXHalfLength2();
1030  halfY1 = trd->getYHalfLength1();
1031  halfY2 = trd->getYHalfLength2();
1032  halfZ = trd->getZHalfLength();
1033 
1034  // define enveloping volume
1035  std::unique_ptr<Trk::TrackingVolumeArray> confinedVolumes{};
1036  std::vector<std::unique_ptr<Trk::Layer>> confinedLayers{};
1037  std::unique_ptr<Trk::Volume> envelope;
1038  std::string shape = "Trd";
1039  if (halfX1 == halfX2 && halfY1 == halfY2)
1040  shape = "Box";
1041  if (shape == "Box") {
1042  auto envBounds = std::make_unique<Trk::CuboidVolumeBounds>(halfX1, halfY1, halfZ);
1043  // station components
1044  confinedVolumes = m_muonStationTypeBuilder->processBoxStationComponents(cv, *envBounds, cache);
1045  if (!confinedVolumes) {
1046  confinedLayers = m_muonStationTypeBuilder->processBoxComponentsArbitrary(cv, *envBounds, cache);
1047  }
1048  // enveloping volume
1049  envelope = std::make_unique<Trk::Volume>(nullptr, envBounds.release());
1050  } else if (shape == "Trd") {
1051  std::unique_ptr<Trk::TrapezoidVolumeBounds> envBounds{};
1052  Amg::Transform3D transf{Amg::Transform3D::Identity()};
1053  if (halfY1 == halfY2) {
1054  envBounds = std::make_unique<Trk::TrapezoidVolumeBounds>(halfX1, halfX2, halfY1, halfZ);
1055  ATH_MSG_VERBOSE("CAUTION!!!: this trapezoid volume does not require XY -> YZ switch");
1056  }
1057  if (halfY1 != halfY2 && halfX1 == halfX2) {
1058  transf = Amg::getRotateY3D(M_PI_2) * Amg::getRotateZ3D(M_PI_2);
1059  envBounds = std::make_unique<Trk::TrapezoidVolumeBounds>(halfY1, halfY2, halfZ, halfX1);
1060  }
1061  if (halfX1 != halfX2 && halfY1 != halfY2) {
1062  ATH_MSG_WARNING("station envelope arbitrary trapezoid?"<< stname);
1063  }
1064  if (envBounds) {
1065  // station components
1066  confinedVolumes = m_muonStationTypeBuilder->processTrdStationComponents(cv, *envBounds, cache);
1067  // enveloping volume
1068  envelope = std::make_unique<Trk::Volume>(makeTransform(transf), envBounds.release());
1069  }
1070  }
1071 
1072  if (envelope) {
1073  // ready to build the station prototype
1074  std::unique_ptr<Trk::TrackingVolume> newType{};
1075  if (!confinedLayers.empty()) {
1076  auto confinedLayerPtr = std::make_unique<std::vector<Trk::Layer*>>(Muon::release(confinedLayers));
1077  newType = std::make_unique<Trk::TrackingVolume>(*envelope, m_muonMaterial, confinedLayerPtr.release(), stname);
1078  } else {
1079  newType = std::make_unique<Trk::TrackingVolume>(*envelope, m_muonMaterial, nullptr, confinedVolumes.release(), stname);
1080  }
1081 
1082 
1083  // identify prototype
1084  if ((stname.compare(0, 1, "B") == 0 || stname.compare(0, 1, "E") == 0))
1085  identifyPrototype(*newType, eta, phi, gmStation->getTransform(), muonMgr);
1086 
1087  // create layer representation
1088  auto layerRepr = m_muonStationTypeBuilder->createLayerRepresentation(*newType);
1089 
1090  // create prototype as detached tracking volume
1091  auto layerVec = std::make_unique<std::vector<Trk::Layer*>>(Muon::release(layerRepr.second));
1092  typeStat = std::make_unique<Trk::DetachedTrackingVolume>(stname, newType.release(),
1093  layerRepr.first.release(), layerVec.release());
1094  }
1095  }
1096  } // end new station type
1097 
1098  ATH_MSG_DEBUG(" station prototype built for " << vname);
1099 
1101  return typeStat;
1102 }

◆ checkLayerId()

void Muon::MuonStationBuilderImpl::checkLayerId ( std::string_view  comment,
const MuonGM::MuonDetectorManager muonMgr,
Identifier  id,
const Trk::Layer lay 
) const
protectedinherited

Definition at line 1248 of file MuonStationBuilderImpl.cxx.

1249  {
1250 
1251  // RE
1252  if (m_idHelperSvc->isMdt(id)) {
1253  const MuonGM::MdtReadoutElement* mdtRE = muonMgr->getMdtReadoutElement(id);
1254  constexpr double tol = 0.5*Gaudi::Units::mm;
1255  if (mdtRE && !lay->surfaceRepresentation().isOnSurface(mdtRE->transform(id).translation(), tol, tol)) {
1256  ATH_MSG_DEBUG(__FILE__<<":"<<__LINE__<<" "<<comment << ":tube(id) "
1257  <<m_idHelperSvc->toString(id)<<" "<<Amg::toString(mdtRE->transform(id).translation())
1258  <<" not on surface:"<<lay->surfaceRepresentation()<<std::endl<<
1259  " "<<Amg::toString(lay->surfaceRepresentation().transform().inverse()*(mdtRE->transform(id).translation())) );
1260  }
1261  } else if (m_idHelperSvc->isRpc(id)) {
1262  const MuonGM::RpcReadoutElement* rpcRE = muonMgr->getRpcReadoutElement(id);
1263  Amg::Transform3D trid = rpcRE->transform(id);
1264  Amg::Transform3D check_layer_identity = lay->surfaceRepresentation().transform().inverse() * trid;
1265  if (!Amg::doesNotDeform(check_layer_identity)) {
1266  ATH_MSG_DEBUG(__FILE__<<":"<<__LINE__<<" "<<comment<<" "<<Amg::toString(check_layer_identity));
1267  }
1268 
1269  } else if (m_idHelperSvc->isTgc(id)) {
1270  const Amg::Transform3D trid = muonMgr->getTgcReadoutElement(id)->transform(id);
1271  Amg::Transform3D check_layer_identity = lay->surfaceRepresentation().transform().inverse() * trid;
1272  if (!Amg::doesNotDeform(check_layer_identity)) {
1273  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" "<<comment <<" "<<Amg::toString(check_layer_identity));
1274  }
1275  }
1276 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ DeclareInterfaceID()

Trk::IDetachedTrackingVolumeBuilder::DeclareInterfaceID ( IDetachedTrackingVolumeBuilder  ,
,
 
)
inherited

Creates the InterfaceID and interfaceID() method.

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ encloseLayers()

void Muon::MuonStationBuilderImpl::encloseLayers ( const Trk::DetachedTrackingVolume ) const
protectedinherited

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getNSWStationsForTranslation()

void Muon::MuonStationBuilderImpl::getNSWStationsForTranslation ( const GeoVPhysVol *  pv,
const std::string &  name,
const Amg::Transform3D transform,
std::vector< std::pair< std::pair< const GeoLogVol *, Trk::MaterialProperties * >, std::vector< Amg::Transform3D >>> &  vols,
std::vector< std::string > &  volNames 
) const
protectedinherited

Definition at line 643 of file MuonStationBuilderImpl.cxx.

647  {
648  // special code to get the Sensitive volume of the sTGC and MM (so the gas
649  // volume) throught the Frame
650 
651  // subcomponents
652  unsigned int nc = pv->getNChildVols();
653  ATH_MSG_DEBUG("getNSWStationsForTranslation from:"
654  << pv->getLogVol()->getName() << ","
655  << pv->getLogVol()->getMaterial()->getName()
656  << ", looping over " << nc << " children");
657 
658  for (unsigned int ic = 0; ic < nc; ic++) {
659  Amg::Transform3D transf = pv->getXToChildVol(ic);
660  const GeoVPhysVol* cv = pv->getChildVol(ic);
661  const GeoLogVol* clv = cv->getLogVol();
662  std::string childName = clv->getName();
663  ATH_MSG_DEBUG("getNSWStationsForTranslation child " << childName);
664 
665  if (childName.empty()) {
666  childName = "Spacer";
667  }
668  if (childName.size() > 9 && childName.substr(childName.size() - 9, 9) == "Sensitive") {
669  childName += std::to_string(ic);
670  }
671 
672  std::string cName = childName.compare(0, 3, "NSW") == 0 || childName.compare(0, 8, "NewSmall") == 0
673  ? name : name + childName;
674  ATH_MSG_VERBOSE("child number,name,position:" << ic << ":" << clv->getName() << ":"<< Amg::toString(transform * transf));
675 
676  if (!cv->getNChildVols()) {
677  bool found = false;
678  for (unsigned int is = 0; is < vols.size(); is++) {
679  if (cName == volNames[is]) {
680  if (std::abs((transform * transf).translation().perp() -
681  vols[is].second.front().translation().perp()) <
682  1.) {
683  found = true;
684  // order transforms to position prototype at phi=0/
685  // 0.125 pi
686  double phiTr = (transform * transf).translation().phi();
687  if (phiTr > -0.001 && phiTr < 0.4) {
688  vols[is].second.insert(vols[is].second.begin(),
689  transform * transf);
690  } else
691  vols[is].second.push_back(transform * transf);
693  "clone?"
694  << clv->getName() << ","
695  << (transform * transf).translation().perp() << ","
696  << (transform * transf).translation().z() << ","
697  << phiTr);
698 
699  break;
700  }
701  }
702  }
703  if (!found) {
704  std::vector<Amg::Transform3D> volTr;
705  volTr.push_back(transform * transf);
706  // divide mother material ? seems strange - check !
707  // double scale = 1.; // 1./nc;
708  double thick = 2 * m_muonStationTypeBuilder->get_x_size(pv);
709  if (pv->getLogVol()->getMaterial()->getName() != "Ether" &&
710  (childName == "MM_Frame" || childName == "sTGC_Frame")) {
711  Trk::MaterialProperties matComb(0., 10.e10, 10.e10, 13.,
712  26., 0.);
714  pv->getLogVol()->getMaterial());
715  matComb.addMaterial(newMat, thick / newMat.x0());
716  ATH_MSG_VERBOSE(" use mother volume thickness, x0: "
717  << matComb.thickness() << ", "
718  << matComb.x0()
719  << " mat: " << matComb.thicknessInX0());
721  new Trk::MaterialProperties(matComb);
722  // store mother volume (and not child = Frame)
723  std::pair<const GeoLogVol*, Trk::MaterialProperties*> cpair(
724  pv->getLogVol(), nMat);
725  vols.emplace_back(cpair, volTr);
726  // store extensive name
727  volNames.push_back(cName);
728  ATH_MSG_VERBOSE("new NSW station volume added:"
729  << cName << ", "
730  << clv->getMaterial()->getName() << ", "
731  << volTr.back().translation().z() << ", "
732  << volTr.back().translation().phi()
733  << " mat: " << matComb.thicknessInX0());
734  }
735  // printInfo(cv);
736  }
737  } else {
738  getNSWStationsForTranslation(cv, cName, transform * transf, vols,
739  volNames);
740  }
741  }
742 }

◆ glueComponents()

void Muon::MuonStationBuilderImpl::glueComponents ( Trk::DetachedTrackingVolume stat) const
protectedinherited

Definition at line 155 of file MuonStationBuilderImpl.cxx.

155  {
156  Trk::TrackingVolumeArray* volArray = stat->trackingVolume()->confinedVolumes();
157  if (!volArray || volArray->arrayObjectsNumber() <= 1) {
158  return;
159  }
160 
162  const Trk::BinUtility* binUtilityX = volArray->binUtility();
163  const Trk::CuboidVolumeBounds* cubVolBounds = dynamic_cast<const Trk::CuboidVolumeBounds*>(&(components[0]->volumeBounds()));
164 
165  // identify 'lower' and 'upper' boundary surface
168 
169  // rectangular station in x ordering (MDT barrel)
170  if (cubVolBounds && binUtilityX) {
171  low = Trk::negativeFaceYZ;
173  }
174 
175  if (low >= 0 && up >= 0) {
176  // glue volumes
177  for (unsigned int i = 0; i < components.size() - 1; ++i) {
178  m_trackingVolumeHelper->glueTrackingVolumes(*(components[i]), up, *(components[i + 1]), low);
179  }
180  }
181 
182 
183 }

◆ identifyLayers()

void Muon::MuonStationBuilderImpl::identifyLayers ( Trk::DetachedTrackingVolume station,
Identifier  ,
int  eta,
int  phi,
const MuonGM::MuonDetectorManager muonMgr 
) const
protectedinherited

Definition at line 185 of file MuonStationBuilderImpl.cxx.

187  {
188  ATH_MSG_VERBOSE(name() << " identifying layers ");
189 
190  const std::string stationName = station->trackingVolume()->volumeName();
191  ATH_MSG_VERBOSE(" in station " << station->name());
192  const std::string stationStr = stationName.substr(0, 3);
193  bool is_valid{false};
194  if (m_idHelperSvc->hasCSC() && stationStr[0] == 'C') {
195  const int cscEtaSt = eta - MuonGM::MuonDetectorManager::NCscStEtaOffset;
196  const Identifier readout_id = muonMgr->cscIdHelper()->channelID(
197  stationStr, cscEtaSt, phi + 1, 1, 1, 0, 1, is_valid);
198  const MuonGM::CscReadoutElement* cscRE =
199  is_valid ? muonMgr->getCscReadoutElement(readout_id) : nullptr;
200  if (!cscRE) {
201  const Identifier backup_id = muonMgr->cscIdHelper()->channelID(
202  stationStr, cscEtaSt, phi + 1, 2, 1, 0, 1, is_valid);
203  cscRE =
204  is_valid ? muonMgr->getCscReadoutElement(backup_id) : nullptr;
205  }
206  if (cscRE) {
207  for (int gasgap = 0; gasgap < cscRE->Ngasgaps(); gasgap++) {
208  Identifier idi = m_idHelperSvc->cscIdHelper().channelID(
209  cscRE->identify(), cscRE->ChamberLayer(), gasgap + 1, 0, 1,
210  is_valid);
211  if (!is_valid)
212  continue;
213  const auto *stripSurf = dynamic_cast<const Trk::PlaneSurface*>(&(cscRE->surface(idi)));
214  const Amg::Vector3D& gpi = stripSurf->center();
215  Trk::TrackingVolume* assocVol =
216  station->trackingVolume()->associatedSubVolume(gpi);
217  Trk::Layer* assocLay = nullptr;
218  if (assocVol)
219  assocLay = assocVol->associatedLayer(gpi);
220  unsigned int iD = idi.get_identifier32().get_compact();
221  if (assocVol && assocLay) {
222  assocLay->setLayerType(iD);
223  }
224  if (assocLay) {
225  assocLay->setRef((assocLay->surfaceRepresentation().transform().inverse() *gpi)[1]);
226  }
227  }
228  } else {
229  ATH_MSG_DEBUG("cscRE not found:" << stationName << "," << eta << ","
230  << phi);
231  }
232  } else if (stationStr[0] == 'T') {
233  const TgcIdHelper& idHelper{m_idHelperSvc->tgcIdHelper()};
234  int st = 7;
235  if (stationStr == "T1F") {
236  st = 0;
237  } else if (stationStr == "T1E") {
238  st = 1;
239  } else if (stationStr == "T2F") {
240  st = 2;
241  } else if (stationStr == "T2E") {
242  st = 3;
243  } else if (stationStr == "T3F") {
244  st = 4;
245  } else if (stationStr == "T3E") {
246  st = 5;
247  } else if (stationStr == "T4F") {
248  st = 6;
249  }
250 
251  const int stationName =
254  const int stationEta =
256  auto getReadout = [stationName, stationEta, muonMgr, &idHelper](int phi) {
257  const int stationPhi = phi + 1;
258  bool is_valid{false};
259  const Identifier id = idHelper.elementID(stationName, stationEta, stationPhi, is_valid);
260  return is_valid ? muonMgr->getTgcReadoutElement(id) : nullptr;
261  };
262  const MuonGM::TgcReadoutElement* tgc = getReadout(phi - 1);
263 
264  if (!tgc || !(station->trackingVolume()->inside(tgc->center(), 0.))) {
265  unsigned int phit = 0;
266 
267  while (phit < 48) {
268  const MuonGM::TgcReadoutElement* tgct = getReadout(phit);
269  if (tgct &&
270  station->trackingVolume()->inside(tgct->center(), 0.)) {
271  tgc = tgct;
272  phi = phit;
273  // update station identity
274  Identifier oldId(station->layerRepresentation()->layerType());
275  int stationName = idHelper.stationName(oldId);
276  int stationEta = idHelper.stationEta(oldId);
277  Identifier stId = idHelper.channelID(stationName, stationEta, phi,
278  1,1,1, is_valid);
279  station->layerRepresentation()->setLayerType(
280  stId.get_identifier32().get_compact());
281  break;
282  }
283  phit++;
284  }
285  }
286 
287  if (tgc) {
288  const TgcIdHelper& idHelper{m_idHelperSvc->tgcIdHelper()};
289  int etaSt = tgc->getStationEta();
290  int phiSt = tgc->getStationPhi();
291 
292  bool validId{false};
293  Identifier wireId = idHelper.channelID(stationStr, etaSt, phiSt, 1, 0, 1, validId);
294  if (!validId) {
295  ATH_MSG_ERROR("invalid TGC channel:" << wireId);
296  }
297  const Amg::Vector3D gp = tgc->channelPos(wireId);
298  Trk::TrackingVolume* assocVol =
299  station->trackingVolume()->associatedSubVolume(gp);
300  if (!assocVol)
301  ATH_MSG_DEBUG("wrong tgcROE?" << stationStr << "," << etaSt
302  << "," << phiSt);
303  if (assocVol && assocVol->confinedLayers()) {
305  assocVol->confinedLayers()->arrayObjects();
306 
307  for (unsigned int il = 0; il < layers.size(); il++) {
308  wireId = idHelper.channelID(stationStr, etaSt, phiSt, il + 1, 1, 1, validId);
309  if (!validId) {
310  ATH_MSG_ERROR("invalid TGC channel:" << wireId);
311  layers[il]->setLayerType(1);
312  } else {
313  unsigned int id = wireId.get_identifier32().get_compact();
314  layers[il]->setLayerType(id);
315  // validation
316  Identifier checkId(layers[il]->layerType());
317  const auto *stripSurf = dynamic_cast<const Trk::PlaneSurface*>(&(tgc->surface(checkId)));
318  if ((layers[il]->surfaceRepresentation().transform().inverse() * stripSurf->center()).mag() > 0.001)
319  ATH_MSG_DEBUG("TGC strip plane shifted:"<< st << "," << eta << "," << phi
320  << ":"<< layers[il]->surfaceRepresentation().transform().inverse() * stripSurf->center());
321  }
322  }
323  }
324  } else {
325  ATH_MSG_WARNING(name() << "tgcROE not found for :" << stationName
326  << "," << eta << "," << phi);
327  }
328  } else if (m_idHelperSvc->hasMDT() &&
329  (stationName[0] == 'B' || stationName[0] == 'E')) {
330  // recalculate id
331  Identifier stId(station->layerRepresentation()->layerType());
332  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
333  const int nameIndex = idHelper.stationNameIndex(stationName.substr(0, 3));
334  if (station->trackingVolume()->confinedVolumes()) {
337  for (auto* cVol : cVols) {
338  if (cVol->confinedLayers()) {
339  Trk::BinnedArraySpan<Trk::Layer* const> cLays = cVol->confinedLayers()->arrayObjects();
340  const MuonGM::MdtReadoutElement* mdtROE = nullptr;
341  bool is_valid{false};
342 
343  for (auto* cLay : cLays) {
344  Identifier id(cLay->layerType());
345  if (id.get_compact() > 0 && m_idHelperSvc->isMdt(id)) {
346  Identifier newId = idHelper.channelID(nameIndex, eta, phi,
347  idHelper.multilayer(id),
348  idHelper.tubeLayer(id),
349  idHelper.tube(id),
350  is_valid);
351  if (!mdtROE) {
352  mdtROE = is_valid ? muonMgr->getMdtReadoutElement(newId) : nullptr;
353  }
354  unsigned int newid = newId.get_identifier32().get_compact();
355  cLay->setLayerType(newid);
356  // check reference position
357  if (mdtROE) {
358  double ref = cLay->getRef();
359  // double loc = mdtROE->localROPos(newId)[2]; //
360  // this does not take into account ROE shift wrt
361  // TG station/layer
362  double loc = (cLay->surfaceRepresentation().transform().inverse() * mdtROE->tubePos(newId))[1];
363  if (std::abs(ref) > 10e6) {
364  double sign = (ref > 0.) ? 1. : -1.;
365  int dec = int(ref / 1e5);
366  ref = ref - dec * 1e5 -
367  0.5 * (sign + 1) * 1e5;
368  if (std::abs(ref - loc) > 0.001) { // re-pack
369  cLay->setRef(loc + dec * 1e5 + 0.5 * (sign + 1) * 1e5);
370  }
371  } else if (std::abs(ref - loc) > 0.001) {
372  cLay->setRef(loc);
373  }
374  }
375  }
376  }
377  }
378  if (!cVol->confinedArbitraryLayers().empty()) {
379  Trk::ArraySpan<Trk::Layer* const> cLays = cVol->confinedArbitraryLayers();
380  const RpcIdHelper& idHelper{m_idHelperSvc->rpcIdHelper()};
381  for (auto* cLay : cLays) {
382  Identifier id(cLay->layerType());
383  bool is_valid{false};
384  if (m_idHelperSvc->hasRPC() && id.get_compact() > 0 && m_idHelperSvc->isRpc(id)) {
385  Identifier newId = idHelper.channelID(nameIndex, eta, phi,
386  idHelper.doubletR(id), idHelper.doubletZ(id),
387  idHelper.doubletPhi(id), idHelper.gasGap(id),
388  1, idHelper.strip(id),
389  is_valid);
390  int newid = newId.get_identifier32().get_compact();
391  cLay->setLayerType(newid);
392  }
393  }
394  }
395  }
396  }
397  }
398  // by now, all the layers should be identified - verify
399  if (station->trackingVolume()->confinedVolumes()) {
402  for (auto* cVol : cVols) {
403  if (cVol->confinedLayers()) {
405  cVol->confinedLayers()->arrayObjects();
406  for (unsigned int il = 0; il < cLays.size(); il++) {
407  Identifier id(cLays[il]->layerType());
408  if (id == 1)
409  ATH_MSG_DEBUG(station->name()
410  << "," << cVol->volumeName()
411  << ", unidentified active layer:" << il);
412  else if (id != 0)
413  checkLayerId("check layer in " + station->name() +
414  " subvolume " + cVol->volumeName(),
415  muonMgr, id, cLays[il]);
416  }
417  }
418  if (!cVol->confinedArbitraryLayers().empty()) {
420  cVol->confinedArbitraryLayers();
421  for (unsigned int il = 0; il < cLays.size(); il++) {
422  Identifier id(cLays[il]->layerType());
423  if (id == 1)
424  ATH_MSG_DEBUG(station->name()
425  << "," << cVol->volumeName()
426  << ", unidentified active layer:" << il);
427  else if (id != 0)
428  checkLayerId("check arbitrary layer in " +
429  station->name() + " subvolume " +
430  cVol->volumeName(),
431  muonMgr, id, cLays[il]);
432  }
433  }
434  }
435  }
436  if (station->trackingVolume()->confinedLayers()) {
438  station->trackingVolume()->confinedLayers()->arrayObjects();
439  for (unsigned int il = 0; il < cLays.size(); il++) {
440  Identifier id(cLays[il]->layerType());
441  if (id == 1)
442  ATH_MSG_DEBUG(station->name()
443  << "," << station->name()
444  << ", unidentified active layer:" << il);
445  else if (id != 0)
446  checkLayerId("check confined layer in " + station->name(),
447  muonMgr, id, cLays[il]);
448  }
449  }
450  // end identification check
451 }

◆ identifyNSWLayers()

void Muon::MuonStationBuilderImpl::identifyNSWLayers ( Trk::DetachedTrackingVolume station,
const Identifier id 
) const
protectedinherited

Definition at line 453 of file MuonStationBuilderImpl.cxx.

454  {
455 
456 
457  if (!station.trackingVolume()->confinedLayers()) return;
459  const bool isStgc{station.name().substr(0, 4) == "sTGC"};
460  const bool isMm{station.name().substr(0, 2) == "MM"};
461  if (!isMm && !isStgc) return;
462  for (unsigned int il = 0; il < lays.size(); il++) {
463  if (isStgc) {
464  const sTgcIdHelper& idHelper{m_idHelperSvc->stgcIdHelper()};
465  const Identifier lid = idHelper.channelID(id, idHelper.multilayer(id), il + 1, 2, 1);
466  lays[il]->setLayerType(lid.get_identifier32().get_compact());
467 
468  } else if (isMm) {
469  const MmIdHelper& idHelper{m_idHelperSvc->mmIdHelper()};
470  const Identifier lid = idHelper.channelID(id, idHelper.multilayer(id), il + 1, 1);
471  lays[il]->setLayerType(lid.get_identifier32().get_compact());
472  }
473  }
474 }

◆ identifyPrototype()

void Muon::MuonStationBuilderImpl::identifyPrototype ( Trk::TrackingVolume station,
int  eta,
int  phi,
const Amg::Transform3D transf,
const MuonGM::MuonDetectorManager muonMgr 
) const
protectedinherited

Definition at line 476 of file MuonStationBuilderImpl.cxx.

478  {
479  ATH_MSG_VERBOSE(name() << " identifying prototype ");
480 
481  const std::string& stationName = station.volumeName();
482  ATH_MSG_VERBOSE(" for station " << stationName);
483  const std::string stationNameShort = stationName.substr(0, 3);
484  const char stationFirstChar = stationName[0];
485  bool is_valid{false};
486 
487  if (m_idHelperSvc->hasMDT() && (stationFirstChar == 'B' || stationFirstChar == 'E')) {
488  // MDT
489  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
490  const int nameIndex = idHelper.stationNameIndex(stationNameShort);
491  for (int multi = 1; multi <= 2; ++multi) {
492  const Identifier ele_id = idHelper.channelID(nameIndex, eta, phi, multi, 1, 1, is_valid);
493  if (!is_valid) {
494  continue;
495  }
496  const MuonGM::MdtReadoutElement* multilayer = muonMgr->getMdtReadoutElement(ele_id);
497  if (!multilayer) {
498  continue;
499  }
500  Trk::TrackingVolume* assocVol = station.associatedSubVolume(transf.inverse() * multilayer->center());
501  if (!assocVol) {
502  ATH_MSG_WARNING("valid multilayer outside station:" << stationName);
503  continue;
504  }
505  int nLayers = multilayer->getNLayers();
506  for (int layer = 1; layer <= nLayers; ++layer) {
507  Identifier id = idHelper.channelID(nameIndex, eta, phi, multi, layer, 1, is_valid);
508  if (!is_valid) {
509  continue;
510  }
511  // retrieve associated layer
512  Trk::Layer* assocLay = assocVol->associatedLayer(transf.inverse() * multilayer->tubePos(id));
513  if (assocLay) {
514  assocLay->setLayerType(id.get_identifier32().get_compact());
515  }
516  }
517  }
518 
519  // RPC ?
520  Trk::BinnedArray<Trk::TrackingVolume>* confinedVolumes = station.confinedVolumes();
521  if (confinedVolumes) {
523  for (auto* vol : vols) {
524  if (!m_idHelperSvc->hasRPC() || vol->volumeName() != "RPC") {
525  break;
526  }
527 
528  // for active layers do a search of associated ROE
529  Trk::ArraySpan<Trk::Layer* const> layers = vol->confinedArbitraryLayers();
530  int nameIndex = m_idHelperSvc->rpcIdHelper().stationNameIndex(stationNameShort);
532  if (stationNameShort == "BME" || stationNameShort == "BMG") {
533  continue;
534  }
535  // the following checks are not necessarily needed, since
536  // calling channelID with check=true would catch them
537  // However, since these validity checks are slow, let's
538  // manually skip the obvious non-existant ones
539  //
540  // only BOG7/8 and BMS2/4 have doubletZ=3, the remaing BOG
541  // and BOF4 have doubletZ=1
542  int doubletZMax = 2;
543  if (stationNameShort.find("BMS") != std::string::npos && (std::abs(eta) == 2 || std::abs(eta) == 4)) {
544  doubletZMax = 3;
545  }
546  else if (stationNameShort.find("BOG") != std::string::npos) {
547  if (std::abs(eta) == 7 || std::abs(eta) == 8) {
548  doubletZMax = 3;
549  } else {
550  doubletZMax = 1;
551  }
552  } else if (stationNameShort.find("BOF") != std::string::npos && std::abs(eta) == 4){
553  doubletZMax = 1;
554  }
555  // all BOL/BOS and BOF1 have doubletR=1
556  const RpcIdHelper& idHelper{m_idHelperSvc->rpcIdHelper()};
557  for (int doubletR = 1; doubletR <= 2; ++doubletR) {
558  bool isValid{false};
559  const Identifier stationId = idHelper.elementID(nameIndex, eta, phi, doubletR, isValid);
560  if (!isValid) {
561  continue;
562  }
563  for (int doubletZ = 1; doubletZ <= doubletZMax; ++doubletZ) {
564  for (int doubletPhi = 1; doubletPhi <= 2; doubletPhi++) {
565 
566  const Identifier id = idHelper.channelID(stationId, doubletZ, doubletPhi,
567  1, 0, 1, isValid);
568  if (!isValid) {
569  continue;
570  }
571  const MuonGM::RpcReadoutElement* rpc = muonMgr->getRpcReadoutElement(id);
572  if (!rpc) {
573  continue;
574  }
575  for (int gasGap = 1; gasGap <= rpc->numberOfLayers(); ++gasGap) {
576 
577  Identifier etaId = idHelper.channelID(id, doubletZ, doubletPhi,
578  gasGap, 0, 1, isValid);
579 
580  const Amg::Vector3D stripLocPos = transf.inverse() * rpc->stripPos(etaId);
581  for (auto* layer : layers) {
582  if (layer->layerType() == 0 ||
583  !layer->surfaceRepresentation().isOnSurface(stripLocPos, false, 0.5* layer->thickness())){
584  continue;
585  }
586  const Amg::Vector3D locPos1 =layer->surfaceRepresentation().transform().inverse() * stripLocPos;
587  const Amg::Vector3D locPos2 = rpc->surface(etaId).transform().inverse() * rpc->stripPos(etaId);
588 
589  double swap = (std::abs(locPos1[1] - locPos2[0]) > 0.001) ? 20000. : 0.;
590 
591  layer->setLayerType(etaId.get_identifier32().get_compact());
592 
593 
594  const Amg::Vector3D locPos = layer->surfaceRepresentation().transform() *
595  transf.inverse() * rpc->surface(etaId).center();
596  layer->setRef(swap + locPos[0]);
597 
598  }
599  }
600  }
601  }
602  }
603  }
604  }
605  }
606 
607  // by now, all the layers should be identified - verify
608  if (station.confinedVolumes()) {
610  for (auto* cVol : cVols) {
611  if (cVol->confinedLayers()) {
612  Trk::BinnedArraySpan<Trk::Layer* const> cLays = cVol->confinedLayers()->arrayObjects();
613  for (unsigned int il = 0; il < cLays.size(); il++) {
614  Identifier id(cLays[il]->layerType());
615  if (id == 1) {
616  ATH_MSG_DEBUG(station.volumeName()<< "," << cVol->volumeName() << ", unidentified active layer:" << il);
617  }
618  }
619  }
620  if (!cVol->confinedArbitraryLayers().empty()) {
621  Trk::ArraySpan<Trk::Layer* const> cLays = cVol->confinedArbitraryLayers();
622  for (unsigned int il = 0; il < cLays.size(); il++) {
623  Identifier id(cLays[il]->layerType());
624  if (id == 1) {
625  ATH_MSG_DEBUG(station.volumeName() << "," << cVol->volumeName() << ", unidentified active layer:" << il);
626  }
627  }
628  }
629  }
630  }
631  if (station.confinedLayers()) {
633  for (unsigned int il = 0; il < cLays.size(); il++) {
634  Identifier id(cLays[il]->layerType());
635  if (id == 1) {
636  ATH_MSG_DEBUG(station.volumeName() << ", unidentified active layer:" << il);
637  }
638  }
639  }
640  // end identification check
641 }

◆ initialize()

StatusCode Muon::MuonStationBuilder::initialize ( )
overridevirtual

Reimplemented from Muon::MuonStationBuilderImpl.

Definition at line 15 of file MuonStationBuilder.cxx.

15  {
16  // get Muon Spectrometer Description Manager
20 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ resolveId()

Identifier Muon::MuonStationBuilderImpl::resolveId ( const std::string &  vname,
const GMInfo gm_info,
int &  eta,
int &  phi,
const MuonGM::MuonDetectorManager muonMgr 
) const
protectedinherited

Definition at line 1104 of file MuonStationBuilderImpl.cxx.

1105  {
1106 
1107  Identifier stId(0);
1108 
1109  int etaphi = gm_info.second; // retrieve eta/phi indexes
1110  int sign = (etaphi < 0) ? -1 : 1;
1111  etaphi = sign * etaphi;
1112  int is_mirr = etaphi / 1000;
1113  etaphi = etaphi - is_mirr * 1000;
1114  eta = etaphi / 100;
1115  phi = etaphi - eta * 100;
1116  eta = eta * sign;
1117  const MuonGM::MuonStation* gmStation =
1118  muonMgr->getMuonStation(vname.substr(0, 3), eta, phi);
1119  // try to retrieve
1120  if (!gmStation) {
1121  gmStation = muonMgr->getMuonStation(vname.substr(0, 4), eta, phi);
1122  }
1123  // assembly ?
1124  if (!gmStation) {
1125  int etaphi = gm_info.second; // retrieve eta/phi indexes
1126  int a_etaphi = static_cast<int>(etaphi / 100000);
1127  int sideC = static_cast<int>(a_etaphi / 10000);
1128  a_etaphi -= sideC * 10000;
1129  is_mirr = static_cast<int>(a_etaphi / 1000);
1130  a_etaphi -= is_mirr * 1000;
1131  eta = static_cast<int>(a_etaphi / 100);
1132  phi = a_etaphi - eta * 100;
1133  if (sideC)
1134  eta *= -1;
1135  gmStation = muonMgr->getMuonStation(vname.substr(0, 3), eta, phi);
1136  }
1137  //
1138  if (!gmStation)
1139  ATH_MSG_WARNING("Muon station not found! " << vname << "," << eta << ","
1140  << phi);
1141 
1142  std::string stName;
1143  if (vname.compare(0, 1, "T") == 0 || vname.compare(0, 1, "C") == 0) {
1144  stName = vname.substr(0, 4);
1145  } else {
1146  stName = (vname.substr(0, vname.size() - 8));
1147  if (stName.compare(0, 1, "B") == 0 && eta < 0) {
1148  stName = vname.substr(0, vname.size() - 8) + "-";
1149  }
1150  }
1151  if (!gmStation)
1152  return stId;
1153  Amg::Transform3D transf = gmStation->getTransform();
1154  bool is_valid{false};
1155  if (m_idHelperSvc->hasCSC() && stName.compare(0, 1, "C") == 0) {
1156  stId = m_idHelperSvc->cscIdHelper().elementID(vname.substr(0, 3), eta,
1157  phi, is_valid);
1158  }
1159  // adjust eta,phi
1160  if (vname.compare(0, 1, "C") == 0) {
1161  eta = 1;
1162  if (transf.translation().z() < 0)
1163  eta = 0;
1164  double phic = transf.translation().phi() + 0.1;
1165  phi =
1166  static_cast<int>(phic < 0 ? 4 * phic / M_PI + 8 : 4 * phic / M_PI);
1167  }
1168  if (vname.compare(0, 1, "T") == 0) {
1169  bool az = true;
1170  std::string sub = vname.substr(7, 2);
1171  if (transf.translation().z() < 0)
1172  az = false;
1173  if (sub == "01")
1174  eta = az ? 5 : 4;
1175  else if (sub == "02")
1176  eta = az ? 5 : 4;
1177  else if (sub == "03")
1178  eta = az ? 6 : 3;
1179  else if (sub == "04")
1180  eta = az ? 7 : 2;
1181  else if (sub == "05")
1182  eta = az ? 8 : 1;
1183  else if (sub == "06")
1184  eta = az ? 5 : 4;
1185  else if (sub == "07")
1186  eta = az ? 5 : 4;
1187  else if (sub == "08")
1188  eta = az ? 6 : 3;
1189  else if (sub == "09")
1190  eta = az ? 7 : 2;
1191  else if (sub == "10")
1192  eta = az ? 8 : 1;
1193  else if (sub == "11")
1194  eta = az ? 9 : 0;
1195  else if (sub == "12")
1196  eta = az ? 5 : 4;
1197  else if (sub == "13")
1198  eta = az ? 5 : 4;
1199  else if (sub == "14")
1200  eta = az ? 6 : 3;
1201  else if (sub == "15")
1202  eta = az ? 7 : 2;
1203  else if (sub == "16")
1204  eta = az ? 8 : 1;
1205  else if (sub == "17")
1206  eta = az ? 9 : 0;
1207  else if (sub == "18")
1208  eta = az ? 5 : 4;
1209  else if (sub == "19")
1210  eta = az ? 5 : 4;
1211  else if (sub == "20")
1212  eta = az ? 5 : 4;
1213  else if (sub == "21")
1214  eta = az ? 5 : 4;
1215  else if (sub == "22")
1216  eta = az ? 5 : 4;
1217  }
1218  if (m_idHelperSvc->hasTGC() && stName[0] == 'T') {
1219  int etaSt = eta - 4;
1220  if (eta < 5)
1221  etaSt = eta - 5;
1222  double phic = transf.translation().phi();
1223  if (vname.compare(2, 1, "E") == 0 && vname.compare(0, 3, "T4E") != 0)
1224  phi = static_cast<int>(phic < 0 ? 24 * phic / M_PI + 48
1225  : 24 * phic / M_PI);
1226  else
1227  phi = static_cast<int>(phic < 0 ? 12 * phic / M_PI + 24
1228  : 12 * phic / M_PI);
1229  phi++;
1230  stId = m_idHelperSvc->tgcIdHelper().elementID(vname.substr(0, 3), etaSt,
1231  phi, is_valid);
1232  } else if (m_idHelperSvc->hasRPC() && stName.compare(0, 3, "BML") == 0) {
1233  stId = m_idHelperSvc->rpcIdHelper().elementID(vname.substr(0, 3), eta,
1234  phi, 1, is_valid);
1235  } else if (m_idHelperSvc->hasMDT() && stName.compare(0, 1, "C") != 0) {
1236  stId = m_idHelperSvc->mdtIdHelper().elementID(vname.substr(0, 3), eta,
1237  phi, is_valid);
1238  }
1239  if (!is_valid || !stId.get_compact()) {
1240  ATH_MSG_DEBUG("identifier of the station not found:"
1241  << vname << "," << eta << "," << phi);
1242  if (!stId.get_compact())
1243  return Identifier(0);
1244  }
1245  return stId;
1246 }

◆ retrieveGMsensitive()

std::vector< std::pair< const GeoVPhysVol *, std::vector< GMInfo > > > Muon::MuonStationBuilderImpl::retrieveGMsensitive ( const MuonGM::MuonDetectorManager muonMgr) const
protectedinherited

Definition at line 745 of file MuonStationBuilderImpl.cxx.

745  {
746 
747  // a single loop over GM tree to retrieve all necessary information
748 
749  std::vector<std::pair<const GeoVPhysVol*,
750  std::vector<GMInfo>>> sensitive;
751 
752  const GeoVPhysVol* top = muonMgr->getTreeTop(0);
753 
754 
755  // NSW stations first to avoid double-counting
756  const GeoVPhysVol* sTGC_top = Trk::GMTreeBrowser::findTopBranch(top, "sTGC_1");
757  const GeoVPhysVol* MM_top = Trk::GMTreeBrowser::findTopBranch(top, "MM_1");
758  if (sTGC_top && sTGC_top != top) {
759  ATH_MSG_DEBUG("sTGC GeoModel branch found:" << sTGC_top->getLogVol()->getName());
760  GeoVolumeCursor vol(sTGC_top);
761  while (!vol.atEnd()) {
762  const GeoVPhysVol* cv = vol.getVolume();
763  const std::string& vname = cv->getLogVol()->getName();
764  if (vname.find("sTGC_1") == std::string::npos) {
765  vol.next();
766  continue;
767  }
768  std::vector<std::pair<const GeoVPhysVol*,
769  std::vector<GMInfo>>>::iterator it =
770  sensitive.begin();
771  while (it < sensitive.end()) {
772  if (vname == (*it).first->getLogVol()->getName() &&
773  m_gmBrowser.compareGeoVolumes(cv, (*it).first, 1.e-3) == 0)
774  break;
775  ++it;
776  }
777 
778  if (it == sensitive.end()) {
779  std::vector<std::pair<Amg::Transform3D, int>> cloneList;
780  cloneList.emplace_back(vol.getTransform(), 0);
781  sensitive.emplace_back(cv, cloneList);
782  } else {
783  Amg::Transform3D transf = vol.getTransform();
784  // order transforms to position prototype at phi=0/ 0.125 pi
785  double phiTr = transf.translation().phi();
786  if (phiTr > -0.001 && phiTr < 0.4)
787  (*it).second.insert((*it).second.begin(),
788  std::make_pair(vol.getTransform(), 0));
789  else
790  (*it).second.emplace_back(vol.getTransform(), 0);
791  }
792  vol.next();
793  }
794  }
795 
796  if (MM_top && MM_top != top) {
797  ATH_MSG_DEBUG("MM GeoModel branch found:" << MM_top->getLogVol()->getName());
798  GeoVolumeCursor vol(MM_top);
799  while (!vol.atEnd()) {
800  const GeoVPhysVol* cv = vol.getVolume();
801  const std::string& vname = cv->getLogVol()->getName();
802  if (vname.find("MM_1") == std::string::npos) {
803  vol.next();
804  continue;
805  }
806  std::vector<std::pair<const GeoVPhysVol*,
807  std::vector<GMInfo>>>::iterator it =
808  sensitive.begin();
809  while (it < sensitive.end()) {
810  if (vname == (*it).first->getLogVol()->getName() &&
811  m_gmBrowser.compareGeoVolumes(cv, (*it).first, 1.e-3) == 0)
812  break;
813  ++it;
814  }
815 
816  if (it == sensitive.end()) {
817  std::vector<std::pair<Amg::Transform3D, int>> cloneList;
818  cloneList.emplace_back(vol.getTransform(), 0);
819  sensitive.emplace_back(cv, cloneList);
820  } else {
821  Amg::Transform3D transf = vol.getTransform();
822  // order transforms to position prototype at phi=0/ 0.125 pi
823  double phiTr = transf.translation().phi();
824  if (phiTr > -0.001 && phiTr < 0.4)
825  (*it).second.insert((*it).second.begin(), std::make_pair(vol.getTransform(), 0));
826  else
827  (*it).second.emplace_back(vol.getTransform(), 0);
828  }
829  vol.next();
830  }
831  }
832 
833  GeoVolumeCursor vol(top);
834  while (!vol.atEnd()) {
835  const GeoVPhysVol* cv = &(*(vol.getVolume()));
836  const std::string& vname = cv->getLogVol()->getName();
837  if (vname.find("Station") == std::string::npos &&
838  vname.find("MM_1") == std::string::npos &&
839  vname.find("sTGC_1") == std::string::npos) {
840  vol.next();
841  continue;
842  }
843 
844  // TGC stations retrieved at level-1
845  if (vname.substr(0, 1) == "T") {
846 
847  for (const auto&[tv, tvTrf] : geoGetVolumes(cv)) {
848  const GeoLogVol* tlv = tv->getLogVol();
849  const Amg::Transform3D transform = vol.getTransform() * tvTrf;
850  const std::string& tgc_name = tlv->getName();
851 
852  std::vector<std::pair<const GeoVPhysVol*,
853  std::vector<GMInfo>>>::iterator it =
854  sensitive.begin();
855  while (it < sensitive.end()) {
856  if (tgc_name == (*it).first->getLogVol()->getName() &&
857  m_gmBrowser.compareGeoVolumes(tv, (*it).first, 1.e-3) ==
858  0)
859  break;
860  ++it;
861  }
862 
863  if (it == sensitive.end()) {
864  std::vector<std::pair<Amg::Transform3D, int>> cloneList;
865  cloneList.emplace_back(transform, vol.getId().value());
866  sensitive.emplace_back(tv, cloneList);
867  } else {
868  Amg::Transform3D transf = transform;
869  // order transforms to position prototype at phi=0/ 0.125 pi
870  double phiTr = transf.translation().phi();
871  if (phiTr > -0.001 && phiTr < 0.4) {
872  (*it).second.insert((*it).second.begin(),
873  std::make_pair(transform, vol.getId().value()));
874  }
875  else {
876  (*it).second.emplace_back(transform, vol.getId().value());
877  }
878  }
879 
880  } // end loop over TGC
881 
882  } else {
883 
884  std::vector<std::pair<const GeoVPhysVol*,
885  std::vector<GMInfo>>>::iterator it =
886  sensitive.begin();
887  while (it < sensitive.end()) {
888  if (vname == (*it).first->getLogVol()->getName() &&
889  m_gmBrowser.compareGeoVolumes(cv, (*it).first, 1.e-3) == 0)
890  break;
891  ++it;
892  }
893 
894  if (it == sensitive.end()) {
895  std::vector<std::pair<Amg::Transform3D, int>> cloneList;
896  cloneList.emplace_back(vol.getTransform(), vol.getId().value());
897  sensitive.emplace_back(cv, cloneList);
898  } else {
899  Amg::Transform3D transf = vol.getTransform();
900  // order transforms to position prototype at phi=0/ 0.125 pi
901  double phiTr = transf.translation().phi();
902  if (phiTr > -0.001 && phiTr < 0.4) {
903  (*it).second.insert((*it).second.begin(),
904  std::make_pair(vol.getTransform(), vol.getId().value()));
905  }
906  else {
907  (*it).second.emplace_back(vol.getTransform(), vol.getId().value());
908  }
909  }
910  } // end non-TGC
911  vol.next();
912  }
913 
914  ATH_MSG_DEBUG("Number of muon station types in GeoModel tree:" << sensitive.size());
915 
916  return sensitive;
917 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_buildBarrel

Gaudi::Property<bool> Muon::MuonStationBuilderImpl::m_buildBarrel {this, "BuildBarrelStations", true}
protectedinherited

Definition at line 111 of file MuonStationBuilderImpl.h.

◆ m_buildCsc

Gaudi::Property<bool> Muon::MuonStationBuilderImpl::m_buildCsc {this, "BuildCSCStations", true}
protectedinherited

Definition at line 113 of file MuonStationBuilderImpl.h.

◆ m_buildEndcap

Gaudi::Property<bool> Muon::MuonStationBuilderImpl::m_buildEndcap {this, "BuildEndcapStations", true}
protectedinherited

Definition at line 112 of file MuonStationBuilderImpl.h.

◆ m_buildTgc

Gaudi::Property<bool> Muon::MuonStationBuilderImpl::m_buildTgc {this, "BuildTGCStations", true}
protectedinherited

Definition at line 114 of file MuonStationBuilderImpl.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_gmBrowser

Trk::GMTreeBrowser Muon::MuonStationBuilderImpl::m_gmBrowser
protectedinherited

Definition at line 107 of file MuonStationBuilderImpl.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::MuonStationBuilderImpl::m_idHelperSvc
protectedinherited
Initial value:
{
this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}

Definition at line 56 of file MuonStationBuilderImpl.h.

◆ m_materialConverter

Trk::GeoMaterialConverter Muon::MuonStationBuilderImpl::m_materialConverter
protectedinherited

Definition at line 110 of file MuonStationBuilderImpl.h.

◆ m_muonMaterial

Trk::Material Muon::MuonStationBuilderImpl::m_muonMaterial
protectedinherited

the material

shape converter

Definition at line 104 of file MuonStationBuilderImpl.h.

◆ m_muonMgr

const MuonGM::MuonDetectorManager* Muon::MuonStationBuilder::m_muonMgr = nullptr
private

Definition at line 32 of file MuonStationBuilder.h.

◆ m_muonStationTypeBuilder

ToolHandle<Muon::MuonStationTypeBuilder> Muon::MuonStationBuilderImpl::m_muonStationTypeBuilder
protectedinherited
Initial value:
{
this, "StationTypeBuilder",
"Muon::MuonStationTypeBuilder/"
"MuonStationTypeBuilder"}

Helper Tool to create TrackingVolume Arrays.

Definition at line 91 of file MuonStationBuilderImpl.h.

◆ m_trackingVolumeHelper

ToolHandle<Trk::ITrackingVolumeHelper> Muon::MuonStationBuilderImpl::m_trackingVolumeHelper
protectedinherited
Initial value:
{
this, "TrackingVolumeHelper",
"Trk::TrackingVolumeHelper/TrackingVolumeHelper"}

Helper Tool to create TrackingVolumes.

Definition at line 98 of file MuonStationBuilderImpl.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_volumeConverter

Trk::VolumeConverter Muon::MuonStationBuilderImpl::m_volumeConverter
protectedinherited

material converter

Definition at line 108 of file MuonStationBuilderImpl.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
MuonGM::MuonDetectorManager::getRpcReadoutElement
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:168
geoGetVolumes
GeoVolumeVec_t geoGetVolumes(const GeoGraphNode *node, int depthLimit=1, int sizeHint=20)
Return the child volumes and associated transforms.
Definition: GeoVisitVolumes.cxx:211
PlotCalibFromCool.il
il
Definition: PlotCalibFromCool.py:381
Trk::Layer::setRef
void setRef(double)
set the reference measure
Muon::MuonStationBuilderImpl::checkLayerId
void checkLayerId(std::string_view comment, const MuonGM::MuonDetectorManager *muonMgr, Identifier id, const Trk::Layer *lay) const
Definition: MuonStationBuilderImpl.cxx:1248
Muon::makeTransform
Amg::Transform3D * makeTransform(const Amg::Transform3D &trf)
Definition: MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/Utils.h:14
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
test_pyathena.eta
eta
Definition: test_pyathena.py:10
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:161
MuonGM::MuonClusterReadoutElement::transform
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Definition: MuonClusterReadoutElement.h:124
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
MuonGM::MdtReadoutElement::getNLayers
int getNLayers() const
Returns the number of tube layers inside the multilayer.
Trk::BinnedArray::binUtility
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::Layer::setLayerType
void setLayerType(int identifier)
set the Layer coding
MuonGM::MdtReadoutElement::center
virtual const Amg::Vector3D & center(const Identifier &) const override final
Return the center of the surface associated with this identifier In the case of silicon it returns th...
MuonGM::MuonClusterReadoutElement::center
virtual const Amg::Vector3D & center() const override
Return the center of the element.
Definition: MuonClusterReadoutElement.h:125
perp
Scalar perp() const
perp method - perpenticular length
Definition: AmgMatrixBasePlugin.h:44
Trk::Volume::inside
bool inside(const Amg::Vector3D &gp, double tol=0.) const
Inside() method for checks.
Definition: Volume.cxx:90
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
Trk::CuboidVolumeBounds
Definition: CuboidVolumeBounds.h:52
TgcIdHelper
Definition: TgcIdHelper.h:50
Muon::MuonStationBuilderImpl::m_gmBrowser
Trk::GMTreeBrowser m_gmBrowser
Definition: MuonStationBuilderImpl.h:107
Trk::DetachedTrackingVolume::trackingVolume
const TrackingVolume * trackingVolume() const
returns the TrackingVolume
Definition: DetachedTrackingVolume.h:125
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Muon::MuonStationBuilderImpl::identifyPrototype
void identifyPrototype(Trk::TrackingVolume &station, int eta, int phi, const Amg::Transform3D &transf, const MuonGM::MuonDetectorManager *muonMgr) const
Definition: MuonStationBuilderImpl.cxx:476
Muon::MuonStationBuilderImpl::identifyNSWLayers
void identifyNSWLayers(Trk::DetachedTrackingVolume &station, const Identifier &id) const
Definition: MuonStationBuilderImpl.cxx:453
MuonGM::CscReadoutElement::ChamberLayer
int ChamberLayer() const
Definition: CscReadoutElement.h:290
MuonGM::MuonStation::getTransform
Amg::Transform3D getTransform() const
Definition: MuonStation.h:180
Muon::MuonStationBuilderImpl::resolveId
Identifier resolveId(const std::string &vname, const GMInfo &gm_info, int &eta, int &phi, const MuonGM::MuonDetectorManager *muonMgr) const
Definition: MuonStationBuilderImpl.cxx:1104
Trk::TrackingVolume::associatedSubVolume
const TrackingVolume * associatedSubVolume(const Amg::Vector3D &gp) const
Return the associated sub Volume, returns THIS if no subVolume exists.
Definition: TrackingVolume.cxx:705
Muon::MuonStationBuilderImpl::m_buildTgc
Gaudi::Property< bool > m_buildTgc
Definition: MuonStationBuilderImpl.h:114
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
skel.it
it
Definition: skel.GENtoEVGEN.py:407
Trk::GeoMaterialConverter::convert
static Material convert(const GeoMaterial *gm)
Single conversion , input type GeoMaterial - output type Trk::MaterialProperties.
Definition: GeoMaterialConverter.cxx:18
createCablingJSON.doubletR
int doubletR
Definition: createCablingJSON.py:15
M_PI
#define M_PI
Definition: ActiveFraction.h:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::positiveFaceXY
@ positiveFaceXY
Definition: BoundarySurfaceFace.h:33
MuonGM::RpcReadoutElement
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:55
MuonGM::CscReadoutElement
Definition: CscReadoutElement.h:56
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PlotCalibFromCool.multi
multi
Definition: PlotCalibFromCool.py:99
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:812
Muon::MuonStationBuilderImpl::retrieveGMsensitive
std::vector< std::pair< const GeoVPhysVol *, std::vector< GMInfo > > > retrieveGMsensitive(const MuonGM::MuonDetectorManager *muonMgr) const
Definition: MuonStationBuilderImpl.cxx:745
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
Trk::BoundarySurfaceFace
BoundarySurfaceFace
Definition: BoundarySurfaceFace.h:31
Trk::BinnedArray::arrayObjectsNumber
virtual unsigned int arrayObjectsNumber() const =0
Number of Entries in the Array.
RpcIdHelper
Definition: RpcIdHelper.h:51
Trk::Layer::layerType
int layerType() const
get the Layer coding
MuonGM::TgcReadoutElement::channelPos
Amg::Vector3D channelPos(const Identifier &id) const
Returns the position of the active channel (wireGang or strip)
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Amg::getRotateZ3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Definition: GeoPrimitivesHelpers.h:270
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
Trk::TrackingVolume::confinedLayers
const LayerArray * confinedLayers() const
Return the subLayer array.
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
MuonGM::MuonDetectorManager::getTgcReadoutElement
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:247
MuonGM::CscReadoutElement::Ngasgaps
int Ngasgaps() const
Definition: CscReadoutElement.h:308
Muon::MuonStationBuilderImpl::initialize
virtual StatusCode initialize() override
Definition: MuonStationBuilderImpl.cxx:75
Trk::GMTreeBrowser::compareGeoVolumes
int compareGeoVolumes(const GeoVPhysVol *gv1, const GeoVPhysVol *gv2, double tolerance, bool printFullInfo=false, int level=0) const
Recursive comparison of trees/branches/volumes : in quiet mode (printFullInfo=False) ,...
Definition: GMTreeBrowser.cxx:42
Trk::Surface::isOnSurface
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
Definition: Surface.cxx:123
Trk::Material::x0
float x0() const
Definition: Material.h:227
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::Layer::surfaceRepresentation
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
Muon::MuonStationBuilderImpl::glueComponents
void glueComponents(Trk::DetachedTrackingVolume *) const
Definition: MuonStationBuilderImpl.cxx:155
MuonGM::MuonDetectorManager::getMdtReadoutElement
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:204
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
Muon::MuonStationBuilderImpl::m_muonStationTypeBuilder
ToolHandle< Muon::MuonStationTypeBuilder > m_muonStationTypeBuilder
Helper Tool to create TrackingVolume Arrays.
Definition: MuonStationBuilderImpl.h:91
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::ArraySpan
std::span< T > ArraySpan
Definition: DetachedTrackingVolume.h:34
MuonGM::MuonDetectorManager::getCscReadoutElement
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:225
MuonGM::MuonDetectorManager::geometryVersion
const std::string & geometryVersion() const
it can be Rome-Initial or P03, or ...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:251
beamspotman.n
n
Definition: beamspotman.py:731
MuonR4::inverse
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/UtilFunctions.cxx:65
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Amg::doesNotDeform
bool doesNotDeform(const Amg::Transform3D &trans)
Checks whether the linear part of the transformation rotates or stetches any of the basis vectors.
Definition: GeoPrimitivesHelpers.h:383
Muon::MuonStationBuilderImpl::buildDetachedTrackingVolumeType
std::unique_ptr< Trk::DetachedTrackingVolume > buildDetachedTrackingVolumeType(const MuonGM::MuonDetectorManager *muonMgr, const GeoVPhysVol *gv, const GMInfo &info) const
Definition: MuonStationBuilderImpl.cxx:920
MuonGM::MuonStation
Definition: MuonStation.h:51
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
CalibCoolCompareRT.up
up
Definition: CalibCoolCompareRT.py:109
MuonGM::TgcReadoutElement
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:42
MdtIdHelper
Definition: MdtIdHelper.h:61
Muon::MuonStationBuilderImpl::m_trackingVolumeHelper
ToolHandle< Trk::ITrackingVolumeHelper > m_trackingVolumeHelper
Helper Tool to create TrackingVolumes.
Definition: MuonStationBuilderImpl.h:98
Muon::MuonStationBuilderImpl
Definition: MuonStationBuilderImpl.h:42
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
Trk::GMTreeBrowser::findTopBranch
static const GeoVPhysVol * findTopBranch(const GeoVPhysVol *gv, std::string_view name)
search of top branch : returns mother volume for children matching name
Definition: GMTreeBrowser.cxx:442
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::negativeFaceXY
@ negativeFaceXY
Definition: BoundarySurfaceFace.h:32
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
MuonGM::MuonDetectorManager::NTgcStEtaOffset
static constexpr int NTgcStEtaOffset
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:160
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
beamspotman.stat
stat
Definition: beamspotman.py:266
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
Trk::BinUtility
Definition: BinUtility.h:39
grepfile.ic
int ic
Definition: grepfile.py:33
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CaloCondBlobAlgs_fillNoiseFromASCII.comment
string comment
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:27
Trk::DetachedTrackingVolume::clone
DetachedTrackingVolume * clone(const std::string &name, Amg::Transform3D &shift) const
clone with transform
Definition: DetachedTrackingVolume.cxx:75
MuonGM::MuonDetectorManager::NCscStEtaOffset
static constexpr int NCscStEtaOffset
Identifier <-> AMDB conversion constants in use.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:158
Trk::TrackingVolume::volumeName
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
CscIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int chamberLayer, int wireLayer, int measuresPhi, int strip) const
Definition: CscIdHelper.cxx:706
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
Muon::MuonStationBuilderImpl::getNSWStationsForTranslation
void getNSWStationsForTranslation(const GeoVPhysVol *pv, const std::string &name, const Amg::Transform3D &, std::vector< std::pair< std::pair< const GeoLogVol *, Trk::MaterialProperties * >, std::vector< Amg::Transform3D >>> &vols, std::vector< std::string > &volNames) const
Definition: MuonStationBuilderImpl.cxx:643
Muon::MuonStationBuilder::m_muonMgr
const MuonGM::MuonDetectorManager * m_muonMgr
Definition: MuonStationBuilder.h:32
MuonGM::RpcReadoutElement::stripPos
Amg::Vector3D stripPos(const Identifier &id) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:177
Trk::BinnedArray::arrayObjects
virtual BinnedArraySpan< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
sTgcIdHelper
Definition: sTgcIdHelper.h:55
Trk::DetachedTrackingVolume::name
const std::string & name() const
returns the Name
Definition: DetachedTrackingVolume.h:134
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
Amg::getRotateY3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Definition: GeoPrimitivesHelpers.h:261
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGM::RpcReadoutElement::numberOfLayers
virtual int numberOfLayers(bool measphi=true) const override final
number of layers in phi/eta projection, same for eta/phi planes
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
MuonGM::MuonDetectorManager::getMuonStation
const MuonStation * getMuonStation(const std::string &stName, int eta, int phi) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:137
Muon::MuonStationBuilderImpl::m_buildEndcap
Gaudi::Property< bool > m_buildEndcap
Definition: MuonStationBuilderImpl.h:112
Trk::MaterialProperties
Definition: MaterialProperties.h:40
MuonGM::MdtReadoutElement::tubePos
Amg::Vector3D tubePos(const Identifier &id) const
Returns the global position of the given tube.
a
TList * a
Definition: liststreamerinfos.cxx:10
h
MmIdHelper
Definition: MmIdHelper.h:54
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ref
const boost::regex ref(r_ef)
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Trk::TrackingVolume::confinedVolumes
const TrackingVolumeArray * confinedVolumes() const
Return the subLayer array.
MuonGM::MuonReadoutElement::identify
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:184
RPDUtils::sideC
unsigned constexpr int sideC
Definition: RPDUtils.h:15
python.changerun.pv
pv
Definition: changerun.py:81
MuonGM::MuonDetectorManager::getTreeTop
virtual PVConstLink getTreeTop(unsigned int i) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:115
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
Trk::negativeFaceYZ
@ negativeFaceYZ
Definition: BoundarySurfaceFace.h:34
Muon::MuonStationBuilderImpl::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonStationBuilderImpl.h:56
Trk::DetachedTrackingVolume::layerRepresentation
const Layer * layerRepresentation() const
returns layer representation
Definition: DetachedTrackingVolume.h:136
Muon::MuonStationBuilderImpl::m_muonMaterial
Trk::Material m_muonMaterial
the material
Definition: MuonStationBuilderImpl.h:104
Muon::MuonStationBuilderImpl::buildDetachedTrackingVolumesImpl
DetachedVolVec buildDetachedTrackingVolumesImpl(const MuonGM::MuonDetectorManager *muonMgr, bool blend=false) const
Definition: MuonStationBuilderImpl.cxx:99
createCablingJSON.doubletPhi
int doubletPhi
Definition: createCablingJSON.py:16
Muon::MuonStationBuilderImpl::m_buildCsc
Gaudi::Property< bool > m_buildCsc
Definition: MuonStationBuilderImpl.h:113
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
top
@ top
Definition: TruthClasses.h:64
MuonGM::MuonDetectorManager::cscIdHelper
const CscIdHelper * cscIdHelper() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:229
Trk::Material
Definition: Material.h:117
Trk::BinnedArray
Definition: BinnedArray.h:38
MuonGM::MdtReadoutElement::transform
virtual const Amg::Transform3D & transform(const Identifier &id) const override final
Return local to global transform associated with this identifier.
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:159
MuonGM::MuonDetectorManager::NTgcStatTypeOff
static constexpr int NTgcStatTypeOff
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:159
Trk::positiveFaceYZ
@ positiveFaceYZ
Definition: BoundarySurfaceFace.h:35
Trk::TrackingVolume
Definition: TrackingVolume.h:121
Trk::TrackingVolume::associatedLayer
const Layer * associatedLayer(const Amg::Vector3D &gp) const
Return the associated Layer.
Definition: TrackingVolume.cxx:564
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Trk::BinnedArraySpan
std::span< T > BinnedArraySpan
Definition: BinnedArray.h:34
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Muon::MuonStationBuilderImpl::identifyLayers
void identifyLayers(Trk::DetachedTrackingVolume *, Identifier, int, int, const MuonGM::MuonDetectorManager *) const
Definition: MuonStationBuilderImpl.cxx:185
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:26
Muon::release
std::vector< ObjType * > release(std::vector< std::unique_ptr< ObjType >> &objVec)
Definition: MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/Utils.h:18
Muon::MuonStationBuilderImpl::m_buildBarrel
Gaudi::Property< bool > m_buildBarrel
Definition: MuonStationBuilderImpl.h:111
plotBeamSpotMon.nc
int nc
Definition: plotBeamSpotMon.py:83
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
fitman.k
k
Definition: fitman.py:528
Trk::Layer
Definition: Layer.h:73
Muon::MuonStationBuilderImpl::DetachedVolVec
std::vector< std::unique_ptr< Trk::DetachedTrackingVolume > > DetachedVolVec
Definition: MuonStationBuilderImpl.h:48
Identifier
Definition: IdentifierFieldParser.cxx:14