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

#include <G4StatMF.hh>

Inheritance diagram for G4StatMF:

Public Member Functions

 G4StatMF ()
 ~G4StatMF () override
G4FragmentVectorBreakItUp (const G4Fragment &theNucleus) override
 G4StatMF (const G4StatMF &right)=delete
G4StatMFoperator= (const G4StatMF &right)=delete
G4bool operator== (const G4StatMF &right)=delete
G4bool operator!= (const G4StatMF &right)=delete
Public Member Functions inherited from G4VMultiFragmentation
 G4VMultiFragmentation ()
virtual ~G4VMultiFragmentation ()

Detailed Description

Definition at line 40 of file G4StatMF.hh.

Constructor & Destructor Documentation

◆ G4StatMF() [1/2]

G4StatMF::G4StatMF ( )

Definition at line 38 of file G4StatMF.cc.

39{
40 theMicrocanonicalEnsemble = new G4StatMFMicroCanonical();
41 theMacrocanonicalEnsemble = new G4StatMFMacroCanonical();
42 //fSecID = G4PhysicsModelCatalog::GetModelID("model_G4StatMF");
43}

Referenced by G4StatMF(), operator!=(), operator=(), and operator==().

◆ ~G4StatMF()

G4StatMF::~G4StatMF ( )
override

Definition at line 45 of file G4StatMF.cc.

46{
47 delete theMicrocanonicalEnsemble;
48 delete theMacrocanonicalEnsemble;
49}

◆ G4StatMF() [2/2]

G4StatMF::G4StatMF ( const G4StatMF & right)
delete

Member Function Documentation

◆ BreakItUp()

G4FragmentVector * G4StatMF::BreakItUp ( const G4Fragment & theNucleus)
overridevirtual

Implements G4VMultiFragmentation.

Definition at line 51 of file G4StatMF.cc.

