Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4FTFModel Class Reference

#include <G4FTFModel.hh>

+ Inheritance diagram for G4FTFModel:

Public Member Functions

 G4FTFModel (const G4String &modelName="FTF")
 
 ~G4FTFModel ()
 
void Init (const G4Nucleus &aNucleus, const G4DynamicParticle &aProjectile)
 
G4ExcitedStringVectorGetStrings ()
 
G4V3DNucleusGetWoundedNucleus () const
 
virtual void ModelDescription (std::ostream &) const
 
- Public Member Functions inherited from G4VPartonStringModel
 G4VPartonStringModel (const G4String &modelName="Parton String Model")
 
virtual ~G4VPartonStringModel ()
 
void SetFragmentationModel (G4VStringFragmentation *aModel)
 
G4KineticTrackVectorScatter (const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)
 
virtual G4V3DNucleusGetWoundedNucleus () const =0
 
virtual void ModelDescription (std::ostream &outFile) const
 
- Public Member Functions inherited from G4VHighEnergyGenerator
 G4VHighEnergyGenerator (const G4String &modelName="High Energy Generator")
 
virtual ~G4VHighEnergyGenerator ()
 
virtual G4V3DNucleusGetWoundedNucleus () const =0
 
virtual G4KineticTrackVectorScatter (const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)=0
 
std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double AbsoluteLevel)
 
virtual void ModelDescription (std::ostream &) const
 
virtual G4String GetModelName () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VPartonStringModel
virtual void Init (const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)=0
 
virtual G4ExcitedStringVectorGetStrings ()=0
 
void SetThisPointer (G4VPartonStringModel *aPointer)
 
G4bool EnergyAndMomentumCorrector (G4KineticTrackVector *Output, G4LorentzVector &TotalCollisionMomentum)
 

Detailed Description

Definition at line 63 of file G4FTFModel.hh.

Constructor & Destructor Documentation

◆ G4FTFModel()

G4FTFModel::G4FTFModel ( const G4String modelName = "FTF")

Definition at line 56 of file G4FTFModel.cc.

56 :G4VPartonStringModel(modelName),
57 theExcitation(new G4DiffractiveExcitation()),
58 theElastic(new G4ElasticHNScattering()),
59 theAnnihilation(new G4FTFAnnihilation())
60{
62 theParameters=0;
63 NumberOfInvolvedNucleon=0;
64 NumberOfInvolvedNucleonOfProjectile=0;
65 SetEnergyMomentumCheckLevels(2*perCent, 150*MeV);
66}
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double AbsoluteLevel)
void SetThisPointer(G4VPartonStringModel *aPointer)

◆ ~G4FTFModel()

G4FTFModel::~G4FTFModel ( )

Definition at line 70 of file G4FTFModel.cc.

