ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetG4
PixelG4_SD
src
PixelSensorGmxSD.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/****************************************************************
6
Pixel Sensitive Detector class for GeoModelXML
7
****************************************************************/
8
9
#ifndef PIXEL_G4_SD_PIXELSENSORGMXSD_H
10
#define PIXEL_G4_SD_PIXELSENSORGMXSD_H
11
12
// Base class
13
#include "G4VSensitiveDetector.hh"
14
15
// use of 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
G4HCofThisEvent;
23
24
namespace
GeoModelIO
{
25
class
ReadGeoModel;
26
}
27
28
class
PixelSensorGmxSD
:
public
G4VSensitiveDetector
29
{
30
FRIEND_TEST
( PixelSensorGmxSDtest,
ProcessHits
);
31
FRIEND_TEST
( PixelSensorGmxSDtest,
AddHit
);
32
public
:
33
// Constructor
34
PixelSensorGmxSD
(
const
std::string& name,
const
std::string& hitCollectionName, GeoModelIO::ReadGeoModel * sqlreader=
nullptr
);
35
36
// Process the hits from G4
37
virtual
G4bool
ProcessHits
(G4Step*, G4TouchableHistory*)
override
final
;
38
39
// Initialize from G4
40
virtual
void
Initialize
(G4HCofThisEvent *)
override
final
;
41
45
template
<
class
...
Args
>
void
AddHit
(
Args
&&... args){
m_HitColl
->Emplace( args... ); }
46
47
private
:
48
// The hits collection
49
std::string
m_HitCollName
;
50
SiHitCollection
*
m_HitColl
{
nullptr
};
51
AtlasG4EventUserInfo
*
m_g4UserEventInfo
{
nullptr
};
52
GeoModelIO::ReadGeoModel *
m_sqlreader
{
nullptr
};
53
54
};
55
56
#endif
//PIXEL_G4_SD_PIXELSENSORGMXSD_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
PixelSensorGmxSD::ProcessHits
virtual G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
Definition
PixelSensorGmxSD.cxx:57
PixelSensorGmxSD::FRIEND_TEST
FRIEND_TEST(PixelSensorGmxSDtest, AddHit)
PixelSensorGmxSD::AddHit
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
Definition
PixelSensorGmxSD.h:45
PixelSensorGmxSD::PixelSensorGmxSD
PixelSensorGmxSD(const std::string &name, const std::string &hitCollectionName, GeoModelIO::ReadGeoModel *sqlreader=nullptr)
Definition
PixelSensorGmxSD.cxx:36
PixelSensorGmxSD::m_HitCollName
std::string m_HitCollName
Definition
PixelSensorGmxSD.h:49
PixelSensorGmxSD::FRIEND_TEST
FRIEND_TEST(PixelSensorGmxSDtest, ProcessHits)
PixelSensorGmxSD::Initialize
virtual void Initialize(G4HCofThisEvent *) override final
Definition
PixelSensorGmxSD.cxx:44
PixelSensorGmxSD::m_g4UserEventInfo
AtlasG4EventUserInfo * m_g4UserEventInfo
Definition
PixelSensorGmxSD.h:51
PixelSensorGmxSD::m_HitColl
SiHitCollection * m_HitColl
Definition
PixelSensorGmxSD.h:50
PixelSensorGmxSD::m_sqlreader
GeoModelIO::ReadGeoModel * m_sqlreader
Definition
PixelSensorGmxSD.h:52
GeoModelIO
Definition
IGeoDbTagSvc.h:12
Args
Definition
test_lwtnn_fastgraph.cxx:12
Generated on
for ATLAS Offline Software by
1.17.0