ATLAS Offline Software
TRTSensitiveDetector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRT_G4_SD_TRTSensitiveDetector_h
6 #define TRT_G4_SD_TRTSensitiveDetector_h
7 
8 // Base class
9 #include "G4VSensitiveDetector.hh"
10 
13 #include "StoreGate/WriteHandle.h"
14 #include <gtest/gtest_prod.h>
15 
16 class TRTParameters;
19 
20 class G4HCofThisEvent;
21 class G4Step;
22 class G4TouchableHistory;
23 
24 class TRTSensitiveDetector : public G4VSensitiveDetector
25 {
26  FRIEND_TEST( TRTSensitiveDetectortest, Initialize);
27  FRIEND_TEST( TRTSensitiveDetectortest, ProcessHits );
28  FRIEND_TEST( TRTSensitiveDetectortest, AddHit );
29 
32 
33  public:
34  TRTSensitiveDetector(const std::string& name, const std::string& hitCollectionName, int setVerboseLevel=0);
35  ~TRTSensitiveDetector() { /* don't own any of the pointers... */ }
36 
37  void Initialize(G4HCofThisEvent*) override final;
38  G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
39 
41  void DeleteObjects();
42 
46  template <class... Args> void AddHit(Args&&... args){ m_HitColl->Emplace( args... ); }
47 
48  private:
50  //FIXME all class variables should have an "m_" prefix.
51 
53  int m_printMessages; // FIXME not used anywhere?
55  G4VProcess* m_phot;
65  double m_boundaryZ;
66 
69  int m_hitID;
75  double m_preStepX;
76  double m_preStepY;
77  double m_preStepZ;
78  double m_postStepX;
79  double m_postStepY;
80  double m_postStepZ;
81  double m_globalTime;
82 
84  // The hits collection
86 
87  const TRTParameters* m_pParameters;
88 
91 
92  // Gas switches
93  G4Material *m_pMaterialXe;
94  G4Material *m_pMaterialKr;
95  G4Material *m_pMaterialAr;
96 };
97 
98 #endif //TRT_G4_SD_TRTSensitiveDetector_h
TRTSensitiveDetector::m_energyDepositInKeV
double m_energyDepositInKeV
Definition: TRTSensitiveDetector.h:74
TRTProcessingOfEndCapHits
Definition: TRTProcessingOfEndCapHits.h:16
TRTSensitiveDetector::FRIEND_TEST
FRIEND_TEST(TRTSensitiveDetectortest, Initialize)
TRTSensitiveDetector::m_pProcessingOfBarrelHits
TRTProcessingOfBarrelHits * m_pProcessingOfBarrelHits
Definition: TRTSensitiveDetector.h:89
TRTSensitiveDetector::m_energyDepositCorrectionKr
double m_energyDepositCorrectionKr
Definition: TRTSensitiveDetector.h:61
TRTSensitiveDetector::m_pMaterialAr
G4Material * m_pMaterialAr
Definition: TRTSensitiveDetector.h:95
TRTSensitiveDetector::FRIEND_TEST
FRIEND_TEST(TRTSensitiveDetectortest, ProcessHits)
TRTSensitiveDetector::m_energyThreshold
double m_energyThreshold
Definition: TRTSensitiveDetector.h:56
TRTSensitiveDetector::m_energyDeposit
double m_energyDeposit
Definition: TRTSensitiveDetector.h:73
TRTSensitiveDetector::DeleteObjects
void DeleteObjects()
Called by TRTRunAction::EndOfRunAction ...
Definition: TRTSensitiveDetector.cxx:336
TRTSensitiveDetector::m_HitColl
SG::WriteHandle< TRTUncompressedHitCollection > m_HitColl
Other member variables.
Definition: TRTSensitiveDetector.h:85
TRTSensitiveDetector::m_probabilityThresholdAr
double m_probabilityThresholdAr
Definition: TRTSensitiveDetector.h:63
TRTSensitiveDetector::m_hitsWithZeroEnergyDeposit
int m_hitsWithZeroEnergyDeposit
Definition: TRTSensitiveDetector.h:54
TRTSensitiveDetector
Definition: TRTSensitiveDetector.h:25
Args
Definition: test_lwtnn_fastgraph.cxx:12
TRTSensitiveDetector::m_pProcessingOfEndCapHits
TRTProcessingOfEndCapHits * m_pProcessingOfEndCapHits
Definition: TRTSensitiveDetector.h:90
TRTSensitiveDetector::m_energyThresholdAr
double m_energyThresholdAr
Definition: TRTSensitiveDetector.h:62
TRTSensitiveDetector::m_probabilityThresholdKr
double m_probabilityThresholdKr
Definition: TRTSensitiveDetector.h:60
TRTSensitiveDetector::m_partLink
HepMcParticleLink m_partLink
Definition: TRTSensitiveDetector.h:70
TRTSensitiveDetector::~TRTSensitiveDetector
~TRTSensitiveDetector()
Definition: TRTSensitiveDetector.h:35
WriteHandle.h
Handle class for recording to StoreGate.
TRTSensitiveDetector::m_postStepX
double m_postStepX
Definition: TRTSensitiveDetector.h:78
TRTSensitiveDetector::m_energyDepositCorrectionAr
double m_energyDepositCorrectionAr
Definition: TRTSensitiveDetector.h:64
TRTSensitiveDetector::m_pMaterialKr
G4Material * m_pMaterialKr
Definition: TRTSensitiveDetector.h:94
TRTSensitiveDetector::m_globalTime
double m_globalTime
Definition: TRTSensitiveDetector.h:81
TRTSensitiveDetector::m_kineticEnergy
double m_kineticEnergy
Definition: TRTSensitiveDetector.h:72
TRTSensitiveDetector::m_postStepY
double m_postStepY
Definition: TRTSensitiveDetector.h:79
TRTSensitiveDetector::m_pMaterialXe
G4Material * m_pMaterialXe
Definition: TRTSensitiveDetector.h:93
TRTSensitiveDetector::m_probabilityThreshold
double m_probabilityThreshold
Definition: TRTSensitiveDetector.h:57
TRTSensitiveDetector::m_preStepX
double m_preStepX
Definition: TRTSensitiveDetector.h:75
TRTSensitiveDetector::m_boundaryZ
double m_boundaryZ
Definition: TRTSensitiveDetector.h:65
TRTProcessingOfBarrelHits
Definition: TRTProcessingOfBarrelHits.h:16
TRTSensitiveDetector::FRIEND_TEST
FRIEND_TEST(TRTSensitiveDetectortest, AddHit)
TRTSensitiveDetector::m_energyThresholdKr
double m_energyThresholdKr
Definition: TRTSensitiveDetector.h:59
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TRTSensitiveDetector::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
Definition: TRTSensitiveDetector.cxx:219
TRTSensitiveDetector::m_pParameters
const TRTParameters * m_pParameters
Definition: TRTSensitiveDetector.h:87
TRTSensitiveDetector::m_preStepY
double m_preStepY
Definition: TRTSensitiveDetector.h:76
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
TRTSensitiveDetector::m_postStepZ
double m_postStepZ
Definition: TRTSensitiveDetector.h:80
TRTUncompressedHitCollection.h
TRTSensitiveDetector::m_energyDepositCorrection
double m_energyDepositCorrection
Definition: TRTSensitiveDetector.h:58
TRTSensitiveDetector::m_preStepZ
double m_preStepZ
Definition: TRTSensitiveDetector.h:77
TRTSensitiveDetector::Initialize
void Initialize(G4HCofThisEvent *) override final
Definition: TRTSensitiveDetector.cxx:168
TRTSensitiveDetector::InitializeHitProcessing
void InitializeHitProcessing()
Definition: TRTSensitiveDetector.cxx:74
TRTSensitiveDetector::m_particleEncoding
int m_particleEncoding
Definition: TRTSensitiveDetector.h:71
checker_macros.h
Define macros for attributes used to control the static checker.
TRTSensitiveDetector::m_printMessages
int m_printMessages
Configuration paremeters.
Definition: TRTSensitiveDetector.h:53
TRTSensitiveDetector::m_hitID
int m_hitID
Properties of current TRTUncompressedHit, set by TRTProcessingOfBarrelHits and TRTProcessingOfEndCapH...
Definition: TRTSensitiveDetector.h:69
TRTSensitiveDetector::m_phot
G4VProcess * m_phot
Definition: TRTSensitiveDetector.h:55
TRTSensitiveDetector::AddHit
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
Definition: TRTSensitiveDetector.h:46
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
TRTSensitiveDetector::TRTSensitiveDetector
TRTSensitiveDetector(const std::string &name, const std::string &hitCollectionName, int setVerboseLevel=0)
Definition: TRTSensitiveDetector.cxx:41