How to find the majority occurance

Dear developers,

I have three doubles (a,b,c) plotting a Z mass after running on 10,000 entries. They are plotting different Z mass values from minimum 50 to maximum 250. But the exact Z mass is 91.1134. I cannot check one by one that which double has maximum of 91.1134. I want to find out that double which has maximum of 91.1134.
Kindly help me to find it.

" if(m1==0) tmp1.SetPxPyPzE(VetoMu_px[m1], VetoMu_py[m1], VetoMu_pz[m1], VetoMu_en[m1]);
if(m2==1) tmp2.SetPxPyPzE(VetoMu_px[m2], VetoMu_py[m2], VetoMu_pz[m2], VetoMu_en[m2]);
if(m3==2) tmp3.SetPxPyPzE(VetoMu_px[m3], VetoMu_py[m3], VetoMu_pz[m3], VetoMu_en[m3]);

if (VetoMu_charge[m1]*VetoMu_charge[m2] < 0.) {

    double a = (tmp1 + tmp2).M();

}
if (VetoMu_charge[m2]*VetoMu_charge[m3] < 0.) {

    double b = (tmp2 + tmp3).M();

}
if (VetoMu_charge[m3]*VetoMu_charge[m1] < 0.) {

    double c = (tmp1 + tmp3).M();

}
"
Cheers,
Nab

The question is not clear and we discussed similar topic here How to check conditions entry by entry in a nested loop too.
Could you be more specific?

I want to find out a number which has more 91.1134. Actually all the a,b,c are printing numbers range from 50 to 250 randomly. I want to sort out which number has 91.1134 in abundance.

Hi,

still not too clear, sorry.

Cheers,
D

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.