Function RMGOutputTools::pre_cluster_hits

Function Documentation

std::shared_ptr<RMGDetectorHitsCollection> RMGOutputTools::pre_cluster_hits(const RMGDetectorHitsCollection *hits, ClusterPars cluster_pars, bool has_distance_to_surface, bool has_velocity)

Perform a basic reduction of the hits collection removing very short steps.

This is based on a “within” track clustering (but note that some low energy tracks can be merged by CombineLowEnergyTracks . The steps in every track are looped through and combined into effective steps. A step is added to the current cluster if:

  • If the flag has_distance_to_surface is set. The step must not move from the surface region (defined by the distance_to_surface<fSurfaceThickness) to the bulk or visa versa.

  • the time difference between the step and the first of the cluster is not above fClusterTimeThreshold ,

  • the distance between the step and the first of the cluster is not above fClusterDistance (for the bulk) or fClusterSurfaceDistance for the surface (if has_distance_to_surface is true).

  • the hits in each cluster are then combined into one effective step with AverageHits

Returns:

a collection of hits after pre-clustering.