VGM Version 5.3
Loading...
Searching...
No Matches
IMaterial.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The VGM 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 VGM_I_MATERIAL_H
21#define VGM_I_MATERIAL_H
22
23#include <iostream>
24#include <string>
25#include <vector>
26
27namespace VGM {
28
29class IElement;
30
31typedef std::vector<IElement*> ElementVector;
32typedef std::vector<double> MassFractionVector;
33typedef std::vector<int> AtomCountVector;
34
42
44{
45 public:
46 virtual ~IMaterial() {}
47
48 // methods
51 virtual std::string Name() const = 0;
54 virtual double Density() const = 0;
57 virtual double RadiationLength() const = 0;
60 virtual double NuclearInterLength() const = 0;
63 virtual MaterialState State() const = 0;
66 virtual double Temperature() const = 0;
69 virtual double Pressure() const = 0;
73 virtual int NofElements() const = 0;
76 virtual IElement* Element(int iel) const = 0;
80 virtual double MassFraction(int iel) const = 0;
84 virtual double AtomCount(int iel) const = 0;
85};
86} // namespace VGM
87
88std::ostream& operator<<(std::ostream& out, const VGM::IMaterial& material);
89
90#endif // VGM_I_MATERIAL_H
std::ostream & operator<<(std::ostream &out, const VGM::IMaterial &material)
Definition material.cxx:23
The VGM interface to elements.
Definition IElement.h:34
The VGM interface to materials.
Definition IMaterial.h:44
virtual ~IMaterial()
Definition IMaterial.h:46
virtual double Pressure() const =0
Return the density in atmosphere.
virtual IElement * Element(int iel) const =0
Return the i-th element constituing this material.
virtual double NuclearInterLength() const =0
Return the nuclear interaction length in mm.
virtual double AtomCount(int iel) const =0
Return the atom count of the i-th element constituing this material.
virtual double Density() const =0
Return the density in g/cm3.
virtual double Temperature() const =0
Return the temperature in kelvins.
virtual std::string Name() const =0
Return the name of this element.
virtual double RadiationLength() const =0
Return the radiation length in mm.
virtual MaterialState State() const =0
Return the material state.
virtual double MassFraction(int iel) const =0
Return the mass fraction of the i-th element constituing this material.
virtual int NofElements() const =0
Return the number of elements constituing this material.
VGM interfaces.
Definition VMedium.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
@ kGas
Gas materila.
Definition IMaterial.h:40
@ kLiquid
Liquid material.
Definition IMaterial.h:39
@ kSolid
Solid material.
Definition IMaterial.h:38
@ kUndefined
Undefined material state.
Definition IMaterial.h:37