Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:31

0001 #ifndef VolumeGridTester_h
0002 #define VolumeGridTester_h
0003 
0004 /** \class VolumeGridTester
0005  *
0006  *  Test the grid for a given volume: each grid point should be
0007  *  inside the volume.  
0008  *
0009  *  \author T. Todorov
0010  */
0011 
0012 #include "MagneticField/Interpolation/interface/MagProviderInterpol.h"
0013 #include "MagneticField/Interpolation/interface/MFGrid.h"
0014 #include <DataFormats/GeometryVector/interface/GlobalPoint.h>
0015 
0016 class MagVolume6Faces;
0017 class VolumeBasedMagneticField;
0018 
0019 class VolumeGridTester {
0020 public:
0021   VolumeGridTester(const MagVolume6Faces* vol, const MagProviderInterpol* mp, const VolumeBasedMagneticField* field)
0022       : volume_(vol), magProvider_(mp), field_(field) {}
0023 
0024   bool testInside() const;
0025   bool testFind(GlobalPoint gp) const;
0026 
0027 private:
0028   const MagVolume6Faces* volume_;
0029   const MagProviderInterpol* magProvider_;
0030   const VolumeBasedMagneticField* field_;
0031 
0032   void dumpProblem(const MFGrid::LocalPoint& lp, double tolerance) const;
0033 };
0034 
0035 #endif