VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
RootGM
include
RootGM
materials
MaterialFactory.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_FACTORY_H
21
#define ROOT_GM_MATERIAL_FACTORY_H
22
23
#include "
BaseVGM/materials/VMaterialFactory.h
"
24
25
class
TGeoElement;
26
class
TGeoMaterial;
27
class
TGeoMedium;
28
29
namespace
VGM
{
30
class
IMaterial
;
31
class
IIsotope
;
32
}
// namespace VGM
33
34
namespace
RootGM
{
35
36
class
MaterialFactory
:
public
BaseVGM::VMaterialFactory
37
{
38
public
:
39
MaterialFactory
();
40
virtual
~MaterialFactory
();
41
42
//
43
// methods
44
//
45
virtual
VGM::IIsotope
*
CreateIsotope
(
46
const
std::string& name,
int
z,
int
n,
double
a = 0.);
47
48
virtual
VGM::IElement
*
CreateElement
(
49
const
std::string& name,
const
std::string& symbol,
double
z,
double
a);
50
51
virtual
VGM::IElement
*
CreateElement
(
const
std::string& name,
52
const
std::string& symbol,
const
VGM::IsotopeVector
& isotopes,
53
const
VGM::RelAbundanceVector
& relAbundances);
54
55
virtual
VGM::IElement
*
CreateElement
(
int
z,
bool
isotopes);
56
57
virtual
VGM::IMaterial
*
CreateMaterial
(
const
std::string& name,
58
double
density,
VGM::IElement
* element,
double
radlen,
double
intlen);
59
60
virtual
VGM::IMaterial
*
CreateMaterial
(
const
std::string& name,
61
double
density,
VGM::IElement
* element,
double
radlen,
double
intlen,
62
VGM::MaterialState
state,
double
temperature,
double
pressure);
63
64
virtual
VGM::IMaterial
*
CreateMaterial
(
const
std::string& name,
65
double
density,
const
VGM::ElementVector
& elements,
66
const
VGM::MassFractionVector
& fractions);
67
68
virtual
VGM::IMaterial
*
CreateMaterial
(
const
std::string& name,
69
double
density,
const
VGM::ElementVector
& elements,
70
const
VGM::MassFractionVector
& fractions,
VGM::MaterialState
state,
71
double
temperature,
double
pressure);
72
73
virtual
VGM::IMaterial
*
CreateMaterial
(
const
std::string& name,
74
double
density,
const
VGM::ElementVector
& elements,
75
const
VGM::AtomCountVector
& atomCounts);
76
77
virtual
VGM::IMaterial
*
CreateMaterial
(
const
std::string& name,
78
double
density,
const
VGM::ElementVector
& elements,
79
const
VGM::AtomCountVector
& atomCounts,
VGM::MaterialState
state,
80
double
temperature,
double
pressure);
81
82
virtual
VGM::IMedium
*
CreateMedium
(
const
std::string& name,
int
mediumId,
83
VGM::IMaterial
* material,
int
nofParameters,
double
* parameters);
84
// import/export
85
//
86
virtual
bool
Import
();
87
88
protected
:
89
MaterialFactory
(
const
MaterialFactory
& rhs);
90
91
private
:
92
// methods
93
VGM::IIsotope
* GetIsotope(
double
z,
double
n)
const
;
94
VGM::IElement
* GetElement(
double
z,
double
a)
const
;
95
VGM::IElement
* GetElement(
const
std::string& name)
const
;
96
97
bool
CompareIsotopes(
const
TGeoElement* tgeoElement,
98
const
VGM::IsotopeVector
& isotopes,
99
const
VGM::RelAbundanceVector
& relAbundances)
const
;
100
101
void
ImportIsotopes(TGeoElement* element);
102
void
ImportElements(
103
TGeoMaterial* material, std::vector<VGM::IElement*>& elements);
104
void
ImportMaterial(TGeoMaterial* material);
105
void
ImportMedium(TGeoMedium* medium);
106
107
// data members
108
static
const
double
fgkTolerance;
109
};
110
111
}
// namespace RootGM
112
113
#endif
// ROOT_GM_MATERIAL_FACTORY_H
VMaterialFactory.h
BaseVGM::VMaterialFactory
The abstract base class to material factory.
Definition
VMaterialFactory.h:33
RootGM::MaterialFactory::CreateMaterial
virtual VGM::IMaterial * CreateMaterial(const std::string &name, double density, VGM::IElement *element, double radlen, double intlen)
Create a material.
Definition
MaterialFactory.cxx:409
RootGM::MaterialFactory::CreateElement
virtual VGM::IElement * CreateElement(const std::string &name, const std::string &symbol, double z, double a)
Create a chemical element.
Definition
MaterialFactory.cxx:330
RootGM::MaterialFactory::Import
virtual bool Import()
Import native materials.
Definition
MaterialFactory.cxx:507
RootGM::MaterialFactory::CreateIsotope
virtual VGM::IIsotope * CreateIsotope(const std::string &name, int z, int n, double a=0.)
Create a chemical isotope.
Definition
MaterialFactory.cxx:302
RootGM::MaterialFactory::MaterialFactory
MaterialFactory()
Definition
MaterialFactory.cxx:44
RootGM::MaterialFactory::~MaterialFactory
virtual ~MaterialFactory()
Definition
MaterialFactory.cxx:61
RootGM::MaterialFactory::CreateMedium
virtual VGM::IMedium * CreateMedium(const std::string &name, int mediumId, VGM::IMaterial *material, int nofParameters, double *parameters)
Create a tracking medium.
Definition
MaterialFactory.cxx:494
VGM::IElement
The VGM interface to elements.
Definition
IElement.h:34
VGM::IIsotope
The VGM interface to elements.
Definition
IIsotope.h:28
VGM::IMaterial
The VGM interface to materials.
Definition
IMaterial.h:44
VGM::IMedium
The VGM interface to tracking medium.
Definition
IMedium.h:31
RootGM
VGM implementation for Root.
Definition
axis.h:28
VGM
VGM interfaces.
Definition
VMedium.h:28
VGM::RelAbundanceVector
std::vector< double > RelAbundanceVector
Definition
IElement.h:31
VGM::AtomCountVector
std::vector< int > AtomCountVector
Definition
IMaterial.h:33
VGM::MassFractionVector
std::vector< double > MassFractionVector
Definition
IMaterial.h:32
VGM::ElementVector
std::vector< IElement * > ElementVector
Definition
IMaterial.h:31
VGM::IsotopeVector
std::vector< IIsotope * > IsotopeVector
Definition
IElement.h:30
VGM::MaterialState
MaterialState
Definition
IMaterial.h:36
Generated on
for VGM by
1.17.0