ATLAS Offline Software
Loading...
Searching...
No Matches
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
14
15// STL headers
16#include <string>
17
18// G4 needed classes
19class G4Step;
20class G4TouchableHistory;
21class G4Track;
22
23class TrackFastSimSD : public G4VSensitiveDetector
24{
25public:
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
40private:
41 // The hits collection
43
44 int m_SD_type; //TrackRecorderSD=1, CosmicTRSD=2
45};
46
47#endif // TRACKWRITEFASTSIM_TRACKFASTSIMSD_H
Handle class for recording to StoreGate.
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
SG::WriteHandle< TrackRecordCollection > m_trackRecordCollection
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
TrackFastSimSD(const std::string &name, const std::string &outputCollectionName, const int SD_type=0)
void Initialize(G4HCofThisEvent *) override final
void WriteTrack(const G4Track *, const bool, const bool)