ATLAS Offline Software
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 "StoreGate/WriteHandle.h"
19 #include <gtest/gtest_prod.h>
20 
21 // G4 needed classes
22 class G4Step;
23 
24 class BLMSensorSD : public G4VSensitiveDetector
25 {
26  FRIEND_TEST( BLMSensorSDtest, Initialize );
27  FRIEND_TEST( BLMSensorSDtest, ProcessHits );
28  FRIEND_TEST( BLMSensorSDtest, AddHit );
29  public:
30  // Constructor
31  BLMSensorSD(const std::string& name, const std::string& hitCollectionName);
32 
33  // Destructor
35 
36  // Process the hits from G4
37  G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
38 
39  // Initialize from G4
40  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
50 };
51 
52 #endif //BLM_G4_SD_BLMSENSORSD_H
BLMSensorSD::FRIEND_TEST
FRIEND_TEST(BLMSensorSDtest, Initialize)
BLMSensorSD::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
Definition: BLMSensorSD.cxx:41
Args
Definition: test_lwtnn_fastgraph.cxx:12
BLMSensorSD::AddHit
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
Definition: BLMSensorSD.h:45
WriteHandle.h
Handle class for recording to StoreGate.
BLMSensorSD::BLMSensorSD
BLMSensorSD(const std::string &name, const std::string &hitCollectionName)
Definition: BLMSensorSD.cxx:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
BLMSensorSD
Definition: BLMSensorSD.h:25
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
BLMSensorSD::FRIEND_TEST
FRIEND_TEST(BLMSensorSDtest, ProcessHits)
BLMSensorSD::~BLMSensorSD
~BLMSensorSD()
Definition: BLMSensorSD.h:34
BLMSensorSD::FRIEND_TEST
FRIEND_TEST(BLMSensorSDtest, AddHit)
BLMSensorSD::m_HitColl
SG::WriteHandle< SiHitCollection > m_HitColl
Definition: BLMSensorSD.h:49
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
BLMSensorSD::Initialize
void Initialize(G4HCofThisEvent *) override final
Definition: BLMSensorSD.cxx:36
SiHitCollection.h