CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TangentApproachInRPhi.h
Go to the documentation of this file.
1 #ifndef _TangentApproachInRPhi_H_
2 #define _TangentApproachInRPhi_H_
3 
6 
16 public:
18  status_ = false;
19  intersection_ = false;
20  }
21 
22  bool calculate(const TrajectoryStateOnSurface& sta, const TrajectoryStateOnSurface& stb) override;
23 
24  bool calculate(const FreeTrajectoryState& sta, const FreeTrajectoryState& stb) override;
25 
26  bool status() const override { return status_; }
27 
31  std::pair<GlobalPoint, GlobalPoint> points() const override;
32 
35  std::pair<GlobalTrajectoryParameters, GlobalTrajectoryParameters> trajectoryParameters() const;
36 
38  GlobalPoint crossingPoint() const override;
39 
41  float distance() const override;
42 
44  float perpdist() const;
45 
49  TangentApproachInRPhi* clone() const override { return new TangentApproachInRPhi(*this); }
50 
51 private:
52  bool calculate(const TrackCharge& chargeA,
53  const GlobalVector& momentumA,
54  const GlobalPoint& positionA,
55  const TrackCharge& chargeB,
56  const GlobalVector& momentumB,
57  const GlobalPoint& positionB,
58  const MagneticField& magField);
59 
60  // given the old Parameters, and a new GlobalPoint,
61  // we return the full new GlobalTrajectoryParameters at the
62  // Point.
64  const GlobalTrajectoryParameters& oldpar) const;
65 
66  // Computes center coordinates and unsigned radius of circle;
68  const GlobalVector& momemtum,
69  const GlobalPoint& position,
70  double& xc,
71  double& yc,
72  double& r,
73  const MagneticField& magField) const;
74 
75  // Computes crossing points of 2 circles with centres (cx_i, cy_i)
76  // and unsigned radii r_i.
77  // Two cases: - circles have one or two intersection points;
78  // return value = 1;
79  // - circles do not cross; computes point of closest approach
80  // on each circle; return value = 2;
81  // if the calculation fails (e.g. concentric circles), return value = 0;
82 
83  int transverseCoord(double cxa,
84  double cya,
85  double ra,
86  double cxb,
87  double cyb,
88  double rb,
89  double& xg1,
90  double& yg1,
91  double& xg2,
92  double& yg2) const;
93 
94  // Computes z-coordinate on helix at given transverse coordinates
95  double zCoord(
96  const GlobalVector& mom, const GlobalPoint& pos, double r, double xc, double yc, double xg, double yg) const;
97 
98 private:
99  bool status_;
103 };
104 
105 #endif
TangentApproachInRPhi * clone() const override
std::pair< GlobalTrajectoryParameters, GlobalTrajectoryParameters > trajectoryParameters() const
bool status() const override
const auto & magField
GlobalTrajectoryParameters paramA
double zCoord(const GlobalVector &mom, const GlobalPoint &pos, double r, double xc, double yc, double xg, double yg) const
float distance() const override
int TrackCharge
Definition: TrackCharge.h:4
GlobalTrajectoryParameters paramB
std::pair< GlobalPoint, GlobalPoint > points() const override
int transverseCoord(double cxa, double cya, double ra, double cxb, double cyb, double rb, double &xg1, double &yg1, double &xg2, double &yg2) const
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
static int position[264][3]
Definition: ReadPGInfo.cc:289
void circleParameters(const TrackCharge &charge, const GlobalVector &momemtum, const GlobalPoint &position, double &xc, double &yc, double &r, const MagneticField &magField) const
GlobalPoint crossingPoint() const override