12 #include "Acts/Geometry/CylinderLayer.hpp" 
   13 #include "Acts/Geometry/CutoutCylinderVolumeBounds.hpp" 
   14 #include "Acts/Geometry/CylinderVolumeBounds.hpp" 
   15 #include "Acts/Geometry/TrapezoidVolumeBounds.hpp" 
   16 #include "Acts/Geometry/TrackingVolume.hpp" 
   17 #include "Acts/Material/HomogeneousVolumeMaterial.hpp" 
   18 #include "Acts/Utilities/BinnedArrayXD.hpp" 
   19 #include "Acts/Surfaces/SurfaceArray.hpp" 
   20 #include "Acts/Utilities/Helpers.hpp" 
   30         return StatusCode::SUCCESS;
 
   33     std::shared_ptr<Acts::TrackingVolume> 
 
   34         MSTrackingVolumeBuilder::trackingVolume(
const Acts::GeometryContext& ,
 
   35                                                 std::shared_ptr<const Acts::TrackingVolume> insideVolume,
 
   36                                                 std::shared_ptr<const Acts::VolumeBounds> )
 const {
 
   39     std::shared_ptr<Acts::VolumeBounds> msBounds{};
 
   41         msBounds = std::make_unique<Acts::CutoutCylinderVolumeBounds>(0, 4000, 14500, 22500, 3200);
 
   43         msBounds = std::make_unique<Acts::CylinderVolumeBounds>(0, 14500, 22500);
 
   46     auto surfCounter = make_array<unsigned, toInt(ChIndex::ChIndexMax)>(0);
 
   47     std::vector<std::shared_ptr<const Acts::Surface>> msSurfaces{};
 
   48     Acts::SurfaceVector rawSurfs{};
 
   50         const unsigned chIdx = 
toInt(
re->chamberIndex());
 
   51         auto reSurfaces = 
re->getSurfaces();
 
   52         msSurfaces.reserve(msSurfaces.size() + reSurfaces.size());
 
   53         for (std::shared_ptr<Acts::Surface>& surf : reSurfaces) {
 
   54             surf->assignGeometryId(Acts::GeometryIdentifier{}.withLayer(chIdx + m_firstLayId).withSensitive(++surfCounter[chIdx]));
 
   56             ATH_MSG_DEBUG(
"Append new surface "<<m_detMgr->idHelperSvc()->toString(
det->identify())
 
   57                         <<
" -> geoId: "<<surf->geometryId());
 
   58             msSurfaces.push_back(std::move(surf));
 
   61     rawSurfs = Acts::unpackSmartPointers(msSurfaces);
 
   62     auto surfaceArray = std::make_unique<Acts::SurfaceArray>(std::make_unique<Acts::SurfaceArray::SingleElementLookup>(rawSurfs),
 
   65     auto cylinder = Acts::CylinderLayer::create(Amg::Transform3D::Identity(), 
 
   66                                                 std::make_shared<Acts::CylinderBounds>(14500, 22500), 
 
   70     auto material = std::make_unique<Acts::HomogeneousVolumeMaterial>(Acts::Material::Vacuum());
 
   72     auto layerArray = std::make_unique<Acts::BinnedArrayXD<Acts::LayerPtr>>(cylinder);
 
   74     return std::make_shared<Acts::TrackingVolume>(Acts::Transform3::Identity(), std::move(msBounds),
 
   75                                                   std::move(material), std::move(layerArray), 
nullptr,
 
   76                                                   Acts::MutableTrackingVolumeVector{},
 
   77                                                   "Muon Spectrometer Envelope");