Geant4-11
Data Structures | Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4StatMFMicroCanonical Class Reference

#include <G4StatMFMicroCanonical.hh>

Inheritance diagram for G4StatMFMicroCanonical:
G4VStatMFEnsemble

Data Structures

struct  DeleteFragment
 

Public Types

enum  { MaxAllowedMultiplicity = 4 }
 

Public Member Functions

G4StatMFChannelChooseAandZ (const G4Fragment &theFragment)
 
 G4StatMFMicroCanonical (const G4Fragment &theFragment)
 
G4double GetMeanMultiplicity (void) const
 
G4double GetMeanTemperature (void) const
 
 ~G4StatMFMicroCanonical ()
 

Protected Attributes

G4double __FreeInternalE0
 
G4double __MeanEntropy
 
G4double __MeanMultiplicity
 
G4double __MeanTemperature
 

Private Member Functions

G4double CalcEntropyOfCompoundNucleus (const G4Fragment &theFragment, G4double &TConf)
 
G4double CalcFreeInternalEnergy (const G4Fragment &theFragment, G4double T)
 
G4double CalcInvLevelDensity (G4int anA)
 
 G4StatMFMicroCanonical ()
 
 G4StatMFMicroCanonical (const G4StatMFMicroCanonical &right)
 
void Initialize (const G4Fragment &theFragment)
 
G4bool operator!= (const G4StatMFMicroCanonical &right) const
 
G4StatMFMicroCanonicaloperator= (const G4StatMFMicroCanonical &right)
 
G4bool operator== (const G4StatMFMicroCanonical &right) const
 

Private Attributes

std::vector< G4StatMFMicroManager * > _ThePartitionManagerVector
 
G4double _WCompoundNucleus
 

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() [1/3]

G4StatMFMicroCanonical::G4StatMFMicroCanonical ( const G4Fragment theFragment)

Definition at line 40 of file G4StatMFMicroCanonical.cc.

41{
42 // Perform class initialization
43 Initialize(theFragment);
44}
void Initialize(const G4Fragment &theFragment)

References Initialize().

◆ ~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(),
53 DeleteFragment());
54 }
55}
std::vector< G4StatMFMicroManager * > _ThePartitionManagerVector

References _ThePartitionManagerVector.

◆ G4StatMFMicroCanonical() [2/3]

G4StatMFMicroCanonical::G4StatMFMicroCanonical ( )
inlineprivate

Definition at line 58 of file G4StatMFMicroCanonical.hh.

58{};

◆ G4StatMFMicroCanonical() [3/3]

G4StatMFMicroCanonical::G4StatMFMicroCanonical ( const G4StatMFMicroCanonical right)
private

Member Function Documentation

◆ CalcEntropyOfCompoundNucleus()

G4double G4StatMFMicroCanonical::CalcEntropyOfCompoundNucleus ( const G4Fragment theFragment,
G4double TConf 
)
private

Definition at line 170 of file G4StatMFMicroCanonical.cc.

173{
174 G4int A = theFragment.GetA_asInt();
175 G4double U = theFragment.GetExcitationEnergy();
177
178 G4double Ta = std::max(std::sqrt(U/(0.125*A)),0.0012*MeV);
179 G4double Tb = Ta;
180
181 G4double ECompoundNucleus = CalcFreeInternalEnergy(theFragment,Ta);
182 G4double Da = (U+__FreeInternalE0-ECompoundNucleus)/U;
183 G4double Db = 0.0;
184
185 G4double InvLevelDensity = CalcInvLevelDensity(A);
186
187 // bracketing the solution
188 if (Da == 0.0) {
189 TConf = Ta;
190 return 2*Ta*A/InvLevelDensity - G4StatMFParameters::DBetaDT(Ta)*A13*A13;
191 } else if (Da < 0.0) {
192 do {
193 Tb -= 0.5*Tb;
194 ECompoundNucleus = CalcFreeInternalEnergy(theFragment,Tb);
195 Db = (U+__FreeInternalE0-ECompoundNucleus)/U;
196 } while (Db < 0.0);
197 } else {
198 do {
199 Tb += 0.5*Tb;
200 ECompoundNucleus = CalcFreeInternalEnergy(theFragment,Tb);
201 Db = (U+__FreeInternalE0-ECompoundNucleus)/U;
202 } while (Db > 0.0);
203 }
204
205 G4double eps = 1.0e-14 * std::abs(Tb-Ta);
206
207 for (G4int i = 0; i < 1000; i++) {
208 G4double Tc = (Ta+Tb)*0.5;
209 if (std::abs(Ta-Tb) <= eps) {
210 TConf = Tc;
211 return 2*Tc*A/InvLevelDensity - G4StatMFParameters::DBetaDT(Tc)*A13*A13;
212 }
213 ECompoundNucleus = CalcFreeInternalEnergy(theFragment,Tc);
214 G4double Dc = (U+__FreeInternalE0-ECompoundNucleus)/U;
215
216 if (Dc == 0.0) {
217 TConf = Tc;
218 return 2*Tc*A/InvLevelDensity - G4StatMFParameters::DBetaDT(Tc)*A13*A13;
219 }
220
221 if (Da*Dc < 0.0) {
222 Tb = Tc;
223 Db = Dc;
224 } else {
225 Ta = Tc;
226 Da = Dc;
227 }
228 }
229
230 G4cout <<
231 "G4StatMFMicrocanoncal::CalcEntropyOfCompoundNucleus: I can't calculate the temperature"
232 << G4endl;
233
234 return 0.0;
235}
static const G4double eps
#define A13
static constexpr double MeV
Definition: G4SIunits.hh:200
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const G4double A[17]
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:299
G4int GetA_asInt() const
Definition: G4Fragment.hh:271
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4double Z13(G4int Z) const
Definition: G4Pow.hh:123
G4double CalcFreeInternalEnergy(const G4Fragment &theFragment, G4double T)
G4double CalcInvLevelDensity(G4int anA)
static G4double DBetaDT(G4double T)
T max(const T t1, const T t2)
brief Return the largest of the two arguments

