File indexing completed on 2023-03-17 11:26:29
0001 #ifndef _ClosestApproachInRPhi_H_
0002 #define _ClosestApproachInRPhi_H_
0003
0004 #include "TrackingTools/PatternTools/interface/ClosestApproachOnHelices.h"
0005 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0006 #include "FWCore/Utilities/interface/Visibility.h"
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 namespace test {
0021 namespace ClosestApproachInRPhi_t {
0022 int test();
0023 }
0024 }
0025
0026 class ClosestApproachInRPhi final : public ClosestApproachOnHelices {
0027 friend int test::ClosestApproachInRPhi_t::test();
0028
0029 public:
0030 ClosestApproachInRPhi() { status_ = false; }
0031 ~ClosestApproachInRPhi() override {}
0032
0033 bool calculate(const TrajectoryStateOnSurface& sta, const TrajectoryStateOnSurface& stb) override;
0034
0035 bool calculate(const FreeTrajectoryState& sta, const FreeTrajectoryState& stb) override;
0036
0037 bool status() const override { return status_; }
0038
0039
0040
0041
0042 std::pair<GlobalPoint, GlobalPoint> points() const override;
0043
0044
0045
0046 std::pair<GlobalTrajectoryParameters, GlobalTrajectoryParameters> trajectoryParameters() const;
0047
0048
0049 GlobalPoint crossingPoint() const override;
0050
0051
0052 float distance() const override;
0053
0054
0055
0056
0057 ClosestApproachInRPhi* clone() const override { return new ClosestApproachInRPhi(*this); }
0058
0059 private:
0060 bool compute(const TrackCharge& chargeA,
0061 const GlobalVector& momentumA,
0062 const GlobalPoint& positionA,
0063 const TrackCharge& chargeB,
0064 const GlobalVector& momentumB,
0065 const GlobalPoint& positionB) dso_internal;
0066
0067
0068
0069
0070 static GlobalTrajectoryParameters newTrajectory(const GlobalPoint& newpt,
0071 const GlobalTrajectoryParameters& oldpar,
0072 double bz) dso_internal;
0073
0074
0075 static void circleParameters(const TrackCharge& charge,
0076 const GlobalVector& momemtum,
0077 const GlobalPoint& position,
0078 double& xc,
0079 double& yc,
0080 double& r,
0081 double bz) dso_internal;
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 static int transverseCoord(double cxa,
0092 double cya,
0093 double ra,
0094 double cxb,
0095 double cyb,
0096 double rb,
0097 double& xg1,
0098 double& yg1,
0099 double& xg2,
0100 double& yg2) dso_internal;
0101
0102
0103 static double zCoord(const GlobalVector& mom,
0104 const GlobalPoint& pos,
0105 double r,
0106 double xc,
0107 double yc,
0108 double xg,
0109 double yg) dso_internal;
0110
0111 private:
0112 GlobalPoint posA, posB;
0113 GlobalTrajectoryParameters paramA, paramB;
0114 double bz;
0115 bool status_;
0116 };
0117
0118 #endif