52{
53 // Maximun average multiplicity: M_0 = 2.6 for A ~ 200
54 // and M_0 = 3.3 for A <= 110
55 G4int A = theFragment.GetA_asInt();
57
58 // Microcanonical ensemble - direct simulation
59 theMicrocanonicalEnsemble->Initialise(theFragment);
60
61 const G4int iLimit = 20;
62 G4double Temperature = 0.0;
63
64 G4StatMFChannel* theChannel = nullptr;
65
66 for (G4int i=0; i<iLimit; ++i) {
67 for (G4int j=0; j<iLimit; ++j) {
68
69 G4double theMeanMult = theMicrocanonicalEnsemble->GetMeanMultiplicity();
70 if (theMeanMult <= MaxAverageMultiplicity) {
71 //G4cout << "MICROCANONICAL Nmean=" << theMeanMult
72 // << " i=" << i << " j=" << j << G4endl;
73 // Choose fragments atomic numbers and charges from direct simulation
74 theChannel = theMicrocanonicalEnsemble->ChooseAandZ(theFragment);
75 fEnsemble = theMicrocanonicalEnsemble;
76 } else {
77 //-----------------------------------------------------
78 // Non direct simulation part (Macrocanonical Ensemble)
79 //-----------------------------------------------------
80 // Macrocanonical ensemble initialization
81 theMacrocanonicalEnsemble->Initialise(theFragment);
82 fEnsemble = theMacrocanonicalEnsemble;
83 //G4cout << "MACROCANONICAL Nmean=" << theMeanMult
84 // << " i=" << i << " j=" << j << G4endl;
85 // Select calculated fragment total multiplicity,
86 // fragment atomic numbers and fragment charges.
87 theChannel = theMacrocanonicalEnsemble->ChooseAandZ(theFragment);
88 }
89
90 if (theChannel->CheckFragments()) { break; }
91 delete theChannel;
92 theChannel = nullptr;
93 }
94
95 if (nullptr == theChannel || theChannel->GetMultiplicity() <= 1) {
96 delete theChannel;
97 theChannel = nullptr;
98 break;
99 }
100
101 // G4cout << " multiplicity=" << theChannel->GetMultiplicity() << G4endl;
102 //--------------------------------------
103 // Second part of simulation procedure.
104 //--------------------------------------
105
106 // Find temperature of breaking channel.
107 Temperature = fEnsemble->GetMeanTemperature(); // Initial guess for Temperature
108
109 if (FindTemperatureOfBreakingChannel(theFragment, theChannel, Temperature)) {
110 break;
111 }
112
113 // Do not forget to delete this unusable channel, for which we failed to find the temperature,
114 // otherwise for very proton-reach nuclei it would lead to memory leak due to large
115 // number of iterations. N.B. "theChannel" is created in G4StatMFMacroCanonical::ChooseZ()
116
117 // G4cout << " Iteration # " << Iterations << " Mean Temperature = " << Temperature << G4endl;
118 delete theChannel;
119 theChannel = nullptr;
120 }
121
122 // primary
123 G4FragmentVector* theResult = nullptr;
124
125 // no multi-fragmentation
126 if (nullptr == theChannel || theChannel->GetMultiplicity() <= 1) {
127 theResult = new G4FragmentVector();
128 theResult->push_back(new G4Fragment(theFragment));
129 delete theChannel;
130 return theResult;
131 }
132
133 G4int Z = theFragment.GetZ_asInt();
134 G4double m0 = theFragment.GetGroundStateMass() + theFragment.GetExcitationEnergy();
135 auto bs = theFragment.GetMomentum().boostVector();
136
137 G4double etot = 0.0;
138 G4double ekin = 0.0;
139 for (G4int i=0; i<iLimit; ++i) {
140 theResult = theChannel->GetFragments(A, Z, Temperature);
141 if (nullptr == theResult) { continue; }
142 etot = 0.0;
143 ekin = 0.0;
144 for (auto const & ptr : *theResult) {
145 G4double e = ptr->GetMomentum().e();
146 G4double m1 = ptr->GetGroundStateMass() + ptr->GetExcitationEnergy();
147 etot += e;
148 ekin += std::max(e - m1, 0.0);
149 }
150 // correction possible
151 if (etot - m0 + ekin > 0.0 && ekin > 0.0) { break; }
152
153 // new attemt required
154 for (auto const & ptr : *theResult) {
155 delete ptr;
156 }
157 delete theResult;
158 theResult = nullptr;
159 }
160 delete theChannel;
161
162 // no multi-fragmentation
163 if (nullptr == theResult || ekin <= 0.0) {
164 theResult = new G4FragmentVector();
165 theResult->push_back(new G4Fragment(theFragment));
166 return theResult;
167 }
168
169 G4double x = 1.0 + (etot - m0)/ekin;
170 G4LorentzVector lv1;
171
172 // scale and boost
173 for (auto const & ptr : *theResult) {
174 G4double m1 = ptr->GetGroundStateMass() + ptr->GetExcitationEnergy();
175 G4double ek = std::max((ptr->GetMomentum().e() - m1)*x, 0.0);
176 auto mom = ptr->GetMomentum().vect().unit();
177 mom *= std::sqrt(ek * (ek + 2.0*m1));
178 lv1.set(mom.x(), mom.y(), mom.z(), ek + m1);
179 lv1.boost(bs);
180 ptr->SetMomentum(lv1);
181 }
182 return theResult;
183}
std::vector< G4Fragment * > G4FragmentVector
Definition G4Fragment.hh:65
CLHEP::HepLorentzVector G4LorentzVector
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
const G4double A[17]
HepLorentzVector & boost(double, double, double)
void set(double x, double y, double z, double t)
G4bool CheckFragments(void)
size_t GetMultiplicity(void)
G4FragmentVector * GetFragments(G4int anA, G4int anZ, G4double T)
static G4double GetMaxAverageMultiplicity(G4int A)

◆ operator!=()

G4bool G4StatMF::operator!= ( const G4StatMF & right)
delete

◆ operator=()

G4StatMF & G4StatMF::operator= ( const G4StatMF & right)
delete

◆ operator==()

G4bool G4StatMF::operator== ( const G4StatMF & right)
delete

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