k4SimGeant4
Loading...
Searching...
No Matches
SimG4ParticleSmearSimple.h
Go to the documentation of this file.
1#ifndef SIMG4FAST_G4PARTICLESMEARSIMPLE_H
2#define SIMG4FAST_G4PARTICLESMEARSIMPLE_H
3
4// Gaudi
5#include "GaudiKernel/AlgTool.h"
6#include "GaudiKernel/RndmGenerators.h"
7#include "GaudiKernel/IRndmGenSvc.h"
8
9// FCCSW
11
22class SimG4ParticleSmearSimple : public AlgTool, virtual public ISimG4ParticleSmearTool {
23public:
24 explicit SimG4ParticleSmearSimple(const std::string& type, const std::string& name, const IInterface* parent);
26
30 virtual StatusCode initialize() final;
34 virtual StatusCode finalize() final;
35
41 virtual StatusCode smearMomentum(CLHEP::Hep3Vector& aMom, int aPdg = 0) final;
42
50 inline virtual StatusCode checkConditions(double, double, double) const final { return StatusCode::SUCCESS; }
51
52private:
54 SmartIF<IRndmGenSvc> m_randSvc;
56 Rndm::Numbers m_gauss;
58 Gaudi::Property<double> m_sigma{this, "sigma", 0.01, "Constant resolution for the smearing"};
59};
60
61#endif /* SIMG4FAST_G4PARTICLESMEARSIMPLE_H */
Interface to the particle smearing tool.
Definition ISimG4ParticleSmearTool.h:20
Simple particle smearing tool.
Definition SimG4ParticleSmearSimple.h:22
SimG4ParticleSmearSimple(const std::string &type, const std::string &name, const IInterface *parent)
Definition SimG4ParticleSmearSimple.cpp:8
Gaudi::Property< double > m_sigma
Constant resolution for the smearing (set by job options)
Definition SimG4ParticleSmearSimple.h:58
Rndm::Numbers m_gauss
Gaussian random number generator used for smearing with a constant resolution (m_sigma)
Definition SimG4ParticleSmearSimple.h:56
virtual StatusCode initialize() final
Initialize the tool and a random number generator.
Definition SimG4ParticleSmearSimple.cpp:16
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 SimG4ParticleSmearSimple.h:50
virtual StatusCode finalize() final
Finalize.
Definition SimG4ParticleSmearSimple.cpp:32
virtual ~SimG4ParticleSmearSimple()
Definition SimG4ParticleSmearSimple.cpp:14
virtual StatusCode smearMomentum(CLHEP::Hep3Vector &aMom, int aPdg=0) final
Smear the momentum of the particle.
Definition SimG4ParticleSmearSimple.cpp:34
SmartIF< IRndmGenSvc > m_randSvc
Random Number Service.
Definition SimG4ParticleSmearSimple.h:54