61 for (
G4int i = 0 ; i < nSecondaries ; ++i )
98 if( std::getenv(
"G4ParticleHPDebug"))
G4cout <<
"G4ParticleHPFinalState::adjust_final_stat BaseZ " << baseZNew <<
" BaseA " << baseANew <<
" sum_Z " << sum_Z <<
" sum_A " << sum_A <<
G4endl;
101 G4bool needOneMoreSec =
false;
103 if ( (
G4int)(baseZNew - sum_Z) == 0 && (
G4int)(baseANew - sum_A) == 0 )
110 if ( max_SecA >=
G4int(baseANew - sum_A) )
114 needOneMoreSec =
true;
120 G4int(baseANew - sum_A) , 0.0 );
123 if ( needOneMoreSec )
125 if (
G4int(baseZNew - sum_Z) == 0 &&
G4int(baseANew - sum_A) > 0 )
128 if (
G4int(baseANew - sum_A) > 1 )
129 G4cout <<
"More than one neutron is required for the balance of baryon number!"
136 if( std::getenv(
"G4ParticleHPDebug"))
G4cout <<
this <<
"G4ParticleHPFinalState oneMoreSec_pd Z " << baseZNew <<
" - " << sum_Z <<
" A " << baseANew <<
" - " << sum_A <<
" projectile " <<
theProjectile->
GetParticleName() <<
G4endl;
139 G4int(baseANew - sum_A) , 0.0 );
140 if( !oneMoreSec_pd ) {
142 G4Exception(
"G4ParticleHPFinalState:adjust_final_state",
145 "No adjustment will be done!");
175 if (
G4int(ndlZNew - sum_Z) == 0 &&
G4int(ndlANew - sum_A) == 0 )
182 G4Exception(
"G4ParticleHPFinalState:adjust_final_state",
185 "No adjustment will be done!");
189 for (
G4int i = 0 ; i < nSecondaries ; ++i )
213 for (
G4int i = 0 ; i < n_sec ; ++i )
229 if ( slow > beta && beta != 0 )
268 if ( slow > p4.
beta() )
273 dif_4p = init_4p_lab - ( secs_4p_lab + p4 );
276 if ( needOneMoreSec && oneMoreSec_pd)
288 if ( slow > p4.
beta() )
291 islow = nSecondaries-1;
293 dif_4p = init_4p_lab - ( secs_4p_lab + p4 );
298 if ( dif_4p.
v().
mag() < std::abs( dif_4p.
e() ) )
301 if ( minimum_energy < dif_4p.
v().
mag() && dif_4p.
v().
mag() < 1*MeV )
320 G4double dif_e = dif_4p.
e() - ( dif_4p.
v() ).mag();
330 if ( minimum_energy < e1 )
335 std::sin(std::acos(costh))*std::sin(phi),
348 if ( ke0 + dif_e > 0 )
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
static G4Deuteron * Deuteron()
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
G4double GetKineticEnergy() const
void SetMomentum(const G4ThreeVector &momentum)
G4ThreeVector GetMomentum() const
void SetKineticEnergy(G4double aEnergy)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
std::size_t GetNumberOfSecondaries() const
G4HadSecondary * GetSecondary(size_t i)
G4DynamicParticle * GetParticle()
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4IonTable * GetIonTable()
static G4Neutron * Neutron()
G4int GetAtomicNumber() const
G4double GetPDGMass() const
G4int GetAtomicMass() const
const G4String & GetParticleName() const
G4ParticleDefinition * theProjectile
G4Cache< G4HadFinalState * > theResult
void adjust_final_state(G4LorentzVector)
static G4ParticleHPManager * GetInstance()
static G4Proton * Proton()
static G4Triton * Triton()