ATLAS Offline Software
Loading...
Searching...
No Matches
TgcDigitMaker.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
11
12#ifndef TGCDIGITMAKER_H
13#define TGCDIGITMAKER_H
14
15#include <string>
16#include <vector>
17
19#include "GaudiKernel/StatusCode.h"
21#include "Identifier/Identifier.h"
25
26namespace CLHEP {
27class HepRandomEngine;
28}
29
30namespace MuonGM {
32}
33
35class TgcHitIdHelper;
36class TgcIdHelper;
37class TGCSimHit;
38
39//--- class description
41 public:
42 TgcDigitMaker(const TgcHitIdHelper* hitIdHelper,
43 const MuonGM::MuonDetectorManager* mdManager,
44 const bool doFourBunch);
45
46 virtual ~TgcDigitMaker() = default;
47
54 StatusCode initialize();
55
77 const double globalHitTime,
78 const TgcDigitASDposData* ASDpos,
79 const TgcDigitTimeOffsetData* TOffset,
80 const TgcDigitCrosstalkData* Crosstalk,
81 CLHEP::HepRandomEngine* rndmEngine);
82
83 //====== for private
84 private:
103
107 StatusCode readFileOfTimeJitter();
112 float timeJitter(const Amg::Vector3D&,
113 CLHEP::HepRandomEngine* rndmEngine) const;
114
118 bool efficiencyCheck(const TgcSensor sensor,
119 CLHEP::HepRandomEngine* rndmEngine) const;
120 bool efficiencyCheck(const std::string& stationName, const int stationEta,
121 const int stationPhi, const int gasGap,
122 const TgcSensor sensor,
123 const double energyDeposit) const;
124
125 uint16_t bcTagging(const double digittime, const double window,
126 const double offset) const;
127 static void addDigit(const Identifier id, const uint16_t bctag,
128 TgcDigitCollection* digits) ;
129
131 StatusCode readFileOfEnergyThreshold();
133 StatusCode readFileOfDeadChamber();
135 StatusCode readFileOfStripPosition();
136
138 double getEnergyThreshold(const std::string& stationName, int stationEta,
139 int stationPhi, int gasGap,
140 const TgcSensor sensor) const;
141 void randomCrossTalk(const TgcDigitCrosstalkData* crosstalk,
142 const Identifier elemId, const int gasGap,
143 const TgcSensor sensor, const int channel,
144 const float posInStrip, const float digitTime,
145 const float time_offset,
146 CLHEP::HepRandomEngine* rndmEngine,
147 TgcDigitCollection* digits) const;
149 bool isDeadChamber(const std::string& stationName, int stationEta,
150 int stationPhi, int gasGap);
152 static int getIStationName(const std::string& staionName) ;
154 float getStripPosition(const std::string& stationName, int stationEta,
155 int channel) const;
157 static double getSigPropTimeDelay(const float cableDistance) ;
159 static float timeDiffByCableRadiusOfInner(const int iStationName,
160 const int stationPhi,
161 const int channel) ;
164 const int iStationName,
165 const int stationEta, const int stationPhi,
166 const TgcSensor sensor, const int channel,
167 const float position) const;
169 static float getTimeOffset(const TgcDigitTimeOffsetData* readCdo,
170 const uint16_t station_num, const int station_eta,
171 const TgcSensor sensor) ;
173 static float getCrosstalkProbability(const TgcDigitCrosstalkData* readCdo,
174 const uint16_t layer_id,
175 const TgcSensor sensor,
176 const unsigned int index_prob) ;
177
179 unsigned int getRunPeriod() const;
180
184
186
189
190 std::vector<std::vector<float> > m_vecAngle_Time;
191
194 m_mdManager{}; // cannot use ReadCondHandleKey since no athena component
197
206
209};
210
211#endif
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
static float getTimeOffset(const TgcDigitTimeOffsetData *readCdo, const uint16_t station_num, const int station_eta, const TgcSensor sensor)
Method to get time offset to absorb signal delay.
static float getCrosstalkProbability(const TgcDigitCrosstalkData *readCdo, const uint16_t layer_id, const TgcSensor sensor, const unsigned int index_prob)
Method to get the channel crosstalk probability.
StatusCode readFileOfDeadChamber()
Read share/TGC_Digitization_deadChamber.dat file.
StatusCode initialize()
Initializes TgcHitIdHelper, TgcIdHelper and random number of a stream for the digitization.
static double getSigPropTimeDelay(const float cableDistance)
Method to get signal propagation time delay.
static void addDigit(const Identifier id, const uint16_t bctag, TgcDigitCollection *digits)
bool efficiencyCheck(const TgcSensor sensor, CLHEP::HepRandomEngine *rndmEngine) const
Determines whether a hit is detected or not.
float m_efficiency[N_SENSOR]
StatusCode readFileOfTimeJitter()
Reads parameters for intrinsic time response from timejitter.dat.
float getDistanceToAsdFromSensor(const TgcDigitASDposData *readCdo, const int iStationName, const int stationEta, const int stationPhi, const TgcSensor sensor, const int channel, const float position) const
Method to get propagation time to the ASD from the sensor.
static int getIStationName(const std::string &staionName)
Get stationName integer from stationName string.
static float timeDiffByCableRadiusOfInner(const int iStationName, const int stationPhi, const int channel)
Method to get time difference by cable radius of inner.
float getStripPosition(const std::string &stationName, int stationEta, int channel) const
Method to get position of Strip channel.
double m_bunchCrossingTime
std::vector< std::vector< float > > m_vecAngle_Time
unsigned int getRunPeriod() const
Determine the run period.
bool isDeadChamber(const std::string &stationName, int stationEta, int stationPhi, int gasGap)
Method to check a chamber is dead or active.
float timeJitter(const Amg::Vector3D &, CLHEP::HepRandomEngine *rndmEngine) const
Calculates intrinsic time response according to incident angle of a track based on time response para...
StatusCode readFileOfEnergyThreshold()
Read share/TGC_Digitization_energyThreshold.dat file.
double m_energyThreshold[N_STATIONNAME][N_STATIONETA][N_STATIONPHI][N_GASGAP][N_ISSTRIP]
Energy threshold value for each chamber.
void randomCrossTalk(const TgcDigitCrosstalkData *crosstalk, const Identifier elemId, const int gasGap, const TgcSensor sensor, const int channel, const float posInStrip, const float digitTime, const float time_offset, CLHEP::HepRandomEngine *rndmEngine, TgcDigitCollection *digits) const
StatusCode readFileOfStripPosition()
Read share/TGC_Digitization_StripPosition.dat file.
double m_gateTimeWindow[N_STATION][N_SENSOR]
define the time windows for signals from wiregangs and strips.
TgcDigitMaker(const TgcHitIdHelper *hitIdHelper, const MuonGM::MuonDetectorManager *mdManager, const bool doFourBunch)
const MuonGM::MuonDetectorManager * m_mdManager
TgcDigitCollection * executeDigi(const TGCSimHit *hit, const double globalHitTime, const TgcDigitASDposData *ASDpos, const TgcDigitTimeOffsetData *TOffset, const TgcDigitCrosstalkData *Crosstalk, CLHEP::HepRandomEngine *rndmEngine)
A single hit can be digitized in the two directions independently: R and phi directions.
bool m_doFourBunchDigitization
Activate four bunch digitization.
double getEnergyThreshold(const std::string &stationName, int stationEta, int stationPhi, int gasGap, const TgcSensor sensor) const
Get energy threshold value for each chamber.
uint16_t bcTagging(const double digittime, const double window, const double offset) const
virtual ~TgcDigitMaker()=default
bool m_isDeadChamber[N_STATIONNAME][N_STATIONETA][N_STATIONPHI][N_GASGAP]
Dead chamber flag for each chamber.
const TgcHitIdHelper * m_hitIdHelper
const TgcIdHelper * m_idHelper
float m_StripPos[N_STATIONNAME][N_ABSSTATIONETA][N_STRIPCHANNEL]
Position of Strip Channel (Longer base or Shorter base)
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27