MarlinTPC  1.2.0
TPCGas.h
1 #ifndef TPCGAS_H
2 #define TPCGAS_H 1
3 
4 #include <string>
5 
6 namespace marlintpc
7 {
8 
9  class TPCGas;
10 
18  class TPCGas
19  {
20  public:
22  TPCGas(std::string gasname);
24  ~TPCGas();
26  void SetEField(double EField){_EField=EField;}
27  double GetEField(){return _EField;}
29  void SetBField(double BField){_BField=BField;}
30  double GetBField(){return _BField;}
32  double GetDriftVelocity(){return _vdrift;}
34  double GetTransverseDiffusion(){return _diffTrans;}
36  double GetLongitudinalDiffusion(){return _diffLong;}
38  double GetAttachment(double EField, double dist);
41  std::string GetGasName(){return _gasName;}
42 
43  protected:
44  void CalculateTransverseDiffusion();
46  double EvaluateEFieldDependence(double a, double b ,double c, double d,
47  double e, double f, double g, double h,
48  double i, double j, double k);
50  double EvaluateBFieldDependence(double a, double b, double c, double d,double e, double f);
51 
52  void initTDRGas();
53  void initP5Gas();
54  void initP10Gas();
55  void initT2KGas();
56 
57  double _BField;
58  double _EField;
59  double _vdrift;
60  double _diffLong;
61  double _diffTrans;
62  double _attachment;
63 
65  double _dL_params[11];
67  double _vd_params[11];
69  double _dT_params[10][6];
71  double _att[7];
72 
73  std::string _gasName;
74 
75  };
76 
77 } //namespace marlintpc
78 
79 #endif // TPCGAS_H
double _dT_params[10][6]
container for the parametrisation of transverse diffusion
Definition: TPCGas.h:69
double _dL_params[11]
container for the parametrisation of longitudinal diffusion
Definition: TPCGas.h:65
TPCGas(std::string gasname)
Constructor, gases are identified by names, e.g. "TDR","P5".
Definition: TPCGas.cc:7
The TPCGas is a helper class containing a parametrisation of some gas mixtures It can be used by proc...
Definition: TPCGas.h:18
~TPCGas()
Destructor.
double GetTransverseDiffusion()
returns transverse diffusion in [um/sqrt(cm)]
Definition: TPCGas.h:34
double GetAttachment(double EField, double dist)
calculate attachment over a given distance in cm
Definition: TPCGas.cc:91
double GetDriftVelocity()
returns the drift velocity in [mm/us]
Definition: TPCGas.h:32
double GetLongitudinalDiffusion()
returns longitudinal diffusion in [um/sqrt(cm)]
Definition: TPCGas.h:36
double EvaluateBFieldDependence(double a, double b, double c, double d, double e, double f)
used for transverse diffusion dependence on magnetic field
Definition: TPCGas.cc:85
void CalculateGasParameters()
After name, E and B field are set call this function to calcuate the gas parameters.
Definition: TPCGas.cc:24
double _att[7]
container for parametrisation of attachment
Definition: TPCGas.h:71
double EvaluateEFieldDependence(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j, double k)
used for v drift and diffusion and all gases, just the parameters change
Definition: TPCGas.cc:73
void SetEField(double EField)
Set the electric field, if field is changed call the CalculateGasParameters method again to obtain ne...
Definition: TPCGas.h:26
double _vd_params[11]
container for the parametrisation of drift velocity
Definition: TPCGas.h:67
void SetBField(double BField)
Set the magnetic field, if field is changed call the CalculateGasParameters method again to obtain ne...
Definition: TPCGas.h:29