#ifndef MSensitiveDetector_H #define MSensitiveDetector_H 1 // %%%%%%%%%% // G4 headers // %%%%%%%%%% #include "G4VSensitiveDetector.hh" #include "G4Step.hh" #include "G4HCofThisEvent.hh" #include "G4TouchableHistory.hh" // %%%%%%%%%%%%% // gemc headers // %%%%%%%%%%%%% #include "detector.h" #include "MHit.h" #include "MPHBaseClass.h" // %%%%%%%%%%% // C++ headers // %%%%%%%%%%% #include #include #include using namespace std; class SDId { public: int id; vector IDnames; vector IDmaxs; vector IDshifts; double minEnergy; double TimeWindow; double ProdThreshold; double MaxStep; }; class MTrackInfo { public: string pid; G4ThreeVector v; }; class MSensitiveDetector : public G4VSensitiveDetector { public: MSensitiveDetector(G4String, gemc_opts); virtual ~MSensitiveDetector(); virtual void Initialize(G4HCofThisEvent*); virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*); virtual void EndOfEvent(G4HCofThisEvent*); G4String HCname; map *Hall_Map; map *MProcessHit_Map; set > Id_Set; map Tr_Map; gemc_opts gemcOpt; SDId SDID; private: MHitCollection *hitCollection; int HCID; double minEnergy; public: vector GetDetectorIdentifier(string name) {return (*Hall_Map)[name].identity;} string GetDetectorHitType(string name) {return (*Hall_Map)[name].hitType;} int get_bit_compressed_id(vector); MHitCollection* GetMHitCollection() {return hitCollection;} MHit* find_existing_hit(vector); }; SDId get_SDId(string, gemc_opts); #endif