CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
SamplingGar.h
Go to the documentation of this file.
1#ifndef SAMPLINGGAR_H
2#define SAMPLINGGAR_H
3
6
7#include <vector>
8#include <string>
9
10#include "TF1.h"
11
12class G4Svc;
13
15public:
18
19 void init(ICgemGeomSvc* geomSvc, double magConfig);
20
21 void setIonElectrons(int layer, int nElectrons, std::vector<double> x, std::vector<double> y, std::vector<double> z, std::vector<double> t);
22
23 /* output info of multiplied eletrons */
24 int getNelectrons() const {return m_nMulElec;}
25 Float_t getX(int n) const {return m_eX[n];}
26 Float_t getY(int n) const {return m_eY[n];}
27 Float_t getZ(int n) const {return m_eZ[n];}
28 Float_t getT(int n) const {return m_eT[n];}
29 const std::vector<Float_t> & getXContainer() const {return m_eX;}
30 const std::vector<Float_t> & getYContainer() const {return m_eY;}
31 const std::vector<Float_t> & getZContainer() const {return m_eZ;}
32 const std::vector<Float_t> & getTContainer() const {return m_eT;}
33 void setDebugging(bool debugging) {m_debugging = debugging;}
34
35 void setGainMultiplier(vector<double> GainMultiplier)
36 {
37 m_GainMultiplier[0] = GainMultiplier[0];
38 m_GainMultiplier[1] = GainMultiplier[1];
39 m_GainMultiplier[2] = GainMultiplier[2];
40 }
41 void setTransMultiplier(double TransMultiplier) {m_TransMultiplier = TransMultiplier;}
42 void setDiffuMultiplier(double DiffuMultiplier) {m_DiffuMultiplier = DiffuMultiplier;}
43
44private:
45 void clear();
46
47 /* /\* region = 0,1,2,3 (drift/transfer1/transfer2/induction) *\/ */
48 /* void smearDrift(int layer, int region, double driftD, double& dphi, double& dz, double& dt) const; */
49
50 bool readSmearPar();
51 bool samplingDrift(int layer, double driftD, int idIon);
52 bool samplingTransfer(int layer, int region, int idLastStep); /* region = 1,2 (Transfer1/Transfer2) */
53 int samplingGain(int layer, int region); /* region = 0,1,2 (Drift/Transfer1/Transfer2 */
54 bool calMultiE(int layer);
55 /* void getDriftPar(int layer, int region, double driftD, double& meanPhi, double& sigmaPhi, */
56 /* double& meanZ, double& sigmaZ, double& meanT, double& sigmaT) const; */
57
58 bool m_debugging;
59
60 TF1* m_funPolya[3][3]; /* Polya functions */
61
62 ICgemGeomSvc* m_geomSvc;
63 double m_magConfig; /* magnetic field */
64
65 /* electrons from ionization in drift region */
66 int m_nIonE; /* number of electrons from ionization in drift region */
67 std::vector<Float_t> m_vecIonR;
68 std::vector<Float_t> m_vecIonPhi;
69 std::vector<Float_t> m_vecIonZ;
70 std::vector<Float_t> m_vecIonT;
71
72 /* electrons after gem foil1 */
73 int m_nEgem1;
74 std::vector<int> m_idIon;
75 std::vector<Float_t> m_vecGem1dX;
76 std::vector<Float_t> m_vecGem1dZ;
77 std::vector<Float_t> m_vecGem1dT;
78
79 /* electrons after gem foil2 */
80 int m_nEgem2;
81 std::vector<int> m_idGem1;
82 std::vector<Float_t> m_vecGem2dX;
83 std::vector<Float_t> m_vecGem2dZ;
84 std::vector<Float_t> m_vecGem2dT;
85
86 /* electrons after gem foil3 */
87 int m_nEgem3;
88 std::vector<int> m_idGem2;
89 std::vector<Float_t> m_vecGem3dX;
90 std::vector<Float_t> m_vecGem3dZ;
91 std::vector<Float_t> m_vecGem3dT;
92
93 /* info of multiplied electrons */
94 int m_nMulElec;
95 std::vector<Float_t> m_eX;
96 std::vector<Float_t> m_eY;
97 std::vector<Float_t> m_eZ;
98 std::vector<Float_t> m_eT;
99
100 /* gain of each gem foil */
101 double m_gain_gem[3][3];
102 double m_GainMultiplier[3];
103 double m_TransMultiplier;
104 double m_DiffuMultiplier;
105
106 /* smear parameters */
107 /* drift region & Gem-1 */
108 double m_meanXpar[2];
109 double m_sigmaXpar[4];
110 double m_meanZpar;
111 double m_sigmaZpar[4];
112 double m_meanTpar[2];
113 double m_sigmaTpar[4];
114 double m_transparency_gem1;
115
116 /* Transfer1/Gem2 & Transfer2/Gem3 */
117 double m_meanX_transf[2];
118 double m_sigmaX_transf[2];
119 double m_meanZ_transf[2];
120 double m_sigmaZ_transf[2];
121 double m_meanT_transf[2];
122 double m_sigmaT_transf[2];
123 double m_transparency_gem2;
124 double m_transparency_gem3;
125
126 /* Induction */
127 double m_meanX_induc;
128 double m_sigmaX_induc;
129 double m_meanZ_induc;
130 double m_sigmaZ_induc;
131 double m_meanT_induc;
132 double m_sigmaT_induc;
133
134};
135
136#endif
137
float Float_t
const Int_t n
Double_t x[10]
Definition G4Svc.h:32
int getNelectrons() const
Definition SamplingGar.h:24
void init(ICgemGeomSvc *geomSvc, double magConfig)
void setGainMultiplier(vector< double > GainMultiplier)
Definition SamplingGar.h:35
void setDiffuMultiplier(double DiffuMultiplier)
Definition SamplingGar.h:42
Float_t getZ(int n) const
Definition SamplingGar.h:27
void setIonElectrons(int layer, int nElectrons, std::vector< double > x, std::vector< double > y, std::vector< double > z, std::vector< double > t)
const std::vector< Float_t > & getXContainer() const
Definition SamplingGar.h:29
Float_t getT(int n) const
Definition SamplingGar.h:28
const std::vector< Float_t > & getTContainer() const
Definition SamplingGar.h:32
const std::vector< Float_t > & getYContainer() const
Definition SamplingGar.h:30
Float_t getY(int n) const
Definition SamplingGar.h:26
void setDebugging(bool debugging)
Definition SamplingGar.h:33
Float_t getX(int n) const
Definition SamplingGar.h:25
const std::vector< Float_t > & getZContainer() const
Definition SamplingGar.h:31
void setTransMultiplier(double TransMultiplier)
Definition SamplingGar.h:41
int t()
Definition t.c:1