VGM Version 5.3
Loading...
Searching...
No Matches
Material.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_H
21#define GEANT4_GM_MATERIAL_H
22
24
25#include "G4Material.hh"
26
27#include <string>
28
29namespace Geant4GM {
30
31class Material : public virtual VGM::IMaterial
32{
33 public:
34 Material(const std::string& name, double density, VGM::IElement* element,
35 bool isVacuum = false);
36
37 Material(const std::string& name, double density, VGM::IElement* element,
38 VGM::MaterialState state, double temperature, double pressure,
39 bool isVacuum = false);
40
41 Material(const std::string& name, double density,
42 const VGM::ElementVector& elements,
43 const VGM::MassFractionVector& fractions);
44
45 Material(const std::string& name, double density,
46 const VGM::ElementVector& elements,
47 const VGM::MassFractionVector& fractions, VGM::MaterialState state,
48 double temperature, double pressure);
49
50 Material(const std::string& name, double density,
51 const VGM::ElementVector& elements, const VGM::AtomCountVector& atomCounts);
52
53 Material(const std::string& name, double density,
54 const VGM::ElementVector& elements, const VGM::AtomCountVector& atomCounts,
55 VGM::MaterialState state, double temperature, double pressure);
56
57 Material(G4Material* material);
58 virtual ~Material();
59
60 // methods
61 virtual std::string Name() const;
62
63 virtual double Density() const;
64 virtual double RadiationLength() const;
65 virtual double NuclearInterLength() const;
66 virtual VGM::MaterialState State() const;
67 virtual double Temperature() const;
68 virtual double Pressure() const;
69
70 virtual int NofElements() const;
71 virtual VGM::IElement* Element(int iel) const;
72 virtual double MassFraction(int iel) const;
73 virtual double AtomCount(int iel) const;
74
75 protected:
76 Material();
77 Material(const Material& rhs);
78
79 private:
80 void CheckIndex(int iel) const;
81 G4State GetG4State(VGM::MaterialState state) const;
82 VGM::MaterialState GetVGMState(G4State state) const;
83
84 G4Material* fMaterial;
85};
86
87} // namespace Geant4GM
88
89#endif // GEANT4_GM_MATERIAL_H
VGM implementation for Geant4 material.
Definition Material.h:32
virtual double MassFraction(int iel) const
Return the mass fraction of the i-th element constituing this material.
Definition Material.cxx:481
virtual VGM::IElement * Element(int iel) const
Return the i-th element constituing this material.
Definition Material.cxx:472
virtual double Pressure() const
Return the density in atmosphere.
Definition Material.cxx:460
virtual double Temperature() const
Return the temperature in kelvins.
Definition Material.cxx:454
virtual double Density() const
Return the density in g/cm3.
Definition Material.cxx:430
virtual std::string Name() const
Return the name of this element.
Definition Material.cxx:427
virtual double AtomCount(int iel) const
Return the atom count of the i-th element constituing this material.
Definition Material.cxx:489
virtual ~Material()
Definition Material.cxx:362
virtual VGM::MaterialState State() const
Return the material state.
Definition Material.cxx:448
virtual double RadiationLength() const
Return the radiation length in mm.
Definition Material.cxx:436
virtual double NuclearInterLength() const
Return the nuclear interaction length in mm.
Definition Material.cxx:442
virtual int NofElements() const
Return the number of elements constituing this material.
Definition Material.cxx:466
The VGM interface to elements.
Definition IElement.h:34
The VGM interface to materials.
Definition IMaterial.h:44
VGM implementation for Geant4.
Definition Element.h:29
std::vector< int > AtomCountVector
Definition IMaterial.h:33
std::vector< double > MassFractionVector
Definition IMaterial.h:32
std::vector< IElement * > ElementVector
Definition IMaterial.h:31
MaterialState
Definition IMaterial.h:36