65 for (
int i = 0 ; i < nSecondaries ; i++ )
103 if( std::getenv(
"G4ParticleHPDebug"))
G4cout <<
"G4ParticleHPFinalState::adjust_final_stat BaseZ " << baseZNew <<
" BaseA " << baseANew <<
" sum_Z " << sum_Z <<
" sum_A " << sum_A <<
G4endl;
106 G4bool needOneMoreSec =
false;
108 if ( (
int)(baseZNew - sum_Z) == 0 && (
int)(baseANew - sum_A) == 0 )
115 if ( max_SecA >=
int(baseANew - sum_A) )
119 needOneMoreSec =
true;
127 if ( needOneMoreSec )
129 if (
int(baseZNew - sum_Z) == 0 && (
int)(baseANew - sum_A) > 0 )
132 if (
int(baseANew - sum_A) > 1 )
G4cout <<
"More than one neutron is required for the balance of baryon number!" <<
G4endl;
138 if( std::getenv(
"G4ParticleHPDebug"))
G4cout <<
this <<
"G4ParticleHPFinalState oneMoreSec_pd Z " << baseZNew <<
" - " << sum_Z <<
" A " << baseANew <<
" - " << sum_A <<
" projectile " <<
theProjectile->
GetParticleName() <<
G4endl;
141 if( !oneMoreSec_pd ) {
143 G4Exception(
"G4ParticleHPFinalState:adjust_final_state",
146 "No adjustment will be done!");
176 if ( (
int)(ndlZNew - sum_Z) == 0 && (
int)(ndlANew - sum_A) == 0 )
183 G4Exception(
"G4ParticleHPFinalState:adjust_final_state",
186 "No adjustment will be done!");
190 for (
int i = 0 ; i < nSecondaries ; i++ )
215 for (
G4int i = 0 ; i < n_sec ; i++ )
238 if ( slow > beta && beta != 0 )
282 if ( slow > p4.
beta() )
287 dif_4p = init_4p_lab - ( secs_4p_lab + p4 );
290 if ( needOneMoreSec && oneMoreSec_pd)
302 if ( slow > p4.
beta() )
305 islow = nSecondaries-1;
307 dif_4p = init_4p_lab - ( secs_4p_lab + p4 );
317 if ( minimum_energy < dif_4p.
v().
mag() && dif_4p.
v().
mag() < 1*
MeV )
345 G4double dif_e = dif_4p.
e() - ( dif_4p.
v() ).mag();
356 if ( minimum_energy < e1 )
361 std::sin(std::acos(costh))*std::sin(phi),
382 if ( ke0 + dif_e > 0 )