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

#include <G4LowEIonFragmentation.hh>

+ Inheritance diagram for G4LowEIonFragmentation:

Public Member Functions

 G4LowEIonFragmentation (G4ExcitationHandler *const value)
 
 G4LowEIonFragmentation ()
 
virtual ~G4LowEIonFragmentation ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &thePrimary, G4Nucleus &theNucleus)
 
G4double GetCrossSection ()
 
- Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
G4double GetMinEnergy () const
 
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMinEnergy (G4double anEnergy)
 
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4double GetMaxEnergy () const
 
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMaxEnergy (const G4double anEnergy)
 
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int value)
 
const G4StringGetModelName () const
 
void DeActivateFor (const G4Material *aMaterial)
 
void ActivateFor (const G4Material *aMaterial)
 
void DeActivateFor (const G4Element *anElement)
 
void ActivateFor (const G4Element *anElement)
 
G4bool IsBlocked (const G4Material *aMaterial) const
 
G4bool IsBlocked (const G4Element *anElement) const
 
void SetRecoilEnergyThreshold (G4double val)
 
G4double GetRecoilEnergyThreshold () const
 
virtual const std::pair< G4double, G4doubleGetFatalEnergyCheckLevels () const
 
virtual std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 
virtual void ModelDescription (std::ostream &outFile) const
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void InitialiseModel ()
 
 G4HadronicInteraction (const G4HadronicInteraction &right)=delete
 
const G4HadronicInteractionoperator= (const G4HadronicInteraction &right)=delete
 
G4bool operator== (const G4HadronicInteraction &right) const =delete
 
G4bool operator!= (const G4HadronicInteraction &right) const =delete
 

Additional Inherited Members

- Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 
- Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 

Detailed Description

Definition at line 49 of file G4LowEIonFragmentation.hh.

Constructor & Destructor Documentation

◆ G4LowEIonFragmentation() [1/2]

G4LowEIonFragmentation::G4LowEIonFragmentation ( G4ExcitationHandler *const  value)

Definition at line 48 of file G4LowEIonFragmentation.cc.

49{
50 theHandler = value;
51 theModel = new G4PreCompoundModel(theHandler);
52 proton = G4Proton::Proton();
53 hits = 0;
54 totalTries = 1;
55 area = 0.0;
56}
static G4Proton * Proton()
Definition: G4Proton.cc:92

◆ G4LowEIonFragmentation() [2/2]

G4LowEIonFragmentation::G4LowEIonFragmentation ( )

Definition at line 58 of file G4LowEIonFragmentation.cc.

59{
60 theHandler = new G4ExcitationHandler;
61 theModel = new G4PreCompoundModel(theHandler);
62 proton = G4Proton::Proton();
63 hits = 0;
64 totalTries = 1;
65 area = 0.0;
66}

◆ ~G4LowEIonFragmentation()

G4LowEIonFragmentation::~G4LowEIonFragmentation ( )
virtual

Definition at line 68 of file G4LowEIonFragmentation.cc.

69{
70 delete theModel;
71}

Member Function Documentation

◆ ApplyYourself()

G4HadFinalState * G4LowEIonFragmentation::ApplyYourself ( const G4HadProjectile thePrimary,
G4Nucleus theNucleus 
)
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 73 of file G4LowEIonFragmentation.cc.

