76 if ( z == 1 && a == 1 ) {
81 else if ( z == 0 && a == 1 ) {
90 for (
int i = 0 ; i < a ; i++ )
113 rt00 = radious - r01;
114 radm = radious - rada * ( gamm - 1.0 ) + radb;
115 rmax = 1.0 / ( 1.0 +
G4Exp ( -rt00/saa ) );
133void G4QMDGroundStateNucleus::packNucleons()
147 ebin0 = ( ebini - 0.5 ) * 0.001;
148 ebin1 = ( ebini + 0.5 ) * 0.001;
152 ebin0 = ( ebini - 1.5 ) * 0.001;
153 ebin1 = ( ebini + 1.5 ) * 0.001;
158 while ( n0Try < maxTrial )
167 G4bool areThesePsOK =
false;
169 while ( npTry < maxTrial )
174 if ( samplingPosition( i ) )
180 if ( !( samplingPosition( i ) ) )
194 if ( areThesePsOK ==
false )
continue;
213 rho_a[ i ] += meanfield->
GetRHA( j , i );
220 rho_s[ i ] += meanfield->
GetRHA( j , i )*( 1.0 - 2.0 * k );
222 rho_c[ i ] += meanfield->
GetRHE( j , i );
229 rho_l[i] = cdp * ( rho_a[i] + 1.0 );
230 d_pot[i] = c0p * rho_a[i]
247 G4bool isThis1stMOK =
false;
249 while ( nmTry < maxTrial )
253 if ( samplingMomentum( i ) )
259 if ( isThis1stMOK ==
false )
continue;
263 G4bool areTheseMsOK =
true;
265 while ( nmTry < maxTrial )
272 if ( !( samplingMomentum( i ) ) )
275 areTheseMsOK =
false;
286 if ( areTheseMsOK ==
false )
continue;
292 killCMMotionAndAngularM();
314 if ( ebinal < ebin0 || ebinal > ebin1 )
348 G4bool isThisEAOK =
false;
349 while ( neaTry < maxTrial )
356 if ( std::abs ( edif ) < epse )
380 if ( jfrc == ifrc && std::abs( edif0 ) < std::abs( edif ) )
396 ri += dtc * ( meanfield->
GetFFr(i) - cfrc * ( meanfield->
GetFFp(i) ) );
397 p_i += dtc * ( meanfield->
GetFFp(i) + cfrc * ( meanfield->
GetFFr(i) ) );
413 ebinal = ( totalPotentialE + ekinal ) /
double (
GetMassNumber() );
417 if ( isThisEAOK ==
false )
continue;
425 if ( isThisOK ==
false )
427 G4cout <<
"GroundStateNucleus state cannot be created. Try again with another parameters." <<
G4endl;
435G4bool G4QMDGroundStateNucleus::samplingPosition(
G4int i )
442 while ( nTry < maxTrial )
455 G4int icounter_max = 1024;
459 if ( icounter > icounter_max ) {
460 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
466 G4int jcounter_max = 1024;
470 if ( jcounter > jcounter_max ) {
471 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
477 rsqr = rx*rx + ry*ry + rz*rz;
479 rrr = radm * std::sqrt ( rsqr );
480 rwod = 1.0 / ( 1.0 +
G4Exp ( ( rrr - rt00 ) / saa ) );
496 for (
G4int j = 0 ; j < i ; j++ )
520 if ( isThisOK ==
true )
536G4bool G4QMDGroundStateNucleus::samplingMomentum(
G4int i )
547 pfm = pfm * ( 1.0 + 0.2 * std::sqrt( std::abs( 8.0 + ebini ) / 8.0 ) );
552 std::vector< G4double > phase;
557 while ( ntry < maxTrial )
568 G4int icounter_max = 1024;
569 while ( ke + d_pot [i] > edepth )
572 if ( icounter > icounter_max ) {
573 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
583 G4int jcounter_max = 1024;
587 if ( jcounter > jcounter_max ) {
588 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
595 psqr = px*px + py*py + pz*pz;
607 if ( tkdb_i > maxTrial )
return result;
628 for (
G4int j = 0 ; j < i ; j++ )
636 expa = - meanfield->
GetRR2(i,j) * cpw;
644 dist2_p = dist2_p*cph;
645 expa = expa - dist2_p;
650 phase[j] =
G4Exp ( expa );
652 if ( phase[j] * cpc > 0.2 )
662 if ( ( phase_g[j] + phase[j] ) * cpc > 0.5 )
674 phase[i] += phase[j];
675 if ( phase[i] * cpc > 0.3 )
708 if ( isThisOK ==
true )
711 phase_g[i] = phase[i];
713 for (
int j = 0 ; j < i ; j++ )
715 phase_g[j] += phase[j];
730void G4QMDGroundStateNucleus::killCMMotionAndAngularM()
752 rcm_tmp = rcm_tmp/sumMass;
770 for (
G4int i = 0 ; i < 3 ; i++ )
772 for (
G4int j = 0 ; j < 3 ; j++ )
790 rr[0][0] += r.
y() * r.
y() + r.
z() * r.
z();
791 rr[1][0] += - r.
y() * r.
x();
792 rr[2][0] += - r.
z() * r.
x();
793 rr[0][1] += - r.
x() * r.
y();
794 rr[1][1] += r.
z() * r.
z() + r.
x() * r.
x();
795 rr[2][1] += - r.
z() * r.
y();
796 rr[2][0] += - r.
x() * r.
z();
797 rr[2][1] += - r.
y() * r.
z();
798 rr[2][2] += r.
x() * r.
x() + r.
y() * r.
y();
801 for (
G4int i = 0 ; i < 3 ; i++ )
804 for (
G4int j = 0 ; j < 3 ; j++ )
806 rr[i][j] = rr[i][j] / x;
807 ss[i][j] = ss[i][j] / x;
809 for (
G4int j = 0 ; j < 3 ; j++ )
814 for (
G4int k = 0 ; k < 3 ; k++ )
816 rr[j][k] += -y * rr[i][k];
817 ss[j][k] += -y * ss[i][k];
830 for (
G4int i = 0 ; i < 3 ; i++ )
834 for (
G4int j = 0 ; j < 3 ; j++ )
836 opl[i] += ss[i][j]*rll[j];
846 p_i += ri.
cross(opl_v);
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
double diff2(const Hep3Vector &v) const
Hep3Vector cross(const Hep3Vector &) const
static G4Neutron * Neutron()
static G4double GetBindingEnergy(const G4int A, const G4int Z)
static G4Pow * GetInstance()
G4double A13(G4double A) const
G4double powA(G4double A, G4double y) const
static G4Proton * Proton()
G4QMDGroundStateNucleus()
G4double GetTotalPotential()
G4double GetRHE(G4int i, G4int j)
void Cal2BodyQuantities()
G4ThreeVector GetFFr(G4int i)
G4double GetRHA(G4int i, G4int j)
void SetSystem(G4QMDSystem *aSystem)
G4double GetRR2(G4int i, G4int j)
G4ThreeVector GetFFp(G4int i)
static G4QMDParameters * GetInstance()
std::vector< G4QMDParticipant * > participants
void SetParticipant(G4QMDParticipant *particle)