166 string data_dir = (gSystem->Getenv(
"GINUKEHADRONDATA")) ?
167 string(gSystem->Getenv(
"GINUKEHADRONDATA")) :
168 string(gSystem->Getenv(
"GENIE")) +
string(
"/data/evgen/intranuke");
171 <<
"Loading INTRANUKE hadron data from: " <<
data_dir;
175 string datafile_NN = data_dir +
"/tot_xsec/intranuke-xsections-NN2014.dat";
176 string datafile_pipN = data_dir +
"/tot_xsec/intranuke-xsections-pi+N.dat";
177 string datafile_pi0N = data_dir +
"/tot_xsec/intranuke-xsections-pi0N.dat";
178 string datafile_NA = data_dir +
"/tot_xsec/intranuke-fractions-NA.dat";
179 string datafile_KA = data_dir +
"/tot_xsec/intranuke-fractions-KA.dat";
180 string datafile_gamN = data_dir +
"/tot_xsec/intranuke-xsections-gamN.dat";
181 string datafile_kN = data_dir +
"/tot_xsec/intranuke-xsections-kaonN.dat";
185 assert( ! gSystem->AccessPathName(datafile_NN. c_str()) );
186 assert( ! gSystem->AccessPathName(datafile_pipN.c_str()) );
187 assert( ! gSystem->AccessPathName(datafile_pi0N.c_str()) );
188 assert( ! gSystem->AccessPathName(datafile_KA. c_str()) );
189 assert( ! gSystem->AccessPathName(datafile_gamN.c_str()) );
190 assert( ! gSystem->AccessPathName(datafile_kN. c_str()) );
192 LOG(
"INukeData",
pINFO) <<
"Found all necessary data files...";
204 data_NN.ReadFile(datafile_NN.c_str(),
"ke/D:pp_tot/D:pp_elas/D:pp_reac/D:pn_tot/D:pn_elas/D:pn_reac/D:nn_tot/D:nn_elas/D:nn_reac/D:pp_cmp/D:pn_cmp/D:nn_cmp/D");
205 data_pipN.ReadFile(datafile_pipN.c_str(),
206 "ke/D:pipn_tot/D:pipn_cex/D:pipn_elas/D:pipn_reac/D:pipp_tot/D:pipp_cex/D:pipp_elas/D:pipp_reac/D:pipd_abs");
207 data_pi0N.ReadFile(datafile_pi0N.c_str(),
208 "ke/D:pi0n_tot/D:pi0n_cex/D:pi0n_elas/D:pi0n_reac/D:pi0p_tot/D:pi0p_cex/D:pi0p_elas/D:pi0p_reac/D:pi0d_abs");
209 data_NA.ReadFile(datafile_NA.c_str(),
210 "ke/D:pA_tot/D:pA_elas/D:pA_inel/D:pA_cex/D:pA_abs/D:pA_pipro/D");
211 data_gamN.ReadFile(datafile_gamN.c_str(),
212 "ke/D:pi0p_tot/D:pipn_tot/D:pimp_tot/D:pi0n_tot/D:gamp_fs/D:gamn_fs/D:gamN_tot/D");
213 data_kN.ReadFile(datafile_kN.c_str(),
214 "ke/D:kpn_elas/D:kpp_elas/D:kp_abs/D:kpN_tot/D");
215 data_KA.ReadFile(datafile_KA.c_str(),
216 "ke/D:KA_tot/D:KA_elas/D:KA_inel/D:KA_abs/D");
218 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in NN : " << data_NN.GetEntries();
219 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in pipN : " << data_pipN.GetEntries();
220 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in pi0N : " << data_pi0N.GetEntries();
221 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in NA : " << data_NA.GetEntries();
222 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in KA : " << data_KA.GetEntries();
223 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in gamN : " << data_gamN.GetEntries();
224 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in kN : " << data_kN.GetEntries();
226 LOG(
"INukeData",
pINFO) <<
"Done loading all x-section files...";
322 const int hN_ppelas_nfiles = 20;
323 const int hN_ppelas_points_per_file = 21;
324 const int hN_ppelas_npoints = hN_ppelas_points_per_file * hN_ppelas_nfiles;
326 double hN_ppelas_energies[hN_ppelas_nfiles] = {
327 50, 100, 150, 200, 250, 300, 350, 400, 450, 500,
328 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000
331 double hN_ppelas_costh [hN_ppelas_points_per_file];
332 double hN_ppelas_xsec [hN_ppelas_npoints];
336 for(
int ifile = 0; ifile < hN_ppelas_nfiles; ifile++) {
338 ostringstream hN_datafile;
339 double ke = hN_ppelas_energies[ifile];
340 hN_datafile << data_dir <<
"/diff_ang/pp/pp" << ke <<
".txt";
343 hN_datafile.str(), ke, hN_ppelas_points_per_file,
344 ipoint, hN_ppelas_costh, hN_ppelas_xsec,2);
348 hN_ppelas_energies,hN_ppelas_costh,hN_ppelas_xsec);
353 const int hN_npelas_nfiles = 20;
354 const int hN_npelas_points_per_file = 21;
355 const int hN_npelas_npoints = hN_npelas_points_per_file * hN_npelas_nfiles;
357 double hN_npelas_energies[hN_npelas_nfiles] = {
358 50, 100, 150, 200, 250, 300, 350, 400, 450, 500,
359 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000
362 double hN_npelas_costh [hN_npelas_points_per_file];
363 double hN_npelas_xsec [hN_npelas_npoints];
367 for(
int ifile = 0; ifile < hN_npelas_nfiles; ifile++) {
369 ostringstream hN_datafile;
370 double ke = hN_npelas_energies[ifile];
371 hN_datafile << data_dir <<
"/diff_ang/pn/pn" << ke <<
".txt";
374 hN_datafile.str(), ke, hN_npelas_points_per_file,
375 ipoint, hN_npelas_costh, hN_npelas_xsec,2);
379 hN_npelas_energies,hN_npelas_costh,hN_npelas_xsec);
384 const int hN_pipNelas_nfiles = 60;
385 const int hN_pipNelas_points_per_file = 21;
386 const int hN_pipNelas_npoints = hN_pipNelas_points_per_file * hN_pipNelas_nfiles;
388 double hN_pipNelas_energies[hN_pipNelas_nfiles] = {
389 10, 20, 30, 40, 50, 60, 70, 80, 90,
390 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
391 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
392 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
393 700, 740, 780, 820, 860, 900, 940, 980,
394 1020, 1060, 1100, 1140, 1180, 1220, 1260,
395 1300, 1340, 1380, 1420, 1460, 1500
398 double hN_pipNelas_costh [hN_pipNelas_points_per_file];
399 double hN_pipNelas_xsec [hN_pipNelas_npoints];
403 for(
int ifile = 0; ifile < hN_pipNelas_nfiles; ifile++) {
405 ostringstream hN_datafile;
406 double ke = hN_pipNelas_energies[ifile];
407 hN_datafile << data_dir <<
"/diff_ang/pip/pip" << ke <<
".txt";
410 hN_datafile.str(), ke, hN_pipNelas_points_per_file,
411 ipoint, hN_pipNelas_costh, hN_pipNelas_xsec,2);
415 hN_pipNelas_energies,hN_pipNelas_costh,hN_pipNelas_xsec);
420 const int hN_pi0Nelas_nfiles = 60;
421 const int hN_pi0Nelas_points_per_file = 21;
422 const int hN_pi0Nelas_npoints = hN_pi0Nelas_points_per_file * hN_pi0Nelas_nfiles;
424 double hN_pi0Nelas_energies[hN_pi0Nelas_nfiles] = {
425 10, 20, 30, 40, 50, 60, 70, 80, 90,
426 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
427 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
428 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
429 700, 740, 780, 820, 860, 900, 940, 980,
430 1020, 1060, 1100, 1140, 1180, 1220, 1260,
431 1300, 1340, 1380, 1420, 1460, 1500
434 double hN_pi0Nelas_costh [hN_pi0Nelas_points_per_file];
435 double hN_pi0Nelas_xsec [hN_pi0Nelas_npoints];
439 for(
int ifile = 0; ifile < hN_pi0Nelas_nfiles; ifile++) {
441 ostringstream hN_datafile;
442 double ke = hN_pi0Nelas_energies[ifile];
443 hN_datafile << data_dir <<
"/diff_ang/pip/pip" << ke <<
".txt";
446 hN_datafile.str(), ke, hN_pi0Nelas_points_per_file,
447 ipoint, hN_pi0Nelas_costh, hN_pi0Nelas_xsec,2);
451 hN_pi0Nelas_energies,hN_pi0Nelas_costh,hN_pi0Nelas_xsec);
456 const int hN_pimNelas_nfiles = 60;
457 const int hN_pimNelas_points_per_file = 21;
458 const int hN_pimNelas_npoints = hN_pimNelas_points_per_file * hN_pimNelas_nfiles;
460 double hN_pimNelas_energies[hN_pimNelas_nfiles] = {
461 10, 20, 30, 40, 50, 60, 70, 80, 90,
462 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
463 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
464 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
465 700, 740, 780, 820, 860, 900, 940, 980,
466 1020, 1060, 1100, 1140, 1180, 1220, 1260,
467 1300, 1340, 1380, 1420, 1460, 1500
470 double hN_pimNelas_costh [hN_pimNelas_points_per_file];
471 double hN_pimNelas_xsec [hN_pimNelas_npoints];
475 for(
int ifile = 0; ifile < hN_pimNelas_nfiles; ifile++) {
477 ostringstream hN_datafile;
478 double ke = hN_pimNelas_energies[ifile];
479 hN_datafile << data_dir <<
"/diff_ang/pim/pim" << ke <<
".txt";
482 hN_datafile.str(), ke, hN_pimNelas_points_per_file,
483 ipoint, hN_pimNelas_costh, hN_pimNelas_xsec,2);
487 hN_pimNelas_energies,hN_pimNelas_costh,hN_pimNelas_xsec);
492 const int hN_kpNelas_nfiles = 18;
493 const int hN_kpNelas_points_per_file = 37;
494 const int hN_kpNelas_npoints = hN_kpNelas_points_per_file * hN_kpNelas_nfiles;
496 double hN_kpNelas_energies[hN_kpNelas_nfiles] = {
497 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
498 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800
501 double hN_kpNelas_costh [hN_kpNelas_points_per_file];
502 double hN_kpNelas_xsec [hN_kpNelas_npoints];
506 for(
int ifile = 0; ifile < hN_kpNelas_nfiles; ifile++) {
508 ostringstream hN_datafile;
509 double ke = hN_kpNelas_energies[ifile];
510 hN_datafile << data_dir <<
"/diff_ang/kpn/kpn" << ke <<
".txt";
513 hN_datafile.str(), ke, hN_kpNelas_points_per_file,
514 ipoint, hN_kpNelas_costh, hN_kpNelas_xsec,2);
518 hN_kpNelas_energies,hN_kpNelas_costh,hN_kpNelas_xsec);
523 const int hN_kpPelas_nfiles = 18;
524 const int hN_kpPelas_points_per_file = 37;
525 const int hN_kpPelas_npoints = hN_kpPelas_points_per_file * hN_kpPelas_nfiles;
527 double hN_kpPelas_energies[hN_kpPelas_nfiles] = {
528 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
529 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800
532 double hN_kpPelas_costh [hN_kpPelas_points_per_file];
533 double hN_kpPelas_xsec [hN_kpPelas_npoints];
537 for(
int ifile = 0; ifile < hN_kpPelas_nfiles; ifile++) {
539 ostringstream hN_datafile;
540 double ke = hN_kpPelas_energies[ifile];
541 hN_datafile << data_dir <<
"/diff_ang/kpp/kpp" << ke <<
".txt";
544 hN_datafile.str(), ke, hN_kpPelas_points_per_file,
545 ipoint, hN_kpPelas_costh, hN_kpPelas_xsec,2);
549 hN_kpPelas_energies,hN_kpPelas_costh,hN_kpPelas_xsec);
554 const int hN_piNcex_nfiles = 60;
555 const int hN_piNcex_points_per_file = 21;
556 const int hN_piNcex_npoints = hN_piNcex_points_per_file * hN_piNcex_nfiles;
558 double hN_piNcex_energies[hN_piNcex_nfiles] = {
559 10, 20, 30, 40, 50, 60, 70, 80, 90,
560 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
561 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
562 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
563 700, 740, 780, 820, 860, 900, 940, 980,
564 1020, 1060, 1100, 1140, 1180, 1220, 1260,
565 1300, 1340, 1380, 1420, 1460, 1500
568 double hN_piNcex_costh [hN_piNcex_points_per_file];
569 double hN_piNcex_xsec [hN_piNcex_npoints];
573 for(
int ifile = 0; ifile < hN_piNcex_nfiles; ifile++) {
575 ostringstream hN_datafile;
576 double ke = hN_piNcex_energies[ifile];
577 hN_datafile << data_dir <<
"/diff_ang/pie/pie" << ke <<
".txt";
580 hN_datafile.str(), ke, hN_piNcex_points_per_file,
581 ipoint, hN_piNcex_costh, hN_piNcex_xsec,2);
585 hN_piNcex_energies,hN_piNcex_costh,hN_piNcex_xsec);
590 const int hN_piNabs_nfiles = 19;
591 const int hN_piNabs_points_per_file = 21;
592 const int hN_piNabs_npoints = hN_piNabs_points_per_file * hN_piNabs_nfiles;
594 double hN_piNabs_energies[hN_piNabs_nfiles] = {
595 50, 75, 100, 125, 150, 175, 200, 225, 250, 275,
596 300, 325, 350, 375, 400, 425, 450, 475, 500
599 double hN_piNabs_costh [hN_piNabs_points_per_file];
600 double hN_piNabs_xsec [hN_piNabs_npoints];
604 for(
int ifile = 0; ifile < hN_piNabs_nfiles; ifile++) {
606 ostringstream hN_datafile;
607 double ke = hN_piNabs_energies[ifile];
608 hN_datafile << data_dir <<
"/diff_ang/pid2p/pid2p" << ke <<
".txt";
611 hN_datafile.str(), ke, hN_piNabs_points_per_file,
612 ipoint, hN_piNabs_costh, hN_piNabs_xsec,2);
616 hN_piNabs_energies,hN_piNabs_costh,hN_piNabs_xsec);
621 const int hN_gampi0pInelas_nfiles = 29;
622 const int hN_gampi0pInelas_points_per_file = 37;
623 const int hN_gampi0pInelas_npoints = hN_gampi0pInelas_points_per_file * hN_gampi0pInelas_nfiles;
625 double hN_gampi0pInelas_energies[hN_gampi0pInelas_nfiles] = {
626 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
627 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
628 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
631 double hN_gampi0pInelas_costh [hN_gampi0pInelas_points_per_file];
632 double hN_gampi0pInelas_xsec [hN_gampi0pInelas_npoints];
636 for(
int ifile = 0; ifile < hN_gampi0pInelas_nfiles; ifile++) {
638 ostringstream hN_datafile;
639 double ke = hN_gampi0pInelas_energies[ifile];
640 hN_datafile << data_dir <<
"/diff_ang/gampi0p/" << ke <<
"-pi0p.txt";
643 hN_datafile.str(), ke, hN_gampi0pInelas_points_per_file,
644 ipoint, hN_gampi0pInelas_costh, hN_gampi0pInelas_xsec,3);
648 hN_gampi0pInelas_energies,hN_gampi0pInelas_costh,hN_gampi0pInelas_xsec);
653 const int hN_gampi0nInelas_nfiles = 29;
654 const int hN_gampi0nInelas_points_per_file = 37;
655 const int hN_gampi0nInelas_npoints = hN_gampi0nInelas_points_per_file * hN_gampi0nInelas_nfiles;
657 double hN_gampi0nInelas_energies[hN_gampi0nInelas_nfiles] = {
658 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
659 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
660 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
663 double hN_gampi0nInelas_costh [hN_gampi0nInelas_points_per_file];
664 double hN_gampi0nInelas_xsec [hN_gampi0nInelas_npoints];
667 for(
int ifile = 0; ifile < hN_gampi0nInelas_nfiles; ifile++) {
669 ostringstream hN_datafile;
670 double ke = hN_gampi0nInelas_energies[ifile];
671 hN_datafile << data_dir <<
"/diff_ang/gampi0n/" << ke <<
"-pi0n.txt";
674 hN_datafile.str(), ke, hN_gampi0nInelas_points_per_file,
675 ipoint, hN_gampi0nInelas_costh, hN_gampi0nInelas_xsec,3);
679 hN_gampi0nInelas_energies,hN_gampi0nInelas_costh,hN_gampi0nInelas_xsec);
684 const int hN_gampipnInelas_nfiles = 29;
685 const int hN_gampipnInelas_points_per_file = 37;
686 const int hN_gampipnInelas_npoints = hN_gampipnInelas_points_per_file * hN_gampipnInelas_nfiles;
688 double hN_gampipnInelas_energies[hN_gampipnInelas_nfiles] = {
689 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
690 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
691 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
694 double hN_gampipnInelas_costh [hN_gampipnInelas_points_per_file];
695 double hN_gampipnInelas_xsec [hN_gampipnInelas_npoints];
699 for(
int ifile = 0; ifile < hN_gampipnInelas_nfiles; ifile++) {
701 ostringstream hN_datafile;
702 double ke = hN_gampipnInelas_energies[ifile];
703 hN_datafile << data_dir <<
"/diff_ang/gampi+n/" << ke <<
"-pi+n.txt";
706 hN_datafile.str(), ke, hN_gampipnInelas_points_per_file,
707 ipoint, hN_gampipnInelas_costh, hN_gampipnInelas_xsec,3);
711 hN_gampipnInelas_energies,hN_gampipnInelas_costh,hN_gampipnInelas_xsec);
716 const int hN_gampimpInelas_nfiles = 29;
717 const int hN_gampimpInelas_points_per_file = 37;
718 const int hN_gampimpInelas_npoints = hN_gampimpInelas_points_per_file * hN_gampimpInelas_nfiles;
720 double hN_gampimpInelas_energies[hN_gampimpInelas_nfiles] = {
721 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
722 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
723 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
726 double hN_gampimpInelas_costh [hN_gampimpInelas_points_per_file];
727 double hN_gampimpInelas_xsec [hN_gampimpInelas_npoints];
731 for(
int ifile = 0; ifile < hN_gampimpInelas_nfiles; ifile++) {
733 ostringstream hN_datafile;
734 double ke = hN_gampimpInelas_energies[ifile];
735 hN_datafile << data_dir <<
"/diff_ang/gampi-p/" << ke <<
"-pi-p.txt";
738 hN_datafile.str(), ke, hN_gampimpInelas_points_per_file,
739 ipoint, hN_gampimpInelas_costh, hN_gampimpInelas_xsec,3);
743 hN_gampimpInelas_energies,hN_gampimpInelas_costh,hN_gampimpInelas_xsec);
750 bool saveTGraphsToFile =
true;
752 if (saveTGraphsToFile) {
754 LOG(
"INukeHadroData2014",
pNOTICE) <<
"Saving INTRANUKE hadron x-section data to ROOT file: " <<
filename;
755 TGraphs_file.Open(filename.c_str(),
"RECREATE");
760 const int pipATot_nfiles = 22;
761 const int pipATot_nuclei[pipATot_nfiles] = {1, 2, 3, 4, 6, 7, 9, 12, 16, 27, 28, 32, 40, 48, 56, 58, 63, 93, 120, 165, 181, 209};
762 const int pipATot_npoints = 203;
764 TPipA_Tot =
new TGraph2D(pipATot_npoints);
769 for(
int ifile=0; ifile < pipATot_nfiles; ifile++) {
770 ostringstream ADep_datafile;
771 int nucleus = pipATot_nuclei[ifile];
772 ADep_datafile << data_dir <<
"/tot_xsec/pipA_tot/pip" << nucleus <<
"_tot.txt";
773 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
774 for(
int i=0;
i < buff->GetN();
i++) {
775 buff -> GetPoint(
i,x,y);
776 TPipA_Tot -> SetPoint(ipoint,(
double)nucleus,x,y);
782 if (saveTGraphsToFile) {
791 const int pipAAbs_f_nfiles = 18;
792 const int pipAAbs_f_nuclei[pipAAbs_f_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 48, 56, 58, 63, 93, 120, 165, 181, 209};
793 const int pipAAbs_f_npoints = 111;
799 for(
int ifile=0; ifile < pipAAbs_f_nfiles; ifile++) {
800 ostringstream ADep_datafile;
801 int nucleus = pipAAbs_f_nuclei[ifile];
802 ADep_datafile << data_dir <<
"/tot_xsec/pipA_abs_frac/pip" << nucleus <<
"_abs_frac.txt";
803 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
804 for(
int i=0;
i < buff->GetN();
i++) {
805 buff -> GetPoint(
i,x,y);
811 if (saveTGraphsToFile) {
820 const int pipACEx_f_nfiles = 18;
821 const int pipACEx_f_nuclei[pipACEx_f_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 48, 56, 58, 63, 93, 120, 165, 181, 209};
822 const int pipACEx_f_npoints = 129;
829 for(
int ifile=0; ifile < pipACEx_f_nfiles; ifile++) {
830 ostringstream ADep_datafile;
831 int nucleus = pipACEx_f_nuclei[ifile];
832 ADep_datafile << data_dir <<
"/tot_xsec/pipA_cex_frac/pip" << nucleus <<
"_cex_frac.txt";
833 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
834 for(
int i=0;
i < buff->GetN();
i++) {
835 buff -> GetPoint(
i,x,y);
842 if (saveTGraphsToFile) {
852 TGraph2D * TPipA_CEx;
854 const int pipACEx_nfiles = 18;
855 const int pipACEx_nuclei[pipACEx_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 48, 56, 58, 63, 93, 120, 165, 181, 209};
856 const int pipACEx_npoints = 129;
858 TPipA_CEx =
new TGraph2D(pipACEx_npoints);
863 for(
int ifile=0; ifile < pipACEx_nfiles; ifile++) {
864 ostringstream ADep_datafile;
865 int nucleus = pipACEx_nuclei[ifile];
866 ADep_datafile << data_dir <<
"/tot_xsec/pipA_cex/pip" << nucleus <<
"_cex.txt";
867 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
868 for(
int i=0;
i < buff->GetN();
i++) {
869 buff -> GetPoint(
i,x,y);
870 TPipA_CEx -> SetPoint(ipoint,(
double)nucleus,x,y);
876 if (saveTGraphsToFile) {
877 TPipA_CEx -> Write(
"TPipA_CEx");
884 TGraph2D * TPipA_Abs;
886 const int pipAAbs_nfiles = 18;
887 const int pipAAbs_nuclei[pipAAbs_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 48, 56, 58, 63, 93, 120, 165, 181, 209};
888 const int pipAAbs_npoints = 111;
890 TPipA_Abs =
new TGraph2D(pipAAbs_npoints);
895 for(
int ifile=0; ifile < pipAAbs_nfiles; ifile++) {
896 ostringstream ADep_datafile;
897 int nucleus = pipAAbs_nuclei[ifile];
898 ADep_datafile << data_dir <<
"/tot_xsec/pipA_abs/pip" << nucleus <<
"_abs.txt";
899 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
900 for(
int i=0;
i < buff->GetN();
i++) {
901 buff -> GetPoint(
i,x,y);
902 TPipA_Abs -> SetPoint(ipoint,(
double)nucleus,x,y);
908 if (saveTGraphsToFile) {
909 TPipA_Abs -> Write(
"TPipA_Abs");
916 TGraph2D * TPipA_Elas;
918 const int pipAElas_nfiles = 18;
919 const int pipAElas_nuclei[pipAElas_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 48, 56, 58, 63, 93, 120, 165, 181, 209};
920 const int pipAElas_npoints = 125;
922 TPipA_Elas =
new TGraph2D(pipAElas_npoints);
927 for(
int ifile=0; ifile < pipAElas_nfiles; ifile++) {
928 ostringstream ADep_datafile;
929 int nucleus = pipAElas_nuclei[ifile];
930 ADep_datafile << data_dir <<
"/tot_xsec/pipA_elas/pip" << nucleus <<
"_elas.txt";
931 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
932 for(
int i=0;
i < buff->GetN();
i++) {
933 buff -> GetPoint(
i,x,y);
934 TPipA_Elas -> SetPoint(ipoint,(
double)nucleus,x,y);
940 if (saveTGraphsToFile) {
941 TPipA_Elas -> Write(
"TPipA_Elas");
948 TGraph2D * TPipA_Inelas;
950 const int pipAInelas_nfiles = 20;
951 const int pipAInelas_nuclei[pipAInelas_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 40, 48, 56, 58, 63, 93, 120, 165, 181, 208, 209};
952 const int pipAInelas_npoints = 118;
954 TPipA_Inelas =
new TGraph2D(pipAInelas_npoints);
959 for(
int ifile=0; ifile < pipAInelas_nfiles; ifile++) {
960 ostringstream ADep_datafile;
961 int nucleus = pipAInelas_nuclei[ifile];
962 ADep_datafile << data_dir <<
"/tot_xsec/pipA_inelas/pip" << nucleus <<
"_inelas.txt";
963 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
964 for(
int i=0;
i < buff->GetN();
i++) {
965 buff -> GetPoint(
i,x,y);
966 TPipA_Inelas -> SetPoint(ipoint,(
double)nucleus,x,y);
972 if (saveTGraphsToFile) {
973 TPipA_Inelas -> Write(
"TPipA_Inelas");
982 const int pipAElas_f_nfiles = 18;
983 const int pipAElas_f_nuclei[pipAElas_f_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 48, 56, 58, 63, 93, 120, 165, 181, 209};
984 const int pipAElas_f_npoints = 125;
991 for(
int ifile=0; ifile < pipAElas_f_nfiles; ifile++) {
992 ostringstream ADep_datafile;
993 int nucleus = pipAElas_f_nuclei[ifile];
994 ADep_datafile << data_dir <<
"/tot_xsec/pipA_elas_frac/pip" << nucleus <<
"_elas_frac.txt";
995 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
996 for(
int i=0;
i < buff->GetN();
i++) {
997 buff -> GetPoint(
i,x,y);
1004 if (saveTGraphsToFile) {
1013 const int pipAInelas_f_nfiles = 20;
1014 const int pipAInelas_f_nuclei[pipAInelas_f_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 40, 48, 56, 58, 63, 93, 120, 165, 181, 208, 209};
1015 const int pipAInelas_f_npoints = 118;
1022 for(
int ifile=0; ifile < pipAInelas_f_nfiles; ifile++) {
1023 ostringstream ADep_datafile;
1024 int nucleus = pipAInelas_f_nuclei[ifile];
1025 ADep_datafile << data_dir <<
"/tot_xsec/pipA_inelas_frac/pip" << nucleus <<
"_inelas_frac.txt";
1026 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
1027 for(
int i=0;
i < buff->GetN();
i++) {
1028 buff -> GetPoint(
i,x,y);
1035 if (saveTGraphsToFile) {
1044 const int pipAPiPro_f_nfiles = 17;
1045 const int pipAPiPro_f_nuclei[pipAPiPro_f_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 48, 56, 58, 63, 93, 120, 165, 181, 209};
1046 const int pipAPiPro_f_npoints = 76;
1053 for(
int ifile=0; ifile < pipAPiPro_f_nfiles; ifile++) {
1054 ostringstream ADep_datafile;
1055 int nucleus = pipAPiPro_f_nuclei[ifile];
1056 ADep_datafile << data_dir <<
"/tot_xsec/pipA_pipro_frac/pip" << nucleus <<
"_pipro_frac.txt";
1057 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
1058 for(
int i=0;
i < buff->GetN();
i++) {
1059 buff -> GetPoint(
i,x,y);
1066 if (saveTGraphsToFile) {
1071 TGraphs_file.Close();
1073 LOG(
"INukeData",
pINFO) <<
"Done building x-section splines...";
TGraph2D * TfracPipA_PiPro
BLI2DNonUnifGrid * fhN2dXSecPi0N_Elas
BLI2DNonUnifGrid * fhN2dXSecKpN_Elas
TGraph2D * TfracPipA_Elas
A numeric analysis tool class for interpolating 1-D functions.
Spline * fXSecPi0p_Tot
pi0p hN x-section splines
Spline * fXSecPipp_Tot
pi+p hN x-section splines
BLI2DNonUnifGrid * fhN2dXSecPiN_Abs
BLI2DNonUnifGrid * fhN2dXSecPimN_Elas
BLI2DNonUnifGrid * fhN2dXSecKpP_Elas
Spline * fXSecKpn_Elas
K+N x-section splines.
BLI2DNonUnifGrid * fhN2dXSecPiN_CEx
Spline * fXSecGamp_fs
gamma A x-section splines
BLI2DNonUnifGrid * fhN2dXSecNP_Elas
Spline * fXSecPp_Tot
p/nN x-section splines
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
BLI2DNonUnifGrid * fhN2dXSecGamPimP_Inelas
Spline * fFracPA_Tot
N+A x-section splines.
BLI2DNonUnifGrid * fhN2dXSecGamPipN_Inelas
Spline * fXSecPipn_Tot
pi+n hN x-section splines
Spline * fXSecPi0n_Tot
pi0n hN x-section splines
BLI2DNonUnifGrid * fhN2dXSecGamPi0N_Inelas
BLI2DNonUnifGrid * fhN2dXSecPP_Elas
void ReadhNFile(string filename, double ke, int npoints, int &curr_point, double *costh_array, double *xsec_array, int cols)
BLI2DNonUnifGrid * fhN2dXSecPipN_Elas
TGraph2D * TfracPipA_Inelas
BLI2DNonUnifGrid * fhN2dXSecGamPi0P_Inelas
Spline * fFracKA_Tot
K+A x-section splines.