ATLAS Offline Software
Loading...
Searching...
No Matches
TRTNoise.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRT_DIGITIZATION_TRTNOISE_H
6#define TRT_DIGITIZATION_TRTNOISE_H
7
8#include "TRTDigit.h"
9
13
14#include "GaudiKernel/ServiceHandle.h"
15#include "GaudiKernel/ToolHandle.h"
16
17#include "CLHEP/Random/RandomEngine.h"
18
19#include <set>
20#include <vector>
21
22class Identifier;
23class TRTDigCondBase;
26class TRT_ID;
27
28namespace InDetDD {
30}
31
32class TRTDigSettings;
33
39class TRTNoise : public AthMessaging {
40public:
46 CLHEP::HepRandomEngine* noiseRndmEngine,
47 CLHEP::HepRandomEngine* elecNoiseRndmEngine,
48 CLHEP::HepRandomEngine* elecProcRndmEngine,
49 CLHEP::HepRandomEngine* elecNoiseResetRndmEngine,
50 TRTDigCondBase* digcond,
52 TRTElectronicsNoise * electronicsnoise,
53 const TRT_ID* trt_id,
54 int UseGasMix,
55 ToolHandle<ITRT_StrawStatusSummaryTool> sumTool
56 );
57
69 void appendPureNoiseToProperDigits( std::vector<TRTDigit>& digitVect,
70 const std::set<int>& sim_hitids,
71 CLHEP::HepRandomEngine* noiseRndmEngine) ;
72
73
74 void appendCrossTalkNoiseToProperDigits(std::vector<TRTDigit>& digitVect,
75 const std::set<Identifier>& simhitsIdentifiers,
76 const ServiceHandle<ITRT_StrawNeighbourSvc>& m_TRTStrawNeighbourSvc,
77 CLHEP::HepRandomEngine* noiseRndmEngine);
78
79 static void sortDigits(std::vector<TRTDigit>& digitVect);
80
82
83private:
84
87
91 CLHEP::HepRandomEngine* m_noise_randengine{};
92
93 //--- Initialization:
94
115 void InitThresholdsAndNoiseAmplitudes_and_ProduceNoiseDigitPool(CLHEP::HepRandomEngine* noiseRndmEngine,
116 CLHEP::HepRandomEngine* elecNoiseRndmEngine,
117 CLHEP::HepRandomEngine* elecProcRndmEngine);
118
131 void ProduceNoiseDigitPool( const std::vector<float>& lowthresholds,
132 const std::vector<float>& noiseamps,
133 const std::vector<int>& strawType,
134 CLHEP::HepRandomEngine* noiseRndmEngine,
135 CLHEP::HepRandomEngine* elecNoiseRndmEngine,
136 CLHEP::HepRandomEngine* elecProcRndmEngine
137 );
138
141 unsigned int m_digitPoolLength;
145 std::vector<unsigned int> m_digitPool;
146
147 double simulateNoiseFrequency( unsigned int totalNumberOfTests,
148 double electronicsNoiseAmplitude,
149 double lowthreshold = -1.0 );
150
160 static float useLookupTable(float x,
161 const std::vector<float>& y_given_x,
162 float min_x,
163 float max_x);
164
176 static void makeInvertedLookupTable( const std::vector<float>& y_given_x,
177 float min_x,
178 float max_x,
179 std::vector<float>& x_given_y,
180 float & min_y,
181 float & max_y );
199 static void evolve_LT2AmpVsNL_to_include_LTfluct( std::vector<float>& nl_given_lt2na,
200 float min_lt2na,
201 float max_lt2na,
202 float relativeLTFluct,
203 float & new_min_lt2na,
204 float & new_max_lt2na,
205 unsigned int number_new_bins );
206
207 Identifier getStrawIdentifier (int hitID);
208
210 ToolHandle<ITRT_StrawStatusSummaryTool> m_sumTool; // need for Argon
211
212};
213
214#endif
Abstract interface to information on straws electronic grouping.
abstract interface to TRT straw status constants
#define x
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Communication with CondDB.
Class containing parameters and settings used by TRT digitization.
Simulate TRT Electronics Noise For description of metod, see Thomas Kittelmanns PhD thesis chapters ...
const TRT_ID * m_id_helper
Definition TRTNoise.h:139
unsigned int m_digitPoolLength
Length of noise digit pool m_digitPool.
Definition TRTNoise.h:141
std::vector< unsigned int > m_digitPool
Pool of noise digits for noise in unhit straws.
Definition TRTNoise.h:145
ToolHandle< ITRT_StrawStatusSummaryTool > m_sumTool
Definition TRTNoise.h:210
void InitThresholdsAndNoiseAmplitudes_and_ProduceNoiseDigitPool(CLHEP::HepRandomEngine *noiseRndmEngine, CLHEP::HepRandomEngine *elecNoiseRndmEngine, CLHEP::HepRandomEngine *elecProcRndmEngine)
Initialize thresholds and noise amplitudes.
Definition TRTNoise.cxx:69
TRTElectronicsProcessing * m_pElectronicsProcessing
Definition TRTNoise.h:89
double simulateNoiseFrequency(unsigned int totalNumberOfTests, double electronicsNoiseAmplitude, double lowthreshold=-1.0)
void ProduceNoiseDigitPool(const std::vector< float > &lowthresholds, const std::vector< float > &noiseamps, const std::vector< int > &strawType, CLHEP::HepRandomEngine *noiseRndmEngine, CLHEP::HepRandomEngine *elecNoiseRndmEngine, CLHEP::HepRandomEngine *elecProcRndmEngine)
Produce pool of pure noise digits (for simulation of noise in unhit straws) and store them in m_digit...
Definition TRTNoise.cxx:268
void appendCrossTalkNoiseToProperDigits(std::vector< TRTDigit > &digitVect, const std::set< Identifier > &simhitsIdentifiers, const ServiceHandle< ITRT_StrawNeighbourSvc > &m_TRTStrawNeighbourSvc, CLHEP::HepRandomEngine *noiseRndmEngine)
Definition TRTNoise.cxx:356
const InDetDD::TRT_DetectorManager * m_detmgr
Definition TRTNoise.h:86
TRTNoise(const TRTDigSettings *, const InDetDD::TRT_DetectorManager *, CLHEP::HepRandomEngine *noiseRndmEngine, CLHEP::HepRandomEngine *elecNoiseRndmEngine, CLHEP::HepRandomEngine *elecProcRndmEngine, CLHEP::HepRandomEngine *elecNoiseResetRndmEngine, TRTDigCondBase *digcond, TRTElectronicsProcessing *ep, TRTElectronicsNoise *electronicsnoise, const TRT_ID *trt_id, int UseGasMix, ToolHandle< ITRT_StrawStatusSummaryTool > sumTool)
Constructor.
Definition TRTNoise.cxx:36
static void evolve_LT2AmpVsNL_to_include_LTfluct(std::vector< float > &nl_given_lt2na, float min_lt2na, float max_lt2na, float relativeLTFluct, float &new_min_lt2na, float &new_max_lt2na, unsigned int number_new_bins)
Refined noise treatment by allowing for event-by-event fluctuations in the low threshold settings.
Definition TRTNoise.cxx:539
TRTElectronicsNoise * m_pElectronicsNoise
Definition TRTNoise.h:90
int m_UseGasMix
Definition TRTNoise.h:209
const TRTDigSettings * m_settings
Definition TRTNoise.h:85
static float useLookupTable(float x, const std::vector< float > &y_given_x, float min_x, float max_x)
Return y value corresponding to input x value from LUT.
Definition TRTNoise.cxx:453
CLHEP::HepRandomEngine * m_noise_randengine
Definition TRTNoise.h:91
unsigned int m_digitPoolLength_nextaccessindex
Pointer into noise digit pool m_digitPool.
Definition TRTNoise.h:143
static void sortDigits(std::vector< TRTDigit > &digitVect)
Definition TRTNoise.cxx:447
TRTDigCondBase * m_pDigConditions
Definition TRTNoise.h:88
void appendPureNoiseToProperDigits(std::vector< TRTDigit > &digitVect, const std::set< int > &sim_hitids, CLHEP::HepRandomEngine *noiseRndmEngine)
Append noise digits to list of digits from proper hits.
Definition TRTNoise.cxx:333
static void makeInvertedLookupTable(const std::vector< float > &y_given_x, float min_x, float max_x, std::vector< float > &x_given_y, float &min_y, float &max_y)
Invert look-up-table: Go from tabulated y values vs.
Definition TRTNoise.cxx:485
Identifier getStrawIdentifier(int hitID)
Definition TRTNoise.cxx:585
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:84
Message Stream Member.