Class FittedHit

java.lang.Object
org.jlab.rec.dc.hit.Hit
org.jlab.rec.dc.hit.FittedHit
All Implemented Interfaces:
Comparable<Hit>

public class FittedHit extends Hit implements Comparable<Hit>
A hit that was used in a fitted cluster. It extends the Hit class and contains local and sector coordinate information at the MidPlane. An estimate for the Left-right Ambiguity is assigned based on the linear fit to the wire position residual.
Author:
ziegler
  • Field Details

    • _lr

      public int _lr
    • RemoveFlag

      public boolean RemoveFlag
    • betaFlag

      public int betaFlag
  • Constructor Details

    • FittedHit

      public FittedHit(int sector, int superlayer, int layer, int wire, int TDC, int jitter, int id)
      Parameters:
      sector - (1...6)
      superlayer - (1...6)
      layer - (1...6)
      wire - (1...112)
      TDC -
      id -
  • Method Details

    • getB

      public double getB()
      Returns:
      B at location along wire
    • setB

      public void setB(double _B)
      Parameters:
      _B - B field intensity in T
    • get_Id

      public int get_Id()
      Overrides:
      get_Id in class Hit
      Returns:
      the ID
    • set_Id

      public void set_Id(int _Id)
      Sets the hit ID. The ID corresponds to the hit index in the EvIO column.
      Overrides:
      set_Id in class Hit
      Parameters:
      _Id -
    • get_Doca

      public double get_Doca()
      Returns:
      calc doca in cm
    • set_Doca

      public void set_Doca(double _Doca)
      Parameters:
      _Doca - doca in cm
    • get_lX

      public double get_lX()
      Returns:
      the local hit x-position in the local superlayer coordinate system; used in cluster-finding algo. to fit the hit-based wire positions
    • set_lX

      public final void set_lX(double layerValue)
      Parameters:
      layerValue - layer number from 1 to 6
    • get_lY

      public double get_lY()
      Returns:
      the local hit y-position in the local superlayer coordinate system; used in cluster-finding algo. to fit the hit-based wire positions
    • set_lY

      public final void set_lY(int layer, int wire)
      Parameters:
      layer - layer number from 1 to 6
      wire - wire number from 1 to 112 sets the center of the cell as a function of wire number in the local superlayer coordinate system.
    • get_PosErr

      public double get_PosErr(DataEvent event, double B, IndexedTable constants0, IndexedTable constants1, TimeToDistanceEstimator tde)
      Parameters:
      event -
      B -
      constants0 -
      constants1 -
      tde -
      Returns:
      The approximate uncertainty on the hit position using the inverse of the gemc smearing function
    • get_TimeResidual

      public double get_TimeResidual()
      Returns:
      the time residual |trkDoca| - |Doca| from the fit to the wire positions in the superlayer
    • set_TimeResidual

      public void set_TimeResidual(double _TimeResidual)
      Parameters:
      _TimeResidual - the residual |fit| - |y| from the fit to the hit positions in the superlayer
    • get_Residual

      public double get_Residual()
      Returns:
      the residual from the fit to the wire positions in the superlayer
    • set_Residual

      public void set_Residual(double _Residual)
      Parameters:
      _Residual - the residual from the fit to the hit positions in the superlayer
    • get_LeftRightAmb

      public int get_LeftRightAmb()
      Returns:
      an integer representative of the estimate of the left-right ambiguity obtained from pattern recognition. -1(+1): the track went to the left(right) of the wire; 0: the left-right ambiguity could not be resolved.
    • set_LeftRightAmb

      public void set_LeftRightAmb(int leftRightAmb)
      Parameters:
      leftRightAmb - an integer representative of the estimate of the left-right ambiguity obtained from pattern recognition. -1(+1): the track went to the left(right) of the wire; 0: the left-right ambiguity could not be resolved.
    • get_QualityFac

      public int get_QualityFac()
      Returns:
      a quality factor representative of the quality of the fit to the hit
    • set_QualityFac

      public void set_QualityFac(int _QualityFac)
      Parameters:
      _QualityFac - is a quality factor representative of the quality of the fit to the hit
    • get_TrkgStatus

      public int get_TrkgStatus()
      Returns:
      an integer representative of the stage of the pattern recognition and subsequent KF fit for that hit. -1: the hit has not yet been fit and is the input of hit-based tracking; 0: the hit has been successfully involved in hit-based tracking and has a well-defined time-to-distance value; 1: the hit has been successfully involved in track fitting.
    • set_TrkgStatus

      public void set_TrkgStatus(int trkgStatus)
      Parameters:
      trkgStatus - is an integer representative of the stage of the pattern recognition and subsequent KF fit for that hit. -1: the hit has not yet been fit and is the input of hit-based tracking; 0: the hit has been successfully involved in hit-based tracking and has a well-defined time-to-distance value; 1: the hit has been successfully involved in track fitting.
    • get_TimeToDistance

      public double get_TimeToDistance()
      Returns:
      the calculated distance (in cm) from the time (in ns)
    • getAssociatedStateVec

      public StateVec getAssociatedStateVec()
      Returns:
      state vector associated with the hit
    • setAssociatedStateVec

      public void setAssociatedStateVec(StateVec _AssociatedStateVec)
      Parameters:
      _AssociatedStateVec - state vector (x,y,tx,ty,q/p) associated with the hit
    • set_TimeToDistance

      public void set_TimeToDistance(DataEvent event, double trkAngle, double B, IndexedTable tab, TimeToDistanceEstimator tde)
      sets the calculated distance (in cm) from the time (in ns)
      Parameters:
      event -
      trkAngle -
      B -
      tab -
      tde -
    • getCorrectedTime

      public double getCorrectedTime(double t, double dbt)
    • calcDeltaDocaBeta

      public double calcDeltaDocaBeta(double doca, IndexedTable tab, double beta)
    • calcDeltaTimeBetaTFCN

      public double calcDeltaTimeBetaTFCN(double t, IndexedTable tab, double beta)
    • get_ClusFitDoca

      public double get_ClusFitDoca()
      Returns:
      doca to cluster fit line (cm)
    • set_ClusFitDoca

      public void set_ClusFitDoca(double _ClusFitDoca)
      Parameters:
      _ClusFitDoca - doca to cluster fit line (cm)
    • get_TrkFitDoca

      public double get_TrkFitDoca()
      Returns:
      doca to track trajectory at hit layer plane (cm)
    • set_TrkFitDoca

      public void set_TrkFitDoca(double _TrkFitDoca)
      Parameters:
      _TrkFitDoca - doca to track trajectory at hit layer plane (cm)
    • fix_TimeToDistance

      public void fix_TimeToDistance(double cellSize)
      Parameters:
      cellSize - the cell size in cm
    • get_X

      public double get_X()
      Returns:
      the hit x-position at the mid-plane (y=0) in the tilted sector coordinate system
    • set_X

      public void set_X(double _X)
      Parameters:
      _X - is the hit x-position at the mid-plane (y=0) in the tilted sector coordinate system
    • get_XWire

      public double get_XWire()
    • set_XWire

      public void set_XWire(double _XMP)
    • get_Z

      public double get_Z()
      Returns:
      the hit z-position at the mid-plane (y=0) in the tilted sector coordinate system
    • set_Z

      public void set_Z(double _Z)
      Parameters:
      _Z - is the hit z-position at the mid-plane (y=0) in the tilted sector coordinate system
    • updateHitPosition

      public void updateHitPosition(DCGeant4Factory DcDetector)
      A method to update the hit position information after the fit to the local coord.sys.wire positions
      Parameters:
      DcDetector -
    • updateHitPositionWithTime

      public void updateHitPositionWithTime(DataEvent event, double trkAngle, double B, IndexedTable tab, DCGeant4Factory DcDetector, TimeToDistanceEstimator tde)
      A method to update the hit position information after the fit to the wire positions employing hit-based tracking algorithms has been performed.
      Parameters:
      event -
      trkAngle -
      B -
      tab -
      DcDetector -
      tde -
    • corrForMidPlaneProjection

      public double corrForMidPlaneProjection(double trkAngle, Line3D wireLine, FittedHit hit)
    • get_WireLength

      public double get_WireLength()
    • set_WireLength

      public void set_WireLength(double _WireLength)
    • get_WireMaxSag

      public double get_WireMaxSag()
    • set_WireMaxSag

      public void set_WireMaxSag(double _WireMaxSag)
    • get_WireLine

      public Line3D get_WireLine()
    • set_WireLine

      public void set_WireLine(Line3D _WireLine)
    • get_TrkResid

      public double get_TrkResid()
    • set_TrkResid

      public void set_TrkResid(double _TrkResid)
    • calc_GeomCorr

      public void calc_GeomCorr(DCGeant4Factory DcDetector, double y)
    • isSameAs

      public boolean isSameAs(FittedHit otherHit)
      Parameters:
      otherHit -
      Returns:
      a boolean comparing 2 hits based on basic descriptors; returns true if the hits are the same
    • compareTo

      public int compareTo(FittedHit arg0)
      Parameters:
      arg0 - the other hit
      Returns:
      an int used to sort a collection of hits by layer number
    • printInfo

      public String printInfo()
      Overrides:
      printInfo in class Hit
      Returns:
      string with hit output
    • get_AssociatedClusterID

      public int get_AssociatedClusterID()
      Returns:
      cluster ID associated with the hit
    • set_AssociatedClusterID

      public void set_AssociatedClusterID(int _AssociatedClusterID)
      Parameters:
      _AssociatedClusterID - associated cluster ID
    • set_AssociatedHBTrackID

      public void set_AssociatedHBTrackID(int _id)
      Parameters:
      _id - associated track id for Hit-Based tracking
    • get_AssociatedHBTrackID

      public int get_AssociatedHBTrackID()
      Returns:
      track id associated with the hit for Hit-Based tracking
    • set_AssociatedTBTrackID

      public void set_AssociatedTBTrackID(int _id)
      Parameters:
      _id - associated track id for Time-Based tracking
    • get_AssociatedTBTrackID

      public int get_AssociatedTBTrackID()
      Returns:
      track id associated with the hit for Time-Based tracking
    • getCrossDirIntersWire

      public Point3D getCrossDirIntersWire()
      Returns:
    • setCrossDirIntersWire

      public void setCrossDirIntersWire(Point3D CrossDirIntersWire)
    • get_Beta

      public double get_Beta()
      Returns:
      beta of track at the hit location
    • set_Beta

      public void set_Beta(double beta)
      Parameters:
      beta - beta of the track at the hit location (position of the track closest to the wire)
    • calc_SignalPropagAlongWire

      public double calc_SignalPropagAlongWire(DCGeant4Factory DcDetector)
      Parameters:
      DcDetector - detector geometry
      Returns:
      signal propagation time along the wire in ns
    • calc_SignalPropagAlongWire

      public double calc_SignalPropagAlongWire(double X, double Y, DCGeant4Factory DcDetector)
    • getSignalPropagAlongWire

      public double getSignalPropagAlongWire()
      Returns:
      signal propagation time along the wire in ns
    • setSignalPropagAlongWire

      public void setSignalPropagAlongWire(DCGeant4Factory DcDetector)
      Parameters:
      DcDetector - DC detector geometry
    • getSignalPropagTimeAlongWire

      public double getSignalPropagTimeAlongWire()
      Returns:
      signal propagation time along the wire in ns
    • setSignalPropagTimeAlongWire

      public void setSignalPropagTimeAlongWire(DCGeant4Factory DcDetector)
      Parameters:
      DcDetector - DC detector geometry
    • setSignalPropagTimeAlongWire

      public void setSignalPropagTimeAlongWire(double X, double Y, DCGeant4Factory DcDetector)
      Parameters:
      X -
      Y -
      DcDetector - DC detector geometry
    • getSignalTimeOfFlight

      public double getSignalTimeOfFlight()
      Returns:
      signal time of flight to the track doca to the hit wire in ns
    • setSignalTimeOfFlight

      public void setSignalTimeOfFlight()
      sets signal time of flight to the track doca to the hit wire in ns
    • getTStart

      public double getTStart()
      Returns:
      start time from EB bank (ns)
    • setTStart

      public void setTStart(double tStart)
      Parameters:
      tStart - start time in ns
    • getT0

      public double getT0()
      Returns:
      T0 calibration constant in ns
    • setT0

      public void setT0(double T0)
      Parameters:
      T0 - calibration constant in ns
    • getTFlight

      public double getTFlight()
      Returns:
      Flight time to the track's closest point to the hit wire in ns
    • setTFlight

      public void setTFlight(double tFlight)
      Parameters:
      tFlight - Flight time to the track's closest point to the hit wire in ns
    • getTProp

      public double getTProp()
      Returns:
      propagation time along the wire in ns
    • setTProp

      public void setTProp(double tProp)
      Parameters:
      tProp - propagation time along the wire in ns
    • get_Time

      public double get_Time()
      Returns:
      the time in ns
    • set_Time

      public void set_Time(double _Time)
      Sets the time
      Parameters:
      _Time -
    • set_OutOfTimeFlag

      public void set_OutOfTimeFlag(boolean b)
      Parameters:
      b - boolean to flag out-of-time hits
    • get_OutOfTimeFlag

      public boolean get_OutOfTimeFlag()
      Returns:
      boolean to flag out-of-time hits
    • set_DeltaTimeBeta

      public void set_DeltaTimeBeta(double deltatime_beta)
    • get_DeltaTimeBeta

      public double get_DeltaTimeBeta()
    • set_DeltaDocaBeta

      public void set_DeltaDocaBeta(double deltadoca_beta)
    • get_DeltaDocaBeta

      public double get_DeltaDocaBeta()
    • getAlpha

      public double getAlpha()
      Returns:
      the _alpha
    • setAlpha

      public void setAlpha(double _alpha)
      Parameters:
      _alpha - the _alpha to set
    • get_Beta0to1

      public double get_Beta0to1()
      Returns:
      a value <=1 resetting beta to 1 for overflows
    • getDAFWeight

      public double getDAFWeight()
      Returns:
      _DAFWeight
    • setDAFWeight

      public void setDAFWeight(double weight)
      Parameters:
      weight - the _DAFWeight to set
    • updateHitfromSV

      public void updateHitfromSV(StateVec st, DCGeant4Factory DcDetector)
    • clone

      public FittedHit clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException