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
13#include <gtest/gtest_prod.h>
14
15// STL header
16#include <string>
17
18class G4Step;
19class G4TouchableHistory;
20
21
22class AFP_SensitiveDetector : public G4VSensitiveDetector
23{
24 FRIEND_TEST( AFP_SensitiveDetectortest, ProcessHits1 );
25 FRIEND_TEST( AFP_SensitiveDetectortest, ProcessHits2 );
26
27public:
28 // Constructor
29 AFP_SensitiveDetector(const std::string& name, const std::string& TDhitCollectionName, const std::string& SIDhitCollectionName);
30
31 // Destructor
32 ~AFP_SensitiveDetector() { /* I don't own myHitColl if all has gone well */ }
33
34 // Called from G4 at the start of each G4 event
35 void Initialize(G4HCofThisEvent *) override final;
36 G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
37
41 //template <class... Args> void AddHit(Args&&... args){ m_HitColl->Emplace( args... ); }
42
43 static constexpr double TDMaxQEff = 0.15;
44
45private:
48
50
52 float m_death_edge[4][10];
53 float m_lower_edge[4][10];
54
55 // The hits collections
58 // Non-owning caches set by Initialize; HitCollectionMap owns the collections.
61
62};
63
64#endif //AFP_G4_SD_AFP_SensitiveDetector_h
AFP_TDSimHitCollectionBuilder * getTDHitCollection() const
AFP_SIDSimHitCollectionBuilder * getSIDHitCollection() const
AFP_SensitiveDetector(const std::string &name, const std::string &TDhitCollectionName, const std::string &SIDhitCollectionName)
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
AFP_SIDSimHitCollectionBuilder * m_pSIDSimHitCollection
FRIEND_TEST(AFP_SensitiveDetectortest, ProcessHits1)
AFP_TDSimHitCollectionBuilder * m_pTDSimHitCollection