Root file particle smearing tool.
More...
#include <SimG4ParticleSmearRootFile.h>
|
SmartIF< IRndmGenSvc > | m_randSvc |
| Random Number Service.
|
|
IRndmGen * | m_gauss |
| Gaussian random number generator used for smearing with a constant resolution (m_sigma)
|
|
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 previous entry, and eta=0 for the first one)
|
|
Gaudi::Property< std::string > | m_resolutionFileName |
| File name with the resolutions obtained from root file (set by job options)
|
|
double | m_minMomentum |
| minimum momentum defined in the resolution file
|
|
double | m_maxMomentum |
| maximum momentum defined in the resolution file
|
|
double | m_maxEta |
| maximum pseudorapidity defined in the resolution file
|
|
Root file particle smearing tool.
The resolution dependence is read from the ROOT file, which path is given in configuration. Root file contains trees 'info' and 'resolutions'. 'info' has two arrays of type TArrayD containing edges of eta bins ('eta') and momentum values ('p'). 'resolutions' tree has TArrayD with resolutions computed for momentum values. An array is defined for every eta bin. Momentum of the particle is smeared following a Gaussian distribution, using the evaluated resolution as the mean. User needs to specify the min/max momentum nad max eta for fast sim in the SimG4FastSimTrackerRegion
tool. The defined values cannot be broader than eta and p values for which the resolutions were computed.
- Author
- Anna Zaborowska
◆ SimG4ParticleSmearRootFile()
SimG4ParticleSmearRootFile::SimG4ParticleSmearRootFile |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
|
explicit |
◆ ~SimG4ParticleSmearRootFile()
SimG4ParticleSmearRootFile::~SimG4ParticleSmearRootFile |
( |
| ) |
|
|
virtual |
◆ checkConditions()
StatusCode SimG4ParticleSmearRootFile::checkConditions |
( |
double | aMinMomentum, |
|
|
double | aMaxMomentum, |
|
|
double | aMaxEta ) const |
|
finalvirtual |
Check conditions of the smearing model, especially if the given parametrs do not exceed the parameters of the model.
- Parameters
-
[in] | aMinMomentum | Minimum momentum. |
[in] | aMaxMomentum | Maximum momentum. |
[in] | aMaxEta | Maximum pseudorapidity. |
- Returns
- status code
Implements ISimG4ParticleSmearTool.
◆ finalize()
StatusCode SimG4ParticleSmearRootFile::finalize |
( |
| ) |
|
|
finalvirtual |
Finalize.
- Returns
- status code
◆ initialize()
StatusCode SimG4ParticleSmearRootFile::initialize |
( |
| ) |
|
|
finalvirtual |
Initialize the tool and a random number generator.
- Returns
- status code
◆ readResolutions()
StatusCode SimG4ParticleSmearRootFile::readResolutions |
( |
| ) |
|
Read the file with the resolutions.
File name is set by job options.
- Returns
- status code
◆ resolution()
double SimG4ParticleSmearRootFile::resolution |
( |
double | aEta, |
|
|
double | aMom ) |
Read the file with the resolutions.
File name is set by job options.
- Parameters
-
[in] | aEta | Particle's pseudorapidity |
[in] | aMom | Particle's momentum |
- Returns
- Resolution
◆ smearMomentum()
StatusCode SimG4ParticleSmearRootFile::smearMomentum |
( |
CLHEP::Hep3Vector & | aMom, |
|
|
int | aPdg = 0 ) |
|
finalvirtual |
Smear the momentum of the particle.
- Parameters
-
| aMom | Particle momentum to be smeared. |
[in] | aPdg | Particle PDG code. |
- Returns
- status code
Implements ISimG4ParticleSmearTool.
◆ m_gauss
IRndmGen* SimG4ParticleSmearRootFile::m_gauss |
|
private |
Gaussian random number generator used for smearing with a constant resolution (m_sigma)
◆ m_maxEta
double SimG4ParticleSmearRootFile::m_maxEta |
|
private |
maximum pseudorapidity defined in the resolution file
◆ m_maxMomentum
double SimG4ParticleSmearRootFile::m_maxMomentum |
|
private |
maximum momentum defined in the resolution file
◆ m_minMomentum
double SimG4ParticleSmearRootFile::m_minMomentum |
|
private |
minimum momentum defined in the resolution file
◆ m_momentumResolutions
std::map<double, TGraph> SimG4ParticleSmearRootFile::m_momentumResolutions |
|
private |
Map of p-dependent resolutions and the end of eta bin that it refers to (lower end is defined by previous entry, and eta=0 for the first one)
◆ m_randSvc
SmartIF<IRndmGenSvc> SimG4ParticleSmearRootFile::m_randSvc |
|
private |
◆ m_resolutionFileName
Gaudi::Property<std::string> SimG4ParticleSmearRootFile::m_resolutionFileName |
|
private |
Initial value:{this, "filename", "",
"File name with the resolutions obtained from root file"}
File name with the resolutions obtained from root file (set by job options)
The documentation for this class was generated from the following files: