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