ATLAS Offline Software
SctSensor_CTB.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  SCT Sensitive Detector class
7  Davide Costanzo Jul 14th 2003.
8  ****************************************************************/
9 
10 #ifndef SCT_G4_SD_SCTSENSOR_CTB_H
11 #define SCT_G4_SD_SCTSENSOR_CTB_H
12 
13 // Base class
14 #include "G4VSensitiveDetector.hh"
15 
16 // For the hits
17 #include "StoreGate/WriteHandle.h"
19 #include <gtest/gtest_prod.h>
20 
21 // G4 needed classes
22 class G4Step;
23 class G4TouchableHistory;
24 
25 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
26 
27 class SctSensor_CTB : public G4VSensitiveDetector
28 {
29  FRIEND_TEST( SctSensor_CTBtest, Initialize );
30  FRIEND_TEST( SctSensor_CTBtest, ProcessHits );
31  FRIEND_TEST( SctSensor_CTBtest, AddHit );
32  public:
33  // Constructor
34  SctSensor_CTB( const std::string& name, const std::string& hitCollectionName );
35 
36  // Destructor
37  ~SctSensor_CTB() { /* If all goes well we do not own myHitColl at this point */ }
38 
39  // Process each G4 hit
40  G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
41 
42  // For setting up the hit collection
43  void Initialize(G4HCofThisEvent *) override final;
44 
48  template <class... Args> void AddHit(Args&&... args){ m_HitColl->Emplace( args... ); }
49 
50  private:
51  // The hits collection
53 };
54 
55 #endif //SCT_G4_SD_SCTSENSOR_CTB_H
SctSensor_CTB::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
Definition: SctSensor_CTB.cxx:48
SctSensor_CTB::~SctSensor_CTB
~SctSensor_CTB()
Definition: SctSensor_CTB.h:37
Args
Definition: test_lwtnn_fastgraph.cxx:12
WriteHandle.h
Handle class for recording to StoreGate.
SctSensor_CTB::SctSensor_CTB
SctSensor_CTB(const std::string &name, const std::string &hitCollectionName)
Definition: SctSensor_CTB.cxx:33
SctSensor_CTB::m_HitColl
SG::WriteHandle< SiHitCollection > m_HitColl
Definition: SctSensor_CTB.h:52
SctSensor_CTB::AddHit
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
Definition: SctSensor_CTB.h:48
SctSensor_CTB::Initialize
void Initialize(G4HCofThisEvent *) override final
Definition: SctSensor_CTB.cxx:41
SctSensor_CTB::FRIEND_TEST
FRIEND_TEST(SctSensor_CTBtest, AddHit)
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
SctSensor_CTB::FRIEND_TEST
FRIEND_TEST(SctSensor_CTBtest, Initialize)
SctSensor_CTB::FRIEND_TEST
FRIEND_TEST(SctSensor_CTBtest, ProcessHits)
SctSensor_CTB
Definition: SctSensor_CTB.h:28
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
SiHitCollection.h