34 RunOpt::Instance()->ReadFromCommandLine(argc,
argv);
35 if ( ! RunOpt::Instance()->Tune() ) {
36 LOG(
"test",
pFATAL) <<
" No TuneId in RunOption";
39 RunOpt::Instance()->BuildTune();
42 LOG(
"test",
pINFO) <<
"Testing the CEvNS cross-section calculation";
46 AlgId id(
"genie::PattonCEvNSPXSec",
"Default");
51 const int target = 1000180400;
81 const double Emin = 0.005;
82 const double Emax = 0.055;
83 const double dE = (Emax-Emin)/(n-1);
85 double e_array[
n] = {0};
86 double genie_xsec_array[
n] = {0};
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";
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");
Cross Section Calculation Interface.
double Q2(const Interaction *const i)
void SetQ2(double Q2, bool selected=false)
Kinematics * KinePtr(void) const
Algorithm abstract base class.
Summary information for an interaction.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
static constexpr double cm2
virtual double Integral(const Interaction *i) const =0
const Algorithm * GetAlgorithm(const AlgId &algid)
Algorithm ID (algorithm name + configuration set name)
InitialState * InitStatePtr(void) const
The GENIE Algorithm Factory.