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

#include <G4INCLTransmissionChannel.hh>

Inheritance diagram for G4INCL::TransmissionChannel:
G4INCL::IChannel

Public Member Functions

void fillFinalState (FinalState *fs)
 
FinalStategetFinalState ()
 
 TransmissionChannel (Nucleus *n, Particle *p)
 
 TransmissionChannel (Nucleus *n, Particle *p, const G4double kOut, const G4double cosR)
 
 TransmissionChannel (Nucleus *n, Particle *p, const G4double TOut)
 
virtual ~TransmissionChannel ()
 

Private Member Functions

G4double initializeKineticEnergyOutside ()
 Kinetic energy of the transmitted particle. More...
 
void particleLeaves ()
 Modify particle that leaves the nucleus. More...
 

Private Attributes

const G4double cosRefractionAngle
 Cosine of the refraction angle. More...
 
const G4double kineticEnergyOutside
 Kinetic energy of the particle outside the nucleus. More...
 
const G4double pOutMag
 Momentum of the particle outside the nucleus. More...
 
const G4bool refraction
 True if refraction should be applied. More...
 
Nucleus *const theNucleus
 
Particle *const theParticle
 

Detailed Description

Definition at line 48 of file G4INCLTransmissionChannel.hh.

Constructor & Destructor Documentation

◆ TransmissionChannel() [1/3]

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

Definition at line 42 of file G4INCLTransmissionChannel.cc.

43 : theNucleus(nucleus), theParticle(particle),
44 refraction(false),
45 pOutMag(0.),
48 {}
G4double initializeKineticEnergyOutside()
Kinetic energy of the transmitted particle.
const G4double cosRefractionAngle
Cosine of the refraction angle.
const G4double pOutMag
Momentum of the particle outside the nucleus.
const G4double kineticEnergyOutside
Kinetic energy of the particle outside the nucleus.
const G4bool refraction
True if refraction should be applied.

◆ TransmissionChannel() [2/3]

G4INCL::TransmissionChannel::TransmissionChannel ( Nucleus n,
Particle p,
const G4double  TOut 
)

Definition at line 50 of file G4INCLTransmissionChannel.cc.

51 : theNucleus(nucleus), theParticle(particle),
52 refraction(false),
53 pOutMag(0.),
56 {}

◆ TransmissionChannel() [3/3]

G4INCL::TransmissionChannel::TransmissionChannel ( Nucleus n,
Particle p,
const G4double  kOut,
const G4double  cosR 
)

Definition at line 58 of file G4INCLTransmissionChannel.cc.

59 : theNucleus(nucleus), theParticle(particle),
60 refraction(true),
61 pOutMag(kOut),
64 {}

◆ ~TransmissionChannel()

G4INCL::TransmissionChannel::~TransmissionChannel ( )
virtual

Definition at line 66 of file G4INCLTransmissionChannel.cc.

