CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
SamplingGTS.h
Go to the documentation of this file.
1#ifndef SAMPLINGGTS_H
2#define SAMPLINGGTS_H
3
7
8#include <vector>
9#include <string>
10
11#include "TFile.h"
12#include "TH1F.h"
13#include "TH2F.h"
14#include "TNtuple.h"
15
16#define m_testing_sam false
17
18
19class G4Svc;
20
22public:
25
26 void init(ICgemGeomSvc* geomSvc, double magConfig);
27
28 void setIonElectrons(int layer, int nElectrons, std::vector<double> x, std::vector<double> y, std::vector<double> z, std::vector<double> t);
29
30 /* output info of multiplied eletrons */
31 int getNelectrons() const {return m_nMulElec;}
32 Float_t getX(int n) const {return m_eX[n];}
33 Float_t getY(int n) const {return m_eY[n];}
34 Float_t getZ(int n) const {return m_eZ[n];}
35 Float_t getT(int n) const {return m_eT[n];}
36
37 const std::vector<Float_t> & getXContainer() const {return m_eX;}
38 const std::vector<Float_t> & getYContainer() const {return m_eY;}
39 const std::vector<Float_t> & getZContainer() const {return m_eZ;}
40 const std::vector<Float_t> & getTContainer() const {return m_eT;}
41
42 void setDebugging(bool debugging) {m_debugging = debugging;}
43
44 // --------------------------------
45 // CHECK 11) per ora li metto hard coded
46 bool readGemParameters();
47 bool readGasParameters();
48
49 bool is_survived();
50 double compute_gain();
51 void compute_diffusion_on_GEM3(double xi, double yi, double zi, double ti, double &xf, double &yf, double &zf, double &tf);
52
54
55private:
56 void clear();
57
58 bool m_debugging;
59 int m_hv;
60 bool m_field;
61 double m_tuning_factor_gain;
62 double m_tuning_factor_diff_perp;
63 double m_tuning_factor_diff_paral;
64
65 double m_eff_col[3]; // efficiency of collection
66 double m_eff_ext[3]; // efficiency of extraction
67 TH1F *h_gain_eff;
68
69 ICgemGeomSvc* m_geomSvc;
70 double m_magConfig; /* magnetic field */
71 // x_local
72 int n_shift_x_drift;
73 double m_shift_x_drift_par[10];
74 double m_shift_x_transf_par;
75 double m_shift_x_induct_par;
76 int n_sigma_x_drift;
77 double m_sigma_x_drift_par[10];
78 double m_sigma_x_transf_par;
79 double m_sigma_x_induct_par;
80 // y_local only diffusion, no field
81 int n_sigma_y_drift;
82 double m_sigma_y_drift_par[10];
83 double m_sigma_y_transf_par;
84 double m_sigma_y_induct_par;
85 // t
86 int n_shift_t_drift;
87 double m_shift_t_drift_par[10];
88 double m_shift_t_transf_par;
89 double m_shift_t_induct_par;
90 int n_sigma_t_drift;
91 double m_sigma_t_drift_par[10];
92 double m_sigma_t_transf_par;
93 double m_sigma_t_induct_par;
94
95 /* info of multiplied electrons */
96 int m_nMulElec;
97 std::vector<Float_t> m_eX;
98 std::vector<Float_t> m_eY;
99 std::vector<Float_t> m_eZ;
100 std::vector<Float_t> m_eT;
101
102 TFile *output;
103 TNtuple *tree;
104
105
106};
107
108#endif
109
float Float_t
const Int_t n
Double_t x[10]
Definition: G4Svc.h:32
Float_t getT(int n) const
Definition: SamplingGTS.h:35
bool readGemParameters()
const std::vector< Float_t > & getTContainer() const
Definition: SamplingGTS.h:40
void setDebugging(bool debugging)
Definition: SamplingGTS.h:42
Float_t getY(int n) const
Definition: SamplingGTS.h:33
void init(ICgemGeomSvc *geomSvc, double magConfig)
Definition: SamplingGTS.cxx:43
void compute_diffusion_on_GEM3(double xi, double yi, double zi, double ti, double &xf, double &yf, double &zf, double &tf)
void setIonElectrons(int layer, int nElectrons, std::vector< double > x, std::vector< double > y, std::vector< double > z, std::vector< double > t)
double compute_gain()
bool is_survived()
int getNelectrons() const
Definition: SamplingGTS.h:31
Float_t getX(int n) const
Definition: SamplingGTS.h:32
bool readGasParameters()
DiffusionGTS * diffusion
Definition: SamplingGTS.h:53
const std::vector< Float_t > & getXContainer() const
Definition: SamplingGTS.h:37
const std::vector< Float_t > & getYContainer() const
Definition: SamplingGTS.h:38
Float_t getZ(int n) const
Definition: SamplingGTS.h:34
const std::vector< Float_t > & getZContainer() const
Definition: SamplingGTS.h:39
int t()
Definition: t.c:1