Geant4  10.02.p03
G4INCL::TransmissionChannel Class Reference

#include <G4INCLTransmissionChannel.hh>

Inheritance diagram for G4INCL::TransmissionChannel:
Collaboration diagram for G4INCL::TransmissionChannel:

Public Member Functions

 TransmissionChannel (Nucleus *n, Particle *p)
 
 TransmissionChannel (Nucleus *n, Particle *p, const G4double TOut)
 
 TransmissionChannel (Nucleus *n, Particle *p, const G4double kOut, const G4double cosR)
 
virtual ~TransmissionChannel ()
 
void fillFinalState (FinalState *fs)
 
- Public Member Functions inherited from G4INCL::IChannel
 IChannel ()
 
virtual ~IChannel ()
 
FinalStategetFinalState ()
 
 INCL_DECLARE_ALLOCATION_POOL (IChannel)
 

Private Member Functions

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

Private Attributes

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

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  {}
const G4double cosRefractionAngle
Cosine of the refraction angle.
const G4bool refraction
True if refraction should be applied.
const G4double pOutMag
Momentum of the particle outside the nucleus.
const G4double kineticEnergyOutside
Kinetic energy of the particle outside the nucleus.
G4double initializeKineticEnergyOutside()
Kinetic energy of the transmitted particle.

◆ 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  {}
const G4double cosRefractionAngle
Cosine of the refraction angle.
const G4bool refraction
True if refraction should be applied.
const G4double pOutMag
Momentum of the particle outside the nucleus.
const G4double kineticEnergyOutside
Kinetic energy of the particle outside the nucleus.

◆ 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),
63  cosRefractionAngle(cosR)
64  {}
const G4double cosRefractionAngle
Cosine of the refraction angle.
const G4bool refraction
True if refraction should be applied.
const G4double pOutMag
Momentum of the particle outside the nucleus.
const G4double kineticEnergyOutside
Kinetic energy of the particle outside the nucleus.
G4double initializeKineticEnergyOutside()
Kinetic energy of the transmitted particle.

◆ ~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 112 of file G4INCLTransmissionChannel.cc.

112  {
113  G4double initialEnergy = 0.0;
114  initialEnergy = theParticle->getEnergy() - theParticle->getPotentialEnergy();
115 
116  // Correction for real masses
117  const G4int AParent = theNucleus->getA();
118  const G4int ZParent = theNucleus->getZ();
119  initialEnergy += theParticle->getTableMass() - theParticle->getMass()
120  + theParticle->getEmissionQValueCorrection(AParent,ZParent);
121 
122  particleLeaves();
123 
124  fs->setTotalEnergyBeforeInteraction(initialEnergy);
125  fs->addOutgoingParticle(theParticle); // We write the particle down as outgoing
126  }
G4double getEnergy() const
G4double getMass() const
Get the cached particle mass.
void particleLeaves()
Modify particle that leaves the nucleus.
G4int getA() const
Returns the baryon number.
G4int getZ() const
Returns the charge number.
int G4int
Definition: G4Types.hh:78
virtual G4double getTableMass() const
Get the tabulated particle mass.
G4double getPotentialEnergy() const
Get the particle potential energy.
double G4double
Definition: G4Types.hh:76
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
Here is the call graph for this function:

◆ INCL_DECLARE_ALLOCATION_POOL()

G4INCL::TransmissionChannel::INCL_DECLARE_ALLOCATION_POOL ( TransmissionChannel  )
private

◆ 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
73  - theParticle->getMass();
74 
75  // Correction for real masses
76  const G4int AParent = theNucleus->getA();
77  const G4int ZParent = theNucleus->getZ();
78  const G4double theQValueCorrection = theParticle->getEmissionQValueCorrection(AParent,ZParent);
79  TOut += theQValueCorrection;
80  return TOut;
81  }
G4double getEnergy() const
G4double getMass() const
Get the cached particle mass.
G4int getA() const
Returns the baryon number.
G4int getZ() const
Returns the charge number.
int G4int
Definition: G4Types.hh:78
G4double getPotentialEnergy() const
Get the particle potential energy.
double G4double
Definition: G4Types.hh:76
G4double getEmissionQValueCorrection(const G4int AParent, const G4int ZParent) const
Computes correction on the emission Q-value.
Here is the call graph for this function:

◆ 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 83 of file G4INCLTransmissionChannel.cc.

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

Member Data Documentation

◆ cosRefractionAngle

const G4double G4INCL::TransmissionChannel::cosRefractionAngle
private

Cosine of the refraction angle.

Definition at line 86 of file G4INCLTransmissionChannel.hh.

◆ kineticEnergyOutside

const G4double G4INCL::TransmissionChannel::kineticEnergyOutside
private

Kinetic energy of the particle outside the nucleus.

Definition at line 83 of file G4INCLTransmissionChannel.hh.

◆ pOutMag

const G4double G4INCL::TransmissionChannel::pOutMag
private

Momentum of the particle outside the nucleus.

Definition at line 80 of file G4INCLTransmissionChannel.hh.

◆ refraction

const G4bool G4INCL::TransmissionChannel::refraction
private

True if refraction should be applied.

Definition at line 77 of file G4INCLTransmissionChannel.hh.

◆ theNucleus

Nucleus* const G4INCL::TransmissionChannel::theNucleus
private

Definition at line 73 of file G4INCLTransmissionChannel.hh.

◆ theParticle

Particle* const G4INCL::TransmissionChannel::theParticle
private

Definition at line 74 of file G4INCLTransmissionChannel.hh.


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