Class AMatch

java.lang.Object
org.jlab.clas.detector.matching.AMatch
All Implemented Interfaces:
Comparator<javafx.util.Pair<DetectorParticle,DetectorResponse>>, IMatch
Direct Known Subclasses:
MatchCND, MatchDOCA, MatchPOCA, MatchThetaPhi, MatchTrajDistance

public abstract class AMatch extends Object implements IMatch
Author:
baltzell
  • Constructor Details

    • AMatch

      public AMatch()
  • Method Details

    • setSharing

      public final void setSharing(boolean sharing)
    • getSharing

      public final boolean getSharing()
    • getDeltaPhi

      public static double getDeltaPhi(double phi1, double phi2)
    • getDeltaPhi

      public static double getDeltaPhi(org.jlab.geom.prim.Point3D p1, org.jlab.geom.prim.Point3D p2)
    • firstMatch

      public final int firstMatch(DetectorParticle p, List<DetectorResponse> r, org.jlab.detector.base.DetectorType t, int l)
      Find the first matching response in the given list for the given particle.
      Specified by:
      firstMatch in interface IMatch
      Parameters:
      p - the particle
      r - the list of responses
      t - the requested detector type to consider
      l - the requested detector layer to consider
      Returns:
      the index of the resulting match, else negative
    • firstMatch

      public final int firstMatch(DetectorParticle p, List<DetectorResponse> r, org.jlab.detector.base.DetectorType t)
      Find the first matching response in the given list for the given particle.
      Specified by:
      firstMatch in interface IMatch
      Parameters:
      p - the particle
      r - the list of responses
      t - the requested detector type to consider
      Returns:
      the index of the resulting match, else negative
    • bestMatch

      public final int bestMatch(DetectorParticle p, List<DetectorResponse> r, org.jlab.detector.base.DetectorType t, int l)
      Find the best matching response in the given list for the given particle.
      Specified by:
      bestMatch in interface IMatch
      Parameters:
      p - the particle
      r - the list of responses
      t - the requested detector type to consider
      l - the requested detector layer to consider
      Returns:
      the index of the resulting match, else negative
    • bestMatch

      public final int bestMatch(DetectorParticle p, List<DetectorResponse> r, org.jlab.detector.base.DetectorType t)
      Find the best matching response in the given list for the given particle.
      Specified by:
      bestMatch in interface IMatch
      Parameters:
      p - the particle
      r - the list of responses
      t - the requested detector type to consider
      Returns:
      the index of the resulting match, else negative
    • compare

      public int compare(javafx.util.Pair<DetectorParticle,DetectorResponse> a, javafx.util.Pair<DetectorParticle,DetectorResponse> b)
      Compare the quality of two particle-response pairs.
      Specified by:
      compare in interface Comparator<javafx.util.Pair<DetectorParticle,DetectorResponse>>
      Parameters:
      a -
      b -
      Returns: