]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/TG4VSensitiveDetector.h
Removed OpenBaseFile().
[u/mrichter/AliRoot.git] / TGeant4 / TG4VSensitiveDetector.h
CommitLineData
2817d3e2 1// $Id$
2// Category: geometry
3//
9bcb6317 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.
2817d3e2 8
9#ifndef TG4V_SENSITIVE_DETECTOR_H
10#define TG4V_SENSITIVE_DETECTOR_H
11
12#include <G4VSensitiveDetector.hh>
13#include <globals.hh>
14
9bcb6317 15class TG4StepManager;
16
2817d3e2 17class TG4VSensitiveDetector : public G4VSensitiveDetector
18{
19 public:
20 TG4VSensitiveDetector(G4String sdName);
21 TG4VSensitiveDetector(G4String sdName, G4int id);
22 TG4VSensitiveDetector(const TG4VSensitiveDetector& right);
23 // --> protected
24 // TG4VSensitiveDetector();
25 virtual ~TG4VSensitiveDetector();
26
27 // operators
28 TG4VSensitiveDetector& operator=(const TG4VSensitiveDetector &right);
29
9bcb6317 30 // methods
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);
36
2817d3e2 37 // static get method
38 static G4int GetTotalNofSensitiveDetectors();
39
40 // get methods
41 G4int GetID() const;
42
43 protected:
44 TG4VSensitiveDetector();
45
46 // data members
9bcb6317 47 G4int fID; //sensitive detector ID
48 TG4StepManager* fStepManager; //TG4StepManager
2817d3e2 49
50 private:
51 // data members
52 static G4int fgSDCounter; //sensitive detector counter
53};
54
55// inline methods
56
57inline G4int TG4VSensitiveDetector::GetTotalNofSensitiveDetectors()
58{ return fgSDCounter; }
59
60inline G4int TG4VSensitiveDetector::GetID() const
61{ return fID; }
62
63#endif //TG4V_SENSITIVE_DETECTOR_H
64
65