Function RMGOutputTools::average_hits¶
Function Documentation¶
-
RMGDetectorHit *RMGOutputTools::average_hits(std::vector<RMGDetectorHit*> hits, bool compute_distance_to_surface, bool compute_velocity)¶
Average a cluster of hits to produce one effective hit.
The steps in a cluster are average with the energy being the sum over the steps, and the pre/post step position / distance / velcity to surface computed from the first/last step. Other fields must be the same for all steps in the cluster and are taken from the first step.
- Parameters:
hits – the vector of hits to average
compute_distance_to_surface – boolean flag of whether to compute the distance to surface.
compute_velocity – boolean flag of whether to compute velocity.
- Returns:
the averaged hit.