Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4INCL::CoulombNone Class Reference

#include <G4INCLCoulombNone.hh>

Inheritance diagram for G4INCL::CoulombNone:
G4INCL::ICoulomb

Public Member Functions

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

Detailed Description

Definition at line 54 of file G4INCLCoulombNone.hh.

Constructor & Destructor Documentation

G4INCL::CoulombNone::CoulombNone ( )
inline

Definition at line 57 of file G4INCLCoulombNone.hh.

57 {}
virtual G4INCL::CoulombNone::~CoulombNone ( )
inlinevirtual

Definition at line 58 of file G4INCLCoulombNone.hh.

58 {}

Member Function Documentation

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 49 of file G4INCLCoulombNone.cc.

References G4INCL::Intersection::exists, G4INCL::IntersectionFactory::getEarlierTrajectoryIntersection(), G4INCL::Particle::getPosition(), G4INCL::Particle::getPropagationVelocity(), G4INCL::Nucleus::getUniverseRadius(), G4INCL::Intersection::position, and G4INCL::Particle::setPosition().

Referenced by G4INCL::CoulombNonRelativistic::bringToSurface().

49  {
50  Intersection intersection = IntersectionFactory::getEarlierTrajectoryIntersection(p->getPosition(), p->getPropagationVelocity(), n->getUniverseRadius());
51  if(intersection.exists) { // If the particle enters the nucleus
52  p->setPosition(intersection.position);
53  return new ParticleEntryAvatar(0.0, n, p);
54  } else // If the particle does NOT enter the nucleus
55  return NULL;
56  }
const char * p
Definition: xmltok.h:285
Intersection getEarlierTrajectoryIntersection(const ThreeVector &x0, const ThreeVector &p, const G4double r)
Compute the first intersection of a straight particle trajectory with a sphere.
const G4int n
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 58 of file G4INCLCoulombNone.cc.

References G4INCL::Intersection::exists, G4INCL::IntersectionFactory::getEarlierTrajectoryIntersection(), G4INCL::Cluster::getParticles(), G4INCL::Nucleus::getUniverseRadius(), G4INCL::Intersection::position, and G4INCL::Intersection::time.

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

82 {}
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 86 of file G4INCLCoulombNone.hh.

References G4INCL::Composite, G4INCL::ParticleTable::getLargestNuclearRadius(), G4INCL::Nucleus::getUniverseRadius(), G4INCL::ParticleSpecies::theA, G4INCL::ParticleSpecies::theType, and G4INCL::ParticleSpecies::theZ.

87  {
88  if(p.theType == Composite)
89  return 2.*ParticleTable::getLargestNuclearRadius(p.theA, p.theZ)
90  + n->getUniverseRadius();
91  else
92  return n->getUniverseRadius();
93  }
const char * p
Definition: xmltok.h:285
G4double getLargestNuclearRadius(const G4int A, const G4int Z)
const G4int n

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