CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TangentApproachInRPhi.h
Go to the documentation of this file.
1 #ifndef _TangentApproachInRPhi_H_
2 #define _TangentApproachInRPhi_H_
3 
6 
16 
17 public:
18 
20 
21  virtual bool calculate(const TrajectoryStateOnSurface & sta,
22  const TrajectoryStateOnSurface & stb);
23 
24  virtual bool calculate(const FreeTrajectoryState & sta,
25  const FreeTrajectoryState & stb);
26 
27  virtual bool status() const {return status_;}
28 
32  virtual std::pair<GlobalPoint, GlobalPoint> points() const;
33 
36  std::pair <GlobalTrajectoryParameters, GlobalTrajectoryParameters >
37  trajectoryParameters () const;
38 
40  virtual GlobalPoint crossingPoint() const;
41 
43  virtual float distance() const;
44 
46  float perpdist() const;
47 
51  virtual TangentApproachInRPhi * clone() const {
52  return new TangentApproachInRPhi(* this);
53  }
54 
55 private:
56 
57  bool calculate(const TrackCharge & chargeA,
58  const GlobalVector & momentumA,
59  const GlobalPoint & positionA,
60  const TrackCharge & chargeB,
61  const GlobalVector & momentumB,
62  const GlobalPoint & positionB,
63  const MagneticField& magField);
64 
65  // given the old Parameters, and a new GlobalPoint,
66  // we return the full new GlobalTrajectoryParameters at the
67  // Point.
69  const GlobalTrajectoryParameters & oldpar ) const;
70 
71  // Computes center coordinates and unsigned radius of circle;
72  void circleParameters(const TrackCharge& charge,
73  const GlobalVector& momemtum,
74  const GlobalPoint& position,
75  double& xc, double& yc, double& r,
76  const MagneticField& magField) const;
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  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) const;
90 
91  // Computes z-coordinate on helix at given transverse coordinates
92  double zCoord(const GlobalVector& mom, const GlobalPoint& pos,
93  double r, double xc, double yc, double xg, double yg) const;
94 
95 
96 private:
97  bool status_;
101 
102 };
103 
104 #endif
virtual std::pair< GlobalPoint, GlobalPoint > points() const
std::pair< GlobalTrajectoryParameters, GlobalTrajectoryParameters > trajectoryParameters() const
GlobalTrajectoryParameters paramA
double zCoord(const GlobalVector &mom, const GlobalPoint &pos, double r, double xc, double yc, double xg, double yg) const
virtual TangentApproachInRPhi * clone() const
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
virtual GlobalPoint crossingPoint() const
int TrackCharge
Definition: TrackCharge.h:4
GlobalTrajectoryParameters paramB
int transverseCoord(double cxa, double cya, double ra, double cxb, double cyb, double rb, double &xg1, double &yg1, double &xg2, double &yg2) const
virtual float distance() const
virtual bool status() const
void circleParameters(const TrackCharge &charge, const GlobalVector &momemtum, const GlobalPoint &position, double &xc, double &yc, double &r, const MagneticField &magField) const
virtual bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb)