CMS 3D CMS Logo

ClosestApproachInRPhi.h
Go to the documentation of this file.
1 #ifndef _ClosestApproachInRPhi_H_
2 #define _ClosestApproachInRPhi_H_
3 
7 
19 // Function for testing ClosestApproachInRPhi
20 namespace test {
21  namespace ClosestApproachInRPhi_t {
22  int test();
23  }
24 } // namespace test
25 
28 
29 public:
31  ~ClosestApproachInRPhi() override {}
32 
33  bool calculate(const TrajectoryStateOnSurface& sta, const TrajectoryStateOnSurface& stb) override;
34 
35  bool calculate(const FreeTrajectoryState& sta, const FreeTrajectoryState& stb) override;
36 
37  bool status() const override { return status_; }
38 
42  std::pair<GlobalPoint, GlobalPoint> points() const override;
43 
46  std::pair<GlobalTrajectoryParameters, GlobalTrajectoryParameters> trajectoryParameters() const;
47 
49  GlobalPoint crossingPoint() const override;
50 
52  float distance() const override;
53 
57  ClosestApproachInRPhi* clone() const override { return new ClosestApproachInRPhi(*this); }
58 
59 private:
60  bool compute(const TrackCharge& chargeA,
61  const GlobalVector& momentumA,
62  const GlobalPoint& positionA,
63  const TrackCharge& chargeB,
64  const GlobalVector& momentumB,
65  const GlobalPoint& positionB) dso_internal;
66 
67  // given the old Parameters, and a new GlobalPoint,
68  // we return the full new GlobalTrajectoryParameters at the
69  // Point.
71  const GlobalTrajectoryParameters& oldpar,
72  double bz) dso_internal;
73 
74  // Computes center coordinates and unsigned radius of circle;
75  static void circleParameters(const TrackCharge& charge,
76  const GlobalVector& momemtum,
77  const GlobalPoint& position,
78  double& xc,
79  double& yc,
80  double& r,
81  double bz) dso_internal;
82 
83  // Computes crossing points of 2 circles with centres (cx_i, cy_i)
84  // and unsigned radii r_i.
85  // Two cases: - circles have one or two intersection points;
86  // return value = 1;
87  // - circles do not cross; computes point of closest approach
88  // on each circle; return value = 2;
89  // if the calculation fails (e.g. concentric circles), return value = 0;
90 
91  static int transverseCoord(double cxa,
92  double cya,
93  double ra,
94  double cxb,
95  double cyb,
96  double rb,
97  double& xg1,
98  double& yg1,
99  double& xg2,
100  double& yg2) dso_internal;
101 
102  // Computes z-coordinate on helix at given transverse coordinates
103  static double zCoord(const GlobalVector& mom,
104  const GlobalPoint& pos,
105  double r,
106  double xc,
107  double yc,
108  double xg,
109  double yg) dso_internal;
110 
111 private:
114  double bz;
115  bool status_;
116 };
117 
118 #endif
Vector3DBase
Definition: Vector3DBase.h:8
Visibility.h
FreeTrajectoryState.h
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
ClosestApproachInRPhi::~ClosestApproachInRPhi
~ClosestApproachInRPhi() override
Definition: ClosestApproachInRPhi.h:31
test::ClosestApproachInRPhi_t::test
int test()
ClosestApproachInRPhi::status
bool status() const override
Definition: ClosestApproachInRPhi.h:37
ClosestApproachInRPhi::circleParameters
static void circleParameters(const TrackCharge &charge, const GlobalVector &momemtum, const GlobalPoint &position, double &xc, double &yc, double &r, double bz)
Definition: ClosestApproachInRPhi.cc:169
ClosestApproachInRPhi::transverseCoord
static int transverseCoord(double cxa, double cya, double ra, double cxb, double cyb, double rb, double &xg1, double &yg1, double &xg2, double &yg2)
Definition: ClosestApproachInRPhi.cc:197
pos
Definition: PixelAliasList.h:18
ClosestApproachInRPhi::compute
bool compute(const TrackCharge &chargeA, const GlobalVector &momentumA, const GlobalPoint &positionA, const TrackCharge &chargeB, const GlobalVector &momentumB, const GlobalPoint &positionB)
Definition: ClosestApproachInRPhi.cc:62
ClosestApproachInRPhi::ClosestApproachInRPhi
ClosestApproachInRPhi()
Definition: ClosestApproachInRPhi.h:30
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
test
Definition: SmallWORMDict.h:13
ClosestApproachOnHelices
Definition: ClosestApproachOnHelices.h:20
ClosestApproachInRPhi::calculate
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
Definition: ClosestApproachInRPhi.cc:8
ClosestApproachInRPhi
Definition: ClosestApproachInRPhi.h:26
ClosestApproachInRPhi::status_
bool status_
Definition: ClosestApproachInRPhi.h:115
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
Point3DBase< float, GlobalTag >
ClosestApproachInRPhi::paramB
GlobalTrajectoryParameters paramB
Definition: ClosestApproachInRPhi.h:113
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
ClosestApproachInRPhi::zCoord
static double zCoord(const GlobalVector &mom, const GlobalPoint &pos, double r, double xc, double yc, double xg, double yg)
Definition: ClosestApproachInRPhi.cc:276
ClosestApproachInRPhi::bz
double bz
Definition: ClosestApproachInRPhi.h:114
ClosestApproachInRPhi::points
std::pair< GlobalPoint, GlobalPoint > points() const override
Definition: ClosestApproachInRPhi.cc:38
dso_internal
#define dso_internal
Definition: Visibility.h:13
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
ClosestApproachInRPhi::clone
ClosestApproachInRPhi * clone() const override
Definition: ClosestApproachInRPhi.h:57
ClosestApproachInRPhi::crossingPoint
GlobalPoint crossingPoint() const override
Definition: ClosestApproachInRPhi.cc:46
ClosestApproachInRPhi::newTrajectory
static GlobalTrajectoryParameters newTrajectory(const GlobalPoint &newpt, const GlobalTrajectoryParameters &oldpar, double bz)
Definition: ClosestApproachInRPhi.cc:131
ClosestApproachInRPhi::paramA
GlobalTrajectoryParameters paramA
Definition: ClosestApproachInRPhi.h:113
alignCSCRings.r
r
Definition: alignCSCRings.py:93
ClosestApproachInRPhi::trajectoryParameters
std::pair< GlobalTrajectoryParameters, GlobalTrajectoryParameters > trajectoryParameters() const
Definition: ClosestApproachInRPhi.cc:121
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
ClosestApproachInRPhi::posB
GlobalPoint posB
Definition: ClosestApproachInRPhi.h:112
ClosestApproachInRPhi::posA
GlobalPoint posA
Definition: ClosestApproachInRPhi.h:112
ClosestApproachOnHelices.h
ClosestApproachInRPhi::distance
float distance() const override
Definition: ClosestApproachInRPhi.cc:54