#include <G4StatMFMicroCanonical.hh>
Inheritance diagram for G4StatMFMicroCanonical:
Public Types | |
MaxAllowedMultiplicity = 4 | |
enum | { MaxAllowedMultiplicity = 4 } |
Public Member Functions | |
G4StatMFMicroCanonical (const G4Fragment &theFragment) | |
~G4StatMFMicroCanonical () | |
G4StatMFChannel * | ChooseAandZ (const G4Fragment &theFragment) |
Data Structures | |
struct | DeleteFragment |
class | SumProbabilities |
Definition at line 47 of file G4StatMFMicroCanonical.hh.
anonymous enum |
G4StatMFMicroCanonical::G4StatMFMicroCanonical | ( | const G4Fragment & | theFragment | ) |
Definition at line 41 of file G4StatMFMicroCanonical.cc.
References G4StatMFMicroCanonical().
Referenced by G4StatMFMicroCanonical().
G4StatMFMicroCanonical::~G4StatMFMicroCanonical | ( | ) |
Definition at line 50 of file G4StatMFMicroCanonical.cc.
00051 { 00052 // garbage collection 00053 if (!_ThePartitionManagerVector.empty()) { 00054 std::for_each(_ThePartitionManagerVector.begin(), 00055 _ThePartitionManagerVector.end(), 00056 DeleteFragment()); 00057 } 00058 }
G4StatMFChannel * G4StatMFMicroCanonical::ChooseAandZ | ( | const G4Fragment & | theFragment | ) | [virtual] |
Implements G4VStatMFEnsemble.
Definition at line 245 of file G4StatMFMicroCanonical.cc.
References G4VStatMFEnsemble::__MeanTemperature, G4StatMFChannel::CreateFragment(), G4UniformRand, G4Fragment::GetA(), G4Fragment::GetA_asInt(), G4Fragment::GetZ(), and G4Fragment::GetZ_asInt().
Referenced by G4StatMF::BreakItUp().
00247 { 00248 // We choose a multiplicity (1,2,3,...) and then a channel 00249 G4double RandNumber = G4UniformRand(); 00250 00251 if (RandNumber < _WCompoundNucleus) { 00252 00253 G4StatMFChannel * aChannel = new G4StatMFChannel; 00254 aChannel->CreateFragment(theFragment.GetA_asInt(),theFragment.GetZ_asInt()); 00255 return aChannel; 00256 00257 } else { 00258 00259 G4double AccumWeight = _WCompoundNucleus; 00260 std::vector<G4StatMFMicroManager*>::iterator it; 00261 for (it = _ThePartitionManagerVector.begin(); it != _ThePartitionManagerVector.end(); ++it) { 00262 AccumWeight += (*it)->GetProbability(); 00263 if (RandNumber < AccumWeight) { 00264 return (*it)->ChooseChannel(theFragment.GetA(),theFragment.GetZ(),__MeanTemperature); 00265 } 00266 } 00267 throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroCanonical::ChooseAandZ: wrong normalization!"); 00268 } 00269 00270 return 0; 00271 }