diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.cxx index 96971e087ab78a3faca5b56f9a2b3d7b5c285222..b98cc9d2876aa22b3ad15ebbc5f018b39f40a0a7 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.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 */ /////////////////////////////////////////////////////////////////// @@ -20,16 +20,9 @@ #include "G4PVPlacement.hh" #include "globals.hh" -// G4 material : vacuum setup -G4Material* G4DetectorConstruction::s_g4vacuum = new G4Material("Vacuum",1.,1.01*CLHEP::g/CLHEP::mole, - CLHEP::universe_mean_density, - kStateGas,0.1*CLHEP::kelvin, 1.e-19*CLHEP::pascal); - G4DetectorConstruction::G4DetectorConstruction() : m_worldLog(nullptr), - //m_detectorLog(nullptr), m_worldPhys(nullptr) - ///m_detectorPhys(nullptr), {} @@ -44,8 +37,15 @@ void G4DetectorConstruction::dummyDetector() // (1) WORLD // create the world setup G4Box* worldBox = new G4Box("WorldBox",25000.,25000.,25000.); - m_worldLog = m_worldLog ? new(m_worldLog) G4LogicalVolume(worldBox,s_g4vacuum,"WorldLogical", 0, 0, 0) : - new G4LogicalVolume(worldBox,s_g4vacuum,"WorldLogical", 0, 0, 0); + + // G4 material : vacuum setup + G4Material* g4vacuum = G4Material::GetMaterial("Vacuum",false); + if(!g4vacuum) g4vacuum = new G4Material("FatrasDummyVacuum",1.,1.01*CLHEP::g/CLHEP::mole, + CLHEP::universe_mean_density, + kStateGas,0.1*CLHEP::kelvin, 1.e-19*CLHEP::pascal); + + m_worldLog = m_worldLog ? new(m_worldLog) G4LogicalVolume(worldBox,g4vacuum,"WorldLogical", 0, 0, 0) : + new G4LogicalVolume(worldBox,g4vacuum,"WorldLogical", 0, 0, 0); m_worldPhys = m_worldPhys ? new(m_worldPhys) G4PVPlacement(0,G4ThreeVector(0.,0.,0),"WorldPhysical",m_worldLog,0,false,0) : new G4PVPlacement(0,materialPosition,"WorldPhysical",m_worldLog,0,false,0); diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.h index 885f2b3222a45631bf583305b46284daa8225ad3..90107de37e12aa43248f9130dde989d7fc8f5e33 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.h @@ -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 */ /////////////////////////////////////////////////////////////////// @@ -36,17 +36,10 @@ private: // Logical volumes // G4LogicalVolume* m_worldLog; - //G4LogicalVolume* m_detectorLog; // Physical volumes // G4VPhysicalVolume* m_worldPhys; - //G4VPhysicalVolume* m_detectorPhys; - - // Vaccum material - // - static G4Material* s_g4vacuum; - }; #endif