diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx index 519a496563fb5287ed84b86b5e0203dfb93a20aa..7944e94fd4d146062bca94579b6455d8b172435d 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx @@ -75,8 +75,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) double projectivityDisplacement(0.); if(m_testbeam==0 || m_testbeam==1) { - VDetectorParameters* parameters = new LArGeo::RAL(); - VDetectorParameters::SetInstance(parameters); + m_parameters = std::make_unique<LArGeo::RAL>(); // Get access to the material manager: @@ -132,7 +131,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) endcapCryostatConstruction.setFCALVisLimit(m_fcalVisLimit); if(m_buildBarrel) { - barrelEnvelope = barrelCryostatConstruction.GetEnvelope(); + barrelEnvelope = barrelCryostatConstruction.GetEnvelope(m_parameters.get()); } if(m_buildEndcap) { @@ -280,7 +279,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) tbbarrelCryostatConstruction.setBarrelSagging(m_barrelSagging); tbbarrelCryostatConstruction.setBarrelCellVisLimit(m_barrelVisLimit); - barrelEnvelope = tbbarrelCryostatConstruction.GetEnvelope(); + barrelEnvelope = tbbarrelCryostatConstruction.GetEnvelope(m_parameters.get()); a_container->add(new GeoNameTag("LAr")); a_container->add(barrelEnvelope); @@ -321,3 +320,8 @@ const LArDetectorManager* LArGeo::LArDetectorFactory::getDetectorManager() const return m_detectorManager; } +std::unique_ptr<LArGeo::VDetectorParameters> LArGeo::LArDetectorFactory::moveParameters() +{ + return std::move (m_parameters); +} + diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.h b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.h index 9aa243320080013c7587d69ea293d8169bf76bf3..ae2e22580630bba3c8f419bc0cb971615964e31c 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.h +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.h @@ -23,6 +23,7 @@ class StoreGateSvc; class LArHVManager; namespace LArGeo { + class VDetectorParameters; class LArDetectorFactory : public GeoVDetectorFactory { @@ -43,6 +44,8 @@ namespace LArGeo { // Access to the results: virtual const LArDetectorManager* getDetectorManager() const; + std::unique_ptr<LArGeo::VDetectorParameters> moveParameters(); + // Set parameters: @@ -84,6 +87,8 @@ namespace LArGeo { bool m_activateFT; bool m_enableMBTS; + + std::unique_ptr<VDetectorParameters> m_parameters; }; } // namespace LArGeo diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactoryLite.cxx b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactoryLite.cxx index 1d3dcf1be62383daf2d6c52e6887eb8c013780b7..98b7ae5adaaacadf2d393ef2946955b664993cfd 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactoryLite.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactoryLite.cxx @@ -57,10 +57,6 @@ void LArGeo::LArDetectorFactoryLite::create(GeoPhysVol* world) std::string errorMessage{""}; - // Instantiate VDetectorParameters (needed for some clients) - VDetectorParameters* parameters = new LArGeo::RAL(); - VDetectorParameters::SetInstance(parameters); - if(LArGeo::buildFcalChannelMap(m_detStore,m_paramSvc,Athena::getMessageSvc()).isFailure()) { errorMessage="Failed to build FCAL Channel Map"; ATH_MSG_FATAL(errorMessage); diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx index f5aba80cd67f3676a88f51f5feffdd34251a8be1..7fe8cfba75971c3a588ef17bcb66a6c2621aa13f 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx @@ -71,8 +71,6 @@ LArDetectorToolNV::LArDetectorToolNV(const std::string& type LArDetectorToolNV::~LArDetectorToolNV() { - // Clean up detector parameters instantiated by the factory - LArGeo::VDetectorParameters::SetInstance(0); } StatusCode LArDetectorToolNV::create() @@ -178,9 +176,9 @@ StatusCode LArDetectorToolNV::create() theLArFactory.create(world); m_manager = theLArFactory.getDetectorManager(); - if(m_geometryConfig=="RECO") { - // Release RDB Recordsets if we are inside reco job - LArGeo::VDetectorParameters::SetInstance(0); + if(m_geometryConfig!="RECO") { + // Save RDB Recordsets if we are not inside reco job + LArGeo::VDetectorParameters::SetInstance(theLArFactory.moveParameters()); } } diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelConstruction.h index a2792e0303c24df2b13811a1443498e38e004bec..00b4c61a3f51ec7b5ad354f4438a566987c06e6d 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelConstruction.h @@ -19,7 +19,7 @@ namespace LArGeo { public: // Constructor; - BarrelConstruction(bool fullGeo); + BarrelConstruction(bool fullGeo, const VDetectorParameters* params); // Destructor: virtual ~BarrelConstruction(); @@ -45,7 +45,7 @@ namespace LArGeo { BarrelConstruction & operator= (const BarrelConstruction &); // Detector parameters ACCG, ACCA, ACMB, ACCO - LArGeo::VDetectorParameters* m_parameters; + const LArGeo::VDetectorParameters* m_parameters; bool m_A_SAGGING; int m_NVISLIM; diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelCryostatConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelCryostatConstruction.h index 3c12c33e9f9a510965b9db409b62b15ea2d4cde3..d1fee1765533f7baf25d06f312496518e5c52a8a 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelCryostatConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelCryostatConstruction.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /** @@ -17,11 +17,14 @@ #include "GeoModelKernel/GeoFullPhysVol.h" class StoreGateSvc; + namespace LArGeo { + class VDetectorParameters; + /** @class LArGeo::BarrelCryostatConstruction @brief Builds GeoModel description of the LAr Electromagnetic Barrel. - Descriptions of the presampler and dad material in the crack region are + Descriptions of the presampler and dead material in the crack region are implemented in separate classes */ class BarrelCryostatConstruction @@ -32,7 +35,7 @@ namespace LArGeo { virtual ~BarrelCryostatConstruction(); // Get the envelope containing this detector. - virtual GeoFullPhysVol* GetEnvelope(); + virtual GeoFullPhysVol* GetEnvelope(const VDetectorParameters* params); void setBarrelSagging(bool flag) {m_barrelSagging = flag;} diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelPresamplerConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelPresamplerConstruction.h index 0e65a99eee97194d63a76177905ab148dcb257c3..4251db89d264da168764decee22c9db22e6496f7 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelPresamplerConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelPresamplerConstruction.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /** @@ -10,8 +10,8 @@ * $Id: BarrelPresamplerConstruction.h,v 1.4 2009-02-10 16:49:47 tsulaia Exp $ */ -#ifndef __BarrelPresamplerConstruction_H__ -#define __BarrelPresamplerConstruction_H__ +#ifndef LARGEOBARREL_BARRELPRESAMPLERCONSTRUCTION_H +#define LARGEOBARREL_BARRELPRESAMPLERCONSTRUCTION_H #include "LArGeoCode/VDetectorParameters.h" #include "GeoModelKernel/GeoFullPhysVol.h" @@ -29,7 +29,7 @@ namespace LArGeo { public: // Constructor; - BarrelPresamplerConstruction(bool fullGeo, int itb=0); + BarrelPresamplerConstruction(bool fullGeo, const VDetectorParameters* params, int itb=0); // Destructor: virtual ~BarrelPresamplerConstruction(); @@ -49,7 +49,7 @@ namespace LArGeo { BarrelPresamplerConstruction & operator= (const BarrelPresamplerConstruction &); // Detector parameters ACCG, ACCA, ACMB, ACCO - LArGeo::VDetectorParameters* m_parameters; + const LArGeo::VDetectorParameters* m_parameters; // volumes that are private member variables: GeoFullPhysVol* m_psPhysicalPos; @@ -62,4 +62,4 @@ namespace LArGeo { } // namespace LArGeo -#endif // __BarrelPresamplerConstruction_H__ +#endif // LARGEOBARREL_BARRELPRESAMPLERCONSTRUCTION_H diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelConstruction.cxx index 877abb2107424b83c3a5c4fdb5b2ba1d65ba084e..9cfa63edaae6d1c3cdd3648cd95f7e7aa4c50d08 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelConstruction.cxx @@ -103,8 +103,9 @@ //===================constructor -LArGeo::BarrelConstruction::BarrelConstruction(bool fullGeo) - :m_parameters(LArGeo::VDetectorParameters::GetInstance()), +LArGeo::BarrelConstruction::BarrelConstruction(bool fullGeo, + const VDetectorParameters* params) + :m_parameters(params), m_A_SAGGING(false), m_NVISLIM(-1), m_ecamPhysicalPos(NULL), diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx index 51de94fa4827e46dae149e5f29cebfe2f91a35cf..362fc807e8881d4c48106d7aac23a7bba60754c3 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // BarrelCryostatConstruction @@ -84,7 +84,7 @@ LArGeo::BarrelCryostatConstruction::BarrelCryostatConstruction( LArGeo::BarrelCryostatConstruction::~BarrelCryostatConstruction() {} -GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() +GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope(const VDetectorParameters* params) { if (m_cryoMotherPhysical) return m_cryoMotherPhysical; @@ -881,7 +881,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() // There are two placements: one for the z>0 section, one for the z<0 section. - BarrelConstruction barrelConstruction(m_fullGeo); + BarrelConstruction barrelConstruction(m_fullGeo, params); barrelConstruction.setBarrelSagging(m_barrelSagging); barrelConstruction.setBarrelCellVisLimit(m_barrelVisLimit); @@ -977,7 +977,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() // ----- Presampler ------ double PresamplerMother_length = 1549.0*Gaudi::Units::mm; // Copied from PresParameterDef.icc double presamplerShift = 3.*Gaudi::Units::mm; - BarrelPresamplerConstruction barrelPSConstruction(m_fullGeo); + BarrelPresamplerConstruction barrelPSConstruction(m_fullGeo, params); // The "envelope" determined by the EMB should be a GeoFullPhysVol. GeoFullPhysVol* barrelPSPosEnvelope = barrelPSConstruction.GetPositiveEnvelope(); diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelPresamplerConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelPresamplerConstruction.cxx index a3e4deeeda5893e6bb43215a07f15eb185b9b85f..a50b49df5006fe74ca0283a4b9cdc01f6859fc45 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelPresamplerConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelPresamplerConstruction.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "LArGeoBarrel/BarrelPresamplerConstruction.h" @@ -51,8 +51,10 @@ #include "GeoGenericFunctions/FixedConstant.h" // Constructor; -LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo, int itb): - m_parameters(LArGeo::VDetectorParameters::GetInstance()), +LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo, + const VDetectorParameters* params, + int itb): + m_parameters(params), m_psPhysicalPos(NULL), m_psPhysicalNeg(NULL), m_fullGeo(fullGeo) diff --git a/LArCalorimeter/LArGeoModel/LArGeoCode/LArGeoCode/ATLAS_CHECK_THREAD_SAFETY b/LArCalorimeter/LArGeoModel/LArGeoCode/LArGeoCode/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..eacb3c488b6540e9966b3e67fffe6590996595fe --- /dev/null +++ b/LArCalorimeter/LArGeoModel/LArGeoCode/LArGeoCode/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +LArCalorimeter/LArGeoModel/LArGeoCode diff --git a/LArCalorimeter/LArGeoModel/LArGeoCode/LArGeoCode/VDetectorParameters.h b/LArCalorimeter/LArGeoModel/LArGeoCode/LArGeoCode/VDetectorParameters.h index 92dc8af2ea1770c93a57cf65087c60ee7c6d05e6..fc5c1a7f6373447cfd1525c0d4c33fc49727410f 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoCode/LArGeoCode/VDetectorParameters.h +++ b/LArCalorimeter/LArGeoModel/LArGeoCode/LArGeoCode/VDetectorParameters.h @@ -16,9 +16,11 @@ // are stored from the simulation's geometry and hit-calculation // routines. -#ifndef __LArGeo_VDetectorParameters_h_ -#define __LArGeo_VDetectorParameters_h_ +#ifndef LARGEOCODE_VDETECTORPARAMETERS_H +#define LARGEOCODE_VDETECTORPARAMETERS_H +#include "CxxUtils/CachedUniquePtr.h" +#include "CxxUtils/checker_macros.h" #include <string> #include <limits.h> @@ -37,8 +39,8 @@ namespace LArGeo { // Thereafter, any routine in the simulation can use the result of // "GetInstance" to find out how to get its parameters. - static void SetInstance(VDetectorParameters*); - static VDetectorParameters* GetInstance(); + static void SetInstance(std::unique_ptr<VDetectorParameters>); + static const VDetectorParameters* GetInstance(); // This is the general access method for obtaining valued from // some source of detector parameters. THe paramter is identified @@ -59,10 +61,10 @@ namespace LArGeo { VDetectorParameters() {}; private: - static VDetectorParameters* s_instance; + static CxxUtils::CachedUniquePtr<VDetectorParameters> s_instance ATLAS_THREAD_SAFE; }; } // namespace LArGeo -#endif // __LArGeo_VDetectorParameters_h_ +#endif // LARGEOCODE_VDETECTORPARAMETERS_H diff --git a/LArCalorimeter/LArGeoModel/LArGeoCode/src/VDetectorParameters.cxx b/LArCalorimeter/LArGeoModel/LArGeoCode/src/VDetectorParameters.cxx index f18a1546a74819bfe5bf2ff4a885f6eec06bf522..074f4925b457337cdc667a5948ccf590d73bbbd1 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoCode/src/VDetectorParameters.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoCode/src/VDetectorParameters.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ @@ -19,33 +19,20 @@ #include <stdlib.h> -LArGeo::VDetectorParameters* LArGeo::VDetectorParameters::s_instance = 0; +CxxUtils::CachedUniquePtr<LArGeo::VDetectorParameters> LArGeo::VDetectorParameters::s_instance; -void LArGeo::VDetectorParameters::SetInstance(VDetectorParameters* p) +void LArGeo::VDetectorParameters::SetInstance(std::unique_ptr<VDetectorParameters> p) { - if(s_instance!=0) { - /* -- Consider moving these printouts to MsgSvc - if(p==0) - std::cerr << "LArGeo::VDetectorParameters::SetInstance warning: " - << "database-parameter access objet is being deleted." - << std::endl; - else - std::cerr << "LArGeo::VDetectorParameters::SetInstance warning: " - << "database-parameter access object is being re-defined." - << std::endl; - */ - delete s_instance; - } - - s_instance = p; + s_instance.set (std::move (p)); } -LArGeo::VDetectorParameters* LArGeo::VDetectorParameters::GetInstance() +const LArGeo::VDetectorParameters* LArGeo::VDetectorParameters::GetInstance() { - if(s_instance==0) + const VDetectorParameters* p = s_instance.get(); + if(p==0) std::cerr << "LArGeo::VDetectorParameters::GetInstance was called, but " << "the pointer to the detector-parameter access object is 0." << std::endl; - return s_instance; + return p; } diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/LArGeoTBBarrel/TBBarrelCryostatConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/LArGeoTBBarrel/TBBarrelCryostatConstruction.h index 0c953d032d0bf4b9fa98fdecabd0a32f92eb0f5b..aa072614f312d59abcc6acaf9a693caeed70b098 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/LArGeoTBBarrel/TBBarrelCryostatConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/LArGeoTBBarrel/TBBarrelCryostatConstruction.h @@ -1,18 +1,19 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // TBBarrelCryostatConstruction // returns an envelope that contains the H8 barrel cryostat // and places inside the calorimeter module and the presampler -#ifndef __TBBarrelCryostatConstruction_H__ -#define __TBBarrelCryostatConstruction_H__ +#ifndef LARGEOTBBARREL_TBBARRELCRYOSTATCONSTRUCTION_H +#define LARGEOTBBARREL_TBBARRELCRYOSTATCONSTRUCTION_H #include "GeoModelKernel/GeoFullPhysVol.h" class StoreGateSvc; namespace LArGeo { + class VDetectorParameters; class TBBarrelCryostatConstruction { @@ -21,7 +22,7 @@ namespace LArGeo { virtual ~TBBarrelCryostatConstruction(); // get the envelope containing this detector - virtual GeoFullPhysVol* GetEnvelope(); + virtual GeoFullPhysVol* GetEnvelope(const VDetectorParameters* params); void setBarrelSagging(bool flag) {_barrelSagging=flag;} void setBarrelCellVisLimit(int maxCell) {_barrelVisLimit = maxCell;} diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/src/TBBarrelCryostatConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/src/TBBarrelCryostatConstruction.cxx index 40938c4191dd627ec87967565a4f3436696119a8..2ac76941440cc23d9a5acec25c04029afe8e2b8f 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/src/TBBarrelCryostatConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/src/TBBarrelCryostatConstruction.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // TBBarrelCryostatConstruction @@ -56,12 +56,12 @@ LArGeo::TBBarrelCryostatConstruction::TBBarrelCryostatConstruction(): LArGeo::TBBarrelCryostatConstruction::~TBBarrelCryostatConstruction() {} -GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() +GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope(const VDetectorParameters* params) { if (cryoMotherPhysical) return cryoMotherPhysical; -// Get access to the matarial manager +// Get access to the material manager ISvcLocator *svcLocator = Gaudi::svcLocator(); IMessageSvc * msgSvc; @@ -620,7 +620,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() // -------------------------------------------------------------------- #ifdef BUILD_LARMODULE - BarrelConstruction barrelConstruction(true); // full geometry + BarrelConstruction barrelConstruction(true, params); // full geometry barrelConstruction.setBarrelSagging(_barrelSagging); barrelConstruction.setBarrelCellVisLimit(_barrelVisLimit); GeoFullPhysVol* barrelEnvelope = barrelConstruction.GetPositiveEnvelope(); @@ -645,7 +645,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() // Place the Presampler test module inside the LAr volume (moth_phys) // ------------------------------------------------------------------------ #ifdef BUILD_PRESAMPLER - BarrelPresamplerConstruction barrelPSConstruction(1); + BarrelPresamplerConstruction barrelPSConstruction(1, params); GeoFullPhysVol* barrelPSEnvelope = barrelPSConstruction.GetPositiveEnvelope(); // PS lenght = 2*1582.5 // start should be a z=0 in Atlas => z = -LAr_z_max/2.+Cryo_z0 in moth_phys diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/LArDetectorFactoryTBEC.cxx b/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/LArDetectorFactoryTBEC.cxx index 073ac8b943e79c26a4f6afe794bd8b001b5f4318..585e598a50d2977c094917763c829ec0a27a0ee7 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/LArDetectorFactoryTBEC.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/LArDetectorFactoryTBEC.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // LArDetectorFactory.cxx @@ -49,9 +49,8 @@ LArGeo::LArDetectorFactoryTBEC::~LArDetectorFactoryTBEC() void LArGeo::LArDetectorFactoryTBEC::create( GeoPhysVol* a_container ) { - // V.N : Patch LAr materials - VDetectorParameters* parameters = (VDetectorParameters *) new LArGeo::RAL(); - VDetectorParameters::SetInstance(parameters); + // V.N : Patch LAr materials ??? is this needed? + VDetectorParameters::SetInstance(std::make_unique<LArGeo::RAL>()); EMECDetectorManager *emecDetectorManager = new EMECDetectorManager();