00001 00002 // // 00003 //authors: Costas Andreopoulos, Elias Athanasopoulos, George Tzanakos// 00004 // Physics Department, University of Athens // 00005 // October 28, 1999 // 00007 00008 // 00009 // __ INSERT _ DOCUMENTATION _ HERE __ 00010 // 00011 // see NuMI-L-xxx 00012 00013 #ifndef BFLVORONOIMAKER_H 00014 #define BFLVORONOIMAKER_H 00015 00016 #include <iostream> 00017 #include "TMath.h" 00018 #include "TVector2.h" 00019 #include "TObjArray.h" 00020 #include "TObject.h" 00021 #include "BField/TIntList.h" 00022 //#include "BField/BFLNode.h" 00023 00024 const Float_t kAugmentedGrRadius = 1000000; 00025 const Float_t kGensRadius = kAugmentedGrRadius / 10; 00026 const Int_t BaseGeneratorID = 4; 00027 00028 class BFLWingedEdge; 00029 class BFLVorOperator; 00030 class TIntList; 00031 class BFLNode; 00032 class BFLVtx; 00033 class BFLPolyg; 00034 class BFLEdge; 00035 00036 class BFLVoronoiMaker: public TObject 00037 { 00038 public: 00039 00040 BFLVoronoiMaker(BFLWingedEdge * voronoi); 00041 ~BFLVoronoiMaker(); 00042 00043 void Make(void); 00044 00045 private: 00046 00047 void IncreaseEntropy(void); 00048 void AddDistantGenerators(void); 00049 void RemoveRefsToDeletedEdges(void); 00050 Int_t AddNewVtx(Int_t edge, Float_t xv, Float_t yv); 00051 void AddNewPolyg(Int_t EdgeID); 00052 Int_t AddNewEdge(Int_t SVtxID, Int_t EVtxID,Int_t EdgeOfSVtx, Int_t EdgeOfEVtx); 00053 void WingedEdgePatch(void); 00054 void MergeDataStructures(void); 00055 Int_t GetAnotherEdgeAround(Int_t PolygID) const ; 00056 Int_t GuessNearestNeighbour(void) const; 00057 void SubstructureInit(void); 00058 void NewStructureInit(void); 00059 void MarkEdgesToDelete(void); 00060 void MarkVerticesToDelete(void); 00061 void DeleteSubstructure(void); 00062 void Defrag(void); 00063 00064 //virtual void SetCurrentPolygID(Int_t pid) { fCurrentPolygID = pid; } 00065 //virtual Int_t GetCurrentPolygID(void) const { return fCurrentPolygID; } 00066 00067 virtual Int_t RandomToSorted(Int_t SlotAtRandom) const { 00068 return 3+fRandomToSorted->At(SlotAtRandom); 00069 } 00070 virtual Int_t SortedToRandom(Int_t SlotAtSorted) const { 00071 return 3+fSortedToRandom->At(SlotAtSorted); 00072 } 00073 00074 virtual BFLVorOperator * GetVoronoiOperator(void) { return fOp; } 00075 00076 Int_t fCurrentPolygID; 00077 Int_t fGenID; 00078 Long_t fN; 00079 BFLWingedEdge * fVor; 00080 BFLWingedEdge * fVorPatch; 00081 BFLVorOperator * fOp; 00082 TObjArray * fGenerators; 00083 TIntList * fRandomToSorted; 00084 TIntList * fSortedToRandom; 00085 TIntList * fEdgesToDelete; 00086 TIntList * fVerticesToDelete; 00087 TIntList * fNewEdgesTopology; 00088 TIntList * fNewVertices; 00089 // 00090 Bool_t debug; 00091 Bool_t debug2; 00092 TObjArray * fBField; 00093 00094 ClassDef(BFLVoronoiMaker,0) // MINOS Voronoi diagram consuctor 00095 }; 00096 00097 #endif
1.3.9.1