42#include "TRestWimpNucleus.h"
44#include "TRestMetadata.h"
45#include "TRestWimpUtils.h"
49TRestWimpNucleus::TRestWimpNucleus() {
57TRestWimpNucleus::~TRestWimpNucleus() {}
59void TRestWimpNucleus::PrintNucleus() {
60 RESTMetadata <<
"-----------------------------" << RESTendl;
61 RESTMetadata <<
"Nuclei name " <<
fNucleusName.Data() << RESTendl;
62 RESTMetadata <<
"Atomic number " <<
fAnum << RESTendl;
63 RESTMetadata <<
"Number of protons " <<
fZnum << RESTendl;
64 RESTMetadata <<
"Abundance " <<
fAbundance << RESTendl;
65 RESTMetadata <<
"Abundance (mol) " <<
fAbundanceMol << RESTendl;
66 RESTMetadata <<
"-----------------------------" << RESTendl;
76 auto elementMap = TRestWimpUtils::ParseChemicalCompound(compound);
78 int stechiometricFactor = 0;
79 for (
auto& pair : elementMap) {
81 stechiometricFactor = pair.second;
85 if (stechiometricFactor == 0)
86 RESTWarning <<
"No nucleus " <<
fNucleusName.Data() <<
" founnd in compound " << compound << RESTendl;
88 return stechiometricFactor;
A class to store different nucleus parameters.
Double_t fAnum
Atomic number in amus.
int GetStechiometricFactorFromCompound(const std::string &compound)
Get the stechiometric factor of this nucleus in a given compound.
TString fNucleusName
Nucleus name.
Double_t fAbundance
Abundance, in mass percentage.
Int_t fZnum
Number of protons.
Double_t fAbundanceMol
Abundance, in mole (or volume)