Package org.jlab.service.recoil.tof
Class ClusterFinder
java.lang.Object
org.jlab.service.recoil.tof.ClusterFinder
The
ClusterFinder class builds clusters in the recoil tof
Uses found hits information. Creates a RTOFCluster matching them.
- Author:
- pilleux, Nilanga Wickramaarachchi
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor that initializes the list clusters as new empty list. -
Method Summary
Modifier and TypeMethodDescription<T extends RTOFRawHit>
voidclusterHits(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.Gets the list of clusters.voidmakeClusters(DataEvent event, HitFinder hitfinder) voidmakeClusters(HitFinder hitfinder, double sigma_y, double sigma_t, DataEvent event) voidsetClusters(ArrayList<RTOFCluster> clusters) Sets the list of clusters.
-
Constructor Details
-
ClusterFinder
public ClusterFinder()Default constructor that initializes the list clusters as new empty list.
-
-
Method Details
-
setClusters
Sets the list of clusters.- Parameters:
clusters- aArrayListofRTOFCluster.
-
getClusters
Gets the list of clusters.- Returns:
- a
ArrayListofRTOFCluster.
-
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 extendRTOFRawHit. This allows the method to work with different types of hits that are subclasses ofRTOFRawHit(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 ofRTOFRawHit.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
- Parameters:
hitfinder- theHitFindercontaining the hits that were foundsigma_y- the tolerance for clustering in y [cm]sigma_t- the tolerance for clustering in time [ns]
-
makeClusters
-