ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetG4
PixelG4_SD
src
PixelSensorSD.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
/****************************************************************
6
Pixel Sensitive Detector class
7
Davide Costanzo Sep 4th 2002.
8
****************************************************************/
9
10
#ifndef PIXEL_G4_SD_PIXELSENSORSD_H
11
#define PIXEL_G4_SD_PIXELSENSORSD_H
12
13
// Base class
14
#include "G4VSensitiveDetector.hh"
15
16
// use of the hits
17
#include "
InDetSimEvent/SiHitCollection.h
"
18
#include <gtest/gtest_prod.h>
19
20
class
AtlasG4EventUserInfo
;
21
// G4 needed classes
22
class
G4Step;
23
class
G4HCofThisEvent;
24
25
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
26
27
class
PixelSensorSD
:
public
G4VSensitiveDetector
28
{
29
FRIEND_TEST
( PixelSensorSDtest,
ProcessHits
);
30
FRIEND_TEST
( PixelSensorSDtest,
AddHit
);
31
public
:
32
// Constructor
33
PixelSensorSD
(
const
std::string& name,
const
std::string& hitCollectionName);
34
35
// Process the hits from G4
36
G4bool
ProcessHits
(G4Step*, G4TouchableHistory*)
override
final
;
37
38
// Initialize from G4
39
void
Initialize
(G4HCofThisEvent *)
override
final
;
40
44
template
<
class
...
Args
>
void
AddHit
(
Args
&&... args){
m_HitColl
->Emplace( args... ); }
45
46
private
:
47
// The hits collection
48
std::string
m_HitCollName
;
49
SiHitCollection
*
m_HitColl
{
nullptr
};
50
AtlasG4EventUserInfo
*
m_g4UserEventInfo
{
nullptr
};
51
};
52
53
#endif
//PIXEL_G4_SD_PIXELSENSORSD_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
PixelSensorSD::Initialize
void Initialize(G4HCofThisEvent *) override final
Definition
PixelSensorSD.cxx:42
PixelSensorSD::FRIEND_TEST
FRIEND_TEST(PixelSensorSDtest, ProcessHits)
PixelSensorSD::PixelSensorSD
PixelSensorSD(const std::string &name, const std::string &hitCollectionName)
Definition
PixelSensorSD.cxx:34
PixelSensorSD::FRIEND_TEST
FRIEND_TEST(PixelSensorSDtest, AddHit)
PixelSensorSD::m_g4UserEventInfo
AtlasG4EventUserInfo * m_g4UserEventInfo
Definition
PixelSensorSD.h:50
PixelSensorSD::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
Definition
PixelSensorSD.cxx:55
PixelSensorSD::AddHit
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
Definition
PixelSensorSD.h:44
PixelSensorSD::m_HitColl
SiHitCollection * m_HitColl
Definition
PixelSensorSD.h:49
PixelSensorSD::m_HitCollName
std::string m_HitCollName
Definition
PixelSensorSD.h:48
Args
Definition
test_lwtnn_fastgraph.cxx:12
Generated on
for ATLAS Offline Software by
1.17.0