MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Loading...
Searching...
No Matches
marley::StructureDatabase Class Reference

Container for nuclear structure information organized by nuclide. More...

#include <StructureDatabase.hh>

Public Member Functions

 StructureDatabase ()
 Creates an empty database.
 
void add_decay_scheme (int pdg, std::unique_ptr< marley::DecayScheme > &ds)
 Add a DecayScheme object to the database that contains discrete level data for a specific nuclide.
 
void clear ()
 Removes all previously stored data from the database.
 
const std::unordered_map< int, std::unique_ptr< marley::DecayScheme > > & decay_schemes () const
 Retrieves a const reference to the table of DecayScheme objects.
 
void emplace_decay_scheme (int pdg, const std::string &filename, DecayScheme::FileFormat format=DecayScheme::FileFormat::talys)
 Construct and add a DecayScheme object to the database that contains discrete level data for a specific nuclide.
 
std::set< int > find_all_nuclides (const std::string &filename, DecayScheme::FileFormat format=DecayScheme::FileFormat::talys)
 Create a set of Particle Data Group codes for every nuclide in a discrete level data file.
 
marley::DecaySchemeget_decay_scheme (const int particle_id)
 Retrieves discrete level data from the database.
 
marley::DecaySchemeget_decay_scheme (const int Z, const int A)
 Retrieves discrete level data from the database.
 
int get_fragment_l_max () const
 Returns the maximum orbital angular momentum to consider when simulating fragment emission to the continuum.
 
int get_gamma_l_max () const
 Returns the maximum multipolarity to consider when simulating gamma-ray emission to the continuum.
 
marley::GammaStrengthFunctionModelget_gamma_strength_function_model (const int nuc_pdg)
 Retrieves a gamma-ray strength function model object from the database, creating it if one did not already exist.
 
marley::GammaStrengthFunctionModelget_gamma_strength_function_model (const int Z, const int A)
 Retrieves a gamma-ray strength function model object from the database, creating it if one did not already exist.
 
marley::LevelDensityModelget_level_density_model (const int nucleus_pid)
 Retrieves a level density model object from the database, creating it if one did not already exist.
 
marley::LevelDensityModelget_level_density_model (const int Z, const int A)
 Retrieves a level density model object from the database, creating it if one did not already exist.
 
marley::OpticalModelget_optical_model (const int Z, const int A)
 Retrieves an optical model object from the database, creating it if one did not already exist.
 
marley::OpticalModelget_optical_model (int nucleus_pid)
 Retrieves an optical model object from the database, creating it if one did not already exist.
 
void load_optical_model_params (const marley::JSON *om_config=nullptr)
 Helper function that initializes the map of JSON settings for the optical model parameters.
 
void remove_decay_scheme (int pdg)
 Deletes the discrete level data in the database associated with a given nuclide.
 
void set_fragment_l_max (int ell)
 Sets the maximum orbital angular momentum to consider when simulating fragment emission to the continuum.
 
void set_gamma_l_max (int ell)
 Sets the maximum multipolarity to consider when simulating gamma-ray emission to the continuum.
 

Static Public Member Functions

static const std::map< int, marley::Fragment > & fragments ()
 Retrieves a const reference to the table of Fragment objects.
 
static const marley::Fragmentget_fragment (const int fragment_pdg)
 Retrieves nuclear fragment data from the database.
 
static const marley::Fragmentget_fragment (const int Z, const int A)
 Retrieves nuclear fragment data from the database.
 
static void get_gs_spin_parity (const int Z, const int A, int &twoJ, marley::Parity &Pi)
 Looks up the ground-state spin-parity for a particular nuclide.
 
static void get_gs_spin_parity (int nuc_pdg, int &twoJ, marley::Parity &Pi)
 Looks up the ground-state spin-parity for a particular nuclide.
 

Detailed Description

Container for nuclear structure information organized by nuclide.

