29 const Target&
target,
const map<int, double>& nuc_to_val,
30 const map<pair<int, int>,
double>& nucA_range_to_val,
34 if(nuc_it != nuc_to_val.end()) {
35 *val = nuc_it->second;
39 nucA_range_to_val.begin();
40 for(; range_it != nucA_range_to_val.end(); ++range_it) {
41 if (target.
A() >= range_it->first.first &&
42 target.
A() <= range_it->first.second) {
43 *val = range_it->second;
56 map<pair<int, int>,
double>* nuc_rangeA_to_val) {
57 for (
int lowA = 1; lowA < 3 * 140; lowA++) {
58 for (
int highA = lowA; highA < 3 * 140; highA++) {
61 LOG(log_tool_name,
pINFO) <<
"For "<< lowA - 1 <<
" < A < " <<
62 highA + 1 <<
" -> using " << key_name <<
" = " <<
val;
63 (*nuc_rangeA_to_val)[pair<int, int>(lowA, highA)] = val;
75 for (
int Z = 1;
Z < 140;
Z++) {
76 for (
int A =
Z;
A < 3 *
Z;
A++) {
80 LOG(log_tool_name,
pINFO) <<
"Nucleus: " << pdgc <<
81 " -> using " << key_name <<
" = " <<
val;
82 (*nuc_to_val)[pdgc] =
val;
95 s<<valName<<
"@Pdg="<<pdgc;
111 s<<valName<<
"@LowA="<<lowA<<
";HighA="<<highA;
113 if(!config->
Exists(key)) {
RgDbl GetDoubleDef(RgKey key, RgDbl def_opt, bool set_def=true)
THE MAIN GENIE PROJECT NAMESPACE
void LoadAllIsotopesForKey(const char *key_name, const char *log_tool_name, Registry *config, map< int, double > *nuc_to_val)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
bool GetValueFromNuclearMaps(const Target &target, const map< int, double > &nuc_to_val, const map< pair< int, int >, double > &nucA_range_to_val, double *val)
A registry. Provides the container for algorithm configuration parameters.
bool GetDoubleKeyRangeNucA(const char *valName, const int lowA, const int highA, Registry *config, double *val)
int IonPdgCode(int A, int Z)
bool Exists(RgKey key) const
item with input key exists?
bool GetDoubleKeyPDG(const char *valName, const int pdgc, Registry *config, double *val)
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
void LoadAllNucARangesForKey(const char *key_name, const char *log_tool_name, Registry *config, map< pair< int, int >, double > *nuc_rangeA_to_val)