Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4StatMFMicroCanonical Class Reference

#include <G4StatMFMicroCanonical.hh>

+ Inheritance diagram for G4StatMFMicroCanonical:

Public Types

enum  { MaxAllowedMultiplicity = 4 }
 

Public Member Functions

 G4StatMFMicroCanonical (const G4Fragment &theFragment)
 
 ~G4StatMFMicroCanonical ()
 
G4StatMFChannelChooseAandZ (const G4Fragment &theFragment)
 
- Public Member Functions inherited from G4VStatMFEnsemble
 G4VStatMFEnsemble ()
 
virtual ~G4VStatMFEnsemble ()
 
virtual G4StatMFChannelChooseAandZ (const G4Fragment &aFragment)=0
 
G4double GetMeanMultiplicity (void) const
 
G4double GetMeanTemperature (void) const
 

Additional Inherited Members

- Protected Attributes inherited from G4VStatMFEnsemble
G4double __FreeInternalE0
 
G4double __MeanTemperature
 
G4double __MeanEntropy
 
G4double __MeanMultiplicity
 

Detailed Description

Definition at line 46 of file G4StatMFMicroCanonical.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MaxAllowedMultiplicity 

Definition at line 76 of file G4StatMFMicroCanonical.hh.

Constructor & Destructor Documentation

◆ G4StatMFMicroCanonical()

G4StatMFMicroCanonical::G4StatMFMicroCanonical ( const G4Fragment theFragment)

Definition at line 40 of file G4StatMFMicroCanonical.cc.

41{
42 // Perform class initialization
43 Initialize(theFragment);
44}

Referenced by G4StatMFMicroCanonical().

◆ ~G4StatMFMicroCanonical()

G4StatMFMicroCanonical::~G4StatMFMicroCanonical ( )

Definition at line 47 of file G4StatMFMicroCanonical.cc.

48{
49 // garbage collection
50 if (!_ThePartitionManagerVector.empty()) {
51 std::for_each(_ThePartitionManagerVector.begin(),
52 _ThePartitionManagerVector.end(),
53 DeleteFragment());
54 }
55}

Member Function Documentation

◆ ChooseAandZ()

G4StatMFChannel * G4StatMFMicroCanonical::ChooseAandZ ( const G4Fragment theFragment)
virtual

Implements G4VStatMFEnsemble.

Definition at line 237 of file G4StatMFMicroCanonical.cc.

239{
240 // We choose a multiplicity (1,2,3,...) and then a channel
241 G4double RandNumber = G4UniformRand();
242
243 if (RandNumber < _WCompoundNucleus) {
244
245 G4StatMFChannel * aChannel = new G4StatMFChannel;
246 aChannel->CreateFragment(theFragment.GetA_asInt(),theFragment.GetZ_asInt());
247 return aChannel;
248
249 } else {
250
251 G4double AccumWeight = _WCompoundNucleus;
252 std::vector<G4StatMFMicroManager*>::iterator it;
253 for (it = _ThePartitionManagerVector.begin(); it != _ThePartitionManagerVector.end(); ++it) {
254 AccumWeight += (*it)->GetProbability();
255 if (RandNumber < AccumWeight) {
256 return (*it)->ChooseChannel(theFragment.GetA_asInt(),theFragment.GetZ_asInt(),__MeanTemperature);
257 }
258 }
259 throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroCanonical::ChooseAandZ: wrong normalization!");
260 }
261
262 return 0;
263}
double G4double
Definition: G4Types.hh:83
#define G4UniformRand()
Definition: Randomize.hh:52
G4int GetZ_asInt() const
Definition: G4Fragment.hh:263
G4int GetA_asInt() const
Definition: G4Fragment.hh:258
void CreateFragment(G4int A, G4int Z)

Referenced by G4StatMF::BreakItUp().


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