80 theParticleChange->
Clear();
92 const G4double energyThresholdForCharmAndBottomHadrons = 100.0*CLHEP::MeV;
93 if ( thePrimary.
GetKineticEnergy() < energyThresholdForCharmAndBottomHadrons &&
98 theParticleChange->SetStatusChange(
isAlive );
101 return theParticleChange;
115 const G4double energyThresholdForHyperNuclei = 100.0*CLHEP::MeV;
118 theParticleChange->SetStatusChange(
isAlive );
121 return theParticleChange;
128 if ( theQuasielastic )
130 if ( theQuasielastic->GetFraction( theNucleus, aPart ) >
G4UniformRand() )
137 for (
auto & ptr : *result )
140 ptr->Get4Momentum().e(),
141 ptr->Get4Momentum().vect() );
142 theParticleChange->AddSecondary( aNew, ptr->GetCreatorModelID() );
149 theParticleChange->SetStatusChange(
isAlive );
153 return theParticleChange;
163 G4int theModelID = theStringModelID;
164 if ( theHighEnergyGenerator->IsQuasiElasticInteraction() ) {
165 theModelID = theFTFQuasiElasticID;
166 }
else if ( theHighEnergyGenerator->IsDiffractiveInteraction() ) {
167 theModelID = theFTFDiffractiveID;
169 for (
auto & ptr : *theInitialResult ) {
170 ptr->SetCreatorModelID( theModelID );
174 #ifdef DEBUG_initial_result
177 for (
auto & ptr : *theInitialResult )
181 E_out += ptr->Get4Momentum().e();
187 const std::vector< G4Nucleon >& thy = theHighEnergyGenerator->GetWoundedNucleus()->GetNucleons();
189 G4int resZ( 0 ), resA( 0 );
191 for (
auto & nuc : thy )
193 if ( nuc.AreYouHit() ) {
197 delta_m += CLHEP::proton_mass_c2;
199 delta_m += CLHEP::neutron_mass_c2;
208 G4double E_excit = init_mass + init_E - final_mass - E_out;
209 G4cout <<
" Corrected delta mass " << init_mass - final_mass - delta_m <<
G4endl;
210 G4cout <<
"initial E, mass = " << init_E <<
", " << init_mass <<
G4endl;
211 G4cout <<
" final E, mass = " << E_out <<
", " << final_mass <<
" excitation_E " << E_excit <<
G4endl;
216 G4V3DNucleus* theProjectileNucleus = theHighEnergyGenerator->GetProjectileNucleus();
217 if ( theProjectileNucleus ==
nullptr )
220 const std::vector< G4Nucleon >& they = theHighEnergyGenerator->GetWoundedNucleus()->GetNucleons();
221 for (
auto & nuc : they )
223 if ( nuc.AreYouHit() ) ++hitCount;
225 if ( hitCount != theHighEnergyGenerator->GetWoundedNucleus()->GetMassNumber() )
227 theTransport->SetPrimaryProjectile( thePrimary );
228 theTransportResult = theTransport->Propagate( theInitialResult,
229 theHighEnergyGenerator->GetWoundedNucleus() );
230 if ( theTransportResult ==
nullptr ) {
231 G4cout <<
"G4TheoFSGenerator: null ptr from transport propagate " <<
G4endl;
237 theTransportResult = theDecay.Propagate( theInitialResult,
238 theHighEnergyGenerator->GetWoundedNucleus() );
239 if ( theTransportResult ==
nullptr ) {
240 G4cout <<
"G4TheoFSGenerator: null ptr from decay propagate " <<
G4endl;
247 theTransport->SetPrimaryProjectile( thePrimary );
248 theTransportResult = theTransport->PropagateNuclNucl( theInitialResult,
249 theHighEnergyGenerator->GetWoundedNucleus(),
250 theProjectileNucleus );
251 if ( theTransportResult ==
nullptr ) {
252 G4cout <<
"G4TheoFSGenerator: null ptr from transport propagate " <<
G4endl;
262 if ( theCosmicCoalescence ==
nullptr ) {
265 if ( theCosmicCoalescence ==
nullptr ) {
269 theCosmicCoalescence->SetP0Coalescence( thePrimary, theHighEnergyGenerator->GetModelName() );
270 theCosmicCoalescence->GenerateDeuterons( theTransportResult );
274 for (
auto & ptr : *theTransportResult )
277 ptr->GetTotalEnergy(),
278 ptr->GetMomentum() );
280 G4double time = std::max( ptr->GetFormationTime(), 0.0 );
281 aNew.
SetTime( timePrimary + time );
285 theParticleChange->AddSecondary( aNew );
290 delete theTransportResult;
293 return theParticleChange;
G4LorentzVector Get4Momentum() const
G4int GetQuarkContent(G4int flavor) const
G4bool IsHypernucleus() const
G4int GetAntiQuarkContent(G4int flavor) const
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()