CbmRoot
CbmTofGeoHandler.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmTofGeoHandler header file -----
3 // ----- Created 20/11/12 by F. Uhlig -----
4 // -------------------------------------------------------------------------
5 
6 
14 #ifndef CBMTOFGEOHANDLER_H
15 #define CBMTOFGEOHANDLER_H 1
16 
18 
19 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
20 #include <RtypesCore.h> // for Int_t, Float_t, Bool_t, kFALSE, Double_t
21 #include <TObject.h> // for TObject
22 #include <TString.h> // for TString
23 
24 #include "CbmTofDetectorId.h" // for CbmTofDetectorId (ptr only), CbmTofDet...
25 
26 class TGeoBBox;
27 class TGeoHMatrix;
28 class TGeoVolume;
29 
30 class CbmTofGeoHandler : public TObject {
31 public:
34 
35 
38 
39  Int_t GetUniqueDetectorId();
40  Int_t GetUniqueCounterId();
41  Int_t GetUniqueDetectorId(TString volName);
42 
43  Int_t GetCellId(Int_t uniqueId);
44 
45  Int_t GetGeoVersion() { return fGeoVersion; }
46 
47  Int_t Init(Bool_t isSimulation = kFALSE);
48 
49  Int_t GetDetSystemId(Int_t uniqueId);
50  Int_t GetSMType(Int_t uniqueId);
51  Int_t GetSModule(Int_t uniqueId);
52  Int_t GetCounter(Int_t uniqueId);
53  Int_t GetGap(Int_t uniqueId);
54  Int_t GetCell(Int_t uniqueId);
55  Int_t GetRegion(Int_t uniqueId);
56 
57  Float_t GetSizeX(TString volName);
58  Float_t GetSizeY(TString volName);
59  Float_t GetSizeZ(TString volName);
60  Float_t GetX(TString volName);
61  Float_t GetY(TString volName);
62  Float_t GetZ(TString volName);
63 
64  void FillDetectorInfoArray(Int_t uniqueId);
65  void NavigateTo(TString volName);
66 
67  // Implement Interface functions to the TGeoManager to be
68  // the same as for the VMC
69  Int_t CurrentVolOffID(Int_t off, Int_t& copy) const;
70  Int_t CurrentVolID(Int_t& copy) const;
71  Int_t VolId(const Text_t* name) const;
72  Int_t VolIdGeo(const char* name) const;
73  const char* CurrentVolName() const;
74  const char* CurrentVolOffName(Int_t off) const;
75  const char* CurrentNodeName() const;
76  const char* CurrentNodeOffName(Int_t off) const;
77 
78  Int_t CheckGeometryVersion();
79 
81 
82 private:
84  Int_t fGeoVersion;
85 
86  Bool_t fIsSimulation;
87  Int_t fMCVersion;
88  Bool_t fUseNodeName;
89 
92  UInt_t fGeoPathHash;
93  TGeoVolume* fCurrentVolume;
94  TGeoBBox* fVolumeShape;
95  Double_t fGlobal[3];
96  TGeoHMatrix* fGlobalMatrix;
97 
100 
101  ClassDef(CbmTofGeoHandler, 0)
102 };
103 
104 
105 #endif //CBMTOFGEOHANDLER_H
CbmTofGeoHandler::GetGeoVersion
Int_t GetGeoVersion()
Definition: CbmTofGeoHandler.h:45
k12a
@ k12a
Definition: CbmTofGeoHandler.h:17
CbmTofGeoHandler::GetDetSystemId
Int_t GetDetSystemId(Int_t uniqueId)
Definition: CbmTofGeoHandler.cxx:454
CbmTofDetectorId.h
CbmTofGeoHandler::fGeoVersion
Int_t fGeoVersion
Definition: CbmTofGeoHandler.h:84
CbmTofGeoHandler::GetCounter
Int_t GetCounter(Int_t uniqueId)
Definition: CbmTofGeoHandler.cxx:469
CbmTofGeoHandler::VolId
Int_t VolId(const Text_t *name) const
Definition: CbmTofGeoHandler.cxx:347
CbmTofGeoHandler::NavigateTo
void NavigateTo(TString volName)
Definition: CbmTofGeoHandler.cxx:530
CbmTofGeoHandler::GetRegion
Int_t GetRegion(Int_t uniqueId)
Definition: CbmTofGeoHandler.cxx:484
CbmTofGeoHandler::fLastUsedDetectorID
Int_t fLastUsedDetectorID
Definition: CbmTofGeoHandler.h:90
CbmTofGeoHandler::CurrentVolID
Int_t CurrentVolID(Int_t &copy) const
Definition: CbmTofGeoHandler.cxx:363
CbmTofGeoHandler::GetGap
Int_t GetGap(Int_t uniqueId)
Definition: CbmTofGeoHandler.cxx:474
CbmTofGeoHandler::~CbmTofGeoHandler
~CbmTofGeoHandler()
Definition: CbmTofGeoHandler.h:37
CbmTofGeoHandler::GetSizeY
Float_t GetSizeY(TString volName)
Definition: CbmTofGeoHandler.cxx:503
CbmTofGeoHandler::operator=
CbmTofGeoHandler operator=(const CbmTofGeoHandler &)
CbmTofGeoHandler::CheckGeometryVersion
Int_t CheckGeometryVersion()
Definition: CbmTofGeoHandler.cxx:61
CbmTofGeoHandler::FillDetectorInfoArray
void FillDetectorInfoArray(Int_t uniqueId)
Definition: CbmTofGeoHandler.cxx:449
CbmTofGeoHandler::GetZ
Float_t GetZ(TString volName)
Definition: CbmTofGeoHandler.cxx:515
CbmTofGeoHandler::GetSModule
Int_t GetSModule(Int_t uniqueId)
Definition: CbmTofGeoHandler.cxx:464
CbmTofGeoHandler::fMCVersion
Int_t fMCVersion
Definition: CbmTofGeoHandler.h:87
CbmTofGeoHandler::GetUniqueCounterId
Int_t GetUniqueCounterId()
Definition: CbmTofGeoHandler.cxx:209
CbmTofGeoHandler::GetDetIdPointer
CbmTofDetectorId * GetDetIdPointer()
Definition: CbmTofGeoHandler.h:80
CbmTofGeoHandler::VolIdGeo
Int_t VolIdGeo(const char *name) const
Definition: CbmTofGeoHandler.cxx:334
CbmTofGeoHandler::CurrentNodeName
const char * CurrentNodeName() const
Definition: CbmTofGeoHandler.cxx:428
CbmTofGeoHandler::GetCellId
Int_t GetCellId(Int_t uniqueId)
Definition: CbmTofGeoHandler.cxx:493
CbmTofGeoHandler::CurrentVolOffName
const char * CurrentVolOffName(Int_t off) const
Definition: CbmTofGeoHandler.cxx:410
CbmTofGeoHandler
Definition: CbmTofGeoHandler.h:30
k12b
@ k12b
Definition: CbmTofGeoHandler.h:17
CbmTofGeoHandler::fTofId
CbmTofDetectorId * fTofId
Definition: CbmTofGeoHandler.h:83
k14a
@ k14a
Definition: CbmTofGeoHandler.h:17
TofGeometryVersions
TofGeometryVersions
Definition: CbmTofGeoHandler.h:17
CbmTofGeoHandler::CurrentNodeOffName
const char * CurrentNodeOffName(Int_t off) const
Definition: CbmTofGeoHandler.cxx:437
CbmTofGeoHandler::CurrentVolName
const char * CurrentVolName() const
Definition: CbmTofGeoHandler.cxx:397
CbmTofGeoHandler::fCurrentVolume
TGeoVolume * fCurrentVolume
Definition: CbmTofGeoHandler.h:93
CbmTofGeoHandler::Init
Int_t Init(Bool_t isSimulation=kFALSE)
Definition: CbmTofGeoHandler.cxx:39
CbmTofGeoHandler::GetUniqueDetectorId
Int_t GetUniqueDetectorId()
Definition: CbmTofGeoHandler.cxx:149
k07a
@ k07a
Definition: CbmTofGeoHandler.h:17
CbmTofDetectorInfo
Definition: CbmTofDetectorId.h:20
CbmTofGeoHandler::CbmTofGeoHandler
CbmTofGeoHandler(const CbmTofGeoHandler &)
CbmTofGeoHandler::fVolumeShape
TGeoBBox * fVolumeShape
Definition: CbmTofGeoHandler.h:94
CbmTofGeoHandler::fGlobal
Double_t fGlobal[3]
Definition: CbmTofGeoHandler.h:95
CbmTofGeoHandler::fDetectorInfoArray
CbmTofDetectorInfo fDetectorInfoArray
Definition: CbmTofGeoHandler.h:91
CbmTofGeoHandler::GetCell
Int_t GetCell(Int_t uniqueId)
Definition: CbmTofGeoHandler.cxx:479
CbmTofGeoHandler::GetY
Float_t GetY(TString volName)
Definition: CbmTofGeoHandler.cxx:520
CbmTofGeoHandler::GetSizeX
Float_t GetSizeX(TString volName)
Definition: CbmTofGeoHandler.cxx:497
CbmTofGeoHandler::CurrentVolOffID
Int_t CurrentVolOffID(Int_t off, Int_t &copy) const
Definition: CbmTofGeoHandler.cxx:379
CbmTofGeoHandler::GetSizeZ
Float_t GetSizeZ(TString volName)
Definition: CbmTofGeoHandler.cxx:509
CbmTofGeoHandler::GetSMType
Int_t GetSMType(Int_t uniqueId)
Definition: CbmTofGeoHandler.cxx:459
CbmTofGeoHandler::fIsSimulation
Bool_t fIsSimulation
Definition: CbmTofGeoHandler.h:86
CbmTofDetectorId
Definition: CbmTofDetectorId.h:66
CbmTofGeoHandler::fUseNodeName
Bool_t fUseNodeName
Definition: CbmTofGeoHandler.h:88
CbmTofGeoHandler::fGlobalMatrix
TGeoHMatrix * fGlobalMatrix
Global centre of volume.
Definition: CbmTofGeoHandler.h:96
CbmTofGeoHandler::fGeoPathHash
UInt_t fGeoPathHash
Definition: CbmTofGeoHandler.h:92
CbmTofGeoHandler::CbmTofGeoHandler
CbmTofGeoHandler()
Definition: CbmTofGeoHandler.cxx:24
CbmTofGeoHandler::GetX
Float_t GetX(TString volName)
Definition: CbmTofGeoHandler.cxx:525