71{
72
73 theParticleChange->
Clear();
76
77
78
79
80
81
82
83
84
85 const G4double energyThresholdForCharmAndBottomHadrons = 100.0*CLHEP::MeV;
86 if ( thePrimary.
GetKineticEnergy() < energyThresholdForCharmAndBottomHadrons &&
94 return theParticleChange;
95 }
96
97
98
100
101 if ( theQuasielastic )
102 {
104 {
105
107
108 if (result)
109 {
110 for(auto & ptr : *result)
111 {
114 ptr->Get4Momentum().e(),
115 ptr->Get4Momentum().vect());
117 delete ptr;
118 }
119 delete result;
120 }
121 else
122 {
126
127 }
128 return theParticleChange;
129 }
130 }
131
132
134 theHighEnergyGenerator->
Scatter(theNucleus, aPart);
135
136
137 #ifdef DEBUG_initial_result
140 for(auto & ptr : *theInitialResult)
141 {
142
143
144 E_out += ptr->Get4Momentum().e();
145 }
147 G4double init_E=aPart.Get4Momentum().e();
148
149
151
152 G4int resZ(0),resA(0);
154 for(auto & nuc : thy)
155 {
156 if(
nuc.AreYouHit()) {
157 ++resA;
159 ++resZ;
160 delta_m += CLHEP::proton_mass_c2;
161 } else {
162 delta_m += CLHEP::neutron_mass_c2;
163 }
164 }
165 }
166
170 }
171 G4double E_excit=init_mass + init_E - final_mass - E_out;
172 G4cout <<
" Corrected delta mass " << init_mass - final_mass - delta_m <<
G4endl;
173 G4cout <<
"initial E, mass = " << init_E <<
", " << init_mass <<
G4endl;
174 G4cout <<
" final E, mass = " << E_out <<
", " << final_mass <<
" excitation_E " << E_excit <<
G4endl;
175 #endif
176
178
179
181 if(theProjectileNucleus == nullptr)
182 {
185 for(auto & nuc : they)
186 {
187 if(
nuc.AreYouHit()) ++hitCount;
188 }
190 {
192 theTransportResult =
193 theTransport->
Propagate(theInitialResult,
195 if ( !theTransportResult ) {
196 G4cout <<
"G4TheoFSGenerator: null ptr from transport propagate " <<
G4endl;
198 }
199 }
200 else
201 {
202 theTransportResult = theDecay.
Propagate(theInitialResult,
204 if ( theTransportResult == nullptr ) {
205 G4cout <<
"G4TheoFSGenerator: null ptr from decay propagate " <<
G4endl;
207 }
208 }
209 }
210 else
211 {
215 theProjectileNucleus);
216 if ( !theTransportResult ) {
217 G4cout <<
"G4TheoFSGenerator: null ptr from transport propagate " <<
G4endl;
219 }
220 }
221
222
223
224
225
227 if(nullptr == theCosmicCoalescence) {
230 if(nullptr == theCosmicCoalescence) {
232 }
233 }
236 }
237
238
239 for(auto & ptr : *theTransportResult)
240 {
243 ptr->GetTotalEnergy(),
244 ptr->GetMomentum());
246 G4double time = std::max(ptr->GetFormationTime(), 0.0);
247 aNew.
SetTime(timePrimary + time);
250 delete ptr;
251 }
252
253
254 delete theTransportResult;
255
256
257 return theParticleChange;
258}
std::vector< G4ReactionProduct * > G4ReactionProductVector
G4GLOB_DLL std::ostream G4cout
void GenerateDeuterons(G4ReactionProductVector *result)
void SetP0Coalescence(const G4HadProjectile &thePrimary, G4String)
G4ReactionProductVector * Propagate(G4KineticTrackVector *theSecondaries, G4V3DNucleus *)
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetGlobalTime() const
void SetTime(G4double aT)
void SetCreatorModelType(G4int idx)
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()
const G4String & GetModelName() const
static G4HadronicParameters * Instance()
G4double GetIonMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
G4int GetQuarkContent(G4int flavor) const
G4int GetAntiQuarkContent(G4int flavor) const
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
static G4Proton * Proton()
G4KineticTrackVector * Scatter(G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)
G4double GetFraction(G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)
virtual const std::vector< G4Nucleon > & GetNucleons()=0
virtual G4int GetMassNumber()=0
virtual G4V3DNucleus * GetProjectileNucleus() const
virtual G4V3DNucleus * GetWoundedNucleus() const =0
virtual G4KineticTrackVector * Scatter(const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)=0
virtual G4ReactionProductVector * PropagateNuclNucl(G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus, G4V3DNucleus *theProjectileNucleus)
void SetPrimaryProjectile(const G4HadProjectile &aPrimary)
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus)=0