Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::CoulombNone Class Reference

#include <G4INCLCoulombNone.hh>

Inheritance diagram for G4INCL::CoulombNone:

Public Member Functions

 CoulombNone ()
virtual ~CoulombNone ()
ParticleEntryAvatarbringToSurface (Particle *const p, Nucleus *const n) const
 Position the particle on the surface of the nucleus.
ParticleEntryAvatarbringToSurfaceAbar (Particle *const p, Nucleus *const n) const
 Position the particle on the surface of the nucleus. ONLY FOR ANTIDEUTERON !!! This method does not perform any distortion.
IAvatarList bringToSurface (Cluster *const c, Nucleus *const n) const
 Position the cluster on the surface of the nucleus.
void distortOut (ParticleList const &, Nucleus const *const) const
 Modify the momenta of the outgoing particles.
G4double maxImpactParameter (ParticleSpecies const &p, const G4double, Nucleus const *const n) const
 Return the maximum impact parameter for Coulomb-distorted trajectories.
Public Member Functions inherited from G4INCL::ICoulomb
 ICoulomb ()
virtual ~ICoulomb ()

Detailed Description

Definition at line 55 of file G4INCLCoulombNone.hh.

Constructor & Destructor Documentation

◆ CoulombNone()

G4INCL::CoulombNone::CoulombNone ( )
inline

Definition at line 58 of file G4INCLCoulombNone.hh.

58{}

◆ ~CoulombNone()

virtual G4INCL::CoulombNone::~CoulombNone ( )
inlinevirtual

Definition at line 59 of file G4INCLCoulombNone.hh.

59{}

Member Function Documentation

◆ bringToSurface() [1/2]

IAvatarList G4INCL::CoulombNone::bringToSurface ( Cluster *const c,
Nucleus *const n ) const
virtual

Position the cluster on the surface of the nucleus.

This method does not perform any distortion.

Parameters
cincoming cluster
ndistorting nucleus

Implements G4INCL::ICoulomb.

Definition at line 68 of file G4INCLCoulombNone.cc.

68 {
69 // The avatar list that we will return
70 IAvatarList theAvatarList;
71
72 // Loop over the particles in the cluster
73 ParticleList const &projectiles = c->getParticles();
74 std::list<Intersection> theIntersections;
75 G4double theFirstEntryTime = 1E+60; // a large time
76 G4int theFirstID = 0;
77 for(ParticleIter p=projectiles.begin(), e=projectiles.end(); p!=e; ++p) {
78 // Check if the particle enters the nucleus
80 (*p)->getPosition(),
81 (*p)->getPropagationVelocity(),
82 n->getUniverseRadius()));
83 // Store the intersections
84 theIntersections.push_back(intersection);
85 if(intersection.exists) {
86 // Position the particle at the entry point
87 (*p)->setPosition(intersection.position);
88
89 // Keep track of the first entering particle
90 if(intersection.time < theFirstEntryTime) {
91 theFirstEntryTime = intersection.time;
92 theFirstID = (G4int)(*p)->getID();
93 }
94 }
95 }
96
97 std::list<Intersection>::const_iterator intIter = theIntersections.begin();
98 for(ParticleIter p=projectiles.begin(), e=projectiles.end(); p!=e; ++p, ++intIter) {
99
100 if((*intIter).exists) {
101 // If the particle enters the nucleus, generate a ParticleEntryAvatar
102 // for it and add it to the list of avatars that we will return
103 if((*p)->getID() == theFirstID) {
104 // The first particle always enters exactly at t=0 (in order to
105 // avoid negative entry times due to rounding)
106 theAvatarList.push_back(new ParticleEntryAvatar(0.0, n, *p));
107 } else
108 theAvatarList.push_back(new ParticleEntryAvatar(intIter->time - theFirstEntryTime, n, *p));
109 }
110
111 }
112
113 return theAvatarList;
114 }
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
Intersection getEarlierTrajectoryIntersection(const ThreeVector &x0, const ThreeVector &p, const G4double r)
Compute the first intersection of a straight particle trajectory with a sphere.
ParticleList::const_iterator ParticleIter
UnorderedVector< IAvatar * > IAvatarList
std::vector< Base * > ParticleList
Definition PoPI.hpp:186

◆ bringToSurface() [2/2]

ParticleEntryAvatar * G4INCL::CoulombNone::bringToSurface ( Particle *const p,
Nucleus *const n ) const
virtual

Position the particle on the surface of the nucleus.

This method does not perform any distortion.

Parameters
pincoming particle
ndistorting nucleus

Implements G4INCL::ICoulomb.

Definition at line 50 of file G4INCLCoulombNone.cc.

50 {
51 Intersection intersection = IntersectionFactory::getEarlierTrajectoryIntersection(p->getPosition(), p->getPropagationVelocity(), n->getUniverseRadius());
52 if(intersection.exists) { // If the particle enters the nucleus
53 p->setPosition(intersection.position);
54 return new ParticleEntryAvatar(0.0, n, p);
55 } else // If the particle does NOT enter the nucleus
56 return NULL;
57 }

◆ bringToSurfaceAbar()

ParticleEntryAvatar * G4INCL::CoulombNone::bringToSurfaceAbar ( Particle *const p,
Nucleus *const n ) const
virtual

Position the particle on the surface of the nucleus. ONLY FOR ANTIDEUTERON !!! This method does not perform any distortion.

Parameters
pincoming particle
ndistorting nucleus

Implements G4INCL::ICoulomb.

Definition at line 59 of file G4INCLCoulombNone.cc.

59 {
60 Intersection intersection = IntersectionFactory::getEarlierTrajectoryIntersection(p->getPosition(), p->getPropagationVelocity(), n->getUniverseRadius());
61 if(intersection.exists) { // If the particle enters the nucleus
62 p->setPosition(intersection.position);
63 return new ParticleEntryAvatar(0.001, n, p);
64 } else // If the particle does NOT enter the nucleus
65 return NULL;
66 }

◆ distortOut()

void G4INCL::CoulombNone::distortOut ( ParticleList const & ,
Nucleus const * const  ) const
inlinevirtual

Modify the momenta of the outgoing particles.

This method does not perform any distortion.

Implements G4INCL::ICoulomb.

Definition at line 92 of file G4INCLCoulombNone.hh.

92{}

◆ maxImpactParameter()

G4double G4INCL::CoulombNone::maxImpactParameter ( ParticleSpecies const & p,
const G4double ,
Nucleus const *const n ) const
inlinevirtual

Return the maximum impact parameter for Coulomb-distorted trajectories.

Implements G4INCL::ICoulomb.

Definition at line 96 of file G4INCLCoulombNone.hh.

97 {
98 if(p.theType == Composite || p.theType == antiComposite)
99 return 2.*ParticleTable::getLargestNuclearRadius(p.theA, p.theZ)
100 + n->getUniverseRadius();
101 else
102 return n->getUniverseRadius();
103 }
G4double getLargestNuclearRadius(const G4int A, const G4int Z)

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