File indexing completed on 2024-04-06 12:31:34
0001 #ifndef _TwoTrackMinimumDistance_H_
0002 #define _TwoTrackMinimumDistance_H_
0003
0004 #include "TrackingTools/PatternTools/interface/ClosestApproachOnHelices.h"
0005 #include "TrackingTools/PatternTools/interface/ClosestApproachInRPhi.h"
0006 #include "TrackingTools/PatternTools/interface/TwoTrackMinimumDistanceHelixHelix.h"
0007 #include "TrackingTools/PatternTools/interface/TwoTrackMinimumDistanceLineLine.h"
0008 #include "TrackingTools/PatternTools/interface/TwoTrackMinimumDistanceHelixLine.h"
0009 #include "FWCore/Utilities/interface/Visibility.h"
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 class TwoTrackMinimumDistance final : public ClosestApproachOnHelices {
0021 public:
0022 enum Mode { FastMode = 0, SlowMode = 1 };
0023
0024 TwoTrackMinimumDistance(const Mode m = FastMode) {
0025 theModus = m;
0026 status_ = false;
0027 };
0028 ~TwoTrackMinimumDistance() override {}
0029
0030 bool calculate(const TrajectoryStateOnSurface& sta, const TrajectoryStateOnSurface& stb) override;
0031
0032 bool calculate(const FreeTrajectoryState& sta, const FreeTrajectoryState& stb) override;
0033
0034 virtual bool calculate(const GlobalTrajectoryParameters& sta, const GlobalTrajectoryParameters& stb);
0035
0036 bool status() const override { return status_; }
0037
0038
0039
0040
0041
0042 std::pair<GlobalPoint, GlobalPoint> points() const override;
0043
0044
0045 GlobalPoint crossingPoint() const override;
0046
0047
0048 float distance() const override;
0049
0050
0051
0052
0053 TwoTrackMinimumDistance* clone() const override { return new TwoTrackMinimumDistance(*this); }
0054
0055 double firstAngle() const;
0056 double secondAngle() const;
0057 std::pair<double, double> pathLength() const;
0058
0059 private:
0060 enum Charge { hh, hl, ll };
0061 Mode theModus;
0062 Charge theCharge;
0063 ClosestApproachInRPhi theIniAlgo;
0064 TwoTrackMinimumDistanceHelixHelix theTTMDhh;
0065 TwoTrackMinimumDistanceLineLine theTTMDll;
0066 TwoTrackMinimumDistanceHelixLine theTTMDhl;
0067 bool status_;
0068 std::pair<GlobalPoint, GlobalPoint> points_;
0069
0070 bool pointsLineLine(const GlobalTrajectoryParameters& sta, const GlobalTrajectoryParameters& stb) dso_internal;
0071 bool pointsHelixLine(const GlobalTrajectoryParameters& sta, const GlobalTrajectoryParameters& stb) dso_internal;
0072 bool pointsHelixHelix(const GlobalTrajectoryParameters& sta, const GlobalTrajectoryParameters& stb) dso_internal;
0073 };
0074
0075 #endif