2 // Category: digits+hits
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).
9 #ifndef TG4_SD_SERVICES_H
10 #define TG4_SD_SERVICES_H
16 class TG4VSensitiveDetector;
18 class G4LogicalVolume;
19 class G4VSensitiveDetector;
26 // TG4SDServices(const TG4SDServices& right);
27 virtual ~TG4SDServices();
30 static TG4SDServices* Instance();
33 void PrintStatistics(G4bool open, G4bool close) const;
36 // volume IDs conversions
37 G4int GetVolumeID(const G4String& volumeName) const;
38 G4int GetVolumeID(G4LogicalVolume* volume) const;
39 G4String GetVolumeName(G4int volumeId) const;
40 G4LogicalVolume* GetLogicalVolume(G4int volumeId) const;
41 G4int GetMediumId(G4int volumeId) const;
43 Int_t NofSensitiveDetectors() const;
44 TG4VSensitiveDetector* GetSensitiveDetector(G4VSensitiveDetector* sd) const;
47 TG4SDServices(const TG4SDServices& right);
50 TG4SDServices& operator=(const TG4SDServices& right);
52 // static data members
53 static TG4SDServices* fgInstance; //this instance
57 inline TG4SDServices* TG4SDServices::Instance()
58 { return fgInstance; }
60 #endif //TG4_SD_SERVICES_H