Geant4
10.02.p02
|
Smearing of the particle momentum or energy. More...
#include <Par02Smearer.hh>
Public Member Functions | |
G4ThreeVector | SmearMomentum (const G4Track *aTrack, G4double aResolution=-1) |
Smears the momentum with a given resolution. More... | |
G4double | SmearEnergy (const G4Track *aTrack, G4double aResolution=-1) |
Smears the energy deposit with a given resolution. More... | |
G4ThreeVector | SmearGaussian (const G4Track *aTrackOriginal, G4double aResolution) |
First possible type of smearing. Smears the momentum with a given resolution. More... | |
G4double | Gauss (G4double aMean, G4double aStandardDeviation) |
Returns a random number from a Gaussian distribution. More... | |
Static Public Member Functions | |
static Par02Smearer * | Instance () |
Allows the access to the unique Par02Smearer class object. More... | |
Protected Member Functions | |
Par02Smearer () | |
A default constructor. More... | |
~Par02Smearer () | |
Private Attributes | |
CLHEP::HepRandomEngine * | fRandomEngine |
CLHEP random engine. More... | |
CLHEP::RandGauss * | fRandomGauss |
CLHEP random engine used in gaussian smearing. More... | |
Static Private Attributes | |
static Par02Smearer * | fPar02Smearer = 0 |
A pointer to Par02Smearer object. More... | |
Smearing of the particle momentum or energy.
A singleton class used to smear (alter) the particle momentum (for tracking detectors) and energy (for calorimeters). In case the resolution is given, the momentum (energy) is smeared with Gaussian distribution.
Definition at line 47 of file Par02Smearer.hh.
|
protected |
A default constructor.
Definition at line 47 of file Par02Smearer.cc.
References fRandomEngine, and fRandomGauss.
Referenced by Instance().
|
protected |
Definition at line 55 of file Par02Smearer.cc.
Returns a random number from a Gaussian distribution.
aMean | The mean of the Gaussian distribution. |
aStandardDeviation | The standard deviation of a Gaussian distribution. |
Definition at line 103 of file Par02Smearer.cc.
References fRandomGauss.
Referenced by SmearEnergy(), and SmearGaussian().
|
static |
Allows the access to the unique Par02Smearer class object.
Definition at line 59 of file Par02Smearer.cc.
References fPar02Smearer, and Par02Smearer().
Referenced by Par02FastSimModelEMCal::DoIt(), Par02FastSimModelHCal::DoIt(), and Par02FastSimModelTracker::DoIt().
Smears the energy deposit with a given resolution.
aTrack | A track to smear. |
aResolution | A resolution. Gaussian smearing is done with a given resolution as a standard deviation. |
Definition at line 75 of file Par02Smearer.cc.
References Gauss(), and G4Track::GetKineticEnergy().
G4ThreeVector Par02Smearer::SmearGaussian | ( | const G4Track * | aTrackOriginal, |
G4double | aResolution | ||
) |
First possible type of smearing. Smears the momentum with a given resolution.
aTrackOriginal | A track to smear. |
aResolution | A resolution taken as a standard deviation of a Gaussian distribution. |
Definition at line 92 of file Par02Smearer.cc.
References Gauss(), G4Track::GetMomentum(), and G4Track::GetPosition().
Referenced by SmearMomentum().
G4ThreeVector Par02Smearer::SmearMomentum | ( | const G4Track * | aTrack, |
G4double | aResolution = -1 |
||
) |
Smears the momentum with a given resolution.
aTrack | A track to smear. |
aResolution | A resolution. Gaussian smearing is done with a given resolution as a standard deviation. |
Definition at line 68 of file Par02Smearer.cc.
References SmearGaussian().
|
staticprivate |
A pointer to Par02Smearer object.
Definition at line 87 of file Par02Smearer.hh.
Referenced by Instance().
|
private |
|
private |
CLHEP random engine used in gaussian smearing.
Definition at line 93 of file Par02Smearer.hh.
Referenced by Gauss(), and Par02Smearer().