VGM Version 5.3
Loading...
Searching...
No Matches
MaterialFactory.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The Geant4GM package of the Virtual Geometry Model
5// Copyright (C) 2007, Ivana Hrivnacova
6// All rights reserved.
7//
8// For the licensing terms see vgm/LICENSE.
9// Contact: ivana@ipno.in2p3.fr
10// -----------------------------------------------------------------------
11
13//
19
20#ifndef GEANT4_GM_MATERIAL_FACTORY_H
21#define GEANT4_GM_MATERIAL_FACTORY_H
22
24
25#include <set>
26
27class G4Isotope;
28class G4Element;
29class G4Material;
30
31namespace VGM {
32class IMaterial;
33}
34
35namespace Geant4GM {
36
38{
39 public:
41 virtual ~MaterialFactory();
42
43 //
44 // methods
45 //
47 const std::string& name, int z, int n, double a);
48
50 const std::string& name, const std::string& symbol, double z, double a);
51
52 virtual VGM::IElement* CreateElement(const std::string& name,
53 const std::string& symbol, const VGM::IsotopeVector& isotopes,
54 const VGM::RelAbundanceVector& relAbundances);
55
56 virtual VGM::IElement* CreateElement(int z, bool isotopes);
57
58 virtual VGM::IMaterial* CreateMaterial(const std::string& name,
59 double density, VGM::IElement* element, double radlen, double intlen);
60
61 virtual VGM::IMaterial* CreateMaterial(const std::string& name,
62 double density, VGM::IElement* element, double radlen, double intlen,
63 VGM::MaterialState state, double temperature, double pressure);
64
65 virtual VGM::IMaterial* CreateMaterial(const std::string& name,
66 double density, const VGM::ElementVector& elements,
67 const VGM::MassFractionVector& fractions);
68
69 virtual VGM::IMaterial* CreateMaterial(const std::string& name,
70 double density, const VGM::ElementVector& elements,
71 const VGM::MassFractionVector& fractions, VGM::MaterialState state,
72 double temperature, double pressure);
73
74 virtual VGM::IMaterial* CreateMaterial(const std::string& name,
75 double density, const VGM::ElementVector& elements,
76 const VGM::AtomCountVector& atomCounts);
77
78 virtual VGM::IMaterial* CreateMaterial(const std::string& name,
79 double density, const VGM::ElementVector& elements,
80 const VGM::AtomCountVector& atomCounts, VGM::MaterialState state,
81 double temperature, double pressure);
82
83 virtual VGM::IMedium* CreateMedium(const std::string& name, int mediumId,
84 VGM::IMaterial* material, int nofParameters, double* parameters);
85 // import/export
86 //
87 virtual bool Import();
88
89 protected:
91
92 private:
93 // methods
94 void ImportIsotope(G4Isotope* element);
95 void ImportElement(G4Element* element);
96 void ImportMaterial(G4Material* material);
97
98 bool CompareIsotopes(const G4Element* g4Element,
99 const VGM::IsotopeVector& isotopes,
100 const VGM::RelAbundanceVector& relAbundances);
101
102 // data members
103 std::set<VGM::IElement*> fVacuumElements;
104
105 // data members
106 static const double fgkTolerance;
107};
108} // namespace Geant4GM
109
110#endif // GEANT4_GM_MATERIAL_FACTORY_H
The abstract base class to material factory.
VGM material factory for Geant4.
virtual VGM::IIsotope * CreateIsotope(const std::string &name, int z, int n, double a)
Create a chemical isotope.
virtual bool Import()
Import native materials.
virtual VGM::IMaterial * CreateMaterial(const std::string &name, double density, VGM::IElement *element, double radlen, double intlen)
Create a material.
virtual VGM::IMedium * CreateMedium(const std::string &name, int mediumId, VGM::IMaterial *material, int nofParameters, double *parameters)
Create a tracking medium.
virtual VGM::IElement * CreateElement(const std::string &name, const std::string &symbol, double z, double a)
Create a chemical element.
The VGM interface to elements.
Definition IElement.h:34
The VGM interface to elements.
Definition IIsotope.h:28
The VGM interface to materials.
Definition IMaterial.h:44
The VGM interface to tracking medium.
Definition IMedium.h:31
VGM implementation for Geant4.
Definition Element.h:29
VGM interfaces.
Definition VMedium.h:28
std::vector< double > RelAbundanceVector
Definition IElement.h:31
std::vector< int > AtomCountVector
Definition IMaterial.h:33
std::vector< double > MassFractionVector
Definition IMaterial.h:32
std::vector< IElement * > ElementVector
Definition IMaterial.h:31
std::vector< IIsotope * > IsotopeVector
Definition IElement.h:30
MaterialState
Definition IMaterial.h:36