26 fastStep.KillPrimaryTrack();
27 fastStep.SetPrimaryTrackPathLength(0.0);
28 fastStep.SetTotalEnergyDeposited(fastTrack.GetPrimaryTrack()->GetKineticEnergy());
30 const G4double
energy = fastTrack.GetPrimaryTrack()->GetKineticEnergy();
31 const G4ThreeVector&
pos = fastTrack.GetPrimaryTrack()->GetPosition();
35 const G4ThreeVector& momDir = fastTrack.GetPrimaryTrack()->GetMomentumDirection();
36 const G4ThreeVector& ortho = momDir.orthogonal();
37 const G4ThreeVector&
cross = momDir.
cross(ortho);
40 GFlashEnergySpot spot;
41 spot.SetEnergy(inPointEnergy);
42 spot.SetPosition(pos);
46 G4double etail = energy - inPointEnergy;
47 const G4int nspots =
int(etail) + 1;
48 for (G4int
i = 0;
i < nspots; ++
i) {
52 const G4double
phi = CLHEP::twopi * G4UniformRand();
53 const G4ThreeVector tailPos = pos + z * momDir + radius *
std::cos(phi) * ortho + radius *
std::sin(phi) *
cross;
55 const G4double tailEnergy = etail / nspots;
57 spot.SetEnergy(tailEnergy);
58 spot.SetPosition(tailPos);
G4double GetRadius(G4double energy) const
Sin< T >::type sin(const T &t)
Basic3DVector cross(const Basic3DVector &lh) const
Vector product, or "cross" product, with a vector of same type.
Cos< T >::type cos(const T &t)
G4double GetInPointEnergyFraction(G4double energy) const
LowEnergyFastSimParam param
Basic3DVector cross(const Basic3DVector &v) const
Vector product, or "cross" product, with a vector of same type.