Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GeoNode.h

Go to the documentation of this file.
00001 
00002 // $Id: GeoNode.h,v 1.13 2007/12/11 06:04:16 rhatcher Exp $
00003 //
00004 // GeoNode
00005 //
00006 // GeoNode is a specialized TGeoNodeMatrix to implement Minos specific methods
00007 // that are generic to all Minos node types (plane,module,strip)
00008 //
00009 // Author:  S. Kasahara  06/04
00011 
00012 #ifndef GEONODE_H
00013 #define GEONODE_H
00014 
00015 #include <TGeoNode.h>  // base class
00016 #include <TVector3.h>  // return type
00017 #include "GeoGeometry/GeoRefCnt.h"  // base class
00018 #include "GeoGeometry/GeoGeometry.h" 
00019 #include "Plex/PlexPlaneId.h"  // data member
00020 
00021 class TGeoVolume;
00022 class TGeoCombiTrans;
00023 
00024 class GeoNode : public GeoRefCnt, public TGeoNodeMatrix {
00025 
00026   friend class GeoGeometry;  // access to protected methods
00027 
00028  public:
00029 
00030   // Constructors and destructor
00031   // def ctor for i/o
00032   GeoNode(): fGeoGeometry(0),fGlobalPath(""),fGlobalMatrix(0) {} 
00033   virtual ~GeoNode();
00034 
00035   
00036   // State testing methods
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   // State changing methods
00061   // UpdateGlobalMatrix must be called after geometry is closed
00062   virtual void UpdateGlobalMatrix();
00063 
00064   // inc/dec of references to this node
00065   virtual void IncrementRef();
00066   virtual void DecrementRef();
00067 
00068  private:
00069 
00070   // private methods
00071   void SetParent(TGeoVolume* parent);
00072 
00073   // Disable copy and assignment ctor by making them private and w/no imp
00074   GeoNode(const GeoNode& that);
00075   GeoNode& operator=(const GeoNode& that);
00076 
00077   GeoGeometry*    fGeoGeometry;  
00078   std::string     fGlobalPath;   // path to this node from MARS down
00079   TGeoCombiTrans* fGlobalMatrix; // matrix to be used for local <-> global
00080 
00081 ClassDef(GeoNode,2)
00082 };
00083 #endif // GEONODE_H

Generated on Mon Feb 15 11:06:45 2010 for loon by  doxygen 1.3.9.1