GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
INukeNucleonCorr.cxx File Reference
#include "Physics/HadronTransport/INukeNucleonCorr.h"
#include "Physics/HadronTransport/INukeUtils2018.h"
#include "Physics/HadronTransport/INukeHadroData2018.h"
#include "Framework/ParticleData/PDGLibrary.h"
#include "Framework/Conventions/Units.h"
#include "Framework/Numerical/RandomGen.h"
#include "Framework/Messenger/Messenger.h"
#include "Framework/Conventions/Constants.h"
#include <vector>
#include <string>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <TGraph.h>
Include dependency graph for INukeNucleonCorr.cxx:

Go to the source code of this file.

Functions

string genie_dir (std::getenv("GENIE"))
 
void read_file (string rfilename)
 

Variables

const int NRows = 200
 
const int NColumns = 17
 
string dir = genie_dir + string("/data/evgen/nncorr/")
 
string infile
 
vector< vector< double > > infile_values
 
vector< string > comments
 
vector< vector< double > > HeliumValues
 
vector< vector< double > > CarbonValues
 
vector< vector< double > > CalciumValues
 
vector< vector< double > > IronValues
 
vector< vector< double > > TinValues
 
vector< vector< double > > UraniumValues
 
vector< vector< double > > clear
 

Function Documentation

string genie_dir ( std::  getenv"GENIE")
void read_file ( string  rfilename)

Definition at line 196 of file INukeNucleonCorr.cxx.

References comments, infile_values, LOG, pNOTICE, and genie::units::s.

Referenced by INukeNucleonCorr::getAvgCorrection().

197 {
198  ifstream file;
199  file.open((char*)rfilename.c_str(), ios::in);
200 
201  if (file.is_open())
202  {
203  string line;
204  int cur_line = 0;
205  while (getline(file,line))
206  {
207  if (line[0]=='#')
208  {
209  comments.push_back(line);
210  }
211  else {
212  vector<double> temp_vector;
213  istringstream iss(line);
214  string s;
215  for (int i=0; i<18; i++)
216  {
217  iss >> s;
218  temp_vector.push_back(atof(s.c_str()));
219  }
220  infile_values.push_back(temp_vector);
221  cur_line++;
222  }
223  }
224  LOG("INukeNucleonCorr",pNOTICE) << "Successful open file" << rfilename << "\n";
225 
226  }
227  else {
228  LOG("INukeNucleonCorr",pNOTICE) << "Could not open " << rfilename << "\n";
229 
230  }
231  file.close();
232 }
static constexpr double s
Definition: Units.h:95
vector< vector< double > > infile_values
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
#define pNOTICE
Definition: Messenger.h:61
vector< string > comments

Variable Documentation

vector<vector<double> > CalciumValues

Definition at line 110 of file INukeNucleonCorr.cxx.

Referenced by INukeNucleonCorr::getAvgCorrection().

vector<vector<double> > CarbonValues

Definition at line 109 of file INukeNucleonCorr.cxx.

Referenced by INukeNucleonCorr::getAvgCorrection().

vector<vector<double> > clear
vector<string> comments

Definition at line 64 of file INukeNucleonCorr.cxx.

Referenced by read_file().

string dir = genie_dir + string("/data/evgen/nncorr/")
vector<vector<double> > HeliumValues

Definition at line 108 of file INukeNucleonCorr.cxx.

Referenced by INukeNucleonCorr::getAvgCorrection().

string infile

Definition at line 62 of file INukeNucleonCorr.cxx.

Referenced by ReadListFromPath().

vector<vector<double> > infile_values

Definition at line 63 of file INukeNucleonCorr.cxx.

Referenced by INukeNucleonCorr::getAvgCorrection(), and read_file().

vector<vector<double> > IronValues

Definition at line 111 of file INukeNucleonCorr.cxx.

Referenced by INukeNucleonCorr::getAvgCorrection().

const int NColumns = 17

Definition at line 57 of file INukeNucleonCorr.cxx.

Referenced by INukeNucleonCorr::getAvgCorrection().

const int NRows = 200

Definition at line 56 of file INukeNucleonCorr.cxx.

Referenced by INukeNucleonCorr::getAvgCorrection().

vector<vector<double> > TinValues

Definition at line 112 of file INukeNucleonCorr.cxx.

Referenced by INukeNucleonCorr::getAvgCorrection().

vector<vector<double> > UraniumValues

Definition at line 113 of file INukeNucleonCorr.cxx.

Referenced by INukeNucleonCorr::getAvgCorrection().