Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Heed::MatterDef Class Reference

#include <MatterDef.h>

+ Inheritance diagram for Heed::MatterDef:

Public Member Functions

 MatterDef (void)
 
 MatterDef (const String &fname, const String &fnotation, long fqatom, const DynLinArr< String > &fatom_not, const DynLinArr< double > &fweight_quan, double fdensity, double ftemperature)
 
 MatterDef (const String &fname, const String &fnotation, const String &fatom_not, double fdensity, double ftemperature)
 
 MatterDef (const String &fname, const String &fnotation, const String &fatom_not1, double fweight_quan1, const String &fatom_not2, double fweight_quan2, double fdensity, double ftemperature)
 
 MatterDef (const String &fname, const String &fnotation, const String &fatom_not1, double fweight_quan1, const String &fatom_not2, double fweight_quan2, const String &fatom_not3, double fweight_quan3, double fdensity, double ftemperature)
 
 ~MatterDef ()
 
virtual void print (std::ostream &file, int l) const
 
const Stringname (void) const
 
const Stringnotation (void) const
 
double density (void) const
 
double temperature (void) const
 
double I_eff (void) const
 
void verify (void)
 
 macro_copy_total (MatterDef)
 
- Public Member Functions inherited from Heed::AtomMixDef
 AtomMixDef (void)
 
 AtomMixDef (long fqatom, const DynLinArr< String > &fatom_not, const DynLinArr< double > &fweight_quan)
 
 AtomMixDef (long fqatom, const DynLinArr< String > &fatom_not, const DynLinArr< long > &fweight_quan)
 
 AtomMixDef (const String &fatom_not)
 
 AtomMixDef (const String &fatom_not1, double fweight_quan1, const String &fatom_not2, double fweight_quan2)
 
 AtomMixDef (const String &fatom_not1, double fweight_quan1, const String &fatom_not2, double fweight_quan2, const String &fatom_not3, double fweight_quan3)
 
 AtomMixDef (const String &fatom_not1, double fweight_quan1, const String &fatom_not2, double fweight_quan2, const String &fatom_not3, double fweight_quan3, const String &fatom_not4, double fweight_quan4)
 
void print (std::ostream &file, int l) const
 
long qatom (void) const
 
const DynLinArr< PassivePtr< AtomDef > > & atom (void) const
 
PassivePtr< AtomDefatom (long n) const
 
const DynLinArr< double > & weight_quan (void) const
 
const DynLinArr< double > & weight_mass (void) const
 
double weight_quan (long n) const
 
double weight_mass (long n) const
 
double Z_mean (void) const
 
double A_mean (void) const
 
double inv_A_mean (void) const
 
double mean_ratio_Z_to_A (void) const
 
double NumberOfElectronsInGram (void) const
 

Static Public Member Functions

static void printall (std::ostream &file)
 
static void verify (const String &fname, const String &fnotation)
 
static AbsList< MatterDef * > & get_logbook (void)
 
static const AbsList< MatterDef * > & get_const_logbook (void)
 
static MatterDefget_MatterDef (const String &fnotation)
 

Detailed Description

Definition at line 19 of file MatterDef.h.

Constructor & Destructor Documentation

◆ MatterDef() [1/5]

Heed::MatterDef::MatterDef ( void  )

Definition at line 13 of file MatterDef.cpp.

13 : nameh("none"), notationh("none") {
14 MatterDef::get_logbook().append(this);
15}
static AbsList< MatterDef * > & get_logbook(void)
Definition: MatterDef.cpp:123

Referenced by Heed::GasDef::GasDef().

◆ MatterDef() [2/5]

Heed::MatterDef::MatterDef ( const String fname,
const String fnotation,
long  fqatom,
const DynLinArr< String > &  fatom_not,
const DynLinArr< double > &  fweight_quan,
double  fdensity,
double  ftemperature 
)

Definition at line 17 of file MatterDef.cpp.

21 : AtomMixDef(fqatom, fatom_not, fweight_quan),
22 nameh(fname),
23 notationh(fnotation),
24 temperatureh(ftemperature),
25 densityh(fdensity) {
26 mfunname("MatterDef::MatterDef(...many atoms...)");
27 calc_I_eff();
28 verify();
29 MatterDef::get_logbook().append(this);
30}
#define mfunname(string)
Definition: FunNameStack.h:67
AtomMixDef(void)
Definition: AtomDef.h:118
void verify(void)
Definition: MatterDef.cpp:78

◆ MatterDef() [3/5]

Heed::MatterDef::MatterDef ( const String fname,
const String fnotation,
const String fatom_not,
double  fdensity,
double  ftemperature 
)

Definition at line 32 of file MatterDef.cpp.

35 : AtomMixDef(fatom_not),
36 nameh(fname),
37 notationh(fnotation),
38 temperatureh(ftemperature),
39 densityh(fdensity) {
40 mfunname("MatterDef::MatterDef(...1 atom...)");
41 calc_I_eff();
42 verify();
43 MatterDef::get_logbook().append(this);
44}

◆ MatterDef() [4/5]

Heed::MatterDef::MatterDef ( const String fname,
const String fnotation,
const String fatom_not1,
double  fweight_quan1,
const String fatom_not2,
double  fweight_quan2,
double  fdensity,
double  ftemperature 
)

Definition at line 46 of file MatterDef.cpp.

50 : AtomMixDef(fatom_not1, fweight_quan1, fatom_not2, fweight_quan2),
51 nameh(fname),
52 notationh(fnotation),
53 temperatureh(ftemperature),
54 densityh(fdensity) {
55 mfunname("MatterDef::MatterDef(...2 atoms...)");
56 calc_I_eff();
57 verify();
58 MatterDef::get_logbook().append(this);
59}

