Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:19:14

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // $Id: PHG4GDMLWriteMaterials.hh 68053 2013-03-13 14:39:51Z gcosmo $
0028 //
0029 //
0030 // class PHG4GDMLWriteMaterials
0031 //
0032 // Class description:
0033 //
0034 // GDML class for writing materials definitions.
0035 
0036 // History:
0037 // - Created.                                  Zoltan Torzsok, November 2007
0038 // -------------------------------------------------------------------------
0039 
0040 #ifndef _PHG4GDMLWRITEMATERIALS_INCLUDED_
0041 #define _PHG4GDMLWRITEMATERIALS_INCLUDED_
0042 
0043 #include <Geant4/G4Types.hh>
0044 #include <vector>
0045 #include <Geant4/G4Version.hh>
0046 
0047 #include "PHG4GDMLWriteDefine.hh"
0048 
0049 class G4Isotope;
0050 class G4Element;
0051 class G4Material;
0052 class G4PhysicsFreeVector;
0053 
0054 #if G4VERSION_NUMBER >= 1100
0055 class G4MaterialPropertiesTable;
0056 #else
0057 class G4PhysicsOrderedFreeVector;
0058 #endif
0059 
0060 class PHG4GDMLWriteMaterials : public PHG4GDMLWriteDefine
0061 {
0062 
0063  public:
0064 
0065    void AddIsotope(const G4Isotope* const);
0066    void AddElement(const G4Element* const);
0067    void AddMaterial(const G4Material* const);
0068 
0069    virtual void MaterialsWrite(xercesc::DOMElement*);
0070 
0071  protected:
0072 
0073    PHG4GDMLWriteMaterials();
0074    virtual ~PHG4GDMLWriteMaterials();
0075 
0076    void AtomWrite(xercesc::DOMElement*,const G4double&);
0077    void DWrite(xercesc::DOMElement*,const G4double&);
0078    void PWrite(xercesc::DOMElement*,const G4double&);
0079    void TWrite(xercesc::DOMElement*,const G4double&);
0080    void MEEWrite(xercesc::DOMElement*,const G4double&);
0081    void IsotopeWrite(const G4Isotope* const);
0082    void ElementWrite(const G4Element* const);
0083    void MaterialWrite(const G4Material* const);
0084 
0085 
0086 #if G4VERSION_NUMBER >= 1100
0087 
0088    void PropertyWrite(xercesc::DOMElement*, const G4Material* const);
0089    void PropertyVectorWrite(const G4String&,
0090                             const G4PhysicsFreeVector* const);
0091    void PropertyConstWrite(const G4String&, const G4double,
0092                            const G4MaterialPropertiesTable*);
0093 #else
0094 
0095    void PropertyWrite(xercesc::DOMElement*, const G4Material* const);
0096    void PropertyVectorWrite(const G4String&,
0097                             const G4PhysicsOrderedFreeVector* const);
0098 
0099 #endif
0100 
0101 
0102  protected:
0103 
0104    std::vector<const G4Isotope*> isotopeList;
0105    std::vector<const G4Element*> elementList;
0106    std::vector<const G4Material*> materialList;
0107    std::vector<const G4PhysicsFreeVector*> propertyList;
0108    xercesc::DOMElement* materialsElement;
0109 };
0110 
0111 #endif