ATLAS Offline Software
TRTProcessingOfStraw.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 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 //Particle Table
13 #include "HepPDT/ParticleDataTable.hh"
14 
15 #include "InDetIdentifier/TRT_ID.h"
16 
18 
20 // MagField cache
23 
26 
28 
30 
31 #include "CLHEP/Random/RandomEngine.h"
33 
34 #include <memory>
35 #include <vector>
36 
37 class TRTDigit;
38 class TRTTimeCorrection;
39 class TRTNoise;
40 class TRTDigCondBase;
41 
42 class TRTUncompressedHit;
43 class ITRT_PAITool;
45 
46 namespace InDetDD { class TRT_DetectorManager; }
47 
48 class TRTDigSettings;
49 
56 public:
60  ITRT_PAITool*,
63  TRTNoise * noise,
64  TRTDigCondBase* digcond,
65  const HepPDT::ParticleDataTable*,
66  const TRT_ID*,
67  ITRT_PAITool* = NULL,
68  ITRT_PAITool* = NULL,
69  const ITRT_CalDbTool* = NULL);
72 
75 
95  void ProcessStraw (MagField::AtlasFieldCache& fieldCache,
98  TRTDigit& outdigit,
99  bool & m_alreadyPrintedPDGcodeWarning,
100  double m_cosmicEventPhase, //const ComTime* m_ComTime,
101  int strawGasType,
102  bool emulationArflag,
103  bool emulationKrflag,
104  CLHEP::HepRandomEngine* rndmEngine,
105  CLHEP::HepRandomEngine* elecProcRndmEngine,
106  CLHEP::HepRandomEngine* elecNoiseRndmEngine,
107  CLHEP::HepRandomEngine* paiRndmEngine );
108 
109 private:
110 
111  //NB copy-constructor and assignment operator declared, but not defined.
114 
116  void Initialize(const ITRT_CalDbTool *);
117 
124 
126  bool m_timeCorrection = false;
127 
129  double m_attenuationLength = 0.0;
130 
131  bool m_useAttenuation = false;
132  bool m_useMagneticFieldMap = false;
133 
134  double m_maxCrossingTime = 0.0;
135  double m_minCrossingTime = 0.0;
136  double m_shiftOfZeroPoint = 0.0;
137 
138  double m_innerRadiusOfStraw = 0.0;
139  double m_outerRadiusOfWire = 0.0;
140 
142 
143 
148 
149  const HepPDT::ParticleDataTable* m_pParticleTable;
150 
152  class cluster {
153  public:
154  cluster(double e, double t, double x, double y, double z) :
155  energy(e), time(t), xpos(x), ypos(y), zpos(z) {};
156  double energy;
157  double time;
158  double xpos;
159  double ypos;
160  double zpos;
161  };
162 
163  std::vector<cluster> m_clusterlist;
164  std::vector<TRTElectronicsProcessing::Deposit> m_depositList;
165 
186  void addClustersFromStep ( const double& scaledKineticEnergy,
187  const double& particleCharge,
188  const double& timeOfHit,
189  const double& prex,
190  const double& prey,
191  const double& prez,
192  const double& postx,
193  const double& posty,
194  const double& postz,
195  std::vector<cluster>& clusterlist,
196  int strawGasType,
197  CLHEP::HepRandomEngine* rndmEngine,
198  CLHEP::HepRandomEngine* paiRndmEngine);
215  void ClustersToDeposits (MagField::AtlasFieldCache& fieldCache, const int& hitID,
216  const std::vector<cluster>& clusters,
217  std::vector<TRTElectronicsProcessing::Deposit>& deposits,
218  Amg::Vector3D TRThitGlobalPos,
219  double m_cosmicEventPhase, // const ComTime* m_ComTime
220  int strawGasType,
221  CLHEP::HepRandomEngine* rndmEngine);
222 
223  double setClusterZ(double cluster_z_in, bool isLong, bool isShort, bool isEC) const;
224 
225  std::vector<double> m_drifttimes; // electron drift times
226  std::vector<double> m_expattenuation; // tabulation of exp()
227  unsigned int m_maxelectrons = 0U; // maximum number of them (minmum is 100 for the Gaussian approx to be ok);
228 
230 
232 
233  std::unique_ptr<CLHEP::RandBinomialFixedP> m_randBinomialXe{};
234  std::unique_ptr<CLHEP::RandBinomialFixedP> m_randBinomialKr{};
235  std::unique_ptr<CLHEP::RandBinomialFixedP> m_randBinomialAr{};
236 
237 protected:
239 
240 };
241 
242 #endif
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TRTProcessingOfStraw::m_pElectronicsProcessing
TRTElectronicsProcessing * m_pElectronicsProcessing
Definition: TRTProcessingOfStraw.h:145
TRTProcessingOfStraw::m_pDigConditions
TRTDigCondBase * m_pDigConditions
Definition: TRTProcessingOfStraw.h:147
TRTProcessingOfStraw::m_drifttimes
std::vector< double > m_drifttimes
Definition: TRTProcessingOfStraw.h:225
TRTProcessingOfStraw::m_innerRadiusOfStraw
double m_innerRadiusOfStraw
Definition: TRTProcessingOfStraw.h:138
ITRT_PAITool
Definition: ITRT_PAITool.h:20
TRTProcessingOfStraw::m_detmgr
const InDetDD::TRT_DetectorManager * m_detmgr
Definition: TRTProcessingOfStraw.h:119
TRTProcessingOfStraw::m_signalPropagationSpeed
double m_signalPropagationSpeed
Definition: TRTProcessingOfStraw.h:128
TRTProcessingOfStraw::m_pPAItoolKr
ITRT_PAITool * m_pPAItoolKr
Definition: TRTProcessingOfStraw.h:122
TRTProcessingOfStraw::TRTProcessingOfStraw
TRTProcessingOfStraw(const TRTDigSettings *, const InDetDD::TRT_DetectorManager *, ITRT_PAITool *, ITRT_SimDriftTimeTool *, TRTElectronicsProcessing *ep, TRTNoise *noise, TRTDigCondBase *digcond, const HepPDT::ParticleDataTable *, const TRT_ID *, ITRT_PAITool *=NULL, ITRT_PAITool *=NULL, const ITRT_CalDbTool *=NULL)
Constructor: Calls Initialize method.
Definition: TRTProcessingOfStraw.cxx:47
TRT_ID.h
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
TRTProcessingOfStraw::Initialize
void Initialize(const ITRT_CalDbTool *)
Initialize.
Definition: TRTProcessingOfStraw.cxx:88
TRTUncompressedHit
Definition: TRTUncompressedHit.h:11
TRTElectronicsProcessing
Electronics Processing.
Definition: TRTElectronicsProcessing.h:23
TRTProcessingOfStraw::~TRTProcessingOfStraw
~TRTProcessingOfStraw()
Destructor.
Definition: TRTProcessingOfStraw.cxx:82
TimedHitPtr< TRTUncompressedHit >
TRTProcessingOfStraw::cluster
Primary ionisation cluster.
Definition: TRTProcessingOfStraw.h:152
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TRTProcessingOfStraw::m_id_helper
const TRT_ID * m_id_helper
Definition: TRTProcessingOfStraw.h:238
TRTProcessingOfStraw::m_randBinomialXe
std::unique_ptr< CLHEP::RandBinomialFixedP > m_randBinomialXe
Definition: TRTProcessingOfStraw.h:233
TRTProcessingOfStraw::m_maxCrossingTime
double m_maxCrossingTime
Definition: TRTProcessingOfStraw.h:134
x
#define x
TRTProcessingOfStraw::m_randBinomialAr
std::unique_ptr< CLHEP::RandBinomialFixedP > m_randBinomialAr
Definition: TRTProcessingOfStraw.h:235
TRTProcessingOfStraw::m_pSimDriftTimeTool
ITRT_SimDriftTimeTool * m_pSimDriftTimeTool
Definition: TRTProcessingOfStraw.h:123
TRTProcessingOfStraw::m_outerRadiusOfWire
double m_outerRadiusOfWire
Definition: TRTProcessingOfStraw.h:139
TRTProcessingOfStraw::addClustersFromStep
void addClustersFromStep(const double &scaledKineticEnergy, const double &particleCharge, const double &timeOfHit, const double &prex, const double &prey, const double &prez, const double &postx, const double &posty, const 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.
Definition: TRTProcessingOfStraw.cxx:203
TRTProcessingOfStraw::m_useAttenuation
bool m_useAttenuation
Definition: TRTProcessingOfStraw.h:131
GeoPrimitives.h
TRTProcessingOfStraw::cluster::xpos
double xpos
Definition: TRTProcessingOfStraw.h:158
TRTProcessingOfStraw::TRTProcessingOfStraw
TRTProcessingOfStraw(const TRTProcessingOfStraw &)
TRTProcessingOfStraw::m_settings
const TRTDigSettings * m_settings
Definition: TRTProcessingOfStraw.h:118
TRTProcessingOfStraw::m_maxelectrons
unsigned int m_maxelectrons
Definition: TRTProcessingOfStraw.h:227
ITRT_StrawStatusSummaryTool.h
abstract interface to TRT straw status constants
TRTProcessingOfStraw::cluster::ypos
double ypos
Definition: TRTProcessingOfStraw.h:159
TRTProcessingOfStraw::m_shiftOfZeroPoint
double m_shiftOfZeroPoint
Definition: TRTProcessingOfStraw.h:136
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
TRTProcessingOfStraw::m_depositList
std::vector< TRTElectronicsProcessing::Deposit > m_depositList
Definition: TRTProcessingOfStraw.h:164
TRTProcessingOfStraw::cluster::energy
double energy
Definition: TRTProcessingOfStraw.h:155
TRTProcessingOfStraw::m_pNoise
TRTNoise * m_pNoise
Definition: TRTProcessingOfStraw.h:146
TRTNoise
Simulation of noise hits in the TRT.
Definition: TRTNoise.h:39
TRTProcessingOfStraw::m_timeCorrection
bool m_timeCorrection
Time to be corrected for flight and wire propagation delays false when beamType='cosmics'.
Definition: TRTProcessingOfStraw.h:126
AtlasFieldCache.h
TRTProcessingOfStraw::setClusterZ
double setClusterZ(double cluster_z_in, bool isLong, bool isShort, bool isEC) const
Definition: TRTProcessingOfStraw.cxx:812
TimedHitCollection.h
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
TRTProcessingOfStraw::m_pParticleTable
const HepPDT::ParticleDataTable * m_pParticleTable
Definition: TRTProcessingOfStraw.h:149
ITRT_CalDbTool.h
abstract interface to TRT calibration constants
TRTElectronicsProcessing.h
TRTProcessingOfStraw::m_clusterlist
std::vector< cluster > m_clusterlist
Definition: TRTProcessingOfStraw.h:163
TRTProcessingOfStraw::m_useMagneticFieldMap
bool m_useMagneticFieldMap
Definition: TRTProcessingOfStraw.h:132
TRTDigit
Class for TRT digits.
Definition: TRTDigit.h:11
ITRT_CalDbTool
Definition: ITRT_CalDbTool.h:30
TRTProcessingOfStraw::m_pTimeCorrection
TRTTimeCorrection * m_pTimeCorrection
Definition: TRTProcessingOfStraw.h:144
TRTProcessingOfStraw::getGlobalPosition
Amg::Vector3D getGlobalPosition(int hitID, const TimedHitPtr< TRTUncompressedHit > *theHit)
Definition: TRTProcessingOfStraw.cxx:754
TRTProcessingOfStraw::m_solenoidFieldStrength
double m_solenoidFieldStrength
Definition: TRTProcessingOfStraw.h:141
TRTProcessingOfStraw
TRT Digitization: Processing of a TRT Straws.
Definition: TRTProcessingOfStraw.h:55
TRTProcessingOfStraw::ProcessStraw
void ProcessStraw(MagField::AtlasFieldCache &fieldCache, 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.
Definition: TRTProcessingOfStraw.cxx:249
TRTProcessingOfStraw::hitCollConstIter
TimedHitCollection< TRTUncompressedHit >::const_iterator hitCollConstIter
Definition: TRTProcessingOfStraw.h:74
TRTProcessingOfStraw::cluster::cluster
cluster(double e, double t, double x, double y, double z)
Definition: TRTProcessingOfStraw.h:154
RandBinomialFixedP.h
TRTProcessingOfStraw::m_minCrossingTime
double m_minCrossingTime
Definition: TRTProcessingOfStraw.h:135
TRTProcessingOfStraw::m_randBinomialKr
std::unique_ptr< CLHEP::RandBinomialFixedP > m_randBinomialKr
Definition: TRTProcessingOfStraw.h:234
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TRTProcessingOfStraw::m_attenuationLength
double m_attenuationLength
Definition: TRTProcessingOfStraw.h:129
TRT_ID
Definition: TRT_ID.h:84
TRTProcessingOfStraw::m_pPAItoolAr
ITRT_PAITool * m_pPAItoolAr
Definition: TRTProcessingOfStraw.h:121
InDetDD::TRT_DetectorManager
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Definition: TRT_DetectorManager.h:69
y
#define y
TRTUncompressedHit.h
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
AthMessaging.h
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
TRTTimeCorrection
Time correction.
Definition: TRTTimeCorrection.h:26
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
TRTProcessingOfStraw::operator=
TRTProcessingOfStraw & operator=(const TRTProcessingOfStraw &)
ITRT_SimDriftTimeTool
Definition: ITRT_SimDriftTimeTool.h:30
TRTProcessingOfStraw::cluster::time
double time
Definition: TRTProcessingOfStraw.h:157
TRTDigSettings
Class containing parameters and settings used by TRT digitization.
Definition: TRTDigSettings.h:35
TRTProcessingOfStraw::cluster::zpos
double zpos
Definition: TRTProcessingOfStraw.h:160
TRTProcessingOfStraw::m_expattenuation
std::vector< double > m_expattenuation
Definition: TRTProcessingOfStraw.h:226
TimedHitCollection
Definition: TimedHitCollection.h:15
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380
TRTProcessingOfStraw::ClustersToDeposits
void ClustersToDeposits(MagField::AtlasFieldCache &fieldCache, const int &hitID, const std::vector< cluster > &clusters, std::vector< TRTElectronicsProcessing::Deposit > &deposits, 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....
Definition: TRTProcessingOfStraw.cxx:545
TRTProcessingOfStraw::m_pPAItoolXe
ITRT_PAITool * m_pPAItoolXe
Definition: TRTProcessingOfStraw.h:120
TRTProcessingOfStraw::m_alreadywarnedagainstpdg0
bool m_alreadywarnedagainstpdg0
Definition: TRTProcessingOfStraw.h:229
TRTDigCondBase
Communication with CondDB.
Definition: TRTDigCondBase.h:32