Currently, the StructureDatabase object can hold nuclear discrete level data (DecayScheme objects), optical models (OpticalModel objects), \(\gamma\)-ray strength function models (GammaStrengthFunctionModel objects), and level density models (LevelDensityModel objects)

Definition at line 40 of file StructureDatabase.hh.

Constructor & Destructor Documentation

◆ StructureDatabase()

marley::StructureDatabase::StructureDatabase ( )

Creates an empty database.

Definition at line 57 of file StructureDatabase.cc.

57{}

Member Function Documentation

◆ add_decay_scheme()

void marley::StructureDatabase::add_decay_scheme ( int pdg,
std::unique_ptr< marley::DecayScheme > & ds )

Add a DecayScheme object to the database that contains discrete level data for a specific nuclide.

Parameters
pdgPDG code for the desired nuclide
dsA unique_ptr to DecayScheme object to move into the database.

Definition at line 59 of file StructureDatabase.cc.

61{
62 auto* temp_ptr = ds.release();
63 decay_scheme_table_.emplace(pdg, std::unique_ptr<marley::DecayScheme>(temp_ptr));
64}

Referenced by get_decay_scheme().

◆ clear()

void marley::StructureDatabase::clear ( )

Removes all previously stored data from the database.

Definition at line 335 of file StructureDatabase.cc.

335 {
336 decay_scheme_table_.clear();
337}

◆ decay_schemes()

const std::unordered_map< int, std::unique_ptr< marley::DecayScheme > > & marley::StructureDatabase::decay_schemes ( ) const
inline

Retrieves a const reference to the table of DecayScheme objects.

Definition at line 135 of file StructureDatabase.hh.

136 {
137 return decay_scheme_table_;
138 }

◆ emplace_decay_scheme()

void marley::StructureDatabase::emplace_decay_scheme ( int pdg,
const std::string & filename,
DecayScheme::FileFormat format = DecayScheme::FileFormat::talys )

Construct and add a DecayScheme object to the database that contains discrete level data for a specific nuclide.

Parameters
pdgPDG code for the desired nuclide
filenameName of the file that contains the discrete level data
formatDecayScheme::FileFormat specifier that indicates which nuclear data format is used in the file

Definition at line 66 of file StructureDatabase.cc.

68{
69 int Z_ds = (pdg % 10000000)/10000;
70 int A_ds = (pdg % 10000)/10;
71
72 // Remove the previous entry (if one exists) for the given PDG code
73 decay_scheme_table_.erase(pdg);
74
75 // Add the new entry
76 decay_scheme_table_.emplace(pdg, std::make_unique<marley::DecayScheme>(
77 Z_ds, A_ds, filename, format));
78}

◆ find_all_nuclides()

std::set< int > marley::StructureDatabase::find_all_nuclides ( const std::string & filename,
DecayScheme::FileFormat format = DecayScheme::FileFormat::talys )

Create a set of Particle Data Group codes for every nuclide in a discrete level data file.

Parameters
filenameName of the file that contains the discrete level data
formatDecayScheme::FileFormat specifier that indicates which nuclear data format is used in the file

Definition at line 80 of file StructureDatabase.cc.

82{
83 if (format != DecayScheme::FileFormat::talys)
84 throw marley::Error(std::string("StructureDatabase::")
85 + "find_all_nuclides() is not implemented for"
86 + " formats other than TALYS.");
87
88 // First line in a TALYS level dataset has fortran
89 // format (2i4, 2i5, 56x, i4, a2)
90 // General regex for this line:
91 static const std::regex nuclide_line("[0-9 ]{18} {56}[0-9 ]{4}.{2}");
92
93 // Open the TALYs level data file for parsing
94 std::ifstream file_in(filename);
95
96 // If the file doesn't exist or some other error
97 // occurred, complain and give up.
98 if (!file_in.good()) throw marley::Error(std::string("Could not")
99 + " read from the TALYS data file " + filename);
100
101 std::string line; // String to store the current line
102 // of the TALYS file during parsing
103
104 std::istringstream iss; // String stream used to parse the line
105
106 double Z; // atomic number
107 double A; // mass number
108
109 // Particle Data Group codes for each nuclide in the file
110 std::set<int> PDGs;
111
112 // Loop through the data file, recording all nuclide PDGs found
113 while (std::getline(file_in, line)) {
114 if (std::regex_match(line, nuclide_line)) {
115 // Load the new line into our istringstream object for parsing. Reset
116 // the stream so that we start parsing from the beginning of the string.
117 iss.str(line);
118 iss.clear();
119
120 // The first two entries on a TALYS nuclide line are Z and A.
121 iss >> Z >> A;
122
123 PDGs.insert(marley_utils::get_nucleus_pid(Z, A));
124 }
125 }
126
127 file_in.close();
128
129 return PDGs;
130}

