196{
197
198
199
200
201 string data_dir = (gSystem->Getenv("GINUKEHADRONDATA")) ?
202 string(gSystem->Getenv("GINUKEHADRONDATA")) :
203 string(gSystem->Getenv("GENIE")) + string("/data/evgen/intranuke");
204
206 << "Loading INTRANUKE hadron data from: " << data_dir;
207
208
209
210 string datafile_NN = data_dir + "/tot_xsec/intranuke-xsections-NN2014.dat";
211 string datafile_pipN = data_dir + "/tot_xsec/intranuke-xsections-pi+N.dat";
212 string datafile_pi0N = data_dir + "/tot_xsec/intranuke-xsections-pi0N.dat";
213 string datafile_NA = data_dir + "/tot_xsec/intranuke-fractions-NA2016.dat";
214 string datafile_KA = data_dir + "/tot_xsec/intranuke-fractions-KA.dat";
215 string datafile_gamN = data_dir + "/tot_xsec/intranuke-xsections-gamN.dat";
216 string datafile_kN = data_dir + "/tot_xsec/intranuke-xsections-kaonN2018.dat";
217
218
219
220 assert( ! gSystem->AccessPathName(datafile_NN. c_str()) );
221 assert( ! gSystem->AccessPathName(datafile_pipN.c_str()) );
222 assert( ! gSystem->AccessPathName(datafile_pi0N.c_str()) );
223 assert( ! gSystem->AccessPathName(datafile_NA. c_str()) );
224 assert( ! gSystem->AccessPathName(datafile_KA. c_str()) );
225 assert( ! gSystem->AccessPathName(datafile_gamN.c_str()) );
226 assert( ! gSystem->AccessPathName(datafile_kN. c_str()) );
227
228 LOG(
"INukeData",
pINFO) <<
"Found all necessary data files...";
229
230
231
232 TTree data_NN;
233 TTree data_pipN;
234 TTree data_pi0N;
235 TTree data_NA;
236 TTree data_KA;
237 TTree data_gamN;
238 TTree data_kN;
239
240 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");
241 data_pipN.ReadFile(datafile_pipN.c_str(),
242 "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");
243 data_pi0N.ReadFile(datafile_pi0N.c_str(),
244 "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");
245
246
247 data_NA.ReadFile(datafile_NA.c_str(),
248 "ke/D:pA_tot/D:pA_inel/D:pA_cex/D:pA_abs/D:pA_pipro/D:pA_cmp/D");
249 data_gamN.ReadFile(datafile_gamN.c_str(),
250 "ke/D:pi0p_tot/D:pipn_tot/D:pimp_tot/D:pi0n_tot/D:gamp_fs/D:gamn_fs/D:gamN_tot/D");
251 data_kN.ReadFile(datafile_kN.c_str(),
252 "ke/D:kpp_elas/D:kpn_elas/D:kpn_cex/D:kp_abs/D:kpN_tot/D");
253 data_KA.ReadFile(datafile_KA.c_str(),
254 "ke/D:KA_tot/D:KA_elas/D:KA_inel/D:KA_abs/D");
255
256 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in NN : " << data_NN.GetEntries();
257 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in pipN : " << data_pipN.GetEntries();
258 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in pi0N : " << data_pi0N.GetEntries();
259 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in NA : " << data_NA.GetEntries();
260 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in KA : " << data_KA.GetEntries();
261 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in gamN : " << data_gamN.GetEntries();
262 LOG(
"INukeData",
pDEBUG) <<
"Number of data rows in kN : " << data_kN.GetEntries();
263
264 LOG(
"INukeData",
pINFO) <<
"Done loading all x-section files...";
265
266
267
268
281
282
292
293
303
304
310
311
315
316
318
324
329
332
333
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364 {
365 const int hN_ppelas_nfiles = 20;
366 const int hN_ppelas_points_per_file = 21;
367 const int hN_ppelas_npoints = hN_ppelas_points_per_file * hN_ppelas_nfiles;
368
369 double hN_ppelas_energies[hN_ppelas_nfiles] = {
370 50, 100, 150, 200, 250, 300, 350, 400, 450, 500,
371 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000
372 };
373
374 double hN_ppelas_costh [hN_ppelas_points_per_file];
375 double hN_ppelas_xsec [hN_ppelas_npoints];
376
377 int ipoint=0;
378
379 for(int ifile = 0; ifile < hN_ppelas_nfiles; ifile++) {
380
381 ostringstream hN_datafile;
382 double ke = hN_ppelas_energies[ifile];
383 hN_datafile << data_dir << "/diff_ang/pp/pp" << ke << ".txt";
384
386 hN_datafile.str(), ke, hN_ppelas_points_per_file,
387 ipoint, hN_ppelas_costh, hN_ppelas_xsec,2);
388 }
389
390 fhN2dXSecPP_Elas =
new BLI2DNonUnifGrid(hN_ppelas_nfiles,hN_ppelas_points_per_file,
391 hN_ppelas_energies,hN_ppelas_costh,hN_ppelas_xsec);
392 }
393
394
395 {
396 const int hN_npelas_nfiles = 20;
397 const int hN_npelas_points_per_file = 21;
398 const int hN_npelas_npoints = hN_npelas_points_per_file * hN_npelas_nfiles;
399
400 double hN_npelas_energies[hN_npelas_nfiles] = {
401 50, 100, 150, 200, 250, 300, 350, 400, 450, 500,
402 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000
403 };
404
405 double hN_npelas_costh [hN_npelas_points_per_file];
406 double hN_npelas_xsec [hN_npelas_npoints];
407
408 int ipoint=0;
409
410 for(int ifile = 0; ifile < hN_npelas_nfiles; ifile++) {
411
412 ostringstream hN_datafile;
413 double ke = hN_npelas_energies[ifile];
414 hN_datafile << data_dir << "/diff_ang/pn/pn" << ke << ".txt";
415
417 hN_datafile.str(), ke, hN_npelas_points_per_file,
418 ipoint, hN_npelas_costh, hN_npelas_xsec,2);
419 }
420
421 fhN2dXSecNP_Elas =
new BLI2DNonUnifGrid(hN_npelas_nfiles,hN_npelas_points_per_file,
422 hN_npelas_energies,hN_npelas_costh,hN_npelas_xsec);
423 }
424
425
426 {
427 const int hN_pipNelas_nfiles = 60;
428 const int hN_pipNelas_points_per_file = 21;
429 const int hN_pipNelas_npoints = hN_pipNelas_points_per_file * hN_pipNelas_nfiles;
430
431 double hN_pipNelas_energies[hN_pipNelas_nfiles] = {
432 10, 20, 30, 40, 50, 60, 70, 80, 90,
433 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
434 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
435 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
436 700, 740, 780, 820, 860, 900, 940, 980,
437 1020, 1060, 1100, 1140, 1180, 1220, 1260,
438 1300, 1340, 1380, 1420, 1460, 1500
439 };
440
441 double hN_pipNelas_costh [hN_pipNelas_points_per_file];
442 double hN_pipNelas_xsec [hN_pipNelas_npoints];
443
444 int ipoint=0;
445
446 for(int ifile = 0; ifile < hN_pipNelas_nfiles; ifile++) {
447
448 ostringstream hN_datafile;
449 double ke = hN_pipNelas_energies[ifile];
450 hN_datafile << data_dir << "/diff_ang/pip/pip" << ke << ".txt";
451
453 hN_datafile.str(), ke, hN_pipNelas_points_per_file,
454 ipoint, hN_pipNelas_costh, hN_pipNelas_xsec,2);
455 }
456
457 fhN2dXSecPipN_Elas =
new BLI2DNonUnifGrid(hN_pipNelas_nfiles,hN_pipNelas_points_per_file,
458 hN_pipNelas_energies,hN_pipNelas_costh,hN_pipNelas_xsec);
459 }
460
461
462 {
463 const int hN_pi0Nelas_nfiles = 60;
464 const int hN_pi0Nelas_points_per_file = 21;
465 const int hN_pi0Nelas_npoints = hN_pi0Nelas_points_per_file * hN_pi0Nelas_nfiles;
466
467 double hN_pi0Nelas_energies[hN_pi0Nelas_nfiles] = {
468 10, 20, 30, 40, 50, 60, 70, 80, 90,
469 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
470 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
471 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
472 700, 740, 780, 820, 860, 900, 940, 980,
473 1020, 1060, 1100, 1140, 1180, 1220, 1260,
474 1300, 1340, 1380, 1420, 1460, 1500
475 };
476
477 double hN_pi0Nelas_costh [hN_pi0Nelas_points_per_file];
478 double hN_pi0Nelas_xsec [hN_pi0Nelas_npoints];
479
480 int ipoint=0;
481
482 for(int ifile = 0; ifile < hN_pi0Nelas_nfiles; ifile++) {
483
484 ostringstream hN_datafile;
485 double ke = hN_pi0Nelas_energies[ifile];
486 hN_datafile << data_dir << "/diff_ang/pip/pip" << ke << ".txt";
487
489 hN_datafile.str(), ke, hN_pi0Nelas_points_per_file,
490 ipoint, hN_pi0Nelas_costh, hN_pi0Nelas_xsec,2);
491 }
492
493 fhN2dXSecPi0N_Elas =
new BLI2DNonUnifGrid(hN_pi0Nelas_nfiles,hN_pi0Nelas_points_per_file,
494 hN_pi0Nelas_energies,hN_pi0Nelas_costh,hN_pi0Nelas_xsec);
495 }
496
497
498 {
499 const int hN_pimNelas_nfiles = 60;
500 const int hN_pimNelas_points_per_file = 21;
501 const int hN_pimNelas_npoints = hN_pimNelas_points_per_file * hN_pimNelas_nfiles;
502
503 double hN_pimNelas_energies[hN_pimNelas_nfiles] = {
504 10, 20, 30, 40, 50, 60, 70, 80, 90,
505 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
506 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
507 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
508 700, 740, 780, 820, 860, 900, 940, 980,
509 1020, 1060, 1100, 1140, 1180, 1220, 1260,
510 1300, 1340, 1380, 1420, 1460, 1500
511 };
512
513 double hN_pimNelas_costh [hN_pimNelas_points_per_file];
514 double hN_pimNelas_xsec [hN_pimNelas_npoints];
515
516 int ipoint=0;
517
518 for(int ifile = 0; ifile < hN_pimNelas_nfiles; ifile++) {
519
520 ostringstream hN_datafile;
521 double ke = hN_pimNelas_energies[ifile];
522 hN_datafile << data_dir << "/diff_ang/pim/pim" << ke << ".txt";
523
525 hN_datafile.str(), ke, hN_pimNelas_points_per_file,
526 ipoint, hN_pimNelas_costh, hN_pimNelas_xsec,2);
527 }
528
529 fhN2dXSecPimN_Elas =
new BLI2DNonUnifGrid(hN_pimNelas_nfiles,hN_pimNelas_points_per_file,
530 hN_pimNelas_energies,hN_pimNelas_costh,hN_pimNelas_xsec);
531 }
532
533
534 {
535 const int hN_kpNelas_nfiles = 18;
536 const int hN_kpNelas_points_per_file = 37;
537 const int hN_kpNelas_npoints = hN_kpNelas_points_per_file * hN_kpNelas_nfiles;
538
539 double hN_kpNelas_energies[hN_kpNelas_nfiles] = {
540 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
541 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800
542 };
543
544 double hN_kpNelas_costh [hN_kpNelas_points_per_file];
545 double hN_kpNelas_xsec [hN_kpNelas_npoints];
546
547 int ipoint=0;
548
549 for(int ifile = 0; ifile < hN_kpNelas_nfiles; ifile++) {
550
551 ostringstream hN_datafile;
552 double ke = hN_kpNelas_energies[ifile];
553 hN_datafile << data_dir << "/diff_ang/kpn/kpn" << ke << ".txt";
554
556 hN_datafile.str(), ke, hN_kpNelas_points_per_file,
557 ipoint, hN_kpNelas_costh, hN_kpNelas_xsec,2);
558 }
559
560 fhN2dXSecKpN_Elas =
new BLI2DNonUnifGrid(hN_kpNelas_nfiles,hN_kpNelas_points_per_file,
561 hN_kpNelas_energies,hN_kpNelas_costh,hN_kpNelas_xsec);
562 }
563
564 {
565 const int hN_kpNcex_nfiles = 18;
566 const int hN_kpNcex_points_per_file = 37;
567 const int hN_kpNcex_npoints = hN_kpNcex_points_per_file * hN_kpNcex_nfiles;
568
569 double hN_kpNcex_energies[hN_kpNcex_nfiles] = {
570 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
571 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800
572 };
573
574 double hN_kpNcex_costh [hN_kpNcex_points_per_file];
575 double hN_kpNcex_xsec [hN_kpNcex_npoints];
576
577 int ipoint=0;
578
579 for(int ifile = 0; ifile < hN_kpNcex_nfiles; ifile++) {
580
581 ostringstream hN_datafile;
582 double ke = hN_kpNcex_energies[ifile];
583 hN_datafile << data_dir << "/diff_ang/kpncex/kpcex" << ke << ".txt";
584
586 hN_datafile.str(), ke, hN_kpNcex_points_per_file,
587 ipoint, hN_kpNcex_costh, hN_kpNcex_xsec,2);
588 }
589
590
591
592
593
594
595 fhN2dXSecKpN_CEx =
new BLI2DNonUnifGrid(hN_kpNcex_nfiles,hN_kpNcex_points_per_file,
596 hN_kpNcex_energies,hN_kpNcex_costh,hN_kpNcex_xsec);
597 }
598
599
600
601
602 {
603 const int hN_kpPelas_nfiles = 18;
604 const int hN_kpPelas_points_per_file = 37;
605 const int hN_kpPelas_npoints = hN_kpPelas_points_per_file * hN_kpPelas_nfiles;
606
607 double hN_kpPelas_energies[hN_kpPelas_nfiles] = {
608 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
609 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800
610 };
611
612 double hN_kpPelas_costh [hN_kpPelas_points_per_file];
613 double hN_kpPelas_xsec [hN_kpPelas_npoints];
614
615 int ipoint=0;
616
617 for(int ifile = 0; ifile < hN_kpPelas_nfiles; ifile++) {
618
619 ostringstream hN_datafile;
620 double ke = hN_kpPelas_energies[ifile];
621 hN_datafile << data_dir << "/diff_ang/kpp/kpp" << ke << ".txt";
622
624 hN_datafile.str(), ke, hN_kpPelas_points_per_file,
625 ipoint, hN_kpPelas_costh, hN_kpPelas_xsec,2);
626 }
627
628 fhN2dXSecKpP_Elas =
new BLI2DNonUnifGrid(hN_kpPelas_nfiles,hN_kpPelas_points_per_file,
629 hN_kpPelas_energies,hN_kpPelas_costh,hN_kpPelas_xsec);
630 }
631
632
633 {
634 const int hN_piNcex_nfiles = 60;
635 const int hN_piNcex_points_per_file = 21;
636 const int hN_piNcex_npoints = hN_piNcex_points_per_file * hN_piNcex_nfiles;
637
638 double hN_piNcex_energies[hN_piNcex_nfiles] = {
639 10, 20, 30, 40, 50, 60, 70, 80, 90,
640 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
641 200, 210, 220, 230, 240, 250, 260, 270, 280, 290,
642 300, 340, 380, 420, 460, 500, 540, 580, 620, 660,
643 700, 740, 780, 820, 860, 900, 940, 980,
644 1020, 1060, 1100, 1140, 1180, 1220, 1260,
645 1300, 1340, 1380, 1420, 1460, 1500
646 };
647
648 double hN_piNcex_costh [hN_piNcex_points_per_file];
649 double hN_piNcex_xsec [hN_piNcex_npoints];
650
651 int ipoint=0;
652
653 for(int ifile = 0; ifile < hN_piNcex_nfiles; ifile++) {
654
655 ostringstream hN_datafile;
656 double ke = hN_piNcex_energies[ifile];
657 hN_datafile << data_dir << "/diff_ang/pie/pie" << ke << ".txt";
658
660 hN_datafile.str(), ke, hN_piNcex_points_per_file,
661 ipoint, hN_piNcex_costh, hN_piNcex_xsec,2);
662 }
663
664 fhN2dXSecPiN_CEx =
new BLI2DNonUnifGrid(hN_piNcex_nfiles,hN_piNcex_points_per_file,
665 hN_piNcex_energies,hN_piNcex_costh,hN_piNcex_xsec);
666 }
667
668
669 {
670 const int hN_piNabs_nfiles = 19;
671 const int hN_piNabs_points_per_file = 21;
672 const int hN_piNabs_npoints = hN_piNabs_points_per_file * hN_piNabs_nfiles;
673
674 double hN_piNabs_energies[hN_piNabs_nfiles] = {
675 50, 75, 100, 125, 150, 175, 200, 225, 250, 275,
676 300, 325, 350, 375, 400, 425, 450, 475, 500
677 };
678
679 double hN_piNabs_costh [hN_piNabs_points_per_file];
680 double hN_piNabs_xsec [hN_piNabs_npoints];
681
682 int ipoint=0;
683
684 for(int ifile = 0; ifile < hN_piNabs_nfiles; ifile++) {
685
686 ostringstream hN_datafile;
687 double ke = hN_piNabs_energies[ifile];
688 hN_datafile << data_dir << "/diff_ang/pid2p/pid2p" << ke << ".txt";
689
691 hN_datafile.str(), ke, hN_piNabs_points_per_file,
692 ipoint, hN_piNabs_costh, hN_piNabs_xsec,2);
693 }
694
695 fhN2dXSecPiN_Abs =
new BLI2DNonUnifGrid(hN_piNabs_nfiles,hN_piNabs_points_per_file,
696 hN_piNabs_energies,hN_piNabs_costh,hN_piNabs_xsec);
697 }
698
699
700 {
701 const int hN_gampi0pInelas_nfiles = 29;
702 const int hN_gampi0pInelas_points_per_file = 37;
703 const int hN_gampi0pInelas_npoints = hN_gampi0pInelas_points_per_file * hN_gampi0pInelas_nfiles;
704
705 double hN_gampi0pInelas_energies[hN_gampi0pInelas_nfiles] = {
706 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
707 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
708 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
709 };
710
711 double hN_gampi0pInelas_costh [hN_gampi0pInelas_points_per_file];
712 double hN_gampi0pInelas_xsec [hN_gampi0pInelas_npoints];
713
714 int ipoint=0;
715
716 for(int ifile = 0; ifile < hN_gampi0pInelas_nfiles; ifile++) {
717
718 ostringstream hN_datafile;
719 double ke = hN_gampi0pInelas_energies[ifile];
720 hN_datafile << data_dir << "/diff_ang/gampi0p/" << ke << "-pi0p.txt";
721
723 hN_datafile.str(), ke, hN_gampi0pInelas_points_per_file,
724 ipoint, hN_gampi0pInelas_costh, hN_gampi0pInelas_xsec,3);
725 }
726
728 hN_gampi0pInelas_energies,hN_gampi0pInelas_costh,hN_gampi0pInelas_xsec);
729 }
730
731
732 {
733 const int hN_gampi0nInelas_nfiles = 29;
734 const int hN_gampi0nInelas_points_per_file = 37;
735 const int hN_gampi0nInelas_npoints = hN_gampi0nInelas_points_per_file * hN_gampi0nInelas_nfiles;
736
737 double hN_gampi0nInelas_energies[hN_gampi0nInelas_nfiles] = {
738 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
739 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
740 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
741 };
742
743 double hN_gampi0nInelas_costh [hN_gampi0nInelas_points_per_file];
744 double hN_gampi0nInelas_xsec [hN_gampi0nInelas_npoints];
745 int ipoint=0;
746
747 for(int ifile = 0; ifile < hN_gampi0nInelas_nfiles; ifile++) {
748
749 ostringstream hN_datafile;
750 double ke = hN_gampi0nInelas_energies[ifile];
751 hN_datafile << data_dir << "/diff_ang/gampi0n/" << ke << "-pi0n.txt";
752
754 hN_datafile.str(), ke, hN_gampi0nInelas_points_per_file,
755 ipoint, hN_gampi0nInelas_costh, hN_gampi0nInelas_xsec,3);
756 }
757
759 hN_gampi0nInelas_energies,hN_gampi0nInelas_costh,hN_gampi0nInelas_xsec);
760 }
761
762
763 {
764 const int hN_gampipnInelas_nfiles = 29;
765 const int hN_gampipnInelas_points_per_file = 37;
766 const int hN_gampipnInelas_npoints = hN_gampipnInelas_points_per_file * hN_gampipnInelas_nfiles;
767
768 double hN_gampipnInelas_energies[hN_gampipnInelas_nfiles] = {
769 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
770 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
771 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
772 };
773
774 double hN_gampipnInelas_costh [hN_gampipnInelas_points_per_file];
775 double hN_gampipnInelas_xsec [hN_gampipnInelas_npoints];
776
777 int ipoint=0;
778
779 for(int ifile = 0; ifile < hN_gampipnInelas_nfiles; ifile++) {
780
781 ostringstream hN_datafile;
782 double ke = hN_gampipnInelas_energies[ifile];
783 hN_datafile << data_dir << "/diff_ang/gampi+n/" << ke << "-pi+n.txt";
784
786 hN_datafile.str(), ke, hN_gampipnInelas_points_per_file,
787 ipoint, hN_gampipnInelas_costh, hN_gampipnInelas_xsec,3);
788 }
789
791 hN_gampipnInelas_energies,hN_gampipnInelas_costh,hN_gampipnInelas_xsec);
792 }
793
794
795 {
796 const int hN_gampimpInelas_nfiles = 29;
797 const int hN_gampimpInelas_points_per_file = 37;
798 const int hN_gampimpInelas_npoints = hN_gampimpInelas_points_per_file * hN_gampimpInelas_nfiles;
799
800 double hN_gampimpInelas_energies[hN_gampimpInelas_nfiles] = {
801 160, 180, 200, 220, 240, 260, 280, 300, 320, 340,
802 360, 380, 400, 450, 500, 550, 600, 650, 700, 750,
803 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200
804 };
805
806 double hN_gampimpInelas_costh [hN_gampimpInelas_points_per_file];
807 double hN_gampimpInelas_xsec [hN_gampimpInelas_npoints];
808
809 int ipoint=0;
810
811 for(int ifile = 0; ifile < hN_gampimpInelas_nfiles; ifile++) {
812
813 ostringstream hN_datafile;
814 double ke = hN_gampimpInelas_energies[ifile];
815 hN_datafile << data_dir << "/diff_ang/gampi-p/" << ke << "-pi-p.txt";
816
818 hN_datafile.str(), ke, hN_gampimpInelas_points_per_file,
819 ipoint, hN_gampimpInelas_costh, hN_gampimpInelas_xsec,3);
820 }
821
823 hN_gampimpInelas_energies,hN_gampimpInelas_costh,hN_gampimpInelas_xsec);
824 }
825
826
827
828
829 TFile TGraphs_file;
830 bool saveTGraphsToFile = false;
831
832 if (saveTGraphsToFile) {
833 string filename = "TGraphs.root";
834 LOG(
"INukeHadroData2025",
pNOTICE) <<
"Saving INTRANUKE hadron x-section data to ROOT file: " << filename;
835 TGraphs_file.Open(filename.c_str(), "RECREATE");
836 }
837
838
839
840 {
841 const int pipATot_nfiles = 7;
842 const int pipATot_nuclei[pipATot_nfiles] = {12,27 ,3,56, 93,209,7};
843 const int pipATot_npoints = 294;
844
845 TPipA_Tot =
new TGraph2D(pipATot_npoints);
846 TPipA_Tot->SetNameTitle(
"TPipA_Tot",
"TPipA_Tot");
848
849 int ipoint=0;
850 double x, y;
851
852 for(int ifile=0; ifile < pipATot_nfiles; ifile++) {
853 ostringstream ADep_datafile;
854 int nucleus = pipATot_nuclei[ifile];
855 ADep_datafile << data_dir << "/tot_xsec/2025/pipA_tot/pip" << nucleus << "_tot.txt";
856 TGraph * buff = new TGraph(ADep_datafile.str().c_str());
857 buff->SetNameTitle("buff","buff");
858 for(int i=0; i < buff->GetN(); i++) {
859 buff -> GetPoint(i,x,y);
860 if (y > 0) {
861 TPipA_Tot->SetPoint(ipoint, (
double)nucleus, x, log(y));
862 ipoint++;
863 }
864
865 }
866 delete buff;
867 }
868
869 if (saveTGraphsToFile) {
871 }
872 }
873
874
875
876
877
878 {
879
880
881 const int pipACEx_nfiles = 7;
882 const int pipACEx_nuclei[pipACEx_nfiles] = {3, 27 , 12 , 56 , 93 , 209 , 7};
883 const int pipACEx_npoints = 294;
884
885 TPipA_CEx =
new TGraph2D(pipACEx_npoints);
886 TPipA_CEx->SetNameTitle(
"TPipA_CEx",
"TPipA_CEx");
888
889 int ipoint=0;
890 double x, y;
891
892 for(int ifile=0; ifile < pipACEx_nfiles; ifile++) {
893 ostringstream ADep_datafile;
894 int nucleus = pipACEx_nuclei[ifile];
895 ADep_datafile << data_dir << "/tot_xsec/2025/pipA_cex/pip" << nucleus << "_cex.txt";
896 TGraph * buff = new TGraph(ADep_datafile.str().c_str());
897 buff->SetNameTitle("buff","buff");
898 for(int i=0; i < buff->GetN(); i++) {
899 buff -> GetPoint(i,x,y);
900 if(y>0){
901 TPipA_CEx -> SetPoint(ipoint,(
double)nucleus,x,log(y));
902 ipoint++;
903 }
904 }
905 delete buff;
906 }
907
908 if (saveTGraphsToFile) {
910 }
911
912
913 }
914
915
916 {
917
918 const int pipAAbs_nfiles = 7;
919 const int pipAAbs_nuclei[pipAAbs_nfiles] = {3, 27 , 12 , 56 , 93 , 209 , 7};
920 const int pipAAbs_npoints = 294;
921
922 TPipA_Abs =
new TGraph2D(pipAAbs_npoints);
923 TPipA_Abs->SetNameTitle(
"TPipA_Abs",
"TPipA_Abs");
925
926 int ipoint=0;
927 double x, y;
928
929 for(int ifile=0; ifile < pipAAbs_nfiles; ifile++) {
930 ostringstream ADep_datafile;
931 int nucleus = pipAAbs_nuclei[ifile];
932 ADep_datafile << data_dir << "/tot_xsec/2025/pipA_abs/pip" << nucleus << "_abs.txt";
933 TGraph * buff = new TGraph(ADep_datafile.str().c_str());
934 buff->SetNameTitle("buff","buff");
935 for(int i=0; i < buff->GetN(); i++) {
936 buff -> GetPoint(i,x,y);
937 if(y>0){
938 TPipA_Abs -> SetPoint(ipoint,(
double)nucleus,x,log(y));
939 ipoint++;
940 }
941 }
942 delete buff;
943 }
944
945 if (saveTGraphsToFile) {
947 }
948
949 }
950
951
952 {
953
954 const int pipAInelas_nfiles = 7;
955 const int pipAInelas_nuclei[pipAInelas_nfiles] = {3, 27 , 12 , 56 , 93 , 209 , 7};
956 const int pipAInelas_npoints = 294;
957
959 TPipA_Inelas->SetNameTitle(
"TPipA_Inelas",
"TPipA_Inelas");
961
962 int ipoint=0;
963 double x, y;
964
965 for(int ifile=0; ifile < pipAInelas_nfiles; ifile++) {
966 ostringstream ADep_datafile;
967 int nucleus = pipAInelas_nuclei[ifile];
968 ADep_datafile << data_dir << "/tot_xsec/2025/pipA_inelas/pip" << nucleus << "_inelas.txt";
969 TGraph * buff = new TGraph(ADep_datafile.str().c_str());
970 buff->SetNameTitle("buff","buff");
971 for(int i=0; i < buff->GetN(); i++) {
972 buff -> GetPoint(i,x,y);
973 if(y>0){
974 TPipA_Inelas -> SetPoint(ipoint,(
double)nucleus,x,log(y));
975 ipoint++;
976 }
977 }
978 delete buff;
979 }
980
981 if (saveTGraphsToFile) {
983 }
984 }
985
986
987 {
988
989 const int pipApipro_nfiles = 6;
990 const int pipApipro_nuclei[pipApipro_nfiles] = { 27 , 12 , 56 , 93 , 209 , 7};
991 const int pipAInelas_npoints = 252;
992
994 TPipA_PiPro->SetNameTitle(
"TPipA_PiPro",
"TPipA_PiPro");
996
997 int ipoint=0;
998 double x, y;
999
1000 for(int ifile=0; ifile < pipApipro_nfiles; ifile++) {
1001 ostringstream ADep_datafile;
1002 int nucleus = pipApipro_nuclei[ifile];
1003 ADep_datafile << data_dir << "/tot_xsec/2025/pipA_pipro/pip" << nucleus << "_pipro.txt";
1004 TGraph * buff = new TGraph(ADep_datafile.str().c_str());
1005 buff->SetNameTitle("buff","buff");
1006 for(int i=0; i < buff->GetN(); i++) {
1007 buff -> GetPoint(i,x,y);
1008 if(y>0){
1009 TPipA_PiPro -> SetPoint(ipoint,(
double)nucleus,x,log(y));
1010 ipoint++;
1011 }
1012 }
1013 delete buff;
1014 }
1015
1016 if (saveTGraphsToFile) {
1018 }
1019 }
1020
1021 TGraphs_file.Close();
1022
1023 LOG(
"INukeData",
pINFO) <<
"Done building x-section splines...";
1024
1025}
void ReadhNFile(string filename, double ke, int npoints, int &curr_point, double *costh_array, double *xsec_array, int cols)