CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
DiffusionGTS Class Reference

#include <DiffusionGTS.h>

Public Member Functions

 DiffusionGTS (ICgemGeomSvc *geomSvc)
 
 ~DiffusionGTS ()
 
void readGasPerpParameters (std::string fileName)
 
void readGasParalParameters (std::string fileName)
 
double shift_x_drift (double z)
 
double shift_x_transf ()
 
double shift_x_induct ()
 
double sigma_x_drift (double z)
 
double sigma_x_transf ()
 
double sigma_x_induct ()
 
double shift_y_drift (double z)
 
double shift_y_transf ()
 
double shift_y_induct ()
 
double sigma_y_drift (double z)
 
double sigma_y_transf ()
 
double sigma_y_induct ()
 
double shift_t_drift (double z)
 
double shift_t_transf ()
 
double shift_t_induct ()
 
double sigma_t_drift (double z)
 
double sigma_t_transf ()
 
double sigma_t_induct ()
 
void diffusion_drift (double xi, double yi, double zi, double ti, double &xf, double &yf, double &zf, double &tf)
 
void diffusion_transf (double xi, double yi, double zi, double ti, double &xf, double &yf, double &zf, double &tf)
 
void diffusion_induct (double xi, double yi, double zi, double ti, double &xf, double &yf, double &zf, double &tf)
 

Detailed Description

Definition at line 7 of file DiffusionGTS.h.

Constructor & Destructor Documentation

◆ DiffusionGTS()

DiffusionGTS::DiffusionGTS ( ICgemGeomSvc geomSvc)

Definition at line 14 of file DiffusionGTS.cxx.

14 {
15 m_geomSvc = geomSvc;
16}

◆ ~DiffusionGTS()

DiffusionGTS::~DiffusionGTS ( )

Definition at line 17 of file DiffusionGTS.cxx.

17{}

Member Function Documentation

◆ diffusion_drift()

void DiffusionGTS::diffusion_drift ( double  xi,
double  yi,
double  zi,
double  ti,
double &  xf,
double &  yf,
double &  zf,
double &  tf 
)

Definition at line 302 of file DiffusionGTS.cxx.

302 {
303
304 // x
305 double dx = shift_x_drift(zi);
306 double sx = sigma_x_drift(zi);
307 xf = xi + gRandom->Gaus(dx, sx);
308
309 // y
310 double dy = shift_y_drift(zi);
311 double sy = sigma_y_drift(zi);
312 yf = yi + gRandom->Gaus(dy, sy);
313
314 // t
315 double dt = shift_t_drift(zi);
316 double st = sigma_t_drift(zi);
317 tf = ti + gRandom->Gaus(dt, st);
318}
TGraphErrors * dt
Definition: AbsCor.cxx:72
double sigma_t_drift(double z)
double sigma_x_drift(double z)
double shift_t_drift(double z)
double shift_y_drift(double z)
double sigma_y_drift(double z)
double shift_x_drift(double z)

◆ diffusion_induct()

void DiffusionGTS::diffusion_induct ( double  xi,
double  yi,
double  zi,
double  ti,
double &  xf,
double &  yf,
double &  zf,
double &  tf 
)

Definition at line 339 of file DiffusionGTS.cxx.

339 {
340
341 // x
342 double dx = shift_x_induct();
343 double sx = sigma_x_induct();
344 xf = xi + gRandom->Gaus(dx, sx);
345
346 // y
347 double dy = shift_y_induct();
348 double sy = sigma_y_induct();
349 yf = yi + gRandom->Gaus(dy, sy);
350
351 // t
352 double dt = shift_t_induct();
353 double st = sigma_t_induct();
354 tf = ti + gRandom->Gaus(dt, st);
355
356}
double sigma_x_induct()
double shift_y_induct()
double shift_x_induct()
double shift_t_induct()
double sigma_y_induct()
double sigma_t_induct()

◆ diffusion_transf()

void DiffusionGTS::diffusion_transf ( double  xi,
double  yi,
double  zi,
double  ti,
double &  xf,
double &  yf,
double &  zf,
double &  tf 
)

Definition at line 320 of file DiffusionGTS.cxx.

320 {
321
322 // x
323 double dx = shift_x_transf();
324 double sx = sigma_x_transf();
325 xf = xi + gRandom->Gaus(dx, sx);
326
327 // y
328 double dy = shift_y_transf();
329 double sy = sigma_y_transf();
330 yf = yi + gRandom->Gaus(dy, sy);
331
332 // t
333 double dt = shift_t_transf();
334 double st = sigma_t_transf();
335 tf = ti + gRandom->Gaus(dt, st);
336}
double sigma_t_transf()
double sigma_x_transf()
double sigma_y_transf()
double shift_t_transf()
double shift_y_transf()
double shift_x_transf()

◆ readGasParalParameters()

void DiffusionGTS::readGasParalParameters ( std::string  fileName)

Definition at line 112 of file DiffusionGTS.cxx.

112 {
113
114 ifstream fin(fileName.c_str(), ios::in);
115
116 string strline;
117 string strpar;
118 if( ! fin.is_open() ){
119 std::cout << "DiffusionGTS::readGasParalParameters ERROR: can not open file " << fileName.c_str() << endl;
120 }
121 while(fin >> strpar){
122 if(strpar[0] == '#'){
123 getline(fin, strline);
124 }
125 else if(strpar == "n_shift_x_drift"){
126 fin >> n_shift_y_drift;
127 }
128 else if(strpar == "shift_x_drift_par"){
129 for(int i=0; i<n_shift_y_drift; i++) fin >> m_shift_y_drift_par[i];
130 }
131 else if(strpar == "n_sigma_x_drift"){
132 fin >> n_sigma_y_drift;
133 }
134 else if(strpar == "sigma_x_drift_par"){
135 for(int i=0; i<n_sigma_y_drift; i++) fin >> m_sigma_y_drift_par[i];
136 }
137 else if(strpar == "shift_x_transf_par"){
138 fin >> m_shift_y_transf_par;
139 }
140 else if(strpar == "sigma_x_transf_par"){
141 fin >> m_sigma_y_transf_par;
142 }
143 else if(strpar == "shift_x_induct_par"){
144 fin >> m_shift_y_induct_par;
145 }
146 else if(strpar == "sigma_x_induct_par"){
147 fin >> m_sigma_y_induct_par;
148 }
149 else break;
150 }
151
152
153 std::cout << "DiffusionGTS::readGasParalParameters: open file " << fileName.c_str() << endl;
154
155 cout << "shift y in drift";
156 for(int i=0; i<n_shift_y_drift; i++) cout << " " << m_shift_y_drift_par[i];
157 cout << endl;
158 cout << "sigma y in drift";
159 for(int i=0; i<n_sigma_y_drift; i++) cout << " " << m_sigma_y_drift_par[i];
160 cout << endl;
161 cout << "shift y in transf " << m_shift_y_transf_par << endl;
162 cout << "sigma y in transf " << m_sigma_y_transf_par << endl;
163 cout << "shift y in induct " << m_shift_y_induct_par << endl;
164 cout << "sigma y in induct " << m_sigma_y_induct_par << endl;
165
166 cout << "shift t in drift";
167 // cout << n_shift_t_drift << endl;
168 for(int i=0; i<n_shift_t_drift; i++) cout << " " << m_shift_t_drift_par[i];
169 cout << endl;
170
171}
std::ifstream ifstream
Definition: bpkt_streams.h:44

Referenced by InductionGTS::init(), and SamplingGTS::readGasParameters().

◆ readGasPerpParameters()

void DiffusionGTS::readGasPerpParameters ( std::string  fileName)

Definition at line 19 of file DiffusionGTS.cxx.

