10#include "CLHEP/Random/RandFlat.h"
11#include "CLHEP/Random/RandGaussZiggurat.h"
12#include "CLHEP/Random/RandomEngine.h"
15#include "CLHEP/Units/SystemOfUnits.h"
29 ToolHandle<ITRT_StrawStatusSummaryTool> sumTool
39 const double& strawlength,
41 double& relative_noiseamplitude,
42 CLHEP::HepRandomEngine* rndmEngine) {
47 double relnoiseamp = CLHEP::RandGaussZiggurat::shoot(rndmEngine, 1.00, 0.05 );
48 while (relnoiseamp < 0.10) { relnoiseamp = CLHEP::RandGaussZiggurat::shoot(rndmEngine, 1.00, 0.05 ); }
51 MsgStream* amsg = &(
msg());
52 const int statusHT =
m_sumTool->getStatusHT(TRT_Identifier, Gaudi::Hive::currentContext());
54 bool isBar = abs(
m_id_helper->barrel_ec(TRT_Identifier))==1;
55 double averagenoiseampforstrawlength = ( ( (800.)/(100*CLHEP::cm) ) * strawlength + 2100.0 ) / 2500.0;
58 averagenoiseampforstrawlength *= (
m_settings->lowThresholdBar(strawGasType)/
m_settings->lowThresholdBar(0) );
60 averagenoiseampforstrawlength *= (
m_settings->lowThresholdEC(strawGasType)/
m_settings->lowThresholdEC(0) );
63 relative_noiseamplitude = relnoiseamp * averagenoiseampforstrawlength;
This is an Identifier helper class for the TRT subdetector.
MsgStream & msg() const
The standard message stream.
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
const TRT_ID * m_id_helper
const TRTDigSettings * m_settings
TRTDigCondBase(const TRTDigSettings *, const InDetDD::TRT_DetectorManager *, const TRT_ID *, int UseGasMix, ToolHandle< ITRT_StrawStatusSummaryTool > sumTool)
Constructor.
ToolHandle< ITRT_StrawStatusSummaryTool > m_sumTool
TRTDigCondFakeMap(const TRTDigSettings *, const InDetDD::TRT_DetectorManager *, const TRT_ID *trt_id, int UseGasMix, ToolHandle< ITRT_StrawStatusSummaryTool > sumTool)
Constructor.
float m_average_noiselevel
Average noise level.
void setStrawStateInfo(Identifier &TRT_Identifier, const double &strawlength, double &noiselevel, double &relative_noiseamplitude, CLHEP::HepRandomEngine *rndmEngine)
Get straw state info based on hitid and strawlength.
Class containing parameters and settings used by TRT digitization.
This is an Identifier helper class for the TRT subdetector.
int StrawGasType(int statusHT, int useGasMix, MsgStream *log)