◆ fragments()

static const std::map< int, marley::Fragment > & marley::StructureDatabase::fragments ( )
inlinestatic

Retrieves a const reference to the table of Fragment objects.

Definition at line 141 of file StructureDatabase.hh.

141 {
142 if ( !initialized_gs_spin_parity_table_ ) initialize_jpi_table();
143 return fragment_table_;
144 }

Referenced by marley::MassTable::unbound_threshold().

◆ get_decay_scheme() [1/2]

marley::DecayScheme * marley::StructureDatabase::get_decay_scheme ( const int particle_id)

Retrieves discrete level data from the database.

Parameters
particle_idPDG code for the desired nuclide
Returns
pointer to the requested nuclide's DecayScheme object, or nullptr if one could not be found

Definition at line 132 of file StructureDatabase.cc.

134{
135 // If we already have the DecayScheme object stored in the lookup table,
136 // then just retrieve it
137 auto iter = decay_scheme_table_.find( particle_id );
138 if ( iter != decay_scheme_table_.end() ) return iter->second.get();
139 // If not, see if a data file for it is listed in the index
140 else {
141
142 marley::TargetAtom ta_requested( particle_id );
143 MARLEY_LOG( DEBUG, "init.structure.decay" )
144 << "Looking up structure data for " << ta_requested;
145
146 if ( !loaded_structure_index_ ) this->load_structure_index();
147 auto ds_file_iter = decay_scheme_filenames_.find( particle_id );
148
149 // If not, then just give up and return a null pointer
150 if ( ds_file_iter == decay_scheme_filenames_.end() ) {
151 MARLEY_LOG( NOTICE, "init.structure.decay" ) << "No tabulated decay"
152 " scheme available for " << ta_requested << ". The Hauser-Feshbach"
153 " statistical model will be used for de-excitation.";
154 // Cache the null result to avoid repeating the lookup
155 decay_scheme_table_[ particle_id ] = nullptr;
156 return nullptr;
157 }
158
159 // If a file is available, load all of the decay schemes present in it
160 // and add them to the lookup table. If we find the one we're looking
161 // for, return a pointer to it. Otherwise, print a warning, give up,
162 // and return a null pointer.
163 std::string ds_file_name = ds_file_iter->second;
165 std::string full_ds_file_name = fm.find_file( ds_file_name );
166 std::ifstream ds_data_file( full_ds_file_name );
167 bool found_it = false;
168 auto temp_ds = std::make_unique< marley::DecayScheme >();
169 int loaded_nuclide_count = 0;
170 while ( ds_data_file >> *temp_ds ) {
171 int ds_pdg = temp_ds->pdg();
172 if ( particle_id == ds_pdg ) found_it = true;
173 this->add_decay_scheme( ds_pdg, temp_ds );
174 marley::TargetAtom ta( ds_pdg );
175 MARLEY_LOG( DEBUG, "init.structure.decay" ) << "Added decay scheme for "
176 << ta << " from " << full_ds_file_name;
177 ++loaded_nuclide_count;
178 temp_ds = std::make_unique< marley::DecayScheme >();
179 }
180 if ( !found_it ) {
181 MARLEY_LOG( WARN, "init.structure.decay" )
182 << "Failed to load nuclear structure data for " << ta_requested
183 << " from the file " << ds_file_name;
184 // Make a nullptr entry in the lookup table to avoid duplicate attempts
185 // to load the missing data
186 decay_scheme_table_[ particle_id ] = nullptr;
187 }
188 if ( loaded_nuclide_count > 0 ) {
189 MARLEY_LOG( INFO, "init.structure.decay" ) << "Loaded structure data for "
190 << loaded_nuclide_count << " nuclides from the file "
191 << full_ds_file_name;
192 }
193
194 // Return the pointer to the newly-loaded DecayScheme (or nullptr
195 // if it could not be loaded) via recursion
196 return this->get_decay_scheme( particle_id );
197 }
198}
static const FileManager & Instance()
Get a const reference to the singleton instance of the FileManager.
void add_decay_scheme(int pdg, std::unique_ptr< marley::DecayScheme > &ds)
Add a DecayScheme object to the database that contains discrete level data for a specific nuclide.
marley::DecayScheme * get_decay_scheme(const int particle_id)
Retrieves discrete level data from the database.

