Berkeley Nuclear Data Software
TrackInfoSD.h
Go to the documentation of this file.
1 //Constructed by Josh Brown.
2 //brown.ja@berkeley.edu
3 
4 #ifndef _TRACK_INFO_SD_H_
5 #define _TRACK_INFO_SD_H_
6 
7 #include "G4VSensitiveDetector.hh"
8 
10 #include "NSDG4RunAction.h"
11 
12 #include <vector>
13 #include <map>
14 class G4Step;
15 class G4HCofThisEvent;
16 namespace NSDG4
17 {
20 class TrackInfoSD : public G4VSensitiveDetector
21 {
22  public:
23  TrackInfoSD(const G4String& a_name,
24  const G4String& a_hitsCollectionName,
25  int a_copyDepth =0
26  );
27  virtual ~TrackInfoSD();
28 
29  // methods from base class
30  virtual void Initialize(G4HCofThisEvent* hitCollection);
31  virtual G4bool ProcessHits(G4Step* step, G4TouchableHistory* history);
32  virtual void EndOfEvent(G4HCofThisEvent* hitCollection);
33  void setRunAction(RunAction* a_runAction);
35  protected:
36 
37  std::map<std::string , std::map<int , TrackInfo > > m_tracks;
39  std::string m_name;
40 
41  // std::map<std::string, int> m_copyDepth;
42 
43 };
44 }
45 #endif
Run action class used to push events into root trees.
Definition: NSDG4RunAction.h:21
Definition: TrackInfoSD.h:21
void setRunAction(RunAction *a_runAction)
Definition: TrackInfoSD.cpp:96
virtual G4bool ProcessHits(G4Step *step, G4TouchableHistory *history)
Definition: TrackInfoSD.cpp:48
std::map< std::string, std::map< int, TrackInfo > > m_tracks
Definition: TrackInfoSD.h:37
std::string m_name
Definition: TrackInfoSD.h:39
virtual void Initialize(G4HCofThisEvent *hitCollection)
Definition: TrackInfoSD.cpp:35
virtual ~TrackInfoSD()
Definition: TrackInfoSD.cpp:31
virtual void EndOfEvent(G4HCofThisEvent *hitCollection)
Definition: TrackInfoSD.cpp:76
RunAction * m_runAction
Definition: TrackInfoSD.h:38
TrackInfoSD(const G4String &a_name, const G4String &a_hitsCollectionName, int a_copyDepth=0)
Definition: TrackInfoSD.cpp:17
int m_copyDepth
Definition: TrackInfoSD.h:34
Definition: AbsLYAna.h:7