137 double offsetp = 0.0;
138 double offsetc = 0.0;
156 if(ptrk<0.1||ptrk>1)
break;
157 int index = int((ptrk-0.1)/0.05);
158 if(index<=0) index=1;
159 if(index>=17) index=16;
161 if(fabs(costm)>=0.8)
break;
162 int index1 = int((costm+0.8)/0.1);
163 if(index1<=0) index1=1;
164 if(index1>=15) index1=14;
167 if(rundedx2>=11414&&rundedx2<=14604) {
168 offsetp =
cal_par(index,m_psipp_pi_ptrk_offset,ptrk,0.125,0.05);
169 sigp =
cal_par(index,m_psipp_pi_ptrk_sigma,ptrk,0.125,0.05);
170 offsetc =
cal_par(index1,m_psipp_pi_theta_offset,costm,-0.75,0.1);
171 sigcos =
cal_par(index1,m_psipp_pi_theta_sigma,costm,-0.75,0.1);
174 if(rundedx2<=-11414&&rundedx2>=-14604) {
175 offsetp =
cal_par(index,m_psipp_mc_pi_ptrk_offset,ptrk,0.125,0.05);
176 sigp =
cal_par(index,m_psipp_mc_pi_ptrk_sigma,ptrk,0.125,0.05);
177 offsetc =
cal_par(index1,m_psipp_mc_pi_theta_offset,costm,-0.75,0.1);
178 sigcos =
cal_par(index1,m_psipp_mc_pi_theta_sigma,costm,-0.75,0.1);
181 offset=offsetp+sigp*offsetc;
182 chicor=(chicor-
offset)/(sigcos*sigp);
189 if(ptrk<0.3||ptrk>0.8)
break;
191 int index = int((ptrk-0.3)/0.1);
192 if(index<=0) index=1;
193 if(index>=4) index=3;
195 int index1 = int((costm+0.9)/0.1);
196 if(index1<=0) index1=1;
197 if(index1>=17) index1=16;
199 if(rundedx2>=9947&&rundedx2<=10878) {
201 offsetp =
cal_par(index,m_jpsi_kap_ptrk_offset,ptrk,0.35,0.1);
202 sigp =
cal_par(index,m_jpsi_kap_ptrk_sigma,ptrk,0.35,0.1);
203 if(fabs(costm)<=0.83) {
204 offsetc =
cal_par(index1,m_jpsi_kap_theta_offset,costm,-0.85,0.1);
205 sigcos =
cal_par(index1,m_jpsi_kap_theta_sigma,costm,-0.85,0.1);
209 offsetp =
cal_par(index,m_jpsi_kam_ptrk_offset,ptrk,0.35,0.1);
210 sigp =
cal_par(index,m_jpsi_kam_ptrk_sigma,ptrk,0.35,0.1);
211 if(fabs(costm)<=0.83) {
212 offsetc =
cal_par(index1,m_jpsi_kam_theta_offset,costm,-0.85,0.1);
213 sigcos =
cal_par(index1,m_jpsi_kam_theta_sigma,costm,-0.85,0.1);
219 if(rundedx2<=-9947&&rundedx2>=-10878) {
221 offsetp =
cal_par(index,m_jpsi_mc_kap_ptrk_offset,ptrk,0.35,0.1);
222 sigp =
cal_par(index,m_jpsi_mc_kap_ptrk_sigma,ptrk,0.35,0.1);
223 if(fabs(costm)<=0.83) {
224 offsetc =
cal_par(index1,m_jpsi_mc_kap_theta_offset,costm,-0.85,0.1);
225 sigcos =
cal_par(index1,m_jpsi_mc_kap_theta_sigma,costm,-0.85,0.1);
229 offsetp =
cal_par(index,m_jpsi_mc_kam_ptrk_offset,ptrk,0.35,0.1);
230 sigp =
cal_par(index,m_jpsi_mc_kam_ptrk_sigma,ptrk,0.35,0.1);
231 if(fabs(costm)<=0.83) {
232 offsetc =
cal_par(index1,m_jpsi_mc_kam_theta_offset,costm,-0.85,0.1);
233 sigcos =
cal_par(index1,m_jpsi_mc_kam_theta_sigma,costm,-0.85,0.1);
239 if(rundedx2>=8093&&rundedx2<=9025) {
240 if(ptrk<0.3||ptrk>1.2)
break;
241 index = int((ptrk-0.3)/0.1);
242 if(index<=0) index=1;
243 if(index>=8) index=7;
245 offsetp =
cal_par(index,m_psip_kap_ptrk_offset,ptrk,0.35,0.1);
246 sigp =
cal_par(index,m_psip_kap_ptrk_sigma,ptrk,0.35,0.1);
249 offsetp =
cal_par(index,m_psip_kam_ptrk_offset,ptrk,0.35,0.1);
250 sigp =
cal_par(index,m_psip_kam_ptrk_sigma,ptrk,0.35,0.1);
255 if(rundedx2<=-8093&&rundedx2>=-9025) {
257 if(ptrk<0.3||ptrk>1.2)
break;
258 index = int((ptrk-0.3)/0.1);
259 if(index<=0) index=1;
260 if(index>=8) index=7;
262 offsetp =
cal_par(index,m_psip_mc_kap_ptrk_offset,ptrk,0.35,0.1);
263 sigp =
cal_par(index,m_psip_mc_kap_ptrk_sigma,ptrk,0.35,0.1);
266 offsetp =
cal_par(index,m_psip_mc_kam_ptrk_offset,ptrk,0.35,0.1);
267 sigp =
cal_par(index,m_psip_mc_kam_ptrk_sigma,ptrk,0.35,0.1);
273 if(rundedx2>=11414&&rundedx2<=14604) {
274 if(ptrk<0.15||ptrk>1)
break;
275 index = int((ptrk-0.15)/0.05);
276 if(index<=0) index=1;
277 if(index>=16) index=15;
278 if(fabs(costm)>=0.8)
break;
279 index1 = int((costm+0.8)/0.1);
280 if(index1<=0) index1=1;
281 if(index1>=15) index1=14;
283 offsetp =
cal_par(index,m_psipp_ka_ptrk_offset,ptrk,0.175,0.05);
284 sigp =
cal_par(index,m_psipp_ka_ptrk_sigma,ptrk,0.175,0.05);
285 offsetc =
cal_par(index1,m_psipp_ka_theta_offset,costm,-0.75,0.1);
286 sigcos =
cal_par(index1,m_psipp_ka_theta_sigma,costm,-0.75,0.1);
289 if(rundedx2<=-11414&&rundedx2>=-14604) {
290 if(ptrk<0.15||ptrk>1)
break;
291 index = int((ptrk-0.15)/0.05);
292 if(index<=0) index=1;
293 if(index>=16) index=15;
294 if(fabs(costm)>=0.8)
break;
295 index1 = int((costm+0.8)/0.1);
296 if(index1<=0) index1=1;
297 if(index1>=15) index1=14;
298 offsetp =
cal_par(index,m_psipp_mc_ka_ptrk_offset,ptrk,0.175,0.05);
299 sigp =
cal_par(index,m_psipp_mc_ka_ptrk_sigma,ptrk,0.175,0.05);
300 offsetc =
cal_par(index1,m_psipp_mc_ka_theta_offset,costm,-0.75,0.1);
301 sigcos =
cal_par(index1,m_psipp_mc_ka_theta_sigma,costm,-0.75,0.1);
304 offset=offsetp+sigp*offsetc;
305 chicor=(chicor-
offset)/(sigcos*sigp);
312 if(ptrk<0.3||ptrk>1.1)
break;
313 int index = int((ptrk-0.3)/0.1);
314 if(index<=0) index=1;
315 if(index>=7) index=6;
317 int index1 = int((costm+0.9)/0.1);
318 if(index1<=0) index1=1;
319 if(index1>=17) index1=16;
323 if(rundedx2>=9947&&rundedx2<=10878) {
325 offsetp =
cal_par(index,m_jpsi_protonp_ptrk_offset,ptrk,0.35,0.1);
326 sigp =
cal_par(index,m_jpsi_protonp_ptrk_sigma,ptrk,0.35,0.1);
327 if(fabs(costm)<=0.83) {
328 offsetc =
cal_par(index1,m_jpsi_protonp_theta_offset,costm,-0.85,0.1);
329 sigcos =
cal_par(index1,m_jpsi_protonp_theta_sigma,costm,-0.85,0.1);
333 offsetp =
cal_par(index,m_jpsi_protonm_ptrk_offset,ptrk,0.35,0.1);
334 sigp =
cal_par(index,m_jpsi_protonm_ptrk_sigma,ptrk,0.35,0.1);
335 if(fabs(costm)<=0.83) {
336 offsetc =
cal_par(index1,m_jpsi_protonm_theta_offset,costm,-0.85,0.1);
337 sigcos =
cal_par(index1,m_jpsi_protonm_theta_sigma,costm,-0.85,0.1);
343 if(rundedx2<=-9947&&rundedx2>=-10878) {
345 offsetp =
cal_par(index,m_jpsi_mc_protonp_ptrk_offset,ptrk,0.35,0.1);
346 sigp =
cal_par(index,m_jpsi_mc_protonp_ptrk_sigma,ptrk,0.35,0.1);
347 if(fabs(costm)<=0.83) {
348 offsetc =
cal_par(index1,m_jpsi_mc_protonp_theta_offset,costm,-0.85,0.1);
349 sigcos =
cal_par(index1,m_jpsi_mc_protonp_theta_sigma,costm,-0.85,0.1);
353 offsetp =
cal_par(index,m_jpsi_mc_protonm_ptrk_offset,ptrk,0.35,0.1);
354 sigp =
cal_par(index,m_jpsi_mc_protonm_ptrk_sigma,ptrk,0.35,0.1);
355 if(fabs(costm)<=0.83) {
356 offsetc =
cal_par(index1,m_jpsi_mc_protonm_theta_offset,costm,-0.85,0.1);
357 sigcos =
cal_par(index1,m_jpsi_mc_protonm_theta_sigma,costm,-0.85,0.1);
363 if(rundedx2>=8093&&rundedx2<=9025) {
365 offsetp =
cal_par(index,m_psip_protonp_ptrk_offset,ptrk,0.35,0.1);
366 sigp =
cal_par(index,m_psip_protonp_ptrk_sigma,ptrk,0.35,0.1);
369 offsetp =
cal_par(index,m_psip_protonm_ptrk_offset,ptrk,0.35,0.1);
370 sigp =
cal_par(index,m_psip_protonm_ptrk_sigma,ptrk,0.35,0.1);
375 if(rundedx2<=-8093&&rundedx2>=-9025) {
377 offsetp =
cal_par(index,m_psip_mc_protonp_ptrk_offset,ptrk,0.35,0.1);
378 sigp =
cal_par(index,m_psip_mc_protonp_ptrk_sigma,ptrk,0.35,0.1);
381 offsetp =
cal_par(index,m_psip_mc_protonm_ptrk_offset,ptrk,0.35,0.1);
382 sigp =
cal_par(index,m_psip_mc_protonm_ptrk_sigma,ptrk,0.35,0.1);
387 if(rundedx2>=11414&&rundedx2<=14604) {
388 if(ptrk<0.2||ptrk>1.1)
break;
389 index = int((ptrk-0.2)/0.05);
390 if(index<=0) index=1;
391 if(index>=17) index=16;
392 if(fabs(costm)>=0.83)
break;
393 index1 = int((costm+0.9)/0.1);
394 if(index1<=0) index1=1;
395 if(index1>=17) index1=16;
397 offsetp =
cal_par(index,m_psipp_proton_ptrk_offset,ptrk,0.225,0.05);
398 sigp =
cal_par(index,m_psipp_proton_ptrk_sigma,ptrk,0.225,0.05);
399 offsetc =
cal_par(index1,m_psipp_proton_theta_offset,costm,-0.85,0.1);
400 sigcos =
cal_par(index1,m_psipp_proton_theta_sigma,costm,-0.85,0.1);
403 if(rundedx2<=-11414&&rundedx2>=-14604) {
404 if(ptrk<0.2||ptrk>1.1)
break;
405 index = int((ptrk-0.2)/0.1);
406 if(index<=0) index=1;
407 if(index>=8) index=7;
408 if(fabs(costm)>=0.83)
break;
409 index1 = int((costm+0.9)/0.1);
410 if(index1<=0) index1=1;
411 if(index1>=17) index1=16;
412 offsetp =
cal_par(index,m_psipp_mc_proton_ptrk_offset,ptrk,0.25,0.1);
413 sigp =
cal_par(index,m_psipp_mc_proton_ptrk_sigma,ptrk,0.25,0.1);
414 offsetc =
cal_par(index1,m_psipp_mc_proton_theta_offset,costm,-0.85,0.1);
415 sigcos =
cal_par(index1,m_psipp_mc_proton_theta_sigma,costm,-0.85,0.1);
417 offset=offsetp+sigp*offsetc;
418 chicor=(chicor-
offset)/(sigcos*sigp);
498 std::string jpsi_kap_mom =
path +
"/share/JPsi/kaon/dedx_kap.txt";
499 std::string jpsi_kap_mom_mc =
path +
"/share/JPsi/kaon/dedx_kap_mc.txt";
500 ifstream inputmomdata6(jpsi_kap_mom.c_str(),std::ios_base::in);
501 if ( !inputmomdata6 ) {
502 cout <<
" can not open: " << jpsi_kap_mom << endl;
505 ifstream inputmomdata6mc(jpsi_kap_mom_mc.c_str(),std::ios_base::in);
506 if ( !inputmomdata6mc ) {
507 cout <<
" can not open: " << jpsi_kap_mom_mc << endl;
510 for(
int i=0; i<12; i++) {
511 inputmomdata6>>m_jpsi_kap_ptrk_offset[i];
512 inputmomdata6>>m_jpsi_kap_ptrk_sigma[i];
513 inputmomdata6mc>>m_jpsi_mc_kap_ptrk_offset[i];
514 inputmomdata6mc>>m_jpsi_mc_kap_ptrk_sigma[i];
518 std::string jpsi_kam_mom =
path +
"/share/JPsi/kaon/dedx_kam.txt";
519 std::string jpsi_kam_mom_mc =
path +
"/share/JPsi/kaon/dedx_kam_mc.txt";
520 ifstream inputmomdata7(jpsi_kam_mom.c_str(),std::ios_base::in);
521 if ( !inputmomdata7 ) {
522 cout <<
" can not open: " << jpsi_kam_mom << endl;
525 ifstream inputmomdata7mc(jpsi_kam_mom_mc.c_str(),std::ios_base::in);
526 if ( !inputmomdata7mc ) {
527 cout <<
" can not open: " << jpsi_kam_mom_mc << endl;
530 for(
int i=0; i<12; i++) {
531 inputmomdata7>>m_jpsi_kam_ptrk_offset[i];
532 inputmomdata7>>m_jpsi_kam_ptrk_sigma[i];
533 inputmomdata7mc>>m_jpsi_mc_kam_ptrk_offset[i];
534 inputmomdata7mc>>m_jpsi_mc_kam_ptrk_sigma[i];
540 std::string jpsi_kap_the =
path +
"/share/JPsi/kaon/dedx_kap_theta.txt";
541 std::string jpsi_kap_the_mc =
path +
"/share/JPsi/kaon/dedx_kap_theta_mc.txt";
542 ifstream inputmomdata8(jpsi_kap_the.c_str(),std::ios_base::in);
543 if ( !inputmomdata8 ) {
544 cout <<
" can not open: " << jpsi_kap_the << endl;
547 ifstream inputmomdata8mc(jpsi_kap_the_mc.c_str(),std::ios_base::in);
548 if ( !inputmomdata8mc ) {
549 cout <<
" can not open: " << jpsi_kap_the_mc << endl;
552 for(
int i=0; i<18; i++) {
553 inputmomdata8>>m_jpsi_kap_theta_offset[i];
554 inputmomdata8>>m_jpsi_kap_theta_sigma[i];
555 inputmomdata8mc>>m_jpsi_mc_kap_theta_offset[i];
556 inputmomdata8mc>>m_jpsi_mc_kap_theta_sigma[i];
560 std::string jpsi_kam_the =
path +
"/share/JPsi/kaon/dedx_kam_theta.txt";
561 std::string jpsi_kam_the_mc =
path +
"/share/JPsi/kaon/dedx_kam_theta_mc.txt";
562 ifstream inputmomdata9(jpsi_kam_the.c_str(),std::ios_base::in);
563 if ( !inputmomdata9 ) {
564 cout <<
" can not open: " << jpsi_kam_the << endl;
567 ifstream inputmomdata9mc(jpsi_kam_the_mc.c_str(),std::ios_base::in);
568 if ( !inputmomdata9mc ) {
569 cout <<
" can not open: " << jpsi_kam_the_mc << endl;
572 for(
int i=0; i<18; i++) {
573 inputmomdata9>>m_jpsi_kam_theta_offset[i];
574 inputmomdata9>>m_jpsi_kam_theta_sigma[i];
575 inputmomdata9mc>>m_jpsi_mc_kam_theta_offset[i];
576 inputmomdata9mc>>m_jpsi_mc_kam_theta_sigma[i];
580 std::string jpsi_protonp_mom =
path +
"/share/JPsi/proton/dedx_protonp.txt";
581 std::string jpsi_protonp_mom_mc =
path +
"/share/JPsi/proton/dedx_protonp_mc.txt";
582 ifstream inputmomdata12(jpsi_protonp_mom.c_str(),std::ios_base::in);
583 if ( !inputmomdata12 ) {
584 cout <<
" can not open: " << jpsi_protonp_mom << endl;
587 ifstream inputmomdata12mc(jpsi_protonp_mom_mc.c_str(),std::ios_base::in);
588 if ( !inputmomdata12mc ) {
589 cout <<
" can not open: " << jpsi_protonp_mom_mc << endl;
592 for(
int i=0; i<8; i++) {
593 inputmomdata12>>m_jpsi_protonp_ptrk_offset[i];
594 inputmomdata12>>m_jpsi_protonp_ptrk_sigma[i];
595 inputmomdata12mc>>m_jpsi_mc_protonp_ptrk_offset[i];
596 inputmomdata12mc>>m_jpsi_mc_protonp_ptrk_sigma[i];
600 std::string jpsi_protonm_mom =
path +
"/share/JPsi/proton/dedx_protonm.txt";
601 std::string jpsi_protonm_mom_mc =
path +
"/share/JPsi/proton/dedx_protonm_mc.txt";
602 ifstream inputmomdata13(jpsi_protonm_mom.c_str(),std::ios_base::in);
603 if ( !inputmomdata13 ) {
604 cout <<
" can not open: " << jpsi_protonm_mom << endl;
607 ifstream inputmomdata13mc(jpsi_protonm_mom_mc.c_str(),std::ios_base::in);
608 if ( !inputmomdata13mc ) {
609 cout <<
" can not open: " << jpsi_protonm_mom_mc << endl;
612 for(
int i=0; i<8; i++) {
613 inputmomdata13>>m_jpsi_protonm_ptrk_offset[i];
614 inputmomdata13>>m_jpsi_protonm_ptrk_sigma[i];
615 inputmomdata13mc>>m_jpsi_mc_protonm_ptrk_offset[i];
616 inputmomdata13mc>>m_jpsi_mc_protonm_ptrk_sigma[i];
620 std::string jpsi_protonp_the =
path +
"/share/JPsi/proton/dedx_protonp_theta.txt";
621 std::string jpsi_protonp_the_mc =
path +
"/share/JPsi/proton/dedx_protonp_theta_mc.txt";
623 ifstream inputmomdata14(jpsi_protonp_the.c_str(),std::ios_base::in);
624 if ( !inputmomdata14 ) {
625 cout <<
" can not open: " << jpsi_protonp_the << endl;
628 ifstream inputmomdata14mc(jpsi_protonp_the_mc.c_str(),std::ios_base::in);
629 if ( !inputmomdata14mc ) {
630 cout <<
" can not open: " << jpsi_protonp_the_mc << endl;
633 for(
int i=0; i<18; i++) {
634 inputmomdata14>>m_jpsi_protonp_theta_offset[i];
635 inputmomdata14>>m_jpsi_protonp_theta_sigma[i];
636 inputmomdata14mc>>m_jpsi_mc_protonp_theta_offset[i];
637 inputmomdata14mc>>m_jpsi_mc_protonp_theta_sigma[i];
641 std::string jpsi_protonm_the =
path +
"/share/JPsi/proton/dedx_protonm_theta.txt";
642 std::string jpsi_protonm_the_mc =
path +
"/share/JPsi/proton/dedx_protonm_theta_mc.txt";
643 ifstream inputmomdata15(jpsi_protonm_the.c_str(),std::ios_base::in);
644 if ( !inputmomdata15 ) {
645 cout <<
" can not open: " << jpsi_protonm_the << endl;
648 ifstream inputmomdata15mc(jpsi_protonm_the_mc.c_str(),std::ios_base::in);
649 if ( !inputmomdata15mc ) {
650 cout <<
" can not open: " << jpsi_protonm_the_mc << endl;
653 for(
int i=0; i<18; i++) {
654 inputmomdata15>>m_jpsi_protonm_theta_offset[i];
655 inputmomdata15>>m_jpsi_protonm_theta_sigma[i];
656 inputmomdata15mc>>m_jpsi_mc_protonm_theta_offset[i];
657 inputmomdata15mc>>m_jpsi_mc_protonm_theta_sigma[i];
664 std::string psip_kap_mom =
path +
"/share/Psip/kaon/dedx_kap.txt";
665 std::string psip_kap_mom_mc =
path +
"/share/Psip/kaon/dedx_kap_mc.txt";
666 ifstream inputmomdata24(psip_kap_mom.c_str(),std::ios_base::in);
667 if ( !inputmomdata24 ) {
668 cout <<
" can not open: " << psip_kap_mom << endl;
671 ifstream inputmomdata24mc(psip_kap_mom_mc.c_str(),std::ios_base::in);
672 if ( !inputmomdata24mc ) {
673 cout <<
" can not open: " << psip_kap_mom_mc << endl;
676 for(
int i=0; i<9; i++) {
677 inputmomdata24>>m_psip_kap_ptrk_offset[i];
678 inputmomdata24>>m_psip_kap_ptrk_sigma[i];
679 inputmomdata24mc>>m_psip_mc_kap_ptrk_offset[i];
680 inputmomdata24mc>>m_psip_mc_kap_ptrk_sigma[i];
684 std::string psip_kam_mom =
path +
"/share/Psip/kaon/dedx_kam.txt";
685 std::string psip_kam_mom_mc =
path +
"/share/Psip/kaon/dedx_kam_mc.txt";
686 ifstream inputmomdata25(psip_kam_mom.c_str(),std::ios_base::in);
687 if ( !inputmomdata25 ) {
688 cout <<
" can not open: " << psip_kam_mom << endl;
691 ifstream inputmomdata25mc(psip_kam_mom_mc.c_str(),std::ios_base::in);
692 if ( !inputmomdata25mc ) {
693 cout <<
" can not open: " << psip_kam_mom_mc << endl;
696 for(
int i=0; i<9; i++) {
697 inputmomdata25>>m_psip_kam_ptrk_offset[i];
698 inputmomdata25>>m_psip_kam_ptrk_sigma[i];
699 inputmomdata25mc>>m_psip_mc_kam_ptrk_offset[i];
700 inputmomdata25mc>>m_psip_mc_kam_ptrk_sigma[i];
705 std::string psip_protonp_mom =
path +
"/share/Psip/proton/dedx_protonp.txt";
706 std::string psip_protonp_mom_mc =
path +
"/share/Psip/proton/dedx_protonp_mc.txt";
707 ifstream inputmomdata26(psip_protonp_mom.c_str(),std::ios_base::in);
708 if ( !inputmomdata26 ) {
709 cout <<
" can not open: " << psip_protonp_mom << endl;
712 ifstream inputmomdata26mc(psip_protonp_mom_mc.c_str(),std::ios_base::in);
713 if ( !inputmomdata26mc ) {
714 cout <<
" can not open: " << psip_protonp_mom_mc << endl;
717 for(
int i=0; i<9; i++) {
718 inputmomdata26>>m_psip_protonp_ptrk_offset[i];
719 inputmomdata26>>m_psip_protonp_ptrk_sigma[i];
720 inputmomdata26mc>>m_psip_mc_protonp_ptrk_offset[i];
721 inputmomdata26mc>>m_psip_mc_protonp_ptrk_sigma[i];
725 std::string psip_protonm_mom =
path +
"/share/Psip/proton/dedx_protonm.txt";
726 std::string psip_protonm_mom_mc =
path +
"/share/Psip/proton/dedx_protonm_mc.txt";
727 ifstream inputmomdata27(psip_protonm_mom.c_str(),std::ios_base::in);
728 if ( !inputmomdata27 ) {
729 cout <<
" can not open: " << psip_protonm_mom << endl;
732 ifstream inputmomdata27mc(psip_protonm_mom_mc.c_str(),std::ios_base::in);
733 if ( !inputmomdata27mc ) {
734 cout <<
" can not open: " << psip_protonm_mom_mc << endl;
737 for(
int i=0; i<9; i++) {
738 inputmomdata27>>m_psip_protonm_ptrk_offset[i];
739 inputmomdata27>>m_psip_protonm_ptrk_sigma[i];
740 inputmomdata27mc>>m_psip_mc_protonm_ptrk_offset[i];
741 inputmomdata27mc>>m_psip_mc_protonm_ptrk_sigma[i];
745 std::string psipp_pi_mom =
path +
"/share/Psipp/pion/dedx_pi.txt";
746 std::string psipp_pi_mom_mc =
path +
"/share/Psipp/pion/dedx_pi_mc.txt";
747 ifstream inputmomdata28(psipp_pi_mom.c_str(),std::ios_base::in);
748 if ( !inputmomdata28 ) {
749 cout <<
" can not open: " << psipp_pi_mom << endl;
752 ifstream inputmomdata28mc(psipp_pi_mom_mc.c_str(),std::ios_base::in);
753 if ( !inputmomdata28mc ) {
754 cout <<
" can not open: " << psipp_pi_mom_mc << endl;
757 for(
int i=0; i<18; i++) {
758 inputmomdata28>>m_psipp_pi_ptrk_offset[i];
759 inputmomdata28>>m_psipp_pi_ptrk_sigma[i];
760 inputmomdata28mc>>m_psipp_mc_pi_ptrk_offset[i];
761 inputmomdata28mc>>m_psipp_mc_pi_ptrk_sigma[i];
765 std::string psipp_pi_the =
path +
"/share/Psipp/pion/dedx_pi_theta.txt";
766 std::string psipp_pi_the_mc =
path +
"/share/Psipp/pion/dedx_pi_theta_mc.txt";
767 ifstream inputmomdata29(psipp_pi_the.c_str(),std::ios_base::in);
768 if ( !inputmomdata29 ) {
769 cout <<
" can not open: " << psipp_pi_the << endl;
772 ifstream inputmomdata29mc(psipp_pi_the_mc.c_str(),std::ios_base::in);
773 if ( !inputmomdata29mc ) {
774 cout <<
" can not open: " << psipp_pi_the_mc << endl;
777 for(
int i=0; i<16; i++) {
778 inputmomdata29>>m_psipp_pi_theta_offset[i];
779 inputmomdata29>>m_psipp_pi_theta_sigma[i];
780 inputmomdata29mc>>m_psipp_mc_pi_theta_offset[i];
781 inputmomdata29mc>>m_psipp_mc_pi_theta_sigma[i];
785 std::string psipp_ka_mom =
path +
"/share/Psipp/kaon/dedx_ka.txt";
786 std::string psipp_ka_mom_mc =
path +
"/share/Psipp/kaon/dedx_ka_mc.txt";
787 ifstream inputmomdata30(psipp_ka_mom.c_str(),std::ios_base::in);
788 if ( !inputmomdata30 ) {
789 cout <<
" can not open: " << psipp_ka_mom << endl;
792 ifstream inputmomdata30mc(psipp_ka_mom_mc.c_str(),std::ios_base::in);
793 if ( !inputmomdata30mc ) {
794 cout <<
" can not open: " << psipp_ka_mom_mc << endl;
797 for(
int i=0; i<17; i++) {
798 inputmomdata30>>m_psipp_ka_ptrk_offset[i];
799 inputmomdata30>>m_psipp_ka_ptrk_sigma[i];
800 inputmomdata30mc>>m_psipp_mc_ka_ptrk_offset[i];
801 inputmomdata30mc>>m_psipp_mc_ka_ptrk_sigma[i];
805 std::string psipp_ka_the =
path +
"/share/Psipp/kaon/dedx_ka_theta.txt";
806 std::string psipp_ka_the_mc =
path +
"/share/Psipp/kaon/dedx_ka_theta_mc.txt";
807 ifstream inputmomdata31(psipp_ka_the.c_str(),std::ios_base::in);
808 if ( !inputmomdata31 ) {
809 cout <<
" can not open: " << psipp_ka_the << endl;
812 ifstream inputmomdata31mc(psipp_ka_the_mc.c_str(),std::ios_base::in);
813 if ( !inputmomdata31mc ) {
814 cout <<
" can not open: " << psipp_ka_the_mc << endl;
817 for(
int i=0; i<16; i++) {
818 inputmomdata31>>m_psipp_ka_theta_offset[i];
819 inputmomdata31>>m_psipp_ka_theta_sigma[i];
820 inputmomdata31mc>>m_psipp_mc_ka_theta_offset[i];
821 inputmomdata31mc>>m_psipp_mc_ka_theta_sigma[i];
826 std::string psipp_proton_mom =
path +
"/share/Psipp/proton/dedx_proton.txt";
827 std::string psipp_proton_mom_mc =
path +
"/share/Psipp/proton/dedx_proton_mc.txt";
828 ifstream inputmomdata32(psipp_proton_mom.c_str(),std::ios_base::in);
829 if ( !inputmomdata32 ) {
830 cout <<
" can not open: " << psipp_proton_mom << endl;
833 ifstream inputmomdata32mc(psipp_proton_mom_mc.c_str(),std::ios_base::in);
834 if ( !inputmomdata32mc ) {
835 cout <<
" can not open: " << psipp_proton_mom_mc << endl;
838 for(
int i=0; i<18; i++) {
839 inputmomdata32>>m_psipp_proton_ptrk_offset[i];
840 inputmomdata32>>m_psipp_proton_ptrk_sigma[i];
842 for(
int i=0; i<9; i++) {
843 inputmomdata32mc>>m_psipp_mc_proton_ptrk_offset[i];
844 inputmomdata32mc>>m_psipp_mc_proton_ptrk_sigma[i];
848 std::string psipp_proton_the =
path +
"/share/Psipp/proton/dedx_proton_theta.txt";
849 std::string psipp_proton_the_mc =
path +
"/share/Psipp/proton/dedx_proton_theta_mc.txt";
850 ifstream inputmomdata33(psipp_proton_the.c_str(),std::ios_base::in);
851 if ( !inputmomdata33 ) {
852 cout <<
" can not open: " << psipp_proton_the << endl;
855 ifstream inputmomdata33mc(psipp_proton_the_mc.c_str(),std::ios_base::in);
856 if ( !inputmomdata33mc ) {
857 cout <<
" can not open: " << psipp_proton_the_mc << endl;
860 for(
int i=0; i<18; i++) {
861 inputmomdata33>>m_psipp_proton_theta_offset[i];
862 inputmomdata33>>m_psipp_proton_theta_sigma[i];
863 inputmomdata33mc>>m_psipp_mc_proton_theta_offset[i];
864 inputmomdata33mc>>m_psipp_mc_proton_theta_sigma[i];