References add_decay_scheme(), get_decay_scheme(), and marley::FileManager::Instance().

Referenced by marley::CommandHandler::cmd_decay(), get_decay_scheme(), get_decay_scheme(), and marley::NucleusDecayer::process_event().

◆ get_decay_scheme() [2/2]

marley::DecayScheme * marley::StructureDatabase::get_decay_scheme ( const int Z,
const int A )

Retrieves discrete level data from the database.

Parameters
Zatomic number
Amass number
Returns
pointer to the requested nuclide's DecayScheme object, or nullptr if one could not be found

Definition at line 200 of file StructureDatabase.cc.

202{
203 int particle_id = marley_utils::get_nucleus_pid(Z, A);
204 return get_decay_scheme( particle_id );
205}

References get_decay_scheme().

◆ get_fragment() [1/2]

const marley::Fragment * marley::StructureDatabase::get_fragment ( const int fragment_pdg)
static

Retrieves nuclear fragment data from the database.

Parameters
fragment_pdgPDG code for the desired fragment
Returns
Pointer to the requested Fragment object, or nullptr if it could not be found

Definition at line 339 of file StructureDatabase.cc.

341{
342 // Before retrieving the fragment, make sure we've loaded the
343 // necessary data tables
344 if ( !initialized_gs_spin_parity_table_ ) initialize_jpi_table();
345 auto iter = fragment_table_.find( fragment_pdg );
346 if ( iter == fragment_table_.end() ) return nullptr;
347 else return &iter->second;
348}

Referenced by get_fragment().

◆ get_fragment() [2/2]

const marley::Fragment * marley::StructureDatabase::get_fragment ( const int Z,
const int A )
static

Retrieves nuclear fragment data from the database.

Parameters
ZFragment proton number
AFragment mass number
Returns
Pointer to the requested Fragment object, or nullptr if it could not be found

Definition at line 350 of file StructureDatabase.cc.

352{
353 int fragment_pdg = marley_utils::get_nucleus_pid( Z, A );
354 return get_fragment( fragment_pdg );
355}
static const marley::Fragment * get_fragment(const int fragment_pdg)
Retrieves nuclear fragment data from the database.

References get_fragment().

◆ get_fragment_l_max()

int marley::StructureDatabase::get_fragment_l_max ( ) const
inline

Returns the maximum orbital angular momentum to consider when simulating fragment emission to the continuum.

Definition at line 161 of file StructureDatabase.hh.

161{ return fragment_l_max_; }

◆ get_gamma_l_max()

int marley::StructureDatabase::get_gamma_l_max ( ) const
inline

Returns the maximum multipolarity to consider when simulating gamma-ray emission to the continuum.

Definition at line 165 of file StructureDatabase.hh.

165{ return gamma_l_max_; }

