192 string data_dir = (gSystem->Getenv(
"GINUKEHADRONDATA")) ?
193 string(gSystem->Getenv(
"GINUKEHADRONDATA")) :
194 string(gSystem->Getenv(
"GENIE")) +
string(
"/data/evgen/intranuke");
197 <<
"Loading INTRANUKE hadron data from: " <<
data_dir;
201 string datafile_NN = data_dir +
"/tot_xsec/intranuke-xsections-NN2014.dat";
202 string datafile_pipN = data_dir +
"/tot_xsec/intranuke-xsections-pi+N.dat";
203 string datafile_pi0N = data_dir +
"/tot_xsec/intranuke-xsections-pi0N.dat";
204 string datafile_NA = data_dir +
"/tot_xsec/intranuke-fractions-NA2016.dat";
205 string datafile_KA = data_dir +
"/tot_xsec/intranuke-fractions-KA.dat";
206 string datafile_gamN = data_dir +
"/tot_xsec/intranuke-xsections-gamN.dat";
207 string datafile_kN = data_dir +
"/tot_xsec/intranuke-xsections-kaonN2018.dat";
211 assert( ! gSystem->AccessPathName(datafile_NN. c_str()) );
212 assert( ! gSystem->AccessPathName(datafile_pipN.c_str()) );
213 assert( ! gSystem->AccessPathName(datafile_pi0N.c_str()) );
214 assert( ! gSystem->AccessPathName(datafile_NA. c_str()) );
215 assert( ! gSystem->AccessPathName(datafile_KA. c_str()) );
216 assert( ! gSystem->AccessPathName(datafile_gamN.c_str()) );
217 assert( ! gSystem->AccessPathName(datafile_kN. c_str()) );
219 LOG(
"INukeData",
pINFO) <<
"Found all necessary data files...";
231 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");
232 data_pipN.ReadFile(datafile_pipN.c_str(),
233 "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");
234 data_pi0N.ReadFile(datafile_pi0N.c_str(),
235 "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");
238 data_NA.ReadFile(datafile_NA.c_str(),
239 "ke/D:pA_tot/D:pA_inel/D:pA_cex/D:pA_abs/D:pA_pipro/D:pA_cmp/D");
240 data_gamN.ReadFile(datafile_gamN.c_str(),
241 "ke/D:pi0p_tot/D:pipn_tot/D:pimp_tot/D:pi0n_tot/D:gamp_fs/D:gamn_fs/D:gamN_tot/D");
242 data_kN.ReadFile(datafile_kN.c_str(),
243 "ke/D:kpp_elas/D:kpn_elas/D:kpn_cex/D:kp_abs/D:kpN_tot/D");
244 data_KA.ReadFile(datafile_KA.c_str(),
245 "ke/D:KA_tot/D:KA_elas/D:KA_inel/D:KA_abs/D");
247 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in NN : " << data_NN.GetEntries();
248 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in pipN : " << data_pipN.GetEntries();
249 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in pi0N : " << data_pi0N.GetEntries();
250 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in NA : " << data_NA.GetEntries();
251 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in KA : " << data_KA.GetEntries();
252 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in gamN : " << data_gamN.GetEntries();
253 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in kN : " << data_kN.GetEntries();
255 LOG(
"INukeData",
pINFO) <<
"Done loading all x-section files...";
356 const int hN_ppelas_nfiles = 20;
357 const int hN_ppelas_points_per_file = 21;
358 const int hN_ppelas_npoints = hN_ppelas_points_per_file * hN_ppelas_nfiles;
360 double hN_ppelas_energies[hN_ppelas_nfiles] = {
361 50, 100, 150, 200, 250, 300, 350, 400, 450, 500,
362 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000
365 double hN_ppelas_costh [hN_ppelas_points_per_file];
366 double hN_ppelas_xsec [hN_ppelas_npoints];
370 for(
int ifile = 0; ifile < hN_ppelas_nfiles; ifile++) {
372 ostringstream hN_datafile;
373 double ke = hN_ppelas_energies[ifile];
374 hN_datafile << data_dir <<
"/diff_ang/pp/pp" << ke <<
".txt";
377 hN_datafile.str(), ke, hN_ppelas_points_per_file,
378 ipoint, hN_ppelas_costh, hN_ppelas_xsec,2);
382 hN_ppelas_energies,hN_ppelas_costh,hN_ppelas_xsec);
387 const int hN_npelas_nfiles = 20;
388 const int hN_npelas_points_per_file = 21;
389 const int hN_npelas_npoints = hN_npelas_points_per_file * hN_npelas_nfiles;
391 double hN_npelas_energies[hN_npelas_nfiles] = {
392 50, 100, 150, 200, 250, 300, 350, 400, 450, 500,
393 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000
396 double hN_npelas_costh [hN_npelas_points_per_file];
397 double hN_npelas_xsec [hN_npelas_npoints];
401 for(
int ifile = 0; ifile < hN_npelas_nfiles; ifile++) {
403 ostringstream hN_datafile;
404 double ke = hN_npelas_energies[ifile];
405 hN_datafile << data_dir <<
"/diff_ang/pn/pn" << ke <<
".txt";
408 hN_datafile.str(), ke, hN_npelas_points_per_file,
409 ipoint, hN_npelas_costh, hN_npelas_xsec,2);
413 hN_npelas_energies,hN_npelas_costh,hN_npelas_xsec);
418 const int hN_pipNelas_nfiles = 60;
419 const int hN_pipNelas_points_per_file = 21;
420 const int hN_pipNelas_npoints = hN_pipNelas_points_per_file * hN_pipNelas_nfiles;
422 double hN_pipNelas_energies[hN_pipNelas_nfiles] = {
423 10, 20, 30, 40, 50, 60, 70, 80, 90,
424 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
425 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
426 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
427 700, 740, 780, 820, 860, 900, 940, 980,
428 1020, 1060, 1100, 1140, 1180, 1220, 1260,
429 1300, 1340, 1380, 1420, 1460, 1500
432 double hN_pipNelas_costh [hN_pipNelas_points_per_file];
433 double hN_pipNelas_xsec [hN_pipNelas_npoints];
437 for(
int ifile = 0; ifile < hN_pipNelas_nfiles; ifile++) {
439 ostringstream hN_datafile;
440 double ke = hN_pipNelas_energies[ifile];
441 hN_datafile << data_dir <<
"/diff_ang/pip/pip" << ke <<
".txt";
444 hN_datafile.str(), ke, hN_pipNelas_points_per_file,
445 ipoint, hN_pipNelas_costh, hN_pipNelas_xsec,2);
449 hN_pipNelas_energies,hN_pipNelas_costh,hN_pipNelas_xsec);
454 const int hN_pi0Nelas_nfiles = 60;
455 const int hN_pi0Nelas_points_per_file = 21;
456 const int hN_pi0Nelas_npoints = hN_pi0Nelas_points_per_file * hN_pi0Nelas_nfiles;
458 double hN_pi0Nelas_energies[hN_pi0Nelas_nfiles] = {
459 10, 20, 30, 40, 50, 60, 70, 80, 90,
460 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
461 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
462 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
463 700, 740, 780, 820, 860, 900, 940, 980,
464 1020, 1060, 1100, 1140, 1180, 1220, 1260,
465 1300, 1340, 1380, 1420, 1460, 1500
468 double hN_pi0Nelas_costh [hN_pi0Nelas_points_per_file];
469 double hN_pi0Nelas_xsec [hN_pi0Nelas_npoints];
473 for(
int ifile = 0; ifile < hN_pi0Nelas_nfiles; ifile++) {
475 ostringstream hN_datafile;
476 double ke = hN_pi0Nelas_energies[ifile];
477 hN_datafile << data_dir <<
"/diff_ang/pip/pip" << ke <<
".txt";
480 hN_datafile.str(), ke, hN_pi0Nelas_points_per_file,
481 ipoint, hN_pi0Nelas_costh, hN_pi0Nelas_xsec,2);
485 hN_pi0Nelas_energies,hN_pi0Nelas_costh,hN_pi0Nelas_xsec);
490 const int hN_pimNelas_nfiles = 60;
491 const int hN_pimNelas_points_per_file = 21;
492 const int hN_pimNelas_npoints = hN_pimNelas_points_per_file * hN_pimNelas_nfiles;
494 double hN_pimNelas_energies[hN_pimNelas_nfiles] = {
495 10, 20, 30, 40, 50, 60, 70, 80, 90,
496 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
497 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
498 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
499 700, 740, 780, 820, 860, 900, 940, 980,
500 1020, 1060, 1100, 1140, 1180, 1220, 1260,
501 1300, 1340, 1380, 1420, 1460, 1500
504 double hN_pimNelas_costh [hN_pimNelas_points_per_file];
505 double hN_pimNelas_xsec [hN_pimNelas_npoints];
509 for(
int ifile = 0; ifile < hN_pimNelas_nfiles; ifile++) {
511 ostringstream hN_datafile;
512 double ke = hN_pimNelas_energies[ifile];
513 hN_datafile << data_dir <<
"/diff_ang/pim/pim" << ke <<
".txt";
516 hN_datafile.str(), ke, hN_pimNelas_points_per_file,
517 ipoint, hN_pimNelas_costh, hN_pimNelas_xsec,2);
521 hN_pimNelas_energies,hN_pimNelas_costh,hN_pimNelas_xsec);
526 const int hN_kpNelas_nfiles = 18;
527 const int hN_kpNelas_points_per_file = 37;
528 const int hN_kpNelas_npoints = hN_kpNelas_points_per_file * hN_kpNelas_nfiles;
530 double hN_kpNelas_energies[hN_kpNelas_nfiles] = {
531 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
532 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800
535 double hN_kpNelas_costh [hN_kpNelas_points_per_file];
536 double hN_kpNelas_xsec [hN_kpNelas_npoints];
540 for(
int ifile = 0; ifile < hN_kpNelas_nfiles; ifile++) {
542 ostringstream hN_datafile;
543 double ke = hN_kpNelas_energies[ifile];
544 hN_datafile << data_dir <<
"/diff_ang/kpn/kpn" << ke <<
".txt";
547 hN_datafile.str(), ke, hN_kpNelas_points_per_file,
548 ipoint, hN_kpNelas_costh, hN_kpNelas_xsec,2);
552 hN_kpNelas_energies,hN_kpNelas_costh,hN_kpNelas_xsec);
556 const int hN_kpNcex_nfiles = 18;
557 const int hN_kpNcex_points_per_file = 37;
558 const int hN_kpNcex_npoints = hN_kpNcex_points_per_file * hN_kpNcex_nfiles;
560 double hN_kpNcex_energies[hN_kpNcex_nfiles] = {
561 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
562 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800
565 double hN_kpNcex_costh [hN_kpNcex_points_per_file];
566 double hN_kpNcex_xsec [hN_kpNcex_npoints];
570 for(
int ifile = 0; ifile < hN_kpNcex_nfiles; ifile++) {
572 ostringstream hN_datafile;
573 double ke = hN_kpNcex_energies[ifile];
574 hN_datafile << data_dir <<
"/diff_ang/kpncex/kpcex" << ke <<
".txt";
577 hN_datafile.str(), ke, hN_kpNcex_points_per_file,
578 ipoint, hN_kpNcex_costh, hN_kpNcex_xsec,2);
587 hN_kpNcex_energies,hN_kpNcex_costh,hN_kpNcex_xsec);
594 const int hN_kpPelas_nfiles = 18;
595 const int hN_kpPelas_points_per_file = 37;
596 const int hN_kpPelas_npoints = hN_kpPelas_points_per_file * hN_kpPelas_nfiles;
598 double hN_kpPelas_energies[hN_kpPelas_nfiles] = {
599 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
600 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800
603 double hN_kpPelas_costh [hN_kpPelas_points_per_file];
604 double hN_kpPelas_xsec [hN_kpPelas_npoints];
608 for(
int ifile = 0; ifile < hN_kpPelas_nfiles; ifile++) {
610 ostringstream hN_datafile;
611 double ke = hN_kpPelas_energies[ifile];
612 hN_datafile << data_dir <<
"/diff_ang/kpp/kpp" << ke <<
".txt";
615 hN_datafile.str(), ke, hN_kpPelas_points_per_file,
616 ipoint, hN_kpPelas_costh, hN_kpPelas_xsec,2);
620 hN_kpPelas_energies,hN_kpPelas_costh,hN_kpPelas_xsec);
625 const int hN_piNcex_nfiles = 60;
626 const int hN_piNcex_points_per_file = 21;
627 const int hN_piNcex_npoints = hN_piNcex_points_per_file * hN_piNcex_nfiles;
629 double hN_piNcex_energies[hN_piNcex_nfiles] = {
630 10, 20, 30, 40, 50, 60, 70, 80, 90,
631 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
632 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
633 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
634 700, 740, 780, 820, 860, 900, 940, 980,
635 1020, 1060, 1100, 1140, 1180, 1220, 1260,
636 1300, 1340, 1380, 1420, 1460, 1500
639 double hN_piNcex_costh [hN_piNcex_points_per_file];
640 double hN_piNcex_xsec [hN_piNcex_npoints];
644 for(
int ifile = 0; ifile < hN_piNcex_nfiles; ifile++) {
646 ostringstream hN_datafile;
647 double ke = hN_piNcex_energies[ifile];
648 hN_datafile << data_dir <<
"/diff_ang/pie/pie" << ke <<
".txt";
651 hN_datafile.str(), ke, hN_piNcex_points_per_file,
652 ipoint, hN_piNcex_costh, hN_piNcex_xsec,2);
656 hN_piNcex_energies,hN_piNcex_costh,hN_piNcex_xsec);
661 const int hN_piNabs_nfiles = 19;
662 const int hN_piNabs_points_per_file = 21;
663 const int hN_piNabs_npoints = hN_piNabs_points_per_file * hN_piNabs_nfiles;
665 double hN_piNabs_energies[hN_piNabs_nfiles] = {
666 50, 75, 100, 125, 150, 175, 200, 225, 250, 275,
667 300, 325, 350, 375, 400, 425, 450, 475, 500
670 double hN_piNabs_costh [hN_piNabs_points_per_file];
671 double hN_piNabs_xsec [hN_piNabs_npoints];
675 for(
int ifile = 0; ifile < hN_piNabs_nfiles; ifile++) {
677 ostringstream hN_datafile;
678 double ke = hN_piNabs_energies[ifile];
679 hN_datafile << data_dir <<
"/diff_ang/pid2p/pid2p" << ke <<
".txt";
682 hN_datafile.str(), ke, hN_piNabs_points_per_file,
683 ipoint, hN_piNabs_costh, hN_piNabs_xsec,2);
687 hN_piNabs_energies,hN_piNabs_costh,hN_piNabs_xsec);
692 const int hN_gampi0pInelas_nfiles = 29;
693 const int hN_gampi0pInelas_points_per_file = 37;
694 const int hN_gampi0pInelas_npoints = hN_gampi0pInelas_points_per_file * hN_gampi0pInelas_nfiles;
696 double hN_gampi0pInelas_energies[hN_gampi0pInelas_nfiles] = {
697 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
698 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
699 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
702 double hN_gampi0pInelas_costh [hN_gampi0pInelas_points_per_file];
703 double hN_gampi0pInelas_xsec [hN_gampi0pInelas_npoints];
707 for(
int ifile = 0; ifile < hN_gampi0pInelas_nfiles; ifile++) {
709 ostringstream hN_datafile;
710 double ke = hN_gampi0pInelas_energies[ifile];
711 hN_datafile << data_dir <<
"/diff_ang/gampi0p/" << ke <<
"-pi0p.txt";
714 hN_datafile.str(), ke, hN_gampi0pInelas_points_per_file,
715 ipoint, hN_gampi0pInelas_costh, hN_gampi0pInelas_xsec,3);
719 hN_gampi0pInelas_energies,hN_gampi0pInelas_costh,hN_gampi0pInelas_xsec);
724 const int hN_gampi0nInelas_nfiles = 29;
725 const int hN_gampi0nInelas_points_per_file = 37;
726 const int hN_gampi0nInelas_npoints = hN_gampi0nInelas_points_per_file * hN_gampi0nInelas_nfiles;
728 double hN_gampi0nInelas_energies[hN_gampi0nInelas_nfiles] = {
729 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
730 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
731 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
734 double hN_gampi0nInelas_costh [hN_gampi0nInelas_points_per_file];
735 double hN_gampi0nInelas_xsec [hN_gampi0nInelas_npoints];
738 for(
int ifile = 0; ifile < hN_gampi0nInelas_nfiles; ifile++) {
740 ostringstream hN_datafile;
741 double ke = hN_gampi0nInelas_energies[ifile];
742 hN_datafile << data_dir <<
"/diff_ang/gampi0n/" << ke <<
"-pi0n.txt";
745 hN_datafile.str(), ke, hN_gampi0nInelas_points_per_file,
746 ipoint, hN_gampi0nInelas_costh, hN_gampi0nInelas_xsec,3);
750 hN_gampi0nInelas_energies,hN_gampi0nInelas_costh,hN_gampi0nInelas_xsec);
755 const int hN_gampipnInelas_nfiles = 29;
756 const int hN_gampipnInelas_points_per_file = 37;
757 const int hN_gampipnInelas_npoints = hN_gampipnInelas_points_per_file * hN_gampipnInelas_nfiles;
759 double hN_gampipnInelas_energies[hN_gampipnInelas_nfiles] = {
760 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
761 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
762 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
765 double hN_gampipnInelas_costh [hN_gampipnInelas_points_per_file];
766 double hN_gampipnInelas_xsec [hN_gampipnInelas_npoints];
770 for(
int ifile = 0; ifile < hN_gampipnInelas_nfiles; ifile++) {
772 ostringstream hN_datafile;
773 double ke = hN_gampipnInelas_energies[ifile];
774 hN_datafile << data_dir <<
"/diff_ang/gampi+n/" << ke <<
"-pi+n.txt";
777 hN_datafile.str(), ke, hN_gampipnInelas_points_per_file,
778 ipoint, hN_gampipnInelas_costh, hN_gampipnInelas_xsec,3);
782 hN_gampipnInelas_energies,hN_gampipnInelas_costh,hN_gampipnInelas_xsec);
787 const int hN_gampimpInelas_nfiles = 29;
788 const int hN_gampimpInelas_points_per_file = 37;
789 const int hN_gampimpInelas_npoints = hN_gampimpInelas_points_per_file * hN_gampimpInelas_nfiles;
791 double hN_gampimpInelas_energies[hN_gampimpInelas_nfiles] = {
792 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
793 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
794 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
797 double hN_gampimpInelas_costh [hN_gampimpInelas_points_per_file];
798 double hN_gampimpInelas_xsec [hN_gampimpInelas_npoints];
802 for(
int ifile = 0; ifile < hN_gampimpInelas_nfiles; ifile++) {
804 ostringstream hN_datafile;
805 double ke = hN_gampimpInelas_energies[ifile];
806 hN_datafile << data_dir <<
"/diff_ang/gampi-p/" << ke <<
"-pi-p.txt";
809 hN_datafile.str(), ke, hN_gampimpInelas_points_per_file,
810 ipoint, hN_gampimpInelas_costh, hN_gampimpInelas_xsec,3);
814 hN_gampimpInelas_energies,hN_gampimpInelas_costh,hN_gampimpInelas_xsec);
821 bool saveTGraphsToFile =
false;
823 if (saveTGraphsToFile) {
825 LOG(
"INukeHadroData2018",
pNOTICE) <<
"Saving INTRANUKE hadron x-section data to ROOT file: " <<
filename;
826 TGraphs_file.Open(filename.c_str(),
"RECREATE");
865 const int pipAAbs_f_nfiles = 18;
866 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};
867 const int pipAAbs_f_npoints = 111;
870 TfracPipA_Abs->SetNameTitle(
"TfracPipA_Abs",
"TfracPipA_Abs");
875 for(
int ifile=0; ifile < pipAAbs_f_nfiles; ifile++) {
876 ostringstream ADep_datafile;
877 int nucleus = pipAAbs_f_nuclei[ifile];
878 ADep_datafile << data_dir <<
"/tot_xsec/pipA_abs_frac/pip" << nucleus <<
"_abs_frac.txt";
879 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
880 buff->SetNameTitle(
"buff",
"buff");
881 for(
int i=0; i < buff->GetN(); i++) {
882 buff -> GetPoint(i,x,y);
888 if (saveTGraphsToFile) {
897 const int pipACEx_f_nfiles = 18;
898 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};
899 const int pipACEx_f_npoints = 129;
902 TfracPipA_CEx->SetNameTitle(
"TfracPipA_CEx",
"TfracPipA_CEx");
908 for(
int ifile=0; ifile < pipACEx_f_nfiles; ifile++) {
909 ostringstream ADep_datafile;
910 int nucleus = pipACEx_f_nuclei[ifile];
911 ADep_datafile << data_dir <<
"/tot_xsec/pipA_cex_frac/pip" << nucleus <<
"_cex_frac.txt";
912 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
913 buff->SetNameTitle(
"buff",
"buff");
914 for(
int i=0; i < buff->GetN(); i++) {
915 buff -> GetPoint(i,x,y);
922 if (saveTGraphsToFile) {
932 TGraph2D * TPipA_CEx;
934 const int pipACEx_nfiles = 18;
935 const int pipACEx_nuclei[pipACEx_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 48, 56, 58, 63, 93, 120, 165, 181, 209};
936 const int pipACEx_npoints = 129;
938 TPipA_CEx =
new TGraph2D(pipACEx_npoints);
939 TPipA_CEx->SetNameTitle(
"TPipA_CEx",
"TPipA_CEx");
940 TPipA_CEx->SetDirectory(0);
945 for(
int ifile=0; ifile < pipACEx_nfiles; ifile++) {
946 ostringstream ADep_datafile;
947 int nucleus = pipACEx_nuclei[ifile];
948 ADep_datafile << data_dir <<
"/tot_xsec/pipA_cex/pip" << nucleus <<
"_cex.txt";
949 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
950 buff->SetNameTitle(
"buff",
"buff");
951 for(
int i=0; i < buff->GetN(); i++) {
952 buff -> GetPoint(i,x,y);
953 TPipA_CEx -> SetPoint(ipoint,(
double)nucleus,x,y);
959 if (saveTGraphsToFile) {
960 TPipA_CEx ->
Write(
"TPipA_CEx");
968 TGraph2D * TPipA_Abs;
970 const int pipAAbs_nfiles = 18;
971 const int pipAAbs_nuclei[pipAAbs_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 48, 56, 58, 63, 93, 120, 165, 181, 209};
972 const int pipAAbs_npoints = 111;
974 TPipA_Abs =
new TGraph2D(pipAAbs_npoints);
975 TPipA_Abs->SetNameTitle(
"TPipA_Abs",
"TPipA_Abs");
976 TPipA_Abs->SetDirectory(0);
981 for(
int ifile=0; ifile < pipAAbs_nfiles; ifile++) {
982 ostringstream ADep_datafile;
983 int nucleus = pipAAbs_nuclei[ifile];
984 ADep_datafile << data_dir <<
"/tot_xsec/pipA_abs/pip" << nucleus <<
"_abs.txt";
985 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
986 buff->SetNameTitle(
"buff",
"buff");
987 for(
int i=0; i < buff->GetN(); i++) {
988 buff -> GetPoint(i,x,y);
989 TPipA_Abs -> SetPoint(ipoint,(
double)nucleus,x,y);
995 if (saveTGraphsToFile) {
996 TPipA_Abs ->
Write(
"TPipA_Abs");
1004 TGraph2D * TPipA_Elas;
1006 const int pipAElas_nfiles = 18;
1007 const int pipAElas_nuclei[pipAElas_nfiles] = {1, 2, 3, 4, 7, 9, 12, 16, 27, 48, 56, 58, 63, 93, 120, 165, 181, 209};
1008 const int pipAElas_npoints = 125;
1010 TPipA_Elas =
new TGraph2D(pipAElas_npoints);
1011 TPipA_Elas->SetNameTitle(
"TPipA_Elas",
"TPipA_Elas");
1012 TPipA_Elas->SetDirectory(0);
1017 for(
int ifile=0; ifile < pipAElas_nfiles; ifile++) {
1018 ostringstream ADep_datafile;
1019 int nucleus = pipAElas_nuclei[ifile];
1020 ADep_datafile << data_dir <<
"/tot_xsec/pipA_elas/pip" << nucleus <<
"_elas.txt";
1021 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
1022 buff->SetNameTitle(
"buff",
"buff");
1023 for(
int i=0; i < buff->GetN(); i++) {
1024 buff -> GetPoint(i,x,y);
1025 TPipA_Elas -> SetPoint(ipoint,(
double)nucleus,x,y);
1031 if (saveTGraphsToFile) {
1032 TPipA_Elas ->
Write(
"TPipA_Elas");
1039 TGraph2D * TPipA_Inelas;
1041 const int pipAInelas_nfiles = 20;
1042 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};
1043 const int pipAInelas_npoints = 118;
1045 TPipA_Inelas =
new TGraph2D(pipAInelas_npoints);
1046 TPipA_Inelas->SetNameTitle(
"TPipA_Inelas",
"TPipA_Inelas");
1047 TPipA_Inelas->SetDirectory(0);
1052 for(
int ifile=0; ifile < pipAInelas_nfiles; ifile++) {
1053 ostringstream ADep_datafile;
1054 int nucleus = pipAInelas_nuclei[ifile];
1055 ADep_datafile << data_dir <<
"/tot_xsec/pipA_inelas/pip" << nucleus <<
"_inelas.txt";
1056 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
1057 buff->SetNameTitle(
"buff",
"buff");
1058 for(
int i=0; i < buff->GetN(); i++) {
1059 buff -> GetPoint(i,x,y);
1060 TPipA_Inelas -> SetPoint(ipoint,(
double)nucleus,x,y);
1066 if (saveTGraphsToFile) {
1067 TPipA_Inelas ->
Write(
"TPipA_Inelas");
1069 delete TPipA_Inelas;
1110 const int pipAInelas_f_nfiles = 20;
1111 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};
1112 const int pipAInelas_f_npoints = 118;
1121 for(
int ifile=0; ifile < pipAInelas_f_nfiles; ifile++) {
1122 ostringstream ADep_datafile;
1123 int nucleus = pipAInelas_f_nuclei[ifile];
1124 ADep_datafile << data_dir <<
"/tot_xsec/pipA_inelas_frac/pip" << nucleus <<
"_inelas_frac.txt";
1125 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
1126 buff->SetNameTitle(
"buff",
"buff");
1127 for(
int i=0; i < buff->GetN(); i++) {
1128 buff -> GetPoint(i,x,y);
1135 if (saveTGraphsToFile) {
1144 const int pipAPiPro_f_nfiles = 17;
1145 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};
1146 const int pipAPiPro_f_npoints = 76;
1155 for(
int ifile=0; ifile < pipAPiPro_f_nfiles; ifile++) {
1156 ostringstream ADep_datafile;
1157 int nucleus = pipAPiPro_f_nuclei[ifile];
1158 ADep_datafile << data_dir <<
"/tot_xsec/pipA_pipro_frac/pip" << nucleus <<
"_pipro_frac.txt";
1159 TGraph * buff =
new TGraph(ADep_datafile.str().c_str());
1160 buff->SetNameTitle(
"buff",
"buff");
1161 for(
int i=0; i < buff->GetN(); i++) {
1162 buff -> GetPoint(i,x,y);
1169 if (saveTGraphsToFile) {
1174 TGraphs_file.Close();
1176 LOG(
"INukeData",
pINFO) <<
"Done building x-section splines...";
Spline * fXSecPipp_Tot
pi+p hN x-section splines
BLI2DNonUnifGrid * fhN2dXSecPiN_Abs
Spline * fXSecPp_Tot
p/nN x-section splines
A numeric analysis tool class for interpolating 1-D functions.
BLI2DNonUnifGrid * fhN2dXSecGamPimP_Inelas
BLI2DNonUnifGrid * fhN2dXSecPi0N_Elas
BLI2DNonUnifGrid * fhN2dXSecPipN_Elas
BLI2DNonUnifGrid * fhN2dXSecGamPi0N_Inelas
BLI2DNonUnifGrid * fhN2dXSecKpP_Elas
BLI2DNonUnifGrid * fhN2dXSecNP_Elas
BLI2DNonUnifGrid * fhN2dXSecKpN_CEx
TGraph2D * TfracPipA_Inelas
void ReadhNFile(string filename, double ke, int npoints, int &curr_point, double *costh_array, double *xsec_array, int cols)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Spline * fXSecGamp_fs
gamma A x-section splines
Spline * fXSecPp_Cmp
NN cmp (compound nucleus) fate.
Spline * fFracPA_Tot
N+A x-section splines.
Spline * fFracKA_Tot
K+A x-section splines.
Spline * fXSecPipn_Tot
pi+n hN x-section splines
BLI2DNonUnifGrid * fhN2dXSecPP_Elas
BLI2DNonUnifGrid * fhN2dXSecPiN_CEx
BLI2DNonUnifGrid * fhN2dXSecKpN_Elas
BLI2DNonUnifGrid * fhN2dXSecGamPi0P_Inelas
Spline * fXSecKpn_Elas
K+N x-section splines.
Spline * fXSecPi0n_Tot
pi0n hN x-section splines
Spline * fXSecPi0p_Tot
pi0p hN x-section splines
BLI2DNonUnifGrid * fhN2dXSecPimN_Elas
BLI2DNonUnifGrid * fhN2dXSecGamPipN_Inelas
TGraph2D * TfracPipA_PiPro