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

BfldMesh.cxx

Go to the documentation of this file.
00001 
00002 // $Id: BfldMesh.cxx,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 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 #include "BField/BfldMesh.h"
00015 
00016 #include "MessageService/MsgService.h"
00017 CVSID("$Id: BfldMesh.cxx,v 1.4 2005/02/03 22:35:49 rhatcher Exp $");
00018 
00019 ClassImp(BfldMesh)
00020 
00021 //_____________________________________________________________________________
00022 BfldMesh::BfldMesh() 
00023    : fGrid(BfldGrid::kUndefined), fVariant(0), fIsUVZ(false), fPositions(0)
00024 {
00025 
00026 }
00027 
00028 //_____________________________________________________________________________
00029 BfldMesh::BfldMesh(BfldGrid::Grid_t grid, Int_t variant) 
00030    : fGrid(grid), fVariant(variant), fIsUVZ(false), fPositions(0)
00031 {
00032 
00033 }
00034 
00035 //_____________________________________________________________________________
00036 BfldMesh::~BfldMesh()
00037 {
00038    fGrid = BfldGrid::kUndefined;
00039 
00040    if (fPositions) fPositions->Delete();
00041    delete fPositions;
00042 }
00043 
00044 //_____________________________________________________________________________
00045 TVector3 BfldMesh::GetGeneratorPosition(Int_t generator)
00046 {
00047    return TVector3(*(TVector3*)fPositions->At(generator));
00048 }
00049 
00050 //_____________________________________________________________________________
00051 Int_t BfldMesh::PositionToGenerator(Float_t /* x */, Float_t /* y */)
00052 {
00053    // return the generator (indx) associated with the (x,y) position
00054 
00055    MSG("Bfld",kFatal) << "BfldMesh::PositionToGenerator -- unimplemented"
00056                       << endl;
00057 
00058    return 0;
00059 }
00060 
00061 //_____________________________________________________________________________
00062 Int_t BfldMesh::PositionToGenerator(TVector3 xyz)
00063 {
00064    // return the generator (indx) associated with the (x,y) position
00065 
00066    return PositionToGenerator(xyz.X(),xyz.Y());
00067 }
00068 
00069 //_____________________________________________________________________________

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