◆ get_gamma_strength_function_model() [1/2]

marley::GammaStrengthFunctionModel & marley::StructureDatabase::get_gamma_strength_function_model ( const int nuc_pdg)

Retrieves a gamma-ray strength function model object from the database, creating it if one did not already exist.

Parameters
nuc_pdgPDG code for the nuclide of interest

Definition at line 301 of file StructureDatabase.cc.

303{
304 int Z = marley_utils::get_particle_Z( nuc_pdg );
305 int A = marley_utils::get_particle_A( nuc_pdg );
306 return this->get_gamma_strength_function_model( Z, A );
307}
marley::GammaStrengthFunctionModel & get_gamma_strength_function_model(const int Z, const int A)
Retrieves a gamma-ray strength function model object from the database, creating it if one did not al...

References get_gamma_strength_function_model().

◆ get_gamma_strength_function_model() [2/2]

marley::GammaStrengthFunctionModel & marley::StructureDatabase::get_gamma_strength_function_model ( const int Z,
const int A )

Retrieves a gamma-ray strength function model object from the database, creating it if one did not already exist.

Parameters
Zatomic number
Amass number

Definition at line 310 of file StructureDatabase.cc.

312{
313 int pid = marley_utils::get_nucleus_pid(Z, A);
314
315 auto iter = gamma_strength_function_table_.find(pid);
316
317 if (iter == gamma_strength_function_table_.end()) {
318 // The requested gamma-ray strength function model wasn't found, so create
319 // it and add it to the table, returning a reference to the stored strength
320 // function model afterwards.
321 return *(gamma_strength_function_table_.emplace(pid,
322 std::make_unique<marley::StandardLorentzianModel>(Z, A)).first
323 ->second.get());
324 }
325 else return *(iter->second.get());
326}

Referenced by get_gamma_strength_function_model().

◆ get_gs_spin_parity() [1/2]

void marley::StructureDatabase::get_gs_spin_parity ( const int Z,
const int A,
int & twoJ,
marley::Parity & Pi )
static

Looks up the ground-state spin-parity for a particular nuclide.

Parameters
[in]ZProton number for the nuclide of interest
[in]AMass number for the nuclide of interest
[out]twoJTwo times the ground-state nuclear spin
[out]PiGround-state nuclear parity

Definition at line 357 of file StructureDatabase.cc.

359{
360 int nuc_pdg = marley_utils::get_nucleus_pid( Z, A );
361 return get_gs_spin_parity( nuc_pdg, twoJ, Pi );
362}
static void get_gs_spin_parity(int nuc_pdg, int &twoJ, marley::Parity &Pi)
Looks up the ground-state spin-parity for a particular nuclide.

References get_gs_spin_parity().

◆ get_gs_spin_parity() [2/2]

void marley::StructureDatabase::get_gs_spin_parity ( int nuc_pdg,
int & twoJ,
marley::Parity & Pi )
static

Looks up the ground-state spin-parity for a particular nuclide.

Parameters
[in]nuc_pdgPDG code for the nuclide of interest
[out]twoJTwo times the ground-state nuclear spin
[out]PiGround-state nuclear parity

Definition at line 364 of file StructureDatabase.cc.

366{
367 if ( !initialized_gs_spin_parity_table_ ) initialize_jpi_table();
368 auto iter = jpi_table_.find( nuc_pdg );
369 if ( iter == jpi_table_.end() ) throw marley::Error( "Unrecognized"
370 " nuclear PDG code " + std::to_string(nuc_pdg) + " passed to"
371 " marley::StructureDatabase::get_gs_spin_parity()" );
372 auto pair = iter->second;
373 twoJ = pair.first;
374 Pi = pair.second;
375}

Referenced by get_gs_spin_parity().

◆ get_level_density_model() [1/2]

marley::LevelDensityModel & marley::StructureDatabase::get_level_density_model ( const int nucleus_pid)

Retrieves a level density model object from the database, creating it if one did not already exist.

