Geant4-11
Public Member Functions | Private Member Functions | Private Attributes
G4INCL::ParticleEntryChannel Class Reference

#include <G4INCLParticleEntryChannel.hh>

Inheritance diagram for G4INCL::ParticleEntryChannel:
G4INCL::IChannel

Public Member Functions

void fillFinalState (FinalState *fs)
 
FinalStategetFinalState ()
 
 ParticleEntryChannel (Nucleus *n, Particle *p)
 
virtual ~ParticleEntryChannel ()
 

Private Member Functions

G4bool particleEnters (const G4double theQValueCorrection)
 Modify particle that enters the nucleus. More...
 

Private Attributes

NucleustheNucleus
 
ParticletheParticle
 

Detailed Description

Definition at line 49 of file G4INCLParticleEntryChannel.hh.

Constructor & Destructor Documentation

◆ ParticleEntryChannel()

G4INCL::ParticleEntryChannel::ParticleEntryChannel ( Nucleus n,
Particle p 
)

◆ ~ParticleEntryChannel()

G4INCL::ParticleEntryChannel::~ParticleEntryChannel ( )
virtual

Definition at line 49 of file G4INCLParticleEntryChannel.cc.

50 {}

Member Function Documentation

◆ fillFinalState()

void G4INCL::ParticleEntryChannel::fillFinalState ( FinalState fs)
virtual

Implements G4INCL::IChannel.

Definition at line 52 of file G4INCLParticleEntryChannel.cc.

