Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4GDMLWriteMaterials.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4GDMLWriteMaterials.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 // $Id: PHG4GDMLWriteMaterials.hh 68053 2013-03-13 14:39:51Z gcosmo $
28 //
29 //
30 // class PHG4GDMLWriteMaterials
31 //
32 // Class description:
33 //
34 // GDML class for writing materials definitions.
35 
36 // History:
37 // - Created. Zoltan Torzsok, November 2007
38 // -------------------------------------------------------------------------
39 
40 #ifndef _PHG4GDMLWRITEMATERIALS_INCLUDED_
41 #define _PHG4GDMLWRITEMATERIALS_INCLUDED_
42 
43 #include <Geant4/G4Types.hh>
44 #include <vector>
45 #include <Geant4/G4Version.hh>
46 
47 #include "PHG4GDMLWriteDefine.hh"
48 
49 class G4Isotope;
50 class G4Element;
51 class G4Material;
52 class G4PhysicsFreeVector;
53 
54 #if G4VERSION_NUMBER >= 1100
55 class G4MaterialPropertiesTable;
56 #else
57 class G4PhysicsOrderedFreeVector;
58 #endif
59 
61 {
62 
63  public:
64 
65  void AddIsotope(const G4Isotope* const);
66  void AddElement(const G4Element* const);
67  void AddMaterial(const G4Material* const);
68 
69  virtual void MaterialsWrite(xercesc::DOMElement*);
70 
71  protected:
72 
74  virtual ~PHG4GDMLWriteMaterials();
75 
76  void AtomWrite(xercesc::DOMElement*,const G4double&);
77  void DWrite(xercesc::DOMElement*,const G4double&);
78  void PWrite(xercesc::DOMElement*,const G4double&);
79  void TWrite(xercesc::DOMElement*,const G4double&);
80  void MEEWrite(xercesc::DOMElement*,const G4double&);
81  void IsotopeWrite(const G4Isotope* const);
82  void ElementWrite(const G4Element* const);
83  void MaterialWrite(const G4Material* const);
84 
85 
86 #if G4VERSION_NUMBER >= 1100
87 
88  void PropertyWrite(xercesc::DOMElement*, const G4Material* const);
89  void PropertyVectorWrite(const G4String&,
90  const G4PhysicsFreeVector* const);
91  void PropertyConstWrite(const G4String&, const G4double,
92  const G4MaterialPropertiesTable*);
93 #else
94 
95  void PropertyWrite(xercesc::DOMElement*, const G4Material* const);
96  void PropertyVectorWrite(const G4String&,
97  const G4PhysicsOrderedFreeVector* const);
98 
99 #endif
100 
101 
102  protected:
103 
104  std::vector<const G4Isotope*> isotopeList;
105  std::vector<const G4Element*> elementList;
106  std::vector<const G4Material*> materialList;
107  std::vector<const G4PhysicsFreeVector*> propertyList;
108  xercesc::DOMElement* materialsElement;
109 };
110 
111 #endif