References G4VStatMFEnsemble::__FreeInternalE0, A, A13, CalcFreeInternalEnergy(), CalcInvLevelDensity(), G4StatMFParameters::DBetaDT(), eps, G4cout, G4endl, G4Fragment::GetA_asInt(), G4Fragment::GetExcitationEnergy(), G4Pow::GetInstance(), G4INCL::Math::max(), MeV, and G4Pow::Z13().

Referenced by Initialize().

◆ CalcFreeInternalEnergy()

G4double G4StatMFMicroCanonical::CalcFreeInternalEnergy ( const G4Fragment theFragment,
G4double  T 
)
private

Definition at line 146 of file G4StatMFMicroCanonical.cc.

148{
149 G4int A = theFragment.GetA_asInt();
150 G4int Z = theFragment.GetZ_asInt();
152
153 G4double InvLevelDensityPar = G4StatMFParameters::GetEpsilon0()
154 *(1.0 + 3.0/G4double(A-1));
155
156 G4double VolumeTerm = (-G4StatMFParameters::GetE0()+T*T/InvLevelDensityPar)*A;
157
159 *(A - 2*Z)*(A - 2*Z)/G4double(A);
160
161 G4double SurfaceTerm = (G4StatMFParameters::Beta(T)
163
165
166 return VolumeTerm + SymmetryTerm + SurfaceTerm + CoulombTerm;
167}
const G4int Z[17]
G4int GetZ_asInt() const
Definition: G4Fragment.hh:276
static G4double GetE0()
static G4double GetGamma0()
static G4double Beta(G4double T)
static G4double Getr0()
static G4double GetEpsilon0()
int elm_coupling
Definition: hepunit.py:285

References A, A13, G4StatMFParameters::Beta(), G4StatMFParameters::DBetaDT(), source.hepunit::elm_coupling, G4Fragment::GetA_asInt(), G4StatMFParameters::GetE0(), G4StatMFParameters::GetEpsilon0(), G4StatMFParameters::GetGamma0(), G4Pow::GetInstance(), G4StatMFParameters::Getr0(), G4Fragment::GetZ_asInt(), Z, and G4Pow::Z13().

Referenced by CalcEntropyOfCompoundNucleus().

◆ CalcInvLevelDensity()

G4double G4StatMFMicroCanonical::CalcInvLevelDensity ( G4int  anA)
private

Definition at line 265 of file G4StatMFMicroCanonical.cc.

266{
267 G4double res = 0.0;
268 if (anA > 1) {
269 res = G4StatMFParameters::GetEpsilon0()*(1.0+3.0/(anA - 1.0));
270 }
271 return res;
272}

References G4StatMFParameters::GetEpsilon0().

Referenced by CalcEntropyOfCompoundNucleus().

◆ 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}
#define G4UniformRand()
Definition: Randomize.hh:52
void CreateFragment(G4int A, G4int Z)

References G4VStatMFEnsemble::__MeanTemperature, _ThePartitionManagerVector, _WCompoundNucleus, G4StatMFChannel::CreateFragment(), G4UniformRand, G4Fragment::GetA_asInt(), and G4Fragment::GetZ_asInt().

Referenced by G4StatMF::BreakItUp().

◆ GetMeanMultiplicity()

G4double G4VStatMFEnsemble::GetMeanMultiplicity ( void  ) const
inlineinherited

Definition at line 68 of file G4VStatMFEnsemble.hh.

68{return __MeanMultiplicity;}

References G4VStatMFEnsemble::__MeanMultiplicity.

Referenced by G4StatMF::BreakItUp().

◆ GetMeanTemperature()

G4double G4VStatMFEnsemble::GetMeanTemperature ( void  ) const
inlineinherited

Definition at line 70 of file G4VStatMFEnsemble.hh.

70{return __MeanTemperature;}

References G4VStatMFEnsemble::__MeanTemperature.

Referenced by G4StatMF::BreakItUp().

◆ Initialize()

void G4StatMFMicroCanonical::Initialize ( const G4Fragment theFragment)
private

Definition at line 57 of file G4StatMFMicroCanonical.cc.

