ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetG4
SCT_G4_SD
src
SctSensorSD.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/****************************************************************
6
SCT Sensitive Detector class
7
****************************************************************/
8
9
#ifndef SCT_G4_SD_SCTSENSORSD_H
10
#define SCT_G4_SD_SCTSENSORSD_H
11
12
// Base class
13
#include "G4VSensitiveDetector.hh"
14
15
// For the hits
16
#include "
InDetSimEvent/SiHitCollection.h
"
17
#include <gtest/gtest_prod.h>
18
19
class
AtlasG4EventUserInfo
;
20
// G4 needed classes
21
class
G4Step;
22
class
G4TouchableHistory;
23
24
class
SctSensorSD
:
public
G4VSensitiveDetector
25
{
26
FRIEND_TEST
( SctSensorSDtest,
ProcessHits
);
27
FRIEND_TEST
( SctSensorSDtest,
indexMethod
);
28
FRIEND_TEST
( SctSensorSDtest,
AddHit
);
29
public
:
30
// Constructor
31
SctSensorSD
(
const
std::string& name,
const
std::string& hitCollectionName);
32
33
// Destructor
34
~SctSensorSD
() {
/* If all goes well we do not own myHitColl here */
}
35
36
// Deal with each G4 hit
37
G4bool
ProcessHits
(G4Step*, G4TouchableHistory*)
override
;
38
39
// For setting up the hit collection
40
void
Initialize
(G4HCofThisEvent*)
override
final
;
41
45
template
<
class
...
Args
>
void
AddHit
(
Args
&&... args){
m_HitColl
->Emplace( args... ); }
46
47
private
:
48
void
indexMethod
(
const
G4TouchableHistory *myTouch,
double
coord1z,
int
&brlEcap,
int
&layerDisk,
int
&etaMod,
int
&phiMod,
int
&side);
49
protected
:
50
// The hits collection
51
std::string
m_HitCollName
;
52
SiHitCollection
*
m_HitColl
{
nullptr
};
53
AtlasG4EventUserInfo
*
m_g4UserEventInfo
{
nullptr
};
54
};
55
56
#endif
//SCT_G4_SD_SCTSENSORSD_H
SiHitCollection.h
SiHitCollection
AtlasHitsVector< SiHit > SiHitCollection
Definition
SiHitCollection.h:14
AtlasG4EventUserInfo
This class is attached to G4Event objects as UserInformation.
Definition
AtlasG4EventUserInfo.h:26
SctSensorSD::indexMethod
void indexMethod(const G4TouchableHistory *myTouch, double coord1z, int &brlEcap, int &layerDisk, int &etaMod, int &phiMod, int &side)
Definition
SctSensorSD.cxx:119
SctSensorSD::m_HitCollName
std::string m_HitCollName
Definition
SctSensorSD.h:51
SctSensorSD::FRIEND_TEST
FRIEND_TEST(SctSensorSDtest, AddHit)
SctSensorSD::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition
SctSensorSD.cxx:52
SctSensorSD::FRIEND_TEST
FRIEND_TEST(SctSensorSDtest, ProcessHits)
SctSensorSD::Initialize
void Initialize(G4HCofThisEvent *) override final
Definition
SctSensorSD.cxx:39
SctSensorSD::SctSensorSD
SctSensorSD(const std::string &name, const std::string &hitCollectionName)
Definition
SctSensorSD.cxx:31
SctSensorSD::FRIEND_TEST
FRIEND_TEST(SctSensorSDtest, indexMethod)
SctSensorSD::~SctSensorSD
~SctSensorSD()
Definition
SctSensorSD.h:34
SctSensorSD::m_HitColl
SiHitCollection * m_HitColl
Definition
SctSensorSD.h:52
SctSensorSD::AddHit
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
Definition
SctSensorSD.h:45
SctSensorSD::m_g4UserEventInfo
AtlasG4EventUserInfo * m_g4UserEventInfo
Definition
SctSensorSD.h:53
Args
Definition
test_lwtnn_fastgraph.cxx:12
Generated on
for ATLAS Offline Software by
1.17.0