PandaRoot
PndHypGeoHandling.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
31 #ifndef PNDHYPGEOHANDLING_H
32 #define PNDHYPGEOHANDLING_H
33 
34 #include "TGeoManager.h"
35 #include "TString.h"
36 #include "TVector3.h"
37 #include <string>
38 #include <iostream>
39 #include <vector>
40 #include "FairLogger.h"
41 
43  public:
45 
46  PndHypGeoHandling(TString fileName);
47 
48  PndHypGeoHandling(TGeoManager *aGeoMan)
49  {
50  if (aGeoMan == 0)
51  LOG(error) << " not a valid GeoManager";
52  fGeoMan = aGeoMan;
53  };
54 
55  virtual ~PndHypGeoHandling(){};
56  TString GetCurrentID();
57  TString GetID(TString path);
58  TString GetPath(TString id);
59  TString GetVolumeID(TString name);
60  std::vector<TString> GetNamesLevel(Int_t level, TString startPath = "", bool fullPath = false);
61  void GetOUVPath(TString path, TVector3 &o, TVector3 &u, TVector3 &v);
62  void GetOUVId(TString id, TVector3 &o, TVector3 &u, TVector3 &v);
63 
64  TVector3 GetSensorDimensionsID(TString id);
65  TVector3 GetSensorDimensionsPath(TString path);
66 
67  TVector3 MasterToLocalId(const TVector3 &master, const TString &id);
68  TVector3 MasterToLocalPath(const TVector3 &master, const TString &id);
69  TVector3 LocalToMasterId(const TVector3 &local, const TString &id);
70  TVector3 LocalToMasterPath(const TVector3 &local, const TString &id);
71 
72  TVector3 MasterToLocalErrorsId(const TVector3 &master, const TString &id);
73  TVector3 MasterToLocalErrorsPath(const TVector3 &master, const TString &id);
74  TVector3 LocalToMasterErrorsId(const TVector3 &local, const TString &id);
75  TVector3 LocalToMasterErrorsPath(const TVector3 &local, const TString &id);
76 
77  void SetVerbose(Int_t v) { fVerbose = v; }
78 
79  Bool_t cd(TString id);
80  void FillLevelNames();
81 
82  private:
83  TGeoManager *fGeoMan;
84  std::vector<TString> fLevelNames;
85  Int_t fVerbose;
86  Int_t fLevel;
87  bool fFullPath;
88  ClassDef(PndHypGeoHandling, 3);
89 };
90 
91 #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:15
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)