CMS 3D CMS Logo

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
Vector3DBase
Definition: Vector3DBase.h:8
TangentApproachInRPhi::posB
GlobalPoint posB
Definition: TangentApproachInRPhi.h:100
FreeTrajectoryState.h
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
TangentApproachInRPhi::status
bool status() const override
Definition: TangentApproachInRPhi.h:26
TangentApproachInRPhi::distance
float distance() const override
Definition: TangentApproachInRPhi.cc:50
pos
Definition: PixelAliasList.h:18
TangentApproachInRPhi::perpdist
float perpdist() const
Definition: TangentApproachInRPhi.cc:58
TangentApproachInRPhi::points
std::pair< GlobalPoint, GlobalPoint > points() const override
Definition: TangentApproachInRPhi.cc:34
TangentApproachInRPhi::status_
bool status_
Definition: TangentApproachInRPhi.h:99
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
TangentApproachInRPhi::paramA
GlobalTrajectoryParameters paramA
Definition: TangentApproachInRPhi.h:101
TangentApproachInRPhi::paramB
GlobalTrajectoryParameters paramB
Definition: TangentApproachInRPhi.h:101
ClosestApproachOnHelices
Definition: ClosestApproachOnHelices.h:20
TangentApproachInRPhi::crossingPoint
GlobalPoint crossingPoint() const override
Definition: TangentApproachInRPhi.cc:42
TangentApproachInRPhi::zCoord
double zCoord(const GlobalVector &mom, const GlobalPoint &pos, double r, double xc, double yc, double xg, double yg) const
Definition: TangentApproachInRPhi.cc:261
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
Point3DBase< float, GlobalTag >
TangentApproachInRPhi::posA
GlobalPoint posA
Definition: TangentApproachInRPhi.h:100
TangentApproachInRPhi::trajectoryParameters
std::pair< GlobalTrajectoryParameters, GlobalTrajectoryParameters > trajectoryParameters() const
Definition: TangentApproachInRPhi.cc:116
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
TangentApproachInRPhi::calculate
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
Definition: TangentApproachInRPhi.cc:7
TangentApproachInRPhi
Definition: TangentApproachInRPhi.h:15
alignCSCRings.r
r
Definition: alignCSCRings.py:93
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
TangentApproachInRPhi::circleParameters
void circleParameters(const TrackCharge &charge, const GlobalVector &momemtum, const GlobalPoint &position, double &xc, double &yc, double &r, const MagneticField &magField) const
Definition: TangentApproachInRPhi.cc:151
TangentApproachInRPhi::clone
TangentApproachInRPhi * clone() const override
Definition: TangentApproachInRPhi.h:49
TangentApproachInRPhi::TangentApproachInRPhi
TangentApproachInRPhi()
Definition: TangentApproachInRPhi.h:17
TangentApproachInRPhi::intersection_
bool intersection_
Definition: TangentApproachInRPhi.h:102
ClosestApproachOnHelices.h
MagneticField
Definition: MagneticField.h:19
TangentApproachInRPhi::transverseCoord
int transverseCoord(double cxa, double cya, double ra, double cxb, double cyb, double rb, double &xg1, double &yg1, double &xg2, double &yg2) const
Definition: TangentApproachInRPhi.cc:177