ATLAS Offline Software
Loading...
Searching...
No Matches
TRTProcessingOfStraw.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRT_DIGITIZATION_TRTPROCESSINGOFSTRAW_H
6#define TRT_DIGITIZATION_TRTPROCESSINGOFSTRAW_H
7
9
10//Hit classes
12
14
16
18// MagField cache
21
23
25
27
28#include "CLHEP/Random/RandomEngine.h"
30
31#include <memory>
32#include <vector>
33
34class TRTDigit;
36class TRTNoise;
37class TRTDigCondBase;
38
40class ITRT_PAITool;
42
43namespace InDetDD {
46}
47
48class TRTDigSettings;
49class GenData;
50
57public:
64 TRTNoise * noise,
65 TRTDigCondBase* digcond,
66 const TRT_ID*,
67 ITRT_PAITool* = nullptr,
68 ITRT_PAITool* = nullptr,
69 const ITRT_CalDbTool* = nullptr);
72
75
96 const InDetDD::TRT_DetElementContainer* detElements,
99 TRTDigit& outdigit,
100 bool & m_alreadyPrintedPDGcodeWarning,
101 double m_cosmicEventPhase, //const ComTime* m_ComTime,
102 int strawGasType,
103 bool emulationArflag,
104 bool emulationKrflag,
105 CLHEP::HepRandomEngine* rndmEngine,
106 CLHEP::HepRandomEngine* elecProcRndmEngine,
107 CLHEP::HepRandomEngine* elecNoiseRndmEngine,
108 CLHEP::HepRandomEngine* paiRndmEngine );
109
110private:
111
112 //NB copy-constructor and assignment operator declared, but not defined.
115
117 void Initialize(const ITRT_CalDbTool *);
118
125
127 bool m_timeCorrection = false;
128
131
132 bool m_useAttenuation = false;
134
135 double m_maxCrossingTime = 0.0;
136 double m_minCrossingTime = 0.0;
137 double m_shiftOfZeroPoint = 0.0;
138
141
143
144
149
150 std::unique_ptr<GenData> m_genData;
151
153 class cluster {
154 public:
155 cluster(double e, double t, double x, double y, double z) :
156 energy(e), time(t), xpos(x), ypos(y), zpos(z) {};
157 double energy;
158 double time;
159 double xpos;
160 double ypos;
161 double zpos;
162 };
163
164 std::vector<cluster> m_clusterlist;
165 std::vector<TRTElectronicsProcessing::Deposit> m_depositList;
166
187 void addClustersFromStep ( double scaledKineticEnergy,
188 double particleCharge,
189 double timeOfHit,
190 double prex,
191 double prey,
192 double prez,
193 double postx,
194 double posty,
195 double postz,
196 std::vector<cluster>& clusterlist,
197 int strawGasType,
198 CLHEP::HepRandomEngine* rndmEngine,
199 CLHEP::HepRandomEngine* paiRndmEngine);
216 void ClustersToDeposits (MagField::AtlasFieldCache& fieldCache, int hitID,
217 const std::vector<cluster>& clusters,
218 std::vector<TRTElectronicsProcessing::Deposit>& deposits,
219 const Amg::Vector3D& TRThitGlobalPos,
220 double m_cosmicEventPhase, // const ComTime* m_ComTime
221 int strawGasType,
222 CLHEP::HepRandomEngine* rndmEngine);
223
224 double setClusterZ(double cluster_z_in, bool isLong, bool isShort, bool isEC) const;
225
226 std::vector<double> m_drifttimes; // electron drift times
227 std::vector<double> m_expattenuation; // tabulation of exp()
228 unsigned int m_maxelectrons = 0U; // maximum number of them (minmum is 100 for the Gaussian approx to be ok);
229
231
233 , const TimedHitPtr<TRTUncompressedHit> *theHit
234 , const InDetDD::TRT_DetElementContainer* detElements);
235
236 std::unique_ptr<CLHEP::RandBinomialFixedP> m_randBinomialXe{};
237 std::unique_ptr<CLHEP::RandBinomialFixedP> m_randBinomialKr{};
238 std::unique_ptr<CLHEP::RandBinomialFixedP> m_randBinomialAr{};
239
240protected:
242
243};
244
245#endif
abstract interface to TRT calibration constants
This is an Identifier helper class for the TRT subdetector.
#define y
#define x
#define z
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
GenData is a class for particle data access.
Definition GenData.h:18
abstract interface to TRT calibration constants
Give and AlgTool interface to the PAI model.
Class to hold different TRT detector elements structures.
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h).
Communication with CondDB.
Class containing parameters and settings used by TRT digitization.
Class for TRT digits.
Definition TRTDigit.h:11
Simulation of noise hits in the TRT.
Definition TRTNoise.h:39
cluster(double e, double t, double x, double y, double z)
Amg::Vector3D getGlobalPosition(int hitID, const TimedHitPtr< TRTUncompressedHit > *theHit, const InDetDD::TRT_DetElementContainer *detElements)
std::unique_ptr< CLHEP::RandBinomialFixedP > m_randBinomialXe
TRTDigCondBase * m_pDigConditions
std::unique_ptr< CLHEP::RandBinomialFixedP > m_randBinomialKr
std::vector< cluster > m_clusterlist
TRTProcessingOfStraw(const TRTProcessingOfStraw &)
std::unique_ptr< CLHEP::RandBinomialFixedP > m_randBinomialAr
void ClustersToDeposits(MagField::AtlasFieldCache &fieldCache, int hitID, const std::vector< cluster > &clusters, std::vector< TRTElectronicsProcessing::Deposit > &deposits, const Amg::Vector3D &TRThitGlobalPos, double m_cosmicEventPhase, int strawGasType, CLHEP::HepRandomEngine *rndmEngine)
Transform the ioniation clusters along the particle trajectory inside a straw to energy deposits (i....
TRTElectronicsProcessing * m_pElectronicsProcessing
void Initialize(const ITRT_CalDbTool *)
Initialize.
std::vector< TRTElectronicsProcessing::Deposit > m_depositList
std::vector< double > m_expattenuation
bool m_timeCorrection
Time to be corrected for flight and wire propagation delays false when beamType='cosmics'.
void addClustersFromStep(double scaledKineticEnergy, double particleCharge, double timeOfHit, double prex, double prey, double prez, double postx, double posty, double postz, std::vector< cluster > &clusterlist, int strawGasType, CLHEP::HepRandomEngine *rndmEngine, CLHEP::HepRandomEngine *paiRndmEngine)
This is the main function for re-simulation of the ionisation in the active gas via the PAI model.
TimedHitCollection< TRTUncompressedHit >::const_iterator hitCollConstIter
void ProcessStraw(MagField::AtlasFieldCache &fieldCache, const InDetDD::TRT_DetElementContainer *detElements, hitCollConstIter i, hitCollConstIter e, TRTDigit &outdigit, bool &m_alreadyPrintedPDGcodeWarning, double m_cosmicEventPhase, int strawGasType, bool emulationArflag, bool emulationKrflag, CLHEP::HepRandomEngine *rndmEngine, CLHEP::HepRandomEngine *elecProcRndmEngine, CLHEP::HepRandomEngine *elecNoiseRndmEngine, CLHEP::HepRandomEngine *paiRndmEngine)
Process this straw all the way from Geant4 hit to output digit.
std::vector< double > m_drifttimes
std::unique_ptr< GenData > m_genData
TRTTimeCorrection * m_pTimeCorrection
const TRTDigSettings * m_settings
TRTProcessingOfStraw(const TRTDigSettings *, const InDetDD::TRT_DetectorManager *, ITRT_PAITool *, ITRT_SimDriftTimeTool *, TRTElectronicsProcessing *ep, TRTNoise *noise, TRTDigCondBase *digcond, const TRT_ID *, ITRT_PAITool *=nullptr, ITRT_PAITool *=nullptr, const ITRT_CalDbTool *=nullptr)
Constructor: Calls Initialize method.
ITRT_SimDriftTimeTool * m_pSimDriftTimeTool
const InDetDD::TRT_DetectorManager * m_detmgr
double setClusterZ(double cluster_z_in, bool isLong, bool isShort, bool isEC) const
TRTProcessingOfStraw & operator=(const TRTProcessingOfStraw &)
Time correction.
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:84
TimedVector::const_iterator const_iterator
a smart pointer to a hit that also provides access to the extended timing info of the host event.
Definition TimedHitPtr.h:18
Eigen::Matrix< double, 3, 1 > Vector3D
Message Stream Member.