6 #include "G4VFastSimulationModel.hh"
7 #include "G4Electron.hh"
8 #include "GFlashHitMaker.hh"
10 #include "G4PhysicalConstants.hh"
12 constexpr
double twomass = 2 * CLHEP::electron_mass_c2;
16 fEmax(parSet.getParameter<double>(
"LowEnergyGflashEcalEmax")),
20 return (11 ==
std::abs(particle.GetPDGEncoding()));
24 G4double
energy = fastTrack.GetPrimaryTrack()->GetKineticEnergy();
29 fastStep.KillPrimaryTrack();
30 fastStep.SetPrimaryTrackPathLength(0.0);
31 double energy = fastTrack.GetPrimaryTrack()->GetKineticEnergy();
33 const G4ThreeVector&
pos = fastTrack.GetPrimaryTrack()->GetPosition();
38 if (-11 == fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGEncoding())
41 const G4ThreeVector& momDir = fastTrack.GetPrimaryTrack()->GetMomentumDirection();
42 const G4ThreeVector& ortho = momDir.orthogonal();
43 const G4ThreeVector&
cross = momDir.
cross(ortho);
46 GFlashEnergySpot spot;
47 spot.SetEnergy(inPointEnergy);
48 spot.SetPosition(
pos);
52 G4double etail =
energy - inPointEnergy;
53 const G4int nspots =
int(etail) + 1;
54 const G4double tailEnergy = etail / (G4double)nspots;
55 for (G4int
i = 0;
i < nspots; ++
i) {
59 const G4double
phi = CLHEP::twopi * G4UniformRand();
62 spot.SetEnergy(tailEnergy);
63 spot.SetPosition(tailPos);