ATLAS Offline Software
RpcSensitiveDetector.h
Go to the documentation of this file.
1 #ifndef MUONG4R4_RPCSensitiveDetector_H
2 #define MUONG4R4_RPCSensitiveDetector_H
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
83 #include "G4VSensitiveDetector.hh"
84 
85 #include <StoreGate/WriteHandle.h>
90 
91 namespace MuonG4R4 {
92 
93 class RpcSensitiveDetector : public G4VSensitiveDetector, public AthMessaging {
94 
95 
96 public:
103  RpcSensitiveDetector(const std::string& name,
104  const std::string& output_key,
105  const std::string& trf_storKey,
106  const MuonGMR4::MuonDetectorManager* detMgr);
107 
109 
111  void Initialize(G4HCofThisEvent* HCE) override final;
112  G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist) override final;
113 
114 
115 private:
117  const MuonGMR4::RpcReadoutElement* getReadoutElement(const G4TouchableHistory* touchHist) const;
120  const MuonGMR4::RpcReadoutElement* readOutEle,
121  const Amg::Vector3D& hitAtGapPlane, bool phiGap) const;
122  /*
123  * For the moment use write handles because the sensitive detectors are
124  * managed by a service which must not have a data dependency
125  */
132 
135 
136 };
137 
138 }
139 #endif
MuonG4R4::RpcSensitiveDetector::getReadoutElement
const MuonGMR4::RpcReadoutElement * getReadoutElement(const G4TouchableHistory *touchHist) const
Retrieves the matching readout element to a G4 hit.
Definition: RpcSensitiveDetector.cxx:161
MuonG4R4::RpcSensitiveDetector::m_writeHandle
SG::WriteHandle< xAOD::MuonSimHitContainer > m_writeHandle
Definition: RpcSensitiveDetector.h:126
MuonG4R4::RpcSensitiveDetector
Definition: RpcSensitiveDetector.h:93
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:61
SG::ReadHandleKey< ActsTrk::DetectorAlignStore >
MuonG4R4::RpcSensitiveDetector::getIdentifier
Identifier getIdentifier(const ActsGeometryContext &gctx, const MuonGMR4::RpcReadoutElement *readOutEle, const Amg::Vector3D &hitAtGapPlane, bool phiGap) const
Extracts the gasGap Identifier of the hit expressed at the origin of the local gasGap system.
Definition: RpcSensitiveDetector.cxx:135
MuonGMR4::RpcReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/RpcReadoutElement.h:18
MuonG4R4::RpcSensitiveDetector::m_trfCacheKey
SG::ReadHandleKey< ActsTrk::DetectorAlignStore > m_trfCacheKey
ReadHandleKey to the DetectorAlignmentStore caching the relevant transformations needed in this event...
Definition: RpcSensitiveDetector.h:131
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::RpcSensitiveDetector::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the underlying detector manager.
Definition: RpcSensitiveDetector.h:134
MuonSimHitContainer.h
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonG4R4::RpcSensitiveDetector::ProcessHits
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist) override final
Definition: RpcSensitiveDetector.cxx:54
MuonG4R4::RpcSensitiveDetector::Initialize
void Initialize(G4HCofThisEvent *HCE) override final
member functions
Definition: RpcSensitiveDetector.cxx:42
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
RpcReadoutElement.h
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
MuonG4R4::RpcSensitiveDetector::RpcSensitiveDetector
RpcSensitiveDetector(const std::string &name, const std::string &output_key, const std::string &trf_storKey, const MuonGMR4::MuonDetectorManager *detMgr)
Constructor.
Definition: RpcSensitiveDetector.cxx:30
AthMessaging.h
MuonG4R4::RpcSensitiveDetector::~RpcSensitiveDetector
~RpcSensitiveDetector()=default