5#ifndef TRT_DIGITIZATION_TRTNOISE_H
6#define TRT_DIGITIZATION_TRTNOISE_H
14#include "GaudiKernel/ServiceHandle.h"
15#include "GaudiKernel/ToolHandle.h"
17#include "CLHEP/Random/RandomEngine.h"
46 CLHEP::HepRandomEngine* noiseRndmEngine,
47 CLHEP::HepRandomEngine* elecNoiseRndmEngine,
48 CLHEP::HepRandomEngine* elecProcRndmEngine,
49 CLHEP::HepRandomEngine* elecNoiseResetRndmEngine,
55 ToolHandle<ITRT_StrawStatusSummaryTool> sumTool
70 const std::set<int>& sim_hitids,
71 CLHEP::HepRandomEngine* noiseRndmEngine) ;
75 const std::set<Identifier>& simhitsIdentifiers,
77 CLHEP::HepRandomEngine* noiseRndmEngine);
79 static void sortDigits(std::vector<TRTDigit>& digitVect);
116 CLHEP::HepRandomEngine* elecNoiseRndmEngine,
117 CLHEP::HepRandomEngine* elecProcRndmEngine);
132 const std::vector<float>& noiseamps,
133 const std::vector<int>& strawType,
134 CLHEP::HepRandomEngine* noiseRndmEngine,
135 CLHEP::HepRandomEngine* elecNoiseRndmEngine,
136 CLHEP::HepRandomEngine* elecProcRndmEngine
148 const double& electronicsNoiseAmplitude,
149 double lowthreshold = -1.0 );
161 const std::vector<float>& y_given_x,
163 const float & max_x);
179 std::vector<float>& x_given_y,
200 const float & min_lt2na,
201 const float & max_lt2na,
202 const float relativeLTFluct,
203 float & new_min_lt2na,
204 float & new_max_lt2na,
205 const unsigned int& number_new_bins );
Abstract interface to information on straws electronic grouping.
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
unsigned int m_digitPoolLength
Length of noise digit pool m_digitPool.
std::vector< unsigned int > m_digitPool
Pool of noise digits for noise in unhit straws.
static void makeInvertedLookupTable(const std::vector< float > &y_given_x, const float &min_x, const 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.
ToolHandle< ITRT_StrawStatusSummaryTool > m_sumTool
void InitThresholdsAndNoiseAmplitudes_and_ProduceNoiseDigitPool(CLHEP::HepRandomEngine *noiseRndmEngine, CLHEP::HepRandomEngine *elecNoiseRndmEngine, CLHEP::HepRandomEngine *elecProcRndmEngine)
Initialize thresholds and noise amplitudes.
TRTElectronicsProcessing * m_pElectronicsProcessing
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...
static float useLookupTable(const float &x, const std::vector< float > &y_given_x, const float &min_x, const float &max_x)
Return y value corresponding to input x value from LUT.
void appendCrossTalkNoiseToProperDigits(std::vector< TRTDigit > &digitVect, const std::set< Identifier > &simhitsIdentifiers, const ServiceHandle< ITRT_StrawNeighbourSvc > &m_TRTStrawNeighbourSvc, CLHEP::HepRandomEngine *noiseRndmEngine)
const InDetDD::TRT_DetectorManager * m_detmgr
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.
TRTElectronicsNoise * m_pElectronicsNoise
const TRTDigSettings * m_settings
CLHEP::HepRandomEngine * m_noise_randengine
unsigned int m_digitPoolLength_nextaccessindex
Pointer into noise digit pool m_digitPool.
static void evolve_LT2AmpVsNL_to_include_LTfluct(std::vector< float > &nl_given_lt2na, const float &min_lt2na, const float &max_lt2na, const float relativeLTFluct, float &new_min_lt2na, float &new_max_lt2na, const unsigned int &number_new_bins)
Refined noise treatment by allowing for event-by-event fluctuations in the low threshold settings.
static void sortDigits(std::vector< TRTDigit > &digitVect)
TRTDigCondBase * m_pDigConditions
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.
double simulateNoiseFrequency(const unsigned int &totalNumberOfTests, const double &electronicsNoiseAmplitude, double lowthreshold=-1.0)
Identifier getStrawIdentifier(int hitID)
This is an Identifier helper class for the TRT subdetector.