CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/RecoTracker/NuclearSeedGenerator/interface/TangentCircle.h

Go to the documentation of this file.
00001 #ifndef _TangentCircle_H_
00002 #define _TangentCircle_H_
00003 
00004 #include "RecoTracker/TkSeedGenerator/interface/FastCircle.h"
00005 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00006 
00007 class TangentCircle
00008 {
00009 //   TODO : for speed-up :
00010 //   typedef Point2DBase< float, GlobalTag>     Global2DPoint;
00011 //   typedef Vector2DBase< float, GlobalTag>    Global2DVector;
00012 
00013  public :
00014      TangentCircle() :
00015         theInnerPoint(), theOuterPoint(), theVertexPoint(), theDirectionAtVertex(),
00016         theX0(0), theY0(0), theRho(0), theVertexError(0), 
00017         valid(false), theCharge(0) {}
00018 
00021      TangentCircle(const GlobalVector& direction, const GlobalPoint& innerPoint, const GlobalPoint& outerPoint); 
00022 
00024      TangentCircle(const GlobalPoint& outerPoint, const GlobalPoint& innerPoint, const GlobalPoint& vertexPoint); 
00025 
00027      TangentCircle(const TangentCircle& primCircle, const GlobalPoint& outerPoint, const GlobalPoint& innerPoint);
00028 
00030      GlobalVector directionAtVertex();
00031 
00032      double x0() const {return theX0;}
00033    
00034      double y0() const {return theY0;}
00035  
00036      double rho() const {return theRho;}
00037 
00038      GlobalPoint outerPoint() const { return theOuterPoint; }
00039 
00040      GlobalPoint innerPoint() const { return theInnerPoint; }
00041 
00042      GlobalPoint vertexPoint() const { return theVertexPoint; }
00043 
00044      double vertexError() const { return theVertexError; }
00045 
00046      double curvatureError();
00047 
00048      int charge(float magz);
00049 
00050      bool isValid() const { return isValid(); } 
00051 
00052  private :
00053      GlobalPoint theInnerPoint;
00054      GlobalPoint theOuterPoint;
00055      GlobalPoint theVertexPoint;
00056 
00057      GlobalVector theDirectionAtVertex;
00058      
00059      double theX0;  
00060      double theY0;  
00061      double theRho; 
00063      double theVertexError;  
00065      bool valid;
00066      int theCharge;
00067 
00068      double isTangent(const TangentCircle& primCircle, const TangentCircle& secCircle) const;
00069      GlobalPoint getPosition(const TangentCircle& circle, const GlobalPoint& initalPosition, double theta, int direction) const;
00070      int chargeLocally(float magz, GlobalVector v) const;
00071      GlobalVector direction(const GlobalPoint& point) const;
00072 
00073 };
00074 
00075 #endif