Geant4  10.02.p03
F04Materials Class Reference

#include <F04Materials.hh>

Collaboration diagram for F04Materials:

Public Member Functions

virtual ~F04Materials ()
 
G4Material * GetMaterial (G4String)
 

Static Public Member Functions

static F04Materials * GetInstance ()
 

Private Member Functions

 F04Materials ()
 
void CreateMaterials ()
 

Private Attributes

G4NistManager * fNistMan
 
G4Material * fVacuum
 
G4Material * fAir
 
G4Material * fSci
 
G4Material * fBeO
 

Static Private Attributes

static F04Materials * fInstance = 0
 

Detailed Description

Definition at line 39 of file F04Materials.hh.

Constructor & Destructor Documentation

◆ ~F04Materials()

F04Materials::~F04Materials ( )
virtual

Definition at line 48 of file F04Materials.cc.

49 {
50  delete fVacuum;
51  delete fAir;
52  delete fSci;
53  delete fBeO;
54 }
G4Material * fAir
Definition: F04Materials.hh:62
G4Material * fSci
Definition: F04Materials.hh:63
G4Material * fVacuum
Definition: F04Materials.hh:61
G4Material * fBeO
Definition: F04Materials.hh:64

◆ F04Materials()

F04Materials::F04Materials ( )
private

Definition at line 37 of file F04Materials.cc.

38 {
40 
41  fNistMan->SetVerbose(2);
42 
44 }
static G4NistManager * Instance()
G4NistManager * fNistMan
Definition: F04Materials.hh:59
void SetVerbose(G4int)
void CreateMaterials()
Definition: F04Materials.cc:83
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ CreateMaterials()

void F04Materials::CreateMaterials ( )
private

Definition at line 83 of file F04Materials.cc.

84 {
86  std::vector<G4int> natoms;
87  std::vector<G4double> fractionMass;
88  std::vector<G4String> elements;
89 
90  // Materials Definitions
91  // =====================
92 
93  // Define Vacuum
94 
95  fVacuum = fNistMan->FindOrBuildMaterial("G4_Galactic");
96 
97  // Define Air
98 
99  fAir = fNistMan->FindOrBuildMaterial("G4_AIR");
100 
101  // Define BeO
102 
103  fBeO = fNistMan->FindOrBuildMaterial("G4_BERYLLIUM_OXIDE");
104 
105  // Define Scintillator
106 
107  elements.push_back("C"); natoms.push_back(9);
108  elements.push_back("H"); natoms.push_back(10);
109 
110  density = 1.032*g/cm3;;
111 
112  fSci = fNistMan->
113  ConstructNewMaterial("Scintillator", elements, natoms, density);
114 
115  elements.clear();
116  natoms.clear();
117 
118  G4cout << G4endl << "The materials defined are: " << G4endl << G4endl;
119 
120  G4cout << *(G4Material::GetMaterialTable()) << G4endl;
121 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:589
G4NistManager * fNistMan
Definition: F04Materials.hh:59
G4double density
Definition: TRTMaterials.hh:39
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
G4GLOB_DLL std::ostream G4cout
G4Material * fAir
Definition: F04Materials.hh:62
static const double cm3
Definition: G4SIunits.hh:120
G4Material * fSci
Definition: F04Materials.hh:63
G4Material * fVacuum
Definition: F04Materials.hh:61
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4Material * fBeO
Definition: F04Materials.hh:64
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInstance()

F04Materials * F04Materials::GetInstance ( void  )
static

Definition at line 60 of file F04Materials.cc.

61 {
62  if (fInstance == 0)
63  {
64  fInstance = new F04Materials();
65  }
66  return fInstance;
67 }
static F04Materials * fInstance
Definition: F04Materials.hh:57
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMaterial()

G4Material * F04Materials::GetMaterial ( G4String  material)

Definition at line 71 of file F04Materials.cc.

72 {
74 
75  if (!mat) mat = G4Material::GetMaterial(material);
76  if (!mat) {G4cout << material << "Not Found, Please Retry"<< G4endl;}
77 
78  return mat;
79 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:604
G4NistManager * fNistMan
Definition: F04Materials.hh:59
Float_t mat
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fAir

G4Material* F04Materials::fAir
private

Definition at line 62 of file F04Materials.hh.

◆ fBeO

G4Material* F04Materials::fBeO
private

Definition at line 64 of file F04Materials.hh.

◆ fInstance

F04Materials * F04Materials::fInstance = 0
staticprivate

Definition at line 57 of file F04Materials.hh.

◆ fNistMan

G4NistManager* F04Materials::fNistMan
private

Definition at line 59 of file F04Materials.hh.

◆ fSci

G4Material* F04Materials::fSci
private

Definition at line 63 of file F04Materials.hh.

◆ fVacuum

G4Material* F04Materials::fVacuum
private

Definition at line 61 of file F04Materials.hh.


The documentation for this class was generated from the following files: