ATLAS Offline Software
Loading...
Searching...
No Matches
AFP_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 AFP_G4_SD_AFP_SensitiveDetector_h
6#define AFP_G4_SD_AFP_SensitiveDetector_h
7
8// Base class
9#include "G4VSensitiveDetector.hh"
10
11// use of the hits
15#include <gtest/gtest_prod.h>
16
17// STL header
18#include <string>
19
20class G4Step;
21class G4TouchableHistory;
22
23
24class AFP_SensitiveDetector : public G4VSensitiveDetector
25{
26 FRIEND_TEST( AFP_SensitiveDetectortest, Initialize );
27 FRIEND_TEST( AFP_SensitiveDetectortest, ProcessHits1 );
28 FRIEND_TEST( AFP_SensitiveDetectortest, ProcessHits2 );
29 FRIEND_TEST( AFP_SensitiveDetectortest, StartOfAthenaEvent);
30 FRIEND_TEST( AFP_SensitiveDetectortest, EndOfAthenaEvent );
31
32public:
33 // Constructor
34 AFP_SensitiveDetector(const std::string& name, const std::string& TDhitCollectionName, const std::string& SIDhitCollectionName);
35
36 // Destructor
37 ~AFP_SensitiveDetector() { /* I don't own myHitColl if all has gone well */ }
38
39 // Called from AFP_SensitiveDetectorTool::SetupEvent
40 void StartOfAthenaEvent ();
41 // Called from G4 at the start of each G4 event
42 void Initialize(G4HCofThisEvent *) override final;
43 G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
44 // Called from AFP_SensitiveDetectorTool::Gather
45 void EndOfAthenaEvent();
46
50 //template <class... Args> void AddHit(Args&&... args){ m_HitColl->Emplace( args... ); }
51
52 static constexpr double TDMaxQEff = 0.15;
53 static constexpr int TDMaxCnt = 4000;
54 static constexpr int SiDMaxCnt = 1000;
55
56private:
61
62 int m_nNOfTDSimHits[4][32];
64
66 float m_death_edge[4][10];
67 float m_lower_edge[4][10];
68
69 // The hits collections
72
73};
74
75#endif //AFP_G4_SD_AFP_SensitiveDetector_h
Handle class for recording to StoreGate.
SG::WriteHandle< AFP_TDSimHitCollection > m_pTDSimHitCollection
FRIEND_TEST(AFP_SensitiveDetectortest, StartOfAthenaEvent)
AFP_SensitiveDetector(const std::string &name, const std::string &TDhitCollectionName, const std::string &SIDhitCollectionName)
FRIEND_TEST(AFP_SensitiveDetectortest, EndOfAthenaEvent)
SG::WriteHandle< AFP_SIDSimHitCollection > m_pSIDSimHitCollection
FRIEND_TEST(AFP_SensitiveDetectortest, Initialize)
static constexpr int TDMaxCnt
FRIEND_TEST(AFP_SensitiveDetectortest, ProcessHits2)
static constexpr double TDMaxQEff
Templated method to stuff a single hit into the sensitive detector class.
void Initialize(G4HCofThisEvent *) override final
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
FRIEND_TEST(AFP_SensitiveDetectortest, ProcessHits1)
static constexpr int SiDMaxCnt