00001 00002 // $Id: BfldMesh.h,v 1.4 2005/02/03 22:35:49 rhatcher Exp $ 00003 // 00004 // BfldMesh 00005 // 00006 // This structure provides services for a 2d mesh representing an array of 00007 // points where a magnetic field map is "known". 00008 // 00009 // Specialized versions of this handle rectangular grids and Voronoi diagrams 00010 // 00011 // Author: R. Hatcher 2000.06.20 00012 // 00014 #ifndef BFLDMESH_H 00015 #define BFLDMESH_H 00016 00017 #include "TVector3.h" 00018 #include "TClonesArray.h" 00019 // don't use simple 'class TClonesArray' or CINT can't build streamer 00020 00021 #include "BField/BfldGrid.h" 00022 #include "BField/BfldRefCnt.h" 00023 00024 class BfldMesh : public TObject, public BfldRefCnt { 00025 public: 00026 00027 BfldMesh(); 00028 BfldMesh(BfldGrid::Grid_t grid, Int_t variant); 00029 virtual ~BfldMesh(); 00030 00031 BfldGrid::Grid_t GetGrid() const; 00032 Int_t GetVariant() const; 00033 Bool_t GetIsUVZ() const; 00034 00035 virtual TVector3 GetGeneratorPosition(Int_t generator); 00036 // return geometry (x,y) given node number 00037 00038 virtual Int_t PositionToGenerator(Float_t x, Float_t y); 00039 virtual Int_t PositionToGenerator(TVector3 xyz); 00040 00041 protected: 00042 00043 BfldGrid::Grid_t fGrid; 00044 Int_t fVariant; 00045 Bool_t fIsUVZ; 00046 TClonesArray *fPositions; 00047 00048 private: 00049 00050 ClassDef(BfldMesh,2) 00051 }; 00052 00053 inline BfldGrid::Grid_t BfldMesh::GetGrid() const { return fGrid; } 00054 inline Int_t BfldMesh::GetVariant() const { return fVariant; } 00055 inline Bool_t BfldMesh::GetIsUVZ() const { return fIsUVZ; } 00056 00057 #endif // BFLDMESH_H
1.3.9.1