6 #include "G4VFastSimulationModel.hh"
7 #include "G4Electron.hh"
8 #include "GFlashHitMaker.hh"
13 fEmax(parSet.getParameter<double>(
"LowEnergyGflashEcalEmax")),
17 return &particle == G4Electron::Definition();
21 G4double
energy = fastTrack.GetPrimaryTrack()->GetKineticEnergy();
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();
55 const G4double tailEnergy = etail / nspots;
57 spot.SetEnergy(tailEnergy);
58 spot.SetPosition(tailPos);