#include <G4MolecularDecayTable.hh>
Public Member Functions | |
G4MolecularDecayTable () | |
~G4MolecularDecayTable () | |
G4MolecularDecayTable (const G4MolecularDecayTable &) | |
G4MolecularDecayTable & | operator= (const G4MolecularDecayTable &right) |
void | AddExcitedState (const G4String &) |
void | AddeConfToExcitedState (const G4String &, const G4ElectronOccupancy &) |
void | AddDecayChannel (const G4String &, const G4MolecularDecayChannel *) |
void | CheckDataConsistency () |
const std::vector< const G4MolecularDecayChannel * > * | GetDecayChannels (const G4ElectronOccupancy *) const |
const std::vector< const G4MolecularDecayChannel * > * | GetDecayChannels (const G4String &) const |
const G4String & | GetExcitedState (const G4ElectronOccupancy *) const |
const G4ElectronOccupancy & | GetElectronOccupancy (const G4String &) const |
const statesMap & | GetExcitedStateMaps () const |
const channelsMap & | GetDecayChannelsMap () const |
Definition at line 88 of file G4MolecularDecayTable.hh.
G4MolecularDecayTable::G4MolecularDecayTable | ( | ) |
G4MolecularDecayTable::~G4MolecularDecayTable | ( | ) |
Definition at line 46 of file G4MolecularDecayTable.cc.
00047 { 00048 channelsMap::iterator it_map = fDecayChannelsMap.begin(); 00049 00050 for(;it_map != fDecayChannelsMap.end() ; it_map++) 00051 { 00052 vector<const G4MolecularDecayChannel*>& decayChannels = it_map->second; 00053 if(!decayChannels.empty()) 00054 { 00055 for(int i = 0 ; i < (int) decayChannels.size() ; i++) 00056 { 00057 if(decayChannels [i]) 00058 { 00059 delete decayChannels[i]; 00060 decayChannels[i] = 0; 00061 } 00062 } 00063 decayChannels.clear(); 00064 } 00065 } 00066 fDecayChannelsMap.clear(); 00067 }
G4MolecularDecayTable::G4MolecularDecayTable | ( | const G4MolecularDecayTable & | ) |
void G4MolecularDecayTable::AddDecayChannel | ( | const G4String & | , | |
const G4MolecularDecayChannel * | ||||
) |
Definition at line 158 of file G4MolecularDecayTable.cc.
Referenced by G4MoleculeDefinition::AddDecayChannel().
void G4MolecularDecayTable::AddeConfToExcitedState | ( | const G4String & | , | |
const G4ElectronOccupancy & | ||||
) |
Definition at line 143 of file G4MolecularDecayTable.cc.
References FatalErrorInArgument, and G4Exception().
Referenced by G4MoleculeDefinition::AddeConfToExcitedState().
00144 { 00145 statesMap::iterator statesIter = fExcitedStatesMap.find(conf); 00146 00147 if (statesIter == fExcitedStatesMap.end()) 00148 { 00149 fExcitedStatesMap[conf] = label; 00150 } 00151 else 00152 { 00153 G4Exception("G4MolecularDecayTable::AddExcitedState","G4MolecularDecayTable004", 00154 FatalErrorInArgument,"Electronic configuration already registered in the decay table"); 00155 } 00156 }
void G4MolecularDecayTable::AddExcitedState | ( | const G4String & | ) |
Definition at line 130 of file G4MolecularDecayTable.cc.
References FatalErrorInArgument, and G4Exception().
Referenced by G4MoleculeDefinition::AddExcitedState().
00131 { 00132 channelsMap::iterator channelsIter = fDecayChannelsMap.find(label); 00133 if(channelsIter != fDecayChannelsMap.end()) 00134 { 00135 G4String errMsg = "Excited state" + label + " already registered in the decay table."; 00136 G4Exception("G4MolecularDecayTable::AddExcitedState", 00137 "G4MolecularDecayTable003",FatalErrorInArgument, errMsg); 00138 return; 00139 } 00140 fDecayChannelsMap[label] ; 00141 }
void G4MolecularDecayTable::CheckDataConsistency | ( | ) |
Definition at line 163 of file G4MolecularDecayTable.cc.
References FatalErrorInArgument, and G4Exception().
00164 { 00165 channelsMap::iterator channelsIter; 00166 00167 //Let's check probabilities 00168 00169 for (channelsIter=fDecayChannelsMap.begin(); channelsIter!=fDecayChannelsMap.end(); channelsIter++ ) 00170 { 00171 00172 vector<const G4MolecularDecayChannel*>& decayVect = channelsIter->second; 00173 G4double sum=0; 00174 00175 G4double max = decayVect.size(); 00176 00177 for (size_t i=0; i<max; i++) 00178 { 00179 const G4MolecularDecayChannel* decay = decayVect[i]; 00180 const G4double prob = decay->GetProbability(); 00181 sum += prob; 00182 } 00183 00184 if (sum != 1) 00185 { 00186 G4String errMsg = "Deexcitation Channels probabilities in " + channelsIter->first 00187 + "excited state don't sum up to 1"; 00188 G4Exception("G4MolecularDecayTable::CheckDataConsistency", 00189 "G4MolecularDecayTable005",FatalErrorInArgument, errMsg); 00190 } 00191 } 00192 00193 }
const vector< const G4MolecularDecayChannel * > * G4MolecularDecayTable::GetDecayChannels | ( | const G4String & | ) | const |
Definition at line 90 of file G4MolecularDecayTable.cc.
00091 { 00092 channelsMap::const_iterator it_decchannel = fDecayChannelsMap.find(exState); 00093 if(it_decchannel == fDecayChannelsMap.end()) return 0; 00094 return &(it_decchannel->second); 00095 }
const vector< const G4MolecularDecayChannel * > * G4MolecularDecayTable::GetDecayChannels | ( | const G4ElectronOccupancy * | ) | const |
Definition at line 81 of file G4MolecularDecayTable.cc.
Referenced by G4MoleculeDefinition::GetDecayChannels().
00082 { 00083 statesMap::const_iterator it_exstates = fExcitedStatesMap.find(*conf); 00084 if(it_exstates == fExcitedStatesMap.end()) return 0; 00085 channelsMap::const_iterator it_decchannel = fDecayChannelsMap.find(it_exstates->second) ; 00086 if(it_decchannel == fDecayChannelsMap.end()) return 0; 00087 return &(it_decchannel->second); 00088 }
const channelsMap & G4MolecularDecayTable::GetDecayChannelsMap | ( | ) | const [inline] |
const G4ElectronOccupancy & G4MolecularDecayTable::GetElectronOccupancy | ( | const G4String & | ) | const |
Definition at line 112 of file G4MolecularDecayTable.cc.
References FatalErrorInArgument, and G4Exception().
00113 { 00114 statesMap::const_iterator statesIter; 00115 const G4ElectronOccupancy* conf(0); 00116 for (statesIter=fExcitedStatesMap.begin(); statesIter!=fExcitedStatesMap.end(); statesIter++ ) 00117 { 00118 if(exState == statesIter->second) conf = &(statesIter->first); 00119 } 00120 00121 if(statesIter == fExcitedStatesMap.end()) 00122 { 00123 G4String errMsg = "Excited state" + exState + " not found"; 00124 G4Exception("G4MolecularDecayTable::GetElectronOccupancy(const G4String&)", 00125 "G4MolecularDecayTable002",FatalErrorInArgument, errMsg); 00126 } 00127 return *conf; 00128 }
const G4String & G4MolecularDecayTable::GetExcitedState | ( | const G4ElectronOccupancy * | ) | const |
Definition at line 97 of file G4MolecularDecayTable.cc.
References FatalErrorInArgument, and G4Exception().
Referenced by G4MoleculeDefinition::GetExcitedState().
00098 { 00099 statesMap::const_iterator it_exstates = fExcitedStatesMap.find(*conf); 00100 00101 if(it_exstates == fExcitedStatesMap.end()) 00102 { 00103 G4String errMsg = "Excited state not found"; 00104 G4Exception("G4MolecularDecayTable::GetExcitedState(const G4ElectronOccupancy*)", 00105 "G4MolecularDecayTable001",FatalErrorInArgument, errMsg); 00106 // return *(new G4String("IM FAKE")); // fake return statement 00107 } 00108 00109 return it_exstates->second; 00110 }
const statesMap & G4MolecularDecayTable::GetExcitedStateMaps | ( | ) | const [inline] |
G4MolecularDecayTable & G4MolecularDecayTable::operator= | ( | const G4MolecularDecayTable & | right | ) |
Definition at line 74 of file G4MolecularDecayTable.cc.
References fExcitedStatesMap, and GetDecayChannelsMap().
00075 { 00076 fExcitedStatesMap = aMolecularDecayTable.fExcitedStatesMap; 00077 fDecayChannelsMap = channelsMap(aMolecularDecayTable.GetDecayChannelsMap()); 00078 return *this; 00079 }