ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
AFP
AFP_G4_SD
src
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
12
#include "
AFP_HitCollectionBuilders.h
"
13
#include <gtest/gtest_prod.h>
14
15
// STL header
16
#include <string>
17
18
class
G4Step;
19
class
G4TouchableHistory;
20
21
22
class
AFP_SensitiveDetector
:
public
G4VSensitiveDetector
23
{
24
FRIEND_TEST
( AFP_SensitiveDetectortest, ProcessHits1 );
25
FRIEND_TEST
( AFP_SensitiveDetectortest, ProcessHits2 );
26
27
public
:
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
45
private
:
46
AFP_TDSimHitCollectionBuilder
*
getTDHitCollection
()
const
;
47
AFP_SIDSimHitCollectionBuilder
*
getSIDHitCollection
()
const
;
48
49
int
m_nHitID
;
50
51
float
m_delta_pixel_x
,
m_delta_pixel_y
;
52
float
m_death_edge
[4][10];
53
float
m_lower_edge
[4][10];
54
55
// The hits collections
56
std::string
m_TDHitCollectionName
;
57
std::string
m_SIDHitCollectionName
;
58
// Non-owning caches set by Initialize; HitCollectionMap owns the collections.
59
AFP_TDSimHitCollectionBuilder
*
m_pTDSimHitCollection
{};
60
AFP_SIDSimHitCollectionBuilder
*
m_pSIDSimHitCollection
{};
61
62
};
63
64
#endif
//AFP_G4_SD_AFP_SensitiveDetector_h
AFP_HitCollectionBuilders.h
AFP_SIDSimHitCollectionBuilder
Definition
AFP_HitCollectionBuilders.h:55
AFP_SensitiveDetector::getTDHitCollection
AFP_TDSimHitCollectionBuilder * getTDHitCollection() const
Definition
AFP_SensitiveDetector.cxx:739
AFP_SensitiveDetector::m_delta_pixel_x
float m_delta_pixel_x
Definition
AFP_SensitiveDetector.h:51
AFP_SensitiveDetector::getSIDHitCollection
AFP_SIDSimHitCollectionBuilder * getSIDHitCollection() const
Definition
AFP_SensitiveDetector.cxx:749
AFP_SensitiveDetector::AFP_SensitiveDetector
AFP_SensitiveDetector(const std::string &name, const std::string &TDhitCollectionName, const std::string &SIDhitCollectionName)
Definition
AFP_SensitiveDetector.cxx:33
AFP_SensitiveDetector::~AFP_SensitiveDetector
~AFP_SensitiveDetector()
Definition
AFP_SensitiveDetector.h:32
AFP_SensitiveDetector::FRIEND_TEST
FRIEND_TEST(AFP_SensitiveDetectortest, ProcessHits2)
AFP_SensitiveDetector::m_TDHitCollectionName
std::string m_TDHitCollectionName
Definition
AFP_SensitiveDetector.h:56
AFP_SensitiveDetector::TDMaxQEff
static constexpr double TDMaxQEff
Templated method to stuff a single hit into the sensitive detector class.
Definition
AFP_SensitiveDetector.h:43
AFP_SensitiveDetector::Initialize
void Initialize(G4HCofThisEvent *) override final
Definition
AFP_SensitiveDetector.cxx:52
AFP_SensitiveDetector::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
Definition
AFP_SensitiveDetector.cxx:60
AFP_SensitiveDetector::m_nHitID
int m_nHitID
Definition
AFP_SensitiveDetector.h:49
AFP_SensitiveDetector::m_pSIDSimHitCollection
AFP_SIDSimHitCollectionBuilder * m_pSIDSimHitCollection
Definition
AFP_SensitiveDetector.h:60
AFP_SensitiveDetector::FRIEND_TEST
FRIEND_TEST(AFP_SensitiveDetectortest, ProcessHits1)
AFP_SensitiveDetector::m_SIDHitCollectionName
std::string m_SIDHitCollectionName
Definition
AFP_SensitiveDetector.h:57
AFP_SensitiveDetector::m_delta_pixel_y
float m_delta_pixel_y
Definition
AFP_SensitiveDetector.h:51
AFP_SensitiveDetector::m_pTDSimHitCollection
AFP_TDSimHitCollectionBuilder * m_pTDSimHitCollection
Definition
AFP_SensitiveDetector.h:59
AFP_SensitiveDetector::m_death_edge
float m_death_edge[4][10]
Definition
AFP_SensitiveDetector.h:52
AFP_SensitiveDetector::m_lower_edge
float m_lower_edge[4][10]
Definition
AFP_SensitiveDetector.h:53
AFP_TDSimHitCollectionBuilder
Definition
AFP_HitCollectionBuilders.h:14
Generated on
for ATLAS Offline Software by
1.17.0