19 {
20
21 ifstream fin(fileName.c_str(), ios::in);
22
23 string strline;
24 string strpar;
25 if( ! fin.is_open() ){
26 std::cout << "DiffusionGTS::readGasPerpParameters ERROR: can not open file " << fileName.c_str() << endl;
27 }
28 while(fin >> strpar){
29 if(strpar[0] == '#'){
30 getline(fin, strline);
31 }
32 else if(strpar == "n_shift_x_drift"){
33 fin >> n_shift_x_drift;
34 }
35 else if(strpar == "shift_x_drift_par"){
36 for(int i=0; i<n_shift_x_drift; i++) fin >> m_shift_x_drift_par[i];
37 }
38 else if(strpar == "n_sigma_x_drift"){
39 fin >> n_sigma_x_drift;
40 }
41 else if(strpar == "sigma_x_drift_par"){
42 for(int i=0; i<n_sigma_x_drift; i++) fin >> m_sigma_x_drift_par[i];
43 }
44 else if(strpar == "shift_x_transf_par"){
45 fin >> m_shift_x_transf_par;
46 }
47 else if(strpar == "sigma_x_transf_par"){
48 fin >> m_sigma_x_transf_par;
49 }
50 else if(strpar == "shift_x_induct_par"){
51 fin >> m_shift_x_induct_par;
52 }
53 else if(strpar == "sigma_x_induct_par"){
54 fin >> m_sigma_x_induct_par;
55 }
56 else if(strpar == "n_shift_t_drift"){
57 fin >> n_shift_t_drift;
58 }
59 else if(strpar == "shift_t_drift_par"){
60 for(int i=0; i<n_shift_t_drift; i++) fin >> m_shift_t_drift_par[i];
61 }
62 else if(strpar == "n_sigma_t_drift"){
63 fin >> n_sigma_t_drift;
64 }
65 else if(strpar == "sigma_t_drift_par"){
66 for(int i=0; i<n_sigma_t_drift; i++) fin >> m_sigma_t_drift_par[i];
67 }
68 else if(strpar == "shift_t_transf_par"){
69 fin >> m_shift_t_transf_par;
70 }
71 else if(strpar == "sigma_t_transf_par"){
72 fin >> m_sigma_t_transf_par;
73 }
74 else if(strpar == "shift_t_induct_par"){
75 fin >> m_shift_t_induct_par;
76 }
77 else if(strpar == "sigma_t_induct_par"){
78 fin >> m_sigma_t_induct_par;
79 }
80 }
81
82 std::cout << "DiffusionGTS::readGasPerpParameters: open file " << fileName.c_str() << endl;
83
84 // cout << n_shift_x_drift << endl;
85 cout << "shift x in drift";
86 for(int i=0; i<n_shift_x_drift; i++) cout << " " << m_shift_x_drift_par[i];
87 cout << endl;
88 // cout << n_sigma_x_drift << endl;
89 cout << "sigma x in drift";
90 for(int i=0; i<n_sigma_x_drift; i++) cout << " " << m_sigma_x_drift_par[i];
91 cout << endl;
92 cout << "shift x in transf " << m_shift_x_transf_par << endl;
93 cout << "sigma x in transf " << m_sigma_x_transf_par << endl;
94 cout << "shift x in induct " << m_shift_x_induct_par << endl;
95 cout << "sigma x in induct " << m_sigma_x_induct_par << endl;
96
97 cout << "shift t in drift";
98 // cout << n_shift_t_drift << endl;
99 for(int i=0; i<n_shift_t_drift; i++) cout << " " << m_shift_t_drift_par[i];
100 cout << endl;
101 // cout << n_sigma_t_drift << endl;
102 cout << "sigma t in drift";
103 for(int i=0; i<n_sigma_t_drift; i++) cout << " " << m_sigma_t_drift_par[i];
104 cout << endl;
105 cout << "shift t in transf " << m_shift_t_transf_par << endl;
106 cout << "sigma t in transf " << m_sigma_t_transf_par << endl;
107 cout << "shift t in induct " << m_shift_t_induct_par << endl;
108 cout << "sigma t in induct " << m_sigma_t_induct_par << endl;
109
110}

