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