00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef GEONODE_H
00013 #define GEONODE_H
00014
00015 #include <TGeoNode.h>
00016 #include <TVector3.h>
00017 #include "GeoGeometry/GeoRefCnt.h"
00018 #include "GeoGeometry/GeoGeometry.h"
00019 #include "Plex/PlexPlaneId.h"
00020
00021 class TGeoVolume;
00022 class TGeoCombiTrans;
00023
00024 class GeoNode : public GeoRefCnt, public TGeoNodeMatrix {
00025
00026 friend class GeoGeometry;
00027
00028 public:
00029
00030
00031
00032 GeoNode(): fGeoGeometry(0),fGlobalPath(""),fGlobalMatrix(0) {}
00033 virtual ~GeoNode();
00034
00035
00036
00037 virtual void UpdateGlobalManager() const
00038 { if ( fGeoGeometry ) fGeoGeometry->UpdateGlobalManager();
00039 else gGeoManager = 0; }
00040
00041 virtual GeoGeometry* GetGeoGeometry() const { return fGeoGeometry; }
00042 virtual std::string GetGlobalPath() const { return fGlobalPath; }
00043
00044 virtual TVector3 LocalToGlobal(const TVector3& local) const;
00045 virtual TVector3 GlobalToLocal(const TVector3& global) const;
00046 virtual void LocalToGlobal(Double_t* lxyz, Double_t* gxyz) const;
00047 virtual void GlobalToLocal(Double_t* gxyz, Double_t* lxyz) const;
00048
00049 virtual TVector3 LocalToGlobalVect(const TVector3& local) const;
00050 virtual TVector3 GlobalToLocalVect(const TVector3& global) const;
00051 virtual void LocalToGlobalVect(Double_t* lxyz, Double_t* gxyz) const;
00052 virtual void GlobalToLocalVect(Double_t* gxyz, Double_t* lxyz) const;
00053
00054 protected:
00055
00056 GeoNode(GeoGeometry* geoGeometry, TGeoVolume* vol,
00057 TGeoMatrix* matrix, TGeoVolume* parVol,
00058 std::string globalpath, std::string nodename);
00059
00060
00061
00062 virtual void UpdateGlobalMatrix();
00063
00064
00065 virtual void IncrementRef();
00066 virtual void DecrementRef();
00067
00068 private:
00069
00070
00071 void SetParent(TGeoVolume* parent);
00072
00073
00074 GeoNode(const GeoNode& that);
00075 GeoNode& operator=(const GeoNode& that);
00076
00077 GeoGeometry* fGeoGeometry;
00078 std::string fGlobalPath;
00079 TGeoCombiTrans* fGlobalMatrix;
00080
00081 ClassDef(GeoNode,2)
00082 };
00083 #endif // GEONODE_H