183 const char *
genie_dir = gSystem->Getenv(
"GENIE");
184 if(!genie_dir)
return;
186 string grid_file_name =
187 string(gSystem->Getenv(
"GENIE")) +
string(
"/data/evgen/pdfs/GRV98lo_patched.LHgrid");
190 <<
"Reading grid file from:\n " << grid_file_name;
193 grid_file.open (grid_file_name.c_str());
197 const int nskip = 21;
198 for(
int i=0; i<nskip; i++) {
199 grid_file.getline(rubbish,1000);
200 LOG(
"GRV98LO",
pDEBUG) <<
"Skipping: " << rubbish;
206 LOG(
"GRV98LO",
pDEBUG) <<
"Reading x_bj grid values";
207 for(
int j=0; j <
kNXbj; j++) {
215 ostringstream grid_values;
217 for(
int j=0; j <
kNXbj; j++) {
219 if(j == kNXbj - 1) { grid_values <<
")"; }
220 else { grid_values <<
", "; }
223 <<
"x_bj grid values: " << grid_values.str();
228 LOG(
"GRV98LO",
pDEBUG) <<
"Reading Q^2 grid values.";
229 for(
int i=0; i <
kNQ2; i++) {
239 for(
int i=0; i <
kNQ2; i++) {
241 if(i == kNQ2 - 1) { grid_values <<
")"; }
242 else { grid_values <<
", "; }
245 <<
"Q^2 grid values: " << grid_values.str() <<
"GeV^2";
248 grid_file.getline(rubbish,1000);
249 LOG(
"GRV98LO",
pDEBUG) <<
"Skipping: " << rubbish;
250 grid_file.getline(rubbish,1000);
251 LOG(
"GRV98LO",
pDEBUG) <<
"Skipping: " << rubbish;
256 LOG(
"GRV98LO",
pDEBUG) <<
"Reading PDF values on grid points";
259 for(
int j=0; j < kNXbj-1; j++) {
260 for(
int i=0; i <
kNQ2; i++) {
267 grid_file >> p0 >> p1 >> p2 >> p3 >> p4 >> p5;
269 <<
"Row: " << k <<
", grid point: (" << i <<
", " << j <<
") ->" 291 vector<double> gridLogQ2 (kNQ2);
292 vector<double> gridLogXbj(kNXbj);
293 vector<double> knotsXUVF(kNQ2*kNXbj);
294 vector<double> knotsXDVF(kNQ2*kNXbj);
295 vector<double> knotsXDEF(kNQ2*kNXbj);
296 vector<double> knotsXUDF(kNQ2*kNXbj);
297 vector<double> knotsXSF (kNQ2*kNXbj);
298 vector<double> knotsXGF (kNQ2*kNXbj);
301 for(
int i=0; i <
kNQ2; i++) {
302 double logQ2 = std::log(fGridQ2[i]);
303 gridLogQ2[i] = logQ2;
304 for(
int j=0; j < kNXbj - 1; j++) {
305 double logx = std::log(fGridXbj[j]);
306 gridLogXbj[j] = logx;
307 double xb0v = std::sqrt(fGridXbj[j]);
308 double xb0s =
std::pow(fGridXbj[j], -0.2);
309 double xb1 = 1 - fGridXbj[j];
314 knotsXUVF[
k] =
fParton[0][i][j] / (xb1p3 * xb0v);
315 knotsXDVF[
k] =
fParton[1][i][j] / (xb1p4 * xb0v);
316 knotsXDEF[
k] =
fParton[2][i][j] / (xb1p7 * xb0v);
317 knotsXUDF[
k] =
fParton[3][i][j] / (xb1p7 * xb0s);
318 knotsXSF [
k] =
fParton[4][i][j] / (xb1p7 * xb0s);
319 knotsXGF [
k] =
fParton[5][i][j] / (xb1p5 * xb0s);
322 double logxmax = TMath::Log(fGridXbj[kNXbj-1]);
323 gridLogXbj[kNXbj-1] = logxmax;
333 fXUVF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXUVF[0]);
334 fXDVF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXDVF[0]);
335 fXDEF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXDEF[0]);
336 fXUDF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXUDF[0]);
337 fXSF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXSF [0]);
338 fXGF =
new Interpolator2D(gridLogXbj.size(),&gridLogXbj[0],gridLogQ2.size(),&gridLogQ2[0],&knotsXGF [0]);
double Q2(const Interaction *const i)
double fGridLogXbj[kNXbj]
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
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]