2 // Category: digits+hits
4 // This class adds integer identifier data member to G4VSensitiveDetector.
5 // It also takes care of setting step status (kBoundary, kNormalStep)
6 // and passing G4Step to TG4StepManager before calling user derived
7 // sensitive detector class.
9 #ifndef TG4V_SENSITIVE_DETECTOR_H
10 #define TG4V_SENSITIVE_DETECTOR_H
12 #include <G4VSensitiveDetector.hh>
17 class TG4VSensitiveDetector : public G4VSensitiveDetector
20 TG4VSensitiveDetector(G4String sdName);
21 TG4VSensitiveDetector(G4String sdName, G4int id);
22 TG4VSensitiveDetector(const TG4VSensitiveDetector& right);
24 // TG4VSensitiveDetector();
25 virtual ~TG4VSensitiveDetector();
28 TG4VSensitiveDetector& operator=(const TG4VSensitiveDetector &right);
31 virtual void UserProcessHits(const G4Track* track, const G4Step* step) = 0;
32 // the following methods should not
33 // be overwritten in a derived class
34 virtual G4bool ProcessHits(G4Step* step, G4TouchableHistory* history);
35 virtual G4bool ProcessHitsOnBoundary(G4Step* step);
38 static G4int GetTotalNofSensitiveDetectors();
44 TG4VSensitiveDetector();
47 G4int fID; //sensitive detector ID
48 TG4StepManager* fStepManager; //TG4StepManager
52 static G4int fgSDCounter; //sensitive detector counter
57 inline G4int TG4VSensitiveDetector::GetTotalNofSensitiveDetectors()
58 { return fgSDCounter; }
60 inline G4int TG4VSensitiveDetector::GetID() const
63 #endif //TG4V_SENSITIVE_DETECTOR_H