Geant4-11
Data Structures | Public Member Functions | Private Member Functions | Private Attributes
G4StatMFMicroManager Class Reference

#include <G4StatMFMicroManager.hh>

Data Structures

struct  DeleteFragment
 

Public Member Functions

G4StatMFChannelChooseChannel (G4int A0, G4int Z0, G4double MeanT)
 
 G4StatMFMicroManager (const G4Fragment &theFragment, G4int multiplicity, G4double FreeIntE, G4double SCompNuc)
 
G4double GetMeanEntropy (void) const
 
G4double GetMeanMultiplicity (void) const
 
G4double GetMeanTemperature (void) const
 
G4double GetProbability (void) const
 
void Normalize (G4double Norm)
 
G4bool operator!= (const G4StatMFMicroManager &right) const
 
G4bool operator== (const G4StatMFMicroManager &right) const
 
 ~G4StatMFMicroManager ()
 

Private Member Functions

 G4StatMFMicroManager ()
 
 G4StatMFMicroManager (const G4StatMFMicroManager &right)
 
void Initialize (const G4Fragment &theFragment, G4int m, G4double FreeIntE, G4double SCompNuc)
 
G4bool MakePartition (G4int k, G4int *ANumbers)
 
G4StatMFMicroManageroperator= (const G4StatMFMicroManager &right)
 

Private Attributes

G4double _MeanEntropy
 
G4double _MeanMultiplicity
 
G4double _MeanTemperature
 
G4double _Normalization
 
std::vector< G4StatMFMicroPartition * > _Partition
 
G4double _WW
 

Detailed Description

Definition at line 43 of file G4StatMFMicroManager.hh.

Constructor & Destructor Documentation

◆ G4StatMFMicroManager() [1/3]

G4StatMFMicroManager::G4StatMFMicroManager ( const G4Fragment theFragment,
G4int  multiplicity,
G4double  FreeIntE,
G4double  SCompNuc 
)

Definition at line 62 of file G4StatMFMicroManager.cc.

64 :
66{
67 // Perform class initialization
68 Initialize(theFragment,multiplicity,FreeIntE,SCompNuc);
69}
void Initialize(const G4Fragment &theFragment, G4int m, G4double FreeIntE, G4double SCompNuc)

References Initialize().

◆ ~G4StatMFMicroManager()

G4StatMFMicroManager::~G4StatMFMicroManager ( )

Definition at line 72 of file G4StatMFMicroManager.cc.

73{
74 if (!_Partition.empty())
75 {
76 std::for_each(_Partition.begin(),_Partition.end(),
77 DeleteFragment());
78 }
79}
std::vector< G4StatMFMicroPartition * > _Partition

References _Partition.

◆ G4StatMFMicroManager() [2/3]

G4StatMFMicroManager::G4StatMFMicroManager ( )
inlineprivate

Definition at line 57 of file G4StatMFMicroManager.hh.

57{};

◆ G4StatMFMicroManager() [3/3]

G4StatMFMicroManager::G4StatMFMicroManager ( const G4StatMFMicroManager right)
private

Definition at line 35 of file G4StatMFMicroManager.cc.

36{
37 throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroManager::copy_constructor meant to not be accessible");
38}

Member Function Documentation

◆ ChooseChannel()

G4StatMFChannel * G4StatMFMicroManager::ChooseChannel ( G4int  A0,
G4int  Z0,
G4double  MeanT 
)

Definition at line 170 of file G4StatMFMicroManager.cc.

171{
172 G4double RandNumber = _Normalization * _WW * G4UniformRand();
173 G4double AccumWeight = 0.0;
174
175 for (std::vector<G4StatMFMicroPartition*>::iterator i = _Partition.begin();
176 i != _Partition.end(); ++i)
177 {
178 AccumWeight += (*i)->GetProbability();
179 if (RandNumber < AccumWeight)
180 return (*i)->ChooseZ(A0,Z0,MeanT);
181 }
182
183 throw G4HadronicException(__FILE__, __LINE__,
184 "G4StatMFMicroCanonical::ChooseChannel: Couldn't find a channel.");
185 return 0;
186}
double G4double
Definition: G4Types.hh:83
#define G4UniformRand()
Definition: Randomize.hh:52

