Geant4 9.6.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 47 of file G4StatMFMicroCanonical.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MaxAllowedMultiplicity 

Definition at line 77 of file G4StatMFMicroCanonical.hh.

Constructor & Destructor Documentation

◆ G4StatMFMicroCanonical()

G4StatMFMicroCanonical::G4StatMFMicroCanonical ( const G4Fragment theFragment)

Definition at line 41 of file G4StatMFMicroCanonical.cc.

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

Referenced by G4StatMFMicroCanonical().

◆ ~G4StatMFMicroCanonical()

G4StatMFMicroCanonical::~G4StatMFMicroCanonical ( )

Definition at line 50 of file G4StatMFMicroCanonical.cc.

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

Member Function Documentation

◆ ChooseAandZ()

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

Implements G4VStatMFEnsemble.

Definition at line 245 of file G4StatMFMicroCanonical.cc.

247{
248 // We choose a multiplicity (1,2,3,...) and then a channel
249 G4double RandNumber = G4UniformRand();
250
251 if (RandNumber < _WCompoundNucleus) {
252
253 G4StatMFChannel * aChannel = new G4StatMFChannel;
254 aChannel->CreateFragment(theFragment.GetA_asInt(),theFragment.GetZ_asInt());
255 return aChannel;
256
257 } else {
258
259 G4double AccumWeight = _WCompoundNucleus;
260 std::vector<G4StatMFMicroManager*>::iterator it;
261 for (it = _ThePartitionManagerVector.begin(); it != _ThePartitionManagerVector.end(); ++it) {
262 AccumWeight += (*it)->GetProbability();
263 if (RandNumber < AccumWeight) {
264 return (*it)->ChooseChannel(theFragment.GetA(),theFragment.GetZ(),__MeanTemperature);
265 }
266 }
267 throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroCanonical::ChooseAandZ: wrong normalization!");
268 }
269
270 return 0;
271}
double G4double
Definition: G4Types.hh:64
#define G4UniformRand()
Definition: Randomize.hh:53
G4double GetZ() const
Definition: G4Fragment.hh:278
G4int GetZ_asInt() const
Definition: G4Fragment.hh:223
G4double GetA() const
Definition: G4Fragment.hh:283
G4int GetA_asInt() const
Definition: G4Fragment.hh:218
void CreateFragment(G4int A, G4int Z)

Referenced by G4StatMF::BreakItUp().


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