Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:51

0001 #ifndef Geometry_CommonTopologies_SurfaceDeformation_H
0002 #define Geometry_CommonTopologies_SurfaceDeformation_H
0003 
0004 /// SurfaceDeformation
0005 ///
0006 /// Abstract base class for corrections to be applied to
0007 /// 2D local positions on a surface if the surface is not perfectly
0008 /// following its parameterisaton (e.g. bows for a Plane).
0009 ///
0010 
0011 #include "DataFormats/GeometryVector/interface/Vector2DBase.h"
0012 #include "DataFormats/GeometryVector/interface/Point2DBase.h"
0013 #include "DataFormats/GeometryVector/interface/LocalTag.h"
0014 #include "Geometry/CommonTopologies/interface/Topology.h"
0015 
0016 #include <vector>
0017 
0018 class SurfaceDeformation {
0019 public:
0020   typedef Vector2DBase<double, LocalTag> Local2DVector;
0021   typedef Topology::Local2DPoint Local2DPoint;
0022   typedef Topology::LocalTrackAngles LocalTrackAngles;
0023   typedef Topology::Vector2D Vector2D;
0024   typedef Topology::MathVector2D MathVector2D;
0025 
0026   virtual ~SurfaceDeformation() {}
0027 
0028   virtual SurfaceDeformation *clone() const = 0;
0029 
0030   /// specific type, i.e. SurfaceDeformationFactory::Type
0031   virtual int type() const = 0;
0032 
0033   /// correction to add to local position depending on
0034   /// - track parameters in local frame (from LocalTrajectoryParameters):
0035   ///   * track position as Local2DPoint(x,y)
0036   ///   * track angles   as LocalTrackAngles(dxdz, dydz)
0037   /// - length of surface (local y-coordinate)
0038   /// - width of surface (local x-coordinate)
0039   virtual Local2DVector positionCorrection(const Local2DPoint &localPos,
0040                                            const LocalTrackAngles &localAngles,
0041                                            double length,
0042                                            double width) const = 0;
0043 
0044   /// update information with parameters of 'other',
0045   /// false in case the type or some parameters do not match and thus
0046   /// the information cannot be used (then no changes are done),
0047   /// true if merge was successful
0048   virtual bool add(const SurfaceDeformation &other) = 0;
0049 
0050   // Seems like only GeometryAligner and derived classes need access
0051   // to parameters, so we could make it a friend and protect parameters()...
0052   // friend class GeometryAligner; // to be able to call parameters
0053   // protected:
0054 
0055   /// parameters - interpretation left to the concrete implementation
0056   virtual std::vector<double> parameters() const = 0;
0057 };
0058 
0059 #endif