74 for (
int i = 0 ; i <
a ; i++ )
98 radm = radious - rada * ( gamm - 1.0 ) + radb;
99 rmax = 1.0 / ( 1.0 + std::exp ( -rt00/saa ) );
104 if ( z == 1 && a == 1 ) {
108 else if ( z == 0 && a == 1 ) {
127 void G4QMDGroundStateNucleus::packNucleons()
141 ebin0 = ( ebini - 0.5 ) * 0.001;
142 ebin1 = ( ebini + 0.5 ) * 0.001;
146 ebin0 = ( ebini - 1.5 ) * 0.001;
147 ebin1 = ( ebini + 1.5 ) * 0.001;
153 while ( n0Try < maxTrial )
162 G4bool areThesePsOK =
false;
164 while ( npTry < maxTrial )
169 if ( samplingPosition( i ) )
175 if ( !( samplingPosition( i ) ) )
189 if ( areThesePsOK ==
false )
continue;
208 rho_a[ i ] += meanfield->
GetRHA( j , i );
215 rho_s[ i ] += meanfield->
GetRHA( j , i )*( 1.0 - 2.0 * k );
217 rho_c[ i ] += meanfield->
GetRHE( j , i );
224 rho_l[i] = cdp * ( rho_a[i] + 1.0 );
225 d_pot[i] = c0p * rho_a[i]
226 + c3p * std::pow ( rho_a[i] , gamm )
242 G4bool isThis1stMOK =
false;
244 while ( nmTry < maxTrial )
248 if ( samplingMomentum( i ) )
254 if ( isThis1stMOK ==
false )
continue;
258 G4bool areTheseMsOK =
true;
260 while ( nmTry < maxTrial )
267 if ( !( samplingMomentum( i ) ) )
270 areTheseMsOK =
false;
281 if ( areTheseMsOK ==
false )
continue;
287 killCMMotionAndAngularM();
309 if ( ebinal < ebin0 || ebinal > ebin1 )
343 G4bool isThisEAOK =
false;
344 while ( neaTry < maxTrial )
351 if ( std::abs ( edif ) < epse )
375 if ( jfrc == ifrc && std::abs( edif0 ) < std::abs( edif ) )
391 ri += dtc * ( meanfield->
GetFFr(i) - cfrc * ( meanfield->
GetFFp(i) ) );
392 p_i += dtc * ( meanfield->
GetFFp(i) + cfrc * ( meanfield->
GetFFr(i) ) );
408 ebinal = ( totalPotentialE + ekinal ) /
double (
GetMassNumber() );
412 if ( isThisEAOK ==
false )
continue;
420 if ( isThisOK ==
false )
422 G4cout <<
"GroundStateNucleus state cannot be created. Try again with another parameters." <<
G4endl;
439 while ( n0Try < maxTrial )
441 if ( samplingPosition( 0 ) )
446 if ( !( samplingPosition( i ) ) )
456 if ( n0Try > maxTrial )
458 G4cout <<
"GroundStateNucleus state cannot be created. Try again with another parameters." <<
G4endl;
475 rho_a[ i ] += meanfield->
GetRHA( j , i );
482 rho_s[ i ] += meanfield->
GetRHA( j , i )*( 1.0 - 2.0 * k );
484 rho_c[ i ] += meanfield->
GetRHE( j , i );
490 rho_l[i] = cdp * ( rho_a[i] + 1.0 );
491 d_pot[i] = c0p * rho_a[i]
492 + c3p * std::pow ( rho_a[i] , gamm )
507 samplingMomentum( 0 );
512 while ( n1Try < maxTrial )
514 if ( samplingPosition( 0 ) )
520 if ( !( samplingMomentum( i ) ) )
526 if ( isThisOK ==
true )
break;
532 if ( n1Try > maxTrial )
534 G4cout <<
"GroundStateNucleus state cannot be created. Try again with another parameters." <<
G4endl;
541 killCMMotionAndAngularM();
555 if ( ebinal < ebin0 || ebinal > ebin1 )
584 while ( ntryACH < maxTrial )
588 if ( std::abs ( edif ) < epse )
610 if ( jfrc == ifrc && std::abs( edif0 ) < std::abs( edif ) )
626 ri += dtc * ( meanfield->
GetFFr(i) - cfrc * ( meanfield->
GetFFp(i) ) );
627 p_i += dtc * ( meanfield->
GetFFp(i) + cfrc * ( meanfield->
GetFFr(i) ) );
643 ebinal = ( totalPotentialE + ekinal ) /
double (
GetMassNumber() );
657 G4bool G4QMDGroundStateNucleus::samplingPosition(
G4int i )
664 while ( nTry < maxTrial )
685 rsqr = rx*rx + ry*ry + rz*rz;
687 rrr = radm * std::sqrt ( rsqr );
688 rwod = 1.0 / ( 1.0 + std::exp ( ( rrr - rt00 ) / saa ) );
704 for (
G4int j = 0 ; j < i ; j++ )
728 if ( isThisOK ==
true )
744 G4bool G4QMDGroundStateNucleus::samplingMomentum(
G4int i )
751 G4double pfm = hbc * std::pow ( ( 3.0 / 2.0 *
pi*
pi * rho_l[i] ) , 1./3. );
755 pfm = pfm * ( 1.0 + 0.2 * std::sqrt( std::abs( 8.0 + ebini ) / 8.0 ) );
760 std::vector< G4double > phase;
765 while ( ntry < maxTrial )
775 while ( ke + d_pot [i] > edepth )
789 psqr = px*px + py*py + pz*pz;
801 if ( tkdb_i > maxTrial )
return result;
822 for (
G4int j = 0 ; j < i ; j++ )
830 expa = - meanfield->
GetRR2(i,j) * cpw;
838 dist2_p = dist2_p*cph;
839 expa = expa - dist2_p;
844 phase[j] = std::exp ( expa );
846 if ( phase[j] * cpc > 0.2 )
856 if ( ( phase_g[j] + phase[j] ) * cpc > 0.5 )
868 phase[i] += phase[j];
869 if ( phase[i] * cpc > 0.3 )
902 if ( isThisOK ==
true )
905 phase_g[i] = phase[i];
907 for (
int j = 0 ; j < i ; j++ )
909 phase_g[j] += phase[j];
924 void G4QMDGroundStateNucleus::killCMMotionAndAngularM()
946 rcm_tmp = rcm_tmp/sumMass;
964 for (
G4int i = 0 ; i < 3 ; i++ )
966 for (
G4int j = 0 ; j < 3 ; j++ )
984 rr[0][0] += r.
y() * r.
y() + r.
z() * r.
z();
985 rr[1][0] += - r.
y() * r.
x();
986 rr[2][0] += - r.
z() * r.
x();
987 rr[0][1] += - r.
x() * r.
y();
988 rr[1][1] += r.
z() * r.
z() + r.
x() * r.
x();
989 rr[2][1] += - r.
z() * r.
y();
990 rr[2][0] += - r.
x() * r.
z();
991 rr[2][1] += - r.
y() * r.
z();
992 rr[2][2] += r.
x() * r.
x() + r.
y() * r.
y();
995 for (
G4int i = 0 ; i < 3 ; i++ )
998 for (
G4int j = 0 ; j < 3 ; j++ )
1000 rr[i][j] = rr[i][j] /
x;
1001 ss[i][j] = ss[i][j] /
x;
1003 for (
G4int j = 0 ; j < 3 ; j++ )
1008 for (
G4int k = 0 ; k < 3 ; k++ )
1010 rr[j][k] += -y * rr[i][k];
1011 ss[j][k] += -y * ss[i][k];
1024 for (
G4int i = 0 ; i < 3 ; i++ )
1028 for (
G4int j = 0 ; j < 3 ; j++ )
1030 opl[i] += ss[i][j]*rll[j];
1040 p_i += ri.
cross(opl_v);
G4double GetRHA(G4int i, G4int j)
void SetParticipant(G4QMDParticipant *particle)
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector GetFFr(G4int i)
G4double G4NeutronHPJENDLHEData::G4double result
void Cal2BodyQuantities()
double diff2(const Hep3Vector &v) const
G4GLOB_DLL std::ostream G4cout
static G4QMDParameters * GetInstance()
static G4Proton * Proton()
static G4Neutron * Neutron()
G4double GetTotalPotential()
std::vector< G4QMDParticipant * > participants
G4double GetRHE(G4int i, G4int j)
static G4double GetBindingEnergy(const G4int A, const G4int Z)
G4double GetRR2(G4int i, G4int j)
void SetSystem(G4QMDSystem *aSystem)
G4ThreeVector GetFFp(G4int i)
Hep3Vector cross(const Hep3Vector &) const
G4QMDGroundStateNucleus()