ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetG4
BCM_G4_SD
src
BCMSensorSD.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
// BCM Sensitive Detector class
7
// Bostjan Macek 17.may.2007
8
//###############################################
9
10
#ifndef BCMSENSORSD_H
11
#define BCMSENSORSD_H
12
13
// Base class
14
#include "G4VSensitiveDetector.hh"
15
16
class
AtlasG4EventUserInfo
;
17
// G4 needed classes
18
class
G4Step;
19
20
// use of the hits
21
#include "
InDetSimEvent/SiHitCollection.h
"
22
#include <gtest/gtest_prod.h>
23
24
class
BCMSensorSD
:
public
G4VSensitiveDetector
25
{
26
FRIEND_TEST
( BCMSensorSDtest,
ProcessHits
);
27
FRIEND_TEST
( BCMSensorSDtest,
AddHit
);
28
public
:
29
// Constructor
30
BCMSensorSD
(
const
std::string& name,
const
std::string& hitCollectionName);
31
32
// Process the hits from G4
33
G4bool
ProcessHits
(G4Step*, G4TouchableHistory*)
override
final
;
34
35
// Initialize from G4
36
void
Initialize
(G4HCofThisEvent *)
override
final
;
37
41
template
<
class
...
Args
>
void
AddHit
(
Args
&&... args){
m_HitColl
->Emplace( args... ); }
42
private
:
43
std::string
m_HitCollName
;
44
SiHitCollection
*
m_HitColl
{
nullptr
};
45
AtlasG4EventUserInfo
*
m_g4UserEventInfo
{
nullptr
};
46
};
47
48
#endif
SiHitCollection.h
SiHitCollection
AtlasHitsVector< SiHit > SiHitCollection
Definition
SiHitCollection.h:14
AtlasG4EventUserInfo
This class is attached to G4Event objects as UserInformation.
Definition
AtlasG4EventUserInfo.h:26
BCMSensorSD::m_g4UserEventInfo
AtlasG4EventUserInfo * m_g4UserEventInfo
Definition
BCMSensorSD.h:45
BCMSensorSD::AddHit
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
Definition
BCMSensorSD.h:41
BCMSensorSD::FRIEND_TEST
FRIEND_TEST(BCMSensorSDtest, AddHit)
BCMSensorSD::m_HitCollName
std::string m_HitCollName
Name of the hit collection.
Definition
BCMSensorSD.h:43
BCMSensorSD::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
Definition
BCMSensorSD.cxx:50
BCMSensorSD::m_HitColl
SiHitCollection * m_HitColl
Pointer to the hit collection.
Definition
BCMSensorSD.h:44
BCMSensorSD::BCMSensorSD
BCMSensorSD(const std::string &name, const std::string &hitCollectionName)
Definition
BCMSensorSD.cxx:31
BCMSensorSD::FRIEND_TEST
FRIEND_TEST(BCMSensorSDtest, ProcessHits)
BCMSensorSD::Initialize
void Initialize(G4HCofThisEvent *) override final
Definition
BCMSensorSD.cxx:39
Args
Definition
test_lwtnn_fastgraph.cxx:12
Generated on
for ATLAS Offline Software by
1.17.0