Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLTransmissionChannel.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
41namespace G4INCL {
42
44 : theNucleus(nucleus), theParticle(particle)
45 {}
46
48
49 G4double TransmissionChannel::particleLeaves() {
50
51 // \todo{this is the place to add refraction}
52
53 // The particle energy outside the nucleus. Subtract the nuclear
54 // potential from the kinetic energy when leaving the nucleus
55 G4double kineticEnergyOutside = theParticle->getEnergy()
56 - theParticle->getPotentialEnergy()
57 - theParticle->getMass();
58
59 // Correction for real masses
60 const G4int AParent = theNucleus->getA();
61 const G4int ZParent = theNucleus->getZ();
62 const G4double theQValueCorrection = theParticle->getEmissionQValueCorrection(AParent,ZParent);
63 kineticEnergyOutside += theQValueCorrection;
64 theParticle->setTableMass();
65
66 // Scaling factor for the particle momentum
67 theParticle->setEnergy(kineticEnergyOutside + theParticle->getMass());
68 theParticle->adjustMomentumFromEnergy();
69 theParticle->setPotentialEnergy(0.);
70
71 return theQValueCorrection;
72 }
73
75 FinalState *fs = new FinalState;
76 G4double initialEnergy = 0.0;
77 initialEnergy = theParticle->getEnergy() - theParticle->getPotentialEnergy();
78
79 // Correction for real masses
80 initialEnergy += theParticle->getTableMass() - theParticle->getMass();
81
82 const G4double theQValueCorrection = particleLeaves();
83 fs->setTotalEnergyBeforeInteraction(initialEnergy + theQValueCorrection);
84 fs->addOutgoingParticle(theParticle); // We write the particle down as outgoing
85 return fs;
86 }
87}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
void setTotalEnergyBeforeInteraction(G4double E)
void addOutgoingParticle(Particle *p)
void setPotentialEnergy(G4double v)
Set the particle potential energy.
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
G4double getEnergy() const
G4double getPotentialEnergy() const
Get the particle potential energy.
G4int getZ() const
Returns the charge number.
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
virtual G4double getTableMass() const
Get the tabulated particle mass.
void setEnergy(G4double energy)
G4double getMass() const
Get the cached particle mass.
void setTableMass()
Set the mass of the Particle to its table mass.
G4int getA() const
Returns the baryon number.
TransmissionChannel(Nucleus *n, Particle *p)