Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLParticleEntryChannel.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// INCL++ intra-nuclear cascade model
27// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28// Davide Mancusi, CEA
29// Alain Boudard, CEA
30// Sylvie Leray, CEA
31// Joseph Cugnon, University of Liege
32//
33// INCL++ revision: v5.1.8
34//
35#define INCLXX_IN_GEANT4_MODE 1
36
37#include "globals.hh"
38
40#include "G4INCLRootFinder.hh"
41#include "G4INCLIntersection.hh"
42#include <algorithm>
43
44namespace G4INCL {
45
47 :theNucleus(n), theParticle(p)
48 {}
49
51 {}
52
54 // Behaves slightly differency if a third body (the projectile) is present
55 G4bool isNN = theNucleus->isNucleusNucleusCollision();
56
57 /* Corrections to the energy of the entering nucleon
58 *
59 * In particle-nucleus reactions, the goal of this correction is to satisfy
60 * energy conservation in particle-nucleus reactions using real particle
61 * and nuclear masses.
62 *
63 * In nucleus-nucleus reactions, in addition to the above, the correction
64 * is determined by a model for the excitation energy of the
65 * quasi-projectile (QP). The energy of the entering nucleon is such that
66 * the QP excitation energy, as determined by conservation, is what given
67 * by our model.
68 *
69 * Possible choices for the correction (or, equivalently, for the QP excitation energy):
70 * 1. the correction is 0. (same as in particle-nucleus);
71 * 2. the correction is the separation energy of the entering nucleon in
72 * the current QP;
73 * 3. the QP excitation energy is given by A. Boudard's algorithm, as
74 * implemented in INCL4.2-HI/Geant4.
75 *
76 * Ideally, the QP excitation energy should always be >=0. Algorithms 1.
77 * and 2. do not guarantee this, although violations to the rule seem to be
78 * more severe for 1. than for 2.. Algorithm 3., by construction, yields
79 * non-negative QP excitation energies.
80 */
81 G4double theCorrection;
82 if(isNN) {
83// assert(theParticle->isNucleon());
84 ProjectileRemnant * const projectileRemnant = theNucleus->getProjectileRemnant();
85// assert(projectileRemnant);
86
87 // No correction (model 1. above)
88 /*
89 theCorrection = theParticle->getEmissionQValueCorrection(
90 theNucleus->getA() + theParticle->getA(),
91 theNucleus->getZ() + theParticle->getZ())
92 + theParticle->getTableMass() - theParticle->getINCLMass();
93 const G4double theProjectileCorrection = 0.;
94 */
95
96 // Correct the energy of the entering particle for the Q-value of the
97 // emission from the projectile (model 2. above)
98 /*
99 theCorrection = theParticle->getTransferQValueCorrection(
100 projectileRemnant->getA(), projectileRemnant->getZ(),
101 theNucleus->getA(), theNucleus->getZ());
102 G4double theProjectileCorrection;
103 if(projectileRemnant->getA()>theParticle->getA()) { // if there are any particles left
104 // Compute the projectile Q-value (to be used as a correction to the
105 // other components of the projectile remnant)
106 theProjectileCorrection = ParticleTable::getTableQValue(
107 projectileRemnant->getA() - theParticle->getA(),
108 projectileRemnant->getZ() - theParticle->getZ(),
109 theParticle->getA(),
110 theParticle->getZ());
111 } else
112 theProjectileCorrection = 0.;
113 */
114
115 // Fix the correction in such a way that the quasi-projectile excitation
116 // energy is given by A. Boudard's INCL4.2-HI model.
117 const G4double theProjectileExcitationEnergy =
118 (projectileRemnant->getA()-theParticle->getA()>1) ?
119 (projectileRemnant->computeExcitationEnergy(theParticle->getID())) :
120 0.;
121 const G4double theProjectileEffectiveMass =
122 ParticleTable::getTableMass(projectileRemnant->getA() - theParticle->getA(), projectileRemnant->getZ() - theParticle->getZ())
123 + theProjectileExcitationEnergy;
124 const ThreeVector &theProjectileMomentum = projectileRemnant->getMomentum() - theParticle->getMomentum();
125 const G4double theProjectileEnergy = std::sqrt(theProjectileMomentum.mag2() + theProjectileEffectiveMass*theProjectileEffectiveMass);
126 const G4double theProjectileCorrection = theProjectileEnergy - (projectileRemnant->getEnergy() - theParticle->getEnergy());
127 theCorrection = theParticle->getEmissionQValueCorrection(
128 theNucleus->getA() + theParticle->getA(),
129 theNucleus->getZ() + theParticle->getZ())
130 + theParticle->getTableMass() - theParticle->getINCLMass()
131 + theProjectileCorrection;
132
133 projectileRemnant->removeParticle(theParticle, theProjectileCorrection);
134 } else {
135 const G4int ACN = theNucleus->getA() + theParticle->getA();
136 const G4int ZCN = theNucleus->getZ() + theParticle->getZ();
137 // Correction to the Q-value of the entering particle
138 theCorrection = theParticle->getEmissionQValueCorrection(ACN,ZCN);
139 DEBUG("The following Particle enters with correction " << theCorrection
140 << theParticle->print() << std::endl);
141 }
142
143 const G4double energyBefore = theParticle->getEnergy() - theCorrection;
144 G4bool success = particleEnters(theCorrection);
145 FinalState *fs = new FinalState();
146 fs->addEnteringParticle(theParticle);
147
148 if(!success) {
150 } else if(theParticle->isNucleon() &&
151 theParticle->getKineticEnergy()<theNucleus->getPotential()->getFermiEnergy(theParticle)) {
152 // If the participant is a nucleon entering below its Fermi energy, force a
153 // compound nucleus
155 }
156
157 fs->setTotalEnergyBeforeInteraction(energyBefore);
158 return fs;
159 }
160
161 G4bool ParticleEntryChannel::particleEnters(const G4double theQValueCorrection) {
162
163 // \todo{this is the place to add refraction}
164
165 theParticle->setINCLMass(); // Will automatically put the particle on shell
166
167 // Add the nuclear potential to the kinetic energy when entering the
168 // nucleus
169
170 class IncomingEFunctor : public RootFunctor {
171 public:
172 IncomingEFunctor(Particle * const p, Nucleus const * const n, const G4double correction) :
173 RootFunctor(0., 1E6),
174 theParticle(p),
175 thePotential(n->getPotential()),
176 theEnergy(theParticle->getEnergy()),
177 theMass(theParticle->getMass()),
178 theQValueCorrection(correction),
179 theMomentum(theParticle->getMomentum())
180 {}
181 ~IncomingEFunctor() {}
182 G4double operator()(const G4double v) const {
183 G4double energyInside = std::max(theMass, theEnergy + v - theQValueCorrection);
184 theParticle->setEnergy(energyInside);
185 theParticle->setPotentialEnergy(v);
186 // Scale the particle momentum
187 theParticle->setMomentum(theMomentum); // keep the same direction
188 theParticle->adjustMomentumFromEnergy();
189 return v - thePotential->computePotentialEnergy(theParticle);
190 }
191 void cleanUp(const G4bool /*success*/) const {}
192 private:
193 Particle *theParticle;
194 NuclearPotential::INuclearPotential const *thePotential;
195 G4double theEnergy;
196 G4double theMass;
197 G4double theQValueCorrection;
198 ThreeVector theMomentum;
199 } theIncomingEFunctor(theParticle,theNucleus,theQValueCorrection);
200
201 G4double v = theNucleus->getPotential()->computePotentialEnergy(theParticle);
202 if(theParticle->getKineticEnergy()+v-theQValueCorrection<0.) { // Particle entering below 0. Die gracefully
203 DEBUG("Particle " << theParticle->getID() << " is trying to enter below 0" << std::endl);
204 return false;
205 }
206 G4bool success = RootFinder::solve(&theIncomingEFunctor, v);
207 if(success) { // Apply the solution
208 std::pair<G4double,G4double> theSolution = RootFinder::getSolution();
209 theIncomingEFunctor(theSolution.first);
210 } else {
211 WARN("Couldn't compute the potential for incoming particle, root-finding algorithm failed." << std::endl);
212 }
213 return success;
214 }
215
216}
217
Simple class for computing intersections between a straight line and a sphere.
#define WARN(x)
#define DEBUG(x)
Static root-finder algorithm.
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
void addEnteringParticle(Particle *p)
void setTotalEnergyBeforeInteraction(G4double E)
virtual G4double computePotentialEnergy(const Particle *const p) const =0
G4double getFermiEnergy(const Particle *const p) const
Return the Fermi energy for a particle.
NuclearPotential::INuclearPotential * getPotential() const
Getter for thePotential.
ProjectileRemnant * getProjectileRemnant() const
Get the projectile remnant.
G4bool isNucleusNucleusCollision() const
Is it a nucleus-nucleus collision?
ParticleEntryChannel(Nucleus *n, Particle *p)
static NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4double getINCLMass() const
Get the INCL particle mass.
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
G4double getEnergy() const
G4int getZ() const
Returns the charge number.
G4double getKineticEnergy() const
Get the particle kinetic energy.
void setINCLMass()
Set the mass of the Particle to its table mass.
const G4INCL::ThreeVector & getMomentum() const
virtual G4double getTableMass() const
Get the tabulated particle mass.
std::string print() const
long getID() const
G4int getA() const
Returns the baryon number.
G4bool isNucleon() const
G4double computeExcitationEnergy(const long exceptID) const
Compute the excitation energy.
void removeParticle(Particle *const p, const G4double theProjectileCorrection)
Remove a nucleon from the projectile remnant.
static std::pair< G4double, G4double > const & getSolution()
Get the solution of the last call to solve().
static G4bool solve(RootFunctor const *const f, const G4double x0)
Numerically solve a one-dimensional equation.
G4double mag2() const