29 using namespace genie;
119 <<
"GRV98LO algorithm was not initialized succesfully";
133 <<
"Inputs x = " << x <<
", Q2 = " <<
Q2;
137 if(Q2 <= 0.8) Q2 = 0.80001;
147 double x1p3 = x1*x1*
x1;
148 double x1p4 = x1*x1p3;
149 double x1p5 = x1*x1p4;
150 double x1p7 = x1p3*x1p4;
152 double uv =
fXUVF->
Eval(logx,logQ2) * x1p3 * xv;
153 double dv =
fXDVF->
Eval(logx,logQ2) * x1p4 * xv;
154 double de =
fXDEF->
Eval(logx,logQ2) * x1p7 * xv;
155 double ud =
fXUDF->
Eval(logx,logQ2) * x1p7 * xs;
156 double us = 0.5 * (ud - de);
157 double ds = 0.5 * (ud + de);
158 double ss =
fXSF->
Eval(logx,logQ2) * x1p7 * xs;
159 double gl =
fXGF->
Eval(logx,logQ2) * x1p5 * xs;
190 const char *
genie_dir = gSystem->Getenv(
"GENIE");
191 if(!genie_dir)
return;
193 string grid_file_name =
194 string(gSystem->Getenv(
"GENIE")) +
string(
"/data/evgen/pdfs/GRV98lo_patched.LHgrid");
197 <<
"Reading grid file from:\n " << grid_file_name;
200 grid_file.open (grid_file_name.c_str());
204 const int nskip = 21;
205 for(
int i=0;
i<nskip;
i++) {
206 grid_file.getline(rubbish,1000);
207 LOG(
"GRV98LO",
pDEBUG) <<
"Skipping: " << rubbish;
213 LOG(
"GRV98LO",
pDEBUG) <<
"Reading x_bj grid values";
222 ostringstream grid_values;
226 if(
j == kNXbj - 1) { grid_values <<
")"; }
227 else { grid_values <<
", "; }
230 <<
"x_bj grid values: " << grid_values.str();
235 LOG(
"GRV98LO",
pDEBUG) <<
"Reading Q^2 grid values.";
248 if(
i == kNQ2 - 1) { grid_values <<
")"; }
249 else { grid_values <<
", "; }
252 <<
"Q^2 grid values: " << grid_values.str() <<
"GeV^2";
255 grid_file.getline(rubbish,1000);
256 LOG(
"GRV98LO",
pDEBUG) <<
"Skipping: " << rubbish;
257 grid_file.getline(rubbish,1000);
258 LOG(
"GRV98LO",
pDEBUG) <<
"Skipping: " << rubbish;
263 LOG(
"GRV98LO",
pDEBUG) <<
"Reading PDF values on grid points";
266 for(
int j=0;
j < kNXbj-1;
j++) {
274 grid_file >> p0 >> p1 >> p2 >> p3 >> p4 >>
p5;
276 <<
"Row: " << k <<
", grid point: (" <<
i <<
", " <<
j <<
") ->" 298 vector<double> gridLogQ2 (kNQ2);
299 vector<double> gridLogXbj(kNXbj);
300 vector<double> knotsXUVF(kNQ2*kNXbj);
301 vector<double> knotsXDVF(kNQ2*kNXbj);
302 vector<double> knotsXDEF(kNQ2*kNXbj);
303 vector<double> knotsXUDF(kNQ2*kNXbj);
304 vector<double> knotsXSF (kNQ2*kNXbj);
305 vector<double> knotsXGF (kNQ2*kNXbj);
310 gridLogQ2[
i] = logQ2;
311 for(
int j=0;
j < kNXbj - 1;
j++) {
313 gridLogXbj[
j] =
logx;
321 knotsXUVF[k] =
fParton[0][
i][
j] / (xb1p3 * xb0v);
322 knotsXDVF[k] =
fParton[1][
i][
j] / (xb1p4 * xb0v);
323 knotsXDEF[k] =
fParton[2][
i][
j] / (xb1p7 * xb0v);
324 knotsXUDF[k] =
fParton[3][
i][
j] / (xb1p7 * xb0s);
325 knotsXSF [k] =
fParton[4][
i][
j] / (xb1p7 * xb0s);
326 knotsXGF [k] =
fParton[5][
i][
j] / (xb1p5 * xb0s);
329 double logxmax = TMath::Log(
fGridXbj[kNXbj-1]);
330 gridLogXbj[kNXbj-1] = logxmax;
340 fXUVF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXUVF[0]);
341 fXDVF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXDVF[0]);
342 fXDEF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXDEF[0]);
343 fXUDF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXUDF[0]);
344 fXSF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXSF [0]);
345 fXGF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXGF [0]);
T max(const caf::Proxy< T > &a, T b)
double Top(double x, double Q2) const
double Charm(double x, double Q2) const
PDF_t AllPDFs(double x, double Q2) const
double Bottom(double x, double Q2) const
THE MAIN GENIE PROJECT NAMESPACE
double Q2(const Interaction *const i)
double Eval(const double &x, const double &y) const
double DownSea(double x, double Q2) const
Float_t x1[n_points_granero]
double fGridLogXbj[kNXbj]
Pure abstract base class. Defines the PDFModelI interface to be implemented by wrapper classes to exi...
virtual const Registry & GetConfig(void) const
void Configure(const Registry &config)
double DownValence(double x, double Q2) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
double Strange(double x, double Q2) const
virtual void Configure(const Registry &config)
A very simple service to remember what detector we're working in.
double UpValence(double x, double Q2) const
static constexpr double us
A struct to hold PDF set data.
A registry. Provides the container for algorithm configuration parameters.
A 2D interpolator using the GSL spline type If GSL version is not sufficient, does an inefficient ver...
string genie_dir(std::getenv("GENIE"))
double fParton[kNParton][kNQ2][kNXbj-1]
double UpSea(double x, double Q2) const
T min(const caf::Proxy< T > &a, T b)
double Gluon(double x, double Q2) const