12#ifndef TGCDIGITMAKER_H
13#define TGCDIGITMAKER_H
19#include "GaudiKernel/StatusCode.h"
21#include "Identifier/Identifier.h"
44 const bool doFourBunch);
77 const double globalHitTime,
81 CLHEP::HepRandomEngine* rndmEngine);
113 CLHEP::HepRandomEngine* rndmEngine)
const;
119 CLHEP::HepRandomEngine* rndmEngine)
const;
120 bool efficiencyCheck(
const std::string& stationName,
const int stationEta,
121 const int stationPhi,
const int gasGap,
123 const double energyDeposit)
const;
125 uint16_t
bcTagging(
const double digittime,
const double window,
126 const double offset)
const;
139 int stationPhi,
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,
149 bool isDeadChamber(
const std::string& stationName,
int stationEta,
150 int stationPhi,
int gasGap);
160 const int stationPhi,
164 const int iStationName,
165 const int stationEta,
const int stationPhi,
166 const TgcSensor sensor,
const int channel,
167 const float position)
const;
170 const uint16_t station_num,
const int station_eta,
174 const uint16_t layer_id,
176 const unsigned int index_prob) ;
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.