51 if ( z == 1 && a == 1 )
56 else if ( z == 0 && a == 1 )
82 for (
int i = 0 ; i <
a ; i++ )
105 rt00 = radious - r01;
106 radm = radious - rada * ( gamm - 1.0 ) + radb;
107 rmax = 1.0 / ( 1.0 + std::exp ( -rt00/saa ) );
123 void G4QMDGroundStateNucleus::packNucleons()
137 ebin0 = ( ebini - 0.5 ) * 0.001;
138 ebin1 = ( ebini + 0.5 ) * 0.001;
142 ebin0 = ( ebini - 1.5 ) * 0.001;
143 ebin1 = ( ebini + 1.5 ) * 0.001;
149 while ( n0Try < maxTrial )
158 G4bool areThesePsOK =
false;
160 while ( npTry < maxTrial )
165 if ( samplingPosition( i ) )
171 if ( !( samplingPosition( i ) ) )
185 if ( areThesePsOK ==
false )
continue;
204 rho_a[ i ] += meanfield->
GetRHA( j , i );
211 rho_s[ i ] += meanfield->
GetRHA( j , i )*( 1.0 - 2.0 * k );
213 rho_c[ i ] += meanfield->
GetRHE( j , i );
220 rho_l[i] = cdp * ( rho_a[i] + 1.0 );
221 d_pot[i] = c0p * rho_a[i]
222 + c3p * std::pow ( rho_a[i] , gamm )
238 G4bool isThis1stMOK =
false;
240 while ( nmTry < maxTrial )
244 if ( samplingMomentum( i ) )
250 if ( isThis1stMOK ==
false )
continue;
254 G4bool areTheseMsOK =
true;
256 while ( nmTry < maxTrial )
263 if ( !( samplingMomentum( i ) ) )
266 areTheseMsOK =
false;
277 if ( areTheseMsOK ==
false )
continue;
283 killCMMotionAndAngularM();
305 if ( ebinal < ebin0 || ebinal > ebin1 )
339 G4bool isThisEAOK =
false;
340 while ( neaTry < maxTrial )
347 if ( std::abs ( edif ) < epse )
371 if ( jfrc == ifrc && std::abs( edif0 ) < std::abs( edif ) )
387 ri += dtc * ( meanfield->
GetFFr(i) - cfrc * ( meanfield->
GetFFp(i) ) );
388 p_i += dtc * ( meanfield->
GetFFp(i) + cfrc * ( meanfield->
GetFFr(i) ) );
404 ebinal = ( totalPotentialE + ekinal ) /
double (
GetMassNumber() );
408 if ( isThisEAOK ==
false )
continue;
416 if ( isThisOK ==
false )
418 std::cout <<
"GroundStateNucleus state cannot be created. Try again with another parameters." << std::endl;
435 while ( n0Try < maxTrial )
437 if ( samplingPosition( 0 ) )
442 if ( !( samplingPosition( i ) ) )
452 if ( n0Try > maxTrial )
454 std::cout <<
"GroundStateNucleus state cannot be created. Try again with another parameters." << std::endl;
471 rho_a[ i ] += meanfield->
GetRHA( j , i );
478 rho_s[ i ] += meanfield->
GetRHA( j , i )*( 1.0 - 2.0 * k );
480 rho_c[ i ] += meanfield->
GetRHE( j , i );
486 rho_l[i] = cdp * ( rho_a[i] + 1.0 );
487 d_pot[i] = c0p * rho_a[i]
488 + c3p * std::pow ( rho_a[i] , gamm )
503 samplingMomentum( 0 );
508 while ( n1Try < maxTrial )
510 if ( samplingPosition( 0 ) )
516 if ( !( samplingMomentum( i ) ) )
522 if ( isThisOK ==
true )
break;
528 if ( n1Try > maxTrial )
530 std::cout <<
"GroundStateNucleus state cannot be created. Try again with another parameters." << std::endl;
537 killCMMotionAndAngularM();
551 if ( ebinal < ebin0 || ebinal > ebin1 )
580 while ( ntryACH < maxTrial )
584 if ( std::abs ( edif ) < epse )
606 if ( jfrc == ifrc && std::abs( edif0 ) < std::abs( edif ) )
622 ri += dtc * ( meanfield->
GetFFr(i) - cfrc * ( meanfield->
GetFFp(i) ) );
623 p_i += dtc * ( meanfield->
GetFFp(i) + cfrc * ( meanfield->
GetFFr(i) ) );
639 ebinal = ( totalPotentialE + ekinal ) /
double (
GetMassNumber() );
653 G4bool G4QMDGroundStateNucleus::samplingPosition(
G4int i )
660 while ( nTry < maxTrial )
681 rsqr = rx*rx + ry*ry + rz*rz;
683 rrr = radm * std::sqrt ( rsqr );
684 rwod = 1.0 / ( 1.0 + std::exp ( ( rrr - rt00 ) / saa ) );
700 for (
G4int j = 0 ; j < i ; j++ )
724 if ( isThisOK ==
true )
740 G4bool G4QMDGroundStateNucleus::samplingMomentum(
G4int i )
747 G4double pfm = hbc * std::pow ( ( 3.0 / 2.0 *
pi*
pi * rho_l[i] ) , 1./3. );
751 pfm = pfm * ( 1.0 + 0.2 * std::sqrt( std::abs( 8.0 + ebini ) / 8.0 ) );
756 std::vector< G4double > phase;
761 while ( ntry < maxTrial )
771 while ( ke + d_pot [i] > edepth )
785 psqr = px*px + py*py + pz*pz;
797 if ( tkdb_i > maxTrial )
return result;
818 for (
G4int j = 0 ; j < i ; j++ )
826 expa = - meanfield->
GetRR2(i,j) * cpw;
834 dist2_p = dist2_p*cph;
835 expa = expa - dist2_p;
840 phase[j] = std::exp ( expa );
842 if ( phase[j] * cpc > 0.2 )
852 if ( ( phase_g[j] + phase[j] ) * cpc > 0.5 )
864 phase[i] += phase[j];
865 if ( phase[i] * cpc > 0.3 )
898 if ( isThisOK ==
true )
901 phase_g[i] = phase[i];
903 for (
int j = 0 ; j < i ; j++ )
905 phase_g[j] += phase[j];
920 void G4QMDGroundStateNucleus::killCMMotionAndAngularM()
942 rcm_tmp = rcm_tmp/sumMass;
960 for (
G4int i = 0 ; i < 3 ; i++ )
962 for (
G4int j = 0 ; j < 3 ; j++ )
980 rr[0][0] += r.
y() * r.
y() + r.
z() * r.
z();
981 rr[1][0] += - r.
y() * r.
x();
982 rr[2][0] += - r.
z() * r.
x();
983 rr[0][1] += - r.
x() * r.
y();
984 rr[1][1] += r.
z() * r.
z() + r.
x() * r.
x();
985 rr[2][1] += - r.
z() * r.
y();
986 rr[2][0] += - r.
x() * r.
z();
987 rr[2][1] += - r.
y() * r.
z();
988 rr[2][2] += r.
x() * r.
x() + r.
y() * r.
y();
991 for (
G4int i = 0 ; i < 3 ; i++ )
994 for (
G4int j = 0 ; j < 3 ; j++ )
996 rr[i][j] = rr[i][j] /
x;
997 ss[i][j] = ss[i][j] /
x;
999 for (
G4int j = 0 ; j < 3 ; j++ )
1004 for (
G4int k = 0 ; k < 3 ; k++ )
1006 rr[j][k] += -y * rr[i][k];
1007 ss[j][k] += -y * ss[i][k];
1020 for (
G4int i = 0 ; i < 3 ; i++ )
1024 for (
G4int j = 0 ; j < 3 ; j++ )
1026 opl[i] += ss[i][j]*rll[j];
1036 p_i += ri.
cross(opl_v);