ATLAS Offline Software
ZDC_FiberSD.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ZDC_SD_ZDC_FIBER_SD_H
6 #define ZDC_SD_ZDC_FIBER_SD_H
7 
8 // Base class
9 #include "G4VSensitiveDetector.hh"
10 
11 // use of the hits
13 #include "StoreGate/WriteHandle.h"
14 
15 // STL header
16 #include <string>
17 #include <map>
18 #include <gtest/gtest_prod.h>
19 
20 // G4 needed classes
21 class G4Step;
22 class G4HCofThisEvent;
23 
24 class ZDC_FiberSD : public G4VSensitiveDetector
25 {
26  FRIEND_TEST( ZDC_FiberSDtest, ProcessHits );
27  FRIEND_TEST( ZDC_FiberSDtest, Initialize );
28  FRIEND_TEST( ZDC_FiberSDtest, StartOfAthenaEvent );
29  FRIEND_TEST( ZDC_FiberSDtest, EndOfAthenaEvent );
30  public:
31 
32  ZDC_FiberSD(const G4String& name, const G4String& hitCollectionName, const float &readoutPos);
33  ~ZDC_FiberSD();
34 
35  // Initialize from G4
36  void Initialize(G4HCofThisEvent *) override final;
37  G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
38  // Called from ZDC_FiberSDTool::Gather
39  void EndOfAthenaEvent();
40 
41 
42  private:
44  std::map< uint32_t, ZDC_SimFiberHit* > m_hitMap;
45  float m_readoutPos;
46 };
47 
48 #endif //ZDC_SD_ZDC_FIBER_SD_H
ZDC_FiberSD
Definition: ZDC_FiberSD.h:25
ZDC_FiberSD::m_readoutPos
float m_readoutPos
Definition: ZDC_FiberSD.h:45
ZDC_FiberSD::EndOfAthenaEvent
void EndOfAthenaEvent()
Definition: ZDC_FiberSD.cxx:164
ZDC_FiberSD::FRIEND_TEST
FRIEND_TEST(ZDC_FiberSDtest, EndOfAthenaEvent)
ZDC_FiberSD::ZDC_FiberSD
ZDC_FiberSD(const G4String &name, const G4String &hitCollectionName, const float &readoutPos)
Definition: ZDC_FiberSD.cxx:19
WriteHandle.h
Handle class for recording to StoreGate.
ZDC_FiberSD::Initialize
void Initialize(G4HCofThisEvent *) override final
Definition: ZDC_FiberSD.cxx:30
ZDC_FiberSD::FRIEND_TEST
FRIEND_TEST(ZDC_FiberSDtest, ProcessHits)
ZDC_SimFiberHit_Collection.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ZDC_FiberSD::~ZDC_FiberSD
~ZDC_FiberSD()
Definition: ZDC_FiberSD.cxx:26
SG::WriteHandle< ZDC_SimFiberHit_Collection >
ZDC_FiberSD::m_hitMap
std::map< uint32_t, ZDC_SimFiberHit * > m_hitMap
Definition: ZDC_FiberSD.h:44
ZDC_FiberSD::FRIEND_TEST
FRIEND_TEST(ZDC_FiberSDtest, StartOfAthenaEvent)
ZDC_FiberSD::m_HitColl
SG::WriteHandle< ZDC_SimFiberHit_Collection > m_HitColl
Definition: ZDC_FiberSD.h:43
ZDC_FiberSD::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
Definition: ZDC_FiberSD.cxx:41
ZDC_FiberSD::FRIEND_TEST
FRIEND_TEST(ZDC_FiberSDtest, Initialize)