66{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 113 of file G4INCLTransmissionChannel.cc.

113 {
114 G4double initialEnergy = 0.0;
115 initialEnergy = theParticle->getEnergy() - theParticle->getPotentialEnergy();
116 // Correction for real masses
117 const G4int AParent = theNucleus->getA();
118 const G4int ZParent = theNucleus->getZ();
119 const G4int SParent = theNucleus->getS();
120 initialEnergy += theParticle->getTableMass() - theParticle->getMass()
121 + theParticle->getEmissionQValueCorrection(AParent,ZParent,SParent);
123 fs->setTotalEnergyBeforeInteraction(initialEnergy);
124 fs->addOutgoingParticle(theParticle); // We write the particle down as outgoing
125 }
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
G4int getS() const
Returns the strangeness number.
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.
virtual G4double getTableMass() const
Get the tabulated particle mass.
G4double getMass() const
Get the cached particle mass.
G4int getA() const
Returns the baryon number.
void particleLeaves()
Modify particle that leaves the nucleus.

References G4INCL::FinalState::addOutgoingParticle(), G4INCL::Particle::getA(), G4INCL::Particle::getEmissionQValueCorrection(), G4INCL::Particle::getEnergy(), G4INCL::Particle::getMass(), G4INCL::Particle::getPotentialEnergy(), G4INCL::Particle::getS(), G4INCL::Particle::getTableMass(), G4INCL::Particle::getZ(), particleLeaves(), 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().

◆ initializeKineticEnergyOutside()

G4double G4INCL::TransmissionChannel::initializeKineticEnergyOutside ( )
private

Kinetic energy of the transmitted particle.

Calculate the kinetic energy of the particle outside the nucleus, if the value has not been provided as a pre-calculated argument to the constructor.

Definition at line 68 of file G4INCLTransmissionChannel.cc.

68 {
69 // The particle energy outside the nucleus. Subtract the nuclear
70 // potential from the kinetic energy when leaving the nucleus
74
75 // Correction for real masses
76 const G4int AParent = theNucleus->getA();
77 const G4int ZParent = theNucleus->getZ();
78 const G4int SParent = theNucleus->getS();
79 const G4double theQValueCorrection = theParticle->getEmissionQValueCorrection(AParent,ZParent,SParent);
80 TOut += theQValueCorrection;
81 return TOut;
82 }

References G4INCL::Particle::getA(), G4INCL::Particle::getEmissionQValueCorrection(), G4INCL::Particle::getEnergy(), G4INCL::Particle::getMass(), G4INCL::Particle::getPotentialEnergy(), G4INCL::Particle::getS(), G4INCL::Particle::getZ(), theNucleus, and theParticle.

◆ particleLeaves()

void G4INCL::TransmissionChannel::particleLeaves ( )
private

Modify particle that leaves the nucleus.

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

Definition at line 84 of file G4INCLTransmissionChannel.cc.

84 {
85
86 // Use the table mass in the outside world
89
90 if(refraction) {
91 // Change the momentum direction
92 // The magnitude of the particle momentum outside the nucleus will be
93 // fixed by the kineticEnergyOutside variable. This is done in order to
94 // avoid numerical inaccuracies.
95 const ThreeVector &position = theParticle->getPosition();
96 const G4double r2 = position.mag2();
97 ThreeVector normal;
98 if(r2>0.)
99 normal = position / std::sqrt(r2);
100
101 const ThreeVector &momentum = theParticle->getMomentum();
102
103 const ThreeVector pOut = normal * (pOutMag * cosRefractionAngle) + momentum - normal * normal.dot(momentum);
104// assert(std::fabs(pOut.mag()-pOutMag)<1.e-5);
105
107 }
108 // Scaling factor for the particle momentum
111 }
void setPotentialEnergy(G4double v)
Set the particle potential energy.
const G4INCL::ThreeVector & getPosition() const
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
const G4INCL::ThreeVector & getMomentum() const
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
void setEnergy(G4double energy)
void setTableMass()
Set the mass of the Particle to its table mass.
static double normal(HepRandomEngine *eptr)
Definition: RandPoisson.cc:79

References G4INCL::Particle::adjustMomentumFromEnergy(), cosRefractionAngle, G4INCL::Particle::getMass(), G4INCL::Particle::getMomentum(), G4INCL::Particle::getPosition(), kineticEnergyOutside, CLHEP::normal(), pOutMag, refraction, G4INCL::Particle::setEnergy(), G4INCL::Particle::setMomentum(), G4INCL::Particle::setPotentialEnergy(), G4INCL::Particle::setTableMass(), and theParticle.

Referenced by fillFinalState().

Field Documentation

◆ cosRefractionAngle

const G4double G4INCL::TransmissionChannel::cosRefractionAngle
private

Cosine of the refraction angle.

Definition at line 86 of file G4INCLTransmissionChannel.hh.

Referenced by particleLeaves().

◆ kineticEnergyOutside

const G4double G4INCL::TransmissionChannel::kineticEnergyOutside
private

Kinetic energy of the particle outside the nucleus.

Definition at line 83 of file G4INCLTransmissionChannel.hh.

Referenced by particleLeaves().

◆ pOutMag

const G4double G4INCL::TransmissionChannel::pOutMag
private

Momentum of the particle outside the nucleus.

Definition at line 80 of file G4INCLTransmissionChannel.hh.

Referenced by particleLeaves().

◆ refraction

const G4bool G4INCL::TransmissionChannel::refraction
private

True if refraction should be applied.

Definition at line 77 of file G4INCLTransmissionChannel.hh.

Referenced by particleLeaves().

◆ theNucleus

Nucleus* const G4INCL::TransmissionChannel::theNucleus
private

Definition at line 73 of file G4INCLTransmissionChannel.hh.

Referenced by fillFinalState(), and initializeKineticEnergyOutside().

◆ theParticle

Particle* const G4INCL::TransmissionChannel::theParticle
private

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