ATLAS Offline Software
MmSensitiveDetector.h
Go to the documentation of this file.
1 #ifndef MUONG4R4_MmSensitiveDetector_H
2 #define MUONG4R4_MmSensitiveDetector_H
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
22 #include "G4VSensitiveDetector.hh"
23 
24 #include <StoreGate/WriteHandle.h>
29 
30 namespace MuonG4R4 {
31 
32 class MmSensitiveDetector : public G4VSensitiveDetector, public AthMessaging {
33 
34 
35 public:
42  MmSensitiveDetector(const std::string& name,
43  const std::string& output_key,
44  const std::string& trf_storKey,
45  const MuonGMR4::MuonDetectorManager* detMgr);
46 
48 
50  void Initialize(G4HCofThisEvent* HCE) override final;
51  G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist) override final;
52 
53 
54 private:
57  const G4TouchableHistory* touchHist) const;
60  const MuonGMR4::MmReadoutElement* readOutEle,
61  const Amg::Vector3D& hitAtGapPlane) const;
62  /*
63  * For the moment use write handles because the sensitive detectors are
64  * managed by a service which must not have a data dependency
65  */
72 
75 
76 };
77 
78 }
79 #endif
MuonGMR4::MmReadoutElement
Definition: MmReadoutElement.h:20
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:61
MuonG4R4::MmSensitiveDetector::getIdentifier
Identifier getIdentifier(const ActsGeometryContext &gctx, const MuonGMR4::MmReadoutElement *readOutEle, const Amg::Vector3D &hitAtGapPlane) const
Identify the gasGap layer of the hit.
Definition: MmSensitiveDetector.cxx:127
SG::ReadHandleKey< ActsTrk::DetectorAlignStore >
MuonG4R4::MmSensitiveDetector::m_writeHandle
SG::WriteHandle< xAOD::MuonSimHitContainer > m_writeHandle
Definition: MmSensitiveDetector.h:66
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
MuonSimHitContainer.h
MuonG4R4::MmSensitiveDetector::ProcessHits
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist) override final
Definition: MmSensitiveDetector.cxx:56
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MuonG4R4::MmSensitiveDetector
Definition: MmSensitiveDetector.h:32
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonG4R4::MmSensitiveDetector::MmSensitiveDetector
MmSensitiveDetector(const std::string &name, const std::string &output_key, const std::string &trf_storKey, const MuonGMR4::MuonDetectorManager *detMgr)
Constructor.
Definition: MmSensitiveDetector.cxx:32
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
MuonG4R4::MmSensitiveDetector::getReadoutElement
const MuonGMR4::MmReadoutElement * getReadoutElement(const ActsGeometryContext &gctx, const G4TouchableHistory *touchHist) const
Retrieves the matching readout element to a G4 hit.
Definition: MmSensitiveDetector.cxx:146
MuonG4R4::MmSensitiveDetector::~MmSensitiveDetector
~MmSensitiveDetector()=default
AthMessaging.h
MuonG4R4::MmSensitiveDetector::m_trfCacheKey
SG::ReadHandleKey< ActsTrk::DetectorAlignStore > m_trfCacheKey
ReadHandleKey to the DetectorAlignmentStore caching the relevant transformations needed in this event...
Definition: MmSensitiveDetector.h:71
MuonG4R4::MmSensitiveDetector::Initialize
void Initialize(G4HCofThisEvent *HCE) override final
member functions
Definition: MmSensitiveDetector.cxx:44
MuonG4R4::MmSensitiveDetector::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the underlying detector manager.
Definition: MmSensitiveDetector.h:74
MmReadoutElement.h