75{
76 area = 0.0;
77 // initialize the particle change
78 theResult.Clear();
79 theResult.SetStatusChange( stopAndKill );
80 theResult.SetEnergyChange( 0.0 );
81
82 // Get Target A, Z
83 G4int aTargetA = theNucleus.GetA_asInt();
84 G4int aTargetZ = theNucleus.GetZ_asInt();
85
86 // Get Projectile A, Z
87 G4int aProjectileA = thePrimary.GetDefinition()->GetBaryonNumber();
88 G4int aProjectileZ = G4lrint(thePrimary.GetDefinition()->GetPDGCharge()/eplus);
89
90 // Get Maximum radius of both
91
92 G4Fancy3DNucleus aPrim;
93 aPrim.Init(aProjectileA, aProjectileZ);
94 G4double projectileOuterRadius = aPrim.GetOuterRadius();
95
96 G4Fancy3DNucleus aTarg;
97 aTarg.Init(aTargetA, aTargetZ);
98 G4double targetOuterRadius = aTarg.GetOuterRadius();
99
100 // Get the Impact parameter
101 G4int particlesFromProjectile = 0;
102 G4int chargedFromProjectile = 0;
103 G4double impactParameter = 0;
104 G4double x,y;
105 G4Nucleon * pNucleon;
106 // need at lease one particle from the projectile model beyond the
107 // projectileHorizon.
108
109 // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
110 while(0==particlesFromProjectile)
111 {
112 do
113 {
114 x = 2*G4UniformRand() - 1;
115 y = 2*G4UniformRand() - 1;
116 }
117 // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
118 while(x*x + y*y > 1);
119 impactParameter = std::sqrt(x*x+y*y)*(targetOuterRadius+projectileOuterRadius);
120 ++totalTries;
121 area = pi*(targetOuterRadius+projectileOuterRadius)*
122 (targetOuterRadius+projectileOuterRadius);
123 G4double projectileHorizon = impactParameter-targetOuterRadius;
124
125 // Empirical boundary transparency.
126 G4double empirical = G4UniformRand();
127 if(projectileHorizon > empirical*projectileOuterRadius) { continue; }
128
129 // Calculate the number of nucleons involved in collision
130 // From projectile
131 aPrim.StartLoop();
132
133 // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
134 while((pNucleon = aPrim.GetNextNucleon()))
135 {
136 if(pNucleon->GetPosition().y()>projectileHorizon)
137 {
138 // We have one
139 ++particlesFromProjectile;
140 if(pNucleon->GetParticleType() == proton)
141 {
142 ++chargedFromProjectile;
143 }
144 }
145 }
146 }
147 ++hits;
148
149 // From target:
150 G4double targetHorizon = impactParameter-projectileOuterRadius;
151 G4int chargedFromTarget = 0;
152 G4int particlesFromTarget = 0;
153 aTarg.StartLoop();
154 // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
155 while((pNucleon = aTarg.GetNextNucleon()))
156 {
157 if(pNucleon->GetPosition().y()>targetHorizon)
158 {
159 // We have one
160 ++particlesFromTarget;
161 if(pNucleon->GetParticleType() == proton)
162 {
163 ++chargedFromTarget;
164 }
165 }
166 }
167
168 // Energy sharing between projectile and target.
169 // Note that this is a quite simplistic kinetically.
170 G4ThreeVector momentum = thePrimary.Get4Momentum().vect();
171 G4double w = (G4double)particlesFromProjectile/(G4double)aProjectileA;
172
173 G4double projTotEnergy = thePrimary.GetTotalEnergy();
174 G4double targetMass = G4NucleiProperties::GetNuclearMass(aTargetA, aTargetZ);
175 G4LorentzVector fragment4Momentum(momentum*w, projTotEnergy*w + targetMass);
176
177 // take the nucleons and fill the Fragments
178 G4Fragment anInitialState(aTargetA+particlesFromProjectile,
179 aTargetZ+chargedFromProjectile,
180 fragment4Momentum);
181 // M.A. Cortes fix
182 //anInitialState.SetNumberOfParticles(particlesFromProjectile);
183 anInitialState.SetNumberOfExcitedParticle(particlesFromProjectile
184 + particlesFromTarget,
185 chargedFromProjectile
186 + chargedFromTarget);
187 anInitialState.SetNumberOfHoles(particlesFromProjectile+particlesFromTarget,
188 chargedFromProjectile + chargedFromTarget);
189 G4double time = thePrimary.GetGlobalTime();
190 anInitialState.SetCreationTime(time);
191
192 // Fragment the Fragment using Pre-compound
193 G4ReactionProductVector* thePreCompoundResult =
194 theModel->DeExcite(anInitialState);
195
196 // De-excite the projectile using ExcitationHandler
197 G4ReactionProductVector * theExcitationResult = 0;
198 if(particlesFromProjectile < aProjectileA)
199 {
200 G4LorentzVector residual4Momentum(momentum*(1.0-w), projTotEnergy*(1.0-w));
201
202 G4Fragment initialState2(aProjectileA-particlesFromProjectile,
203 aProjectileZ-chargedFromProjectile,
204 residual4Momentum );
205
206 // half of particles are excited (?!)
207 G4int pinit = (aProjectileA-particlesFromProjectile)/2;
208 G4int cinit = (aProjectileZ-chargedFromProjectile)/2;
209
210 initialState2.SetNumberOfExcitedParticle(pinit,cinit);
211 initialState2.SetNumberOfHoles(pinit,cinit);
212 initialState2.SetCreationTime(time);
213
214 theExcitationResult = theHandler->BreakItUp(initialState2);
215 }
216
217 // Fill the particle change and clear intermediate vectors
218 G4int nexc = 0;
219 G4int npre = 0;
220 if(theExcitationResult) { nexc = theExcitationResult->size(); }
221 if(thePreCompoundResult) { npre = thePreCompoundResult->size();}
222
223 if(nexc > 0) {
224 for(G4int k=0; k<nexc; ++k) {
225 G4ReactionProduct* p = (*theExcitationResult)[k];
227 p->GetMomentum()));
228 delete p;
229 }
230 }
231
232 if(npre > 0) {
233 for(G4int k=0; k<npre; ++k) {
234 G4ReactionProduct* p = (*thePreCompoundResult)[k];
236 p->GetMomentum()));
237 delete p;
238 }
239 }
240
241 delete thePreCompoundResult;
242 delete theExcitationResult;
243
244 // return the particle change
245 return &theResult;
246}
@ stopAndKill
std::vector< G4ReactionProduct * > G4ReactionProductVector
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4UniformRand()
Definition: Randomize.hh:52
double y() const
Hep3Vector vect() const
G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState)
G4Nucleon * GetNextNucleon()
G4double GetOuterRadius()
void Init(G4int theA, G4int theZ)
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
G4double GetGlobalTime() const
G4double GetTotalEnergy() const
static G4double GetNuclearMass(const G4double A, const G4double Z)
const G4ThreeVector & GetPosition() const
Definition: G4Nucleon.hh:138
const G4ParticleDefinition * GetParticleType() const
Definition: G4Nucleon.hh:83
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
G4double GetPDGCharge() const
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment) final
const G4ParticleDefinition * GetDefinition() const
G4ThreeVector GetMomentum() const
const G4double pi
int G4lrint(double ad)
Definition: templates.hh:134

◆ GetCrossSection()

G4double G4LowEIonFragmentation::GetCrossSection ( )
inline

Definition at line 62 of file G4LowEIonFragmentation.hh.

63 {
64 // G4cout << "area/millibarn = "<<area/millibarn<<G4endl;
65 // G4cout << "hits = "<<hits<<G4endl;
66 // G4cout << "totalTries = "<<totalTries<<G4endl;
67 return area*hits/(static_cast<G4double>(totalTries)*CLHEP::millibarn);
68 }

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