I am studying multiple jet combinations from the same set of events, call them A, B and C (so, for example, A is where you plot invariant mass of jets 1 and 2 on one axis and invariant mass of jets of 3 and 4 on the other axis of a 2D histogram).

I then count the number of events where A is in a particular mass range just by filling a histogram and imposing relevant selection, then fill again to find the number of times B is in the same range and again for C. The issue is that the total number of events in the histogram is then too large, as I only want to count the number of events where 1 or more combinations are in the range and donâ€™t want to count the same event twice if combinations A and B both meet the criteria in the same event. Is there some way of counting or filling the histogram with the number of entries such that A or B or C meet the criterion without over-counting if A or B both meet the criterion.

One way which occurs is to count or ask the histogram to fill if A meets the criterion and/or B and/or C, but I am not sure if you can do an and/or condition of this kind.