ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSensitiveDetector.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONSENSITIVEDETECTORSR4_MUONSENSITIVEDETECTOR_H
5#define MUONSENSITIVEDETECTORSR4_MUONSENSITIVEDETECTOR_H
6
9
14
15#include <G4VSensitiveDetector.hh>
16
21namespace MuonG4R4 {
22 class MuonSensitiveDetector : public G4VSensitiveDetector, public AthMessaging {
23 public:
29 MuonSensitiveDetector(const std::string& name,
30 const std::string& output_key,
31 const std::string& trf_storeKey,
32 const MuonGMR4::MuonDetectorManager* detMgr);
33
35
37 virtual void Initialize(G4HCofThisEvent* HCE) override final;
38
39 private:
40 /* For the moment use write handles because the sensitive detectors are
41 * managed by a service which must not have a data dependency */
46 protected:
51 bool processStep(const G4Step* step) const;
54
55
61 const G4Step* hitStep);
62
63
66 const Amg::Transform3D& toGasGap,
67 const G4Step* hitStep);
75 const Amg::Vector3D& hitPos,
76 const Amg::Vector3D& hitDir,
77 const double globTime,
78 const G4Step* hitStep);
79
82
83
84 };
85}
86
87#endif
Handle class for recording to StoreGate.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the underlying detector manager.
xAOD::MuonSimHit * lastSnapShot(const Identifier &gasGapId, const G4Step *hitStep)
Returns the last snap shot of the traversing particle.
SG::WriteHandle< xAOD::MuonSimHitContainer > m_writeHandle
virtual void Initialize(G4HCofThisEvent *HCE) override final
Create the output container at the beginning of the event.
MuonSensitiveDetector(const std::string &name, const std::string &output_key, const std::string &trf_storeKey, const MuonGMR4::MuonDetectorManager *detMgr)
Constructor.
SG::ReadHandleKey< ActsTrk::DetectorAlignStore > m_trfCacheKey
ReadHandleKey to the DetectorAlignmentStore caching the relevant transformations needed in this event...
xAOD::MuonSimHit * propagateAndSaveStrip(const Identifier &hitId, const Amg::Transform3D &toGasGap, const G4Step *hitStep)
bool processStep(const G4Step *step) const
Checks whether the current step shall be processed at all.
xAOD::MuonSimHit * saveHit(const Identifier &hitId, const Amg::Vector3D &hitPos, const Amg::Vector3D &hitDir, const double globTime, const G4Step *hitStep)
Saves the current Step as a xAOD::MuonSimHit snapshot.
ActsTrk::GeometryContext getGeoContext() const
Returns the current geometry context in the event.
Property holding a SG store/key/clid from which a ReadHandle is made.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Include the common definitions from the MuonReadoutGeometry.
MuonSimHit_v1 MuonSimHit
Defined the version of the MuonSimHit.
Definition MuonSimHit.h:12