CMS 3D CMS Logo

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 } // namespace test
24 
27 
28 public:
29  ClosestApproachInRPhi() { status_ = false; }
30  ~ClosestApproachInRPhi() override {}
31 
32  bool calculate(const TrajectoryStateOnSurface& sta, const TrajectoryStateOnSurface& stb) override;
33 
34  bool calculate(const FreeTrajectoryState& sta, const FreeTrajectoryState& stb) override;
35 
36  bool status() const override { return status_; }
37 
41  std::pair<GlobalPoint, GlobalPoint> points() const override;
42 
45  std::pair<GlobalTrajectoryParameters, GlobalTrajectoryParameters> trajectoryParameters() const;
46 
48  GlobalPoint crossingPoint() const override;
49 
51  float distance() const override;
52 
56  ClosestApproachInRPhi* clone() const override { return new ClosestApproachInRPhi(*this); }
57 
58 private:
59  bool compute(const TrackCharge& chargeA,
60  const GlobalVector& momentumA,
61  const GlobalPoint& positionA,
62  const TrackCharge& chargeB,
63  const GlobalVector& momentumB,
64  const GlobalPoint& positionB) dso_internal;
65 
66  // given the old Parameters, and a new GlobalPoint,
67  // we return the full new GlobalTrajectoryParameters at the
68  // Point.
69  static GlobalTrajectoryParameters newTrajectory(const GlobalPoint& newpt,
70  const GlobalTrajectoryParameters& oldpar,
71  double bz) dso_internal;
72 
73  // Computes center coordinates and unsigned radius of circle;
74  static void circleParameters(const TrackCharge& charge,
75  const GlobalVector& momemtum,
76  const GlobalPoint& position,
77  double& xc,
78  double& yc,
79  double& r,
80  double bz) dso_internal;
81 
82  // Computes crossing points of 2 circles with centres (cx_i, cy_i)
83  // and unsigned radii r_i.
84  // Two cases: - circles have one or two intersection points;
85  // return value = 1;
86  // - circles do not cross; computes point of closest approach
87  // on each circle; return value = 2;
88  // if the calculation fails (e.g. concentric circles), return value = 0;
89 
90  static int transverseCoord(double cxa,
91  double cya,
92  double ra,
93  double cxb,
94  double cyb,
95  double rb,
96  double& xg1,
97  double& yg1,
98  double& xg2,
99  double& yg2) dso_internal;
100 
101  // Computes z-coordinate on helix at given transverse coordinates
102  static double zCoord(const GlobalVector& mom,
103  const GlobalPoint& pos,
104  double r,
105  double xc,
106  double yc,
107  double xg,
108  double yg) dso_internal;
109 
110 private:
113  double bz;
114  bool status_;
115 };
116 
117 #endif
GlobalTrajectoryParameters paramB
int TrackCharge
Definition: TrackCharge.h:4
bool status() const override
#define dso_internal
Definition: Visibility.h:13
def compute(min, max)
ClosestApproachInRPhi * clone() const override
static int position[264][3]
Definition: ReadPGInfo.cc:289