Skip to content

Remove lowest fraction from FTClusterCreator

Louis Henry requested to merge lohenry-removeLowestFraction into master

Channel position and fraction used to be calculated with


      float m_lowestFraction = -0.25
      float clusPosition = wsumPosition / totalCharge;

      unsigned int chan     = std::floor( clusPosition - m_lowestFraction );
      float        fractionChanPosition = ( clusPosition - chan );
      int          frac                 = int( 2 * ( fractionChanPosition - m_lowestFraction ) ); 

Which is a bit arcane, and seems to be equivalent to the simpler:

      float clusPosition = wsumPosition / totalCharge;
      int rounded = std::round(2*clusPosition);
      int chan = rounded/2;
      int frac   = rounded & 1;

We need to find a way to test the resulting resolutions and efficiencies, and @sesen 's opinion on this would be very precious 😄 .

Merge request reports

Loading