diff --git a/LArCalorimeter/LArTrackingGeometry/LArTrackingGeometry/LArVolumeBuilder.h b/LArCalorimeter/LArTrackingGeometry/LArTrackingGeometry/LArVolumeBuilder.h index fed7a5420371899f23bc24460a28fae8c8097951..daf517aad4341370c980d26954c3b2ce9e1d2e84 100755 --- a/LArCalorimeter/LArTrackingGeometry/LArTrackingGeometry/LArVolumeBuilder.h +++ b/LArCalorimeter/LArTrackingGeometry/LArTrackingGeometry/LArVolumeBuilder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -18,12 +18,9 @@ // STL #include <vector> -class LArDetectorManager; -class CaloDepthTool; class GeoPVConstLink; namespace Trk { - class ILayerArrayCreator; class ITrackingVolumeHelper; class ITrackingVolumeCreator; class TrackingVolume; @@ -102,7 +99,6 @@ namespace LAr { // ------------- private members ----------------------------------------- - const LArDetectorManager* m_lArMgr; //!< Calo DetDescrMgr std::string m_lArMgrLocation; //!< Location of the CaloDetDescrMgr ToolHandle<Trk::ITrackingVolumeHelper> m_lArTrackingVolumeHelper; //!< Helper Tool to create TrackingVolumes diff --git a/LArCalorimeter/LArTrackingGeometry/src/LArVolumeBuilder.cxx b/LArCalorimeter/LArTrackingGeometry/src/LArVolumeBuilder.cxx index 894ae8676d695ab75e7db26d517a87617c790e86..dc65355f37ce18a9a262662a687529871a088e01 100755 --- a/LArCalorimeter/LArTrackingGeometry/src/LArVolumeBuilder.cxx +++ b/LArCalorimeter/LArTrackingGeometry/src/LArVolumeBuilder.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -53,7 +53,6 @@ using Gaudi::Units::mm; // constructor LAr::LArVolumeBuilder::LArVolumeBuilder(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p), - m_lArMgr(0), m_lArMgrLocation("LArMgr"), m_lArTrackingVolumeHelper("Trk::TrackingVolumeHelper/LArTrackingVolumeHelper"), m_trackingVolumeCreator("Trk::CylinderVolumeCreator/TrackingVolumeCreator"), @@ -96,11 +95,6 @@ LAr::LArVolumeBuilder::~ LArVolumeBuilder() // initialize StatusCode LAr::LArVolumeBuilder::initialize() { - // get LAr Detector Description Manager - if (detStore()->retrieve(m_lArMgr, m_lArMgrLocation).isFailure()) { - ATH_MSG_FATAL( "Could not get LArDetectorManager! Calo TrackingGeometry will not be built"); - return StatusCode::FAILURE; - } // Retrieve the tracking volume helper ------------------------------------------------- if (m_lArTrackingVolumeHelper.retrieve().isFailure()) @@ -156,12 +150,18 @@ const std::vector<const Trk::TrackingVolume*>* LAr::LArVolumeBuilder::trackingVo Trk::Material dummyMaterial; + // get LAr Detector Description Manager + const LArDetectorManager* lArMgr=nullptr; + if (detStore()->retrieve(lArMgr, m_lArMgrLocation).isFailure()) { + ATH_MSG_FATAL( "Could not get LArDetectorManager! Calo TrackingGeometry will not be built"); + } + // out of couriosity - unsigned int numTreeTops = m_lArMgr->getNumTreeTops(); + unsigned int numTreeTops = lArMgr->getNumTreeTops(); ATH_MSG_DEBUG( "Retrieved " << numTreeTops << " tree tops from the LArDetDescrManager. " ); for (unsigned int itreetop = 0; itreetop<numTreeTops; ++itreetop){ - PVConstLink currentVPhysVolLink = m_lArMgr->getTreeTop(itreetop); + PVConstLink currentVPhysVolLink = lArMgr->getTreeTop(itreetop); const GeoLogVol* currentLogVol = currentVPhysVolLink->getLogVol(); unsigned int currentChilds = currentVPhysVolLink->getNChildVols(); @@ -1703,7 +1703,7 @@ const std::vector<const Trk::TrackingVolume*>* LAr::LArVolumeBuilder::trackingVo // ST this better to be done by CaloTrackingGeometry ( to glue with BeamPipe ) // pass MBTS info to CaloTG // MBTS - const PVConstLink topEC = m_lArMgr->getTreeTop(1U); + const PVConstLink topEC = lArMgr->getTreeTop(1U); Amg::Transform3D trIn= topEC->getX(); Amg::Transform3D tr2(trIn); const PVConstLink mbts= getChild(topEC,"MBTS_mother",trIn); diff --git a/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx b/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx index 87580b73a7718c511c89fa729d612d3b0363232d..ac5c69f10178e9f6882bdc3b4b51138522f1f1a2 100755 --- a/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx +++ b/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -95,10 +95,6 @@ Tile::TileVolumeBuilder::~ TileVolumeBuilder() // initialize StatusCode Tile::TileVolumeBuilder::initialize() { - // Get the Calo geometry - StatusCode status = detStore()->retrieve(m_calo_dd); - if(status.isFailure()) return status; - // get Tile Detector Description Manager if (detStore()->retrieve(m_tileMgr, m_tileMgrLocation).isFailure()){ ATH_MSG_FATAL( "Could not get TileDetDescrManager! Tile TrackingVolumes will not be built" );