Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MatterDef.h
Go to the documentation of this file.
1#ifndef MATTER_DEF_H
2#define MATTER_DEF_H
3
5/*
6Definition of matter (material or any media).
7Only the basic information: the name, the notation,
8the atomic mixture, temperature, density, effective ionization potential.
9
10The principle of definitions of matters is the same as for atoms:
11a dictionary or a database. See details there. But the logbook is different,
12of course.
13
141998-2004 I. Smirnov
15*/
16
17namespace Heed {
18
19class MatterDef : public AtomMixDef {
20 String nameh;
21 String notationh;
22 double temperatureh;
23 double densityh;
24 double I_effh;
25 // I_eff is still not very reliable.
26 // There are too many approximations for this.
27 // Here is a simplest and probably not good.
28 void calc_I_eff(void);
29
30 public:
31 MatterDef(void);
32 MatterDef(const String& fname, const String& fnotation, long fqatom,
33 const DynLinArr<String>& fatom_not,
34 const DynLinArr<double>& fweight_quan, double fdensity,
35 double ftemperature);
36 MatterDef(const String& fname, const String& fnotation,
37 const String& fatom_not, double fdensity, double ftemperature);
38 MatterDef(const String& fname, const String& fnotation,
39 const String& fatom_not1, double fweight_quan1,
40 const String& fatom_not2, double fweight_quan2, double fdensity,
41 double ftemperature);
42 MatterDef(const String& fname, const String& fnotation,
43 const String& fatom_not1, double fweight_quan1,
44 const String& fatom_not2, double fweight_quan2,
45 const String& fatom_not3, double fweight_quan3, double fdensity,
46 double ftemperature);
47 ~MatterDef();
48 virtual void print(std::ostream& file, int l) const;
49 static void printall(std::ostream& file);
50 const String& name(void) const { return nameh; }
51 const String& notation(void) const { return notationh; }
52 double density(void) const { return densityh; }
53 double temperature(void) const { return temperatureh; }
54 double I_eff(void) const { return I_effh; }
55 // Check that there is no matter with the same name in the container
56 void verify(void);
57 static void verify(const String& fname, const String& fnotation);
58 // Initialize the logbook at the first request
59 // and keep it as internal static variable.
60 static AbsList<MatterDef*>& get_logbook(void);
61 static const AbsList<MatterDef*>& get_const_logbook(void);
62 // Return the adress of the matter with this notation if it is registered.
63 // Otherwise return NULL.
64 static MatterDef* get_MatterDef(const String& fnotation);
65
67};
68std::ostream& operator<<(std::ostream& file, const MatterDef& f);
69
71 public:
73 MatterType(void) : matdef() { ; }
74 MatterType(MatterDef* md) : matdef(md) { ; }
75};
76std::ostream& operator<<(std::ostream& file, const MatterType& f);
77
78}
79
80#endif
std::string String
Definition: String.h:75
static AbsList< MatterDef * > & get_logbook(void)
Definition: MatterDef.cpp:123
static MatterDef * get_MatterDef(const String &fnotation)
Definition: MatterDef.cpp:132
double I_eff(void) const
Definition: MatterDef.h:54
const String & notation(void) const
Definition: MatterDef.h:51
double density(void) const
Definition: MatterDef.h:52
virtual void print(std::ostream &file, int l) const
Definition: MatterDef.cpp:110
static const AbsList< MatterDef * > & get_const_logbook(void)
Definition: MatterDef.cpp:128
double temperature(void) const
Definition: MatterDef.h:53
const String & name(void) const
Definition: MatterDef.h:50
void verify(void)
Definition: MatterDef.cpp:78
macro_copy_total(MatterDef)
static void printall(std::ostream &file)
Definition: MatterDef.cpp:114
PassivePtr< MatterDef > matdef
Definition: MatterDef.h:72
MatterType(MatterDef *md)
Definition: MatterDef.h:74
MatterType(void)
Definition: MatterDef.h:73
Definition: BGMesh.cpp:3
std::ostream & operator<<(std::ostream &file, const BGMesh &bgm)
Definition: BGMesh.cpp:22