62 _NumOfNeutralFragments(0),
63 _NumOfChargedFragments(0)
68 if (!_theFragments.empty()) {
69 std::for_each(_theFragments.begin(),_theFragments.end(),
76 std::deque<G4StatMFFragment*>::iterator i;
77 for (i = _theFragments.begin();
78 i != _theFragments.end(); ++i)
82 if ( (A > 1 && (Z > A || Z <= 0)) || (A==1 && Z > A) || A <= 0 )
return false;
94 _NumOfNeutralFragments++;
97 _NumOfChargedFragments++;
105 G4double Coulomb = std::accumulate(_theFragments.begin(),_theFragments.end(),
117 G4double TranslationalEnergy = 1.5*T*_theFragments.size();
119 std::deque<G4StatMFFragment*>::const_iterator i;
120 for (i = _theFragments.begin(); i != _theFragments.end(); ++i)
122 Energy += (*i)->GetEnergy(T);
124 return Energy + TranslationalEnergy;
132 CoulombImpulse(anA,anZ,T);
135 FragmentsMomenta(_NumOfNeutralFragments, _NumOfChargedFragments, T);
138 std::deque<G4StatMFFragment*>::iterator i;
139 for (i = _theFragments.begin(); i != _theFragments.end(); ++i)
140 theResult->push_back((*i)->GetFragment(T));
155 FragmentsMomenta(_NumOfChargedFragments, 0, T);
159 SolveEqOfMotion(anA,anZ,T);
164 void G4StatMFChannel::PlaceFragments(
G4int anA)
175 TooMuchIterations =
false;
178 G4double R = (Rsys - R0*g4calc->
Z13(_theFragments[0]->GetA()))*
180 _theFragments[0]->SetPosition(IsotropicVector(R));
184 G4bool ThereAreOverlaps =
false;
185 std::deque<G4StatMFFragment*>::iterator i;
186 for (i = _theFragments.begin()+1; i != _theFragments.end(); ++i)
192 (*i)->SetPosition(IsotropicVector(R));
195 std::deque<G4StatMFFragment*>::iterator j;
196 for (j = _theFragments.begin(); j != i; ++j)
199 (*i)->GetPosition() - (*j)->GetPosition();
201 g4calc->
Z13((*j)->GetA()));
202 if ( (ThereAreOverlaps = (FragToFragVector.
mag2() < Rmin*Rmin)))
207 }
while (ThereAreOverlaps && counter < 1000);
211 TooMuchIterations =
true;
216 }
while (TooMuchIterations);
220 void G4StatMFChannel::FragmentsMomenta(
G4int NF,
G4int idx,
235 p = IsotropicVector(std::sqrt(2.0*_theFragments[idx]->GetNuclearMass()*KinE));
236 _theFragments[idx]->SetMomentum(
p);
241 G4double M1 = _theFragments[idx]->GetNuclearMass();
242 G4double M2 = _theFragments[idx+1]->GetNuclearMass();
243 p = IsotropicVector(std::sqrt(2.0*KinE*(M1*M2)/(M1+M2)));
244 _theFragments[idx]->SetMomentum(
p);
245 _theFragments[idx+1]->SetMomentum(-
p);
260 SummedP.setX(0.0);SummedP.setY(0.0);SummedP.setZ(0.0);
261 for (
G4int i = idx; i < idx+NF-2; ++i)
273 p = IsotropicVector(std::sqrt(2.0*E*_theFragments[i]->GetNuclearMass()));
274 _theFragments[i]->SetMomentum(
p);
283 AvailableE = KinE - SummedE;
287 while (AvailableE <=
p.mag2()/(2.0*(_theFragments[i1]->GetNuclearMass()+
288 _theFragments[i2]->GetNuclearMass())));
289 G4double H = 1.0 + _theFragments[i2]->GetNuclearMass()
290 /_theFragments[i1]->GetNuclearMass();
291 G4double CTM12 = H*(1.0 - 2.0*_theFragments[i2]->GetNuclearMass()
292 *AvailableE/
p.mag2());
296 if (CTM12 > 1.) {CosTheta1 = 1.;}
305 while (CosTheta1*CosTheta1 < CTM12);
308 while (CTM12 >= 0.0 && CosTheta1 < 0.0);
311 if (CTM12 < 0.0) Sign = 1.0;
315 G4double P1 = (
p.mag()*CosTheta1+Sign*std::sqrt(
p.mag2()
316 *(CosTheta1*CosTheta1-CTM12)))/H;
317 G4double P2 = std::sqrt(P1*P1+
p.mag2() - 2.0*P1*
p.mag()*CosTheta1);
319 G4double SinTheta1 = std::sqrt(1.0 - CosTheta1*CosTheta1);
326 if (CosTheta2 > -1.0 && CosTheta2 < 1.0) {
327 SinTheta2 = std::sqrt(1.0 - CosTheta2*CosTheta2);
329 G4ThreeVector p1(P1*SinTheta1*CosPhi1,P1*SinTheta1*SinPhi1,P1*CosTheta1);
330 G4ThreeVector p2(P2*SinTheta2*CosPhi2,P2*SinTheta2*SinPhi2,P2*CosTheta2);
333 p1 = RotateMomentum(
p,b,p1);
334 p2 = RotateMomentum(
p,b,p2);
337 SummedE += p1.mag2()/(2.0*_theFragments[i1]->GetNuclearMass()) +
338 p2.mag2()/(2.0*_theFragments[i2]->GetNuclearMass());
340 _theFragments[i1]->SetMomentum(p1);
341 _theFragments[i2]->SetMomentum(p2);
355 if (CoulombEnergy <= 0.0)
return;
357 G4int Iterations = 0;
367 for (i = 0; i < _NumOfChargedFragments; i++)
369 Vel[i] = (1.0/(_theFragments[i]->GetNuclearMass()))*
370 _theFragments[i]->GetMomentum();
371 Pos[i] = _theFragments[i]->GetPosition();
378 for (i = 0; i < _NumOfChargedFragments; i++)
381 for (
G4int j = 0; j < _NumOfChargedFragments; j++)
385 distance = Pos[i] - Pos[j];
387 *_theFragments[j]->GetZ()/
388 (distance.mag2()*distance.mag()))*distance;
391 Accel[i] = (1./(_theFragments[i]->GetNuclearMass()))*force;
394 TimeN = TimeS + DeltaTime;
396 for ( i = 0; i < _NumOfChargedFragments; i++)
399 Vel[i] += Accel[i]*(TimeN-TimeS);
400 Pos[i] += (SavedVel+Vel[i])*(TimeN-TimeS)*0.5;
405 }
while (Iterations++ < 100);
409 for (i = 0; i < _NumOfChargedFragments; i++)
411 TotalKineticEnergy += _theFragments[i]->GetNuclearMass()*
415 G4double KineticEnergy = 1.5*_theFragments.size()*T;
416 G4double Eta = ( CoulombEnergy + KineticEnergy ) / TotalKineticEnergy;
417 for (i = 0; i < _NumOfChargedFragments; i++)
423 for (i = 0; i < _NumOfChargedFragments; i++)
425 _theFragments[i]->SetMomentum(_theFragments[i]->GetNuclearMass()*Vel[i]);
444 G4double Alpha2 = std::sqrt(V.mag2() - Alpha1*Alpha1);
449 ( (V.x() - Alpha1*U.
x())/Alpha2 ) * P.
x() + N.x() * P.
y() + U.
x() * P.
z(),
450 ( (V.y() - Alpha1*U.
y())/Alpha2 ) * P.
x() + N.y() * P.
y() + U.
y() * P.
z(),
451 ( (V.z() - Alpha1*U.
z())/Alpha2 ) * P.
x() + N.z() * P.
y() + U.
z() * P.
z()
453 return RotatedMomentum;
461 G4double SinTheta = std::sqrt(1.0 - CosTheta*CosTheta);
464 Magnitude*std::cos(Phi)*CosTheta,
465 Magnitude*std::sin(Phi));
static G4Pow * GetInstance()
static const G4double * P1[nN]
static G4double GetKappaCoulomb()
G4double GetFragmentsEnergy(G4double T) const
G4double GetCoulombEnergy(void) const
G4double operator()(G4double &, G4StatMFFragment *&frag)
static constexpr double twopi
void CreateFragment(G4int A, G4int Z)
G4double Z13(G4int Z) const
double A(double temperature)
std::vector< G4Fragment * > G4FragmentVector
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double GetFragmentsCoulombEnergy(void)
G4double A13(G4double A) const
static const G4double * P2[nN]
static constexpr double elm_coupling
Hep3Vector cross(const Hep3Vector &) const
G4bool CheckFragments(void)
G4FragmentVector * GetFragments(G4int anA, G4int anZ, G4double T)