ATLAS Offline Software
sTgcSensitiveDetector.h
Go to the documentation of this file.
1 #ifndef MUONG4R4_sTgcSensitiveDetector_H
2 #define MUONG4R4_sTgcSensitiveDetector_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 sTgcSensitiveDetector : public G4VSensitiveDetector, public AthMessaging {
94 
95 
96 public:
103  sTgcSensitiveDetector(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:
118  const G4TouchableHistory* touchHist) const;
119 
121  const MuonGMR4::sTgcReadoutElement* readOutEle,
122  const Amg::Vector3D& hitAtGapPlane,
124  /*
125  * For the moment use write handles because the sensitive detectors are
126  * managed by a service which must not have a data dependency
127  */
129  /*
130  * ReadHandleKey to the DetectorAlignmentStore caching
131  * the relevant transformations needed in this event
132  */
134 
137 
138 };
139 
140 }
141 #endif
MuonG4R4::sTgcSensitiveDetector::getIdentifier
Identifier getIdentifier(const ActsGeometryContext &gctx, const MuonGMR4::sTgcReadoutElement *readOutEle, const Amg::Vector3D &hitAtGapPlane, sTgcIdHelper::sTgcChannelTypes chType) const
Definition: sTgcSensitiveDetector.cxx:138
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:62
MuonG4R4::sTgcSensitiveDetector::m_writeHandle
SG::WriteHandle< xAOD::MuonSimHitContainer > m_writeHandle
Definition: sTgcSensitiveDetector.h:128
MuonG4R4::sTgcSensitiveDetector::~sTgcSensitiveDetector
~sTgcSensitiveDetector()=default
SG::ReadHandleKey< ActsTrk::DetectorAlignStore >
sTgcIdHelper::sTgcChannelTypes
sTgcChannelTypes
Definition: sTgcIdHelper.h:190
sTgcReadoutElement.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::sTgcSensitiveDetector::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the underlying detector manager.
Definition: sTgcSensitiveDetector.h:136
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
MuonG4R4::sTgcSensitiveDetector::sTgcSensitiveDetector
sTgcSensitiveDetector(const std::string &name, const std::string &output_key, const std::string &trf_storKey, const MuonGMR4::MuonDetectorManager *detMgr)
Constructor.
Definition: sTgcSensitiveDetector.cxx:32
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonG4R4::sTgcSensitiveDetector::ProcessHits
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist) override final
Definition: sTgcSensitiveDetector.cxx:56
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGMR4::sTgcReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:20
MuonG4R4::sTgcSensitiveDetector::getReadoutElement
const MuonGMR4::sTgcReadoutElement * getReadoutElement(const ActsGeometryContext &gctx, const G4TouchableHistory *touchHist) const
Retrieves the matching readout element to a G4 hit.
Definition: sTgcSensitiveDetector.cxx:156
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
MuonG4R4::sTgcSensitiveDetector::Initialize
void Initialize(G4HCofThisEvent *HCE) override final
member functions
Definition: sTgcSensitiveDetector.cxx:44
MuonG4R4::sTgcSensitiveDetector::m_trfCacheKey
SG::ReadHandleKey< ActsTrk::DetectorAlignStore > m_trfCacheKey
Definition: sTgcSensitiveDetector.h:133
AthMessaging.h
MuonG4R4::sTgcSensitiveDetector
Definition: sTgcSensitiveDetector.h:93
Identifier
Definition: IdentifierFieldParser.cxx:14