Class ATOFCluster

java.lang.Object
org.jlab.rec.atof.cluster.ATOFCluster

public class ATOFCluster extends Object
The ATOFCluster represents clusters in the atof

Create clusters and compute their basic properties from the hits composing them.

Author:
pilleux
  • Constructor Details

    • ATOFCluster

      public ATOFCluster(ArrayList<BarHit> bar_hits, ArrayList<ATOFHit> wedge_hits)
      Constructor that initializes the list of bar hits and list of wedge hits and computes the cluster properties.
      Parameters:
      bar_hits - a ArrayList of BarHit.
      wedge_hits - a ArrayList of ATOFHit.
    • ATOFCluster

      public ATOFCluster(ArrayList<BarHit> bar_hits, ArrayList<ATOFHit> wedge_hits, org.jlab.io.base.DataEvent event)
      Constructor that initializes the list of bar hits and list of wedge hits and computes the cluster properties.
      Parameters:
      bar_hits - a ArrayList of BarHit.
      wedge_hits - a ArrayList of ATOFHit.
      event - a DataEvent with which track matching will be done.
  • Method Details

    • getBarHits

      public ArrayList<BarHit> getBarHits()
    • setBarHits

      public void setBarHits(ArrayList<BarHit> bar_hits)
    • getWedgeHits

      public ArrayList<ATOFHit> getWedgeHits()
    • setWedgeHits

      public void setWedgeHits(ArrayList<ATOFHit> wedge_hits)
    • getX

      public double getX()
    • setX

      public void setX(double x)
    • getY

      public double getY()
    • setY

      public void setY(double y)
    • getZ

      public double getZ()
    • setZ

      public void setZ(double z)
    • getTime

      public double getTime()
    • setTime

      public void setTime(double time)
    • getEnergy

      public double getEnergy()
    • setEnergy

      public void setEnergy(double energy)
    • getPathLength

      public double getPathLength()
    • setPathLength

      public void setPathLength(double pathLength)
    • getInPathLength

      public double getInPathLength()
    • setInPathLength

      public void setInPathLength(double inPathLength)
    • getTypeMaxHit

      public String getTypeMaxHit()
    • setTypeMaxHit

      public void setTypeMaxHit(String typeMaxHit)
    • getIProj

      public int getIProj()
    • setIProj

      public void setIProj(int iProj)
    • getIndexMaxHit

      public int getIndexMaxHit()
    • setIndexMaxHit

      public void setIndexMaxHit(int indexMaxHit)
    • computeClusterProperties

      public final void computeClusterProperties()
      Compute the cluster properties. Cluster coordinates and time are defined as the coordinates and time of the max energy hit. TO DO: Test other choices for the definitions.
    • matchTrack

      public int matchTrack(org.jlab.io.base.DataEvent event)
      Matches the current track with ahdc tracks projections that have been written to the banks. Calculates the match by comparing the hit's azimuthal angle and longitudinal position (z) with the track projection. If a match is found within defined tolerances for phi and z, the path length of the matched hit is updated.
      Parameters:
      event - a @link{DataEvent} in which the track projections bank has been written.
    • makeStraightTrack

      public void makeStraightTrack()
      Build a straight track from the vertex to this cluster. Sets the cluster path length and length through the atof from it.
    • getDistanceStraightInATOF

      public double getDistanceStraightInATOF(double vx, double vy, double vz)
      Computes the distance a straight track goes through the ATOF. The intersection point between a straight track from the vertex to the cluster and the ATOF inner cylinder is computed to that end.
      Parameters:
      vx - , the x coordinate of the vertex
      vy - , the y coordinate of the vertex
      vz - , the z coordinate of the vertex
      Returns:
      the distance the straight track went through in the ATOF
    • getEdepWedge

      public double getEdepWedge()
      Computes the energy deposited in the wedges.
      Returns:
      the energy deposited in the wedges.
    • getEdepBar

      public double getEdepBar()
      Computes the energy deposited in the bars.
      Returns:
      the energy deposited in the bars.
    • getPhi

      public double getPhi()
      Compute the cluster phi angle in radians.
      Returns:
      a double that is angle in radians
    • getBeta

      public double getBeta()
      Compute the cluster beta from the path length and time.
      Returns:
      a double that is beta - TO DO: Change to non-hardcoded value for c
    • getMaxHit

      public final ATOFHit getMaxHit()
      Retrieve the hit with maximal energy in the cluster. It must have been computed previously.
      Returns:
      a ATOFHit that is the maximal energy hit in the cluster
    • getTot

      public int getTot()
      Computes the sum of TOT in the cluster.
      Returns:
      an int representing the summed TOT
    • getTdc

      public int getTdc()
      Returns the TDC of the maximal hit in the cluster.
      Returns:
      an int representing the TDC of the maximal hit.
    • getMaxWedgeHit

      public final ATOFHit getMaxWedgeHit()
      Computes the wedge hit with maximal energy in the cluster.
      Returns:
      a ATOFHit that is the maximal energy hit in the wedges in the cluster.
    • main

      public static void main(String[] args)
      Parameters:
      args - the command line arguments