ATLAS Offline Software
TRTElectronicsNoise.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRT_DIGITIZATION_TRTELECTRONICSNOISE_H
6 #define TRT_DIGITIZATION_TRTELECTRONICSNOISE_H
7 
8 #include "CLHEP/Random/RandomEngine.h"
9 
10 #include <vector>
11 
12 class TRTDigSettings;
13 
19 
20 public:
25  CLHEP::HepRandomEngine *rndmEngine );
28 
38  void getSamplesOfMaxLTOverNoiseAmp(std::vector<float>& maxLTOverNoiseAmp,
39  unsigned long nsamplings,
40  CLHEP::HepRandomEngine *rndmEngine);
41 
58  void reinitElectronicsNoise(const unsigned int& numberOfDigitLengths
59  /*number of 75ns timeslices*/,
60  CLHEP::HepRandomEngine *rndmEngine);
61 
63  void setElectronicsNoiseAmplitude(const double&);
64 
73  void addElectronicsNoise(std::vector<double>& signal,
74  const double& noiseamplitude /*= 1.0*/,
75  CLHEP::HepRandomEngine *rndmEngine);
76 
77 private:
78 
80 
86 
95  double getMax(unsigned int firstbinslowsignal,
96  unsigned int firstbinfastsignal,
97  const unsigned int& binsinwindow );
98 
99  std::vector<double> m_noiseSignalShape;
105 
106  std::vector<float> m_tmpArray;
109  unsigned int m_nbins_periodic;
110 
115  void InitializeNoiseShaping();
121  double NoiseShape(const double& time) const;
122 
123  std::vector<double> m_noisepars1;
124  std::vector<double> m_noisepars2;
126 };
127 
128 #endif
TRTElectronicsNoise::m_tmpArray
std::vector< float > m_tmpArray
Here to avoid repeated memory allocs.
Definition: TRTElectronicsNoise.h:106
TRTElectronicsNoise::m_noisepars1
std::vector< double > m_noisepars1
Noise signal params 1 (t<15.5 ns)
Definition: TRTElectronicsNoise.h:123
TRTElectronicsNoise::m_nbins_periodic
unsigned int m_nbins_periodic
Definition: TRTElectronicsNoise.h:109
TRTElectronicsNoise::m_noisepars2
std::vector< double > m_noisepars2
Noise signal params 2 (t>15.5 ns)
Definition: TRTElectronicsNoise.h:124
TRTElectronicsNoise::reinitElectronicsNoise
void reinitElectronicsNoise(const unsigned int &numberOfDigitLengths, CLHEP::HepRandomEngine *rndmEngine)
Re-initialize electronics noise table.
Definition: TRTElectronicsNoise.cxx:88
TRTElectronicsNoise::m_noiseSignalShape
std::vector< double > m_noiseSignalShape
Tabulated noise signal shape.
Definition: TRTElectronicsNoise.h:99
TRTElectronicsNoise
Simulate TRT Electronics Noise For description of metod, see Thomas Kittelmanns PhD thesis chapters ...
Definition: TRTElectronicsNoise.h:18
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:67
TRTElectronicsNoise::tabulateNoiseSignalShape
void tabulateNoiseSignalShape()
Tabulate noise signal shape.
Definition: TRTElectronicsNoise.cxx:169
TRTElectronicsNoise::setElectronicsNoiseAmplitude
void setElectronicsNoiseAmplitude(const double &)
Set electronics noise amplitude.
TRTElectronicsNoise::m_cachedFastNoiseAfterSignalShaping
std::vector< float > m_cachedFastNoiseAfterSignalShaping
Cached samples of electronics noise after signal shaping (fast input)
Definition: TRTElectronicsNoise.h:102
TRTElectronicsNoise::addElectronicsNoise
void addElectronicsNoise(std::vector< double > &signal, const double &noiseamplitude, CLHEP::HepRandomEngine *rndmEngine)
Add electronics noise to simulated signals in hit straws.
Definition: TRTElectronicsNoise.cxx:197
TRTElectronicsNoise::m_settings
const TRTDigSettings * m_settings
Definition: TRTElectronicsNoise.h:79
TRTElectronicsNoise::TRTElectronicsNoise
TRTElectronicsNoise(const TRTDigSettings *, CLHEP::HepRandomEngine *rndmEngine)
Constructor: Calls tabulateNoiseSignalShape()
Definition: TRTElectronicsNoise.cxx:20
TRTElectronicsNoise::getMax
double getMax(unsigned int firstbinslowsignal, unsigned int firstbinfastsignal, const unsigned int &binsinwindow)
Get max amplitude of noise signal from weighted sum of fast and slow varying noise in period.
Definition: TRTElectronicsNoise.cxx:66
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
TRTElectronicsNoise::~TRTElectronicsNoise
~TRTElectronicsNoise()
Destructor.
TRTElectronicsNoise::m_fractionOfSlowNoise
double m_fractionOfSlowNoise
Definition: TRTElectronicsNoise.h:108
TRTElectronicsNoise::InitializeNoiseShaping
void InitializeNoiseShaping()
Initialize signal shaping.
Definition: TRTElectronicsNoise.cxx:252
TRTElectronicsNoise::NoiseShape
double NoiseShape(const double &time) const
Get parameterized signal shape for noise hits.
Definition: TRTElectronicsNoise.cxx:277
TRTDigSettings
Class containing parameters and settings used by TRT digitization.
Definition: TRTDigSettings.h:35
TRTElectronicsNoise::getSamplesOfMaxLTOverNoiseAmp
void getSamplesOfMaxLTOverNoiseAmp(std::vector< float > &maxLTOverNoiseAmp, unsigned long nsamplings, CLHEP::HepRandomEngine *rndmEngine)
From generated (and cached) noise samples, this function returns in vector maxLTOverNoiseAmp the maxi...
Definition: TRTElectronicsNoise.cxx:40
TRTElectronicsNoise::m_cachedSlowNoiseAfterSignalShaping
std::vector< float > m_cachedSlowNoiseAfterSignalShaping
Cached samples of electronics noise after signal shaping (slow input)
Definition: TRTElectronicsNoise.h:104