4#include "ParticleID/TofCorrPID.h"
7#include "EvtRecEvent/EvtRecTrack.h"
8#include "MdcRecEvent/RecMdcTrack.h"
9#include "MdcRecEvent/RecMdcKalTrack.h"
10#include "ExtEvent/RecExtTrack.h"
11#include "TofRecEvent/RecTofTrack.h"
12#include "DstEvent/TofHitStatus.h"
14#include "TofHitStatus.h"
32 for(
int i = 0; i < 5; i++) {
36 m_offset[i] = -1000.0;
44 for(
unsigned int i=0; i<5; i++ ) {
45 for(
unsigned int j=0; j<7; j++ ) {
47 m_dtCorr[i][j] = -1000.0;
48 m_sigCorr[i][j] = 10.0;
49 m_chiCorr[i][j] = 100.0;
54 if( !(
abs(run)>=m_runBegin &&
abs(run)<=m_runEnd ) ) {
77 SmartRefVector<RecTofTrack> tofTrk = recTrk->
tofTrack();
78 SmartRefVector<RecTofTrack>::iterator it;
80 const std::vector<TTofTrack* >& tofTrk = recTrk->
tofTrack();
81 std::vector<TTofTrack* >::const_iterator it;
87 double p[5], betaGamma[5];
89 for(
int i=0; i<5; i++ ) {
106 HepLorentzVector ptrk = kalTrk->
p4();
108 HepLorentzVector ptrk = kalTrk->
p4(
xmass(i) );
111 betaGamma[i] =
p[i]/
xmass(i);
119 int tofid[2] = { -9, -9 };
122 bool readFile =
false;
123 bool signal[2] = {
false,
false };
125 for( it = tofTrk.begin(); it!=tofTrk.end(); it++ ) {
126 unsigned int st = (*it)->status();
128 if( hitst->
is_raw() )
return irc;
130 bool ismrpc = hitst->
is_mrpc();
131 if( !barrel && !ismrpc ) { zrhit[0] = extTrk->
tof1Position().rho(); }
135 int layer = hitst->
layer();
136 tofid[layer-1] = (*it)->tofID();
138 double tof = (*it)->tof();
139 unsigned int ipmt = 0;
143 if( barrel ) {
ipmt = ( ( st & 0xC0 ) >> 5 ) + ( ( ( st ^ 0x20 ) & 0x20 ) >> 5 ) - 2; }
146 if( tofid[0]<=47 ) {
ipmt = 7; }
150 if( tofid[0]<=35 ) {
ipmt = 7; }
155 for(
unsigned int i=0; i<5; i++ ) {
156 double offset = (*it)->toffset(i);
157 double texp = (*it)->texp(i);
158 if( texp<0.0 )
continue;
164 m_chiCorr[i][
ipmt] = m_dtCorr[i][
ipmt]/m_sigCorr[i][
ipmt];
170 m_sigCorr[i][0] =
sigmaTof( i,
charge, barrel,
ipmt, &tofid[0], &zrhit[0], betaGamma[i] );
171 m_chiCorr[i][0] = m_dtCorr[i][
ipmt]/m_sigCorr[i][
ipmt];
176 m_sigCorr[i][0] = 0.065;
177 m_chiCorr[i][0] = m_dtCorr[i][0]/m_sigCorr[i][0];
181 if( counter && cluster ) {
183 for(
unsigned int i=0; i<5; i++ ) {
184 if( ((*it)->texp(i))>0.0 ) {
186 m_offset[i] = m_dtCorr[i][
ipmt];
187 m_sigma[i] = m_sigCorr[i][
ipmt];
190 m_offset[i] = m_dtCorr[i][0];
191 m_sigma[i] = m_sigCorr[i][0];
200 for(
unsigned int i=0; i<5; i++ ) {
201 double offset = (*it)->toffset(i);
202 double texp = (*it)->texp(i);
203 if( texp<0.0 )
continue;
208 m_sigCorr[i][
ipmt] =
sigmaTof( i,
charge, barrel, layer+3, &tofid[0], &zrhit[0], betaGamma[i] );
209 m_chiCorr[i][
ipmt] = m_dtCorr[i][
ipmt]/m_sigCorr[i][
ipmt];
215 m_sigCorr[i][0] = 0.065;
216 m_chiCorr[i][0] = m_dtCorr[i][0]/m_sigCorr[i][0];
219 cout <<
"ParticleID: TofCorr::particleIDCalculation: Endcap Scintillator TOF have more than one end!!!" << endl;
225 for(
unsigned int i=0; i<5; i++ ) {
226 if( ((*it)->texp(i))>0.0 ) {
228 m_offset[i] = m_dtCorr[i][
ipmt];
229 m_sigma[i] = m_sigCorr[i][
ipmt];
232 m_offset[i] = m_dtCorr[i][0];
233 m_sigma[i] = m_sigCorr[i][0];
245 for(
unsigned int i=0; i<5; i++ ) {
246 double offset = (*it)->toffset(i);
247 double texp = (*it)->texp(i);
248 if( texp<0.0 )
continue;
251 m_dtCorr[i][
ipmt] =
offsetTof( i, tofid[0], tofid[1], zrhit[0], zrhit[1], betaGamma[i],
charge,
dt );
253 m_chiCorr[i][
ipmt] = m_dtCorr[i][
ipmt]/m_sigCorr[i][
ipmt];
255 if( signal[0] && signal[1] ) {
257 for(
unsigned int i=0; i<5; i++ ) {
258 m_offset[i] = m_dtCorr[i][
ipmt];
259 m_sigma[i] = m_sigCorr[i][
ipmt];
262 else if( signal[0] && !signal[1] ) {
264 for(
unsigned int i=0; i<5; i++ ) {
265 m_offset[i] = m_dtCorr[i][4];
266 m_sigma[i] = m_sigCorr[i][4];
269 else if( !signal[0] && signal[1] ) {
271 for(
unsigned int i=0; i<5; i++ ) {
272 m_offset[i] = m_dtCorr[i][5];
273 m_sigma[i] = m_sigCorr[i][5];
284 for(
unsigned int i=0; i<5; i++ ) {
285 m_chi[i] = m_offset[i]/m_sigma[i];
286 if( m_chi[i]<0. && m_chi[i]>m_chimin ) { m_chimin = m_chi[i]; }
287 if( m_chi[i]>0. && m_chi[i]<m_chimax ) { m_chimax = m_chi[i]; }
289 if( fabs(ppp) > pdftemp) { pdftemp = fabs(ppp); }
294 if( ( m_chimin > -90.0 && (0-m_chimin)>
chiMinCut() ) && ( m_chimax < 90.0 && m_chimax>
chiMaxCut() ) )
return irc;
295 for(
int i = 0; i < 5; i++) {
306 std::string filePath =
path +
"/share/TofCorrPID/";
308 filePath = filePath +
"jpsi2012";
313 filePath = filePath +
"/data/";
316 filePath = filePath +
"/mc/";
321 std::string fileWeight = filePath +
"calib_barrel_sigma.txt";
322 ifstream inputWeight( fileWeight.c_str(), std::ios_base::in );
324 cout <<
"ParticleID::TofCorrPID: Can NOT open file: " << fileWeight << endl;
328 for(
unsigned int tofid=0; tofid<176; tofid++ ) {
329 for(
unsigned int readout=0; readout<3; readout++ ) {
330 for(
unsigned int p_i=0; p_i<5; p_i++ ) {
331 inputWeight >> m_p_weight[tofid][readout][p_i];
338 std::string fileCommon = filePath +
"calib_barrel_common.txt";
339 ifstream inputCommon( fileCommon.c_str(), std::ios_base::in );
341 cout <<
"ParticleID::TofCorrPID: Can NOT open file: " << fileCommon << endl;
344 inputCommon >> m_p_common;
348 std::string fileEcSigma = filePath +
"calib_endcap_sigma.txt";
349 ifstream inputEcSigma( fileEcSigma.c_str(), std::ios_base::in );
350 if( !inputEcSigma ) {
351 cout <<
"ParticleID::TofCorrPID: Can NOT open file: " << fileEcSigma << endl;
355 for(
unsigned int tofid=0; tofid<96; tofid++ ) {
356 for(
unsigned int p_i=0; p_i<3; p_i++ ) {
357 inputEcSigma >> m_ec_sigma[tofid][p_i];
363 std::string fileQ0BetaGamma = filePath +
"curve_Q0_BetaGamma.txt";
364 ifstream inputQ0BetaGamma( fileQ0BetaGamma.c_str(), std::ios_base::in );
365 if( !inputQ0BetaGamma ) {
366 cout <<
"ParticleID::TofCorrPID: Can NOT open file: " << fileQ0BetaGamma << endl;
370 for(
unsigned int layer=0; layer<3; layer++ ) {
371 for(
unsigned int ipar=0; ipar<5; ipar++ ) {
372 inputQ0BetaGamma >> m_q0_bg[layer][ipar];
378 std::string fileParAB = filePath +
"parameter_A_B.txt";
379 ifstream inputParAB( fileParAB.c_str(), std::ios_base::in );
381 cout <<
"ParticleID::TofCorrPID: Can NOT open file: " << fileParAB << endl;
390 for(
unsigned int ispecies=0; ispecies<2; ispecies++ ) {
392 for(
unsigned int icharge=0; icharge<2; icharge++ ) {
393 for(
unsigned int iab=0; iab<2; iab++ ) {
394 for(
unsigned int ipar=0; ipar<11; ipar++ ) {
395 inputParAB >> m_par_ab_12[ispecies][
ipmt][icharge][iab][ipar];
403 std::string fileSigma = filePath +
"parameter_sigma.txt";
404 ifstream inputSigma( fileSigma.c_str(), std::ios_base::in );
406 cout <<
"ParticleID::TofCorrPID: Can NOT open file: " << fileSigma << endl;
414 for(
unsigned int ispecies=0; ispecies<4; ispecies++ ) {
416 for(
unsigned int ipar=0; ipar<12; ipar++ ) {
417 inputSigma >> m_par_sigma[ispecies][
ipmt][ipar];
423 std::string fileProtonOffset = filePath +
"parameter_offset_proton.txt";
424 ifstream inputProtonOffset( fileProtonOffset.c_str(), std::ios_base::in );
425 if( !inputProtonOffset ) {
426 cout <<
"ParticleID::TofCorrPID: Can NOT open file: " << fileProtonOffset << endl;
435 for(
unsigned int ispecies=0; ispecies<2; ispecies++ ) {
437 for(
unsigned int ipar=0; ipar<20; ipar++ ) {
439 for(
unsigned int jpar=0; jpar<46; jpar++ ) {
440 inputProtonOffset >> m_p_offset_12[ispecies][
ipmt][ipar][jpar];
444 for(
unsigned int jpar=0; jpar<7; jpar++ ) {
445 inputProtonOffset >> m_p_offset_ec12[ispecies][ipar][jpar];
454 std::string fileProtonSigma = filePath +
"parameter_sigma_proton.txt";
455 ifstream inputProtonSigma( fileProtonSigma.c_str(), std::ios_base::in );
456 if( !inputProtonSigma ) {
457 cout <<
"ParticleID::TofCorrPID: Can NOT open file: " << fileProtonSigma << endl;
466 for(
unsigned int ispecies=0; ispecies<2; ispecies++ ) {
468 for(
unsigned int ipar=0; ipar<20; ipar++ ) {
470 for(
unsigned int jpar=0; jpar<46; jpar++ ) {
471 inputProtonSigma >> m_p_sigma_12[ispecies][
ipmt][ipar][jpar];
475 for(
unsigned int jpar=0; jpar<7; jpar++ ) {
476 inputProtonSigma >> m_p_sigma_ec12[ispecies][ipar][jpar];
488double TofCorrPID::offsetTof(
unsigned int ispecies,
bool barrel,
unsigned int ipmt,
double betaGamma,
int charge,
double zrhit,
double dt ) {
489 if( ispecies==0 || ispecies==1 ) {
return dt; }
491 double deltaT = -1000.0;
492 if( (
ipmt>= 4 && barrel ) || (
ipmt!=7 &&
ipmt!=8 && !barrel ) || betaGamma<0.0 ||
abs(
charge)!=1 || fabs(zrhit)>120.0 ) {
493 cout <<
"Particle::TofCorrPID: offsetTof for single end: the input parameter are NOT correct! Please check them!" << endl;
496 unsigned int layer=0;
498 if(
ipmt==0 ||
ipmt==1 ) { layer=0; }
499 else if(
ipmt==2 ||
ipmt==3 ) { layer=1; }
504 unsigned int inumber=
ipmt;
505 if( !barrel ) { inumber=4; }
508 for(
unsigned int i=0; i<9; i++ ) {
517 for(
unsigned int i=1; i<8; i++ ) {
518 func[i] = func[i-1]*zrhit;
521 unsigned int iparticle=0;
522 if( ispecies==2 || ispecies==3 ) { iparticle=0; }
523 else if( ispecies==4 ) { iparticle=1; }
524 unsigned int icharge=0;
525 if(
charge==1 ) { icharge=0; }
526 else if(
charge==-1 ) { icharge=1; }
528 if( ispecies!=4 || betaGamma*
xmass(4)>0.8 ) {
529 for(
unsigned int i=0; i<8; i++ ) {
531 parA += m_par_ab_12[iparticle][inumber][icharge][0][i]*func[i];
532 parB += m_par_ab_12[iparticle][inumber][icharge][1][i]*func[i];
535 parA += m_par_ab_12[iparticle][inumber][icharge][0][i+3]*func[i];
536 parB += m_par_ab_12[iparticle][inumber][icharge][1][i+3]*func[i];
539 for(
unsigned int iab=0; iab<2; iab++ ) {
540 func[8] = m_par_ab_12[iparticle][inumber][icharge][iab][5]*TMath::Gaus(zrhit,m_par_ab_12[iparticle][inumber][icharge][iab][6], m_par_ab_12[iparticle][inumber][icharge][iab][7]);
550 double tcorr = parA + parB/sqrt(q0);
554 if( barrel && ispecies==4 && betaGamma*
xmass(4)<0.8 ) {
560 double nbgbin = 20.0;
561 double bgbegin = 0.3;
564 bgstep = (bgend-bgbegin)/nbgbin;
566 int izbin =
static_cast<int>((zrhit-
zbegin)/zstep);
567 if( izbin<0 ) { izbin=0; }
568 else if( izbin>=nzbin ) { izbin=nzbin-1; }
569 int ibgbin =
static_cast<int>((betaGamma*
xmass(4)-bgbegin)/bgstep);
570 if( ibgbin<0 ) { ibgbin=0; }
571 else if( ibgbin>=nbgbin ) { ibgbin=nbgbin-1; }
574 tcorr = m_p_offset_12[0][
ipmt][ibgbin][izbin];
577 tcorr = m_p_offset_12[1][
ipmt][ibgbin][izbin];
580 else if( !barrel && ispecies==4 && betaGamma*
xmass(4)<0.8 ) {
586 double nbgbin = 20.0;
587 double bgbegin = 0.3;
590 bgstep = (bgend-bgbegin)/nbgbin;
592 int irbin =
static_cast<int>((zrhit-
rbegin)/rstep);
593 if( irbin<0 ) { irbin=0; }
594 else if( irbin>=nrbin ) { irbin=nrbin-1; }
595 int ibgbin =
static_cast<int>((betaGamma*
xmass(4)-bgbegin)/bgstep);
596 if( ibgbin<0 ) { ibgbin=0; }
597 else if( ibgbin>=nbgbin ) { ibgbin=nbgbin-1; }
600 tcorr = m_p_offset_ec12[0][ibgbin][irbin];
603 tcorr = m_p_offset_ec12[1][ibgbin][irbin];
614 if( ispecies==0 || ispecies==1 ) {
return dt; }
616 double deltaT = -1000.0;
617 if( tofid<0 || tofid>=176 ) {
618 cout <<
"Particle::TofCorrPID: offsetTof for single layer: the input parameter are NOT correct! Please check them!" << endl;
621 int pmt[3] = { -9, -9, -9 };
622 if( tofid>=0 && tofid<=87 ) {
633 double sigmaCorr2 = m_p_common*m_p_common;
634 double sigmaLeft =
bSigma( 0, tofid, zrhit );
635 double sigmaLeft2 = sigmaLeft*sigmaLeft;
636 double sigmaRight =
bSigma( 1, tofid, zrhit );
637 double sigmaRight2 = sigmaRight*sigmaRight;
639 double fraction = ( sigmaRight2 - sigmaCorr2 )/( sigmaLeft2 + sigmaRight2 - 2.0*sigmaCorr2);
640 deltaT = fraction*m_dtCorr[ispecies][pmt[0]] + (1.0-fraction)*m_dtCorr[ispecies][pmt[1]];
644 unsigned int ipmt = 4;
645 if( tofid>=88 && tofid<176 ) {
ipmt = 5; }
646 if( ispecies==4 && betaGamma*
xmass(4)<0.8 ) {
652 double nbgbin = 20.0;
653 double bgbegin = 0.3;
656 bgstep = (bgend-bgbegin)/nbgbin;
658 int izbin =
static_cast<int>((zrhit-
zbegin)/zstep);
659 if( izbin<0 ) { izbin=0; }
660 else if( izbin>=nzbin ) { izbin=nzbin-1; }
661 int ibgbin =
static_cast<int>((betaGamma*
xmass(4)-bgbegin)/bgstep);
662 if( ibgbin<0 ) { ibgbin=0; }
663 else if( ibgbin>=nbgbin ) { ibgbin=nbgbin-1; }
666 tcorr = m_p_offset_12[0][
ipmt][ibgbin][izbin];
669 tcorr = m_p_offset_12[1][
ipmt][ibgbin][izbin];
672 deltaT = deltaT - tcorr;
678double TofCorrPID::offsetTof(
unsigned int ispecies,
int tofid1,
int tofid2,
double zrhit1,
double zrhit2,
double betaGamma,
int charge,
double dt ) {
679 if( ispecies==0 || ispecies==1 ) {
return dt; }
681 double deltaT = -1000.0;
682 if( tofid1<0 || tofid1>=88 || tofid2<88 || tofid2>=176 ) {
683 cout <<
"Particle::TofCorrPID: offsetTof for double layer: the input parameter are NOT correct! Please check them!" << endl;
687 double sigmaCorr2 = m_p_common*m_p_common;
688 double sigmaInner =
bSigma( 2, tofid1, zrhit1 );
689 double sigmaInner2 = sigmaInner*sigmaInner;
690 double sigmaOuter =
bSigma( 2, tofid2, zrhit2 );
691 double sigmaOuter2 = sigmaOuter*sigmaOuter;
692 double sigma = sqrt( (sigmaInner2*sigmaOuter2-sigmaCorr2*sigmaCorr2)/(sigmaInner2+sigmaOuter2-2.0*sigmaCorr2) );
697 double fraction = ( sigmaOuter2 - sigmaCorr2 )/( sigmaInner2 + sigmaOuter2 - 2.0*sigmaCorr2);
698 deltaT = fraction*m_dtCorr[ispecies][4] + (1.0-fraction)*m_dtCorr[ispecies][5];
702 if( ispecies==4 && betaGamma*
xmass(4)<0.8 ) {
708 double nbgbin = 20.0;
709 double bgbegin = 0.3;
712 bgstep = (bgend-bgbegin)/nbgbin;
714 int izbin =
static_cast<int>((zrhit1-
zbegin)/zstep);
715 if( izbin<0 ) { izbin=0; }
716 else if( izbin>=nzbin ) { izbin=nzbin-1; }
717 int ibgbin =
static_cast<int>((betaGamma*
xmass(4)-bgbegin)/bgstep);
718 if( ibgbin<0 ) { ibgbin=0; }
719 else if( ibgbin>=nbgbin ) { ibgbin=nbgbin-1; }
722 tcorr = m_p_offset_12[0][6][ibgbin][izbin];
725 tcorr = m_p_offset_12[1][6][ibgbin][izbin];
728 deltaT = deltaT - tcorr;
734double TofCorrPID::sigmaTof(
unsigned int ispecies,
int charge,
bool barrel,
unsigned int ipmt,
int tofid[2],
double zrhit[2],
double betaGamma ) {
736 double sigma = 1.0e-6;
738 if( ispecies==0 || ispecies==1 ) {
777double TofCorrPID::sigmaTof(
unsigned int ispecies,
int charge,
bool barrel,
unsigned int ipmt,
double zrhit,
double betaGamma ) {
782 if( ispecies==4 && (betaGamma*
xmass(4))<0.8 ) {
783 double nbgbin = 20.0;
784 double bgbegin = 0.3;
787 bgstep = (bgend-bgbegin)/nbgbin;
788 ibgbin =
static_cast<int>((betaGamma*
xmass(4)-bgbegin)/bgstep);
790 if( ibgbin<0 ) { ibgbin=0; }
791 else if( ibgbin>=nbgbin ) { ibgbin=nbgbin-1; }
799 izbin =
static_cast<int>((zrhit-
zbegin)/zstep);
800 if( izbin<0 ) { izbin=0; }
801 else if( izbin>=nzbin ) { izbin=nzbin-1; }
809 izbin =
static_cast<int>((zrhit-
zbegin)/zstep);
810 if( izbin<0 ) { izbin=0; }
811 else if( izbin>=nzbin ) { izbin=nzbin-1; }
815 unsigned int numParam = 4;
817 for(
unsigned int i=0; i<4; i++ ) {
818 if( i==0 ) { func[i] = 1.0; }
820 func[i] = func[i-1]*zrhit;
823 for(
unsigned int i=4; i<12; i++ ) {
829 if( ispecies==2 || ispecies==3 ) {
830 for(
unsigned int i=4; i<10; i++ ) {
831 func[i] = func[i-1]*zrhit;
833 func[10] = 1.0/(115.0-zrhit)/(115.0-zrhit);
834 func[11] = 1.0/(115.0+zrhit)/(115.0+zrhit);
837 else if( ispecies==4 ) {
838 for(
unsigned int i=4; i<12; i++ ) {
839 func[i] = func[i-1]*zrhit;
848 unsigned int inumber =
ipmt;
849 if( !barrel ) { inumber=7; }
852 if( ispecies==2 || ispecies==3 ) {
853 for(
unsigned int i=0; i<numParam; i++ ) {
854 sigma += m_par_sigma[ispecies-2][inumber][i]*func[i];
857 else if( ispecies==4 ) {
862 sigma = m_p_sigma_12[0][inumber][ibgbin][izbin];
865 sigma = m_p_sigma_12[1][inumber][ibgbin][izbin];
870 sigma = m_p_sigma_ec12[0][ibgbin][izbin];
873 sigma = m_p_sigma_ec12[1][ibgbin][izbin];
876 if( fabs(
sigma+999.0)<1.0e-6 ) {
881 for(
unsigned int i=0; i<numParam; i++ ) {
883 sigma += m_par_sigma[2][inumber][i]*func[i];
886 sigma += m_par_sigma[3][inumber][i]*func[i];
896 sigma =
sigma*(TMath::Exp((betaGamma-0.356345)/(-0.767124))+0.994072);
906 if( layer>=3 || betaGamma<0.0 ) {
907 cout <<
"Particle::TofCorrPID::qCurveFunc: the input parameter are NOT correct! Please check them!" << endl;
911 double beta = betaGamma/sqrt(1.0+betaGamma*betaGamma);
912 double logterm = log( m_q0_bg[layer][2]+pow((1.0/betaGamma), m_q0_bg[layer][4] ) );
913 q0 = m_q0_bg[layer][0]*( m_q0_bg[layer][1]-pow( beta, m_q0_bg[layer][3] ) - logterm )/pow( beta, m_q0_bg[layer][3] );
924 func[2] = zrhit*zrhit;
925 func[3] = zrhit*zrhit*zrhit;
926 func[4] = zrhit*zrhit*zrhit*zrhit;
929 for(
unsigned int i=0; i<5; i++ ) {
930 sigma += m_p_weight[tofid][end][i]*func[i];
939 double sigma1 =
bSigma( 2, tofid[0], zrhit[0] );
940 double sigma2 =
bSigma( 2, tofid[1], zrhit[1] );
941 double sigmaCorr2 = m_p_common*m_p_common;
942 double sigma = ( sigma1*sigma1*sigma2*sigma2 - sigmaCorr2*sigmaCorr2 )/( sigma1*sigma1 + sigma2*sigma2 - 2.0*sigmaCorr2 );
954 func[2] = zrhit*zrhit;
957 for(
unsigned int i=0; i<3; i++ ) {
958 sigma += m_ec_sigma[tofid][i]*func[i];
969 for(
unsigned int i=0; i<5; i++ ) {
972 if( fabs(ppp) > pdftemp) { pdftemp = fabs(ppp); }
976 if( !good )
return chiCut;
const Hep3Vector tof1Position() const
const Hep3Vector tof2Position() const
static void setPidType(PidType pidType)
const HepLorentzVector p4() const
bool isMdcKalTrackValid()
SmartRefVector< RecTofTrack > tofTrack()
RecMdcKalTrack * mdcKalTrack()
EvtRecTrack * PidTrk() const
double probCalculate(double chi2, int n)
double pdfCalculate(double offset, double sigma)
double pdfMinSigmaCut() const
void inputParameter(int run)
double qCurveFunc(unsigned int layer, double betaGamma)
int particleIDCalculation()
double sigma(int n) const
double offset(int n) const
double sigmaTof(unsigned int ispecies, int charge, bool barrel, unsigned int ipmt, int tofid[2], double zrhit[2], double betaGamma)
double bSigma(unsigned int end, int tofid, double zrhit)
double offsetTof(unsigned int ispecies, bool barrel, unsigned int ipmt, double betaGamma, int charge, double zrhit, double dt)
static TofCorrPID * instance()
double eSigma(int tofid, double zrhit)
bool correlationCheck(unsigned int ipmt)
unsigned int layer() const
void setStatus(unsigned int status)