52 {
53 // Behaves slightly differency if a third body (the projectile) is present
55
56 /* Corrections to the energy of the entering particle
57 *
58 * In particle-nucleus reactions, the goal of this correction is to satisfy
59 * energy conservation in particle-nucleus reactions using real particle
60 * and nuclear masses.
61 *
62 * In nucleus-nucleus reactions, in addition to the above, the correction
63 * is determined by a model for the excitation energy of the
64 * quasi-projectile (QP). The energy of the entering nucleon is such that
65 * the QP excitation energy, as determined by conservation, is what given
66 * by our model.
67 *
68 * Possible choices for the correction (or, equivalently, for the QP
69 * excitation energy):
70 *
71 * 1. the correction is 0. (same as in particle-nucleus);
72 * 2. the correction is the separation energy of the entering nucleon in
73 * the current QP;
74 * 3. the QP excitation energy is given by A. Boudard's algorithm, as
75 * implemented in INCL4.2-HI/Geant4.
76 * 4. the QP excitation energy vanishes.
77 *
78 * Ideally, the QP excitation energy should always be >=0. Algorithms 1.
79 * and 2. do not guarantee this, although violations to the rule seem to be
80 * more severe for 1. than for 2.. Algorithms 3. and 4., by construction,
81 * yields non-negative QP excitation energies.
82 */
83 G4double theCorrection;
84 if(isNN) {
85// assert(theParticle->isNucleonorLambda()); // Possible hypernucleus projectile of inverse kinematic
86 ProjectileRemnant * const projectileRemnant = theNucleus->getProjectileRemnant();
87// assert(projectileRemnant);
88
89 // No correction (model 1. above)
90 /*
91 theCorrection = theParticle->getEmissionQValueCorrection(
92 theNucleus->getA() + theParticle->getA(),
93 theNucleus->getZ() + theParticle->getZ())
94 + theParticle->getTableMass() - theParticle->getINCLMass();
95 const G4double theProjectileCorrection = 0.;
96 */
97
98 // Correct the energy of the entering particle for the Q-value of the
99 // emission from the projectile (model 2. above)
100 /*
101 theCorrection = theParticle->getTransferQValueCorrection(
102 projectileRemnant->getA(), projectileRemnant->getZ(),
103 theNucleus->getA(), theNucleus->getZ());
104 G4double theProjectileCorrection;
105 if(projectileRemnant->getA()>theParticle->getA()) { // if there are any particles left
106 // Compute the projectile Q-value (to be used as a correction to the
107 // other components of the projectile remnant)
108 theProjectileCorrection = ParticleTable::getTableQValue(
109 projectileRemnant->getA() - theParticle->getA(),
110 projectileRemnant->getZ() - theParticle->getZ(),
111 theParticle->getA(),
112 theParticle->getZ());
113 } else
114 theProjectileCorrection = 0.;
115 */
116
117 // Fix the correction in such a way that the quasi-projectile excitation
118 // energy is given by A. Boudard's INCL4.2-HI model (model 3. above).
119 const G4double theProjectileExcitationEnergy =
120 (projectileRemnant->getA()-theParticle->getA()>1) ?
121 (projectileRemnant->computeExcitationEnergyExcept(theParticle->getID())) :
122 0.;
123 // Set the projectile excitation energy to zero (cold quasi-projectile,
124 // model 4. above).
125 // const G4double theProjectileExcitationEnergy = 0.;
126 // The part that follows is common to model 3. and 4.
127 const G4double theProjectileEffectiveMass =
128 ParticleTable::getTableMass(projectileRemnant->getA() - theParticle->getA(), projectileRemnant->getZ() - theParticle->getZ(), projectileRemnant->getS() - theParticle->getS())
129 + theProjectileExcitationEnergy;
130 const ThreeVector &theProjectileMomentum = projectileRemnant->getMomentum() - theParticle->getMomentum();
131 const G4double theProjectileEnergy = std::sqrt(theProjectileMomentum.mag2() + theProjectileEffectiveMass*theProjectileEffectiveMass);
132 const G4double theProjectileCorrection = theProjectileEnergy - (projectileRemnant->getEnergy() - theParticle->getEnergy());
138 + theProjectileCorrection;
139 // end of part common to model 3. and 4.
140
141
142 projectileRemnant->removeParticle(theParticle, theProjectileCorrection);
143 } else {
144 const G4int ACN = theNucleus->getA() + theParticle->getA();
145 const G4int ZCN = theNucleus->getZ() + theParticle->getZ();
146 const G4int SCN = theNucleus->getS() + theParticle->getS();
147 // Correction to the Q-value of the entering particle
148 if(theParticle->isKaon()) theCorrection = theParticle->getEmissionQValueCorrection(ACN,ZCN,theNucleus->getS());
149 else theCorrection = theParticle->getEmissionQValueCorrection(ACN,ZCN,SCN);
150 INCL_DEBUG("The following Particle enters with correction " << theCorrection << '\n'
151 << theParticle->print() << '\n');
152 }
153
154 const G4double energyBefore = theParticle->getEnergy() - theCorrection;
155 G4bool success = particleEnters(theCorrection);
156 fs->addEnteringParticle(theParticle);
157
158 if(!success) {
159 fs->makeParticleBelowZero();
160 } else if(theParticle->isNucleonorLambda() &&
162 // If the participant is a nucleon entering below its Fermi energy, force a
163 // compound nucleus
164 fs->makeParticleBelowFermi();
166
167 fs->setTotalEnergyBeforeInteraction(energyBefore);
168 }
#define INCL_DEBUG(x)
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4double getFermiEnergy(const Particle *const p) const
Return the Fermi energy for a particle.
ProjectileRemnant * getProjectileRemnant() const
Get the projectile remnant.
G4bool isNucleusNucleusCollision() const
Is it a nucleus-nucleus collision?
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
G4bool particleEnters(const G4double theQValueCorrection)
Modify particle that enters the nucleus.
G4double getINCLMass() const
Get the INCL particle mass.
G4int getS() const
Returns the strangeness number.
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
void setNumberOfKaon(const G4int NK)
G4double getEnergy() const
G4bool isNucleonorLambda() const
Is this a Nucleon or a Lambda?
G4int getZ() const
Returns the charge number.
G4double getKineticEnergy() const
Get the particle kinetic energy.
const G4INCL::ThreeVector & getMomentum() const
G4bool isKaon() const
Is this a Kaon?
G4int getNumberOfKaon() const
Number of Kaon inside de nucleus.
virtual G4double getTableMass() const
Get the tabulated particle mass.
std::string print() const
long getID() const
G4int getA() const
Returns the baryon number.
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.

References G4INCL::FinalState::addEnteringParticle(), G4INCL::ProjectileRemnant::computeExcitationEnergyExcept(), G4INCL::Particle::getA(), G4INCL::Particle::getEmissionQValueCorrection(), G4INCL::Particle::getEnergy(), G4INCL::NuclearPotential::INuclearPotential::getFermiEnergy(), G4INCL::Particle::getID(), G4INCL::Particle::getINCLMass(), G4INCL::Particle::getKineticEnergy(), G4INCL::Particle::getMomentum(), G4INCL::Particle::getNumberOfKaon(), G4INCL::Nucleus::getPotential(), G4INCL::Nucleus::getProjectileRemnant(), G4INCL::Particle::getS(), G4INCL::Particle::getTableMass(), G4INCL::ParticleTable::getTableMass, G4INCL::Particle::getZ(), INCL_DEBUG, G4INCL::Particle::isKaon(), G4INCL::Particle::isNucleonorLambda(), G4INCL::Nucleus::isNucleusNucleusCollision(), G4INCL::ThreeVector::mag2(), G4INCL::FinalState::makeParticleBelowFermi(), G4INCL::FinalState::makeParticleBelowZero(), particleEnters(), G4INCL::Particle::print(), G4INCL::ProjectileRemnant::removeParticle(), G4INCL::Particle::setNumberOfKaon(), G4INCL::FinalState::setTotalEnergyBeforeInteraction(), theNucleus, and theParticle.

◆ getFinalState()

FinalState * G4INCL::IChannel::getFinalState ( )
inherited

Definition at line 50 of file G4INCLIChannel.cc.

50 {
51 FinalState *fs = new FinalState;
53 return fs;
54 }
virtual void fillFinalState(FinalState *fs)=0

References G4INCL::IChannel::fillFinalState().

◆ particleEnters()

G4bool G4INCL::ParticleEntryChannel::particleEnters ( const G4double  theQValueCorrection)
private

Modify particle that enters the nucleus.

Modify the particle momentum and/or position when the particle enters the nucleus.

Returns
false if the particle enters below 0 total energy.

Definition at line 170 of file G4INCLParticleEntryChannel.cc.

170 {
171
172 // \todo{this is the place to add refraction}
173
174 theParticle->setINCLMass(); // Will automatically put the particle on shell
175
176 // Add the nuclear potential to the kinetic energy when entering the
177 // nucleus
178
179 class IncomingEFunctor : public RootFunctor {
180 public:
181 IncomingEFunctor(Particle * const p, Nucleus const * const n, const G4double correction) :
182 RootFunctor(0., 1E6),
183 theParticle(p),
184 thePotential(n->getPotential()),
185 theEnergy(theParticle->getEnergy()),
186 theMass(theParticle->getMass()),
187 theQValueCorrection(correction),
188 refraction(n->getStore()->getConfig()->getRefraction()),
189 theMomentumDirection(theParticle->getMomentum())
190 {
191 if(refraction) {
192 const ThreeVector &position = theParticle->getPosition();
193 const G4double r2 = position.mag2();
194 if(r2>0.)
195 normal = - position / std::sqrt(r2);
196 G4double cosIncidenceAngle = theParticle->getCosRPAngle();
197 if(cosIncidenceAngle < -1.)
198 sinIncidenceAnglePOut = 0.;
199 else
200 sinIncidenceAnglePOut = theMomentumDirection.mag()*std::sqrt(1.-cosIncidenceAngle*cosIncidenceAngle);
201 } else {
202 sinIncidenceAnglePOut = 0.;
203 }
204 }
205 ~IncomingEFunctor() {}
206 G4double operator()(const G4double v) const {
207 G4double energyInside = std::max(theMass, theEnergy + v - theQValueCorrection);
208 theParticle->setEnergy(energyInside);
210 if(refraction) {
211 // Compute the new direction of the particle momentum
212 const G4double pIn = std::sqrt(energyInside*energyInside-theMass*theMass);
213 const G4double sinRefractionAngle = sinIncidenceAnglePOut/pIn;
214 const G4double cosRefractionAngle = (sinRefractionAngle>1.) ? 0. : std::sqrt(1.-sinRefractionAngle*sinRefractionAngle);
215 const ThreeVector momentumInside = theMomentumDirection - normal * normal.dot(theMomentumDirection) + normal * (pIn * cosRefractionAngle);
216 theParticle->setMomentum(momentumInside);
217 } else {
218 theParticle->setMomentum(theMomentumDirection); // keep the same direction
219 }
220 // Scale the particle momentum
222 return v - thePotential->computePotentialEnergy(theParticle);
223 }
224 void cleanUp(const G4bool /*success*/) const {}
225 private:
226 Particle *theParticle;
227 NuclearPotential::INuclearPotential const *thePotential;
228 const G4double theEnergy;
229 const G4double theMass;
230 const G4double theQValueCorrection;
231 const G4bool refraction;
232 const ThreeVector theMomentumDirection;
233 ThreeVector normal;
234 G4double sinIncidenceAnglePOut;
235 } theIncomingEFunctor(theParticle,theNucleus,theQValueCorrection);
236
238 if(theParticle->getKineticEnergy()+v-theQValueCorrection<0.) { // Particle entering below 0. Die gracefully
239 INCL_DEBUG("Particle " << theParticle->getID() << " is trying to enter below 0" << '\n');
240 return false;
241 }
242 const RootFinder::Solution theSolution = RootFinder::solve(&theIncomingEFunctor, v);
243 if(theSolution.success) { // Apply the solution
244 theIncomingEFunctor(theSolution.x);
245 INCL_DEBUG("Particle successfully entered:\n" << theParticle->print() << '\n');
246 } else {
247 INCL_WARN("Couldn't compute the potential for incoming particle, root-finding algorithm failed." << '\n');
248 }
249 return theSolution.success;
250 }
#define INCL_WARN(x)
virtual G4double computePotentialEnergy(const Particle *const p) const =0
void setPotentialEnergy(G4double v)
Set the particle potential energy.
const G4INCL::ThreeVector & getPosition() const
G4double getCosRPAngle() const
Get the cosine of the angle between position and momentum.
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
void setINCLMass()
Set the mass of the Particle to its table mass.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
void setEnergy(G4double energy)
static double normal(HepRandomEngine *eptr)
Definition: RandPoisson.cc:79
T max(const T t1, const T t2)
brief Return the largest of the two arguments
Solution solve(RootFunctor const *const f, const G4double x0)
Numerically solve a one-dimensional equation.

References G4INCL::Particle::adjustMomentumFromEnergy(), G4INCL::NuclearPotential::INuclearPotential::computePotentialEnergy(), G4INCL::Particle::getCosRPAngle(), G4INCL::Particle::getEnergy(), G4INCL::Particle::getID(), G4INCL::Particle::getKineticEnergy(), G4INCL::Particle::getMass(), G4INCL::Particle::getMomentum(), G4INCL::Particle::getPosition(), G4INCL::Nucleus::getPotential(), INCL_DEBUG, INCL_WARN, G4INCL::Math::max(), CLHEP::detail::n, CLHEP::normal(), G4INCL::Particle::print(), G4INCL::Particle::setEnergy(), G4INCL::Particle::setINCLMass(), G4INCL::Particle::setMomentum(), G4INCL::Particle::setPotentialEnergy(), G4INCL::RootFinder::solve(), G4INCL::RootFinder::Solution::success, theNucleus, theParticle, and G4INCL::RootFinder::Solution::x.

Referenced by fillFinalState().

Field Documentation

◆ theNucleus

Nucleus* G4INCL::ParticleEntryChannel::theNucleus
private

Definition at line 66 of file G4INCLParticleEntryChannel.hh.

Referenced by fillFinalState(), and particleEnters().

◆ theParticle

Particle* G4INCL::ParticleEntryChannel::theParticle
private

Definition at line 67 of file G4INCLParticleEntryChannel.hh.

Referenced by fillFinalState(), and particleEnters().


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