]>
Commit | Line | Data |
---|---|---|
8d3676ae | 1 | // $Id$ |
2 | // Category: digits+hits | |
3 | // | |
4 | // Sensitive detectors services | |
5 | // The class provides service methods for accessing to Geant4 geometry, | |
6 | // namely using AliMC volumes identifiers | |
7 | // (implemented via TG4VSensitiveDetector instances). | |
8 | ||
9 | #ifndef TG4_SD_SERVICES_H | |
10 | #define TG4_SD_SERVICES_H | |
11 | ||
12 | #include <globals.hh> | |
13 | ||
14 | #include <Rtypes.h> | |
15 | ||
16 | class G4LogicalVolume; | |
17 | ||
18 | class TG4SDServices | |
19 | { | |
20 | public: | |
21 | TG4SDServices(); | |
22 | virtual ~TG4SDServices(); | |
23 | ||
24 | // static methods | |
25 | static TG4SDServices* Instance(); | |
26 | ||
27 | // get methods | |
28 | G4int GetVolumeID(const G4String& volumeName) const; | |
29 | G4int GetVolumeID(G4LogicalVolume* volume) const; | |
30 | G4String GetVolumeName(G4int volumeId) const; | |
31 | G4LogicalVolume* GetLogicalVolume(G4int volumeId) const; | |
32 | Int_t NofSensitiveDetectors() const; | |
33 | G4int GetMediumId(G4int volumeId) const; | |
34 | ||
35 | protected: | |
36 | // static data members | |
37 | static TG4SDServices* fgInstance; //this instance | |
38 | }; | |
39 | ||
40 | // inline methods | |
41 | inline TG4SDServices* TG4SDServices::Instance() | |
42 | { return fgInstance; } | |
43 | ||
44 | #endif //TG4_SD_SERVICES_H | |
45 |