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 <gtest/gtest_prod.h>
19 
20 // G4 needed classes
21 class G4Step;
22 
23 class BLMSensorSD : public G4VSensitiveDetector
24 {
25  FRIEND_TEST( BLMSensorSDtest, ProcessHits );
26  FRIEND_TEST( BLMSensorSDtest, AddHit );
27  public:
28  // Constructor
29  BLMSensorSD(const std::string& name, const std::string& hitCollectionName);
30 
31  // Process the hits from G4
32  G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
33 
34  // Initialize from G4
35  void Initialize(G4HCofThisEvent *) override final;
36 
40  template <class... Args> void AddHit(Args&&... args){ m_HitColl->Emplace( args... ); }
41 
42  private:
43  std::string m_HitCollName;
45 };
46 
47 #endif //BLM_G4_SD_BLMSENSORSD_H
python.CaloAddPedShiftConfig.args
args
Definition: CaloAddPedShiftConfig.py:47
AtlasHitsVector< SiHit >
BLMSensorSD::m_HitColl
SiHitCollection * m_HitColl
Definition: BLMSensorSD.h:44
BLMSensorSD::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
Definition: BLMSensorSD.cxx:47
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:40
AtlasHitsVector::Emplace
void Emplace(Args &&... args)
Definition: AtlasHitsVector.h:80
BLMSensorSD::m_HitCollName
std::string m_HitCollName
Definition: BLMSensorSD.h:43
BLMSensorSD::BLMSensorSD
BLMSensorSD(const std::string &name, const std::string &hitCollectionName)
Definition: BLMSensorSD.cxx:29
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
BLMSensorSD
Definition: BLMSensorSD.h:24
BLMSensorSD::FRIEND_TEST
FRIEND_TEST(BLMSensorSDtest, ProcessHits)
BLMSensorSD::FRIEND_TEST
FRIEND_TEST(BLMSensorSDtest, AddHit)
BLMSensorSD::Initialize
void Initialize(G4HCofThisEvent *) override final
Definition: BLMSensorSD.cxx:37
SiHitCollection.h