Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
10 #include <StoreGate/WriteHandle.h>
14 
15 #include <G4VSensitiveDetector.hh>
16 
21 namespace 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 
60  xAOD::MuonSimHit* lastSnapShot(const Identifier& gasGapId,
61  const G4Step* hitStep);
62 
63 
66  const Amg::Transform3D& toGasGap,
67  const G4Step* hitStep);
74  xAOD::MuonSimHit* saveHit(const Identifier& hitId,
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
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
MuonG4R4::MuonSensitiveDetector::MuonSensitiveDetector
MuonSensitiveDetector(const std::string &name, const std::string &output_key, const std::string &trf_storeKey, const MuonGMR4::MuonDetectorManager *detMgr)
Constructor.
Definition: MuonSensitiveDetector.cxx:26
MuonG4R4::MuonSensitiveDetector::m_writeHandle
SG::WriteHandle< xAOD::MuonSimHitContainer > m_writeHandle
Definition: MuonSensitiveDetector.h:42
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:62
MuonG4R4::MuonSensitiveDetector::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the underlying detector manager.
Definition: MuonSensitiveDetector.h:81
MuonG4R4::MuonSensitiveDetector::processStep
bool processStep(const G4Step *step) const
Checks whether the current step shall be processed at all.
Definition: MuonSensitiveDetector.cxx:57
MuonG4R4::MuonSensitiveDetector::saveHit
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.
Definition: MuonSensitiveDetector.cxx:110
MuonG4R4::MuonSensitiveDetector::m_trfCacheKey
SG::ReadHandleKey< ActsTrk::DetectorAlignStore > m_trfCacheKey
ReadHandleKey to the DetectorAlignmentStore caching the relevant transformations needed in this event...
Definition: MuonSensitiveDetector.h:45
MuonG4R4::MuonSensitiveDetector::Initialize
virtual void Initialize(G4HCofThisEvent *HCE) override final
Create the output container at the beginning of the event.
Definition: MuonSensitiveDetector.cxx:37
MuonG4R4::MuonSensitiveDetector::~MuonSensitiveDetector
~MuonSensitiveDetector()=default
SG::ReadHandleKey< ActsTrk::DetectorAlignStore >
MuonG4R4::MuonSensitiveDetector::propagateAndSaveStrip
xAOD::MuonSimHit * propagateAndSaveStrip(const Identifier &hitId, const Amg::Transform3D &toGasGap, const G4Step *hitStep)
Definition: MuonSensitiveDetector.cxx:74
GeoPrimitives.h
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
MuonG4R4::MuonSensitiveDetector
Definition: MuonSensitiveDetector.h:22
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonDetectorManager.h
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
MuonSimHitContainer.h
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
MuonG4R4::MuonSensitiveDetector::lastSnapShot
xAOD::MuonSimHit * lastSnapShot(const Identifier &gasGapId, const G4Step *hitStep)
Returns the last snap shot of the traversing particle.
Definition: MuonSensitiveDetector.cxx:146
AthMessaging.h
LArCellBinning.step
step
Definition: LArCellBinning.py:158
MuonG4R4::MuonSensitiveDetector::getGeoContext
ActsGeometryContext getGeoContext() const
Returns the current geometry context in the event.
Definition: MuonSensitiveDetector.cxx:48
Identifier
Definition: IdentifierFieldParser.cxx:14