Parameters
nucleus_pidPDG particle ID for the desired nucleus

Definition at line 275 of file StructureDatabase.cc.

277{
278 auto iter = level_density_table_.find(nucleus_pid);
279
280 if (iter == level_density_table_.end()) {
281 // The requested level density model wasn't found, so create it and add it
282 // to the table, returning a reference to the stored level density model
283 // afterwards.
284 int Z = marley_utils::get_particle_Z( nucleus_pid );
285 int A = marley_utils::get_particle_A( nucleus_pid );
286 return *(level_density_table_.emplace(nucleus_pid,
287 std::make_unique<marley::BackshiftedFermiGasModel>(Z, A)).first
288 ->second.get());
289 }
290 else return *(iter->second.get());
291}

Referenced by get_level_density_model().

◆ get_level_density_model() [2/2]

marley::LevelDensityModel & marley::StructureDatabase::get_level_density_model ( const int Z,
const int A )

Retrieves a level density model object from the database, creating it if one did not already exist.

Parameters
Zatomic number
Amass number

Definition at line 293 of file StructureDatabase.cc.

295{
296 int pid = marley_utils::get_nucleus_pid(Z, A);
297 return this->get_level_density_model( pid );
298}
marley::LevelDensityModel & get_level_density_model(const int nucleus_pid)
Retrieves a level density model object from the database, creating it if one did not already exist.

References get_level_density_model().

◆ get_optical_model() [1/2]

marley::OpticalModel & marley::StructureDatabase::get_optical_model ( const int Z,
const int A )

Retrieves an optical model object from the database, creating it if one did not already exist.

Parameters
Zatomic number
Amass number

Definition at line 242 of file StructureDatabase.cc.

244{
245 int nucleus_pid = marley_utils::get_nucleus_pid( Z, A );
246 auto iter = optical_model_table_.find( nucleus_pid );
247
248 if ( iter == optical_model_table_.end() ) {
249
250 if ( om_config_map_.empty() ) this->load_optical_model_params();
251
252 // Check for a nucleus-specific optical model configuration (stored under
253 // the nuclear PDG code as a string key) first. If it's not present, pull
254 // up the default set of parameters. If the default set isn't present,
255 // complain.
256 auto iter = om_config_map_.find( std::to_string(nucleus_pid) );
257 if ( iter == om_config_map_.end() ) {
258 iter = om_config_map_.find( DEFAULT_OM_KEY );
259 if ( iter == om_config_map_.end() ) throw marley::Error( "Missing '"
260 + DEFAULT_OM_KEY + "' key in optical model JSON configuration" );
261 }
262
263 const auto& om_config = iter->second;
264
265 // The requested optical model wasn't found, so create it and add it
266 // to the table, returning a reference to the stored optical model
267 // afterwards.
268 return *( optical_model_table_.emplace( nucleus_pid,
269 std::make_unique< marley::KoningDelarocheOpticalModel >(
270 Z, A, om_config) ).first->second.get() );
271 }
272 else return *( iter->second.get() );
273}
void load_optical_model_params(const marley::JSON *om_config=nullptr)
Helper function that initializes the map of JSON settings for the optical model parameters.

References load_optical_model_params().

◆ get_optical_model() [2/2]

marley::OpticalModel & marley::StructureDatabase::get_optical_model ( int nucleus_pid)

Retrieves an optical model object from the database, creating it if one did not already exist.

Parameters
particle_idPDG particle ID for the desired nuclide
Todo
add check for invalid nucleus particle ID value

Definition at line 207 of file StructureDatabase.cc.

