Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 #define INCLXX_IN_GEANT4_MODE 1
34 
35 #include "globals.hh"
36 
38 #include "G4INCLRootFinder.hh"
39 #include "G4INCLIntersection.hh"
40 #include <algorithm>
41 
42 namespace G4INCL {
43 
45  :theNucleus(n), theParticle(p)
46  {}
47 
49  {}
50 
52  // Behaves slightly differency if a third body (the projectile) is present
53  G4bool isNN = theNucleus->isNucleusNucleusCollision();
54 
55  /* Corrections to the energy of the entering nucleon
56  *
57  * In particle-nucleus reactions, the goal of this correction is to satisfy
58  * energy conservation in particle-nucleus reactions using real particle
59  * and nuclear masses.
60  *
61  * In nucleus-nucleus reactions, in addition to the above, the correction
62  * is determined by a model for the excitation energy of the
63  * quasi-projectile (QP). The energy of the entering nucleon is such that
64  * the QP excitation energy, as determined by conservation, is what given
65  * by our model.
66  *
67  * Possible choices for the correction (or, equivalently, for the QP excitation energy):
68  * 1. the correction is 0. (same as in particle-nucleus);
69  * 2. the correction is the separation energy of the entering nucleon in
70  * the current QP;
71  * 3. the QP excitation energy is given by A. Boudard's algorithm, as
72  * implemented in INCL4.2-HI/Geant4.
73  *
74  * Ideally, the QP excitation energy should always be >=0. Algorithms 1.
75  * and 2. do not guarantee this, although violations to the rule seem to be
76  * more severe for 1. than for 2.. Algorithm 3., by construction, yields
77  * non-negative QP excitation energies.
78  */
79  G4double theCorrection;
80  if(isNN) {
81 // assert(theParticle->isNucleon());
82  ProjectileRemnant * const projectileRemnant = theNucleus->getProjectileRemnant();
83 // assert(projectileRemnant);
84 
85  // No correction (model 1. above)
86  /*
87  theCorrection = theParticle->getEmissionQValueCorrection(
88  theNucleus->getA() + theParticle->getA(),
89  theNucleus->getZ() + theParticle->getZ())
90  + theParticle->getTableMass() - theParticle->getINCLMass();
91  const G4double theProjectileCorrection = 0.;
92  */
93 
94  // Correct the energy of the entering particle for the Q-value of the
95  // emission from the projectile (model 2. above)
96  /*
97  theCorrection = theParticle->getTransferQValueCorrection(
98  projectileRemnant->getA(), projectileRemnant->getZ(),
99  theNucleus->getA(), theNucleus->getZ());
100  G4double theProjectileCorrection;
101  if(projectileRemnant->getA()>theParticle->getA()) { // if there are any particles left
102  // Compute the projectile Q-value (to be used as a correction to the
103  // other components of the projectile remnant)
104  theProjectileCorrection = ParticleTable::getTableQValue(
105  projectileRemnant->getA() - theParticle->getA(),
106  projectileRemnant->getZ() - theParticle->getZ(),
107  theParticle->getA(),
108  theParticle->getZ());
109  } else
110  theProjectileCorrection = 0.;
111  */
112 
113  // Fix the correction in such a way that the quasi-projectile excitation
114  // energy is given by A. Boudard's INCL4.2-HI model.
115  const G4double theProjectileExcitationEnergy =
116  (projectileRemnant->getA()-theParticle->getA()>1) ?
117  (projectileRemnant->computeExcitationEnergy(theParticle->getID())) :
118  0.;
119  const G4double theProjectileEffectiveMass =
120  ParticleTable::getTableMass(projectileRemnant->getA() - theParticle->getA(), projectileRemnant->getZ() - theParticle->getZ())
121  + theProjectileExcitationEnergy;
122  const ThreeVector &theProjectileMomentum = projectileRemnant->getMomentum() - theParticle->getMomentum();
123  const G4double theProjectileEnergy = std::sqrt(theProjectileMomentum.mag2() + theProjectileEffectiveMass*theProjectileEffectiveMass);
124  const G4double theProjectileCorrection = theProjectileEnergy - (projectileRemnant->getEnergy() - theParticle->getEnergy());
125  theCorrection = theParticle->getEmissionQValueCorrection(
126  theNucleus->getA() + theParticle->getA(),
127  theNucleus->getZ() + theParticle->getZ())
128  + theParticle->getTableMass() - theParticle->getINCLMass()
129  + theProjectileCorrection;
130 
131  projectileRemnant->removeParticle(theParticle, theProjectileCorrection);
132  } else {
133  const G4int ACN = theNucleus->getA() + theParticle->getA();
134  const G4int ZCN = theNucleus->getZ() + theParticle->getZ();
135  // Correction to the Q-value of the entering particle
136  theCorrection = theParticle->getEmissionQValueCorrection(ACN,ZCN);
137  DEBUG("The following Particle enters with correction " << theCorrection
138  << theParticle->print() << std::endl);
139  }
140 
141  const G4double energyBefore = theParticle->getEnergy() - theCorrection;
142  G4bool success = particleEnters(theCorrection);
143  FinalState *fs = new FinalState();
144  fs->addEnteringParticle(theParticle);
145 
146  if(!success) {
147  fs->makeParticleBelowZero();
148  } else if(theParticle->isNucleon() &&
149  theParticle->getKineticEnergy()<theNucleus->getPotential()->getFermiEnergy(theParticle)) {
150  // If the participant is a nucleon entering below its Fermi energy, force a
151  // compound nucleus
153  }
154 
155  fs->setTotalEnergyBeforeInteraction(energyBefore);
156  return fs;
157  }
158 
159  G4bool ParticleEntryChannel::particleEnters(const G4double theQValueCorrection) {
160 
161  // \todo{this is the place to add refraction}
162 
163  theParticle->setINCLMass(); // Will automatically put the particle on shell
164 
165  // Add the nuclear potential to the kinetic energy when entering the
166  // nucleus
167 
168  class IncomingEFunctor : public RootFunctor {
169  public:
170  IncomingEFunctor(Particle * const p, Nucleus const * const n, const G4double correction) :
171  RootFunctor(0., 1E6),
172  theParticle(p),
173  thePotential(n->getPotential()),
174  theEnergy(theParticle->getEnergy()),
175  theMass(theParticle->getMass()),
176  theQValueCorrection(correction),
177  theMomentum(theParticle->getMomentum())
178  {}
179  ~IncomingEFunctor() {}
180  G4double operator()(const G4double v) const {
181  G4double energyInside = std::max(theMass, theEnergy + v - theQValueCorrection);
182  theParticle->setEnergy(energyInside);
183  theParticle->setPotentialEnergy(v);
184  // Scale the particle momentum
185  theParticle->setMomentum(theMomentum); // keep the same direction
186  theParticle->adjustMomentumFromEnergy();
187  return v - thePotential->computePotentialEnergy(theParticle);
188  }
189  void cleanUp(const G4bool /*success*/) const {}
190  private:
191  Particle *theParticle;
192  NuclearPotential::INuclearPotential const *thePotential;
193  G4double theEnergy;
194  G4double theMass;
195  G4double theQValueCorrection;
196  ThreeVector theMomentum;
197  } theIncomingEFunctor(theParticle,theNucleus,theQValueCorrection);
198 
199  G4double v = theNucleus->getPotential()->computePotentialEnergy(theParticle);
200  if(theParticle->getKineticEnergy()+v-theQValueCorrection<0.) { // Particle entering below 0. Die gracefully
201  DEBUG("Particle " << theParticle->getID() << " is trying to enter below 0" << std::endl);
202  return false;
203  }
204  G4bool success = RootFinder::solve(&theIncomingEFunctor, v);
205  if(success) { // Apply the solution
206  std::pair<G4double,G4double> theSolution = RootFinder::getSolution();
207  theIncomingEFunctor(theSolution.first);
208  } else {
209  WARN("Couldn't compute the potential for incoming particle, root-finding algorithm failed." << std::endl);
210  }
211  return success;
212  }
213 
214 }
215