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

Formula particle smearing tool. More...

#include <SimG4ParticleSmearFormula.h>

Inheritance diagram for SimG4ParticleSmearFormula:
Collaboration diagram for SimG4ParticleSmearFormula:

Public Member Functions

 SimG4ParticleSmearFormula (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~SimG4ParticleSmearFormula ()
 
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

TFormula m_resolutionMomentum
 TFormula representing resolution momentum-dependent for the smearing.
 
SmartIF< IRndmGenSvc > m_randSvc
 Random Number Service.
 
IRndmGen * m_gauss
 Gaussian random number generator used for smearing with a constant resolution (m_sigma)
 
Gaudi::Property< std::string > m_resolutionMomentumStr
 string defining a TFormula representing resolution momentum-dependent for the smearing (set by job options)
 

Detailed Description

Formula particle smearing tool.

The resolution dependence can be expressed by an arbitrary formula in the configuration. Smears momentum of the particle following a Gaussian distribution, using the evaluated formula as the mean. For more information please see.

Author
Anna Zaborowska

Constructor & Destructor Documentation

◆ SimG4ParticleSmearFormula()

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

◆ ~SimG4ParticleSmearFormula()

SimG4ParticleSmearFormula::~SimG4ParticleSmearFormula ( )
virtual

Member Function Documentation

◆ checkConditions()

virtual StatusCode SimG4ParticleSmearFormula::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 SimG4ParticleSmearFormula::finalize ( )
finalvirtual

Finalize.

Returns
status code

◆ initialize()

StatusCode SimG4ParticleSmearFormula::initialize ( )
finalvirtual

Initialize the tool and a random number generator.

Returns
status code

◆ smearMomentum()

StatusCode SimG4ParticleSmearFormula::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

IRndmGen* SimG4ParticleSmearFormula::m_gauss
private

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

◆ m_randSvc

SmartIF<IRndmGenSvc> SimG4ParticleSmearFormula::m_randSvc
private

Random Number Service.

◆ m_resolutionMomentum

TFormula SimG4ParticleSmearFormula::m_resolutionMomentum
private

TFormula representing resolution momentum-dependent for the smearing.

◆ m_resolutionMomentumStr

Gaudi::Property<std::string> SimG4ParticleSmearFormula::m_resolutionMomentumStr
private
Initial value:
{
this, "resolutionMomentum", "",
"string defining a TFormula representing resolution momentum-dependent for the smearing"}

string defining a TFormula representing resolution momentum-dependent for the smearing (set by job options)


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