Class ClusterFinder

java.lang.Object
org.jlab.service.recoil.tof.ClusterFinder

public class ClusterFinder extends Object
The ClusterFinder class builds clusters in the recoil tof

Uses found hits information. Creates a RTOFCluster matching them.

Author:
pilleux, Nilanga Wickramaarachchi
  • Constructor Details

    • ClusterFinder

      public ClusterFinder()
      Default constructor that initializes the list clusters as new empty list.
  • Method Details

    • setClusters

      public void setClusters(ArrayList<RTOFCluster> clusters)
      Sets the list of clusters.
      Parameters:
      clusters - a ArrayList of RTOFCluster.
    • getClusters

      public ArrayList<RTOFCluster> getClusters()
      Gets the list of clusters.
      Returns:
      a ArrayList of RTOFCluster.
    • clusterHits

      public <T extends RTOFRawHit> void clusterHits(int i, ArrayList<T> hits, RTOFRawHit this_hit, Number sigma_y, double sigma_t, int cluster_id, ArrayList<? super T> this_cluster_hits)
      Cluster hits around a given hit, based on the time and geometric proximity. Hits are compared based on their y difference, which is distance in cm and time difference. If the hit satisfies all conditions, it is marked as clustered and added to the cluster hit list.
      Type Parameters:
      T - The type of the hit objects, which must extend RTOFRawHit. This allows the method to work with different types of hits that are subclasses of RTOFRawHit (e.g., RTOFHit).
      Parameters:
      i - The index from which hits are read in the list to compare against the current hit.
      hits - The list of hits to be clustered, can be any subclass of RTOFRawHit.
      this_hit - The hit currently being considered for clustering.
      sigma_y - The threshold for the y-distance [cm] between the hits.
      sigma_t - The threshold for the time difference [ns] between the hits.
      cluster_id - The ID of the cluster being formed.
      this_cluster_hits - The list that will store the clustered hits. This list can accept hits of type RTOFRawHit or RTOFHit. Clustered hits are added to this list.
    • makeClusters

      public void makeClusters(HitFinder hitfinder, double sigma_y, double sigma_t, DataEvent event)
      Builds clusters in the DataEvent using hits found and stored in a HitFinder.
      Parameters:
      hitfinder - the HitFinder containing the hits that were found
      sigma_y - the tolerance for clustering in y [cm]
      sigma_t - the tolerance for clustering in time [ns]
    • makeClusters

      public void makeClusters(DataEvent event, HitFinder hitfinder)
      Builds clusters in the DataEvent using hits found and stored in a HitFinder.
      Parameters:
      event - the DataEvent containing the clusters to be built
      hitfinder - the HitFinder containing the hits that were found