58{
59
60 std::vector<G4StatMFMicroManager*>::iterator it;
61
62 // Excitation Energy
63 G4double U = theFragment.GetExcitationEnergy();
64
65 G4int A = theFragment.GetA_asInt();
66 G4int Z = theFragment.GetZ_asInt();
67 G4double x = 1.0 - 2.0*Z/G4double(A);
68 G4Pow* g4calc = G4Pow::GetInstance();
69
70 // Configuration temperature
71 G4double TConfiguration = std::sqrt(8.0*U/G4double(A));
72
73 // Free internal energy at Temperature T = 0
75 // Volume term (for T = 0)
77 // Symmetry term
79 ) +
80 // Surface term (for T = 0)
82 // Coulomb term
84
85 // Statistical weight
86 G4double W = 0.0;
87
88 // Mean breakup multiplicity
90
91 // Mean channel temperature
93
94 // Mean channel entropy
95 __MeanEntropy = 0.0;
96
97 // Calculate entropy of compound nucleus
98 G4double SCompoundNucleus = CalcEntropyOfCompoundNucleus(theFragment,TConfiguration);
99
100 // Statistical weight of compound nucleus
101 _WCompoundNucleus = 1.0;
102
104
105 // Maximal fragment multiplicity allowed in direct simulation
107 if (A > 110) MaxMult -= 1;
108
109 for (G4int im = 2; im <= MaxMult; im++) {
110 G4StatMFMicroManager * aMicroManager =
111 new G4StatMFMicroManager(theFragment,im,__FreeInternalE0,SCompoundNucleus);
112 _ThePartitionManagerVector.push_back(aMicroManager);
113 }
114
115 // W is the total probability
116 W = std::accumulate(_ThePartitionManagerVector.begin(),
118 W, [](const G4double& running_total,
119 G4StatMFMicroManager*& manager)
120 {
121 return running_total + manager->GetProbability();
122 } );
123
124 // Normalization of statistical weights
125 for (it = _ThePartitionManagerVector.begin(); it != _ThePartitionManagerVector.end(); ++it)
126 {
127 (*it)->Normalize(W);
128 }
129
131
133 __MeanTemperature += TConfiguration * _WCompoundNucleus;
134 __MeanEntropy += SCompoundNucleus * _WCompoundNucleus;
135
136 for (it = _ThePartitionManagerVector.begin(); it != _ThePartitionManagerVector.end(); ++it)
137 {
138 __MeanMultiplicity += (*it)->GetMeanMultiplicity();
139 __MeanTemperature += (*it)->GetMeanTemperature();
140 __MeanEntropy += (*it)->GetMeanEntropy();
141 }
142
143 return;
144}
Definition: G4Pow.hh:49
G4double Z23(G4int Z) const
Definition: G4Pow.hh:125
G4double CalcEntropyOfCompoundNucleus(const G4Fragment &theFragment, G4double &TConf)
static G4double GetBeta0()

References G4VStatMFEnsemble::__FreeInternalE0, G4VStatMFEnsemble::__MeanEntropy, G4VStatMFEnsemble::__MeanMultiplicity, G4VStatMFEnsemble::__MeanTemperature, _ThePartitionManagerVector, _WCompoundNucleus, A, CalcEntropyOfCompoundNucleus(), source.hepunit::elm_coupling, G4Fragment::GetA_asInt(), G4StatMFParameters::GetBeta0(), G4StatMFParameters::GetE0(), G4Fragment::GetExcitationEnergy(), G4StatMFParameters::GetGamma0(), G4Pow::GetInstance(), G4StatMFParameters::Getr0(), G4Fragment::GetZ_asInt(), MaxAllowedMultiplicity, Z, G4Pow::Z13(), and G4Pow::Z23().

Referenced by G4StatMFMicroCanonical().

◆ operator!=()

G4bool G4StatMFMicroCanonical::operator!= ( const G4StatMFMicroCanonical right) const
private

◆ operator=()

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

◆ operator==()

G4bool G4StatMFMicroCanonical::operator== ( const G4StatMFMicroCanonical right) const
private

Field Documentation

◆ __FreeInternalE0

G4double G4VStatMFEnsemble::__FreeInternalE0
protectedinherited

◆ __MeanEntropy

G4double G4VStatMFEnsemble::__MeanEntropy
protectedinherited

◆ __MeanMultiplicity

G4double G4VStatMFEnsemble::__MeanMultiplicity
protectedinherited

◆ __MeanTemperature

G4double G4VStatMFEnsemble::__MeanTemperature
protectedinherited

◆ _ThePartitionManagerVector

std::vector<G4StatMFMicroManager*> G4StatMFMicroCanonical::_ThePartitionManagerVector
private

Definition at line 97 of file G4StatMFMicroCanonical.hh.

Referenced by ChooseAandZ(), Initialize(), and ~G4StatMFMicroCanonical().

◆ _WCompoundNucleus

G4double G4StatMFMicroCanonical::_WCompoundNucleus
private

Definition at line 100 of file G4StatMFMicroCanonical.hh.

Referenced by ChooseAandZ(), and Initialize().


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