48 time_t seed = time( NULL );
49 fRandomEngine =
new CLHEP::HepJamesRandom( static_cast< long >( seed ) );
78 while ( newE < 0.0 ) {
81 if ( aResolution != -1.0 ) {
97 G4ThreeVector smearedMom( originP.x()*rdm, originP.y()*rdm, originP.z()*rdm );
static Par02Smearer * Instance()
Allows the access to the unique Par02Smearer class object.
CLHEP::Hep3Vector G4ThreeVector
CLHEP::RandGauss * fRandomGauss
CLHEP random engine used in gaussian smearing.
const G4ThreeVector & GetPosition() const
static Par02Smearer * fPar02Smearer
A pointer to Par02Smearer object.
Definition of the Par02PrimaryParticleInformation class.
G4ThreeVector SmearMomentum(const G4Track *aTrack, G4double aResolution=-1)
Smears the momentum with a given resolution.
G4double SmearEnergy(const G4Track *aTrack, G4double aResolution=-1)
Smears the energy deposit with a given resolution.
Definition of the Par02Smearer class.
G4double GetKineticEnergy() const
Par02Smearer()
A default constructor.
Smearing of the particle momentum or energy.
G4ThreeVector GetMomentum() const
G4ThreeVector SmearGaussian(const G4Track *aTrackOriginal, G4double aResolution)
First possible type of smearing. Smears the momentum with a given resolution.
CLHEP::HepRandomEngine * fRandomEngine
CLHEP random engine.
G4double Gauss(G4double aMean, G4double aStandardDeviation)
Returns a random number from a Gaussian distribution.