82 if ( z == 1 && a == 1 ) {
87 else if ( z == 0 && a == 1 ) {
96 for (
int i = 0 ; i < a ; i++ )
119 rt00 = radious - r01;
121 rmax = 1.0 / ( 1.0 +
G4Exp ( -rt00/saa ) );
139void G4LightIonQMDGroundStateNucleus::packNucleons()
153 ebin0 = ( ebini - 0.5 ) * 0.001;
154 ebin1 = ( ebini + 0.5 ) * 0.001;
158 ebin0 = ( ebini - 1.5 ) * 0.001;
159 ebin1 = ( ebini + 1.5 ) * 0.001;
168 while ( n0Try < maxTrial )
177 G4bool areThesePsOK =
false;
179 while ( npTry < maxTrial )
182 if( (Nucle_Z == 6 && Nucle_A == 12) || (Nucle_Z == 8 && Nucle_A == 16))
187 if ( samplingPosition_cluster( Nucle_Z ) )
218 if ( samplingPosition( i ) )
224 if ( !( samplingPosition( i ) ) )
239 if ( areThesePsOK ==
false )
continue;
258 rho_a[ i ] += meanfield->
GetRHA( j , i );
265 rho_s[ i ] += meanfield->
GetRHA( j , i )*( 1.0 - 2.0 * k );
267 rho_c[ i ] += meanfield->
GetRHE( j , i );
274 rho_l[i] = cdp * ( rho_a[i] + 1.0 );
275 d_pot[i] = c0p * rho_a[i]
292 G4bool isThis1stMOK =
false;
294 while ( nmTry < maxTrial )
298 if ( samplingMomentum( i ) )
304 if ( isThis1stMOK ==
false )
continue;
308 G4bool areTheseMsOK =
true;
310 while ( nmTry < maxTrial )
317 if ( !( samplingMomentum( i ) ) )
320 areTheseMsOK =
false;
331 if ( areTheseMsOK ==
false )
continue;
337 killCMMotionAndAngularM();
367 if ( ebinal < ebin0 || ebinal > ebin1 )
401 G4bool isThisEAOK =
false;
402 while ( neaTry < maxTrial )
409 if ( std::abs ( edif ) < epse )
433 if ( jfrc == ifrc && std::abs( edif0 ) < std::abs( edif ) )
449 ri += dtc * ( meanfield->
GetFFr(i) - cfrc * ( meanfield->
GetFFp(i) ) );
450 p_i += dtc * ( meanfield->
GetFFp(i) + cfrc * ( meanfield->
GetFFr(i) ) );
480 if ( isThisEAOK ==
false )
continue;
489 if ( isThisOK ==
false )
491 G4cout <<
"GroundStateNucleus state cannot be created. Try again with another parameters." <<
G4endl;
499G4bool G4LightIonQMDGroundStateNucleus::samplingPosition(
G4int i )
506 while ( nTry < maxTrial )
519 G4int icounter_max = 1024;
523 if ( icounter > icounter_max ) {
524 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
530 G4int jcounter_max = 1024;
534 if ( jcounter > jcounter_max ) {
535 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
541 rsqr = rx*rx + ry*ry + rz*rz;
543 rrr = radm * std::sqrt ( rsqr );
544 rwod = 1.0 / ( 1.0 +
G4Exp ( ( rrr - rt00 ) / saa ) );
560 for (
G4int j = 0 ; j < i ; j++ )
584 if ( isThisOK ==
true )
600G4bool G4LightIonQMDGroundStateNucleus::samplingMomentum(
G4int i )
611 pfm = pfm * ( 1.0 + 0.2 * std::sqrt( std::abs( 8.0 + ebini ) / 8.0 ) );
616 std::vector< G4double > phase;
621 while ( ntry < maxTrial )
649 G4int jcounter_max = 1024;
653 if ( jcounter > jcounter_max ) {
654 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
661 psqr = px*px + py*py + pz*pz;
673 if ( tkdb_i > maxTrial )
return result;
694 for (
G4int j = 0 ; j < i ; j++ )
702 expa = - meanfield->
GetRR2(i,j) * cpw;
710 dist2_p = dist2_p*cph;
711 expa = expa - dist2_p;
716 phase[j] =
G4Exp ( expa );
718 if ( phase[j] * cpc > 0.2 )
728 if ( ( phase_g[j] + phase[j] ) * cpc > 0.5 )
740 phase[i] += phase[j];
741 if ( phase[i] * cpc > 0.3 )
774 if ( isThisOK ==
true )
777 phase_g[i] = phase[i];
779 for (
int j = 0 ; j < i ; j++ )
781 phase_g[j] += phase[j];
796void G4LightIonQMDGroundStateNucleus::killCMMotionAndAngularM()
818 rcm_tmp = rcm_tmp/sumMass;
836 for (
G4int i = 0 ; i < 3 ; i++ )
838 for (
G4int j = 0 ; j < 3 ; j++ )
856 rr[0][0] += r.
y() * r.
y() + r.
z() * r.
z();
857 rr[1][0] += - r.
y() * r.
x();
858 rr[2][0] += - r.
z() * r.
x();
859 rr[0][1] += - r.
x() * r.
y();
860 rr[1][1] += r.
z() * r.
z() + r.
x() * r.
x();
861 rr[2][1] += - r.
z() * r.
y();
862 rr[2][0] += - r.
x() * r.
z();
863 rr[2][1] += - r.
y() * r.
z();
864 rr[2][2] += r.
x() * r.
x() + r.
y() * r.
y();
867 for (
G4int i = 0 ; i < 3 ; i++ )
870 for (
G4int j = 0 ; j < 3 ; j++ )
872 rr[i][j] = rr[i][j] / x;
873 ss[i][j] = ss[i][j] / x;
875 for (
G4int j = 0 ; j < 3 ; j++ )
880 for (
G4int k = 0 ; k < 3 ; k++ )
882 rr[j][k] += -y * rr[i][k];
883 ss[j][k] += -y * ss[i][k];
896 for (
G4int i = 0 ; i < 3 ; i++ )
900 for (
G4int j = 0 ; j < 3 ; j++ )
902 opl[i] += ss[i][j]*rll[j];
912 p_i += ri.
cross(opl_v);
919G4bool G4LightIonQMDGroundStateNucleus::samplingPosition_cluster(
G4int z )
921 std::vector < G4ThreeVector > base_x;
925 base_x[0] =
G4ThreeVector( 1.0 , 1.0 , 1.0 )/std::sqrt( 3.0 );
926 base_x[1] =
G4ThreeVector( -1.0 , -1.0 , 1.0 )/std::sqrt( 3.0 );
927 base_x[2] =
G4ThreeVector( 1.0 , -1.0 , -1.0 )/std::sqrt( 3.0 );
928 base_x[3] =
G4ThreeVector( -1.0 , 1.0 , -1.0 )/std::sqrt( 3.0 );
942 std::vector < G4ThreeVector > sub_x;
947 sub_x[1] =
G4ThreeVector( -0.5/std::sqrt( 3.0 ) , 0.5 , 0.0 );
948 sub_x[2] =
G4ThreeVector( -0.5/std::sqrt( 3.0 ) , -0.5 , 0.0 );
952 for (
G4int j = 0 ; j < 3 ; j++ )
954 G4double xx = (sca*scb*scg-ssa*ssg)*sub_x[j].x() + (-sca*scb*ssg-ssa*scg)*sub_x[j].y() + sca*ssb*sub_x[j].z();
955 G4double yy = (ssa*scb*scg+sca*ssg)*sub_x[j].x() + (-ssa*scb*ssg+sca*scg)*sub_x[j].y() + ssa*ssb*sub_x[j].z();
956 G4double zz = (-ssb*scg)*sub_x[j].x() + (ssb*ssg)*sub_x[j].y() + scb*sub_x[j].z();
969 for (
G4int i = 0 ; i < 4 ; i++ )
971 xx = (ca*cb*cg-sa*sg)*base_x[i].x() + (-ca*cb*sg-sa*cg)*base_x[i].y() + ca*sb*base_x[i].z();
972 yy = (sa*cb*cg+ca*sg)*base_x[i].x() + (-sa*cb*sg+ca*cg)*base_x[i].y() + sa*sb*base_x[i].z();
973 zz = (-sb*cg)*base_x[i].x() + (sb*sg)*base_x[i].y() + cb*base_x[i].z();
985 std::vector < G4ThreeVector > sub_x;
989 sub_x[0] =
G4ThreeVector( 1.0 , 1.0 , 1.0 )/std::sqrt( 3.0 );
990 sub_x[1] =
G4ThreeVector( -1.0 , -1.0 , 1.0 )/std::sqrt( 3.0 );
991 sub_x[2] =
G4ThreeVector( 1.0 , -1.0 , -1.0 )/std::sqrt( 3.0 );
992 sub_x[3] =
G4ThreeVector( -1.0 , 1.0 , -1.0 )/std::sqrt( 3.0 );
996 for (
G4int j = 0 ; j < 4 ; j++ )
998 G4double xx = (sca*scb*scg-ssa*ssg)*sub_x[j].x() + (-sca*scb*ssg-ssa*scg)*sub_x[j].y() + sca*ssb*sub_x[j].z();
999 G4double yy = (ssa*scb*scg+sca*ssg)*sub_x[j].x() + (-ssa*scb*ssg+sca*scg)*sub_x[j].y() + ssa*ssb*sub_x[j].z();
1000 G4double zz = (-ssb*scg)*sub_x[j].x() + (ssb*ssg)*sub_x[j].y() + scb*sub_x[j].z();
1013 for (
G4int i = 0 ; i < 4 ; i++ )
1016 xx = (ca*cb*cg-sa*sg)*base_x[i].x() + (-ca*cb*sg-sa*cg)*base_x[i].y() + ca*sb*base_x[i].z();
1017 yy = (sa*cb*cg+ca*sg)*base_x[i].x() + (-sa*cb*sg+ca*cg)*base_x[i].y() + sa*sb*base_x[i].z();
1018 zz = (-sb*cg)*base_x[i].x() + (sb*sg)*base_x[i].y() + cb*base_x[i].z();
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
G4LightIonQMDGroundStateNucleus()
G4double GetRHE(G4int i, G4int j)
void Cal2BodyQuantities()
G4ThreeVector GetFFr(G4int i)
G4double GetTotalEnergy()
void SetSystem(G4QMDSystem *aSystem)
G4ThreeVector GetFFp(G4int i)
G4double GetRHA(G4int i, G4int j)
G4double GetRR2(G4int i, G4int j)
static G4LightIonQMDParameters * GetInstance()
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()
std::vector< G4QMDParticipant * > participants
void SetParticipant(G4QMDParticipant *particle)