ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
MaterialDescriptionTool Class Reference

#include "G4AtlasTools/MaterialDescriptionTool.h"

Inheritance diagram for MaterialDescriptionTool:
Collaboration diagram for MaterialDescriptionTool:

Public Member Functions

 MaterialDescriptionTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
virtual ~MaterialDescriptionTool ()
 Destructor. More...
 
virtual StatusCode preGeometryConfigure () const override final
 Configure method. More...
 
virtual StatusCode postGeometryConfigure () const override final
 
virtual StatusCode initialize () override
 Initialize method. More...
 

Private Attributes

Gaudi::Property< bool > m_isTestBeam {this, "TestBeam", false, "Should additional materials used by Test Beam simulation be created."}
 

Detailed Description

Class to allow for not-standard material construction

Author
Andrea Dell'Acqua
Date
2016-08-16

Definition at line 20 of file MaterialDescriptionTool.h.

Constructor & Destructor Documentation

◆ MaterialDescriptionTool()

MaterialDescriptionTool::MaterialDescriptionTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard constructor.

Definition at line 23 of file MaterialDescriptionTool.cxx.

◆ ~MaterialDescriptionTool()

virtual MaterialDescriptionTool::~MaterialDescriptionTool ( )
inlinevirtual

Destructor.

Definition at line 29 of file MaterialDescriptionTool.h.

29 {}

Member Function Documentation

◆ initialize()

StatusCode GeometryConfigurationToolBase::initialize ( )
overridevirtualinherited

Initialize method.

Definition at line 29 of file GeometryConfigurationToolBase.cxx.

30 {
31  ATH_MSG_DEBUG("GeometryyConfigurationToolBase::initialize()");
32 
33  return StatusCode::SUCCESS;
34 }

◆ postGeometryConfigure()

StatusCode MaterialDescriptionTool::postGeometryConfigure ( ) const
finaloverridevirtual

Reimplemented from GeometryConfigurationToolBase.

Definition at line 81 of file MaterialDescriptionTool.cxx.

82 {
83  ATH_MSG_DEBUG("MaterialDescriptionTool::postGeometryConfigure()");
84 
85  return StatusCode::SUCCESS;
86 }

◆ preGeometryConfigure()

StatusCode MaterialDescriptionTool::preGeometryConfigure ( ) const
finaloverridevirtual

Configure method.

Reimplemented from GeometryConfigurationToolBase.

Definition at line 30 of file MaterialDescriptionTool.cxx.

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 }

Member Data Documentation

◆ m_isTestBeam

Gaudi::Property<bool> MaterialDescriptionTool::m_isTestBeam {this, "TestBeam", false, "Should additional materials used by Test Beam simulation be created."}
private

Definition at line 37 of file MaterialDescriptionTool.h.


The documentation for this class was generated from the following files:
DMTest::C
C_v1 C
Definition: C.h:26
cm3
#define cm3
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
lwtDev::Component::O
@ O
H
#define H(x, y, z)
Definition: MD5.cxx:114
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MaterialDescriptionTool::m_isTestBeam
Gaudi::Property< bool > m_isTestBeam
Definition: MaterialDescriptionTool.h:37
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
GeometryConfigurationToolBase::GeometryConfigurationToolBase
GeometryConfigurationToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition: GeometryConfigurationToolBase.cxx:18