#include <BfldHandlerVoronoi.h>
Inheritance diagram for BfldHandlerVoronoi:

Public Member Functions | |
| BfldHandlerVoronoi () | |
| virtual | ~BfldHandlerVoronoi () |
| virtual TVector3 | GetBFieldMeshCoord (const TVector3 &xyz) |
| virtual void | SetInterpMethod (const BfldInterpMethod::InterpMethod_t method) |
| virtual void | SetMap (BfldMap *map) |
| virtual void | SetMesh (BfldMesh *mesh) |
Protected Member Functions | |
| void | SetCostasHandler (BfldGrid::Grid_t grid) |
| void | SetCostasInterpMethod () |
Protected Attributes | |
| BFLHandler * | fCostasHandler |
|
|
Definition at line 27 of file BfldHandlerVoronoi.cxx. References MSG. 00028 : BfldHandler(), fCostasHandler(0) 00029 { 00030 MSG("Bfld",Msg::kWarning) 00031 << "BfldHandlerVoronoi::ctor" << endl; 00032 }
|
|
|
Definition at line 35 of file BfldHandlerVoronoi.cxx. 00036 {
00037
00038 if (fCostasHandler) delete fCostasHandler;
00039 }
|
|
|
Implements BfldHandler. Definition at line 141 of file BfldHandlerVoronoi.cxx. References fCostasHandler, and BFLHandler::GetBField(). 00142 {
00143 // search for the right location
00144 // and then interpolate
00145
00146 // Costas expects position in mm ...
00147 // Costas currently returns in Tesla ...
00148
00149 // convert position to "mm"
00150 TVector3 xyz_mm = xyz * (1./Munits::mm);
00151 // return field in "Tesla"
00152 return fCostasHandler->GetBField(xyz_mm,kTRUE) * Munits::tesla;
00153 }
|
|
|
Definition at line 97 of file BfldHandlerVoronoi.cxx. References BfldGrid::AsString(), fCostasHandler, MSG, and SetCostasInterpMethod(). Referenced by SetMap(), and SetMesh(). 00098 {
00099
00100 // this isn't really the right way to do this ...but a hack
00101 if ( ! fCostasHandler ) {
00102
00103 MSG("Bfld",Msg::kDebug)
00104 << "BfldHandlerVoronoi::SetCostasHandler create BFLHander" << endl;
00105
00106 switch (grid) {
00107 case BfldGrid::kNearCoarseV: fCostasHandler = new BFLHandler(0);
00108 break;
00109 case BfldGrid::kFarCoarseV: fCostasHandler = new BFLHandler(1);
00110 break;
00111 default:
00112 MSG("Bfld",Msg::kFatal)
00113 << "BfldHandlerVoronoi::SetCostasHandler couldn't attach BFLHandler for "
00114 << BfldGrid::AsString(grid) << " grid " << endl;
00115 break;
00116 }
00117
00118 SetCostasInterpMethod();
00119
00120 //fCostasHandler->SetLastPolygAsSeed();
00121
00122 // BFLHandler creates a BFLInterpolation which creates a BFLCache
00123 // no need to explicitly do so -- it is a memory leak
00124 //BFLCache *mycached = new BFLCache;
00125 //fCostasHandler->SetCache(mycached);
00126
00127 }
00128
00129 }
|
|
|
Definition at line 132 of file BfldHandlerVoronoi.cxx. References fCostasHandler, and BFLHandler::SetInterpolant(). Referenced by SetCostasHandler(), and SetInterpMethod(). 00133 {
00134 // inform fCostasHandler about the interpolation approach requested
00135
00136 // if (fCostasHandler) fCostasHandler->SetInterpolant((int)fInterpMethod);
00137 if (fCostasHandler) fCostasHandler->SetInterpolant(fInterpMethod);
00138 }
|
|
|
Reimplemented from BfldHandler. Definition at line 42 of file BfldHandlerVoronoi.cxx. References BfldInterpMethod::AsString(), MSG, SetCostasInterpMethod(), and BfldHandler::SetInterpMethod(). 00043 {
00044 // set the interpolation method for this handler
00045 // the Voronoi specialization translates "kDefault" to "kNatural"
00046 //
00047 // and should also disallow illegal choices
00048
00049 static Int_t nwarn = 10;
00050
00051 BfldInterpMethod::InterpMethod_t chosen = method;
00052
00053 switch (chosen) {
00054 case BfldInterpMethod::kBilinear: // not yet!
00055 break;
00056 case BfldInterpMethod::kPlanar:
00057 case BfldInterpMethod::kPlanarVec:
00058 // can't do these methods
00059 if (nwarn > 0) {
00060 nwarn--;
00061 MSG("Bfld",Msg::kWarning)
00062 << "BfldHandlerRect2d::SetInterpMethod '"
00063 << BfldInterpMethod::AsString(chosen)
00064 << "' not supported"<< endl;
00065 }
00066 // fall through to our choice of default
00067 case BfldInterpMethod::kDefault:
00068 // pick a default method
00069 chosen = BfldInterpMethod::kNatural;
00070 break;
00071 default:
00072 // no need to adjust anything for most methods
00073 break;
00074 }
00075
00076 BfldHandler::SetInterpMethod(chosen); // do the normal thing
00077
00078 SetCostasInterpMethod(); // make sure Costas handler is notified
00079
00080 }
|
|
|
Reimplemented from BfldHandler. Definition at line 83 of file BfldHandlerVoronoi.cxx. References BfldMap::GetGrid(), SetCostasHandler(), and BfldHandler::SetMap(). 00084 {
00085 BfldHandler::SetMap(bmap); // do the normal thing
00086 SetCostasHandler(bmap->GetGrid()); // make sure Costas handler is attached
00087 }
|
|
|
Reimplemented from BfldHandler. Definition at line 90 of file BfldHandlerVoronoi.cxx. References BfldMesh::GetGrid(), SetCostasHandler(), and BfldHandler::SetMesh(). 00091 {
00092 BfldHandler::SetMesh(mesh); // do the normal thing
00093 SetCostasHandler(mesh->GetGrid()); // make sure Costas handler is attached
00094 }
|
|
|
Definition at line 39 of file BfldHandlerVoronoi.h. Referenced by GetBFieldMeshCoord(), SetCostasHandler(), and SetCostasInterpMethod(). |
1.3.9.1