7 #include "G4VFastSimulationModel.hh" 8 #include "G4EventManager.hh" 9 #include "G4Electron.hh" 10 #include "GFlashHitMaker.hh" 11 #include "G4Region.hh" 12 #include "G4Positron.hh" 13 #include "G4ParticleDefinition.hh" 14 #include "G4PhysicalConstants.hh" 16 constexpr G4double
twomass = 2 * CLHEP::electron_mass_c2;
21 fTrackingAction(nullptr),
23 fTailPos(0., 0., 0.) {
29 return (11 ==
std::abs(particle.GetPDGEncoding()));
33 const G4Track*
track = fastTrack.GetPrimaryTrack();
39 if (pdgMother == 11 || pdgMother == 22)
47 fastStep.KillPrimaryTrack();
48 fastStep.SetPrimaryTrackPathLength(0.0);
49 auto track = fastTrack.GetPrimaryTrack();
52 const G4ThreeVector&
pos =
track->GetPosition();
60 const G4ThreeVector& momDir =
track->GetMomentumDirection();
63 GFlashEnergySpot spot;
64 spot.SetEnergy(inPointEnergy);
65 spot.SetPosition(
pos);
69 G4double etail =
energy - inPointEnergy;
70 const G4int nspots = (G4int)(etail) + 1;
71 const G4double tailEnergy = etail / (G4double)nspots;
72 for (G4int
i = 0;
i < nspots; ++
i) {
76 const G4double
phi = CLHEP::twopi * G4UniformRand();
81 spot.SetEnergy(tailEnergy);
T getParameter(std::string const &) const
const G4ParticleDefinition * fPositron
G4bool IsApplicable(const G4ParticleDefinition &particle) override
constexpr G4double twomass
Sin< T >::type sin(const T &t)
const G4Envelope * fRegion
LowEnergyFastSimParam fParam
G4double GetInPointEnergyFraction(G4double energy) const
const G4Track * geant4Track() const
const TrackingAction * fTrackingAction
Cos< T >::type cos(const T &t)
LowEnergyFastSimModel(const G4String &name, G4Region *region, const edm::ParameterSet &parSet)
Abs< T >::type abs(const T &t)
void DoIt(const G4FastTrack &fastTrack, G4FastStep &fastStep) override
G4bool ModelTrigger(const G4FastTrack &fastTrack) override
G4double GetRadius(G4double energy) const