47 _NumOfNeutralFragments(0),
48 _NumOfChargedFragments(0)
53 if (!_theFragments.empty()) {
54 std::for_each(_theFragments.begin(),_theFragments.end(),
61 std::deque<G4StatMFFragment*>::iterator i;
62 for (i = _theFragments.begin();
63 i != _theFragments.end(); ++i)
66 G4int Z = (*i)->GetZ();
67 if ( (
A > 1 && (Z >
A || Z <= 0)) || (
A==1 && Z >
A) ||
A <= 0 )
return false;
79 _NumOfNeutralFragments++;
82 _NumOfChargedFragments++;
91 std::accumulate(_theFragments.begin(),_theFragments.end(),
96 return running_total + fragment->GetCoulombEnergy();
108 G4double TranslationalEnergy = 1.5*T*_theFragments.size();
110 std::deque<G4StatMFFragment*>::const_iterator i;
111 for (i = _theFragments.begin(); i != _theFragments.end(); ++i)
113 Energy += (*i)->GetEnergy(T);
115 return Energy + TranslationalEnergy;
123 CoulombImpulse(anA,anZ,T);
126 FragmentsMomenta(_NumOfNeutralFragments, _NumOfChargedFragments, T);
129 std::deque<G4StatMFFragment*>::iterator i;
130 for (i = _theFragments.begin(); i != _theFragments.end(); ++i)
131 theResult->push_back((*i)->GetFragment(T));
146 FragmentsMomenta(_NumOfChargedFragments, 0, T);
150 SolveEqOfMotion(anA,anZ,T);
155void G4StatMFChannel::PlaceFragments(
G4int anA)
166 TooMuchIterations =
false;
169 G4double R = (Rsys - R0*g4calc->
Z13(_theFragments[0]->GetA()))*
175 G4bool ThereAreOverlaps =
false;
176 std::deque<G4StatMFFragment*>::iterator i;
177 for (i = _theFragments.begin()+1; i != _theFragments.end(); ++i)
186 std::deque<G4StatMFFragment*>::iterator j;
187 for (j = _theFragments.begin(); j != i; ++j)
190 (*i)->GetPosition() - (*j)->GetPosition();
192 g4calc->
Z13((*j)->GetA()));
193 if ( (ThereAreOverlaps = (FragToFragVector.
mag2() < Rmin*Rmin)))
198 }
while (ThereAreOverlaps && counter < 1000);
202 TooMuchIterations =
true;
207 }
while (TooMuchIterations);
211void G4StatMFChannel::FragmentsMomenta(
G4int NF,
G4int idx,
226 p = std::sqrt(2.0*_theFragments[idx]->GetNuclearMass()*KinE)
228 _theFragments[idx]->SetMomentum(p);
233 G4double M1 = _theFragments[idx]->GetNuclearMass();
234 G4double M2 = _theFragments[idx+1]->GetNuclearMass();
236 _theFragments[idx]->SetMomentum(p);
237 _theFragments[idx+1]->SetMomentum(-p);
252 SummedP.setX(0.0);SummedP.setY(0.0);SummedP.setZ(0.0);
253 for (
G4int i = idx; i < idx+NF-2; ++i)
265 p = std::sqrt(2.0*E*_theFragments[i]->GetNuclearMass())
267 _theFragments[i]->SetMomentum(p);
276 AvailableE = KinE - SummedE;
280 while (AvailableE <= p.mag2()/(2.0*(_theFragments[i1]->GetNuclearMass()+
281 _theFragments[i2]->GetNuclearMass())));
282 G4double H = 1.0 + _theFragments[i2]->GetNuclearMass()
283 /_theFragments[i1]->GetNuclearMass();
284 G4double CTM12 = H*(1.0 - 2.0*_theFragments[i2]->GetNuclearMass()
285 *AvailableE/p.mag2());
289 if (CTM12 > 1.) {CosTheta1 = 1.;}
298 while (CosTheta1*CosTheta1 < CTM12);
301 while (CTM12 >= 0.0 && CosTheta1 < 0.0);
304 if (CTM12 < 0.0) Sign = 1.0;
308 G4double P1 = (p.mag()*CosTheta1+Sign*std::sqrt(p.mag2()
309 *(CosTheta1*CosTheta1-CTM12)))/H;
310 G4double P2 = std::sqrt(P1*P1+p.mag2() - 2.0*P1*p.mag()*CosTheta1);
312 G4double SinTheta1 = std::sqrt(1.0 - CosTheta1*CosTheta1);
317 G4double CosTheta2 = (p.mag2() + P2*P2 - P1*P1)/(2.0*p.mag()*P2);
319 if (CosTheta2 > -1.0 && CosTheta2 < 1.0) {
320 SinTheta2 = std::sqrt(1.0 - CosTheta2*CosTheta2);
322 G4ThreeVector p1(P1*SinTheta1*CosPhi1,P1*SinTheta1*SinPhi1,P1*CosTheta1);
323 G4ThreeVector p2(P2*SinTheta2*CosPhi2,P2*SinTheta2*SinPhi2,P2*CosTheta2);
326 p1 = RotateMomentum(p,b,p1);
327 p2 = RotateMomentum(p,b,p2);
330 SummedE += p1.mag2()/(2.0*_theFragments[i1]->GetNuclearMass()) +
331 p2.mag2()/(2.0*_theFragments[i2]->GetNuclearMass());
333 _theFragments[i1]->SetMomentum(p1);
334 _theFragments[i2]->SetMomentum(p2);
345 G4double CoulombEnergy = 0.6*elm_coupling*anZ*anZ*
348 if (CoulombEnergy <= 0.0)
return;
350 G4int Iterations = 0;
360 for (i = 0; i < _NumOfChargedFragments; i++)
362 Vel[i] = (1.0/(_theFragments[i]->GetNuclearMass()))*
363 _theFragments[i]->GetMomentum();
364 Pos[i] = _theFragments[i]->GetPosition();
371 for (i = 0; i < _NumOfChargedFragments; i++)
374 for (
G4int j = 0; j < _NumOfChargedFragments; j++)
378 distance =
Pos[i] -
Pos[j];
379 force += (elm_coupling*_theFragments[i]->GetZ()
380 *_theFragments[j]->GetZ()/
381 (distance.mag2()*distance.mag()))*distance;
384 Accel[i] = (1./(_theFragments[i]->GetNuclearMass()))*force;
387 TimeN = TimeS + DeltaTime;
389 for ( i = 0; i < _NumOfChargedFragments; i++)
392 Vel[i] += Accel[i]*(TimeN-TimeS);
393 Pos[i] += (SavedVel+Vel[i])*(TimeN-TimeS)*0.5;
398 }
while (Iterations++ < 100);
402 for (i = 0; i < _NumOfChargedFragments; i++)
404 TotalKineticEnergy += _theFragments[i]->GetNuclearMass()*
410 for (i = 0; i < _NumOfChargedFragments; i++)
416 for (i = 0; i < _NumOfChargedFragments; i++)
418 _theFragments[i]->SetMomentum(_theFragments[i]->GetNuclearMass()*Vel[i]);
437 G4double Alpha2 = std::sqrt(V.mag2() - Alpha1*Alpha1);
442 ( (V.x() - Alpha1*U.
x())/Alpha2 ) * P.
x() + N.
x() * P.
y() + U.
x() * P.
z(),
443 ( (V.y() - Alpha1*U.
y())/Alpha2 ) * P.
x() + N.
y() * P.
y() + U.
y() * P.
z(),
444 ( (V.z() - Alpha1*U.
z())/Alpha2 ) * P.
x() + N.
z() * P.
y() + U.
z() * P.
z()
446 return RotatedMomentum;
double A(double temperature)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
std::vector< G4Fragment * > G4FragmentVector
G4ThreeVector G4RandomDirection()
Hep3Vector cross(const Hep3Vector &) const
static G4Pow * GetInstance()
G4double A13(G4double A) const
G4double Z13(G4int Z) const
G4double GetFragmentsCoulombEnergy(void)
G4bool CheckFragments(void)
G4double GetFragmentsEnergy(G4double T) const
void CreateFragment(G4int A, G4int Z)
G4FragmentVector * GetFragments(G4int anA, G4int anZ, G4double T)
static G4double GetKappaCoulomb()