44 , theTransport(nullptr), theHighEnergyGenerator(nullptr)
45 , theQuasielastic(nullptr)
46 , theCosmicCoalescence(nullptr)
47 , theStringModelID(-1)
55 delete theParticleChange;
61 <<
" string model and a stage to de-excite the excited nuclear fragment.\n<p>"
62 <<
"The string model simulates the interaction of\n"
63 <<
"an incident hadron with a nucleus, forming \n"
64 <<
"excited strings, decays these strings into hadrons,\n"
65 <<
"and leaves an excited nucleus. \n"
66 <<
"<p>The string model:\n";
75 theParticleChange->
Clear();
87 const G4double energyThresholdForCharmAndBottomHadrons = 100.0*CLHEP::MeV;
88 if ( thePrimary.
GetKineticEnergy() < energyThresholdForCharmAndBottomHadrons &&
96 return theParticleChange;
110 const G4double energyThresholdForHyperNuclei = 100.0*CLHEP::MeV;
116 return theParticleChange;
123 if ( theQuasielastic )
132 for(
auto & ptr : *result)
136 ptr->Get4Momentum().e(),
137 ptr->Get4Momentum().vect());
138 theParticleChange->
AddSecondary(aNew, ptr->GetCreatorModelID());
149 return theParticleChange;
155 theHighEnergyGenerator->
Scatter(theNucleus, aPart);
158 for (
auto & ptr : *theInitialResult ) {
159 ptr->SetCreatorModelID( theStringModelID );
163 #ifdef DEBUG_initial_result
166 for(
auto & ptr : *theInitialResult)
170 E_out += ptr->Get4Momentum().e();
178 G4int resZ(0),resA(0);
180 for(
auto & nuc : thy)
182 if(nuc.AreYouHit()) {
186 delta_m += CLHEP::proton_mass_c2;
188 delta_m += CLHEP::neutron_mass_c2;
197 G4double E_excit=init_mass + init_E - final_mass - E_out;
198 G4cout <<
" Corrected delta mass " << init_mass - final_mass - delta_m <<
G4endl;
199 G4cout <<
"initial E, mass = " << init_E <<
", " << init_mass <<
G4endl;
200 G4cout <<
" final E, mass = " << E_out <<
", " << final_mass <<
" excitation_E " << E_excit <<
G4endl;
206 if(theProjectileNucleus ==
nullptr)
210 for(
auto & nuc : they)
212 if(nuc.AreYouHit()) ++hitCount;
218 theTransport->
Propagate(theInitialResult,
220 if ( !theTransportResult ) {
221 G4cout <<
"G4TheoFSGenerator: null ptr from transport propagate " <<
G4endl;
227 theTransportResult = theDecay.
Propagate(theInitialResult,
229 if ( theTransportResult ==
nullptr ) {
230 G4cout <<
"G4TheoFSGenerator: null ptr from decay propagate " <<
G4endl;
240 theProjectileNucleus);
241 if ( !theTransportResult ) {
242 G4cout <<
"G4TheoFSGenerator: null ptr from transport propagate " <<
G4endl;
252 if(
nullptr == theCosmicCoalescence) {
255 if(
nullptr == theCosmicCoalescence) {
264 for(
auto & ptr : *theTransportResult)
268 ptr->GetTotalEnergy(),
271 G4double time = std::max(ptr->GetFormationTime(), 0.0);
272 aNew.
SetTime(timePrimary + time);
281 delete theTransportResult;
284 return theParticleChange;
289 if ( theHighEnergyGenerator ) {
std::vector< G4ReactionProduct * > G4ReactionProductVector
G4GLOB_DLL std::ostream G4cout
void GenerateDeuterons(G4ReactionProductVector *result)
void SetP0Coalescence(const G4HadProjectile &thePrimary, G4String)
G4ReactionProductVector * Propagate(G4KineticTrackVector *theSecondaries, G4V3DNucleus *)
G4LorentzVector Get4Momentum() const
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 SetParentResonanceDef(const G4ParticleDefinition *parentDef)
void SetTime(G4double aT)
void SetCreatorModelID(G4int id)
void SetParentResonanceID(const G4int parentID)
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()
virtual std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const
const G4String & GetModelName() const
static G4HadronicParameters * Instance()
G4double GetIonMass(G4int Z, G4int A, G4int nL=0, G4int lvl=0) const
G4int GetQuarkContent(G4int flavor) const
G4bool IsHypernucleus() const
G4int GetAntiQuarkContent(G4int flavor) const
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
static G4int GetModelID(const G4int modelIndex)
static G4Proton * Proton()
G4KineticTrackVector * Scatter(G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)
G4double GetFraction(G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)
G4TheoFSGenerator(const G4String &name="TheoFSGenerator")
std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const override
G4HadFinalState * ApplyYourself(const G4HadProjectile &thePrimary, G4Nucleus &theNucleus) override
void ModelDescription(std::ostream &outFile) const override
~G4TheoFSGenerator() override
virtual const std::vector< G4Nucleon > & GetNucleons()=0
virtual G4int GetMassNumber()=0
void ModelDescription(std::ostream &) const override
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 void PropagateModelDescription(std::ostream &outFile) const
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus)=0