32{
33
36 LOG(
"test",
pFATAL) <<
" No TuneId in RunOption";
37 exit(-1);
38 }
40
41
42 LOG(
"test",
pINFO) <<
"Testing the CEvNS cross-section calculation";
43
44
46 AlgId id(
"genie::PattonCEvNSPXSec",
"Default");
50
51 const int target = 1000180400;
52 const int probe = 12;
53 double E = 0.010;
55
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80 const int n = 100;
81 const double Emin = 0.005;
82 const double Emax = 0.055;
83 const double dE = (Emax-Emin)/(n-1);
84
85 double e_array[n] = {0};
86 double genie_xsec_array[n] = {0};
87
88 for(int i=0; i<n; i++) {
89 double E_current = Emin + i*dE;
92 e_array[i] = E_current;
93 genie_xsec_array[i] = xsec_current;
95 << "xsec[CEvNS; target = " << target << "]"
96 << "(E = " << E_current << " GeV) = " << xsec_current << " cm^2";
97 }
98 TGraph * genie_xsec = new TGraph(n, e_array, genie_xsec_array);
99 TGraph * published_xsec = new TGraph("$GENIE/src/contrib/cevns/cevns_arXiv180309183_Ar40_prediction.data");
100 published_xsec->SetMarkerStyle(20);
101 published_xsec->SetMarkerColor(kRed);
102 genie_xsec->SetLineColor(kBlue);
103 TFile f("cevns.root","recreate");
104 genie_xsec->Write("genie_xsec_nuAr40");
105 published_xsec->Write("published_xsec_nuAr40");
106 f.Close();
107 return 0;
108}
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
The GENIE Algorithm Factory.
const Algorithm * GetAlgorithm(const AlgId &algid)
static AlgFactory * Instance()
Algorithm ID (algorithm name + configuration set name)
Algorithm abstract base class.
Summary information for an interaction.
InitialState * InitStatePtr(void) const
static Interaction * CEvNS(int tgt, int probe, double E=0)
Kinematics * KinePtr(void) const
void SetQ2(double Q2, bool selected=false)
void ReadFromCommandLine(int argc, char **argv)
void BuildTune()
build tune and inform XSecSplineList
static RunOpt * Instance(void)
Cross Section Calculation Interface.
virtual double Integral(const Interaction *i) const =0
static constexpr double cm2
double Q2(const Interaction *const i)