QwGeant4
QweakSimMaterial.hh
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 /**
7 
8  \file QweakSimMaterial.hh
9  $Revision: 1.2 $
10  $Date: 2005/12/27 19:25:44 $
11  \author Klaus Hans Grimm
12 
13 */
14 //=============================================================================
15 //
16 //=============================================================================
17 //
18 // ---------------------------
19 // | Doxygen Class Information |
20 // ---------------------------
21 /**
22  \class QweakSimMaterial
23 
24  \brief Definition of elements and materials
25 
26  Placeholder for a long explaination
27 
28  */
29 //=============================================================================
30 //
31 //=============================================================================
32 // -----------------------
33 // | CVS File Information |
34 // -----------------------
35 //
36 // Last Update: $Author: grimm $
37 // Update Date: $Date: 2005/12/27 19:25:44 $
38 // CVS/RCS Revision: $Revision: 1.2 $
39 // Status: $State: Exp $
40 //
41 // ===================================
42 // CVS Revision Log at end of file !!
43 // ===================================
44 //
45 //=============================================================================
46 
47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48 #ifndef QweakSimMaterial_H
49 #define QweakSimMaterial_H 1
50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
51 
52 // geant4 includes
53 #include "G4NistManager.hh"
54 
55 // user includes
56 #include "QweakSimSystemOfUnits.hh"
57 
58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
60 {
61  private:
62 
63  // Private constructor
65 
66  // Prevent creation of automatic copy constructors
69 
70  // Destructor
71  virtual ~QweakSimMaterial() { };
72 
73  public:
74  // Get the instance of the Qweak materials manager
76  static QweakSimMaterial material;
77  return &material;
78  };
79 
80  // Get the material
81  G4Material* GetMaterial(G4String material) {
82  // Search list of custom materials
83  G4Material* ptrToMaterial = G4Material::GetMaterial(material);
84  // Search list of NIST materials
85  if (ptrToMaterial == 0) {
86  ptrToMaterial = fNistManager->FindOrBuildMaterial(material);
87  }
88  return ptrToMaterial;
89  }
90 
91  private:
92 
93  // NIST materials manager
94  G4NistManager* fNistManager;
95 
96 };
97 
98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99 
100 #endif
101 
102 //=======================================================================================
103 // -----------------------
104 // | CVS File Information |
105 // -----------------------
106 //
107 // $Revisions$
108 // $Log: QweakSimMaterial.hh,v $
109 // Revision 1.2 2005/12/27 19:25:44 grimm
110 // - Redesign of Doxygen header containing CVS info like revision and date
111 // - Added CVS revision log at the end of file
112 //
113 //
114 
115 
static QweakSimMaterial * GetInstance()
G4NistManager * fNistManager
Definition of elements and materials.
G4Material * GetMaterial(G4String material)
virtual ~QweakSimMaterial()
QweakSimMaterial & operator=(QweakSimMaterial const &copy)