Go to the documentation of this file.00001 #ifndef _ClosestApproachInRPhi_H_
00002 #define _ClosestApproachInRPhi_H_
00003
00004 #include "TrackingTools/PatternTools/interface/ClosestApproachOnHelices.h"
00005 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00006
00018 class ClosestApproachInRPhi : public ClosestApproachOnHelices {
00019
00020 public:
00021
00022 ClosestApproachInRPhi() {status_ = false;}
00023
00024 virtual bool calculate(const TrajectoryStateOnSurface & sta,
00025 const TrajectoryStateOnSurface & stb);
00026
00027 virtual bool calculate(const FreeTrajectoryState & sta,
00028 const FreeTrajectoryState & stb);
00029
00030 virtual bool status() const {return status_;}
00031
00035 virtual std::pair<GlobalPoint, GlobalPoint> points() const;
00036
00039 std::pair <GlobalTrajectoryParameters, GlobalTrajectoryParameters >
00040 trajectoryParameters () const;
00041
00043 virtual GlobalPoint crossingPoint() const;
00044
00046 virtual float distance() const;
00047
00051 virtual ClosestApproachInRPhi * clone() const {
00052 return new ClosestApproachInRPhi(* this);
00053 }
00054
00055 private:
00056
00057 bool compute(const TrackCharge & chargeA,
00058 const GlobalVector & momentumA,
00059 const GlobalPoint & positionA,
00060 const TrackCharge & chargeB,
00061 const GlobalVector & momentumB,
00062 const GlobalPoint & positionB);
00063
00064
00065
00066
00067 static GlobalTrajectoryParameters
00068 newTrajectory( const GlobalPoint & newpt,
00069 const GlobalTrajectoryParameters & oldpar, double bz);
00070
00071
00072 static void circleParameters(const TrackCharge& charge,
00073 const GlobalVector& momemtum,
00074 const GlobalPoint& position,
00075 double& xc, double& yc, double& r,
00076 double bz);
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 static int transverseCoord(double cxa, double cya, double ra,
00087 double cxb, double cyb, double rb,
00088 double & xg1, double & yg1,
00089 double & xg2, double & yg2);
00090
00091
00092 static double zCoord(const GlobalVector& mom, const GlobalPoint& pos,
00093 double r, double xc, double yc, double xg, double yg);
00094
00095
00096 private:
00097 GlobalPoint posA, posB;
00098 GlobalTrajectoryParameters paramA, paramB;
00099 double bz;
00100 bool status_;
00101
00102 };
00103
00104 #endif