all return the right result (curiously even the first one was wrong since it returned the CODA event number of the first POSITIVE helicity event).
Possibly related to #217 in a sense that the reason why mps_counter is set to the value at the first positive helicity windows is the same as here. We only set some variables when we execute operator=. The order of operations for helicity pattern quantities is operator= on first positive helicity, operator+= on all the next, then operator= on the first negative, operator+= on all the next, then Sum, Difference on the positive and negative, which does operator= on the positive and then operator+= or operator-= on the negative. In short, first positive is what ends up getting assigned... tl;dr, use CodaEventNumber instead of mps_counter.
At this point only CODA event number is propagated correctly, so event type, scan data, clean data, etc, including the quantities in QwHelicity will still be incorrect.
Propagate CODA event number in +=, -= and accumulators
In particular, try to find the smallest non-zero CODA event number. This means that now
all return the right result (curiously even the first one was wrong since it returned the CODA event number of the first POSITIVE helicity event).
Possibly related to #217 in a sense that the reason why mps_counter is set to the value at the first positive helicity windows is the same as here. We only set some variables when we execute operator=. The order of operations for helicity pattern quantities is operator= on first positive helicity, operator+= on all the next, then operator= on the first negative, operator+= on all the next, then Sum, Difference on the positive and negative, which does operator= on the positive and then operator+= or operator-= on the negative. In short, first positive is what ends up getting assigned... tl;dr, use CodaEventNumber instead of mps_counter.
At this point only CODA event number is propagated correctly, so event type, scan data, clean data, etc, including the quantities in QwHelicity will still be incorrect.