#include "G4VSensitiveDetector.hh" #include "PiMuHit.hh" #include #include using namespace std; #ifndef _PIMUG4SENSITIVEDETECTOR_H__ #define _PIMUG4SENSITIVEDETECTOR_H__ class PiMuG4SensitiveDetector : public G4VSensitiveDetector { public: PiMuG4SensitiveDetector(const G4String& name, const G4String& hitsCollectionName); virtual ~PiMuG4SensitiveDetector(); // methods from base class virtual void Initialize(G4HCofThisEvent* hitCollection); virtual G4bool ProcessHits(G4Step* step, G4TouchableHistory* history); virtual void EndOfEvent(G4HCofThisEvent* hitCollection); // It's just easier to fill this in this class and make it // globally available for use in PiMuG4UserEventAction::EndOfEventAction() static map > > hit_map; private: PiMuHitsCollection* fHitsCollection; }; #endif // _PIMUG4SENSITIVEDETECTOR_H__