PandaRoot
PndHypGeoHandling.h
Go to the documentation of this file.
1 
19 #ifndef PNDHYPGEOHANDLING_H
20 #define PNDHYPGEOHANDLING_H
21 
22 #include "TGeoManager.h"
23 #include "TString.h"
24 #include "TVector3.h"
25 #include <string>
26 #include <iostream>
27 #include <vector>
28 #include "FairLogger.h"
29 
31  public:
33 
34  PndHypGeoHandling(TString fileName);
35 
36  PndHypGeoHandling(TGeoManager *aGeoMan)
37  {
38  if (aGeoMan == 0)
39  LOG(error) << " not a valid GeoManager";
40  fGeoMan = aGeoMan;
41  };
42 
43  virtual ~PndHypGeoHandling(){};
44  TString GetCurrentID();
45  TString GetID(TString path);
46  TString GetPath(TString id);
47  TString GetVolumeID(TString name);
48  std::vector<TString> GetNamesLevel(Int_t level, TString startPath = "", bool fullPath = false);
49  void GetOUVPath(TString path, TVector3 &o, TVector3 &u, TVector3 &v);
50  void GetOUVId(TString id, TVector3 &o, TVector3 &u, TVector3 &v);
51 
52  TVector3 GetSensorDimensionsID(TString id);
53  TVector3 GetSensorDimensionsPath(TString path);
54 
55  TVector3 MasterToLocalId(const TVector3 &master, const TString &id);
56  TVector3 MasterToLocalPath(const TVector3 &master, const TString &id);
57  TVector3 LocalToMasterId(const TVector3 &local, const TString &id);
58  TVector3 LocalToMasterPath(const TVector3 &local, const TString &id);
59 
60  TVector3 MasterToLocalErrorsId(const TVector3 &master, const TString &id);
61  TVector3 MasterToLocalErrorsPath(const TVector3 &master, const TString &id);
62  TVector3 LocalToMasterErrorsId(const TVector3 &local, const TString &id);
63  TVector3 LocalToMasterErrorsPath(const TVector3 &local, const TString &id);
64 
65  void SetVerbose(Int_t v) { fVerbose = v; }
66 
67  Bool_t cd(TString id);
68  void FillLevelNames();
69 
70  private:
71  TGeoManager *fGeoMan;
72  std::vector<TString> fLevelNames;
73  Int_t fVerbose;
74  Int_t fLevel;
75  bool fFullPath;
76  ClassDef(PndHypGeoHandling, 3);
77 };
78 
79 #endif
TVector3 LocalToMasterId(const TVector3 &local, const TString &id)
void GetOUVPath(TString path, TVector3 &o, TVector3 &u, TVector3 &v)
for a volume given by its path the o, u, v vectors for the plane are returned
TVector3 GetSensorDimensionsID(TString id)
Bool_t cd(TString id)
as the cd command of TGeoManager just with the ID
virtual ~PndHypGeoHandling()
TVector3 MasterToLocalErrorsPath(const TVector3 &master, const TString &id)
TString GetVolumeID(TString name)
returns the volume ID for a given volume name
void GetOUVId(TString id, TVector3 &o, TVector3 &u, TVector3 &v)
for a volume given by its ID the o, u, v vectors for the plane are returned
Class to access the naming information of the MVD.
PndHypGeoHandling(TGeoManager *aGeoMan)
__m128 v
Definition: P4_F32vec4.h:3
TVector3 GetSensorDimensionsPath(TString path)
TVector3 MasterToLocalErrorsId(const TVector3 &master, const TString &id)
void SetVerbose(Int_t v)
TString GetPath(TString id)
for a given ID the path is returned
TString GetCurrentID()
returns the ID of the current node
TVector3 MasterToLocalPath(const TVector3 &master, const TString &id)
void FillLevelNames()
fills vector<TString> fLevelNames with the names (or the paths) of the volumes down to the level give...
TString GetID(TString path)
for a given TGeoManager-path the ID is returned
TVector3 LocalToMasterErrorsPath(const TVector3 &local, const TString &id)
TVector3 MasterToLocalId(const TVector3 &master, const TString &id)
TVector3 LocalToMasterErrorsId(const TVector3 &local, const TString &id)
std::vector< TString > GetNamesLevel(Int_t level, TString startPath="", bool fullPath=false)
TVector3 LocalToMasterPath(const TVector3 &local, const TString &id)