26#ifndef PAR03EMSHOWERMODEL_HH
27#define PAR03EMSHOWERMODEL_HH
29#include "G4VFastSimulationModel.hh"
126 inline G4double
Gamma(G4double x, G4double alpha, G4double beta)
128 return (std::pow(beta, alpha) / std::tgamma(alpha) * std::pow(x, alpha - 1) *
129 std::exp(-beta * x));
132 inline G4double
Gaussian(G4double x, G4double sigma = 1, G4double x0 = 0)
134 G4double tmp = (x - x0) / sigma;
135 return (1.0 / (std::sqrt(2 * CLHEP::pi) * sigma)) * std::exp(-tmp * tmp / 2);
Messenger for the example fast simulation model.
Example fast simulation model for EM showers.
G4double Gaussian(G4double x, G4double sigma=1, G4double x0=0)
Gaussian distribution.
G4double GetBeta() const
Get beta parameter of a Gamma distribution that describes the longitudinal shower profile.
void SetNbOfHits(const G4int aNumber)
Set number of (same energy) hits created in the parametrisation.
void Print() const
Print current settings.
void SetLongMaxDepth(const G4double aDepth)
Set maximum depth of shower created in fast simulation.
G4double fLongMaxDepth
Maximum depth of a shower created in fast simulation.
G4int fNbOfHits
Number of (same energy) hits created by the parametrisation.
virtual G4bool ModelTrigger(const G4FastTrack &) final
There are no kinematics constraints. True is returned.
G4double fBeta
Beta parameter of the Gamma distribution Can be changed with UI command /Par03/fastSim/longitudinalPr...
G4double fAlpha
Alpha parameter of the Gamma distribution Can be changed with UI command /Par03/fastSim/longitudunalP...
void SetSigma(const G4double aSigma)
Set standard deviation of a Gaussian distribution that describes the transverse shower profile.
Par03EMShowerMessenger * fMessenger
Messenger for configuration.
void SetBeta(const G4double aBeta)
Set beta parameter of a Gamma distribution that describes the longitudinal shower profile.
G4double GetAlpha() const
Get alpha parameter of a Gamma distribution that describes the longitudinal shower profile.
std::unique_ptr< G4FastSimHitMaker > fHitMaker
Helper class for creation of hits within the sensitive detector.
G4double fSigma
Standard deviation of the Gaussian distribution Can be changed with UI command /Par03/fastSim/transve...
G4double Gamma(G4double x, G4double alpha, G4double beta)
Gamma distribution.
G4int GetNbOfHits() const
Get number of (same energy) hits created in the parametrisation.s.
virtual G4bool IsApplicable(const G4ParticleDefinition &) final
Model is applicable to electrons, positrons, and photons.
void SetAlpha(const G4double aAlpha)
Set alpha parameter of a Gamma distribution that describes the longitudinal shower profile.
virtual void DoIt(const G4FastTrack &, G4FastStep &) final
Take particle out of the full simulation (kill it at the entrance depositing all the energy).
G4double GetLongMaxDepth() const
Get maximum depth of shower created in fast simulation.
G4double GetSigma() const
Get standard deviation of a Gaussian distribution that describes the transverse shower profile.