BmnRoot
Loading...
Searching...
No Matches
BmnGemGas.h
Go to the documentation of this file.
1#ifndef BMNGEMGAS_HH
2#define BMNGEMGAS_HH
3
4#include <assert.h>
5#include <ostream>
6#include <vector>
7#include <string>
8
10
11class BmnGemGas {
12public:
13 // constructors
14 BmnGemGas();
15 ~BmnGemGas();
16
17 BmnGemGas(double const E,
18 double const B,
19 double const T,
20 double const p,
21 double const VDrift,
22 double const Dl,
23 double const Dt,
24 double const k,
25 double const W,
26 const std::vector<double>& CSD,
27 double const CSDEpol);
28
29 BmnGemGas(const std::string& Filename,
30 double const E);
31
32 // accessors
33 double VDrift() const {return _VDrift;}
34 double Dl() const {return _Dl;}
35 double Dt() const {return _Dt;}
36 double VDrift(double const dE, double const dB) const {return _VDrift;}
37 double Dl(double const dE, double const dB) const {return _Dl;}
38 double Dt(double const dE, double const dB) const {return _Dt;}
39 double k() const {return _k;}
40 double W() const {return _W;}
41 double CSD(int i) const {return _CSD.at(i);}
42 const std::vector<double>& CSD() const {return _CSD;}
43 int nCSD() const {return _CSD.size();}
44 double CSDNorm() const {return _CSDNorm;}
45 double CSDEpol() const {return _CSDEpol;}
46
47 double E() const {return _E;}
48 double B() const {return _B;}
49 double T() const {return _T;}
50 double p() const {return _p;}
51
52 int GetRandomCS(double const r) const; //has problem with not normalized table
53 int GetRandomCSUniform() const;
54
55 void PrintAll(std::ostream& s) const {s<<*this;}
56
57 void operator=(const BmnGemGas& GasToCopy);
58 friend std::ostream& operator<< (std::ostream&, const BmnGemGas&);
59
60 // modifiers
61 void SetE(double const dE){_E=dE;} // later this method should also retrieve
62 // updated gas values for the new field!
63 void SetB(double const dB){_B=dB;}
64 void SetT(double const dT){_T=dT;}
65 void Setp(double const dp){_p=dp;}
66 void SetCSD(const std::vector<double>& CSD);
67 void SetCSDEpol(double const dCSDEpol){_CSDEpol=dCSDEpol;}
68
69private:
70 double _E; // electric field [V/cm](some gas parameters depend on it)
71 double _B; // B field [T] assumption: B || E !!!
72 double _T; // Temperature [K]
73 double _p; // pressure [mbar]
74
75 double _VDrift; // electron Drift velocity [cm/ns]
76 double _Dl; // longitudinal diffusion coefficient [sqrt(cm)]
77 double _Dt; // transversal diffusion coefficient [sqrt(cm)]
78 double _k; // attachment coefficient[1/cm]
79 double _W; // effective ionisation energy [eV]
80 std::vector<double> _CSD; // Cluster size distribution
81 double _CSDNorm; // Intergral of CSD must be 1 but actually not. Used for correction.
82 double _CSDEpol; // Constant used for the inverse quadratic extrapolation
83 // of Cluster Sizes bigger than _nCSD
84
85 const double LinExpolation(double const inTable, const double* const table,
86 int const nTable);
87 int ReadGasBegin(std::ifstream* const pinfile);
88 int ReadGasArrays(std::ifstream* const pinfile, int const noent,
89 double* const e, double* const vdrift, double* const dt,
90 double* const dl, double* const k);
91 const double GetPositionOfE(int const noent, const double* const e);
92
93
94};
95
96#endif
int i
Definition P4_F32vec4.h:22
double CSDEpol() const
Definition BmnGemGas.h:45
double Dl(double const dE, double const dB) const
Definition BmnGemGas.h:37
double k() const
Definition BmnGemGas.h:39
double Dt(double const dE, double const dB) const
Definition BmnGemGas.h:38
double W() const
Definition BmnGemGas.h:40
void PrintAll(std::ostream &s) const
Definition BmnGemGas.h:55
void SetB(double const dB)
Definition BmnGemGas.h:63
double B() const
Definition BmnGemGas.h:48
void Setp(double const dp)
Definition BmnGemGas.h:65
int GetRandomCS(double const r) const
double CSDNorm() const
Definition BmnGemGas.h:44
double Dt() const
Definition BmnGemGas.h:35
void SetCSDEpol(double const dCSDEpol)
Definition BmnGemGas.h:67
void SetT(double const dT)
Definition BmnGemGas.h:64
void operator=(const BmnGemGas &GasToCopy)
friend std::ostream & operator<<(std::ostream &, const BmnGemGas &)
const std::vector< double > & CSD() const
Definition BmnGemGas.h:42
void SetE(double const dE)
Definition BmnGemGas.h:61
int nCSD() const
Definition BmnGemGas.h:43
int GetRandomCSUniform() const
double VDrift() const
Definition BmnGemGas.h:33
double p() const
Definition BmnGemGas.h:50
double T() const
Definition BmnGemGas.h:49
double VDrift(double const dE, double const dB) const
Definition BmnGemGas.h:36
double CSD(int i) const
Definition BmnGemGas.h:41
void SetCSD(const std::vector< double > &CSD)
double E() const
Definition BmnGemGas.h:47
double Dl() const
Definition BmnGemGas.h:34
gascomponents
Definition BmnGemGas.h:9
@ Ne
Definition BmnGemGas.h:9
@ Ar
Definition BmnGemGas.h:9
@ CO2
Definition BmnGemGas.h:9
@ CH4
Definition BmnGemGas.h:9