Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:27

0001 #ifndef _TangentHelix_H_
0002 #define _TangentHelix_H_
0003 
0004 #include "RecoTracker/NuclearSeedGenerator/interface/TangentCircle.h"
0005 
0006 class TangentHelix {
0007 public:
0008   TangentHelix() {}
0009 
0010   /// Calculate the helix from 2 points on the circle (the vertex=innerPoint and the outerPoint)
0011   /// and the tangent direction at the inner point
0012   TangentHelix(const GlobalVector& direction, const GlobalPoint& innerPoint, const GlobalPoint& outerPoint)
0013       : theInnerPoint(innerPoint),
0014         theOuterPoint(outerPoint),
0015         theVertexPoint(innerPoint),
0016         theCircle(direction, innerPoint, outerPoint),
0017         theDirectionAtVertex(direction) {}
0018 
0019   /// Calculate Helix from 3 points
0020   TangentHelix(const GlobalPoint& outerPoint, const GlobalPoint& innerPoint, const GlobalPoint& vertexPoint)
0021       : theInnerPoint(innerPoint),
0022         theOuterPoint(outerPoint),
0023         theVertexPoint(vertexPoint),
0024         theCircle(outerPoint, innerPoint, vertexPoint) {
0025     theDirectionAtVertex = GlobalVector(1000, 1000, 1000);
0026   }
0027 
0028   /// Calculate the parameters of the helix which pass by 2 points (innerPoint and outerPoint) and which is tangent to primHelix
0029   TangentHelix(const TangentHelix& primCircle, const GlobalPoint& outerPoint, const GlobalPoint& innerPoint);
0030 
0031   GlobalPoint outerPoint() const { return theOuterPoint; }
0032 
0033   GlobalPoint innerPoint() const { return theInnerPoint; }
0034 
0035   GlobalPoint vertexPoint() const { return theVertexPoint; }
0036 
0037   TangentCircle circle() const { return theCircle; }
0038 
0039   GlobalVector directionAtVertex();
0040 
0041   int charge(float magz) { return theCircle.charge(magz); }
0042 
0043   double rho() const { return theCircle.rho(); }
0044 
0045   double curvatureError() { return theCircle.curvatureError(); }
0046 
0047   double vertexError() { return theCircle.vertexError(); }
0048 
0049 private:
0050   GlobalPoint theInnerPoint;
0051   GlobalPoint theOuterPoint;
0052   GlobalPoint theVertexPoint;
0053 
0054   TangentCircle theCircle;
0055 
0056   GlobalVector theDirectionAtVertex;
0057 };
0058 
0059 #endif