VGM Version 5.3
Loading...
Searching...
No Matches
Material.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The RootGM 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 ROOT_GM_MATERIAL_H
21#define ROOT_GM_MATERIAL_H
22
24
25#include "TGeoMaterial.h"
26
27#include <string>
28
29namespace RootGM {
30
31class Material : public virtual VGM::IMaterial
32{
33 public:
34 Material(const std::string& name, double density, VGM::IElement* element,
35 double radlen, double intlen);
36
37 Material(const std::string& name, double density, VGM::IElement* element,
38 double radlen, double intlen, VGM::MaterialState state, double temperature,
39 double pressure);
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(TGeoMaterial* material, const VGM::ElementVector& elements);
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 TGeoMaterial::EGeoMaterialState GetGeoState(VGM::MaterialState state) const;
82 VGM::MaterialState GetVGMState(TGeoMaterial::EGeoMaterialState state) const;
83
84 static const double fgkVacuumDensity;
85 static const double fgkVacuumTemperature;
86 static const double fgkVacuumPressure;
87
88 TGeoMaterial* fMaterial;
89 VGM::ElementVector fElements;
90};
91
92} // namespace RootGM
93
94#endif // ROOT_GM_MATERIAL_H
VGM implementation for Root material.
Definition Material.h:32
virtual double Density() const
Return the density in g/cm3.
Definition Material.cxx:434
virtual double NuclearInterLength() const
Return the nuclear interaction length in mm.
Definition Material.cxx:446
virtual double Temperature() const
Return the temperature in kelvins.
Definition Material.cxx:458
virtual std::string Name() const
Return the name of this element.
Definition Material.cxx:428
virtual double Pressure() const
Return the density in atmosphere.
Definition Material.cxx:464
virtual double RadiationLength() const
Return the radiation length in mm.
Definition Material.cxx:440
virtual ~Material()
Definition Material.cxx:362
virtual VGM::MaterialState State() const
Return the material state.
Definition Material.cxx:452
virtual VGM::IElement * Element(int iel) const
Return the i-th element constituing this material.
Definition Material.cxx:479
virtual double AtomCount(int iel) const
Return the atom count of the i-th element constituing this material.
Definition Material.cxx:498
virtual int NofElements() const
Return the number of elements constituing this material.
Definition Material.cxx:470
virtual double MassFraction(int iel) const
Return the mass fraction of the i-th element constituing this material.
Definition Material.cxx:487
The VGM interface to elements.
Definition IElement.h:34
The VGM interface to materials.
Definition IMaterial.h:44
VGM implementation for Root.
Definition axis.h:28
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