ATLAS Offline Software
Loading...
Searching...
No Matches
BLMSensorSD.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// BLM Sensitive Detector class
7// Bostjan Macek 14.february.2008
8//###############################################
9
10#ifndef BLM_G4_SD_BLMSENSORSD_H
11#define BLM_G4_SD_BLMSENSORSD_H
12
13// Base class header
14#include "G4VSensitiveDetector.hh"
15
16// Athena headers
18#include <gtest/gtest_prod.h>
19
21// G4 needed classes
22class G4Step;
23
24class BLMSensorSD : public G4VSensitiveDetector
25{
26 FRIEND_TEST( BLMSensorSDtest, ProcessHits );
27 FRIEND_TEST( BLMSensorSDtest, AddHit );
28 public:
29 // Constructor
30 BLMSensorSD(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
43 private:
44 std::string m_HitCollName;
47};
48
49#endif //BLM_G4_SD_BLMSENSORSD_H
AtlasHitsVector< SiHit > SiHitCollection
This class is attached to G4Event objects as UserInformation.
SiHitCollection * m_HitColl
Definition BLMSensorSD.h:45
std::string m_HitCollName
Definition BLMSensorSD.h:44
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
Definition BLMSensorSD.h:41
BLMSensorSD(const std::string &name, const std::string &hitCollectionName)
void Initialize(G4HCofThisEvent *) override final
AtlasG4EventUserInfo * m_g4UserEventInfo
Definition BLMSensorSD.h:46
FRIEND_TEST(BLMSensorSDtest, AddHit)
FRIEND_TEST(BLMSensorSDtest, ProcessHits)
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final