FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairTutorialDet4GeoHandler.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 // -------------------------------------------------------------------------
9 // ----- FairTutorialDet4GeoHandler header file -----
10 // ----- Created 20/11/12 by F. Uhlig -----
11 // -------------------------------------------------------------------------
12 
20 #ifndef FAIRTUTORIALDET4GEOHANDLER_H
21 #define FAIRTUTORIALDET4GEOHANDLER_H 1
22 
23 #include <Rtypes.h> // for Int_t, Double_t, Bool_t, etc
24 #include <TObject.h> // for TObject
25 #include <TString.h> // for TString
26 
27 class TGeoBBox;
28 class TGeoVolume;
29 class TGeoHMatrix;
30 
31 class FairTutorialDet4GeoHandler : public TObject
32 {
33  public:
36 
39 
40  Int_t GetUniqueDetectorId();
41  Int_t GetUniqueDetectorId(TString volName);
42 
43  // Int_t GetDetectorId(Int_t uniqueId);
44 
45  Int_t Init(Bool_t isSimulation = kFALSE);
46 
47  void FillDetectorInfoArray(Int_t uniqueId);
48  void NavigateTo(TString volName);
49 
50  // Implement Interface functions to the TGeoManager to be
51  // the same as for the VMC
52  Int_t CurrentVolOffID(Int_t off, Int_t& copy) const;
53  Int_t CurrentVolID(Int_t& copy) const;
54  Int_t VolId(const Text_t* name) const;
55  Int_t VolIdGeo(const char* name) const;
56  const char* CurrentVolName() const;
57  const char* CurrentVolOffName(Int_t off) const;
58 
59  void LocalToGlobal(Double_t* local, Double_t* global, Int_t detID);
60 
61  // Int_t CheckGeometryVersion();
62 
63  private:
64  Bool_t fIsSimulation;
65 
66  Int_t fLastUsedDetectorID;
67 
68  UInt_t fGeoPathHash;
69  TGeoVolume* fCurrentVolume;
70  TGeoBBox* fVolumeShape;
71  Double_t fGlobal[3];
72  TGeoHMatrix* fGlobalMatrix;
73 
74  TString ConstructFullPathFromDetID(Int_t detID);
75 
78 
79  ClassDef(FairTutorialDet4GeoHandler, 1);
80 };
81 
82 #endif // FAIRTUTORIALDETGEOHANDLER_H
Int_t CurrentVolID(Int_t &copy) const
Int_t VolIdGeo(const char *name) const
const char * CurrentVolOffName(Int_t off) const
void FillDetectorInfoArray(Int_t uniqueId)
Int_t VolId(const Text_t *name) const
Int_t Init(Bool_t isSimulation=kFALSE)
void LocalToGlobal(Double_t *local, Double_t *global, Int_t detID)
Int_t CurrentVolOffID(Int_t off, Int_t &copy) const