Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-06 07:38:45

0001 #ifndef Interpolation_TrapezoidalCartesianMFGrid_h
0002 #define Interpolation_TrapezoidalCartesianMFGrid_h
0003 
0004 /** \class TrapezoidalCartesianMFGrid
0005  *
0006  *  Grid for a trapezoid in cartesian coordinate.
0007  *  The grid must have uniform spacing in two coordinates and increasing spacing in the other.
0008  *  Increasing spacing is supported only for x and y for the time being
0009  *
0010  *  \author T. Todorov
0011  */
0012 
0013 #include "MFGrid3D.h"
0014 #include "Trapezoid2RectangleMappingX.h"
0015 #include "FWCore/Utilities/interface/Visibility.h"
0016 
0017 namespace magneticfield::interpolation {
0018   class binary_ifstream;
0019 }
0020 
0021 class dso_internal TrapezoidalCartesianMFGrid : public MFGrid3D {
0022 public:
0023   using binary_ifstream = magneticfield::interpolation::binary_ifstream;
0024 
0025   TrapezoidalCartesianMFGrid(binary_ifstream& istr, const GloballyPositioned<float>& vol);
0026 
0027   LocalVector uncheckedValueInTesla(const LocalPoint& p) const override;
0028 
0029   void dump() const override;
0030 
0031   void toGridFrame(const LocalPoint& p, double& a, double& b, double& c) const override;
0032 
0033   LocalPoint fromGridFrame(double a, double b, double c) const override;
0034 
0035 private:
0036   Trapezoid2RectangleMappingX mapping_;
0037   bool increasingAlongX;
0038   bool convertToLocal;
0039 };
0040 
0041 #endif