12 MCGIDI_quantitiesLookupModes::MCGIDI_quantitiesLookupModes(
int projectilesPOPID ) {
14 mProjectilesPOPID = projectilesPOPID;
15 mProjectileEnergy = -1.;
17 mProjectileEnergyForGroupIndex = -1.;
19 mCrossSectionMode = MCGIDI_quantityLookupMode_pointwise;
20 mMultiplicityMode = MCGIDI_quantityLookupMode_pointwise;
25 MCGIDI_quantitiesLookupModes::~MCGIDI_quantitiesLookupModes( ) {
31 int MCGIDI_quantitiesLookupModes::setGroupIndex(
GIDI_settings const &settings,
bool encloseOutOfRange ) {
34 if( particle == NULL )
throw 1;
37 if( mGroupIndex == -3 )
throw 1;
39 mProjectileEnergyForGroupIndex = mProjectileEnergy;
40 if( mGroupIndex < 0 ) mProjectileEnergyForGroupIndex = -1;
41 return( mGroupIndex );
46 enum MCGIDI_quantityLookupMode MCGIDI_quantitiesLookupModes::getMode( std::string
const &quantity )
const {
48 if( quantity == std::string(
"cross section" ) ) {
49 return( mCrossSectionMode ); }
50 else if( quantity == std::string(
"multiplicity" ) ) {
51 return( mMultiplicityMode ); }
59 std::vector<std::string> MCGIDI_quantitiesLookupModes::getListOfLookupQuanities( )
const {
61 std::vector<std::string> quanities;
63 quanities.push_back( std::string(
"cross section" ) );
64 quanities.push_back( std::string(
"multiplicity" ) );
71 void MCGIDI_quantitiesLookupModes::setMode( std::string
const &quantity,
enum MCGIDI_quantityLookupMode mode ) {
73 if( quantity == std::string(
"cross section" ) ) {
74 mCrossSectionMode = mode; }
75 else if( quantity == std::string(
"multiplicity" ) ) {
76 mMultiplicityMode = mode; }
84 void MCGIDI_quantitiesLookupModes::setModeAll(
enum MCGIDI_quantityLookupMode mode ) {
86 mCrossSectionMode = mode;
87 mMultiplicityMode = mode;
GIDI_settings_particle const * getParticle(int PoPId) const
int getGroupIndexFromEnergy(double e_in, bool encloseOutOfRange) const