Class Hit

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

public class Hit extends Object implements Comparable<Hit>
A hit characterized by layer, sector, wire number, and Edep. The ADC to time conversion has been already done.
Author:
ziegler, benkel, devita
  • Constructor Details

    • Hit

      public Hit(int index, int layer, int strip, double energy, double time)
      Parameters:
      index -
      layer -
      strip -
      energy -
      time -
  • Method Details

    • getLayer

      public int getLayer()
      Returns:
      the layer (1...6)
    • setLayer

      public void setLayer(int _Layer)
      Sets the layer
      Parameters:
      _Layer -
    • getStrip

      public int getStrip()
      Returns:
      the strip number (1...256)
    • setStrip

      public void setStrip(int _Strip)
      Sets the strip number
      Parameters:
      _Strip -
    • getEnergy

      public double getEnergy()
      Returns:
      the Edep in MeV
    • setEnergy

      public void setEnergy(double _Edep)
      Sets the Edep
      Parameters:
      _Edep -
    • getTime

      public double getTime()
    • setTime

      public void setTime(double _Time)
    • getError

      public double getError()
    • setError

      public void setError(double _Error)
    • getIndex

      public int getIndex()
      Returns:
      the ID
    • setIndex

      public void setIndex(int _Id)
      Sets the hit ID. The ID corresponds to the hit index in the EvIO column.
      Parameters:
      _Id -
    • getRegion

      public int getRegion()
      Returns:
      region (1...4)
    • getRegionSlayer

      public int getRegionSlayer()
      Returns:
      superlayer 1 or 2 in region (1...4)
    • getStripGlobalSegment

      public Line3D getStripGlobalSegment()
    • getStripLocalSegment

      public Line3D getStripLocalSegment()
    • getDoca

      public double getDoca(double x, double y, double z)
    • getStatus

      public int getStatus()
    • setStatus

      public void setStatus(int _Status)
    • getResidual

      public double getResidual()
    • setResidual

      public void setResidual(double trackLocalY)
    • getCrossIndex

      public int getCrossIndex()
    • setCrossIndex

      public void setCrossIndex(int crossIndex)
    • getTrackIndex

      public int getTrackIndex()
    • setTrackIndex

      public void setTrackIndex(int _AssociatedTrackIndex)
    • compareTo

      public int compareTo(Hit arg)
      Specified by:
      compareTo in interface Comparable<Hit>
      Parameters:
      arg - the other hit
      Returns:
      an int used to sort a collection of hits by wire number. Sorting by wire is used in clustering.
    • equal

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

      public boolean isClose(Hit other)
      Parameters:
      other -
      Returns:
      a boolean comparing 2 hits based on basic descriptors; returns true if the hits are the same
    • getClusterIndex

      public int getClusterIndex()
    • setClusterIndex

      public void setClusterIndex(int _AssociatedClusterIndex)
    • fetchHits

      public static List<Hit> fetchHits(DataEvent event, IndexedTable timecuts, IndexedTable statuses)
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      print statement with hit information