ATLAS Offline Software
Loading...
Searching...
No Matches
TRTElectronicsProcessing.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_TRTELECTRONICSPROCESSING_H
6#define TRT_DIGITIZATION_TRTELECTRONICSPROCESSING_H
7
9#include "GaudiKernel/ServiceHandle.h"
10
11#include "CLHEP/Random/RandomEngine.h"
12
13#include <atomic>
14#include <vector>
15
16class TRTDigSettings;
17class TRTDigit;
19
24public:
26 TRTElectronicsNoise * electronicsnoise );
28
32 class Deposit {
33 public:
37 Deposit(const double& e, const double& t): m_energy(e), m_time(t) {}
38
39 double energy() const { return m_energy; }
40 double time() const { return m_time; }
41
42
43 private:
44 double m_energy;
45 double m_time;
46 };
47
63 void ProcessDeposits( const std::vector<Deposit>&,
64 const int& hitID,
65 TRTDigit& outdigit,
66 double lowthreshold,
67 const double& noiseamplitude,
68 int strawGasType,
69 CLHEP::HepRandomEngine* rndmEngine,
70 CLHEP::HepRandomEngine* elecNoiseRndmEngine,
71 double highthreshold = -1.0
72 );
73
74 double getHighThreshold ( int hitID, int strawGasType );
75 void LTt0Shift ( int hitID, int strawGasType );
76 void HTt0Shift ( int hitID );
77
78private:
79 //NB copy-constructor and assignment operator declared, but not defined.
82
83 //--- Initialization methods
84
88 void Initialize();
89
95
96 //---
97
104 void SignalShaping(int strawGasType);
105
114 void DiscriminatorResponse(const double& lowthreshold,
115 const double& highthreshold);
116
125 unsigned EncodeDigit() const;
126
128
130
131 double m_timeInterval = 0.0;
132
136
137 double m_binWidth = 0.0;
138
143
144 // 0:Xe,1:Kr,2:Ar
145 double m_lowThresholdBar[3]{};
146 double m_lowThresholdEC[3]{};
147 std::vector<double> m_lowThresholdSignalShape[3];
148 std::vector<double> m_highThresholdSignalShape[3];
149
150 // unsigned int m_maskA; /**< mask - ever used? */
151 // unsigned int m_maskB; /**< mask - ever used? */
152 // unsigned int m_maskC; /**< mask - ever used? */
153 // unsigned int m_maskHT; /**< mask - ever used? */
154
155 // Deposit energy in timed bins before shaping.
156 double* m_energyDistribution = nullptr;
157
158 // LT and HT signals after shaping
159 std::vector<double> m_lowThresholdSignal;
160 std::vector<double> m_highThresholdSignal;
161
162 // LT and HT discriminated signals (bits).
165
166 mutable std::atomic<bool> m_first{true};
167};
168
169#endif
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Class containing parameters and settings used by TRT digitization.
Class for TRT digits.
Definition TRTDigit.h:11
Simulate TRT Electronics Noise For description of metod, see Thomas Kittelmanns PhD thesis chapters ...
Deposit(const double &e, const double &t)
Create deposit.
double energy() const
Get energy of deposit.
double time() const
Get time of deposit.
void TabulateSignalShape()
Tabulate low and high level signal shapes from functions LowThresholdSignalShape() and HighThresholdS...
double getHighThreshold(int hitID, int strawGasType)
int * m_lowThresholdDiscriminator
Signal after discrimination.
void ProcessDeposits(const std::vector< Deposit > &, const int &hitID, TRTDigit &outdigit, double lowthreshold, const double &noiseamplitude, int strawGasType, CLHEP::HepRandomEngine *rndmEngine, CLHEP::HepRandomEngine *elecNoiseRndmEngine, double highthreshold=-1.0)
Process deposits in a straw.
void Initialize()
Initialize constants.
std::vector< double > m_lowThresholdSignal
void DiscriminatorResponse(const double &lowthreshold, const double &highthreshold)
Simulate discriminator response.
unsigned EncodeDigit() const
Encode 27 bit digit from discriminator response [8 low + 1 high + 8 low + 1 high + 8 low + 1 high]:
double m_binWidth
Time interval corresponding to each internal bin.
TRTElectronicsProcessing(const TRTElectronicsProcessing &)
TRTElectronicsProcessing(const TRTDigSettings *digset, TRTElectronicsNoise *electronicsnoise)
std::vector< double > m_lowThresholdSignalShape[3]
TRTElectronicsNoise * m_pElectronicsNoise
void LTt0Shift(int hitID, int strawGasType)
double m_timeInterval
Time interval covered by digit [75 ns].
int m_discriminatorSettlingTimeInBinWidths
Discriminator settling time [bins].
void SignalShaping(int strawGasType)
Shape electron drift signal according to appropriate signal shapes.
std::vector< double > m_highThresholdSignal
std::vector< double > m_highThresholdSignalShape[3]
TRTElectronicsProcessing & operator=(const TRTElectronicsProcessing &)
int m_discriminatorDeadTimeInBinWidths
Discriminator dead time [int.
int * m_highThresholdDiscriminator
Signal after discrimination.
const TRTDigSettings * m_settings