ATLAS Offline Software
MuonSpectrometer
MuonPhaseII
MuonG4
MuonSensitiveDetectorsR4
src
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
>
25
#include <
AthenaBaseComps/AthMessaging.h
>
26
#include <
MuonReadoutGeometryR4/MuonDetectorManager.h
>
27
#include <
MuonReadoutGeometryR4/MmReadoutElement.h
>
28
#include <
xAODMuonSimHit/MuonSimHitContainer.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
47
~MmSensitiveDetector
()=
default
;
48
50
void
Initialize
(G4HCofThisEvent* HCE)
override
final
;
51
G4bool
ProcessHits
(G4Step* aStep, G4TouchableHistory* ROhist)
override
final
;
52
53
54
private
:
56
const
MuonGMR4::MmReadoutElement
*
getReadoutElement
(
const
ActsGeometryContext
& gctx,
57
const
G4TouchableHistory* touchHist)
const
;
59
Identifier
getIdentifier
(
const
ActsGeometryContext
& gctx,
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
*/
66
SG::WriteHandle<xAOD::MuonSimHitContainer>
m_writeHandle
;
71
SG::ReadHandleKey<ActsTrk::DetectorAlignStore>
m_trfCacheKey
;
72
74
const
MuonGMR4::MuonDetectorManager
*
m_detMgr
{
nullptr
};
75
76
};
77
78
}
79
#endif
MuonGMR4::MmReadoutElement
Definition:
MmReadoutElement.h:19
MuonGMR4::MuonDetectorManager
Definition:
MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:62
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
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:221
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
Identifier
Definition:
IdentifierFieldParser.cxx:14
Generated on Thu Nov 7 2024 21:21:18 for ATLAS Offline Software by
1.8.18