ATLAS Offline Software
TrackFastSimSD.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 #ifndef TRACKWRITEFASTSIM_TRACKFASTSIMSD_H
6 #define TRACKWRITEFASTSIM_TRACKFASTSIMSD_H
7 
8 // Base class header
9 #include "G4VSensitiveDetector.hh"
10 
11 // Athena headers
13 #include "StoreGate/WriteHandle.h"
14 
15 // STL headers
16 #include <string>
17 
18 // G4 needed classes
19 class G4Step;
20 class G4TouchableHistory;
21 class G4Track;
22 
23 class TrackFastSimSD : public G4VSensitiveDetector
24 {
25 public:
26  TrackFastSimSD(const std::string& name, const std::string& outputCollectionName, const int SD_type=0);
28 
29  // Initialize from G4
30  void Initialize(G4HCofThisEvent *) override final;
31 
32  G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
33  void WriteTrack(const G4Track*, const bool, const bool);
34 
38  template <class... Args> void AddHit(Args&&... args){ m_trackRecordCollection->Emplace( args... ); }
39 
40 private:
41  // The hits collection
43 
44  int m_SD_type; //TrackRecorderSD=1, CosmicTRSD=2
45 };
46 
47 #endif // TRACKWRITEFASTSIM_TRACKFASTSIMSD_H
TrackFastSimSD
Definition: TrackFastSimSD.h:24
TrackFastSimSD::ProcessHits
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
Definition: TrackFastSimSD.cxx:35
TrackFastSimSD::m_SD_type
int m_SD_type
Definition: TrackFastSimSD.h:44
Args
Definition: test_lwtnn_fastgraph.cxx:12
TrackFastSimSD::TrackFastSimSD
TrackFastSimSD(const std::string &name, const std::string &outputCollectionName, const int SD_type=0)
Definition: TrackFastSimSD.cxx:22
WriteHandle.h
Handle class for recording to StoreGate.
TrackFastSimSD::m_trackRecordCollection
SG::WriteHandle< TrackRecordCollection > m_trackRecordCollection
Definition: TrackFastSimSD.h:42
TrackFastSimSD::~TrackFastSimSD
~TrackFastSimSD()
Definition: TrackFastSimSD.h:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrackFastSimSD::Initialize
void Initialize(G4HCofThisEvent *) override final
Definition: TrackFastSimSD.cxx:30
TrackRecordCollection.h
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
TrackFastSimSD::AddHit
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
Definition: TrackFastSimSD.h:38
TrackFastSimSD::WriteTrack
void WriteTrack(const G4Track *, const bool, const bool)
Definition: TrackFastSimSD.cxx:97
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80