k4SimGeant4
Loading...
Searching...
No Matches
SimG4ParticleSmearSimple Class Reference

Simple particle smearing tool. More...

#include <SimG4ParticleSmearSimple.h>

Inheritance diagram for SimG4ParticleSmearSimple:
Collaboration diagram for SimG4ParticleSmearSimple:

Public Member Functions

 SimG4ParticleSmearSimple (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~SimG4ParticleSmearSimple ()
 
virtual StatusCode initialize () final
 Initialize the tool and a random number generator.
 
virtual StatusCode finalize () final
 Finalize.
 
virtual StatusCode smearMomentum (CLHEP::Hep3Vector &aMom, int aPdg=0) final
 Smear the momentum of the particle.
 
virtual StatusCode checkConditions (double, double, double) const final
 Check conditions of the smearing model, especially if the given parametrs do not exceed the parameters of the model.
 
- Public Member Functions inherited from ISimG4ParticleSmearTool
 DeclareInterfaceID (ISimG4ParticleSmearTool, 1, 0)
 

Private Attributes

SmartIF< IRndmGenSvc > m_randSvc
 Random Number Service.
 
Rndm::Numbers m_gauss
 Gaussian random number generator used for smearing with a constant resolution (m_sigma)
 
Gaudi::Property< double > m_sigma {this, "sigma", 0.01, "Constant resolution for the smearing"}
 Constant resolution for the smearing (set by job options)
 

Detailed Description

Simple particle smearing tool.

Smears the momentum of the particle following the Gaussian distribution. The standard deviation of the Gaussian is set in the job options file ('sigma'). For more information please see.

Author
Anna Zaborowska

Constructor & Destructor Documentation

◆ SimG4ParticleSmearSimple()

SimG4ParticleSmearSimple::SimG4ParticleSmearSimple ( const std::string & type,
const std::string & name,
const IInterface * parent )
explicit

◆ ~SimG4ParticleSmearSimple()

SimG4ParticleSmearSimple::~SimG4ParticleSmearSimple ( )
virtual

Member Function Documentation

◆ checkConditions()

virtual StatusCode SimG4ParticleSmearSimple::checkConditions ( double ,
double ,
double  ) const
inlinefinalvirtual

Check conditions of the smearing model, especially if the given parametrs do not exceed the parameters of the model.

Parameters
[in]aMinMomentumMinimum momentum.
[in]aMaxMomentumMaximum momentum.
[in]aMaxEtaMaximum pseudorapidity.
Returns
status code

Implements ISimG4ParticleSmearTool.

◆ finalize()

StatusCode SimG4ParticleSmearSimple::finalize ( )
finalvirtual

Finalize.

Returns
status code

◆ initialize()

StatusCode SimG4ParticleSmearSimple::initialize ( )
finalvirtual

Initialize the tool and a random number generator.

Returns
status code

◆ smearMomentum()

StatusCode SimG4ParticleSmearSimple::smearMomentum ( CLHEP::Hep3Vector & aMom,
int aPdg = 0 )
finalvirtual

Smear the momentum of the particle.

Parameters
aMomParticle momentum to be smeared.
[in]aPdgParticle PDG code.
Returns
status code

Implements ISimG4ParticleSmearTool.

Member Data Documentation

◆ m_gauss

Rndm::Numbers SimG4ParticleSmearSimple::m_gauss
private

Gaussian random number generator used for smearing with a constant resolution (m_sigma)

◆ m_randSvc

SmartIF<IRndmGenSvc> SimG4ParticleSmearSimple::m_randSvc
private

Random Number Service.

◆ m_sigma

Gaudi::Property<double> SimG4ParticleSmearSimple::m_sigma {this, "sigma", 0.01, "Constant resolution for the smearing"}
private

Constant resolution for the smearing (set by job options)


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