Geant4 11.4.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=nullptr)
virtual ~G4LowEIonFragmentation ()
G4HadFinalStateApplyYourself (const G4HadProjectile &thePrimary, G4Nucleus &theNucleus) override
G4double GetCrossSection ()
 G4LowEIonFragmentation (const G4LowEIonFragmentation &)=delete
const G4LowEIonFragmentationoperator= (const G4LowEIonFragmentation &right)=delete
G4bool operator== (const G4LowEIonFragmentation &right) const =delete
G4bool operator!= (const G4LowEIonFragmentation &right) const =delete
Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
virtual ~G4HadronicInteraction ()
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 = nullptr)

Definition at line 49 of file G4LowEIonFragmentation.cc.

50 : G4HadronicInteraction("LowEIonPreco")
51{
52 theHandler = value;
53 theModel = new G4PreCompoundModel(theHandler);
54 proton = G4Proton::Proton();
56}
G4HadronicInteraction(const G4String &modelName="HadronicModel")
const G4String & GetModelName() const
static G4int GetModelID(const G4int modelIndex)
static G4Proton * Proton()
Definition G4Proton.cc:90

Referenced by G4LowEIonFragmentation(), operator!=(), operator=(), and operator==().

◆ ~G4LowEIonFragmentation()

G4LowEIonFragmentation::~G4LowEIonFragmentation ( )
virtual

Definition at line 58 of file G4LowEIonFragmentation.cc.

59{
60 theResult.Clear();
61}

◆ G4LowEIonFragmentation() [2/2]

G4LowEIonFragmentation::G4LowEIonFragmentation ( const G4LowEIonFragmentation & )
delete

Member Function Documentation

◆ ApplyYourself()

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

Reimplemented from G4HadronicInteraction.

Definition at line 63 of file G4LowEIonFragmentation.cc.

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

◆ GetCrossSection()

G4double G4LowEIonFragmentation::GetCrossSection ( )
inline

Definition at line 60 of file G4LowEIonFragmentation.hh.

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

◆ operator!=()

G4bool G4LowEIonFragmentation::operator!= ( const G4LowEIonFragmentation & right) const
delete

◆ operator=()

const G4LowEIonFragmentation & G4LowEIonFragmentation::operator= ( const G4LowEIonFragmentation & right)
delete

◆ operator==()

G4bool G4LowEIonFragmentation::operator== ( const G4LowEIonFragmentation & right) const
delete

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