G4INCLParticleEntryChannel.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // INCL++ intra-nuclear cascade model
00027 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
00028 // Davide Mancusi, CEA
00029 // Alain Boudard, CEA
00030 // Sylvie Leray, CEA
00031 // Joseph Cugnon, University of Liege
00032 //
00033 #define INCLXX_IN_GEANT4_MODE 1
00034 
00035 #include "globals.hh"
00036 
00037 #include "G4INCLParticleEntryChannel.hh"
00038 #include "G4INCLRootFinder.hh"
00039 #include "G4INCLIntersection.hh"
00040 #include <algorithm>
00041 
00042 namespace G4INCL {
00043 
00044   ParticleEntryChannel::ParticleEntryChannel(Nucleus *n, Particle *p)
00045     :theNucleus(n), theParticle(p)
00046   {}
00047 
00048   ParticleEntryChannel::~ParticleEntryChannel()
00049   {}
00050 
00051   FinalState* ParticleEntryChannel::getFinalState() {
00052     // Behaves slightly differency if a third body (the projectile) is present
00053     G4bool isNN = theNucleus->isNucleusNucleusCollision();
00054 
00055     /* Corrections to the energy of the entering nucleon
00056      *
00057      * In particle-nucleus reactions, the goal of this correction is to satisfy
00058      * energy conservation in particle-nucleus reactions using real particle
00059      * and nuclear masses.
00060      *
00061      * In nucleus-nucleus reactions, in addition to the above, the correction
00062      * is determined by a model for the excitation energy of the
00063      * quasi-projectile (QP). The energy of the entering nucleon is such that
00064      * the QP excitation energy, as determined by conservation, is what given
00065      * by our model.
00066      *
00067      * Possible choices for the correction (or, equivalently, for the QP excitation energy):
00068      * 1. the correction is 0. (same as in particle-nucleus);
00069      * 2. the correction is the separation energy of the entering nucleon in
00070      *    the current QP;
00071      * 3. the QP excitation energy is given by A. Boudard's algorithm, as
00072      *    implemented in INCL4.2-HI/Geant4.
00073      *
00074      * Ideally, the QP excitation energy should always be >=0. Algorithms 1.
00075      * and 2. do not guarantee this, although violations to the rule seem to be
00076      * more severe for 1. than for 2.. Algorithm 3., by construction, yields
00077      * non-negative QP excitation energies.
00078      */
00079     G4double theCorrection;
00080     if(isNN) {
00081 // assert(theParticle->isNucleon());
00082       ProjectileRemnant * const projectileRemnant = theNucleus->getProjectileRemnant();
00083 // assert(projectileRemnant);
00084 
00085       // No correction (model 1. above)
00086       /*
00087       theCorrection = theParticle->getEmissionQValueCorrection(
00088           theNucleus->getA() + theParticle->getA(),
00089           theNucleus->getZ() + theParticle->getZ())
00090         + theParticle->getTableMass() - theParticle->getINCLMass();
00091       const G4double theProjectileCorrection = 0.;
00092       */
00093 
00094       // Correct the energy of the entering particle for the Q-value of the
00095       // emission from the projectile (model 2. above)
00096       /*
00097       theCorrection = theParticle->getTransferQValueCorrection(
00098           projectileRemnant->getA(), projectileRemnant->getZ(),
00099           theNucleus->getA(), theNucleus->getZ());
00100       G4double theProjectileCorrection;
00101       if(projectileRemnant->getA()>theParticle->getA()) { // if there are any particles left
00102         // Compute the projectile Q-value (to be used as a correction to the
00103         // other components of the projectile remnant)
00104         theProjectileCorrection = ParticleTable::getTableQValue(
00105             projectileRemnant->getA() - theParticle->getA(),
00106             projectileRemnant->getZ() - theParticle->getZ(),
00107             theParticle->getA(),
00108             theParticle->getZ());
00109       } else
00110         theProjectileCorrection = 0.;
00111       */
00112 
00113       // Fix the correction in such a way that the quasi-projectile excitation
00114       // energy is given by A. Boudard's INCL4.2-HI model.
00115       const G4double theProjectileExcitationEnergy =
00116        (projectileRemnant->getA()-theParticle->getA()>1) ?
00117        (projectileRemnant->computeExcitationEnergy(theParticle->getID())) :
00118        0.;
00119       const G4double theProjectileEffectiveMass =
00120         ParticleTable::getTableMass(projectileRemnant->getA() - theParticle->getA(), projectileRemnant->getZ() - theParticle->getZ())
00121         + theProjectileExcitationEnergy;
00122       const ThreeVector &theProjectileMomentum = projectileRemnant->getMomentum() - theParticle->getMomentum();
00123       const G4double theProjectileEnergy = std::sqrt(theProjectileMomentum.mag2() + theProjectileEffectiveMass*theProjectileEffectiveMass);
00124       const G4double theProjectileCorrection = theProjectileEnergy - (projectileRemnant->getEnergy() - theParticle->getEnergy());
00125       theCorrection = theParticle->getEmissionQValueCorrection(
00126           theNucleus->getA() + theParticle->getA(),
00127           theNucleus->getZ() + theParticle->getZ())
00128         + theParticle->getTableMass() - theParticle->getINCLMass()
00129         + theProjectileCorrection;
00130 
00131       projectileRemnant->removeParticle(theParticle, theProjectileCorrection);
00132     } else {
00133       const G4int ACN = theNucleus->getA() + theParticle->getA();
00134       const G4int ZCN = theNucleus->getZ() + theParticle->getZ();
00135       // Correction to the Q-value of the entering particle
00136       theCorrection = theParticle->getEmissionQValueCorrection(ACN,ZCN);
00137       DEBUG("The following Particle enters with correction " << theCorrection
00138           << theParticle->print() << std::endl);
00139     }
00140 
00141     const G4double energyBefore = theParticle->getEnergy() - theCorrection;
00142     G4bool success = particleEnters(theCorrection);
00143     FinalState *fs = new FinalState();
00144     fs->addEnteringParticle(theParticle);
00145 
00146     if(!success) {
00147       fs->makeParticleBelowZero();
00148     } else if(theParticle->isNucleon() &&
00149         theParticle->getKineticEnergy()<theNucleus->getPotential()->getFermiEnergy(theParticle)) {
00150       // If the participant is a nucleon entering below its Fermi energy, force a
00151       // compound nucleus
00152       fs->makeParticleBelowFermi();
00153     }
00154 
00155     fs->setTotalEnergyBeforeInteraction(energyBefore);
00156     return fs;
00157   }
00158 
00159   G4bool ParticleEntryChannel::particleEnters(const G4double theQValueCorrection) {
00160 
00161     // \todo{this is the place to add refraction}
00162 
00163     theParticle->setINCLMass(); // Will automatically put the particle on shell
00164 
00165     // Add the nuclear potential to the kinetic energy when entering the
00166     // nucleus
00167 
00168     class IncomingEFunctor : public RootFunctor {
00169       public:
00170         IncomingEFunctor(Particle * const p, Nucleus const * const n, const G4double correction) :
00171           RootFunctor(0., 1E6),
00172           theParticle(p),
00173           thePotential(n->getPotential()),
00174           theEnergy(theParticle->getEnergy()),
00175           theMass(theParticle->getMass()),
00176           theQValueCorrection(correction),
00177           theMomentum(theParticle->getMomentum())
00178           {}
00179         ~IncomingEFunctor() {}
00180         G4double operator()(const G4double v) const {
00181           G4double energyInside = std::max(theMass, theEnergy + v - theQValueCorrection);
00182           theParticle->setEnergy(energyInside);
00183           theParticle->setPotentialEnergy(v);
00184           // Scale the particle momentum
00185           theParticle->setMomentum(theMomentum); // keep the same direction
00186           theParticle->adjustMomentumFromEnergy();
00187           return v - thePotential->computePotentialEnergy(theParticle);
00188         }
00189         void cleanUp(const G4bool /*success*/) const {}
00190       private:
00191         Particle *theParticle;
00192         NuclearPotential::INuclearPotential const *thePotential;
00193         G4double theEnergy;
00194         G4double theMass;
00195         G4double theQValueCorrection;
00196         ThreeVector theMomentum;
00197     } theIncomingEFunctor(theParticle,theNucleus,theQValueCorrection);
00198 
00199     G4double v = theNucleus->getPotential()->computePotentialEnergy(theParticle);
00200     if(theParticle->getKineticEnergy()+v-theQValueCorrection<0.) { // Particle entering below 0. Die gracefully
00201       DEBUG("Particle " << theParticle->getID() << " is trying to enter below 0" << std::endl);
00202       return false;
00203     }
00204     G4bool success = RootFinder::solve(&theIncomingEFunctor, v);
00205     if(success) { // Apply the solution
00206       std::pair<G4double,G4double> theSolution = RootFinder::getSolution();
00207       theIncomingEFunctor(theSolution.first);
00208     } else {
00209       WARN("Couldn't compute the potential for incoming particle, root-finding algorithm failed." << std::endl);
00210     }
00211     return success;
00212   }
00213 
00214 }
00215 

Generated on Mon May 27 17:48:36 2013 for Geant4 by  doxygen 1.4.7