ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4tgbMaterialMgr.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4tgbMaterialMgr.hh
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 //
28 //
29 // class G4tgbMaterialMgr
30 //
31 // Class description:
32 //
33 // Singleton class to manage the building of transient materials,
34 // as well as the construction of the corresponding G4Material's.
35 
36 // History:
37 // - Created. P.Arce, CIEMAT (November 2007)
38 // -------------------------------------------------------------------------
39 
40 #ifndef G4tgbMaterialMgr_h
41 #define G4tgbMaterialMgr_h
42 
43 #include "globals.hh"
44 
45 #include "G4tgbIsotope.hh"
46 #include "G4tgbElement.hh"
47 #include "G4tgbMaterial.hh"
48 
49 #include "G4tgrIsotope.hh"
50 #include "G4tgrElement.hh"
51 #include "G4tgrElement.hh"
52 #include "G4tgrMaterial.hh"
53 
54 #include "G4Isotope.hh"
55 #include "G4Element.hh"
56 #include "G4Material.hh"
57 
58 typedef std::map< G4String, G4tgbIsotope* > G4mstgbisot;
59 typedef std::map< G4String, G4tgbElement* > G4mstgbelem;
60 typedef std::map< G4String, G4tgbMaterial* > G4mstgbmate;
61 typedef std::map< G4String, G4Isotope* > G4msg4isot;
62 typedef std::map< G4String, G4Element* > G4msg4elem;
63 typedef std::map< G4String, G4Material* > G4msg4mate;
64 
66 {
67  public: // with description
68 
70 
71  static G4tgbMaterialMgr* GetInstance();
72  // Get only instance (it it does not exists, create it)
73 
74  void CopyIsotopes();
75  // Copy the G4tgrIsotopes into G4tgbIsotopes
76  void CopyElements();
77  // Copy the G4tgrElements into G4tgbElements
78  void CopyMaterials();
79  // Copy the G4tgrMaterials into G4tgbMaterials
80 
82  // Look for a G4Isotope that has to exists
83  // (if not found create it from the corresponding G4tgbIsotope)
84  G4Isotope* FindBuiltG4Isotope(const G4String & name) const;
85  // Look for a G4Isotope and if not found return 0
87  G4bool bMustExist = 0) const;
88  // Look for a G4Isotope and if not found return 0
89 
91  G4bool bMustExist = 1);
92  // Look for a G4Element that has to exists by default
93  // (if not found create it from the corresponding G4tgbElement)
94  G4Element* FindBuiltG4Element(const G4String& name) const;
95  // Look for a G4Element and if not found return 0
97  G4bool bMustExist = 0) const;
98  // Look for a G4Element and if not found return 0
99 
101  G4bool bMustExist = 1);
102  // Look for a G4Material that has to exists by default
103  // (if not found create it from the corresponding G4tgbMaterial)
104  G4Material* FindBuiltG4Material(const G4String& name) const;
105  // Look for a G4Material and if not found return 0
107  G4bool bMustExist = 0) const;
108  // Look for a G4tgbMaterial and if not found return 0
109 
110  const G4msg4isot GetG4IsotopeList() const { return theG4Isotopes; }
111  const G4msg4elem GetG4ElementList() const { return theG4Elements; }
112  const G4msg4mate GetG4MaterialList() const { return theG4Materials; }
113 
114  private:
115 
117  // Private Constructor
118 
119  private:
120 
122 
124  // List of all tgbIsotopes created
126  // List of all tgbElements created
128  // List of all G4tgbMaterials created
130  // Container of all G4Isotopes created
132  // Container of all G4Elements created
134  // Container of all G4Materials created
135 };
136 
137 #endif