ATLAS Offline Software
Loading...
Searching...
No Matches
LUCID_SensitiveDetector.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LUCID_G4_SD_LUCID_SensitiveDetector_h
6#define LUCID_G4_SD_LUCID_SensitiveDetector_h
7
8// Base class
10
11// Athena headers
14#include <gtest/gtest_prod.h>
15
16class LUCID_HitHelper;
17
18class G4Step;
19class G4TouchableHistory;
20
21class LUCID_SensitiveDetector : public G4VSensitiveDetector
22{
23 FRIEND_TEST( LUCID_SensitiveDetectortest, Initialize );
24 FRIEND_TEST( LUCID_SensitiveDetectortest, ProcessHits );
25 FRIEND_TEST( LUCID_SensitiveDetectortest, AddHit );
26public:
27 // Constructor
28 LUCID_SensitiveDetector(const std::string& name, const std::string& hitCollectionName);
29
30 // Destructor
31 ~LUCID_SensitiveDetector() { /* I don't own myHitColl if all has gone well */ }
32
33 // Initialize from G4
34 void Initialize(G4HCofThisEvent *) override final;
35
36 // Process the hits from G4
37 bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
38
42 template <class... Args> void AddHit(Args&&... args){ m_HitColl->Emplace( args... ); }
43
44 private:
45
48
51};
52
53#endif //LUCID_G4_SD_LUCID_SensitiveDetector_h
Handle class for recording to StoreGate.
LUCID_SensitiveDetector(const std::string &name, const std::string &hitCollectionName)
FRIEND_TEST(LUCID_SensitiveDetectortest, ProcessHits)
SG::WriteHandle< LUCID_SimHitCollection > m_HitColl
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
FRIEND_TEST(LUCID_SensitiveDetectortest, Initialize)
bool ProcessHits(G4Step *, G4TouchableHistory *) override final
LUCID_SensitiveDetector(const LUCID_SensitiveDetector &)
void Initialize(G4HCofThisEvent *) override final
FRIEND_TEST(LUCID_SensitiveDetectortest, AddHit)
LUCID_SensitiveDetector & operator=(const LUCID_SensitiveDetector &)