References _Normalization, _Partition, _WW, and G4UniformRand.

◆ GetMeanEntropy()

G4double G4StatMFMicroManager::GetMeanEntropy ( void  ) const
inline

Definition at line 85 of file G4StatMFMicroManager.hh.

85{return _MeanEntropy; }

References _MeanEntropy.

◆ GetMeanMultiplicity()

G4double G4StatMFMicroManager::GetMeanMultiplicity ( void  ) const
inline

Definition at line 81 of file G4StatMFMicroManager.hh.

References _MeanMultiplicity.

◆ GetMeanTemperature()

G4double G4StatMFMicroManager::GetMeanTemperature ( void  ) const
inline

Definition at line 83 of file G4StatMFMicroManager.hh.

References _MeanTemperature.

◆ GetProbability()

G4double G4StatMFMicroManager::GetProbability ( void  ) const
inline

Definition at line 77 of file G4StatMFMicroManager.hh.

77{return _WW;}

References _WW.

◆ Initialize()

void G4StatMFMicroManager::Initialize ( const G4Fragment theFragment,
G4int  m,
G4double  FreeIntE,
G4double  SCompNuc 
)
private

Definition at line 81 of file G4StatMFMicroManager.cc.

83{
84 G4int i;
85
86 G4double U = theFragment.GetExcitationEnergy();
87
88 G4int A = theFragment.GetA_asInt();
89 G4int Z = theFragment.GetZ_asInt();
90
91 // Statistical weights
92 _WW = 0.0;
93
94 // Mean breakup multiplicity
96
97 // Mean channel temperature
98 _MeanTemperature = 0.0;
99
100 // Mean channel entropy
101 _MeanEntropy = 0.0;
102
103 // Keep fragment atomic numbers
104 // G4int * FragmentAtomicNumbers = new G4int(static_cast<G4int>(A+0.5));
105 // G4int * FragmentAtomicNumbers = new G4int(m);
106 G4int FragmentAtomicNumbers[4];
107
108 // We distribute A nucleons between m fragments mantaining the order
109 // FragmentAtomicNumbers[m-1]>FragmentAtomicNumbers[m-2]>...>FragmentAtomicNumbers[0]
110 // Our initial distribution is
111 // FragmentAtomicNumbers[m-1]=A, FragmentAtomicNumbers[m-2]=0, ..., FragmentAtomicNumbers[0]=0
112 FragmentAtomicNumbers[im-1] = A;
113 for (i = 0; i < (im - 1); i++) FragmentAtomicNumbers[i] = 0;
114
115 // We try to distribute A nucleons in partitions of m fragments
116 // MakePartition return true if it is possible
117 // and false if it is not
118
119 // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
120 while (MakePartition(im,FragmentAtomicNumbers)) {
121 // Allowed partitions are stored and its probability calculated
122
124 G4double PartitionProbability = 0.0;
125
126 for (i = im-1; i >= 0; i--) aPartition->SetPartitionFragment(FragmentAtomicNumbers[i]);
127 PartitionProbability = aPartition->CalcPartitionProbability(U,FreeIntE,SCompNuc);
128 _Partition.push_back(aPartition);
129
130 _WW += PartitionProbability;
131 _MeanMultiplicity += im*PartitionProbability;
132 _MeanTemperature += aPartition->GetTemperature() * PartitionProbability;
133 if (PartitionProbability > 0.0)
134 _MeanEntropy += PartitionProbability * aPartition->GetEntropy();
135 }
136}
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
const G4double A[17]
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:299
G4int GetZ_asInt() const
Definition: G4Fragment.hh:276
G4int GetA_asInt() const
Definition: G4Fragment.hh:271
G4bool MakePartition(G4int k, G4int *ANumbers)
G4double CalcPartitionProbability(G4double U, G4double FreeInternalE0, G4double SCompound)
void SetPartitionFragment(G4int anA)

