]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/TG4GeometryServices.h
Correcting coding convention violations
[u/mrichter/AliRoot.git] / TGeant4 / TG4GeometryServices.h
CommitLineData
b68f7176 1// $Id$
2// Category: geometry
3//
4// Geometry services
5// The class provides service methods for accessing to Geant4 geometry,
6// namely using AliMC volumes and materials identifiers.
7
8#ifndef TG4_GEOMETRY_SERVICES_H
9#define TG4_GEOMETRY_SERVICES_H
10
11#include "TG4NameMap.h"
12#include "TG4Globals.h"
13
14#include <globals.hh>
15
16#include <Rtypes.h>
17
18class TG4CutVector;
19class TG4FlagVector;
20class TG4GeometryOutputManager;
21
22class G4Material;
23class G4VPhysicalVolume;
24class G4LogicalVolume;
25
26class TG4GeometryServices
27{
28 public:
29 TG4GeometryServices(TG4intVector* mediumIdVector, TG4NameMap* nameMap);
30 // --> protected
31 // TG4GeometryServices();
32 // TG4GeometryServices(const TG4GeometryServices& right);
33 virtual ~TG4GeometryServices();
34
35 // static access method
36 static TG4GeometryServices* Instance();
37
38 // methods
39 G4double* CreateG4doubleArray(Float_t* array, G4int size) const;
40 G4String CutName(const char* name) const;
41 void G4ToG3VolumeName(G4String& name) const;
42 G4Material* MixMaterials(G4String name, G4double density,
43 TG4StringVector* matNames, TG4doubleVector* matWeights);
44
45 // get methods
46 Int_t NofG3Volumes() const;
47 Int_t NofG4LogicalVolumes() const;
48 Int_t NofG4PhysicalVolumes() const;
49 Int_t NofSensitiveDetectors() const;
50
51 G4int GetVolumeID(const G4String& volumeName) const;
52 G4int GetVolumeID(G4LogicalVolume* volume) const;
53 G4String GetVolumeName(G4int volumeId) const;
54 G4LogicalVolume* GetLogicalVolume(G4int volumeId) const;
55 G4bool IsG3Volume(const G4String& lvName) const;
56 const G4String& GetMapSecond(const G4String& name);
57
58 // materials
59 G4int GetMediumId(G4Material* material) const;
60 G4int GetMediumId(G4int volumeId) const;
61 G4double GetEffA(G4Material* material) const;
62 G4double GetEffZ(G4Material* material) const;
63
64 protected:
65 TG4GeometryServices();
66 TG4GeometryServices(const TG4GeometryServices& right);
67
68 // operators
69 TG4GeometryServices& operator=(const TG4GeometryServices& right);
70
71 private:
72 // static data members
73 static TG4GeometryServices* fgInstance; //this instance
74
75 // data members
76 TG4intVector* fMediumIdVector; //vector of second indexes for materials
77 TG4NameMap* fNameMap; //map of volumes names to modules names
78};
79
80// inline methods
81inline TG4GeometryServices* TG4GeometryServices::Instance()
82{ return fgInstance; }
83
84#endif //TG4_GEOMETRY_SERVICES_H
85