Referenced by InductionGTS::init(), and SamplingGTS::readGasParameters().

◆ shift_t_drift()

double DiffusionGTS::shift_t_drift ( double  z)

if(z<0||z>5.) { // CHECK 16) gap from geometry! cout<<"DiffusionGTS::shift_t_drift: error in z = " << z << endl; return dt; }

Definition at line 258 of file DiffusionGTS.cxx.

258 {
259 double dt = 0;
260 /**
261 if(z<0||z>5.) { // CHECK 16) gap from geometry!
262 cout<<"DiffusionGTS::shift_t_drift: error in z = " << z << endl;
263 return dt;
264 }
265 **/
266 for(int i=0; i<n_shift_t_drift; i++) dt += pow(z, i) * m_shift_t_drift_par[i];
267 return dt;
268}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_drift().

◆ shift_t_induct()

double DiffusionGTS::shift_t_induct ( )

Definition at line 274 of file DiffusionGTS.cxx.

274 {
275 double dx = m_shift_t_induct_par;
276 return dx;
277}

Referenced by diffusion_induct(), and InductionGTS::drive_to_anode().

◆ shift_t_transf()

double DiffusionGTS::shift_t_transf ( )

Definition at line 270 of file DiffusionGTS.cxx.

270 {
271 double dx = m_shift_t_transf_par;
272 return dx;
273}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_transf().

◆ shift_x_drift()

double DiffusionGTS::shift_x_drift ( double  z)

if(z<0||z>5.) { // CHECK 16) gap from geometry! cout<<"DiffusionGTS::shift_x_drift: error in z = " << z << endl; return dx; }

Definition at line 173 of file DiffusionGTS.cxx.

173 {
174
175 double dx = 0;
176 /**
177 if(z<0||z>5.) { // CHECK 16) gap from geometry!
178 cout<<"DiffusionGTS::shift_x_drift: error in z = " << z << endl;
179 return dx;
180 }
181 **/
182 for(int i=0; i<n_shift_x_drift; i++) dx += pow(z, i) * m_shift_x_drift_par[i];
183 return dx;
184}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_drift().

◆ shift_x_induct()

double DiffusionGTS::shift_x_induct ( )

Definition at line 189 of file DiffusionGTS.cxx.

189 {
190 double dx = m_shift_x_induct_par;
191 return dx;
192}

Referenced by diffusion_induct(), and InductionGTS::drive_to_anode().

◆ shift_x_transf()

double DiffusionGTS::shift_x_transf ( )

Definition at line 185 of file DiffusionGTS.cxx.

185 {
186 double dx = m_shift_x_transf_par;
187 return dx;
188}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_transf().

◆ shift_y_drift()

double DiffusionGTS::shift_y_drift ( double  z)

if(z<0||z>5.) { // CHECK 16) gap from geometry! cout<<"DiffusionGTS::shift_y_drift: error in z = " << z << endl; return dy; }

Definition at line 216 of file DiffusionGTS.cxx.

216 {
217
218 double dy = 0;
219 /**
220 if(z<0||z>5.) { // CHECK 16) gap from geometry!
221 cout<<"DiffusionGTS::shift_y_drift: error in z = " << z << endl;
222 return dy;
223 }
224 **/
225 for(int i=0; i<n_shift_y_drift; i++) dy += pow(z, i) * m_shift_y_drift_par[i];
226 return dy;
227}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_drift().

◆ shift_y_induct()

double DiffusionGTS::shift_y_induct ( )

Definition at line 232 of file DiffusionGTS.cxx.

232 {
233 double dy = m_shift_y_induct_par;
234 return dy;
235}

Referenced by diffusion_induct(), and InductionGTS::drive_to_anode().

◆ shift_y_transf()

double DiffusionGTS::shift_y_transf ( )

Definition at line 228 of file DiffusionGTS.cxx.

228 {
229 double dy = m_shift_y_transf_par;
230 return dy;
231}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_transf().

◆ sigma_t_drift()

double DiffusionGTS::sigma_t_drift ( double  z)

if(z<0||z>5.) { // CHECK 16) gap from geometry! cout<<"DiffusionGTS::sigma_t_drift: error in z = " << z << endl; return dt; }

Definition at line 279 of file DiffusionGTS.cxx.

279 {
280 double dt = 0;
281 /**
282 if(z<0||z>5.) { // CHECK 16) gap from geometry!
283 cout<<"DiffusionGTS::sigma_t_drift: error in z = " << z << endl;
284 return dt;
285 }
286 **/
287 for(int i=0; i<n_sigma_t_drift; i++) dt += pow(z, i) * m_sigma_t_drift_par[i];
288 return dt;
289}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_drift().

◆ sigma_t_induct()

double DiffusionGTS::sigma_t_induct ( )

Definition at line 294 of file DiffusionGTS.cxx.

294 {
295 double dx = m_sigma_t_induct_par;
296 return dx;
297}

Referenced by diffusion_induct(), and InductionGTS::drive_to_anode().

◆ sigma_t_transf()

double DiffusionGTS::sigma_t_transf ( )

Definition at line 290 of file DiffusionGTS.cxx.

290 {
291 double dx = m_sigma_t_transf_par;
292 return dx;
293}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_transf().

◆ sigma_x_drift()

double DiffusionGTS::sigma_x_drift ( double  z)

if(z<0||z>5.) { // CHECK 16) gap from geometry! cout<<"DiffusionGTS::sigma_x_drift: error in z = " << z << endl; return dx; }

Definition at line 195 of file DiffusionGTS.cxx.

195 {
196 double dx = 0;
197 /**
198 if(z<0||z>5.) { // CHECK 16) gap from geometry!
199 cout<<"DiffusionGTS::sigma_x_drift: error in z = " << z << endl;
200 return dx;
201 }
202 **/
203 for(int i=0; i<n_sigma_x_drift; i++) dx += pow(z, i) * m_sigma_x_drift_par[i];
204 return dx;
205}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_drift().

◆ sigma_x_induct()

double DiffusionGTS::sigma_x_induct ( )

Definition at line 210 of file DiffusionGTS.cxx.

210 {
211 double dx = m_sigma_x_induct_par;
212 return dx;
213}

Referenced by diffusion_induct(), and InductionGTS::drive_to_anode().

◆ sigma_x_transf()

double DiffusionGTS::sigma_x_transf ( )

Definition at line 206 of file DiffusionGTS.cxx.

206 {
207 double dx = m_sigma_x_transf_par;
208 return dx;
209}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_transf().

◆ sigma_y_drift()

double DiffusionGTS::sigma_y_drift ( double  z)

if(z<0||z>5.) { // CHECK 16) gap from geometry! cout<<"DiffusionGTS::sigma_y_drift: error in z = " << z << endl; return dy; }

Definition at line 237 of file DiffusionGTS.cxx.

237 {
238 double dy = 0;
239 /**
240 if(z<0||z>5.) { // CHECK 16) gap from geometry!
241 cout<<"DiffusionGTS::sigma_y_drift: error in z = " << z << endl;
242 return dy;
243 }
244 **/
245 for(int i=0; i<n_sigma_y_drift; i++) dy += pow(z, i) * m_sigma_y_drift_par[i];
246 return dy;
247}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_drift().

◆ sigma_y_induct()

double DiffusionGTS::sigma_y_induct ( )

Definition at line 252 of file DiffusionGTS.cxx.

252 {
253 double dy = m_sigma_y_induct_par;
254 return dy;
255}

Referenced by diffusion_induct(), and InductionGTS::drive_to_anode().

◆ sigma_y_transf()

double DiffusionGTS::sigma_y_transf ( )

Definition at line 248 of file DiffusionGTS.cxx.

248 {
249 double dy = m_sigma_y_transf_par;
250 return dy;
251}

Referenced by SamplingGTS::compute_diffusion_on_GEM3(), and diffusion_transf().


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