71{
72// Because FTF model can be called for various particles
73// theParameters must be erased at the end of each call.
74// Thus the delete is also in G4FTFModel::GetStrings() method
75 if( theParameters != 0 ) delete theParameters;
76 if( theExcitation != 0 ) delete theExcitation;
77 if( theElastic != 0 ) delete theElastic;
78 if( theAnnihilation != 0 ) delete theAnnihilation;
79
80// Erasing of strings created at annihilation
81 if(theAdditionalString.size() != 0)
82 {
83 std::for_each(theAdditionalString.begin(), theAdditionalString.end(),
85 }
86 theAdditionalString.clear();
87
88// Erasing of target involved nucleons
89 if( NumberOfInvolvedNucleon != 0)
90 {
91 for(G4int i=0; i < NumberOfInvolvedNucleon; i++)
92 {
93 G4VSplitableHadron * aNucleon = TheInvolvedNucleon[i]->GetSplitableHadron();
94 if(aNucleon) delete aNucleon;
95 }
96 }
97
98// Erasing of projectile involved nucleons
99/*
100 if( NumberOfInvolvedNucleonOfProjectile != 0)
101 {
102 for(G4int i=0; i < NumberOfInvolvedNucleonOfProjectile; i++)
103 {
104 G4VSplitableHadron * aNucleon = TheInvolvedNucleonOfProjectile[i]->GetSplitableHadron();
105 if(aNucleon) delete aNucleon;
106 }
107 }
108*/
109}
int G4int
Definition: G4Types.hh:66
G4VSplitableHadron * GetSplitableHadron() const
Definition: G4Nucleon.hh:96

Member Function Documentation

◆ GetStrings()

G4ExcitedStringVector * G4FTFModel::GetStrings ( )
virtual

Implements G4VPartonStringModel.

Definition at line 206 of file G4FTFModel.cc.

207{
208 G4ExcitedStringVector * theStrings(0);
209
210 theParticipants.GetList(theProjectile,theParameters);
211// StoreInvolvedNucleon();
212//G4cout<<" GetList theProjectile.GetMomentum() GetBaryonNumber() "<<theProjectile.GetMomentum()<<" "<<theProjectile.GetDefinition()->GetBaryonNumber()<<G4endl;
213 G4bool Success(true);
214
215 if((std::abs(theProjectile.GetDefinition()->GetBaryonNumber()) <= 1) &&
216 (theProjectile.GetDefinition()->GetBaryonNumber() != -1) )
217 { // Standard variant of FTF for projectile hadron/nucleon
218//G4cout<<"Standard variant of FTF for projectile hadron/nucleon"<<G4endl;
219 ReggeonCascade();
220//G4cout<<"Success after Reggeon "<<Success<<" PutOnMasShell"<<G4endl;
221 Success=PutOnMassShell();
222//G4cout<<"Success after PutOn "<<Success<<" GetResid"<<G4endl;
223 GetResidualNucleus();
224 }
225//G4cout<<"Success after GetN "<<Success<<G4endl;
226//G4int Uzhi; G4cin>>Uzhi;
227 if(theProjectile.GetDefinition()->GetBaryonNumber() > 1)
228 { // Variant of FTF for projectile nuclei
229//G4cout<<"Variant of FTF for projectile nuclei"<<G4endl;
230 StoreInvolvedNucleon();
231 ReggeonCascade();
232 Success=PutOnMassShell();
233 GetResidualNucleus();
234 }
235
236// G4bool LowE_Anti_Ion(false);
237 if(theProjectile.GetDefinition()->GetBaryonNumber() <= -1)
238 { // Projectile is Anti-baryon or Anti-Nucleus
239//G4cout<<"Projectile is Anti-baryon or Anti-Nucleus "<<G4endl;
240//G4cout<<"Be4 Store"<<G4endl;
241 StoreInvolvedNucleon();
242 if(theProjectile.GetTotalMomentum()/
243 std::abs(theProjectile.GetDefinition()->GetBaryonNumber()) > 5000.*MeV)
244 {// High energy interaction
245//G4cout<<"High energy interaction "<<G4endl;
246//G4cout<<"Regeon "<<G4endl;
247 ReggeonCascade();
248//G4cout<<"Put on mass "<<G4endl;
249 Success=PutOnMassShell();
250//G4cout<<"Residual "<<G4endl;
251 GetResidualNucleus();
252 }
253 else
254 {
255//G4cout<<"Low energy interaction "<<G4endl;
256// LowE_Anti_Ion=true;
257 Success=true;
258 }
259 }
260//G4cout<<"Before Excite Success "<<Success<<G4endl;
261 Success=Success && ExciteParticipants();
262//G4cout<<"Success ExciteParticipants()? "<<Success<<G4endl;
263// if(LowE_Anti_Ion) Success=Success && GetResidualNucleusAfterAnnihilation();
264
265 if( Success )
266 {
267 theStrings = BuildStrings();
268//G4cout<<"BuildStrings OK"<<G4endl;
269 if( theParameters != 0 )
270 {
271 delete theParameters;
272 theParameters=0;
273 }
274 }
275/*
276 if( Success )
277 {
278 if( ExciteParticipants() )
279 {
280//G4cout<<"Excite partic OK"<<G4endl;
281 theStrings = BuildStrings();
282//G4cout<<"Build String OK"<<G4endl;
283 if(LowE_Anti_Ion) GetResidualNucleusAfterAnnihilation();
284
285 if( theParameters != 0 )
286 {
287 delete theParameters;
288 theParameters=0;
289 }
290 } else // if( ExciteParticipants() )
291 { Success=false;}
292 } else // if( Success )
293 { Success=false;}
294*/
295 if(!Success)
296 {
297 // -------------- Erase the projectile ----------------
298//G4cout<<"Erase Proj"<<G4endl;
299 std::vector<G4VSplitableHadron *> primaries;
300
301 theParticipants.StartLoop(); // restart a loop
302 while ( theParticipants.Next() )
303 {
304 const G4InteractionContent & interaction=theParticipants.GetInteraction();
305
306 // do not allow for duplicates ...
307 if ( primaries.end() == std::find(primaries.begin(), primaries.end(),
308 interaction.GetProjectile()) )
309 primaries.push_back(interaction.GetProjectile());
310 }
311 std::for_each(primaries.begin(), primaries.end(), DeleteVSplitableHadron());
312 primaries.clear();
313 }
314// -------------- Cleaning of the memory --------------
315 G4VSplitableHadron * aNucleon = 0;
316// -------------- Erase the projectile nucleon --------
317/*
318 G4VSplitableHadron * aNucleon = 0;
319 for(G4int i=0; i < NumberOfInvolvedNucleonOfProjectile; i++)
320 {
321 aNucleon = TheInvolvedNucleonOfProjectile[i]->GetSplitableHadron();
322 if(aNucleon) delete aNucleon;
323 }
324
325 NumberOfInvolvedNucleonOfProjectile=0;
326*/ // Maybe it will be needed latter------------------
327
328// -------------- Erase the target nucleons -----------
329//G4cout<<"Erase Target Ninv "<<NumberOfInvolvedNucleon<<G4endl;
330 for(G4int i=0; i < NumberOfInvolvedNucleon; i++)
331 {
332 aNucleon = TheInvolvedNucleon[i]->GetSplitableHadron();
333 if(aNucleon) delete aNucleon;
334 }
335
336 NumberOfInvolvedNucleon=0;
337//G4cout<<"Go to fragmentation"<<G4endl;
338 return theStrings;
339
340}
std::vector< G4ExcitedString * > G4ExcitedStringVector
bool G4bool
Definition: G4Types.hh:67
void GetList(const G4ReactionProduct &thePrimary, G4FTFParameters *theParameters)
G4InteractionContent & GetInteraction()
G4VSplitableHadron * GetProjectile() const
G4double GetTotalMomentum() const
G4ParticleDefinition * GetDefinition() const

◆ GetWoundedNucleus()

G4V3DNucleus * G4FTFModel::GetWoundedNucleus ( ) const
inlinevirtual

Implements G4VPartonStringModel.

Definition at line 121 of file G4FTFModel.hh.

122{
123 return theParticipants.GetWoundedNucleus();
124}
virtual G4V3DNucleus * GetWoundedNucleus() const

◆ Init()

void G4FTFModel::Init ( const G4Nucleus aNucleus,
const G4DynamicParticle aProjectile 
)
virtual

Implements G4VPartonStringModel.

Definition at line 112 of file G4FTFModel.cc.

113{
114 theProjectile = aProjectile;
115
116 G4double PlabPerParticle(0.); // Laboratory momentum Pz per particle/nucleon
117
118/*
119G4cout<<"FTF init Pro Name "<<theProjectile.GetDefinition()->GetParticleName()<<G4endl;
120G4cout<<"FTF init Pro Mass "<<theProjectile.GetMass()<<" "<<theProjectile.GetMomentum()<<G4endl;
121G4cout<<"FTF init Pro B Q "<<theProjectile.GetDefinition()->GetBaryonNumber()<<" "<<(G4int) theProjectile.GetDefinition()->GetPDGCharge()<<G4endl;
122G4cout<<"FTF init A Z "<<aNucleus.GetA_asInt()<<" "<<aNucleus.GetZ_asInt()<<G4endl;
123G4cout<<" "<<aNucleus.GetN()<<" "<<aNucleus.GetZ()<<G4endl;
124//G4int Uzhi; G4cin>>Uzhi;
125*/
126
127 theParticipants.SetProjectileNucleus(0);
128 theParticipants.Init(aNucleus.GetA_asInt(),aNucleus.GetZ_asInt());
129
130 if(std::abs(theProjectile.GetDefinition()->GetBaryonNumber()) <= 1)
131 { // Projectile is a hadron
132 PlabPerParticle=theProjectile.GetMomentum().z();
133
134// S = sqr( theProjectile.GetMass() ) + sqr( ProtonMass ) +
135// 2*ProtonMass*theProjectile.GetTotalEnergy();
136 }
137
138
139 if(theProjectile.GetDefinition()->GetBaryonNumber() > 1)
140 { // Projectile is a nucleus
141 theParticipants.InitProjectileNucleus(
142 theProjectile.GetDefinition()->GetBaryonNumber(),
143 (G4int) theProjectile.GetDefinition()->GetPDGCharge() );
144
145 G4ThreeVector BoostVector=theProjectile.GetMomentum()/theProjectile.GetTotalEnergy();
146 theParticipants.theProjectileNucleus->DoLorentzBoost(BoostVector);
147
148 PlabPerParticle=theProjectile.GetMomentum().z()/
149 theProjectile.GetDefinition()->GetBaryonNumber();
150
151// S = 2.*sqr( ProtonMass ) + 2*ProtonMass*
152// theProjectile.GetTotalEnergy()/theProjectile.GetDefinition()->GetBaryonNumber();
153 }
154
155 if(theProjectile.GetDefinition()->GetBaryonNumber() < -1)
156 { // Projectile is an anti-nucleus
157 theParticipants.InitProjectileNucleus(
158 std::abs( theProjectile.GetDefinition()->GetBaryonNumber()),
159 std::abs((G4int) theProjectile.GetDefinition()->GetPDGCharge()) );
160
161 G4ThreeVector BoostVector=theProjectile.GetMomentum()/theProjectile.GetTotalEnergy();
162
163 theParticipants.theProjectileNucleus->StartLoop();
164 G4Nucleon * aNucleon;
165 while ( (aNucleon = theParticipants.theProjectileNucleus->GetNextNucleon()) )
166 {
167 if(aNucleon->GetDefinition()->GetPDGEncoding() == 2212) // Proton
169
170 if(aNucleon->GetDefinition()->GetPDGEncoding() == 2112) // Neutron
172 } // end of while (theParticipant.theProjectileNucleus->GetNextNucleon())
173
174 theParticipants.theProjectileNucleus->DoLorentzBoost(BoostVector);
175
176 PlabPerParticle= theProjectile.GetMomentum().z()/
177 std::abs(theProjectile.GetDefinition()->GetBaryonNumber());
178
179// S = 2.*sqr( ProtonMass ) + 2*ProtonMass*
180// theProjectile.GetTotalEnergy()/
181// std::abs(theProjectile.GetDefinition()->GetBaryonNumber());
182 }
183
184// ------------------------------------------------------------------------
185 if( theParameters != 0 ) delete theParameters;
186 theParameters = new G4FTFParameters(theProjectile.GetDefinition(),
187 aNucleus.GetA_asInt(),aNucleus.GetZ_asInt(),
188 PlabPerParticle);
189//G4cout<<" End Init "<<theProjectile.GetMomentum()<<G4endl;
190// To turn on/off (1/0) elastic scattering close/open ...
191//theParameters->SetProbabilityOfElasticScatt(0.);
192//G4cout<<" etProbabilityOfElasticScatt "<<theParameters->GetProbabilityOfElasticScatt()<<G4endl;
193//G4cout<<" INIT ";
194//G4int Uzhi; G4cin>>Uzhi;
195
196 if(theAdditionalString.size() != 0)
197 {
198 std::for_each(theAdditionalString.begin(), theAdditionalString.end(),
200 }
201 theAdditionalString.clear();
202//G4cout<<" End Init theProjectile.GetMomentum()"<<theProjectile.GetMomentum()<<G4endl;
203}
double G4double
Definition: G4Types.hh:64
double z() const
static G4AntiNeutron * AntiNeutron()
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:93
void SetProjectileNucleus(G4V3DNucleus *aNucleus)
void InitProjectileNucleus(G4int theZ, G4int theA)
G4V3DNucleus * theProjectileNucleus
void SetParticleType(G4Proton *aProton)
Definition: G4Nucleon.hh:77
virtual G4ParticleDefinition * GetDefinition() const
Definition: G4Nucleon.hh:85
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
G4double GetPDGCharge() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
virtual G4Nucleon * GetNextNucleon()=0
virtual G4bool StartLoop()=0
virtual void DoLorentzBoost(const G4LorentzVector &theBoost)=0
virtual void Init(G4int theZ, G4int theA)

◆ ModelDescription()

void G4FTFModel::ModelDescription ( std::ostream &  desc) const
virtual

Reimplemented from G4VPartonStringModel.

Definition at line 1745 of file G4FTFModel.cc.

1746{
1747 desc << "please add description here" << G4endl;
1748}
#define G4endl
Definition: G4ios.hh:52

The documentation for this class was generated from the following files: