37 else if (str ==
"MEC_Fullpn")
39 else if (str ==
"MEC_DeltaAll")
41 else if (str ==
"MEC_Deltapn")
43 else if (str ==
"MEC_EM")
45 else if (str ==
"MEC_EM_wImag")
47 else if (str ==
"QE_EM")
49 else if (str ==
"MEC_FullAll_Param")
51 else if (str ==
"MEC_FullAll_wImag")
53 else if (str ==
"QE_Full")
74 else return "Undefined";
79 return std::ifstream(file_name.c_str()).good();
135 if ( path_type ==
"relative" ) {
136 data_path =
std::string( gSystem->Getenv(
"GENIE") ) +
'/' + data_path;
166 LOG(
"TabulatedHadronTensorModelI",
pWARN) <<
"Unable to create a hadron tensor" 168 <<
" and hadron tensor type " << temp_id.
type;
193 bool tensor_ok =
true;
207 LOG(
"TabulatedHadronTensorModelI",
pINFO) <<
"Loading the hadron" 208 <<
" tensor data file " << full_file_name;
229 LOG(
"TabulatedHadronTensorModelI",
pERROR) <<
"The hadron tensor data file \"" 230 << full_file_name <<
"\" requested for target pdg = " 231 << tensor_id.
target_pdg <<
" and hadron tensor type " 232 << tensor_id.
type <<
" could not be found.";
246 std::stringstream ss;
248 tgt_string = ss.str();
250 RgKey key = tensor_type_to_string( ht_id.
type ) +
"@Pdg="
std::string GetTensorFileBasename(const HadronTensorID &ht_id) const
std::string FindTensorTableFile(const std::string &basename, bool &ok) const
THE MAIN GENIE PROJECT NAMESPACE
virtual void Configure(const Registry &config)
enum genie::HadronTensorType HadronTensorType_t
virtual const HadronTensorI * GetTensor(int tensor_pdg, HadronTensorType_t type) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
virtual void Configure(const Registry &config)
Abstract interface for an object that computes the elements a hadron tensor . Also computes the contr...
std::vector< std::string > fDataPaths
Paths to check when searching for hadron tensor data files.
Struct used to provide a unique ID for each tensor object.
void LoadConfig()
Saves some basic XML config parameters to data members.
A registry. Provides the container for algorithm configuration parameters.
Creates hadron tensor objects for use in cross section calculations.
bool file_exists(std::string const &qualified_filename)
const HadronTensorI * BuildTensor(const HadronTensorID &ht_id) const
Create a HadronTensorI object given a particular HadronTensorID.
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
virtual ~TabulatedHadronTensorModelI()
TabulatedHadronTensorModelI()
virtual HadronTensorI * ParseTensorFile(const std::string &full_file_name) const =0
std::map< HadronTensorID, HadronTensorI * > fTensors