#include <DedxPID.h>
Inheritance diagram for DedxPID:
Public Member Functions | |
int | all () const |
int | all () const |
void | calculate () |
void | calculate () |
double | charge () |
double | charge () |
double | chi (int n) const |
double | chi (int n) const |
double | chiMinCut () const |
double | chiMinCut () const |
int | dedxValid () const |
int | dedxValid () const |
int | emcValid () const |
int | emcValid () const |
int | getNhitCutDx () const |
int | getNhitCutDx () const |
double | getRunNo () const |
double | getRunNo () const |
double | goodHits () const |
double | goodHits () const |
void | init () |
void | init () |
double | interpolation (double *x, double *y, double x1) |
double | interpolation (double *x, double *y, double x1) |
bool | IsPidInfoValid () const |
bool | IsPidInfoValid () const |
int | methodLikelihood () const |
int | methodLikelihood () const |
int | methodNeuronNetwork () const |
int | methodNeuronNetwork () const |
int | methodProbability () const |
int | methodProbability () const |
int | mucValid () const |
int | mucValid () const |
int | ndof () const |
int | ndof () const |
int | neuronPID () const |
int | neuronPID () const |
double | normPH () const |
double | normPH () const |
double | offset (int n) const |
double | offset (int n) const |
int | onlyElectron () const |
int | onlyElectron () const |
int | onlyKaon () const |
int | onlyKaon () const |
int | onlyMuon () const |
int | onlyMuon () const |
int | onlyPion () const |
int | onlyPion () const |
int | onlyPionKaon () const |
int | onlyPionKaon () const |
int | onlyPionKaonElectron () const |
int | onlyPionKaonElectron () const |
int | onlyPionKaonProton () const |
int | onlyPionKaonProton () const |
int | onlyProton () const |
int | onlyProton () const |
double | p () |
double | p () |
double | pdfCalculate (double offset, double sigma) |
double | pdfCalculate (double offset, double sigma) |
double | pdfMinSigmaCut () const |
double | pdfMinSigmaCut () const |
EvtRecTrack * | PidTrk () const |
EvtRecTrack * | PidTrk () const |
double | pol2 (double x, double *par) |
double | pol2 (double x, double *par) |
double | pol3 (double x, double *par) |
double | pol3 (double x, double *par) |
double | pol4 (double x, double *par) |
double | pol4 (double x, double *par) |
double | prob (int n) const |
double | prob (int n) const |
double | probCalculate (double chi2, int n) |
double | probCalculate (double chi2, int n) |
double | pt () |
double | pt () |
void | setChiMinCut (const double chi=4) |
void | setChiMinCut (const double chi=4) |
void | setNhitCutDx (const int nhitcuthdx=5) |
void | setNhitCutDx (const int nhitcuthdx=5) |
void | setPdfMinSigmaCut (const double pdf=4) |
void | setPdfMinSigmaCut (const double pdf=4) |
void | setRecTrack (EvtRecTrack *trk) |
void | setRecTrack (EvtRecTrack *trk) |
void | setRunNo (const double runh=8093) |
void | setRunNo (const double runh=8093) |
double | sigma (int n) const |
double | sigma (int n) const |
int | tofcValid () const |
int | tofcValid () const |
int | tofeValid () const |
int | tofeValid () const |
int | tofqValid () const |
int | tofqValid () const |
int | tofValid () const |
int | tofValid () const |
int | useDedx () const |
int | useDedx () const |
int | useEmc () const |
int | useEmc () const |
int | useMuc () const |
int | useMuc () const |
int | useTof () const |
int | useTof () const |
int | useTof1 () const |
int | useTof1 () const |
int | useTof2 () const |
int | useTof2 () const |
int | useTofC () const |
int | useTofC () const |
int | useTofE () const |
int | useTofE () const |
int | useTofQ () const |
int | useTofQ () const |
double | velc () |
double | velc () |
double | xmass (int n) |
double | xmass (int n) |
~DedxPID () | |
~DedxPID () | |
Static Public Member Functions | |
DedxPID * | instance () |
DedxPID * | instance () |
Protected Member Functions | |
double | cal_par (int index1, double *m_jpsi_pip_ptrk_offset, double ptrk, double begin, double bin) |
double | cal_par (int index1, double *m_jpsi_pip_ptrk_offset, double ptrk, double begin, double bin) |
double | CorrDedx (int n, double ptrk, double cost, double chi, int charge) |
double | CorrDedx (int n, double ptrk, double cost, double chi, int charge) |
void | inputpar () |
void | inputpar () |
double | iterate (double ptrk, double *mean, double *p) |
double | iterate (double ptrk, double *mean, double *p) |
int | LikelihoodCalculation () |
int | LikelihoodCalculation () |
double | mypol3 (double x, double par0, double par1, double par2, double par3) |
double | mypol3 (double x, double par0, double par1, double par2, double par3) |
double | mypol5 (double x, double par0, double par1, double par2, double par3, double par4, double par5) |
double | mypol5 (double x, double par0, double par1, double par2, double par3, double par4, double par5) |
int | neuronPIDCalculation () |
int | neuronPIDCalculation () |
double | offsetDedx (int n, double ptrk, double cost) |
double | offsetDedx (int n, double ptrk, double cost) |
int | particleIDCalculation () |
int | particleIDCalculation () |
double | sigmaDedx (int n, double ptrk, double cost) |
double | sigmaDedx (int n, double ptrk, double cost) |
Private Member Functions | |
DedxPID () | |
DedxPID () | |
Private Attributes | |
double | m_chi [5] |
double | m_chimin |
double | m_goodHits |
double | m_jpsi_kam_ptrk_offset [12] |
double | m_jpsi_kam_ptrk_sigma [12] |
double | m_jpsi_kam_theta_offset [18] |
double | m_jpsi_kam_theta_sigma [18] |
double | m_jpsi_kap_ptrk_offset [12] |
double | m_jpsi_kap_ptrk_sigma [12] |
double | m_jpsi_kap_theta_offset [18] |
double | m_jpsi_kap_theta_sigma [18] |
double | m_jpsi_mc_kam_ptrk_offset [12] |
double | m_jpsi_mc_kam_ptrk_sigma [12] |
double | m_jpsi_mc_kam_theta_offset [18] |
double | m_jpsi_mc_kam_theta_sigma [18] |
double | m_jpsi_mc_kap_ptrk_offset [12] |
double | m_jpsi_mc_kap_ptrk_sigma [12] |
double | m_jpsi_mc_kap_theta_offset [18] |
double | m_jpsi_mc_kap_theta_sigma [18] |
double | m_jpsi_mc_protonm_ptrk_offset [8] |
double | m_jpsi_mc_protonm_ptrk_sigma [8] |
double | m_jpsi_mc_protonm_theta_offset [18] |
double | m_jpsi_mc_protonm_theta_sigma [18] |
double | m_jpsi_mc_protonp_ptrk_offset [8] |
double | m_jpsi_mc_protonp_ptrk_sigma [8] |
double | m_jpsi_mc_protonp_theta_offset [18] |
double | m_jpsi_mc_protonp_theta_sigma [18] |
double | m_jpsi_protonm_ptrk_offset [8] |
double | m_jpsi_protonm_ptrk_sigma [8] |
double | m_jpsi_protonm_theta_offset [18] |
double | m_jpsi_protonm_theta_sigma [18] |
double | m_jpsi_protonp_ptrk_offset [8] |
double | m_jpsi_protonp_ptrk_sigma [8] |
double | m_jpsi_protonp_theta_offset [18] |
double | m_jpsi_protonp_theta_sigma [18] |
int | m_ndof |
int | m_nhitcutdx |
double | m_normPH |
double | m_offset [5] |
double | m_pdfmin |
double | m_prob [5] |
double | m_probPH |
double | m_psip_kam_ptrk_offset [9] |
double | m_psip_kam_ptrk_sigma [9] |
double | m_psip_kap_ptrk_offset [9] |
double | m_psip_kap_ptrk_sigma [9] |
double | m_psip_mc_kam_ptrk_offset [9] |
double | m_psip_mc_kam_ptrk_sigma [9] |
double | m_psip_mc_kap_ptrk_offset [9] |
double | m_psip_mc_kap_ptrk_sigma [9] |
double | m_psip_mc_protonm_ptrk_offset [9] |
double | m_psip_mc_protonm_ptrk_sigma [9] |
double | m_psip_mc_protonp_ptrk_offset [9] |
double | m_psip_mc_protonp_ptrk_sigma [9] |
double | m_psip_protonm_ptrk_offset [9] |
double | m_psip_protonm_ptrk_sigma [9] |
double | m_psip_protonp_ptrk_offset [9] |
double | m_psip_protonp_ptrk_sigma [9] |
double | m_psipp_ka_ptrk_offset [17] |
double | m_psipp_ka_ptrk_sigma [17] |
double | m_psipp_ka_theta_offset [16] |
double | m_psipp_ka_theta_sigma [16] |
double | m_psipp_mc_ka_ptrk_offset [17] |
double | m_psipp_mc_ka_ptrk_sigma [17] |
double | m_psipp_mc_ka_theta_offset [16] |
double | m_psipp_mc_ka_theta_sigma [16] |
double | m_psipp_mc_pi_ptrk_offset [18] |
double | m_psipp_mc_pi_ptrk_sigma [18] |
double | m_psipp_mc_pi_theta_offset [16] |
double | m_psipp_mc_pi_theta_sigma [16] |
double | m_psipp_mc_proton_ptrk_offset [9] |
double | m_psipp_mc_proton_ptrk_sigma [9] |
double | m_psipp_mc_proton_theta_offset [18] |
double | m_psipp_mc_proton_theta_sigma [18] |
double | m_psipp_pi_ptrk_offset [18] |
double | m_psipp_pi_ptrk_sigma [18] |
double | m_psipp_pi_theta_offset [16] |
double | m_psipp_pi_theta_sigma [16] |
double | m_psipp_proton_ptrk_offset [18] |
double | m_psipp_proton_ptrk_sigma [18] |
double | m_psipp_proton_theta_offset [18] |
double | m_psipp_proton_theta_sigma [18] |
int | m_readstate |
int | m_runxx |
double | m_sigma [5] |
Static Private Attributes | |
DedxPID * | m_pointer |
DedxPID * | m_pointer = 0 |
|
00021 {;}
|
|
00014 :ParticleIDBase(){ 00015 m_readstate=0; 00016 }
|
|
00021 {;}
|
|
|
|
00091 {return (IDENTIFY_ELECTRON | IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_PROTON);}
|
|
00091 {return (IDENTIFY_ELECTRON | IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_PROTON);}
|
|
|
|
00713 { 00714 double mean1[3],p[3]; 00715 p[0]=begin+(index1-1)*bin; 00716 p[1]=begin+index1*bin; 00717 p[2]=begin+(index1+1)*bin; 00718 mean1[0]=m_jpsi_pip_ptrk_offset[index1-1]; 00719 mean1[1]=m_jpsi_pip_ptrk_offset[index1]; 00720 mean1[2]=m_jpsi_pip_ptrk_offset[index1+1]; 00721 double res=iterate(ptrk,mean1,p); 00722 return res; 00723 }
|
|
Implements ParticleIDBase. |
|
Implements ParticleIDBase. 00034 { 00035 int rundedx = getRunNo(); 00036 if(!m_readstate){ 00037 inputpar(); 00038 m_readstate=1;} 00039 if(particleIDCalculation() == 0) m_ndof=1; 00040 }
|
|
|
|
00077 { 00078 double val = 999; 00079 if(!m_trk) return val; 00080 if(!m_trk->isMdcTrackValid()) return val; 00081 RecMdcTrack *mdcTrk = m_trk->mdcTrack(); 00082 val = mdcTrk->charge() + 0.0; 00083 }
|
|
Implements ParticleIDBase. 00026 {return m_chi[n];}
|
|
Implements ParticleIDBase. 00026 {return m_chi[n];}
|
|
00052 {return m_chimin_cut;}
|
|
00052 {return m_chimin_cut;}
|
|
|
|
00113 { 00114 int rundedx2 = getRunNo(); 00115 double offset = 0.0; 00116 double offsetp = 0.0; 00117 double offsetc = 0.0; 00118 double sigcos = 1; 00119 double sigp = 1; 00120 double chicor=chi; 00121 double gb = ptrk/xmass(n); 00122 00123 switch(n) { 00124 case 0: { // Electron 00125 break; 00126 } 00127 00128 case 1: {// Muon 00129 break; 00130 } 00131 00132 case 2: {// Pion 00133 double ptemp = ptrk; 00134 double costm = cost; 00135 if(ptrk<0.1||ptrk>1) break; 00136 int index = int((ptrk-0.1)/0.05); 00137 if(index<=0) index=1; 00138 if(index>=17) index=16; 00139 00140 if(fabs(costm)>=0.8) break; 00141 int index1 = int((costm+0.8)/0.1); 00142 if(index1<=0) index1=1; 00143 if(index1>=15) index1=14; 00144 00145 //psipp data 00146 if(rundedx2>=11414&&rundedx2<=14604){ 00147 offsetp = cal_par(index,m_psipp_pi_ptrk_offset,ptrk,0.125,0.05); 00148 sigp = cal_par(index,m_psipp_pi_ptrk_sigma,ptrk,0.125,0.05); 00149 offsetc = cal_par(index1,m_psipp_pi_theta_offset,costm,-0.75,0.1); 00150 sigcos = cal_par(index1,m_psipp_pi_theta_sigma,costm,-0.75,0.1); 00151 } 00152 //psipp mc 00153 if(rundedx2<=-11414&&rundedx2>=-14604){ 00154 offsetp = cal_par(index,m_psipp_mc_pi_ptrk_offset,ptrk,0.125,0.05); 00155 sigp = cal_par(index,m_psipp_mc_pi_ptrk_sigma,ptrk,0.125,0.05); 00156 offsetc = cal_par(index1,m_psipp_mc_pi_theta_offset,costm,-0.75,0.1); 00157 sigcos = cal_par(index1,m_psipp_mc_pi_theta_sigma,costm,-0.75,0.1); 00158 } 00159 00160 offset=offsetp+sigp*offsetc; 00161 chicor=(chicor-offset)/(sigcos*sigp); 00162 break; 00163 } 00164 00165 case 3: {// Kaon 00166 double ptemp = ptrk; 00167 double costm = cost; 00168 if(ptrk<0.3||ptrk>0.8) break; 00169 offset=0; 00170 int index = int((ptrk-0.3)/0.1); 00171 if(index<=0) index=1; 00172 if(index>=4) index=3; 00173 00174 int index1 = int((costm+0.9)/0.1); 00175 if(index1<=0) index1=1; 00176 if(index1>=17) index1=16; 00177 //data Jpsi 00178 if(rundedx2>=9947&&rundedx2<=10878){ 00179 if(charge>0){ 00180 offsetp = cal_par(index,m_jpsi_kap_ptrk_offset,ptrk,0.35,0.1); 00181 sigp = cal_par(index,m_jpsi_kap_ptrk_sigma,ptrk,0.35,0.1); 00182 if(fabs(costm)<=0.83){ 00183 offsetc = cal_par(index1,m_jpsi_kap_theta_offset,costm,-0.85,0.1); 00184 sigcos = cal_par(index1,m_jpsi_kap_theta_sigma,costm,-0.85,0.1); 00185 } 00186 } 00187 if(charge<0){ 00188 offsetp = cal_par(index,m_jpsi_kam_ptrk_offset,ptrk,0.35,0.1); 00189 sigp = cal_par(index,m_jpsi_kam_ptrk_sigma,ptrk,0.35,0.1); 00190 if(fabs(costm)<=0.83){ 00191 offsetc = cal_par(index1,m_jpsi_kam_theta_offset,costm,-0.85,0.1); 00192 sigcos = cal_par(index1,m_jpsi_kam_theta_sigma,costm,-0.85,0.1); 00193 } 00194 } 00195 } 00196 00197 //mc Jpsi 00198 if(rundedx2<=-9947&&rundedx2>=-10878){ 00199 if(charge>0){ 00200 offsetp = cal_par(index,m_jpsi_mc_kap_ptrk_offset,ptrk,0.35,0.1); 00201 sigp = cal_par(index,m_jpsi_mc_kap_ptrk_sigma,ptrk,0.35,0.1); 00202 if(fabs(costm)<=0.83){ 00203 offsetc = cal_par(index1,m_jpsi_mc_kap_theta_offset,costm,-0.85,0.1); 00204 sigcos = cal_par(index1,m_jpsi_mc_kap_theta_sigma,costm,-0.85,0.1); 00205 } 00206 } 00207 if(charge<0){ 00208 offsetp = cal_par(index,m_jpsi_mc_kam_ptrk_offset,ptrk,0.35,0.1); 00209 sigp = cal_par(index,m_jpsi_mc_kam_ptrk_sigma,ptrk,0.35,0.1); 00210 if(fabs(costm)<=0.83){ 00211 offsetc = cal_par(index1,m_jpsi_mc_kam_theta_offset,costm,-0.85,0.1); 00212 sigcos = cal_par(index1,m_jpsi_mc_kam_theta_sigma,costm,-0.85,0.1); 00213 } 00214 } 00215 } 00216 00217 //data Psip 00218 if(rundedx2>=8093&&rundedx2<=9025){ 00219 if(ptrk<0.3||ptrk>1.2) break; 00220 index = int((ptrk-0.3)/0.1); 00221 if(index<=0) index=1; 00222 if(index>=8) index=7; 00223 if(charge>0){ 00224 offsetp = cal_par(index,m_psip_kap_ptrk_offset,ptrk,0.35,0.1); 00225 sigp = cal_par(index,m_psip_kap_ptrk_sigma,ptrk,0.35,0.1); 00226 } 00227 if(charge<0){ 00228 offsetp = cal_par(index,m_psip_kam_ptrk_offset,ptrk,0.35,0.1); 00229 sigp = cal_par(index,m_psip_kam_ptrk_sigma,ptrk,0.35,0.1); 00230 } 00231 } 00232 00233 //mc Psip 00234 if(rundedx2<=-8093&&rundedx2>=-9025){ 00235 // if(ptrk < 0.4) ptrk = 0.4; 00236 if(ptrk<0.3||ptrk>1.2) break; 00237 index = int((ptrk-0.3)/0.1); 00238 if(index<=0) index=1; 00239 if(index>=8) index=7; 00240 if(charge>0){ 00241 offsetp = cal_par(index,m_psip_mc_kap_ptrk_offset,ptrk,0.35,0.1); 00242 sigp = cal_par(index,m_psip_mc_kap_ptrk_sigma,ptrk,0.35,0.1); 00243 } 00244 if(charge<0){ 00245 offsetp = cal_par(index,m_psip_mc_kam_ptrk_offset,ptrk,0.35,0.1); 00246 sigp = cal_par(index,m_psip_mc_kam_ptrk_sigma,ptrk,0.35,0.1); 00247 } 00248 } 00249 00250 00251 //psipp kaon data 00252 if(rundedx2>=11414&&rundedx2<=14604){ 00253 if(ptrk<0.15||ptrk>1) break; 00254 index = int((ptrk-0.15)/0.05); 00255 if(index<=0) index=1; 00256 if(index>=16) index=15; 00257 if(fabs(costm)>=0.8) break; 00258 index1 = int((costm+0.8)/0.1); 00259 if(index1<=0) index1=1; 00260 if(index1>=15) index1=14; 00261 00262 offsetp = cal_par(index,m_psipp_ka_ptrk_offset,ptrk,0.175,0.05); 00263 sigp = cal_par(index,m_psipp_ka_ptrk_sigma,ptrk,0.175,0.05); 00264 offsetc = cal_par(index1,m_psipp_ka_theta_offset,costm,-0.75,0.1); 00265 sigcos = cal_par(index1,m_psipp_ka_theta_sigma,costm,-0.75,0.1); 00266 } 00267 //psipp kaon mc 00268 if(rundedx2<=-11414&&rundedx2>=-14604){ 00269 if(ptrk<0.15||ptrk>1) break; 00270 index = int((ptrk-0.15)/0.05); 00271 if(index<=0) index=1; 00272 if(index>=16) index=15; 00273 if(fabs(costm)>=0.8) break; 00274 index1 = int((costm+0.8)/0.1); 00275 if(index1<=0) index1=1; 00276 if(index1>=15) index1=14; 00277 offsetp = cal_par(index,m_psipp_mc_ka_ptrk_offset,ptrk,0.175,0.05); 00278 sigp = cal_par(index,m_psipp_mc_ka_ptrk_sigma,ptrk,0.175,0.05); 00279 offsetc = cal_par(index1,m_psipp_mc_ka_theta_offset,costm,-0.75,0.1); 00280 sigcos = cal_par(index1,m_psipp_mc_ka_theta_sigma,costm,-0.75,0.1); 00281 } 00282 00283 offset=offsetp+sigp*offsetc; 00284 chicor=(chicor-offset)/(sigcos*sigp); 00285 break; 00286 } 00287 00288 case 4 : { // Proton 00289 double ptemp = ptrk; 00290 double costm = cost; 00291 if(ptrk<0.3||ptrk>1.1) break; 00292 int index = int((ptrk-0.3)/0.1); 00293 if(index<=0) index=1; 00294 if(index>=7) index=6; 00295 00296 int index1 = int((costm+0.9)/0.1); 00297 if(index1<=0) index1=1; 00298 if(index1>=17) index1=16; 00299 00300 // double plog = log(ptemp); 00301 offset=0; 00302 if(rundedx2>=9947&&rundedx2<=10878){ 00303 if(charge>0){ 00304 offsetp = cal_par(index,m_jpsi_protonp_ptrk_offset,ptrk,0.35,0.1); 00305 sigp = cal_par(index,m_jpsi_protonp_ptrk_sigma,ptrk,0.35,0.1); 00306 if(fabs(costm)<=0.83){ 00307 offsetc = cal_par(index1,m_jpsi_protonp_theta_offset,costm,-0.85,0.1); 00308 sigcos = cal_par(index1,m_jpsi_protonp_theta_sigma,costm,-0.85,0.1); 00309 } 00310 } 00311 if(charge<0){ 00312 offsetp = cal_par(index,m_jpsi_protonm_ptrk_offset,ptrk,0.35,0.1); 00313 sigp = cal_par(index,m_jpsi_protonm_ptrk_sigma,ptrk,0.35,0.1); 00314 if(fabs(costm)<=0.83){ 00315 offsetc = cal_par(index1,m_jpsi_protonm_theta_offset,costm,-0.85,0.1); 00316 sigcos = cal_par(index1,m_jpsi_protonm_theta_sigma,costm,-0.85,0.1); 00317 } 00318 } 00319 } 00320 00321 //mc JPsi 00322 if(rundedx2<=-9947&&rundedx2>=-10878){ 00323 if(charge>0){ 00324 offsetp = cal_par(index,m_jpsi_mc_protonp_ptrk_offset,ptrk,0.35,0.1); 00325 sigp = cal_par(index,m_jpsi_mc_protonp_ptrk_sigma,ptrk,0.35,0.1); 00326 if(fabs(costm)<=0.83){ 00327 offsetc = cal_par(index1,m_jpsi_mc_protonp_theta_offset,costm,-0.85,0.1); 00328 sigcos = cal_par(index1,m_jpsi_mc_protonp_theta_sigma,costm,-0.85,0.1); 00329 } 00330 } 00331 if(charge<0){ 00332 offsetp = cal_par(index,m_jpsi_mc_protonm_ptrk_offset,ptrk,0.35,0.1); 00333 sigp = cal_par(index,m_jpsi_mc_protonm_ptrk_sigma,ptrk,0.35,0.1); 00334 if(fabs(costm)<=0.83){ 00335 offsetc = cal_par(index1,m_jpsi_mc_protonm_theta_offset,costm,-0.85,0.1); 00336 sigcos = cal_par(index1,m_jpsi_mc_protonm_theta_sigma,costm,-0.85,0.1); 00337 } 00338 } 00339 } 00340 00341 //data Psip 00342 if(rundedx2>=8093&&rundedx2<=9025){ 00343 if(charge>0){ 00344 offsetp = cal_par(index,m_psip_protonp_ptrk_offset,ptrk,0.35,0.1); 00345 sigp = cal_par(index,m_psip_protonp_ptrk_sigma,ptrk,0.35,0.1); 00346 } 00347 if(charge<0){ 00348 offsetp = cal_par(index,m_psip_protonm_ptrk_offset,ptrk,0.35,0.1); 00349 sigp = cal_par(index,m_psip_protonm_ptrk_sigma,ptrk,0.35,0.1); 00350 } 00351 } 00352 00353 //mc Psip 00354 if(rundedx2<=-8093&&rundedx2>=-9025){ 00355 if(charge>0){ 00356 offsetp = cal_par(index,m_psip_mc_protonp_ptrk_offset,ptrk,0.35,0.1); 00357 sigp = cal_par(index,m_psip_mc_protonp_ptrk_sigma,ptrk,0.35,0.1); 00358 } 00359 if(charge<0){ 00360 offsetp = cal_par(index,m_psip_mc_protonm_ptrk_offset,ptrk,0.35,0.1); 00361 sigp = cal_par(index,m_psip_mc_protonm_ptrk_sigma,ptrk,0.35,0.1); 00362 } 00363 } 00364 00365 //psipp proton data 00366 if(rundedx2>=11414&&rundedx2<=14604){ 00367 if(ptrk<0.2||ptrk>1.1) break; 00368 index = int((ptrk-0.2)/0.05); 00369 if(index<=0) index=1; 00370 if(index>=17) index=16; 00371 if(fabs(costm)>=0.83) break; 00372 index1 = int((costm+0.9)/0.1); 00373 if(index1<=0) index1=1; 00374 if(index1>=17) index1=16; 00375 00376 offsetp = cal_par(index,m_psipp_proton_ptrk_offset,ptrk,0.225,0.05); 00377 sigp = cal_par(index,m_psipp_proton_ptrk_sigma,ptrk,0.225,0.05); 00378 offsetc = cal_par(index1,m_psipp_proton_theta_offset,costm,-0.85,0.1); 00379 sigcos = cal_par(index1,m_psipp_proton_theta_sigma,costm,-0.85,0.1); 00380 } 00381 //psipp proton mc 00382 if(rundedx2<=-11414&&rundedx2>=-14604){ 00383 if(ptrk<0.2||ptrk>1.1) break; 00384 index = int((ptrk-0.2)/0.1); 00385 if(index<=0) index=1; 00386 if(index>=8) index=7; 00387 if(fabs(costm)>=0.83) break; 00388 index1 = int((costm+0.9)/0.1); 00389 if(index1<=0) index1=1; 00390 if(index1>=17) index1=16; 00391 offsetp = cal_par(index,m_psipp_mc_proton_ptrk_offset,ptrk,0.25,0.1); 00392 sigp = cal_par(index,m_psipp_mc_proton_ptrk_sigma,ptrk,0.25,0.1); 00393 offsetc = cal_par(index1,m_psipp_mc_proton_theta_offset,costm,-0.85,0.1); 00394 sigcos = cal_par(index1,m_psipp_mc_proton_theta_sigma,costm,-0.85,0.1); 00395 } 00396 offset=offsetp+sigp*offsetc; 00397 chicor=(chicor-offset)/(sigcos*sigp); 00398 break; 00399 } 00400 00401 default: 00402 offset = 0.0; 00403 break; 00404 } 00405 // offset = 0.0; 00406 return chicor; 00407 }
|
|
00103 {return DEDX_VALID;}
|
|
00103 {return DEDX_VALID;}
|
|
00108 {return EMC_VALID;}
|
|
00108 {return EMC_VALID;}
|
|
00034 {return m_nhitcutdx;}
|
|
00034 {return m_nhitcutdx;}
|
|
00056 {return m_runno;}
|
|
00056 {return m_runno;}
|
|
00032 {return m_goodHits;}
|
|
00032 {return m_goodHits;}
|
|
Implements ParticleIDBase. |
|
Implements ParticleIDBase. 00018 { 00019 for(int i = 0; i < 5; i++) { 00020 m_chi[i] = 99.0; 00021 m_prob[i] = -1.0; 00022 m_offset[i] = 99.0; 00023 m_sigma[i] = 1.0; 00024 } 00025 m_chimin = 99.; 00026 m_pdfmin =99; 00027 m_ndof = 0; 00028 m_goodHits = -99; 00029 m_normPH = -99; 00030 m_probPH = -99; 00031 m_nhitcutdx=5; 00032 }
|
|
|
|
00474 { 00475 00476 //Jpsi ka+ momentum correction 00477 std::string jpsi_kap_mom =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/kaon/dedx_kap.txt"; 00478 std::string jpsi_kap_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/kaon/dedx_kap_mc.txt"; 00479 ifstream inputmomdata6(jpsi_kap_mom.c_str(),std::ios_base::in); 00480 ifstream inputmomdata6mc(jpsi_kap_mom_mc.c_str(),std::ios_base::in); 00481 for(int i=0; i<12; i++){ 00482 inputmomdata6>>m_jpsi_kap_ptrk_offset[i]; 00483 inputmomdata6>>m_jpsi_kap_ptrk_sigma[i]; 00484 inputmomdata6mc>>m_jpsi_mc_kap_ptrk_offset[i]; 00485 inputmomdata6mc>>m_jpsi_mc_kap_ptrk_sigma[i]; 00486 } 00487 00488 //Jpsi ka- momentum correction 00489 std::string jpsi_kam_mom =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/kaon/dedx_kam.txt"; 00490 std::string jpsi_kam_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/kaon/dedx_kam_mc.txt"; 00491 ifstream inputmomdata7(jpsi_kam_mom.c_str(),std::ios_base::in); 00492 ifstream inputmomdata7mc(jpsi_kam_mom_mc.c_str(),std::ios_base::in); 00493 for(int i=0; i<12; i++){ 00494 inputmomdata7>>m_jpsi_kam_ptrk_offset[i]; 00495 inputmomdata7>>m_jpsi_kam_ptrk_sigma[i]; 00496 inputmomdata7mc>>m_jpsi_mc_kam_ptrk_offset[i]; 00497 inputmomdata7mc>>m_jpsi_mc_kam_ptrk_sigma[i]; 00498 00499 } 00500 00501 00502 //Jpsi ka+ theta correction 00503 std::string jpsi_kap_the =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/kaon/dedx_kap_theta.txt"; 00504 std::string jpsi_kap_the_mc =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/kaon/dedx_kap_theta_mc.txt"; 00505 ifstream inputmomdata8(jpsi_kap_the.c_str(),std::ios_base::in); 00506 ifstream inputmomdata8mc(jpsi_kap_the_mc.c_str(),std::ios_base::in); 00507 for(int i=0; i<18; i++){ 00508 inputmomdata8>>m_jpsi_kap_theta_offset[i]; 00509 inputmomdata8>>m_jpsi_kap_theta_sigma[i]; 00510 inputmomdata8mc>>m_jpsi_mc_kap_theta_offset[i]; 00511 inputmomdata8mc>>m_jpsi_mc_kap_theta_sigma[i]; 00512 } 00513 00514 //Jpsi ka- theta correction 00515 std::string jpsi_kam_the =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/kaon/dedx_kam_theta.txt"; 00516 std::string jpsi_kam_the_mc =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/kaon/dedx_kam_theta_mc.txt"; 00517 ifstream inputmomdata9(jpsi_kam_the.c_str(),std::ios_base::in); 00518 ifstream inputmomdata9mc(jpsi_kam_the_mc.c_str(),std::ios_base::in); 00519 for(int i=0; i<18; i++){ 00520 inputmomdata9>>m_jpsi_kam_theta_offset[i]; 00521 inputmomdata9>>m_jpsi_kam_theta_sigma[i]; 00522 inputmomdata9mc>>m_jpsi_mc_kam_theta_offset[i]; 00523 inputmomdata9mc>>m_jpsi_mc_kam_theta_sigma[i]; 00524 } 00525 00526 //Jpsi proton+ momentum correction 00527 std::string jpsi_protonp_mom =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/proton/dedx_protonp.txt"; 00528 std::string jpsi_protonp_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/proton/dedx_protonp_mc.txt"; 00529 ifstream inputmomdata12(jpsi_protonp_mom.c_str(),std::ios_base::in); 00530 ifstream inputmomdata12mc(jpsi_protonp_mom_mc.c_str(),std::ios_base::in); 00531 for(int i=0; i<8; i++){ 00532 inputmomdata12>>m_jpsi_protonp_ptrk_offset[i]; 00533 inputmomdata12>>m_jpsi_protonp_ptrk_sigma[i]; 00534 inputmomdata12mc>>m_jpsi_mc_protonp_ptrk_offset[i]; 00535 inputmomdata12mc>>m_jpsi_mc_protonp_ptrk_sigma[i]; 00536 } 00537 00538 //Jpsi proton- momentum correction 00539 std::string jpsi_protonm_mom =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/proton/dedx_protonm.txt"; 00540 std::string jpsi_protonm_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/proton/dedx_protonm_mc.txt"; 00541 ifstream inputmomdata13(jpsi_protonm_mom.c_str(),std::ios_base::in); 00542 ifstream inputmomdata13mc(jpsi_protonm_mom_mc.c_str(),std::ios_base::in); 00543 for(int i=0; i<8; i++){ 00544 inputmomdata13>>m_jpsi_protonm_ptrk_offset[i]; 00545 inputmomdata13>>m_jpsi_protonm_ptrk_sigma[i]; 00546 inputmomdata13mc>>m_jpsi_mc_protonm_ptrk_offset[i]; 00547 inputmomdata13mc>>m_jpsi_mc_protonm_ptrk_sigma[i]; 00548 } 00549 00550 //Jpsi proton+ theta correction 00551 std::string jpsi_protonp_the =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/proton/dedx_protonp_theta.txt"; 00552 std::string jpsi_protonp_the_mc =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/proton/dedx_protonp_theta_mc.txt"; 00553 00554 ifstream inputmomdata14(jpsi_protonp_the.c_str(),std::ios_base::in); 00555 ifstream inputmomdata14mc(jpsi_protonp_the_mc.c_str(),std::ios_base::in); 00556 for(int i=0; i<18; i++){ 00557 inputmomdata14>>m_jpsi_protonp_theta_offset[i]; 00558 inputmomdata14>>m_jpsi_protonp_theta_sigma[i]; 00559 inputmomdata14mc>>m_jpsi_mc_protonp_theta_offset[i]; 00560 inputmomdata14mc>>m_jpsi_mc_protonp_theta_sigma[i]; 00561 } 00562 00563 //Jpsi proton- theta correction 00564 std::string jpsi_protonm_the =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/proton/dedx_protonm_theta.txt"; 00565 std::string jpsi_protonm_the_mc =string(getenv("PARTICLEIDROOT"))+ "/share/JPsi/proton/dedx_protonm_theta_mc.txt"; 00566 ifstream inputmomdata15(jpsi_protonm_the.c_str(),std::ios_base::in); 00567 ifstream inputmomdata15mc(jpsi_protonm_the_mc.c_str(),std::ios_base::in); 00568 for(int i=0; i<18; i++){ 00569 inputmomdata15>>m_jpsi_protonm_theta_offset[i]; 00570 inputmomdata15>>m_jpsi_protonm_theta_sigma[i]; 00571 inputmomdata15mc>>m_jpsi_mc_protonm_theta_offset[i]; 00572 inputmomdata15mc>>m_jpsi_mc_protonm_theta_sigma[i]; 00573 } 00574 00575 00576 00577 00578 // Psip ka+ momentum correction 00579 std::string psip_kap_mom =string(getenv("PARTICLEIDROOT"))+ "/share/Psip/kaon/dedx_kap.txt"; 00580 std::string psip_kap_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/Psip/kaon/dedx_kap_mc.txt"; 00581 ifstream inputmomdata24(psip_kap_mom.c_str(),std::ios_base::in); 00582 ifstream inputmomdata24mc(psip_kap_mom_mc.c_str(),std::ios_base::in); 00583 for(int i=0; i<9; i++){ 00584 inputmomdata24>>m_psip_kap_ptrk_offset[i]; 00585 inputmomdata24>>m_psip_kap_ptrk_sigma[i]; 00586 inputmomdata24mc>>m_psip_mc_kap_ptrk_offset[i]; 00587 inputmomdata24mc>>m_psip_mc_kap_ptrk_sigma[i]; 00588 } 00589 00590 //Psip ka- momentum correction 00591 std::string psip_kam_mom =string(getenv("PARTICLEIDROOT"))+ "/share/Psip/kaon/dedx_kam.txt"; 00592 std::string psip_kam_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/Psip/kaon/dedx_kam_mc.txt"; 00593 ifstream inputmomdata25(psip_kam_mom.c_str(),std::ios_base::in); 00594 ifstream inputmomdata25mc(psip_kam_mom_mc.c_str(),std::ios_base::in); 00595 for(int i=0; i<9; i++){ 00596 inputmomdata25>>m_psip_kam_ptrk_offset[i]; 00597 inputmomdata25>>m_psip_kam_ptrk_sigma[i]; 00598 inputmomdata25mc>>m_psip_mc_kam_ptrk_offset[i]; 00599 inputmomdata25mc>>m_psip_mc_kam_ptrk_sigma[i]; 00600 } 00601 00602 00603 // Psip proton+ momentum correction 00604 std::string psip_protonp_mom =string(getenv("PARTICLEIDROOT"))+ "/share/Psip/proton/dedx_protonp.txt"; 00605 std::string psip_protonp_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/Psip/proton/dedx_protonp_mc.txt"; 00606 ifstream inputmomdata26(psip_protonp_mom.c_str(),std::ios_base::in); 00607 ifstream inputmomdata26mc(psip_protonp_mom_mc.c_str(),std::ios_base::in); 00608 for(int i=0; i<9; i++){ 00609 inputmomdata26>>m_psip_protonp_ptrk_offset[i]; 00610 inputmomdata26>>m_psip_protonp_ptrk_sigma[i]; 00611 inputmomdata26mc>>m_psip_mc_protonp_ptrk_offset[i]; 00612 inputmomdata26mc>>m_psip_mc_protonp_ptrk_sigma[i]; 00613 } 00614 00615 //Psip proton- momentum correction 00616 std::string psip_protonm_mom =string(getenv("PARTICLEIDROOT"))+ "/share/Psip/proton/dedx_protonm.txt"; 00617 std::string psip_protonm_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/Psip/proton/dedx_protonm_mc.txt"; 00618 ifstream inputmomdata27(psip_protonm_mom.c_str(),std::ios_base::in); 00619 ifstream inputmomdata27mc(psip_protonm_mom_mc.c_str(),std::ios_base::in); 00620 for(int i=0; i<9; i++){ 00621 inputmomdata27>>m_psip_protonm_ptrk_offset[i]; 00622 inputmomdata27>>m_psip_protonm_ptrk_sigma[i]; 00623 inputmomdata27mc>>m_psip_mc_protonm_ptrk_offset[i]; 00624 inputmomdata27mc>>m_psip_mc_protonm_ptrk_sigma[i]; 00625 } 00626 00627 //Psipp pi momentum correction 00628 std::string psipp_pi_mom =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/pion/dedx_pi.txt"; 00629 std::string psipp_pi_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/pion/dedx_pi_mc.txt"; 00630 ifstream inputmomdata28(psipp_pi_mom.c_str(),std::ios_base::in); 00631 ifstream inputmomdata28mc(psipp_pi_mom_mc.c_str(),std::ios_base::in); 00632 for(int i=0; i<18; i++){ 00633 inputmomdata28>>m_psipp_pi_ptrk_offset[i]; 00634 inputmomdata28>>m_psipp_pi_ptrk_sigma[i]; 00635 inputmomdata28mc>>m_psipp_mc_pi_ptrk_offset[i]; 00636 inputmomdata28mc>>m_psipp_mc_pi_ptrk_sigma[i]; 00637 } 00638 00639 //Psipp pi theta correction 00640 std::string psipp_pi_the =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/pion/dedx_pi_theta.txt"; 00641 std::string psipp_pi_the_mc =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/pion/dedx_pi_theta_mc.txt"; 00642 ifstream inputmomdata29(psipp_pi_the.c_str(),std::ios_base::in); 00643 ifstream inputmomdata29mc(psipp_pi_the_mc.c_str(),std::ios_base::in); 00644 for(int i=0; i<16; i++){ 00645 inputmomdata29>>m_psipp_pi_theta_offset[i]; 00646 inputmomdata29>>m_psipp_pi_theta_sigma[i]; 00647 inputmomdata29mc>>m_psipp_mc_pi_theta_offset[i]; 00648 inputmomdata29mc>>m_psipp_mc_pi_theta_sigma[i]; 00649 } 00650 00651 //Psipp ka momentum correction 00652 std::string psipp_ka_mom =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/kaon/dedx_ka.txt"; 00653 std::string psipp_ka_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/kaon/dedx_ka_mc.txt"; 00654 ifstream inputmomdata30(psipp_ka_mom.c_str(),std::ios_base::in); 00655 ifstream inputmomdata30mc(psipp_ka_mom_mc.c_str(),std::ios_base::in); 00656 for(int i=0; i<17; i++){ 00657 inputmomdata30>>m_psipp_ka_ptrk_offset[i]; 00658 inputmomdata30>>m_psipp_ka_ptrk_sigma[i]; 00659 inputmomdata30mc>>m_psipp_mc_ka_ptrk_offset[i]; 00660 inputmomdata30mc>>m_psipp_mc_ka_ptrk_sigma[i]; 00661 } 00662 00663 //Psipp ka theta correction 00664 std::string psipp_ka_the =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/kaon/dedx_ka_theta.txt"; 00665 std::string psipp_ka_the_mc =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/kaon/dedx_ka_theta_mc.txt"; 00666 ifstream inputmomdata31(psipp_ka_the.c_str(),std::ios_base::in); 00667 ifstream inputmomdata31mc(psipp_ka_the_mc.c_str(),std::ios_base::in); 00668 for(int i=0; i<16; i++){ 00669 inputmomdata31>>m_psipp_ka_theta_offset[i]; 00670 inputmomdata31>>m_psipp_ka_theta_sigma[i]; 00671 inputmomdata31mc>>m_psipp_mc_ka_theta_offset[i]; 00672 inputmomdata31mc>>m_psipp_mc_ka_theta_sigma[i]; 00673 } 00674 00675 00676 //Psipp proton momentum correction 00677 std::string psipp_proton_mom =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/proton/dedx_proton.txt"; 00678 std::string psipp_proton_mom_mc =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/proton/dedx_proton_mc.txt"; 00679 ifstream inputmomdata32(psipp_proton_mom.c_str(),std::ios_base::in); 00680 ifstream inputmomdata32mc(psipp_proton_mom_mc.c_str(),std::ios_base::in); 00681 for(int i=0; i<18; i++){ 00682 inputmomdata32>>m_psipp_proton_ptrk_offset[i]; 00683 inputmomdata32>>m_psipp_proton_ptrk_sigma[i]; 00684 } 00685 for(int i=0; i<9; i++){ 00686 inputmomdata32mc>>m_psipp_mc_proton_ptrk_offset[i]; 00687 inputmomdata32mc>>m_psipp_mc_proton_ptrk_sigma[i]; 00688 } 00689 00690 //Psipp proton theta correction 00691 std::string psipp_proton_the =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/proton/dedx_proton_theta.txt"; 00692 std::string psipp_proton_the_mc =string(getenv("PARTICLEIDROOT"))+ "/share/Psipp/proton/dedx_proton_theta_mc.txt"; 00693 ifstream inputmomdata33(psipp_proton_the.c_str(),std::ios_base::in); 00694 ifstream inputmomdata33mc(psipp_proton_the_mc.c_str(),std::ios_base::in); 00695 for(int i=0; i<18; i++){ 00696 inputmomdata33>>m_psipp_proton_theta_offset[i]; 00697 inputmomdata33>>m_psipp_proton_theta_sigma[i]; 00698 inputmomdata33mc>>m_psipp_mc_proton_theta_offset[i]; 00699 inputmomdata33mc>>m_psipp_mc_proton_theta_sigma[i]; 00700 } 00701 00702 }
|
|
|
|
|
|
|
|
00085 { 00086 double c1 = (y[0]-y[1])*(x[1]-x[2])-(x[0]-x[1])*(y[1]-y[2]); 00087 double c2 = (x[0]*x[0]-x[1]*x[1])*(x[1]-x[2])-(x[1]*x[1]-x[2]*x[2])*(x[0]-x[1]); 00088 double c = c1/c2; 00089 double b1 = (y[0]-y[1])*(x[1]*x[1]-x[2]*x[2])-(x[0]*x[0]-x[1]*x[1])*(y[1]-y[2]); 00090 double b2 = (x[0]-x[1])*(x[1]*x[1]-x[2]*x[2])-(x[1]-x[2])*(x[0]*x[0]-x[1]*x[1]); 00091 double b = b1/b2; 00092 double a = y[0] - b*x[0]-c*x[0]*x[0]; 00093 double y1 = a + b*x1 +c*x1*x1; 00094 return y1; 00095 }
|
|
Implements ParticleIDBase. 00025 {return (m_ndof>0);}
|
|
Implements ParticleIDBase. 00025 {return (m_ndof>0);}
|
|
|
|
00704 { 00705 double p1,p2,p3; 00706 p2=((mean[0]-mean[1])*(p[1]*p[1]-p[2]*p[2])-(mean[1]-mean[2])*(p[0]*p[0]-p[1]*p[1]))/((p[0]-p[1])*(p[1]*p[1]-p[2]*p[2])-(p[1]-p[2])*(p[0]*p[0]-p[1]*p[1])); 00707 p3=((p[0]-p[1])*(mean[1]-mean[2])-(p[1]-p[2])*(mean[0]-mean[1]))/((p[0]-p[1])*(p[1]*p[1]-p[2]*p[2])-(p[1]-p[2])*(p[0]*p[0]-p[1]*p[1])); 00708 p1=mean[0]-p2*p[0]-p3*p[0]*p[0]; 00709 double mean1 = p1+p2*ptrk+p3*ptrk*ptrk; 00710 return mean1; 00711 }
|
|
Implements ParticleIDBase. 00043 {return -1;}
|
|
Implements ParticleIDBase. 00043 {return -1;}
|
|
00099 {return LIKELIHOOD_PID;}
|
|
00099 {return LIKELIHOOD_PID;}
|
|
00101 {return NEURONNETWORK_PID;}
|
|
00101 {return NEURONNETWORK_PID;}
|
|
00100 {return PROBABILITY_PID;}
|
|
00100 {return PROBABILITY_PID;}
|
|
00109 {return MUC_VALID;}
|
|
00109 {return MUC_VALID;}
|
|
|
|
00461 { 00462 double y = x; 00463 return par0 + (par1 * y) +(par2 * y * y) + (par3 * y * y * y); 00464 00465 }
|
|
|
|
00468 { 00469 double y = x; 00470 return par0 + (par1 * y) +(par2 * y * y) + (par3 * y * y * y) + (par4 * y * y * y *y)+ (par5 * y * y * y * y * y); 00471 00472 }
|
|
Implements ParticleIDBase. 00030 {return m_ndof;}
|
|
Implements ParticleIDBase. 00030 {return m_ndof;}
|
|
00033 {return -1;}
|
|
00033 {return -1;}
|
|
00040 {return -1;}
|
|
00040 {return -1;}
|
|
00031 { return m_normPH;}
|
|
00031 { return m_normPH;}
|
|
00028 {return m_offset[n];}
|
|
00028 {return m_offset[n];}
|
|
|
|
00109 {
00110 return 0;
00111 }
|
|
00092 {return IDENTIFY_ELECTRON;}
|
|
00092 {return IDENTIFY_ELECTRON;}
|
|
00095 {return IDENTIFY_KAON;}
|
|
00095 {return IDENTIFY_KAON;}
|
|
00093 {return IDENTIFY_MUON;}
|
|
00093 {return IDENTIFY_MUON;}
|
|
00094 {return IDENTIFY_PION;}
|
|
00094 {return IDENTIFY_PION;}
|
|
00088 {return (IDENTIFY_PION | IDENTIFY_KAON);}
|
|
00088 {return (IDENTIFY_PION | IDENTIFY_KAON);}
|
|
00090 {return (IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_ELECTRON);}
|
|
00090 {return (IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_ELECTRON);}
|
|
00089 {return (IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_PROTON);}
|
|
00089 {return (IDENTIFY_PION | IDENTIFY_KAON | IDENTIFY_PROTON);}
|
|
00096 {return IDENTIFY_PROTON;}
|
|
00096 {return IDENTIFY_PROTON;}
|
|
|
|
00063 { 00064 double val = 999; 00065 if(!m_trk) return val; 00066 if(!m_trk->isMdcTrackValid()) return val; 00067 RecMdcTrack *mdcTrk = m_trk->mdcTrack(); 00068 val = mdcTrk->p(); 00069 }
|
|
Implements ParticleIDBase. |
|
Implements ParticleIDBase. 00042 { 00043 int rundedx2 = getRunNo(); 00044 int nhitcutdedx=getNhitCutDx(); 00045 int irc = -1; 00046 EvtRecTrack* recTrk = PidTrk(); 00047 if(!(recTrk->isMdcTrackValid())) return irc; 00048 RecMdcTrack* mdcTrk = recTrk->mdcTrack(); 00049 00050 double ptrk = mdcTrk->p(); 00051 int charge = mdcTrk->charge(); 00052 if(ptrk>5) return irc; 00053 double cost = cos(mdcTrk->theta()); 00054 double sig_the= sin(mdcTrk->theta()); 00055 00056 if(!(recTrk->isMdcDedxValid())) return irc; 00057 RecMdcDedx* dedxTrk = recTrk->mdcDedx(); 00058 00059 if((dedxTrk->normPH()>30)||(dedxTrk->normPH()<0)) return irc; 00060 m_goodHits = dedxTrk->numGoodHits(); 00061 if(dedxTrk->numGoodHits()<nhitcutdedx) return irc; 00062 m_normPH = dedxTrk->normPH(); 00063 m_probPH = dedxTrk->probPH(); 00064 // calculate chi and min chi 00065 double chitemp = 99.; 00066 double pdftemp = 0; 00067 // double testchi[5]; 00068 // double testptrk[5]; 00069 // double testcost[5]; 00070 for(int i = 0; i < 5; i++) { 00071 double sep = dedxTrk->chi(i); 00072 string sftver = getenv("BES_RELEASE"); 00073 string sft; 00074 sft.assign(sftver,0,5); 00075 if(sft=="6.5.5"){ 00076 m_chi[i] = CorrDedx(i,ptrk,cost,sep,charge); 00077 } 00078 else 00079 m_chi[i]=sep; 00080 m_offset[i] = offsetDedx(i, ptrk, cost); 00081 m_sigma[i] = sigmaDedx(i, ptrk, cost); 00082 if(fabs(m_chi[i]) < chitemp) chitemp = fabs(m_chi[i]); 00083 double ppp = pdfCalculate(m_chi[i],1); 00084 if(fabs(ppp) > pdftemp) pdftemp = fabs(ppp); 00085 00086 } 00087 m_chimin = chitemp; 00088 m_pdfmin = pdftemp; 00089 if(m_chimin > chiMinCut()) return irc; 00090 if(pdftemp < pdfCalculate(pdfMinSigmaCut(),1)) return irc; 00091 00092 00093 // calculate prob 00094 00095 for(int i = 0; i < 5; i++) 00096 m_prob[i] = probCalculate(m_chi[i]*m_chi[i], 1); 00097 00098 m_ndof = 1; 00099 irc = 0; 00100 return irc; 00101 }
|
|
|
|
00055 { 00056 const double pi = 3.141592653589793238; 00057 const double twoPi = 2*pi; 00058 double chi2 = -0.5*offset*offset/(sigma*sigma); 00059 double pdf = exp(chi2)/(sigma*sqrt(twoPi)); 00060 return pdf; 00061 }
|
|
00054 {return m_pdfsigmamin_cut;}
|
|
00054 {return m_pdfsigmamin_cut;}
|
|
00050 {return m_trk;}
|
|
00050 {return m_trk;}
|
|
|
|
00097 { 00098 double y=x; 00099 return par[0] + (par[1] * y) +(par[2] * y * y); 00100 }
|
|
|
|
00102 { 00103 double y=x; 00104 return par[0] + (par[1] * y) +(par[2] * y * y)+(par[3] * y * y*y); 00105 }
|
|
|
|
00107 { 00108 double y=x; 00109 return par[0] + (par[1] * y) +(par[2] * y * y)+(par[3] * y * y*y) + (par[4] * y * y*y*y); 00110 }
|
|
Implements ParticleIDBase. 00027 {return m_prob[n];}
|
|
Implements ParticleIDBase. 00027 {return m_prob[n];}
|
|
|
|
00047 { 00048 double p = -1.0; 00049 if(chi2 < 0) return p; 00050 p = TMath::Prob(chi2, ndof); 00051 return p; 00052 }
|
|
|
|
00070 { 00071 double val = 999; 00072 if(!m_trk) return val; 00073 if(!m_trk->isMdcTrackValid()) return val; 00074 RecMdcTrack *mdcTrk = m_trk->mdcTrack(); 00075 val = mdcTrk->pxy(); 00076 }
|
|
00053 {m_chimin_cut = chi;}
|
|
00053 {m_chimin_cut = chi;}
|
|
00035 {m_nhitcutdx = nhitcuthdx;}
|
|
00035 {m_nhitcutdx = nhitcuthdx;}
|
|
00055 {m_pdfsigmamin_cut= pdf;}
|
|
00055 {m_pdfsigmamin_cut= pdf;}
|
|
00051 {m_trk = trk;}
|
|
00051 {m_trk = trk;}
|
|
00057 {m_runno = runh;}
|
|
00057 {m_runno = runh;}
|
|
00029 {return m_sigma[n];}
|
|
00029 {return m_sigma[n];}
|
|
|
|
00409 { 00410 00411 /* int rundedx3 = getRunNo(); 00412 double sigma = 1.0; 00413 double sigp = 1.0; 00414 double sigmac = 1.0; 00415 double gb = ptrk/xmass(n); 00416 switch(n) { 00417 00418 case 0: {// Electron 00419 double ptemp = ptrk; 00420 double costm = cost; 00421 break; 00422 } 00423 00424 case 1: {// Muon 00425 double ptemp = ptrk; 00426 double costm = cost; 00427 break; 00428 } 00429 00430 case 2: {// Pion 00431 double ptemp = ptrk; 00432 double costm = cost; 00433 break; 00434 } 00435 00436 case 3: { // Kaon 00437 double ptemp = ptrk; 00438 double costm = cost; 00439 break; 00440 } 00441 00442 00443 case 4: {// Proton 00444 double ptemp = ptrk; 00445 double costm = cost; 00446 break; 00447 } 00448 00449 default: 00450 sigma = 1.0; 00451 break; 00452 } 00453 */ 00454 // sigma = 1.2; 00455 // sigma =1.0; 00456 return 1; 00457 // return sigma; 00458 }
|
|
00107 {return TOFC_VALID;}
|
|
00107 {return TOFC_VALID;}
|
|
00105 {return TOFE_VALID;}
|
|
00105 {return TOFE_VALID;}
|
|
00106 {return TOFQ_VALID;}
|
|
00106 {return TOFQ_VALID;}
|
|
00104 {return TOF_VALID;}
|
|
00104 {return TOF_VALID;}
|
|
00077 {return USE_DEDX;}
|
|
00077 {return USE_DEDX;}
|
|
00084 {return USE_EMC;}
|
|
00084 {return USE_EMC;}
|
|
00085 {return USE_MUC;}
|
|
00085 {return USE_MUC;}
|
|
00078 {return USE_TOF;}
|
|
00078 {return USE_TOF;}
|
|
00079 {return USE_TOF1;}
|
|
00079 {return USE_TOF1;}
|
|
00080 {return USE_TOF2;}
|
|
00080 {return USE_TOF2;}
|
|
00083 {return USE_TOFC;}
|
|
00083 {return USE_TOFC;}
|
|
00081 {return USE_TOFE;}
|
|
00081 {return USE_TOFE;}
|
|
00082 {return USE_TOFQ;}
|
|
00082 {return USE_TOFQ;}
|
|
|
|
00041 { 00042 // double vel = 29.9792458; // tof_path unit in cm. 00043 double vel = 299.792458; // tof path unit in mm 00044 return vel; 00045 }
|
|
|
|
00035 { 00036 double mass[5] = {0.000511, 0.105658, 0.139570,0.493677, 0.938272}; 00037 if(n < 0 || n >=5) return 0.0; 00038 return mass[n]; 00039 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|