77 if ( z == 1 && a == 1 ) {
82 else if ( z == 0 && a == 1 ) {
91 for (
int i = 0 ; i < a ; i++ )
114 rt00 = radious - r01;
115 radm = radious - rada * ( gamm - 1.0 ) + radb;
116 rmax = 1.0 / ( 1.0 +
G4Exp ( -rt00/saa ) );
134void G4QMDGroundStateNucleus::packNucleons()
148 ebin0 = ( ebini - 0.5 ) * 0.001;
149 ebin1 = ( ebini + 0.5 ) * 0.001;
153 ebin0 = ( ebini - 1.5 ) * 0.001;
154 ebin1 = ( ebini + 1.5 ) * 0.001;
159 while ( n0Try < maxTrial )
168 G4bool areThesePsOK =
false;
170 while ( npTry < maxTrial )
175 if ( samplingPosition( i ) )
181 if ( !( samplingPosition( i ) ) )
195 if ( areThesePsOK ==
false )
continue;
214 rho_a[ i ] += meanfield->
GetRHA( j , i );
221 rho_s[ i ] += meanfield->
GetRHA( j , i )*( 1.0 - 2.0 * k );
223 rho_c[ i ] += meanfield->
GetRHE( j , i );
230 rho_l[i] = cdp * ( rho_a[i] + 1.0 );
231 d_pot[i] = c0p * rho_a[i]
248 G4bool isThis1stMOK =
false;
250 while ( nmTry < maxTrial )
254 if ( samplingMomentum( i ) )
260 if ( isThis1stMOK ==
false )
continue;
264 G4bool areTheseMsOK =
true;
266 while ( nmTry < maxTrial )
273 if ( !( samplingMomentum( i ) ) )
276 areTheseMsOK =
false;
287 if ( areTheseMsOK ==
false )
continue;
293 killCMMotionAndAngularM();
315 if ( ebinal < ebin0 || ebinal > ebin1 )
349 G4bool isThisEAOK =
false;
350 while ( neaTry < maxTrial )
357 if ( std::abs ( edif ) < epse )
381 if ( jfrc == ifrc && std::abs( edif0 ) < std::abs( edif ) )
397 ri += dtc * ( meanfield->
GetFFr(i) - cfrc * ( meanfield->
GetFFp(i) ) );
398 p_i += dtc * ( meanfield->
GetFFp(i) + cfrc * ( meanfield->
GetFFr(i) ) );
414 ebinal = ( totalPotentialE + ekinal ) /
double (
GetMassNumber() );
418 if ( isThisEAOK ==
false )
continue;
426 if ( isThisOK ==
false )
428 G4cout <<
"GroundStateNucleus state cannot be created. Try again with another parameters." <<
G4endl;
436G4bool G4QMDGroundStateNucleus::samplingPosition(
G4int i )
443 while ( nTry < maxTrial )
456 G4int icounter_max = 1024;
460 if ( icounter > icounter_max ) {
461 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
467 G4int jcounter_max = 1024;
471 if ( jcounter > jcounter_max ) {
472 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
478 rsqr = rx*rx + ry*ry + rz*rz;
480 rrr = radm * std::sqrt ( rsqr );
481 rwod = 1.0 / ( 1.0 +
G4Exp ( ( rrr - rt00 ) / saa ) );
497 for (
G4int j = 0 ; j < i ; j++ )
521 if ( isThisOK ==
true )
537G4bool G4QMDGroundStateNucleus::samplingMomentum(
G4int i )
548 pfm = pfm * ( 1.0 + 0.2 * std::sqrt( std::abs( 8.0 + ebini ) / 8.0 ) );
553 std::vector< G4double > phase;
558 while ( ntry < maxTrial )
569 G4int icounter_max = 1024;
570 while ( ke + d_pot [i] > edepth )
573 if ( icounter > icounter_max ) {
574 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
584 G4int jcounter_max = 1024;
588 if ( jcounter > jcounter_max ) {
589 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
596 psqr = px*px + py*py + pz*pz;
608 if ( tkdb_i > maxTrial )
return result;
629 for (
G4int j = 0 ; j < i ; j++ )
637 expa = - meanfield->
GetRR2(i,j) * cpw;
645 dist2_p = dist2_p*cph;
646 expa = expa - dist2_p;
651 phase[j] =
G4Exp ( expa );
653 if ( phase[j] * cpc > 0.2 )
663 if ( ( phase_g[j] + phase[j] ) * cpc > 0.5 )
675 phase[i] += phase[j];
676 if ( phase[i] * cpc > 0.3 )
709 if ( isThisOK ==
true )
712 phase_g[i] = phase[i];
714 for (
int j = 0 ; j < i ; j++ )
716 phase_g[j] += phase[j];
731void G4QMDGroundStateNucleus::killCMMotionAndAngularM()
753 rcm_tmp = rcm_tmp/sumMass;
771 for (
G4int i = 0 ; i < 3 ; i++ )
773 for (
G4int j = 0 ; j < 3 ; j++ )
791 rr[0][0] += r.
y() * r.
y() + r.
z() * r.
z();
792 rr[1][0] += - r.
y() * r.
x();
793 rr[2][0] += - r.
z() * r.
x();
794 rr[0][1] += - r.
x() * r.
y();
795 rr[1][1] += r.
z() * r.
z() + r.
x() * r.
x();
796 rr[2][1] += - r.
z() * r.
y();
797 rr[2][0] += - r.
x() * r.
z();
798 rr[2][1] += - r.
y() * r.
z();
799 rr[2][2] += r.
x() * r.
x() + r.
y() * r.
y();
802 for (
G4int i = 0 ; i < 3 ; i++ )
805 for (
G4int j = 0 ; j < 3 ; j++ )
807 rr[i][j] = rr[i][j] / x;
808 ss[i][j] = ss[i][j] / x;
810 for (
G4int j = 0 ; j < 3 ; j++ )
815 for (
G4int k = 0 ; k < 3 ; k++ )
817 rr[j][k] += -y * rr[i][k];
818 ss[j][k] += -y * ss[i][k];
831 for (
G4int i = 0 ; i < 3 ; i++ )
835 for (
G4int j = 0 ; j < 3 ; j++ )
837 opl[i] += ss[i][j]*rll[j];
847 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)