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 
19 
20 public:
21 
23 
24  virtual bool calculate(const TrajectoryStateOnSurface & sta,
25  const TrajectoryStateOnSurface & stb);
26 
27  virtual bool calculate(const FreeTrajectoryState & sta,
28  const FreeTrajectoryState & stb);
29 
30  virtual bool status() const {return status_;}
31 
35  virtual std::pair<GlobalPoint, GlobalPoint> points() const;
36 
39  std::pair <GlobalTrajectoryParameters, GlobalTrajectoryParameters >
40  trajectoryParameters () const;
41 
43  virtual GlobalPoint crossingPoint() const;
44 
46  virtual float distance() const;
47 
51  virtual ClosestApproachInRPhi * clone() const {
52  return new ClosestApproachInRPhi(* this);
53  }
54 
55 private:
56 
57  bool compute(const TrackCharge & chargeA,
58  const GlobalVector & momentumA,
59  const GlobalPoint & positionA,
60  const TrackCharge & chargeB,
61  const GlobalVector & momentumB,
62  const GlobalPoint & positionB);
63 
64  // given the old Parameters, and a new GlobalPoint,
65  // we return the full new GlobalTrajectoryParameters at the
66  // Point.
68  newTrajectory( const GlobalPoint & newpt,
69  const GlobalTrajectoryParameters & oldpar, double bz);
70 
71  // Computes center coordinates and unsigned radius of circle;
72  static void circleParameters(const TrackCharge& charge,
73  const GlobalVector& momemtum,
74  const GlobalPoint& position,
75  double& xc, double& yc, double& r,
76  double bz);
77 
78  // Computes crossing points of 2 circles with centres (cx_i, cy_i)
79  // and unsigned radii r_i.
80  // Two cases: - circles have one or two intersection points;
81  // return value = 1;
82  // - circles do not cross; computes point of closest approach
83  // on each circle; return value = 2;
84  // if the calculation fails (e.g. concentric circles), return value = 0;
85 
86  static int transverseCoord(double cxa, double cya, double ra,
87  double cxb, double cyb, double rb,
88  double & xg1, double & yg1,
89  double & xg2, double & yg2);
90 
91  // Computes z-coordinate on helix at given transverse coordinates
92  static double zCoord(const GlobalVector& mom, const GlobalPoint& pos,
93  double r, double xc, double yc, double xg, double yg);
94 
95 
96 private:
99  double bz;
100  bool status_;
101 
102 };
103 
104 #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)
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
double charge(const std::vector< uint8_t > &Ampls)
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
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)
static GlobalTrajectoryParameters newTrajectory(const GlobalPoint &newpt, const GlobalTrajectoryParameters &oldpar, double bz)
virtual float distance() const
virtual bool status() const