Analyses/src/ReadBack_module.cc
int ReadBack::countHitNeighbours( Straw const& straw,
                                    art::Handle<StepPointMCCollection>& hits ){

    int count(0);

    for ( auto const& step : *hits ){
      if ( step.strawId().nearestNeighbor(straw.id()) ){
	++count;
      }
    }
    return count;
  }
// Count how many of this straw's nearest neighbours are hit.
// If we have enough hits per event, it will make sense to make
// a class to let us direct index into a list of which straws have hits.
Count how many of this straw's nearest neighbours are hit.
If we have enough hits per event, it will make sense to make
a class to let us direct index into a list of which straws have hits.
Count how many of this straw ' s nearest neighbours are hit . If we have enough hits per event it will make sense to make a class to let us direct index into a list of which straws have hits .
int ReadBack::countHitNeighbours( Straw const& straw,
                                    art::Handle<StepPointMCCollection>& hits ){
    int count(0);
    for ( auto const& step : *hits ){
      if ( step.strawId().nearestNeighbor(straw.id()) ){
	++count;
      }
    }
    return count;
  }
int ReadBack :: countHitNeighbours ( Straw const & straw , art :: Handle < StepPointMCCollection > & hits ) { int count ( 0 ) ; for ( auto const & step : * hits ) { if ( step . strawId ( ) . nearestNeighbor ( straw . id ( ) ) ) { ++ count ; } } return count ; }
Count how many of this straw's nearest neighbours are hit.
Count how many of this straw ' s nearest neighbours are hit .