◆ MatterDef() [5/5]

Heed::MatterDef::MatterDef ( const String fname,
const String fnotation,
const String fatom_not1,
double  fweight_quan1,
const String fatom_not2,
double  fweight_quan2,
const String fatom_not3,
double  fweight_quan3,
double  fdensity,
double  ftemperature 
)

Definition at line 61 of file MatterDef.cpp.

66 : AtomMixDef(fatom_not1, fweight_quan1, fatom_not2, fweight_quan2,
67 fatom_not3, fweight_quan3),
68 nameh(fname),
69 notationh(fnotation),
70 temperatureh(ftemperature),
71 densityh(fdensity) {
72 mfunname("MatterDef::MatterDef(...2 atoms...)");
73 calc_I_eff();
74 verify();
75 MatterDef::get_logbook().append(this);
76}

◆ ~MatterDef()

Heed::MatterDef::~MatterDef ( )

Definition at line 166 of file MatterDef.cpp.

166{ MatterDef::get_logbook().remove(this); }

Member Function Documentation

◆ density()

double Heed::MatterDef::density ( void  ) const
inline

Definition at line 52 of file MatterDef.h.

52{ return densityh; }

Referenced by Heed::eiparticle::Bethe_Bloch_en_loss(), and Heed::operator<<().

◆ get_const_logbook()

const AbsList< MatterDef * > & Heed::MatterDef::get_const_logbook ( void  )
static

Definition at line 128 of file MatterDef.cpp.

128 {
129 return MatterDef::get_logbook();
130}

◆ get_logbook()

AbsList< MatterDef * > & Heed::MatterDef::get_logbook ( void  )
static

Definition at line 123 of file MatterDef.cpp.

123 {
124 static AbsList<MatterDef*> logbook;
125 return logbook;
126}

Referenced by get_const_logbook(), get_MatterDef(), MatterDef(), printall(), verify(), and ~MatterDef().

◆ get_MatterDef()

MatterDef * Heed::MatterDef::get_MatterDef ( const String fnotation)
static

Definition at line 132 of file MatterDef.cpp.

132 {
135 while ((an = logbook.get_next_node(an)) != NULL) {
136 if (an->el->notation() == fnotation) return an->el;
137 }
138 return NULL;
139}
AbsListNode< T > * get_next_node(AbsListNode< T > *an) const
Definition: AbsList.h:175

Referenced by Heed::HeedMatterDef::HeedMatterDef().

◆ I_eff()

double Heed::MatterDef::I_eff ( void  ) const
inline

Definition at line 54 of file MatterDef.h.

54{ return I_effh; }

Referenced by Heed::eiparticle::Bethe_Bloch_en_loss(), and Heed::operator<<().

◆ macro_copy_total()

Heed::MatterDef::macro_copy_total ( MatterDef  )

◆ name()

const String & Heed::MatterDef::name ( void  ) const
inline

Definition at line 50 of file MatterDef.h.

50{ return nameh; }

Referenced by Heed::operator<<().

◆ notation()

const String & Heed::MatterDef::notation ( void  ) const
inline

Definition at line 51 of file MatterDef.h.

51{ return notationh; }

Referenced by Heed::operator<<().

◆ print()

void Heed::MatterDef::print ( std::ostream &  file,
int  l 
) const
virtual

Reimplemented in Heed::GasDef.

Definition at line 110 of file MatterDef.cpp.

110 {
111 if (l > 0) file << (*this);
112}

◆ printall()

void Heed::MatterDef::printall ( std::ostream &  file)
static

Definition at line 114 of file MatterDef.cpp.

114 {
115 Ifile << "MatterDef::printall:\n";
118 while ((an = logbook.get_next_node(an)) != NULL) {
119 an->el->print(file, 1);
120 }
121}
#define Ifile
Definition: prstream.h:207

◆ temperature()

double Heed::MatterDef::temperature ( void  ) const
inline

Definition at line 53 of file MatterDef.h.

53{ return temperatureh; }

Referenced by Heed::operator<<().

◆ verify() [1/2]

void Heed::MatterDef::verify ( const String fname,
const String fnotation 
)
static

Definition at line 94 of file MatterDef.cpp.

94 {
96 "void MatterDef::verify(const String& fname, const String& fnotation)");
99 while ((an = logbook.get_next_node(an)) != NULL) {
100 if (an->el->nameh == fname || an->el->notationh == fnotation) {
101 funnw.ehdr(mcerr);
102 mcerr << "cannot initialize two matters "
103 << "with the same name or notation\n";
104 mcerr << "name=" << fname << " notation=" << fnotation << '\n';
105 spexit(mcerr);
106 }
107 }
108}
#define mfunnamep(string)
Definition: FunNameStack.h:77
#define spexit(stream)
Definition: FunNameStack.h:536
#define mcerr
Definition: prstream.h:135

◆ verify() [2/2]

void Heed::MatterDef::verify ( void  )

Definition at line 78 of file MatterDef.cpp.

78 {
79 mfunnamep("void MatterDef::verify(void)");
80 if (nameh == "none" && notationh == "none") return;
83 while ((an = logbook.get_next_node(an)) != NULL) {
84 if (an->el->nameh == nameh || an->el->notationh == notationh) {
85 funnw.ehdr(mcerr);
86 mcerr << "cannot initialize two matters "
87 << "with the same name or notation\n";
88 mcerr << "name=" << nameh << " notation=" << notationh << '\n';
90 }
91 }
92}

Referenced by Heed::GasDef::GasDef(), and MatterDef().


The documentation for this class was generated from the following files: