Updating bbyy PNN eventNumber precision
Ran over Run 2 data and found many events had bbyy PNN score of -99, even though they pass all pre-selections and therefore have at least 2 b-jets and photons to compute PNN score properly.
Noticed all events in 2018 data with this issue have event number > 2^31 (2,147,483,648), indicating the event number was not able to be stored in a 32-bit object:
Then noticed eventNumber was an int
in easyjet
, but uint64_t
in HGamCore: link.
I think this means data events with eventnumber > 2^31 sometimes had issues during the eventNumber %
step in the PNN computation, and ended up not being computed. From testing I found when leaving int
as the object type and setting the value by hand to something that takes more than 32 bits:
[ 95%] Built target Package_EasyjetHub
/afs/cern.ch/work/a/atishelm/private/easyjet_main/easyjet/bbyyAnalysis/src/ResonantPNNbbyyAlg.cxx: In member function 'virtual StatusCode SHBBYY::ResonantPNNbbyyAlg::execute()':
/afs/cern.ch/work/a/atishelm/private/easyjet_main/easyjet/bbyyAnalysis/src/ResonantPNNbbyyAlg.cxx:89:18: error: overflow in conversion from 'long int' to 'int' changes value from '3000000000' to '-1294967296' [-Werror=overflow]
89 | eventNum = 3000000000;
| ^~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [bbyyAnalysis/CMakeFiles/bbyyAnalysis.dir/build.make:132: bbyyAnalysis/CMakeFiles/bbyyAnalysis.dir/src/ResonantPNNbbyyAlg.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3725: bbyyAnalysis/CMakeFiles/bbyyAnalysis.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
the value was negative, meaning eventNumber %
may not have evaluated to 0, 1, or 2, therefore a PNN score was never computed.
Tested by updating eventNumber
type to something wiht 64 bits and rerunning while intentionally setting eventNumber to something > 2^31, able to get sensible PNN vals.
cc: @tstreble @lderamo @tpelzer @gtolkach
in case it becomes relevant for non-res BDT: @gdigrego @alwang