ATLAS Offline Software
Loading...
Searching...
No Matches
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 <gtest/gtest_prod.h>
14
15class TRTParameters;
18
20
21class G4HCofThisEvent;
22class G4Step;
23class G4TouchableHistory;
24
25class TRTSensitiveDetector : public G4VSensitiveDetector
26{
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;
66
75 double m_preStepX;
76 double m_preStepY;
77 double m_preStepZ;
82
84 // The hits collection
85 std::string m_HitCollName;
86 TRTUncompressedHitCollection* m_HitColl{nullptr}; //pUncompressedHitCollection;
88
89 const TRTParameters* m_pParameters;
90
93
94 // Gas switches
95 G4Material *m_pMaterialXe;
96 G4Material *m_pMaterialKr;
97 G4Material *m_pMaterialAr;
98};
99
100#endif //TRT_G4_SD_TRTSensitiveDetector_h
AtlasHitsVector< TRTUncompressedHit > TRTUncompressedHitCollection
Define macros for attributes used to control the static checker.
This class is attached to G4Event objects as UserInformation.
std::string m_HitCollName
Other member variables.
TRTSensitiveDetector(const std::string &name, const std::string &hitCollectionName, int setVerboseLevel=0)
TRTUncompressedHitCollection * m_HitColl
void Initialize(G4HCofThisEvent *) override final
void DeleteObjects()
Called by TRTRunAction::EndOfRunAction ...
HepMcParticleLink m_partLink
FRIEND_TEST(TRTSensitiveDetectortest, ProcessHits)
friend class TRTProcessingOfEndCapHits
int m_hitID
Properties of current TRTUncompressedHit, set by TRTProcessingOfBarrelHits and TRTProcessingOfEndCapH...
const TRTParameters * m_pParameters
FRIEND_TEST(TRTSensitiveDetectortest, AddHit)
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
TRTProcessingOfEndCapHits * m_pProcessingOfEndCapHits
int m_printMessages
Configuration paremeters.
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
friend class TRTProcessingOfBarrelHits
TRTProcessingOfBarrelHits * m_pProcessingOfBarrelHits
AtlasG4EventUserInfo * m_g4UserEventInfo