CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ClosestApproachInRPhi.h
Go to the documentation of this file.
1 #ifndef _ClosestApproachInRPhi_H_
2 #define _ClosestApproachInRPhi_H_
3 
6 
18 // Function for testing ClosestApproachInRPhi
19 namespace test {
20  namespace ClosestApproachInRPhi_t {
21  int test();
22  }
23 }
24 
27 
28 public:
29 
32 
33  virtual bool calculate(const TrajectoryStateOnSurface & sta,
34  const TrajectoryStateOnSurface & stb);
35 
36  virtual bool calculate(const FreeTrajectoryState & sta,
37  const FreeTrajectoryState & stb);
38 
39  virtual bool status() const {return status_;}
40 
44  virtual std::pair<GlobalPoint, GlobalPoint> points() const;
45 
48  std::pair <GlobalTrajectoryParameters, GlobalTrajectoryParameters >
49  trajectoryParameters () const;
50 
52  virtual GlobalPoint crossingPoint() const;
53 
55  virtual float distance() const;
56 
60  virtual ClosestApproachInRPhi * clone() const {
61  return new ClosestApproachInRPhi(* this);
62  }
63 
64 private:
65 
66  bool compute(const TrackCharge & chargeA,
67  const GlobalVector & momentumA,
68  const GlobalPoint & positionA,
69  const TrackCharge & chargeB,
70  const GlobalVector & momentumB,
71  const GlobalPoint & positionB) dso_internal;
72 
73  // given the old Parameters, and a new GlobalPoint,
74  // we return the full new GlobalTrajectoryParameters at the
75  // Point.
77  newTrajectory( const GlobalPoint & newpt,
78  const GlobalTrajectoryParameters & oldpar, double bz) dso_internal;
79 
80  // Computes center coordinates and unsigned radius of circle;
81  static void circleParameters(const TrackCharge& charge,
82  const GlobalVector& momemtum,
83  const GlobalPoint& position,
84  double& xc, double& yc, double& r,
85  double bz) dso_internal;
86 
87  // Computes crossing points of 2 circles with centres (cx_i, cy_i)
88  // and unsigned radii r_i.
89  // Two cases: - circles have one or two intersection points;
90  // return value = 1;
91  // - circles do not cross; computes point of closest approach
92  // on each circle; return value = 2;
93  // if the calculation fails (e.g. concentric circles), return value = 0;
94 
95  static int transverseCoord(double cxa, double cya, double ra,
96  double cxb, double cyb, double rb,
97  double & xg1, double & yg1,
98  double & xg2, double & yg2) dso_internal;
99 
100  // Computes z-coordinate on helix at given transverse coordinates
101  static double zCoord(const GlobalVector& mom, const GlobalPoint& pos,
102  double r, double xc, double yc, double xg, double yg) dso_internal;
103 
104 
105 private:
108  double bz;
109  bool status_;
110 
111 };
112 
113 #endif
std::pair< GlobalTrajectoryParameters, GlobalTrajectoryParameters > trajectoryParameters() const
static int transverseCoord(double cxa, double cya, double ra, double cxb, double cyb, double rb, double &xg1, double &yg1, double &xg2, double &yg2)
#define GCC11_FINAL
virtual ClosestApproachInRPhi * clone() const
static void circleParameters(const TrackCharge &charge, const GlobalVector &momemtum, const GlobalPoint &position, double &xc, double &yc, double &r, double bz)
GlobalTrajectoryParameters paramB
virtual GlobalPoint crossingPoint() const
GlobalTrajectoryParameters paramA
bool compute(const TrackCharge &chargeA, const GlobalVector &momentumA, const GlobalPoint &positionA, const TrackCharge &chargeB, const GlobalVector &momentumB, const GlobalPoint &positionB)
int TrackCharge
Definition: TrackCharge.h:4
virtual std::pair< GlobalPoint, GlobalPoint > points() const
static double zCoord(const GlobalVector &mom, const GlobalPoint &pos, double r, double xc, double yc, double xg, double yg)
virtual bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb)
#define dso_internal
static GlobalTrajectoryParameters newTrajectory(const GlobalPoint &newpt, const GlobalTrajectoryParameters &oldpar, double bz)
static int position[264][3]
Definition: ReadPGInfo.cc:509
virtual float distance() const
virtual bool status() const