189 string data_dir = (gSystem->Getenv(
"GINUKEHADRONDATA")) ?
190 string(gSystem->Getenv(
"GINUKEHADRONDATA")) :
191 string(gSystem->Getenv(
"GENIE")) +
string(
"/data/evgen/intranuke");
194 <<
"Loading INTRANUKE hadron data from: " <<
data_dir;
198 string datafile_NN = data_dir +
"/tot_xsec/intranuke-xsections-NN.dat";
199 string datafile_pipN = data_dir +
"/tot_xsec/intranuke-xsections-pi+N.dat";
200 string datafile_pi0N = data_dir +
"/tot_xsec/intranuke-xsections-pi0N.dat";
201 string datafile_NA = data_dir +
"/tot_xsec/intranuke-fractions-NA.dat";
202 string datafile_piA = data_dir +
"/tot_xsec/intranuke-fractions-piA.dat";
203 string datafile_KA = data_dir +
"/tot_xsec/intranuke-fractions-KA.dat";
204 string datafile_gamN = data_dir +
"/tot_xsec/intranuke-xsections-gamN.dat";
205 string datafile_kN = data_dir +
"/tot_xsec/intranuke-xsections-kaonN.dat";
209 assert( ! gSystem->AccessPathName(datafile_NN. c_str()) );
210 assert( ! gSystem->AccessPathName(datafile_pipN.c_str()) );
211 assert( ! gSystem->AccessPathName(datafile_pi0N.c_str()) );
212 assert( ! gSystem->AccessPathName(datafile_NA. c_str()) );
213 assert( ! gSystem->AccessPathName(datafile_piA. c_str()) );
214 assert( ! gSystem->AccessPathName(datafile_KA. c_str()) );
215 assert( ! gSystem->AccessPathName(datafile_gamN.c_str()) );
216 assert( ! gSystem->AccessPathName(datafile_kN. c_str()) );
218 LOG(
"INukeData",
pINFO) <<
"Found all necessary data files...";
231 data_NN.ReadFile(datafile_NN.c_str(),
232 "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");
233 data_pipN.ReadFile(datafile_pipN.c_str(),
234 "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");
235 data_pi0N.ReadFile(datafile_pi0N.c_str(),
236 "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");
237 data_NA.ReadFile(datafile_NA.c_str(),
238 "ke/D:pA_tot/D:pA_elas/D:pA_inel/D:pA_cex/D:pA_abs/D:pA_pipro/D");
239 data_piA.ReadFile(datafile_piA.c_str(),
240 "ke/D:piA_tot/D:piA_elas/D:piA_inel/D:piA_cex/D:piA_np/D:piA_pp/D:piA_npp/D:piA_nnp/D:piA_2n2p/D:piA_piprod/D");
241 data_gamN.ReadFile(datafile_gamN.c_str(),
242 "ke/D:pi0p_tot/D:pipn_tot/D:pimp_tot/D:pi0n_tot/D:gamp_fs/D:gamn_fs/D:gamN_tot/D");
243 data_kN.ReadFile(datafile_kN.c_str(),
244 "ke/D:kpn_elas/D:kpp_elas/D:kp_abs/D:kpN_tot/D");
245 data_KA.ReadFile(datafile_KA.c_str(),
246 "ke/D:KA_tot/D:KA_elas/D:KA_inel/D:KA_abs/D");
248 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in NN : " << data_NN.GetEntries();
249 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in pipN : " << data_pipN.GetEntries();
250 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in pi0N : " << data_pi0N.GetEntries();
251 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in NA : " << data_NA.GetEntries();
252 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in piA : " << data_piA.GetEntries();
253 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in KA : " << data_KA.GetEntries();
254 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in gamN : " << data_gamN.GetEntries();
255 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in kN : " << data_kN.GetEntries();
257 LOG(
"INukeData",
pINFO) <<
"Done loading all x-section files...";
369 const int hN_ppelas_nfiles = 20;
370 const int hN_ppelas_points_per_file = 21;
371 const int hN_ppelas_npoints = hN_ppelas_points_per_file * hN_ppelas_nfiles;
373 double hN_ppelas_energies[hN_ppelas_nfiles] = {
374 50, 100, 150, 200, 250, 300, 350, 400, 450, 500,
375 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000
378 double hN_ppelas_costh [hN_ppelas_points_per_file];
379 double hN_ppelas_xsec [hN_ppelas_npoints];
383 for(
int ifile = 0; ifile < hN_ppelas_nfiles; ifile++) {
385 ostringstream hN_datafile;
386 double ke = hN_ppelas_energies[ifile];
387 hN_datafile << data_dir <<
"/diff_ang/pp/pp" << ke <<
".txt";
390 hN_datafile.str(), ke, hN_ppelas_points_per_file,
391 ipoint, hN_ppelas_costh, hN_ppelas_xsec,2);
400 hN_ppelas_energies,hN_ppelas_costh,hN_ppelas_xsec);
405 const int hN_npelas_nfiles = 20;
406 const int hN_npelas_points_per_file = 21;
407 const int hN_npelas_npoints = hN_npelas_points_per_file * hN_npelas_nfiles;
409 double hN_npelas_energies[hN_npelas_nfiles] = {
410 50, 100, 150, 200, 250, 300, 350, 400, 450, 500,
411 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000
414 double hN_npelas_costh [hN_npelas_points_per_file];
415 double hN_npelas_xsec [hN_npelas_npoints];
419 for(
int ifile = 0; ifile < hN_npelas_nfiles; ifile++) {
421 ostringstream hN_datafile;
422 double ke = hN_npelas_energies[ifile];
423 hN_datafile << data_dir <<
"/diff_ang/pn/pn" << ke <<
".txt";
426 hN_datafile.str(), ke, hN_npelas_points_per_file,
427 ipoint, hN_npelas_costh, hN_npelas_xsec,2);
436 hN_npelas_energies,hN_npelas_costh,hN_npelas_xsec);
441 const int hN_pipNelas_nfiles = 60;
442 const int hN_pipNelas_points_per_file = 21;
443 const int hN_pipNelas_npoints = hN_pipNelas_points_per_file * hN_pipNelas_nfiles;
445 double hN_pipNelas_energies[hN_pipNelas_nfiles] = {
446 10, 20, 30, 40, 50, 60, 70, 80, 90,
447 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
448 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
449 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
450 700, 740, 780, 820, 860, 900, 940, 980,
451 1020, 1060, 1100, 1140, 1180, 1220, 1260,
452 1300, 1340, 1380, 1420, 1460, 1500
455 double hN_pipNelas_costh [hN_pipNelas_points_per_file];
456 double hN_pipNelas_xsec [hN_pipNelas_npoints];
460 for(
int ifile = 0; ifile < hN_pipNelas_nfiles; ifile++) {
462 ostringstream hN_datafile;
463 double ke = hN_pipNelas_energies[ifile];
464 hN_datafile << data_dir <<
"/diff_ang/pip/pip" << ke <<
".txt";
467 hN_datafile.str(), ke, hN_pipNelas_points_per_file,
468 ipoint, hN_pipNelas_costh, hN_pipNelas_xsec,2);
477 hN_pipNelas_energies,hN_pipNelas_costh,hN_pipNelas_xsec);
482 const int hN_pi0Nelas_nfiles = 60;
483 const int hN_pi0Nelas_points_per_file = 21;
484 const int hN_pi0Nelas_npoints = hN_pi0Nelas_points_per_file * hN_pi0Nelas_nfiles;
486 double hN_pi0Nelas_energies[hN_pi0Nelas_nfiles] = {
487 10, 20, 30, 40, 50, 60, 70, 80, 90,
488 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
489 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
490 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
491 700, 740, 780, 820, 860, 900, 940, 980,
492 1020, 1060, 1100, 1140, 1180, 1220, 1260,
493 1300, 1340, 1380, 1420, 1460, 1500
496 double hN_pi0Nelas_costh [hN_pi0Nelas_points_per_file];
497 double hN_pi0Nelas_xsec [hN_pi0Nelas_npoints];
501 for(
int ifile = 0; ifile < hN_pi0Nelas_nfiles; ifile++) {
503 ostringstream hN_datafile;
504 double ke = hN_pi0Nelas_energies[ifile];
505 hN_datafile << data_dir <<
"/diff_ang/pip/pip" << ke <<
".txt";
508 hN_datafile.str(), ke, hN_pi0Nelas_points_per_file,
509 ipoint, hN_pi0Nelas_costh, hN_pi0Nelas_xsec,2);
518 hN_pi0Nelas_energies,hN_pi0Nelas_costh,hN_pi0Nelas_xsec);
523 const int hN_pimNelas_nfiles = 60;
524 const int hN_pimNelas_points_per_file = 21;
525 const int hN_pimNelas_npoints = hN_pimNelas_points_per_file * hN_pimNelas_nfiles;
527 double hN_pimNelas_energies[hN_pimNelas_nfiles] = {
528 10, 20, 30, 40, 50, 60, 70, 80, 90,
529 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
530 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
531 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
532 700, 740, 780, 820, 860, 900, 940, 980,
533 1020, 1060, 1100, 1140, 1180, 1220, 1260,
534 1300, 1340, 1380, 1420, 1460, 1500
537 double hN_pimNelas_costh [hN_pimNelas_points_per_file];
538 double hN_pimNelas_xsec [hN_pimNelas_npoints];
542 for(
int ifile = 0; ifile < hN_pimNelas_nfiles; ifile++) {
544 ostringstream hN_datafile;
545 double ke = hN_pimNelas_energies[ifile];
546 hN_datafile << data_dir <<
"/diff_ang/pim/pim" << ke <<
".txt";
549 hN_datafile.str(), ke, hN_pimNelas_points_per_file,
550 ipoint, hN_pimNelas_costh, hN_pimNelas_xsec,2);
559 hN_pimNelas_energies,hN_pimNelas_costh,hN_pimNelas_xsec);
564 const int hN_kpNelas_nfiles = 18;
565 const int hN_kpNelas_points_per_file = 37;
566 const int hN_kpNelas_npoints = hN_kpNelas_points_per_file * hN_kpNelas_nfiles;
568 double hN_kpNelas_energies[hN_kpNelas_nfiles] = {
569 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
570 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800
573 double hN_kpNelas_costh [hN_kpNelas_points_per_file];
574 double hN_kpNelas_xsec [hN_kpNelas_npoints];
578 for(
int ifile = 0; ifile < hN_kpNelas_nfiles; ifile++) {
580 ostringstream hN_datafile;
581 double ke = hN_kpNelas_energies[ifile];
582 hN_datafile << data_dir <<
"/diff_ang/kpn/kpn" << ke <<
".txt";
585 hN_datafile.str(), ke, hN_kpNelas_points_per_file,
586 ipoint, hN_kpNelas_costh, hN_kpNelas_xsec,2);
595 hN_kpNelas_energies,hN_kpNelas_costh,hN_kpNelas_xsec);
600 const int hN_kpPelas_nfiles = 18;
601 const int hN_kpPelas_points_per_file = 37;
602 const int hN_kpPelas_npoints = hN_kpPelas_points_per_file * hN_kpPelas_nfiles;
604 double hN_kpPelas_energies[hN_kpPelas_nfiles] = {
605 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
606 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800
609 double hN_kpPelas_costh [hN_kpPelas_points_per_file];
610 double hN_kpPelas_xsec [hN_kpPelas_npoints];
614 for(
int ifile = 0; ifile < hN_kpPelas_nfiles; ifile++) {
616 ostringstream hN_datafile;
617 double ke = hN_kpPelas_energies[ifile];
618 hN_datafile << data_dir <<
"/diff_ang/kpp/kpp" << ke <<
".txt";
621 hN_datafile.str(), ke, hN_kpPelas_points_per_file,
622 ipoint, hN_kpPelas_costh, hN_kpPelas_xsec,2);
631 hN_kpPelas_energies,hN_kpPelas_costh,hN_kpPelas_xsec);
636 const int hN_piNcex_nfiles = 60;
637 const int hN_piNcex_points_per_file = 21;
638 const int hN_piNcex_npoints = hN_piNcex_points_per_file * hN_piNcex_nfiles;
640 double hN_piNcex_energies[hN_piNcex_nfiles] = {
641 10, 20, 30, 40, 50, 60, 70, 80, 90,
642 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
643 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
644 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
645 700, 740, 780, 820, 860, 900, 940, 980,
646 1020, 1060, 1100, 1140, 1180, 1220, 1260,
647 1300, 1340, 1380, 1420, 1460, 1500
650 double hN_piNcex_costh [hN_piNcex_points_per_file];
651 double hN_piNcex_xsec [hN_piNcex_npoints];
655 for(
int ifile = 0; ifile < hN_piNcex_nfiles; ifile++) {
657 ostringstream hN_datafile;
658 double ke = hN_piNcex_energies[ifile];
659 hN_datafile << data_dir <<
"/diff_ang/pie/pie" << ke <<
".txt";
662 hN_datafile.str(), ke, hN_piNcex_points_per_file,
663 ipoint, hN_piNcex_costh, hN_piNcex_xsec,2);
672 hN_piNcex_energies,hN_piNcex_costh,hN_piNcex_xsec);
677 const int hN_piNabs_nfiles = 19;
678 const int hN_piNabs_points_per_file = 21;
679 const int hN_piNabs_npoints = hN_piNabs_points_per_file * hN_piNabs_nfiles;
681 double hN_piNabs_energies[hN_piNabs_nfiles] = {
682 50, 75, 100, 125, 150, 175, 200, 225, 250, 275,
683 300, 325, 350, 375, 400, 425, 450, 475, 500
686 double hN_piNabs_costh [hN_piNabs_points_per_file];
687 double hN_piNabs_xsec [hN_piNabs_npoints];
691 for(
int ifile = 0; ifile < hN_piNabs_nfiles; ifile++) {
693 ostringstream hN_datafile;
694 double ke = hN_piNabs_energies[ifile];
695 hN_datafile << data_dir <<
"/diff_ang/pid2p/pid2p" << ke <<
".txt";
698 hN_datafile.str(), ke, hN_piNabs_points_per_file,
699 ipoint, hN_piNabs_costh, hN_piNabs_xsec,2);
708 hN_piNabs_energies,hN_piNabs_costh,hN_piNabs_xsec);
713 const int hN_gampi0pInelas_nfiles = 29;
714 const int hN_gampi0pInelas_points_per_file = 37;
715 const int hN_gampi0pInelas_npoints = hN_gampi0pInelas_points_per_file * hN_gampi0pInelas_nfiles;
717 double hN_gampi0pInelas_energies[hN_gampi0pInelas_nfiles] = {
718 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
719 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
720 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
723 double hN_gampi0pInelas_costh [hN_gampi0pInelas_points_per_file];
724 double hN_gampi0pInelas_xsec [hN_gampi0pInelas_npoints];
728 for(
int ifile = 0; ifile < hN_gampi0pInelas_nfiles; ifile++) {
730 ostringstream hN_datafile;
731 double ke = hN_gampi0pInelas_energies[ifile];
732 hN_datafile << data_dir <<
"/diff_ang/gampi0p/" << ke <<
"-pi0p.txt";
735 hN_datafile.str(), ke, hN_gampi0pInelas_points_per_file,
736 ipoint, hN_gampi0pInelas_costh, hN_gampi0pInelas_xsec,3);
745 hN_gampi0pInelas_energies,hN_gampi0pInelas_costh,hN_gampi0pInelas_xsec);
750 const int hN_gampi0nInelas_nfiles = 29;
751 const int hN_gampi0nInelas_points_per_file = 37;
752 const int hN_gampi0nInelas_npoints = hN_gampi0nInelas_points_per_file * hN_gampi0nInelas_nfiles;
754 double hN_gampi0nInelas_energies[hN_gampi0nInelas_nfiles] = {
755 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
756 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
757 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
760 double hN_gampi0nInelas_costh [hN_gampi0nInelas_points_per_file];
761 double hN_gampi0nInelas_xsec [hN_gampi0nInelas_npoints];
764 for(
int ifile = 0; ifile < hN_gampi0nInelas_nfiles; ifile++) {
766 ostringstream hN_datafile;
767 double ke = hN_gampi0nInelas_energies[ifile];
768 hN_datafile << data_dir <<
"/diff_ang/gampi0n/" << ke <<
"-pi0n.txt";
771 hN_datafile.str(), ke, hN_gampi0nInelas_points_per_file,
772 ipoint, hN_gampi0nInelas_costh, hN_gampi0nInelas_xsec,3);
781 hN_gampi0nInelas_energies,hN_gampi0nInelas_costh,hN_gampi0nInelas_xsec);
786 const int hN_gampipnInelas_nfiles = 29;
787 const int hN_gampipnInelas_points_per_file = 37;
788 const int hN_gampipnInelas_npoints = hN_gampipnInelas_points_per_file * hN_gampipnInelas_nfiles;
790 double hN_gampipnInelas_energies[hN_gampipnInelas_nfiles] = {
791 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
792 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
793 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
796 double hN_gampipnInelas_costh [hN_gampipnInelas_points_per_file];
797 double hN_gampipnInelas_xsec [hN_gampipnInelas_npoints];
801 for(
int ifile = 0; ifile < hN_gampipnInelas_nfiles; ifile++) {
803 ostringstream hN_datafile;
804 double ke = hN_gampipnInelas_energies[ifile];
805 hN_datafile << data_dir <<
"/diff_ang/gampi+n/" << ke <<
"-pi+n.txt";
808 hN_datafile.str(), ke, hN_gampipnInelas_points_per_file,
809 ipoint, hN_gampipnInelas_costh, hN_gampipnInelas_xsec,3);
818 hN_gampipnInelas_energies,hN_gampipnInelas_costh,hN_gampipnInelas_xsec);
823 const int hN_gampimpInelas_nfiles = 29;
824 const int hN_gampimpInelas_points_per_file = 37;
825 const int hN_gampimpInelas_npoints = hN_gampimpInelas_points_per_file * hN_gampimpInelas_nfiles;
827 double hN_gampimpInelas_energies[hN_gampimpInelas_nfiles] = {
828 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
829 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
830 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
833 double hN_gampimpInelas_costh [hN_gampimpInelas_points_per_file];
834 double hN_gampimpInelas_xsec [hN_gampimpInelas_npoints];
838 for(
int ifile = 0; ifile < hN_gampimpInelas_nfiles; ifile++) {
840 ostringstream hN_datafile;
841 double ke = hN_gampimpInelas_energies[ifile];
842 hN_datafile << data_dir <<
"/diff_ang/gampi-p/" << ke <<
"-pi-p.txt";
845 hN_datafile.str(), ke, hN_gampimpInelas_points_per_file,
846 ipoint, hN_gampimpInelas_costh, hN_gampimpInelas_xsec,3);
855 hN_gampimpInelas_energies,hN_gampimpInelas_costh,hN_gampimpInelas_xsec);
858 LOG(
"INukeData",
pINFO) <<
"Done building x-section splines...";
Spline * fFracKA_Tot
K+A x-section splines.
BLI2DNonUnifGrid * fhN2dXSecPP_Elas
Spline * fXSecKpn_Elas
K+N x-section splines.
BLI2DNonUnifGrid * fhN2dXSecPipN_Elas
BLI2DNonUnifGrid * fhN2dXSecGamPi0N_Inelas
BLI2DNonUnifGrid * fhN2dXSecGamPi0P_Inelas
A numeric analysis tool class for interpolating 1-D functions.
BLI2DNonUnifGrid * fhN2dXSecKpN_Elas
BLI2DNonUnifGrid * fhN2dXSecPiN_Abs
Spline * fXSecPi0p_Tot
pi0p hN x-section splines
BLI2DNonUnifGrid * fhN2dXSecKpP_Elas
BLI2DNonUnifGrid * fhN2dXSecGamPipN_Inelas
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
BLI2DNonUnifGrid * fhN2dXSecGamPimP_Inelas
Spline * fXSecGamp_fs
gamma A x-section splines
BLI2DNonUnifGrid * fhN2dXSecNP_Elas
BLI2DNonUnifGrid * fhN2dXSecPiN_CEx
Spline * fXSecPipn_Tot
pi+n hN x-section splines
Spline * fFracPi0A_PiProd
void ReadhNFile(string filename, double ke, int npoints, int &curr_point, double *costh_array, double *xsec_array, int cols)
BLI2DNonUnifGrid * fhN2dXSecPimN_Elas
Spline * fFracPipA_PiProd
Spline * fXSecPi0n_Tot
pi0n hN x-section splines
Spline * fFracPipA_Tot
pi+A x-section splines
Spline * fFracPimA_PiProd
Spline * fFracPA_Tot
N+A x-section splines.
BLI2DNonUnifGrid * fhN2dXSecPi0N_Elas
Spline * fXSecPipp_Tot
pi+p hN x-section splines
Spline * fXSecPp_Tot
p/nN x-section splines