ATLAS Offline Software
TgcSensitiveDetector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONG4R4_TGCSensitiveDetector_H
5 #define MUONG4R4_TGCSensitiveDetector_H
6 
7 #include "G4VSensitiveDetector.hh"
8 
14 
15 namespace MuonG4R4 {
16 
17 class TgcSensitiveDetector : public G4VSensitiveDetector, public AthMessaging {
18 
19 
20 public:
27  TgcSensitiveDetector(const std::string& name,
28  const std::string& output_key,
29  const std::string& trf_storKey,
30  const MuonGMR4::MuonDetectorManager* detMgr);
31 
33 
35  void Initialize(G4HCofThisEvent* HCE) override final;
36  G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist) override final;
37 
38 
39 private:
41  const MuonGMR4::TgcReadoutElement* getReadoutElement(const G4TouchableHistory* touchHist) const;
42 
44  const MuonGMR4::TgcReadoutElement* readOutEle,
45  const Amg::Vector3D& hitAtGapPlane, bool phiGap) const;
46  /*
47  * For the moment use write handles because the sensitive detectors are
48  * managed by a service which must not have a data dependency
49  */
51  /*
52  * ReadHandleKey to the DetectorAlignmentStore caching
53  * the relevant transformations needed in this event
54  */
56 
61 };
62 }
63 
64 #endif
MuonG4R4::TgcSensitiveDetector::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the underlying detector manager.
Definition: TgcSensitiveDetector.h:60
MuonG4R4::TgcSensitiveDetector::m_writeHandle
SG::WriteHandle< xAOD::MuonSimHitContainer > m_writeHandle
Definition: TgcSensitiveDetector.h:50
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:61
MuonG4R4::TgcSensitiveDetector::m_trfCacheKey
SG::ReadHandleKey< ActsTrk::DetectorAlignStore > m_trfCacheKey
Definition: TgcSensitiveDetector.h:55
MuonG4R4::TgcSensitiveDetector::TgcSensitiveDetector
TgcSensitiveDetector(const std::string &name, const std::string &output_key, const std::string &trf_storKey, const MuonGMR4::MuonDetectorManager *detMgr)
Constructor.
Definition: TgcSensitiveDetector.cxx:29
SG::ReadHandleKey< ActsTrk::DetectorAlignStore >
WriteHandle.h
Handle class for recording to StoreGate.
MuonG4R4
Include the common definitions from the MuonReadoutGeometry.
Definition: MuonSpectrometer/MuonPhaseII/MuonG4/MuonSensitiveDetectorsR4/MuonSensitiveDetectorsR4/Utils.h:14
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
MuonDetectorManager.h
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
MuonG4R4::TgcSensitiveDetector::m_gctx
const ActsGeometryContext m_gctx
Pointer to the acts Geometry context.
Definition: TgcSensitiveDetector.h:58
MuonSimHitContainer.h
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonG4R4::TgcSensitiveDetector
Definition: TgcSensitiveDetector.h:17
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MuonG4R4::TgcSensitiveDetector::getIdentifier
Identifier getIdentifier(const ActsGeometryContext &gctx, const MuonGMR4::TgcReadoutElement *readOutEle, const Amg::Vector3D &hitAtGapPlane, bool phiGap) const
Definition: TgcSensitiveDetector.cxx:157
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonG4R4::TgcSensitiveDetector::~TgcSensitiveDetector
~TgcSensitiveDetector()=default
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
AthMessaging.h
MuonG4R4::TgcSensitiveDetector::Initialize
void Initialize(G4HCofThisEvent *HCE) override final
member functions
Definition: TgcSensitiveDetector.cxx:41
MuonG4R4::TgcSensitiveDetector::getReadoutElement
const MuonGMR4::TgcReadoutElement * getReadoutElement(const G4TouchableHistory *touchHist) const
Retrieves the matching readout element to a G4 hit.
Definition: TgcSensitiveDetector.cxx:137
TgcReadoutElement.h
MuonGMR4::TgcReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/TgcReadoutElement.h:20
MuonG4R4::TgcSensitiveDetector::ProcessHits
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist) override final
Definition: TgcSensitiveDetector.cxx:53