209{
211 auto iter = optical_model_table_.find( nucleus_pid );
212
213 if ( iter == optical_model_table_.end() ) {
214 // The requested optical model wasn't found, so create it and add it
215 // to the table, returning a reference to the stored optical model
216 // afterwards.
217 int Z = marley_utils::get_particle_Z( nucleus_pid );
218 int A = marley_utils::get_particle_A( nucleus_pid );
219
220 if ( om_config_map_.empty() ) this->load_optical_model_params();
221
222 // Check for a nucleus-specific optical model configuration (stored under
223 // the nuclear PDG code as a string key) first. If it's not present, pull
224 // up the default set of parameters. If the default set isn't present,
225 // complain.
226 auto iter = om_config_map_.find( std::to_string(nucleus_pid) );
227 if ( iter == om_config_map_.end() ) {
228 iter = om_config_map_.find( DEFAULT_OM_KEY );
229 if ( iter == om_config_map_.end() ) throw marley::Error( "Missing '"
230 + DEFAULT_OM_KEY + "' key in optical model JSON configuration" );
231 }
232
233 const auto& om_config = iter->second;
234
235 return *( optical_model_table_.emplace( nucleus_pid,
236 std::make_unique< marley::KoningDelarocheOpticalModel >(
237 Z, A, om_config) ).first->second.get() );
238 }
239 else return *( iter->second.get() );
240}

References load_optical_model_params().

◆ load_optical_model_params()

void marley::StructureDatabase::load_optical_model_params ( const marley::JSON * om_config = nullptr)

Helper function that initializes the map of JSON settings for the optical model parameters.

Definition at line 469 of file StructureDatabase.cc.

471{
472 // Boolean flag for checking that JSON parsing was successful
473 bool ok;
474
475 // If we've been passed a JSON configuration, then use it
476 if ( om_config ) {
477 om_config_map_ = assign_from_json< std::map<std::string, marley::JSON> >(
478 *om_config, ok );
479 }
480 // Otherwise, fetch the default one from the standard data file
481 else {
482 const auto& fm = marley::FileManager::Instance();
483 const std::string om_file_name( "optical_model_kduq_federal_cv.js" );
484 std::string om_full_file_name = fm.find_file( om_file_name );
485
486 if ( om_full_file_name.empty() ) {
487 throw marley::Error( "Could not find the MARLEY nuclear optical model"
488 " configuration file " + om_file_name + ". Please ensure that"
489 " the folder containing it is on the MARLEY search path."
490 " If needed, the folder can be appended to the MARLEY_SEARCH_PATH"
491 " environment variable." );
492 }
493
494 MARLEY_LOG( INFO, "init.structure" ) << "Loading nuclear optical model parameters from "
495 << om_full_file_name;
496
497 auto temp_config = marley::JSON::load_file( om_full_file_name );
498 om_config_map_ = assign_from_json< std::map<std::string, marley::JSON> >(
499 temp_config, ok );
500 }
501
502 if ( !ok ) throw marley::Error( "Failed to parse optical model"
503 " JSON configuration" );
504}

References marley::FileManager::Instance().

Referenced by get_optical_model(), and get_optical_model().

◆ remove_decay_scheme()

void marley::StructureDatabase::remove_decay_scheme ( int pdg)

Deletes the discrete level data in the database associated with a given nuclide.

If a decay scheme does not exist in the database for the requested nuclide, then this function will return without making any changes.

Parameters
pdgPDG code for the nuclide to remove

Definition at line 328 of file StructureDatabase.cc.

329{
330 // Remove the decay scheme with this PDG code if it exists in the database.
331 // If it doesn't, do nothing.
332 decay_scheme_table_.erase( pdg );
333}

◆ set_fragment_l_max()

void marley::StructureDatabase::set_fragment_l_max ( int ell)
inline

Sets the maximum orbital angular momentum to consider when simulating fragment emission to the continuum.

Definition at line 169 of file StructureDatabase.hh.

169{ fragment_l_max_ = ell; }

◆ set_gamma_l_max()

void marley::StructureDatabase::set_gamma_l_max ( int ell)
inline

Sets the maximum multipolarity to consider when simulating gamma-ray emission to the continuum.

Definition at line 173 of file StructureDatabase.hh.

173{ gamma_l_max_ = ell; }

The documentation for this class was generated from the following files: