1#ifndef SIMG4FAST_G4PARTICLESMEARROOTFILE_H
2#define SIMG4FAST_G4PARTICLESMEARROOTFILE_H
5#include "GaudiKernel/AlgTool.h"
6#include "GaudiKernel/RndmGenerators.h"
49 virtual StatusCode
smearMomentum(CLHEP::Hep3Vector& aMom,
int aPdg = 0)
final;
68 virtual StatusCode
checkConditions(
double aMinMomentum,
double aMaxMomentum,
double aMaxEta)
const final;
80 "File name with the resolutions obtained from root file"};
Interface to the particle smearing tool.
Definition ISimG4ParticleSmearTool.h:20
Root file particle smearing tool.
Definition SimG4ParticleSmearRootFile.h:31
SimG4ParticleSmearRootFile(const std::string &type, const std::string &name, const IInterface *parent)
Definition SimG4ParticleSmearRootFile.cpp:20
IRndmGen * m_gauss
Gaussian random number generator used for smearing with a constant resolution (m_sigma)
Definition SimG4ParticleSmearRootFile.h:74
virtual StatusCode initialize() final
Initialize the tool and a random number generator.
Definition SimG4ParticleSmearRootFile.cpp:28
double m_maxMomentum
maximum momentum defined in the resolution file
Definition SimG4ParticleSmearRootFile.h:84
StatusCode readResolutions()
Read the file with the resolutions.
Definition SimG4ParticleSmearRootFile.cpp:56
SmartIF< IRndmGenSvc > m_randSvc
Random Number Service.
Definition SimG4ParticleSmearRootFile.h:72
double resolution(double aEta, double aMom)
Read the file with the resolutions.
Definition SimG4ParticleSmearRootFile.cpp:122
std::map< double, TGraph > m_momentumResolutions
Map of p-dependent resolutions and the end of eta bin that it refers to (lower end is defined by prev...
Definition SimG4ParticleSmearRootFile.h:77
virtual StatusCode checkConditions(double aMinMomentum, double aMaxMomentum, double aMaxEta) const final
Check conditions of the smearing model, especially if the given parametrs do not exceed the parameter...
Definition SimG4ParticleSmearRootFile.cpp:133
double m_minMomentum
minimum momentum defined in the resolution file
Definition SimG4ParticleSmearRootFile.h:82
Gaudi::Property< std::string > m_resolutionFileName
File name with the resolutions obtained from root file (set by job options)
Definition SimG4ParticleSmearRootFile.h:79
virtual StatusCode finalize() final
Finalize.
Definition SimG4ParticleSmearRootFile.cpp:44
virtual ~SimG4ParticleSmearRootFile()
Definition SimG4ParticleSmearRootFile.cpp:26
double m_maxEta
maximum pseudorapidity defined in the resolution file
Definition SimG4ParticleSmearRootFile.h:86
virtual StatusCode smearMomentum(CLHEP::Hep3Vector &aMom, int aPdg=0) final
Smear the momentum of the particle.
Definition SimG4ParticleSmearRootFile.cpp:46