Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MagGeometryExerciser_H
0002 #define MagGeometryExerciser_H
0003 
0004 /** \class MagGeometryExerciser
0005  *  No description available.
0006  *
0007  *  \author N. Amapane - INFN Torino
0008  */
0009 
0010 #include <vector>
0011 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0012 
0013 class MagGeometry;
0014 class MagVolume6Faces;
0015 
0016 class MagGeometryExerciser {
0017 public:
0018   /// Constructor
0019   MagGeometryExerciser(const MagGeometry* g);
0020 
0021   /// Destructor
0022   ~MagGeometryExerciser();
0023 
0024   void testFindVolume(int ntry = 100000);                    // findVolume(random) test
0025   void testInside(int ntry = 100000, float tolerance = 0.);  // inside(random) test
0026 
0027   //  void testFieldRandom(int ntry = 1000);// fieldInTesla vs MagneticField::inTesla (random)
0028   //  void testFieldVol1();  // fieldInTesla within vol 1 (tiny region)
0029   //  void testFieldLinear(int ntry = 1000);// fieldInTesla vs MagneticField::inTesla (track-like pattern)
0030 
0031 private:
0032   // Check if inside succeeds for the given point.
0033   bool testInside(const GlobalPoint& gp, float tolerance = 0.);
0034   // Check if findVolume succeeds for the given point.
0035   bool testFindVolume(const GlobalPoint& gp);
0036 
0037   const MagGeometry* theGeometry;
0038   std::vector<MagVolume6Faces const*> volumes;
0039 };
0040 #endif