ATLAS Offline Software
MaterialDescriptionTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Primary include
7 
8 // Geant4 includes
9 #include "G4NistManager.hh"
10 #include "G4Element.hh"
11 #include "G4Material.hh"
12 
13 //-----------------------------------------------------------------------------
14 // Implementation file for class : MaterialDescriptionTool
15 //
16 // 2016-08-16: Andrea Dell'Acqua
17 //-----------------------------------------------------------------------------
18 
19 
20 //=============================================================================
21 // Standard constructor, initializes variables
22 //=============================================================================
24  const std::string& name,
25  const IInterface* parent)
27 {
28 }
29 
31 {
32  ATH_MSG_DEBUG("MaterialDescriptionTool::preGeometryConfigure()");
33 
34  G4NistManager* man = G4NistManager::Instance();
35  G4Element* N = man->FindOrBuildElement("N");
36  G4Element* O = man->FindOrBuildElement("O");
37  G4Element* Ar = man->FindOrBuildElement("Ar");
38  G4Element* H = man->FindOrBuildElement("H");
39  G4Element* Si = man->FindOrBuildElement("Si");
40  G4Element* Ca = man->FindOrBuildElement("Ca");
41  G4Element* Al = man->FindOrBuildElement("Al");
42  G4Element* Fe = man->FindOrBuildElement("Fe");
43 
44  // Constructor of G4Material inserts it into a table for later use
45  G4Material *air = new G4Material("Air", 0.001214*CLHEP::g/CLHEP::cm3,4);
46  air->AddElement( N, 0.7494);
47  air->AddElement( O, 0.2369);
48  air->AddElement(Ar, 0.0129);
49  air->AddElement( H, 0.0008);
50 
51  G4Material *vacuum = new G4Material("Vacuum", 0.000001*CLHEP::g/CLHEP::cm3,1);
52  vacuum->AddMaterial(air, 1.0);
53 
54  G4Material *material_concrete = new G4Material("Concrete",2.3*CLHEP::g/CLHEP::cm3,6);
55  material_concrete->AddElement(Si,0.227915);
56  material_concrete->AddElement(O,0.605410);
57  material_concrete->AddElement(H,0.099720);
58  material_concrete->AddElement(Ca,0.049860);
59  material_concrete->AddElement(Al,0.014245);
60  material_concrete->AddElement(Fe,0.002850);
61 
62  if (m_isTestBeam) {
63  G4Element* C = man->FindOrBuildElement("C");
64  G4Material *material_scintillator = new G4Material("Scintillator",1.032*CLHEP::g/CLHEP::cm3,2); // Used in TileTB_S1,
65  // TileTB_S2 and TileTB_S3
66  material_scintillator->AddElement(C,1);
67  material_scintillator->AddElement(H,1);
68 
69  G4Material *material_mylar = new G4Material("Mylar",1.39*CLHEP::g/CLHEP::cm3,3);// Used in TileTB_MYLAREQUIV
70  material_mylar->AddElement(H,4);
71  material_mylar->AddElement(C,5);
72  material_mylar->AddElement(O,2);
73  }
74 
75  G4Material *material_rock = new G4Material("Rock",2.33*CLHEP::g/CLHEP::cm3,1);
76  material_rock->AddElement(Si,1);
77 
78  return StatusCode::SUCCESS;
79 }
80 
82 {
83  ATH_MSG_DEBUG("MaterialDescriptionTool::postGeometryConfigure()");
84 
85  return StatusCode::SUCCESS;
86 }
MaterialDescriptionTool::preGeometryConfigure
virtual StatusCode preGeometryConfigure() const override final
Configure method.
Definition: MaterialDescriptionTool.cxx:30
DMTest::C
C_v1 C
Definition: C.h:26
cm3
#define cm3
MaterialDescriptionTool.h
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
H
#define H(x, y, z)
Definition: MD5.cxx:114
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MaterialDescriptionTool::MaterialDescriptionTool
MaterialDescriptionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition: MaterialDescriptionTool.cxx:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MaterialDescriptionTool::m_isTestBeam
Gaudi::Property< bool > m_isTestBeam
Definition: MaterialDescriptionTool.h:37
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MaterialDescriptionTool::postGeometryConfigure
virtual StatusCode postGeometryConfigure() const override final
Definition: MaterialDescriptionTool.cxx:81
GeometryConfigurationToolBase
Definition: GeometryConfigurationToolBase.h:26