Function RMGOutputTools::combine_low_energy_tracks

Function Documentation

std::map<int, std::vector<RMGDetectorHit*>> RMGOutputTools::combine_low_energy_tracks(const std::map<int, std::vector<RMGDetectorHit*>> &hits_map, const ClusterPars &cluster_pars, bool has_distance_to_surface)

Combine low energy electron tracks into their neighbours.

Some interactions of gammas, eg. Compton scattering or the photoelectric effect can produce very low energy electron tracks. This function reads a map of steps in each track (keyed by trackid), it then computes the total energy in each electron track. If a track is below a certain threshold then the code searches through the other tracks to see if there is one where the first pre-step point is within the cluster distance of this track. If so they are combined for further pre-clustering. In the case multiple nearby tracks are found the highest energy one is used.

Parameters:
  • hits_map – a map of vectors of RMGDetectorHit pointers with the key being the track id.

  • cluster_pars – a RMGOutputTools::ClusterPars struct of the parameters for clustering.

  • has_distance_to_surface – a flag of whether the hits have the distance to surface field, and clustering should be performed separately for surface and bulk.

Returns:

A map of steps after combining low energy tracks.