5#ifndef TRT_DIGITIZATION_TRTDIGCONDBASE_H
6#define TRT_DIGITIZATION_TRTDIGCONDBASE_H
12#include "GaudiKernel/ServiceHandle.h"
13#include "GaudiKernel/ToolHandle.h"
24 class HepRandomEngine;
43 ToolHandle<ITRT_StrawStatusSummaryTool> sumTool
52 void initialize(CLHEP::HepRandomEngine* rndmEngine);
71 double& noiseamplitude )
const;
105 bool getNextStraw(
int& hitID,
float& noiselevel,
float& noiseamp );
114 const double& lowthreshold,
115 const double& noiseamplitude );
133 const double& strawlength,
135 double& relative_noiseamplitude,
136 CLHEP::HepRandomEngine *rndmEngine) = 0;
169 mutable std::map<int,StrawState>::const_iterator m_it_hitid_to_StrawState_Last
ATLAS_THREAD_SAFE {};
194 double& lowthreshold,
195 double& noiseamplitude )
const {
197 std::lock_guard<std::mutex> lock(
m_mutex);
198 if (m_it_hitid_to_StrawState_Last->first != hitID)
201 lowthreshold = m_it_hitid_to_StrawState_Last->second.lowthreshold;
202 noiseamplitude = m_it_hitid_to_StrawState_Last->second.noiseamplitude;
234 const double& lowthreshold,
235 const double& noiseamplitude ) {
Define macros for attributes used to control the static checker.
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...
void setRefinedStrawParameters(const int &hitID, const double &lowthreshold, const double &noiseamplitude)
Set straw parameters.
double m_crosstalk_noiselevel_other_end
virtual void setStrawStateInfo(Identifier &TRT_Identifier, const double &strawlength, double &noiselevel, double &relative_noiseamplitude, CLHEP::HepRandomEngine *rndmEngine)=0
Get straw state info based on hitid and strawlength.
virtual ~TRTDigCondBase()
Destructor.
float strawAverageNoiseLevel() const
Get average noise level in straw.
std::map< int, StrawState >::const_iterator m_it_hitid_to_StrawState_End
Iterator pointing to last straw in straw state map.
std::map< int, StrawState >::const_iterator m_it_hitid_to_StrawState
Iterator over straw state map.
std::map< int, StrawState > m_hitid_to_StrawState
Global map from straw ID to straw state.
std::atomic< float > m_averageNoiseLevel
Average noise level.
const InDetDD::TRT_DetectorManager * m_detmgr
bool getNextNoisyStraw(CLHEP::HepRandomEngine *, int &hitID, float &noiselevel)
For simulation of noise in unhit straws: get next noisy straw.
const TRT_ID * m_id_helper
bool getNextStraw(int &hitID, float &noiselevel, float &noiseamp)
For looping over all straws: get next straw.
void getStrawData(const int &hitID, double &lowthreshold, double &noiseamplitude) const
Get straw data mixed condition is implemented function will return both Argon and Xenon straws (with ...
const TRTDigSettings * m_settings
TRTDigCondBase(const TRTDigSettings *, const InDetDD::TRT_DetectorManager *, const TRT_ID *, int UseGasMix, ToolHandle< ITRT_StrawStatusSummaryTool > sumTool)
Constructor.
std::map< int, StrawState >::iterator m_all_it_hitid_to_StrawState
Iterator over straw state map.
std::map< int, StrawState >::iterator m_all_it_hitid_to_StrawState_previous
Iterator used for caching.
bool crossTalkNoiseOtherEnd(CLHEP::HepRandomEngine *) const
ToolHandle< ITRT_StrawStatusSummaryTool > m_sumTool
double m_crosstalk_noiselevel
void resetGetNextStraw()
For looping over all straws: Rewind straw list to start from beginning.
void resetGetNextNoisyStraw()
For noise in unhit straws: Rewind straw list to start from beginning.
bool crossTalkNoise(CLHEP::HepRandomEngine *) const
std::map< int, StrawState >::const_iterator m_it_hitid_to_StrawState_Last ATLAS_THREAD_SAFE
Iterator used for caching (ought to be called _Previous)
unsigned int totalNumberOfActiveStraws() const
Get total number of active straws.
Class containing parameters and settings used by TRT digitization.
This is an Identifier helper class for the TRT subdetector.
float noiseamplitude
Noise amplitude.
float lowthreshold
Low threshold discriminator setting.
float noiselevel
Noise level.