References _MeanEntropy, _MeanMultiplicity, _MeanTemperature, _Partition, _WW, A, G4StatMFMicroPartition::CalcPartitionProbability(), G4Fragment::GetA_asInt(), G4StatMFMicroPartition::GetEntropy(), G4Fragment::GetExcitationEnergy(), G4StatMFMicroPartition::GetTemperature(), G4Fragment::GetZ_asInt(), MakePartition(), G4StatMFMicroPartition::SetPartitionFragment(), and Z.

Referenced by G4StatMFMicroManager().

◆ MakePartition()

G4bool G4StatMFMicroManager::MakePartition ( G4int  k,
G4int ANumbers 
)
private

Definition at line 138 of file G4StatMFMicroManager.cc.

142{
143 G4int l = 1;
144 // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
145 while (l < k) {
146 G4int tmp = ANumbers[l-1] + ANumbers[k-1];
147 ANumbers[l-1] += 1;
148 ANumbers[k-1] -= 1;
149 if (ANumbers[l-1] > ANumbers[l] || ANumbers[k-2] > ANumbers[k-1]) {
150 ANumbers[l-1] = 1;
151 ANumbers[k-1] = tmp - 1;
152 l++;
153 } else return true;
154 }
155 return false;
156}

Referenced by Initialize().

◆ Normalize()

void G4StatMFMicroManager::Normalize ( G4double  Norm)

Definition at line 158 of file G4StatMFMicroManager.cc.

159{
160 _Normalization = Norm;
161 _WW /= Norm;
162 _MeanMultiplicity /= Norm;
163 _MeanTemperature /= Norm;
164 _MeanEntropy /= Norm;
165
166 return;
167}

References _MeanEntropy, _MeanMultiplicity, _MeanTemperature, _Normalization, and _WW.

◆ operator!=()

G4bool G4StatMFMicroManager::operator!= ( const G4StatMFMicroManager right) const

Definition at line 56 of file G4StatMFMicroManager.cc.

57{
58 return true;
59}

◆ operator=()

G4StatMFMicroManager & G4StatMFMicroManager::operator= ( const G4StatMFMicroManager right)
private

Definition at line 42 of file G4StatMFMicroManager.cc.

44{
45 throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroManager::operator= meant to not be accessible");
46 return *this;
47}

◆ operator==()

G4bool G4StatMFMicroManager::operator== ( const G4StatMFMicroManager right) const

Definition at line 50 of file G4StatMFMicroManager.cc.

51{
52 return false;
53}

Field Documentation

◆ _MeanEntropy

G4double G4StatMFMicroManager::_MeanEntropy
private

Definition at line 115 of file G4StatMFMicroManager.hh.

Referenced by GetMeanEntropy(), Initialize(), and Normalize().

◆ _MeanMultiplicity

G4double G4StatMFMicroManager::_MeanMultiplicity
private

Definition at line 111 of file G4StatMFMicroManager.hh.

Referenced by GetMeanMultiplicity(), Initialize(), and Normalize().

◆ _MeanTemperature

G4double G4StatMFMicroManager::_MeanTemperature
private

Definition at line 113 of file G4StatMFMicroManager.hh.

Referenced by GetMeanTemperature(), Initialize(), and Normalize().

◆ _Normalization

G4double G4StatMFMicroManager::_Normalization
private

Definition at line 109 of file G4StatMFMicroManager.hh.

Referenced by ChooseChannel(), and Normalize().

◆ _Partition

std::vector<G4StatMFMicroPartition*> G4StatMFMicroManager::_Partition
private

Definition at line 103 of file G4StatMFMicroManager.hh.

Referenced by ChooseChannel(), Initialize(), and ~G4StatMFMicroManager().

◆ _WW

G4double G4StatMFMicroManager::_WW
private

Definition at line 107 of file G4StatMFMicroManager.hh.

Referenced by ChooseChannel(), GetProbability(), Initialize(), and Normalize().


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