FairRoot/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 
30 public:
32 
33  PndHypGeoHandling(TString fileName);
34 
35  PndHypGeoHandling(TGeoManager* aGeoMan)
36  {if (aGeoMan == 0) std::cout << "-E- not a valid GeoManager" << std::endl;
37  fGeoMan = aGeoMan;};
38 
39  virtual ~PndHypGeoHandling(){};
41  TString GetID(TString path);
42  TString GetPath(TString id);
44  std::vector<TString> GetNamesLevel(Int_t level, TString startPath = "", bool fullPath = false);
45  void GetOUVPath(TString path, TVector3& o, TVector3& u, TVector3& v);
46  void GetOUVId(TString id, TVector3& o, TVector3& u, TVector3& v);
47 
48  TVector3 GetSensorDimensionsID(TString id);
49  TVector3 GetSensorDimensionsPath(TString path);
50 
51  TVector3 MasterToLocalId(const TVector3& master, const TString& id);
52  TVector3 MasterToLocalPath(const TVector3& master, const TString& id);
53  TVector3 LocalToMasterId(const TVector3& local, const TString& id);
54  TVector3 LocalToMasterPath(const TVector3& local, const TString& id);
55 
56  TVector3 MasterToLocalErrorsId(const TVector3& master, const TString& id);
57  TVector3 MasterToLocalErrorsPath(const TVector3& master, const TString& id);
58  TVector3 LocalToMasterErrorsId(const TVector3& local, const TString& id);
59  TVector3 LocalToMasterErrorsPath(const TVector3& local, const TString& id);
60 
61  void SetVerbose(Int_t v) { fVerbose = v; }
62 
63  Bool_t cd(TString id);
64  void FillLevelNames();
65 
66 private:
67  TGeoManager* fGeoMan;
68  std::vector<TString> fLevelNames;Int_t fVerbose;
69  Int_t fLevel;
70  bool fFullPath;
72 };
73 
74 #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:4
TVector3 GetSensorDimensionsPath(TString path)
TVector3 MasterToLocalErrorsId(const TVector3 &master, const TString &id)
std::vector< TString > GetNamesLevel(Int_t level, TString startPath="", bool fullPath=false)
void SetVerbose(Int_t v)
TString GetPath(TString id)
for a given ID the path is returned
ClassDef(PndHypGeoHandling, 3)
std::vector< TString > fLevelNames
TString GetCurrentID()
returns the ID of the current node
TVector3 MasterToLocalPath(const TVector3 &master, const TString &id)
void FillLevelNames()
fills vector fLevelNames with the names (or the paths) of the volumes down to the level give...
TString name
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)
TGeoManager * fGeoMan
TVector3 LocalToMasterPath(const TVector3 &local, const TString &id)