ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Par02Smearer Class Reference

#include <geant4/tree/geant4-10.6-release/examples/extended/parameterisations/Par02/include/Par02Smearer.hh>

+ Collaboration diagram for Par02Smearer:

Public Member Functions

G4ThreeVector SmearMomentum (const G4Track *aTrack, G4double aResolution=-1)
 
G4double SmearEnergy (const G4Track *aTrack, G4double aResolution=-1)
 
G4ThreeVector SmearGaussian (const G4Track *aTrackOriginal, G4double aResolution)
 
G4double Gauss (G4double aMean, G4double aStandardDeviation)
 

Static Public Member Functions

static Par02SmearerInstance ()
 

Protected Member Functions

 Par02Smearer ()
 A default constructor.
 
 ~Par02Smearer ()
 

Private Attributes

CLHEP::HepRandomEnginefRandomEngine
 CLHEP random engine.
 
CLHEP::RandGaussfRandomGauss
 CLHEP random engine used in gaussian smearing.
 

Static Private Attributes

static Par02SmearerfPar02Smearer = 0
 A pointer to Par02Smearer object.
 

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 46 of file Par02Smearer.hh.

View newest version in sPHENIX GitHub at line 46 of file Par02Smearer.hh

Constructor & Destructor Documentation

Par02Smearer::Par02Smearer ( )
protected

A default constructor.

Definition at line 46 of file Par02Smearer.cc.

View newest version in sPHENIX GitHub at line 46 of file Par02Smearer.cc

References fRandomEngine, fRandomGauss, seed, and Acts::VectorHelpers::time().

Referenced by Instance().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Par02Smearer::~Par02Smearer ( )
protected

Definition at line 54 of file Par02Smearer.cc.

View newest version in sPHENIX GitHub at line 54 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 102 of file Par02Smearer.cc.

View newest version in sPHENIX GitHub at line 102 of file Par02Smearer.cc

References CLHEP::RandGauss::fire(), and fRandomGauss.

Referenced by SmearEnergy(), and SmearGaussian().

+ Here is the call graph for this function:

+ 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 58 of file Par02Smearer.cc.

View newest version in sPHENIX GitHub at line 58 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 74 of file Par02Smearer.cc.

View newest version in sPHENIX GitHub at line 74 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 91 of file Par02Smearer.cc.

View newest version in sPHENIX GitHub at line 91 of file Par02Smearer.cc

References Gauss(), G4Track::GetMomentum(), G4Track::GetPosition(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

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 67 of file Par02Smearer.cc.

View newest version in sPHENIX GitHub at line 67 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 86 of file Par02Smearer.hh.

View newest version in sPHENIX GitHub at line 86 of file Par02Smearer.hh

Referenced by Instance().

CLHEP::HepRandomEngine* Par02Smearer::fRandomEngine
private

CLHEP random engine.

Definition at line 89 of file Par02Smearer.hh.

View newest version in sPHENIX GitHub at line 89 of file Par02Smearer.hh

Referenced by Par02Smearer().

CLHEP::RandGauss* Par02Smearer::fRandomGauss
private

CLHEP random engine used in gaussian smearing.

Definition at line 92 of file Par02Smearer.hh.

View newest version in sPHENIX GitHub at line 92 of file Par02Smearer.hh

Referenced by Gauss(), and Par02Smearer().


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