k4SimGeant4
Loading...
Searching...
No Matches
SimG4ParticleSmearFormula.h
Go to the documentation of this file.
1#ifndef SIMG4FAST_G4PARTICLESMEARFORMULA_H
2#define SIMG4FAST_G4PARTICLESMEARFORMULA_H
3
4// Gaudi
5#include "GaudiKernel/AlgTool.h"
6#include "GaudiKernel/RndmGenerators.h"
7class IRndmGenSvc;
8class IRndmGen;
9
10// ROOT
11#include "TFormula.h"
12
13// FCCSW
15
26class SimG4ParticleSmearFormula : public AlgTool, virtual public ISimG4ParticleSmearTool {
27public:
28 explicit SimG4ParticleSmearFormula(const std::string& type, const std::string& name, const IInterface* parent);
30
34 virtual StatusCode initialize() final;
38 virtual StatusCode finalize() final;
39
45 virtual StatusCode smearMomentum(CLHEP::Hep3Vector& aMom, int aPdg = 0) final;
46
54 inline virtual StatusCode checkConditions(double, double, double) const final { return StatusCode::SUCCESS; }
55
56private:
60 SmartIF<IRndmGenSvc> m_randSvc;
62 IRndmGen* m_gauss;
64 Gaudi::Property<std::string> m_resolutionMomentumStr{
65 this, "resolutionMomentum", "",
66 "string defining a TFormula representing resolution momentum-dependent for the smearing"};
67};
68
69#endif /* SIMG4FAST_G4PARTICLESMEARSIMPLE_H */
Interface to the particle smearing tool.
Definition ISimG4ParticleSmearTool.h:20
Formula particle smearing tool.
Definition SimG4ParticleSmearFormula.h:26
Gaudi::Property< std::string > m_resolutionMomentumStr
string defining a TFormula representing resolution momentum-dependent for the smearing (set by job op...
Definition SimG4ParticleSmearFormula.h:64
virtual ~SimG4ParticleSmearFormula()
Definition SimG4ParticleSmearFormula.cpp:22
SmartIF< IRndmGenSvc > m_randSvc
Random Number Service.
Definition SimG4ParticleSmearFormula.h:60
virtual StatusCode smearMomentum(CLHEP::Hep3Vector &aMom, int aPdg=0) final
Smear the momentum of the particle.
Definition SimG4ParticleSmearFormula.cpp:44
virtual StatusCode initialize() final
Initialize the tool and a random number generator.
Definition SimG4ParticleSmearFormula.cpp:24
TFormula m_resolutionMomentum
TFormula representing resolution momentum-dependent for the smearing.
Definition SimG4ParticleSmearFormula.h:58
IRndmGen * m_gauss
Gaussian random number generator used for smearing with a constant resolution (m_sigma)
Definition SimG4ParticleSmearFormula.h:62
virtual StatusCode checkConditions(double, double, double) const final
Check conditions of the smearing model, especially if the given parametrs do not exceed the parameter...
Definition SimG4ParticleSmearFormula.h:54
virtual StatusCode finalize() final
Finalize.
Definition SimG4ParticleSmearFormula.cpp:42
SimG4ParticleSmearFormula(const std::string &type, const std::string &name, const IInterface *parent)
Definition SimG4ParticleSmearFormula.cpp:16