Go to the documentation of this file.00001 #ifndef _TangentApproachInRPhi_H_
00002 #define _TangentApproachInRPhi_H_
00003
00004 #include "TrackingTools/PatternTools/interface/ClosestApproachOnHelices.h"
00005 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00006
00015 class TangentApproachInRPhi : public ClosestApproachOnHelices {
00016
00017 public:
00018
00019 TangentApproachInRPhi() {status_ = false; intersection_ = false;}
00020
00021 virtual bool calculate(const TrajectoryStateOnSurface & sta,
00022 const TrajectoryStateOnSurface & stb);
00023
00024 virtual bool calculate(const FreeTrajectoryState & sta,
00025 const FreeTrajectoryState & stb);
00026
00027 virtual bool status() const {return status_;}
00028
00032 virtual std::pair<GlobalPoint, GlobalPoint> points() const;
00033
00036 std::pair <GlobalTrajectoryParameters, GlobalTrajectoryParameters >
00037 trajectoryParameters () const;
00038
00040 virtual GlobalPoint crossingPoint() const;
00041
00043 virtual float distance() const;
00044
00046 float perpdist() const;
00047
00051 virtual TangentApproachInRPhi * clone() const {
00052 return new TangentApproachInRPhi(* this);
00053 }
00054
00055 private:
00056
00057 bool calculate(const TrackCharge & chargeA,
00058 const GlobalVector & momentumA,
00059 const GlobalPoint & positionA,
00060 const TrackCharge & chargeB,
00061 const GlobalVector & momentumB,
00062 const GlobalPoint & positionB,
00063 const MagneticField& magField);
00064
00065
00066
00067
00068 GlobalTrajectoryParameters trajectoryParameters ( const GlobalPoint & newpt,
00069 const GlobalTrajectoryParameters & oldpar ) const;
00070
00071
00072 void circleParameters(const TrackCharge& charge,
00073 const GlobalVector& momemtum,
00074 const GlobalPoint& position,
00075 double& xc, double& yc, double& r,
00076 const MagneticField& magField) const;
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 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) const;
00090
00091
00092 double zCoord(const GlobalVector& mom, const GlobalPoint& pos,
00093 double r, double xc, double yc, double xg, double yg) const;
00094
00095
00096 private:
00097 bool status_;
00098 GlobalPoint posA, posB;
00099 GlobalTrajectoryParameters paramA, paramB;
00100 bool intersection_;
00101
00102 };
00103
00104 #endif