Geant4  10.02
Par02Smearer Class Reference

Smearing of the particle momentum or energy. More...

#include <Par02Smearer.hh>

+ Collaboration diagram for Par02Smearer:

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 Par02SmearerInstance ()
 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 Par02SmearerfPar02Smearer = 0
 A pointer to Par02Smearer object. More...
 

Detailed Description

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.

Author
Anna Zaborowska

Definition at line 47 of file Par02Smearer.hh.

Constructor & Destructor Documentation

Par02Smearer::Par02Smearer ( )
protected

A default constructor.

Definition at line 47 of file Par02Smearer.cc.

References fRandomEngine, and fRandomGauss.

Referenced by Instance().

+ Here is the caller graph for this function:

Par02Smearer::~Par02Smearer ( )
protected

Definition at line 55 of file Par02Smearer.cc.

Member Function Documentation

G4double Par02Smearer::Gauss ( G4double  aMean,
G4double  aStandardDeviation 
)

Returns a random number from a Gaussian distribution.

Parameters
aMeanThe mean of the Gaussian distribution.
aStandardDeviationThe standard deviation of a Gaussian distribution.

Definition at line 103 of file Par02Smearer.cc.

References fRandomGauss.

Referenced by SmearEnergy(), and SmearGaussian().

+ Here is the caller graph for this function:

Par02Smearer * Par02Smearer::Instance ( void  )
static

Allows the access to the unique Par02Smearer class object.

Returns
A pointer to the Par02Smearer class.

Definition at line 59 of file Par02Smearer.cc.

References fPar02Smearer, and Par02Smearer().

Referenced by Par02FastSimModelEMCal::DoIt(), Par02FastSimModelHCal::DoIt(), and Par02FastSimModelTracker::DoIt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double Par02Smearer::SmearEnergy ( const G4Track aTrack,
G4double  aResolution = -1 
)

Smears the energy deposit with a given resolution.

Parameters
aTrackA track to smear.
aResolutionA 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().

+ Here is the call graph for this function:

G4ThreeVector Par02Smearer::SmearGaussian ( const G4Track aTrackOriginal,
G4double  aResolution 
)

First possible type of smearing. Smears the momentum with a given resolution.

Parameters
aTrackOriginalA track to smear.
aResolutionA 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ThreeVector Par02Smearer::SmearMomentum ( const G4Track aTrack,
G4double  aResolution = -1 
)

Smears the momentum with a given resolution.

Parameters
aTrackA track to smear.
aResolutionA resolution. Gaussian smearing is done with a given resolution as a standard deviation.

Definition at line 68 of file Par02Smearer.cc.

References SmearGaussian().

+ Here is the call graph for this function:

Member Data Documentation

Par02Smearer * Par02Smearer::fPar02Smearer = 0
staticprivate

A pointer to Par02Smearer object.

Definition at line 87 of file Par02Smearer.hh.

Referenced by Instance().

CLHEP::HepRandomEngine* Par02Smearer::fRandomEngine
private

CLHEP random engine.

Definition at line 90 of file Par02Smearer.hh.

Referenced by Par02Smearer().

CLHEP::RandGauss* Par02Smearer::fRandomGauss
private

CLHEP random engine used in gaussian smearing.

Definition at line 93 of file Par02Smearer.hh.

Referenced by Gauss(), and Par02Smearer().


The documentation for this class was generated from the following files: