ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetDigitization
TRT_Digitization
src
TRTDigCondFakeMap.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TRTDigCondFakeMap.h
"
6
#include "
TRTDigSettings.h
"
7
#include "
TRTDigiHelper.h
"
8
9
// For the Athena-based random numbers.
10
#include "CLHEP/Random/RandFlat.h"
11
#include "CLHEP/Random/RandGaussZiggurat.h"
12
#include "CLHEP/Random/RandomEngine.h"
13
14
// Units
15
#include "CLHEP/Units/SystemOfUnits.h"
16
17
//helpers for identifiers and hitids:
18
#include "
InDetIdentifier/TRT_ID.h
"
19
20
#include <cmath>
21
#include <cstdlib>
22
#include <utility>
23
24
//________________________________________________________________________________
25
TRTDigCondFakeMap::TRTDigCondFakeMap
(
const
TRTDigSettings
* digset,
26
const
InDetDD::TRT_DetectorManager
* detmgr,
27
const
TRT_ID
* trt_id,
28
int
UseGasMix,
29
ToolHandle<ITRT_StrawStatusSummaryTool> & sumTool
30
)
31
:
TRTDigCondBase
(digset, detmgr, trt_id, UseGasMix, sumTool)
32
{
33
m_average_noiselevel
=
m_settings
->averageNoiseLevel();
34
}
35
36
37
//________________________________________________________________________________
38
void
TRTDigCondFakeMap::setStrawStateInfo
(
Identifier
& TRT_Identifier,
39
double
strawlength,
40
double
& noiselevel,
41
double
& relative_noiseamplitude,
42
CLHEP::HepRandomEngine* rndmEngine) {
43
44
noiselevel =
m_average_noiselevel
;
// Not used here, but returned to caller
45
46
// 5% relative fluctuation is hard-coded here
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 ); }
49
50
// Anatoli says we need to scale the noise amplitude of Kr,Ar according to LT_(Kr,Ar)/LT_Xe
51
MsgStream* amsg = &(
msg
());
52
const
int
statusHT =
m_sumTool
->getStatusHT(TRT_Identifier, Gaudi::Hive::currentContext());
53
const
int
strawGasType =
TRTDigiHelper::StrawGasType
(statusHT,
m_UseGasMix
, amsg);
54
bool
isBar = abs(
m_id_helper
->barrel_ec(TRT_Identifier))==1;
55
double
averagenoiseampforstrawlength = ( ( (800.)/(100*CLHEP::cm) ) * strawlength + 2100.0 ) / 2500.0;
56
57
if
( isBar ) {
58
averagenoiseampforstrawlength *= (
m_settings
->lowThresholdBar(strawGasType)/
m_settings
->lowThresholdBar(0) );
59
}
else
{
60
averagenoiseampforstrawlength *= (
m_settings
->lowThresholdEC(strawGasType)/
m_settings
->lowThresholdEC(0) );
61
}
62
63
relative_noiseamplitude = relnoiseamp * averagenoiseampforstrawlength;
64
}
TRTDigCondFakeMap.h
TRTDigSettings.h
TRTDigiHelper.h
TRT_ID.h
This is an Identifier helper class for the TRT subdetector.
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition
AthMessaging.h:167
InDetDD::TRT_DetectorManager
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Definition
TRT_DetectorManager.h:63
TRTDigCondBase::m_UseGasMix
int m_UseGasMix
Definition
TRTDigCondBase.h:183
TRTDigCondBase::m_id_helper
const TRT_ID * m_id_helper
Definition
TRTDigCondBase.h:141
TRTDigCondBase::m_settings
const TRTDigSettings * m_settings
Definition
TRTDigCondBase.h:139
TRTDigCondBase::TRTDigCondBase
TRTDigCondBase(const TRTDigSettings *, const InDetDD::TRT_DetectorManager *, const TRT_ID *, int UseGasMix, const ToolHandle< ITRT_StrawStatusSummaryTool > &sumTool)
Constructor.
Definition
TRTDigCondBase.cxx:25
TRTDigCondBase::m_sumTool
ToolHandle< ITRT_StrawStatusSummaryTool > m_sumTool
Definition
TRTDigCondBase.h:184
TRTDigCondFakeMap::setStrawStateInfo
void setStrawStateInfo(Identifier &TRT_Identifier, double strawlength, double &noiselevel, double &relative_noiseamplitude, CLHEP::HepRandomEngine *rndmEngine)
Get straw state info based on hitid and strawlength.
Definition
TRTDigCondFakeMap.cxx:38
TRTDigCondFakeMap::m_average_noiselevel
float m_average_noiselevel
Average noise level.
Definition
TRTDigCondFakeMap.h:37
TRTDigCondFakeMap::TRTDigCondFakeMap
TRTDigCondFakeMap(const TRTDigSettings *, const InDetDD::TRT_DetectorManager *, const TRT_ID *trt_id, int UseGasMix, ToolHandle< ITRT_StrawStatusSummaryTool > &sumTool)
Constructor.
Definition
TRTDigCondFakeMap.cxx:25
TRTDigSettings
Class containing parameters and settings used by TRT digitization.
Definition
TRTDigSettings.h:34
TRT_ID
This is an Identifier helper class for the TRT subdetector.
Definition
TRT_ID.h:84
Identifier
Definition
IdentifierFieldParser.cxx:14
TRTDigiHelper::StrawGasType
int StrawGasType(int statusHT, int useGasMix, MsgStream *log)
Definition
TRTDigiHelper.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0