BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcRecParameter.cxx
Go to the documentation of this file.
1//
2// Parameters for Emc Reconstruction
3//
4// No Parameter is allowed to be hard coded into code!
5//
6// Created by Zhe Wang, May 31, 2004
7//
8#include "EmcRec/EmcRecParameter.h"
9#include "TGraph2DErrors.h"
10#include <assert.h>
11#include <fstream>
12#include <sstream>
13#include <stdlib.h>
14
15// Initialize static data member
16EmcRecParameter* EmcRecParameter::fpInstance = 0;
17pthread_mutex_t EmcRecParameter::m_pthread_lock = PTHREAD_MUTEX_INITIALIZER;
18
19// Constructors and destructors
20EmcRecParameter::EmcRecParameter() {
21 string paraPath = getenv( "EMCRECROOT" );
22 if ( paraPath == "" ) {} // cout<<"EmcRec environment not set!";
23 string paraPath1( paraPath );
24 string paraPath2( paraPath );
25 string paraPath3( paraPath );
26 string paraPath4( paraPath );
27 string paraPath3_1( paraPath );
28 string paraPath4_1( paraPath );
29 string paraPath5( paraPath );
30 string paraPath6( paraPath );
31 string paraPath7( paraPath );
32 string paraPath8( paraPath );
33 string paraPath9( paraPath );
34 string paraPath10( paraPath );
35 string paraPath11( paraPath );
36 string paraPath12( paraPath );
37 string paraPath11_1( paraPath );
38 string paraPath12_1( paraPath );
39 string paraPath13( paraPath );
40 string paraPath14( paraPath );
41 string paraPath15( paraPath );
42 string paraPath16( paraPath );
43 string paraPath17( paraPath );
44 string paraPath18( paraPath );
45 string paraPath19( paraPath );
46 string paraPath18_1( paraPath );
47 string paraPath19_1( paraPath );
48 string paraPath20( paraPath );
49 string paraPath21( paraPath );
50 string paraPath22( paraPath );
51 string paraPath23( paraPath );
52 string paraPath24( paraPath );
53 string paraPath25( paraPath );
54 string paraPath26( paraPath );
55 string paraPath27( paraPath );
56 string paraPath28( paraPath );
57 string paraPath29( paraPath );
58 paraPath += "/share/EmcRecPara.dat";
59 // cout<<paraPath<<endl;
60 ifstream in;
61 in.open( paraPath.c_str() );
62 assert( in );
63
64 const int maxCharOfOneLine = 255;
65 char temp[maxCharOfOneLine];
66 int inputNo = 0;
67 while ( in.peek() != EOF )
68 {
69 in.getline( temp, maxCharOfOneLine );
70 if ( temp[0] == '#' ) continue;
71 inputNo++;
72 switch ( inputNo )
73 {
74 case 1:
75 istringstream( temp ) >> fElectronicsNoiseLevel >> fEThresholdSeed >>
76 fEThresholdCluster >> fLogPosOffset;
77 break;
78 case 2: istringstream( temp ) >> fMoliereRadius >> fLateralProfile; break;
79 case 3: istringstream( temp ) >> eCorr[0] >> eCorr[1] >> eCorr[2] >> eCorr[3]; break;
80 case 4:
81 istringstream( temp ) >> sigE[0] >> sigE[1] >> sigE[2] >> sigTheta[0] >> sigTheta[1] >>
82 sigPhi[0] >> sigPhi[1];
83 break;
84 case 5: istringstream( temp ) >> hitNb[0] >> hitNb[1] >> hitNb[2]; break;
85 case 6:
86 istringstream( temp ) >> elecBias[0] >> elecBias[1] >> elecBias[2] >> elecBias[3] >>
87 elecBias[4];
88 break;
89 case 7: istringstream( temp ) >> smCut[0] >> smCut[1] >> smCut[2] >> smCut[3]; break;
90 default: break;
91 }
92 }
93 in.close();
94
95 paraPath1 += "/share/Peak1.843_10.12calib.dat";
96 ifstream in1;
97 in1.open( paraPath1.c_str() );
98 assert( in1 );
99 int ntheta;
100 double sigma, sigmaerr, peakerr;
101 for ( int i = 0; i < 56; i++ ) { in1 >> ntheta >> sigma >> sigmaerr >> peak[i] >> peakerr; }
102 in1.close();
103
104 // Read energy correction parameters from PhotonCor/McCor
105 paraPath2 += "/share/evset.txt";
106 ifstream in2;
107 in2.open( paraPath2.c_str() );
108 assert( in2 );
109 double energy, thetaid, peak1, peakerr1, res, reserr;
110
111 dt = new TGraph2DErrors();
112 dtErr = new TGraph2DErrors();
113 for ( int i = 0; i < 560; i++ )
114 {
115 in2 >> energy;
116 in2 >> thetaid;
117 in2 >> peak1;
118 in2 >> peakerr1;
119 in2 >> res;
120 in2 >> reserr;
121 dt->SetPoint( i, energy, thetaid, peak1 );
122 dt->SetPointError( i, 0, 0, peakerr1 );
123 dtErr->SetPoint( i, energy, thetaid, res );
124 dtErr->SetPointError( i, 0, 0, reserr );
125
126 if ( i < 28 ) e25min[int( thetaid )] = energy;
127 if ( i >= 560 - 28 ) e25max[int( thetaid )] = energy;
128 }
129 in2.close();
130
131 // Position correction parameters
132 paraPath3_1 += "/share/BarrLogShMaxThetaPara.dat";
133 ifstream in3_1;
134 in3_1.open( paraPath3_1.c_str() );
135 assert( in3_1 );
136 for ( int i = 0; i < 132; i++ )
137 {
138 for ( int j = 0; j < 5; j++ ) { in3_1 >> barrLogShMaxThetaPara[i][j]; }
139 }
140 in3_1.close();
141
142 paraPath4_1 += "/share/BarrLogShMaxPhiPara.dat";
143 ifstream in4_1;
144 in4_1.open( paraPath4_1.c_str() );
145 assert( in4_1 );
146 for ( int i = 0; i < 132; i++ )
147 {
148 for ( int j = 0; j < 5; j++ ) { in4_1 >> barrLogShMaxPhiPara[i][j]; }
149 }
150 in4_1.close();
151
152 paraPath11_1 += "/share/EastLogShMaxThetaPara.dat";
153 ifstream in11_1;
154 in11_1.open( paraPath11_1.c_str() );
155 assert( in11_1 );
156 for ( int i = 0; i < 18; i++ )
157 {
158 for ( int j = 0; j < 5; j++ ) { in11_1 >> eastLogShMaxThetaPara[i][j]; }
159 }
160 in11_1.close();
161
162 paraPath12_1 += "/share/WestLogShMaxThetaPara.dat";
163 ifstream in12_1;
164 in12_1.open( paraPath12_1.c_str() );
165 assert( in12_1 );
166 for ( int i = 0; i < 18; i++ )
167 {
168 for ( int j = 0; j < 5; j++ ) { in12_1 >> westLogShMaxThetaPara[i][j]; }
169 }
170 in12_1.close();
171
172 paraPath18_1 += "/share/EastLogShMaxPhiPara.dat";
173 ifstream in18_1;
174 in18_1.open( paraPath18_1.c_str() );
175 assert( in18_1 );
176 for ( int i = 0; i < 3; i++ )
177 {
178 for ( int j = 0; j < 5; j++ ) { in18_1 >> eastLogShMaxPhiPara[i][j]; }
179 }
180 in18_1.close();
181
182 paraPath19_1 += "/share/WestLogShMaxPhiPara.dat";
183 ifstream in19_1;
184 in19_1.open( paraPath19_1.c_str() );
185 assert( in19_1 );
186 for ( int i = 0; i < 3; i++ )
187 {
188 for ( int j = 0; j < 5; j++ ) { in19_1 >> westLogShMaxPhiPara[i][j]; }
189 }
190 in19_1.close();
191
192 // Position correction parameters
193 paraPath3 += "/share/BarrLogThetaPara.dat";
194 ifstream in3;
195 in3.open( paraPath3.c_str() );
196 assert( in3 );
197 for ( int i = 0; i < 66; i++ )
198 {
199 for ( int j = 0; j < 5; j++ ) { in3 >> barrLogThetaPara[i][j]; }
200 }
201 in3.close();
202
203 paraPath4 += "/share/BarrLogPhiPara.dat";
204 ifstream in4;
205 in4.open( paraPath4.c_str() );
206 assert( in4 );
207 for ( int i = 0; i < 66; i++ )
208 {
209 for ( int j = 0; j < 5; j++ ) { in4 >> barrLogPhiPara[i][j]; }
210 }
211 in4.close();
212
213 paraPath5 += "/share/BarrLinThetaPara.dat";
214 ifstream in5;
215 in5.open( paraPath5.c_str() );
216 assert( in5 );
217 for ( int i = 0; i < 66; i++ )
218 {
219 for ( int j = 0; j < 5; j++ ) { in5 >> barrLinThetaPara[i][j]; }
220 }
221 in5.close();
222
223 paraPath6 += "/share/BarrLinPhiPara.dat";
224 ifstream in6;
225 in6.open( paraPath6.c_str() );
226 assert( in6 );
227 for ( int i = 0; i < 3; i++ )
228 {
229 for ( int j = 0; j < 5; j++ ) { in6 >> barrLinPhiPara[i][j]; }
230 }
231 in6.close();
232
233 /*
234 paraPath7 += "/share/BarrShLogThetaPara.dat";
235 ifstream in7;
236 in7.open(paraPath7.c_str());
237 assert(in7);
238 for(int i=0;i<66;i++){
239 for(int j=0;j<5;j++){
240 in7>>barrShLogThetaPara[i][j];
241 }
242 }
243 in7.close();
244
245 paraPath8 += "/share/BarrShLogPhiPara.dat";
246 ifstream in8;
247 in8.open(paraPath8.c_str());
248 assert(in8);
249 for(int i=0;i<3;i++){
250 for(int j=0;j<5;j++){
251 in8>>barrShLogPhiPara[i][j];
252 }
253 }
254 in8.close();
255 */
256
257 paraPath9 += "/share/BarrShLinThetaPara.dat";
258 ifstream in9;
259 in9.open( paraPath9.c_str() );
260 assert( in9 );
261 for ( int i = 0; i < 66; i++ )
262 {
263 for ( int j = 0; j < 5; j++ ) { in9 >> barrShLinThetaPara[i][j]; }
264 }
265 in9.close();
266
267 paraPath10 += "/share/BarrShLinPhiPara.dat";
268 ifstream in10;
269 in10.open( paraPath10.c_str() );
270 assert( in10 );
271 for ( int i = 0; i < 3; i++ )
272 {
273 for ( int j = 0; j < 5; j++ ) { in10 >> barrShLinPhiPara[i][j]; }
274 }
275 in10.close();
276
277 paraPath11 += "/share/EastLogThetaPara.dat";
278 ifstream in11;
279 in11.open( paraPath11.c_str() );
280 assert( in11 );
281 for ( int i = 0; i < 18; i++ )
282 {
283 for ( int j = 0; j < 5; j++ ) { in11 >> eastLogThetaPara[i][j]; }
284 }
285 in11.close();
286
287 paraPath12 += "/share/WestLogThetaPara.dat";
288 ifstream in12;
289 in12.open( paraPath12.c_str() );
290 assert( in12 );
291 for ( int i = 0; i < 18; i++ )
292 {
293 for ( int j = 0; j < 5; j++ ) { in12 >> westLogThetaPara[i][j]; }
294 }
295 in12.close();
296
297 paraPath13 += "/share/EastLinThetaPara.dat";
298 ifstream in13;
299 in13.open( paraPath13.c_str() );
300 assert( in13 );
301 for ( int i = 0; i < 6; i++ )
302 {
303 for ( int j = 0; j < 5; j++ ) { in13 >> eastLinThetaPara[i][j]; }
304 }
305 in13.close();
306
307 paraPath14 += "/share/WestLinThetaPara.dat";
308 ifstream in14;
309 in14.open( paraPath14.c_str() );
310 assert( in14 );
311 for ( int i = 0; i < 6; i++ )
312 {
313 for ( int j = 0; j < 5; j++ ) { in14 >> westLinThetaPara[i][j]; }
314 }
315 in14.close();
316
317 paraPath15 += "/share/BarrDataLogThetaPara.dat";
318 ifstream in15;
319 in15.open( paraPath15.c_str() );
320 assert( in15 );
321 for ( int i = 0; i < 22; i++ )
322 {
323 for ( int j = 0; j < 5; j++ ) { in15 >> barrDataLogThetaPara[i][j]; }
324 }
325 in15.close();
326
327 paraPath16 += "/share/EastDataLogThetaPara.dat";
328 ifstream in16;
329 in16.open( paraPath16.c_str() );
330 assert( in16 );
331 for ( int i = 0; i < 6; i++ )
332 {
333 for ( int j = 0; j < 5; j++ ) { in16 >> eastDataLogThetaPara[i][j]; }
334 }
335 in16.close();
336
337 paraPath17 += "/share/WestDataLogThetaPara.dat";
338 ifstream in17;
339 in17.open( paraPath17.c_str() );
340 assert( in17 );
341 for ( int i = 0; i < 6; i++ )
342 {
343 for ( int j = 0; j < 5; j++ ) { in17 >> westDataLogThetaPara[i][j]; }
344 }
345 in17.close();
346
347 paraPath18 += "/share/EastLogPhiPara.dat";
348 ifstream in18;
349 in18.open( paraPath18.c_str() );
350 assert( in18 );
351 for ( int i = 0; i < 3; i++ )
352 {
353 for ( int j = 0; j < 5; j++ ) { in18 >> eastLogPhiPara[i][j]; }
354 }
355 in18.close();
356
357 paraPath19 += "/share/WestLogPhiPara.dat";
358 ifstream in19;
359 in19.open( paraPath19.c_str() );
360 assert( in19 );
361 for ( int i = 0; i < 3; i++ )
362 {
363 for ( int j = 0; j < 5; j++ ) { in19 >> westLogPhiPara[i][j]; }
364 }
365 in19.close();
366
367 paraPath20 += "/share/EastLinPhiPara.dat";
368 ifstream in20;
369 in20.open( paraPath20.c_str() );
370 assert( in20 );
371 for ( int i = 0; i < 1; i++ )
372 {
373 for ( int j = 0; j < 5; j++ ) { in20 >> eastLinPhiPara[i][j]; }
374 }
375 in20.close();
376
377 paraPath21 += "/share/WestLinPhiPara.dat";
378 ifstream in21;
379 in21.open( paraPath21.c_str() );
380 assert( in21 );
381 for ( int i = 0; i < 1; i++ )
382 {
383 for ( int j = 0; j < 5; j++ ) { in21 >> westLinPhiPara[i][j]; }
384 }
385 in21.close();
386
387 paraPath22 += "/share/BarrLoglinThetaPara.dat";
388 ifstream in22;
389 in22.open( paraPath22.c_str() );
390 assert( in22 );
391 for ( int i = 0; i < 22; i++ )
392 {
393 for ( int j = 0; j < 5; j++ ) { in22 >> barrLoglinThetaPara[i][j]; }
394 }
395 in22.close();
396
397 paraPath23 += "/share/BarrLoglinPhiPara.dat";
398 ifstream in23;
399 in23.open( paraPath23.c_str() );
400 assert( in23 );
401 for ( int i = 0; i < 1; i++ )
402 {
403 for ( int j = 0; j < 5; j++ ) { in23 >> barrLoglinPhiPara[i][j]; }
404 }
405 in23.close();
406
407 int ith, iph;
408 double dth, dtherr, sig, sigerr;
409
410 paraPath24 += "/share/PosCorDataBarr.conf";
411 ifstream in24;
412 in24.open( paraPath24.c_str() );
413 assert( in24 );
414
415 for ( int i = 0; i < 5280; i++ )
416 {
417
418 in24 >> iph >> ith >> dth >> dtherr >> sig >> sigerr;
419 barrPosDataCorPara[ith][iph] = dth;
420 }
421 in24.close();
422
423 paraPath25 += "/share/PosCorDataWest.conf";
424 ifstream in25;
425 in25.open( paraPath25.c_str() );
426 assert( in25 );
427 for ( int i = 0; i < 480; i++ )
428 {
429
430 in25 >> ith >> iph >> dth >> dtherr >> sig >> sigerr;
431 westPosDataCorPara[ith][iph] = dth;
432 }
433 in25.close();
434
435 paraPath26 += "/share/PosCorDataEast.conf";
436 ifstream in26;
437 in26.open( paraPath26.c_str() );
438 assert( in26 );
439 for ( int i = 0; i < 480; i++ )
440 {
441
442 in26 >> ith >> iph >> dth >> dtherr >> sig >> sigerr;
443 eastPosDataCorPara[ith][iph] = dth;
444 }
445 in26.close();
446
447 ////////////////////MCposcor
448 paraPath27 += "/share/PosCorMCBarr.conf";
449 ifstream in27;
450 in27.open( paraPath27.c_str() );
451 assert( in27 );
452
453 for ( int i = 0; i < 5280; i++ )
454 {
455
456 in27 >> iph >> ith >> dth >> dtherr >> sig >> sigerr;
457 barrPosMCCorPara[ith][iph] = dth;
458 }
459 in27.close();
460
461 paraPath28 += "/share/PosCorMCWest.conf";
462 ifstream in28;
463 in28.open( paraPath28.c_str() );
464 assert( in28 );
465 for ( int i = 0; i < 480; i++ )
466 {
467
468 in28 >> ith >> iph >> dth >> dtherr >> sig >> sigerr;
469 westPosMCCorPara[ith][iph] = dth;
470 }
471 in28.close();
472
473 paraPath29 += "/share/PosCorMCEast.conf";
474 ifstream in29;
475 in29.open( paraPath29.c_str() );
476 assert( in29 );
477 for ( int i = 0; i < 480; i++ )
478 {
479
480 in29 >> ith >> iph >> dth >> dtherr >> sig >> sigerr;
481 eastPosMCCorPara[ith][iph] = dth;
482 }
483 in29.close();
484}
485
486EmcRecParameter::~EmcRecParameter() {
487 // cout<<"deconstructed"<<endl;
488 delete dt;
489 delete dtErr;
490}
491
492// static method
493// Access to an instance
495 if ( !Exist() ) { fpInstance = new EmcRecParameter; }
496 return *fpInstance;
497}
498
499bool EmcRecParameter::Exist() { return fpInstance != 0; }
500
502 if ( Exist() )
503 {
504 delete fpInstance;
505 fpInstance = 0;
506 }
507}
508
509// access to each parameter
510double EmcRecParameter::ElectronicsNoiseLevel() const { return fElectronicsNoiseLevel; }
511
512double EmcRecParameter::EThresholdSeed() const { return fEThresholdSeed; }
513
514double EmcRecParameter::EThresholdCluster() const { return fEThresholdCluster; }
515
516double EmcRecParameter::LogPosOffset() const { return fLogPosOffset; }
517
518double EmcRecParameter::TimeMin() const { return fTimeMin; }
519
520double EmcRecParameter::TimeMax() const { return fTimeMax; }
521
522double EmcRecParameter::MethodMode() const { return fMethodMode; }
523
524double EmcRecParameter::PosCorr() const { return fPosCorr; }
525
526double EmcRecParameter::DataMode() const { return fDataMode; }
527int EmcRecParameter::ElecSaturation() const { return fElecSaturation; }
528
529double EmcRecParameter::MoliereRadius() const { return fMoliereRadius; }
530
531double EmcRecParameter::LateralProfile() const { return fLateralProfile; }
532
533double EmcRecParameter::ECorr( int n ) const { return eCorr[n]; }
534
535double EmcRecParameter::SigE( int n ) const { return sigE[n]; }
536
537double EmcRecParameter::SigTheta( int n ) const { return sigTheta[n]; }
538
539double EmcRecParameter::SigPhi( int n ) const { return sigPhi[n]; }
540
541double EmcRecParameter::HitNb( int n ) const { return hitNb[n]; }
542
543double EmcRecParameter::ElecBias( int n ) const { return elecBias[n]; }
544
545double EmcRecParameter::SmCut( int n ) const { return smCut[n]; }
546
547double EmcRecParameter::Peak( int n ) const { return peak[n]; }
548
549double EmcRecParameter::BarrLogThetaPara( int n, int m ) const {
550 return barrLogThetaPara[n][m];
551}
552
553double EmcRecParameter::BarrLogPhiPara( int n, int m ) const { return barrLogPhiPara[n][m]; }
554
555double EmcRecParameter::BarrLoglinThetaPara( int n, int m ) const {
556 return barrLoglinThetaPara[n][m];
557}
558
559double EmcRecParameter::BarrLoglinPhiPara( int n, int m ) const {
560 return barrLoglinPhiPara[n][m];
561}
562
563double EmcRecParameter::BarrLinThetaPara( int n, int m ) const {
564 return barrLinThetaPara[n][m];
565}
566
567double EmcRecParameter::BarrLinPhiPara( int n, int m ) const { return barrLinPhiPara[n][m]; }
568
569double EmcRecParameter::BarrLogShMaxThetaPara( int n, int m ) const {
570 return barrLogShMaxThetaPara[n][m];
571}
572
573double EmcRecParameter::BarrLogShMaxPhiPara( int n, int m ) const {
574 return barrLogShMaxPhiPara[n][m];
575}
576
577double EmcRecParameter::BarrShLinThetaPara( int n, int m ) const {
578 return barrShLinThetaPara[n][m];
579}
580
581double EmcRecParameter::BarrShLinPhiPara( int n, int m ) const {
582 return barrShLinPhiPara[n][m];
583}
584
585double EmcRecParameter::EastLogThetaPara( int n, int m ) const {
586 return eastLogThetaPara[n][m];
587}
588
589double EmcRecParameter::WestLogThetaPara( int n, int m ) const {
590 return westLogThetaPara[n][m];
591}
592
593double EmcRecParameter::EastLogPhiPara( int n, int m ) const { return eastLogPhiPara[n][m]; }
594
595double EmcRecParameter::WestLogPhiPara( int n, int m ) const { return westLogPhiPara[n][m]; }
596
597double EmcRecParameter::EastLogShMaxThetaPara( int n, int m ) const {
598 return eastLogShMaxThetaPara[n][m];
599}
600
601double EmcRecParameter::WestLogShMaxThetaPara( int n, int m ) const {
602 return westLogShMaxThetaPara[n][m];
603}
604
605double EmcRecParameter::EastLogShMaxPhiPara( int n, int m ) const {
606 return eastLogShMaxPhiPara[n][m];
607}
608
609double EmcRecParameter::WestLogShMaxPhiPara( int n, int m ) const {
610 return westLogShMaxPhiPara[n][m];
611}
612
613double EmcRecParameter::EastLinPhiPara( int n, int m ) const { return eastLinPhiPara[n][m]; }
614
615double EmcRecParameter::WestLinPhiPara( int n, int m ) const { return westLinPhiPara[n][m]; }
616
617double EmcRecParameter::EastLinThetaPara( int n, int m ) const {
618 return eastLinThetaPara[n][m];
619}
620
621double EmcRecParameter::WestLinThetaPara( int n, int m ) const {
622 return westLinThetaPara[n][m];
623}
624
625double EmcRecParameter::BarrDataLogThetaPara( int n, int m ) const {
626 return barrDataLogThetaPara[n][m];
627}
628
629double EmcRecParameter::BarrPosDataCor( int ntheta, int nphi ) const {
630 return barrPosDataCorPara[ntheta][nphi];
631}
632
633double EmcRecParameter::WestPosDataCor( int ntheta, int nphi ) const {
634 return westPosDataCorPara[ntheta][nphi];
635}
636
637double EmcRecParameter::EastPosDataCor( int ntheta, int nphi ) const {
638 return eastPosDataCorPara[ntheta][nphi];
639}
640
641double EmcRecParameter::BarrPosMCCor( int ntheta, int nphi ) const {
642 return barrPosMCCorPara[ntheta][nphi];
643}
644
645double EmcRecParameter::WestPosMCCor( int ntheta, int nphi ) const {
646 return westPosMCCorPara[ntheta][nphi];
647}
648
649double EmcRecParameter::EastPosMCCor( int ntheta, int nphi ) const {
650 return eastPosMCCorPara[ntheta][nphi];
651}
652
653double EmcRecParameter::EastDataLogThetaPara( int n, int m ) const {
654 return eastDataLogThetaPara[n][m];
655}
656
657double EmcRecParameter::WestDataLogThetaPara( int n, int m ) const {
658 return westDataLogThetaPara[n][m];
659}
660
661void EmcRecParameter::SetPositionMode( std::vector<std::string>& mode ) {
662 if ( mode.size() == 2 )
663 {
664 positionMode1 = mode[0];
665 positionMode2 = mode[1];
666 }
667}
668
669// The following function is copied from PhotonCor/McCor
670double EmcRecParameter::ECorrMC( double eg, double theid ) const {
671 double Energy5x5 = eg;
672 if ( eg < E25min( int( theid ) ) ) eg = E25min( int( theid ) );
673 if ( eg > E25max( int( theid ) ) ) eg = E25max( int( theid ) ) - 0.001;
674 if ( theid <= 0 ) theid = 0.001;
675 if ( theid >= 27 ) theid = 26.999;
676 Float_t einter = eg + 0.00001;
677 Float_t tinter = theid + 0.0001;
678 double ecor = dt->Interpolate( einter, tinter );
679 if ( !( ecor ) ) return Energy5x5;
680 if ( ecor < 0.5 ) return Energy5x5;
681 double EnergyCor = Energy5x5 / ecor;
682 return EnergyCor;
683}
684
685// Get energy error
686double EmcRecParameter::ErrMC( double eg, double theid ) const {
687
688 if ( eg < E25min( int( theid ) ) ) eg = E25min( int( theid ) );
689 if ( eg > E25max( int( theid ) ) ) eg = E25max( int( theid ) ) - 0.001;
690 if ( theid <= 0 ) theid = 0.001;
691 if ( theid >= 27 ) theid = 26.999;
692 Float_t einter = eg + 0.00001;
693 Float_t tinter = theid + 0.0001;
694 double err = dtErr->Interpolate( einter, tinter );
695 return err;
696}
697
698double EmcRecParameter::E25min( int n ) const { return e25min[n]; }
699double EmcRecParameter::E25max( int n ) const { return e25max[n]; }
const Int_t n
************Class m_ypar INTEGER m_KeyWgt INTEGER m_KeyIHVP INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
Definition KK2f.h:50
double LogPosOffset() const
double WestLogShMaxPhiPara(int n, int m) const
double ECorr(int n) const
double BarrLogShMaxPhiPara(int n, int m) const
double WestPosMCCor(int ntheta, int nphi) const
double SigE(int n) const
double BarrPosMCCor(int ntheta, int nphi) const
void SetPositionMode(std::vector< std::string > &mode)
double ECorrMC(double eg, double theid) const
static EmcRecParameter & GetInstance()
double EastDataLogThetaPara(int n, int m) const
double EastLogShMaxPhiPara(int n, int m) const
double EastPosMCCor(int ntheta, int nphi) const
double WestDataLogThetaPara(int n, int m) const
double EastLinThetaPara(int n, int m) const
double EastPosDataCor(int ntheta, int nphi) const
double EastLinPhiPara(int n, int m) const
double EThresholdCluster() const
double EThresholdSeed() const
double WestPosDataCor(int ntheta, int nphi) const
double BarrLogPhiPara(int n, int m) const
double BarrDataLogThetaPara(int n, int m) const
double HitNb(int n) const
double EastLogShMaxThetaPara(int n, int m) const
double ElectronicsNoiseLevel() const
double E25min(int n) const
double PosCorr() const
double BarrShLinPhiPara(int n, int m) const
double LateralProfile() const
double E25max(int n) const
double MethodMode() const
double SigTheta(int n) const
double TimeMax() const
double WestLogShMaxThetaPara(int n, int m) const
double WestLogThetaPara(int n, int m) const
double ElecBias(int n) const
double BarrShLinThetaPara(int n, int m) const
int ElecSaturation() const
double BarrPosDataCor(int ntheta, int nphi) const
double BarrLogThetaPara(int n, int m) const
double BarrLoglinThetaPara(int n, int m) const
double WestLinThetaPara(int n, int m) const
double MoliereRadius() const
double TimeMin() const
static bool Exist()
double WestLogPhiPara(int n, int m) const
double BarrLinPhiPara(int n, int m) const
double BarrLinThetaPara(int n, int m) const
double EastLogPhiPara(int n, int m) const
double EastLogThetaPara(int n, int m) const
double BarrLoglinPhiPara(int n, int m) const
double WestLinPhiPara(int n, int m) const
double DataMode() const
double SmCut(int n) const
double SigPhi(int n) const
double Peak(int n) const
double BarrLogShMaxThetaPara(int n, int m) const
double ErrMC(double eg, double theid) const