33 const Target&
target,
const map<int, double>& nuc_to_val,
34 const map<pair<int, int>,
double>& nucA_range_to_val,
37 map<int, double>::const_iterator nuc_it = nuc_to_val.find(pdgc);
38 if(nuc_it != nuc_to_val.end()) {
39 *val = nuc_it->second;
42 map<pair<int, int>,
double>::const_iterator range_it =
43 nucA_range_to_val.begin();
44 for(; range_it != nucA_range_to_val.end(); ++range_it) {
45 if (target.
A() >= range_it->first.first &&
46 target.
A() <= range_it->first.second) {
47 *val = range_it->second;
60 map<pair<int, int>,
double>* nuc_rangeA_to_val) {
61 for (
int lowA = 1; lowA < 3 * 140; lowA++) {
62 for (
int highA = lowA; highA < 3 * 140; highA++) {
65 LOG(log_tool_name,
pINFO) <<
"For "<< lowA - 1 <<
" < A < " <<
66 highA + 1 <<
" -> using " << key_name <<
" = " <<
val;
67 (*nuc_rangeA_to_val)[pair<int, int>(lowA, highA)] = val;
79 for (
int Z = 1;
Z < 140;
Z++) {
80 for (
int A =
Z;
A < 3 *
Z;
A++) {
84 LOG(log_tool_name,
pINFO) <<
"Nucleus: " << pdgc <<
85 " -> using " << key_name <<
" = " <<
val;
86 (*nuc_to_val)[pdgc] =
val;
99 s<<valName<<
"@Pdg="<<pdgc;
101 if(!config->
Exists(key)) {
115 s<<valName<<
"@LowA="<<lowA<<
";HighA="<<highA;
117 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)