Skip to content

For event size analytics

Nicole Skidmore requested to merge evtsizeanalytics into master

To go with LHCb!3438 (merged)

Motivation

Want event size analysis of Spruced events per line. See https://gitlab.cern.ch/lhcb-dpa/project/-/issues/90

Can be fairly trivially extended to do the same for HLT2 lines making use of Sprucing-passthrough mode.

How

Runs Sprucing over HLT1 filtered Min bias sample that has been processed by TOPO{2, 3} HLT2 lines - 478 events - stored on eos.

Exploits the fact that each stream gets its own instance of CombineRawBankViewsToRawEvent.

  • Make each Sprucing line its own stream.
  • Report size of DstData RawBank (contains the physics and reconstruction objects) and total event size where the event contains the RawBanks defined in banks in spruce_all_lines_analytics.py
  • Will not produce output files through use of stream_writer.bind(write=False).
  • In log will see StatCounter per line
EvtSize_<line name>    INFO Number of counters : X
 |    Counter                                      |     #     |    sum | mean/eff^* | rms/err^*  |     min   |     max    |
 | "DstData bank size (bytes)"                     |         X |      Y |         YY |     YYY    |      YYYY |      YYYYY |
 | "Event size (bytes)"                            |         X |      Z |         ZZ |     ZZZ    |      ZZZZ |      ZZZZZ |

Note that by running CombineRawBankViewsToRawEvent in VERBOSE mode - achieved through CombineRawBankViewsToRawEvent.bind(OutputLevel=1) one also has the log of the individual sizes of ALL RawBanks in banks.

Unit test

Checks that no line has average DstData RawBank size over 30kB (this is picked arbitrary atm). Prints out table of form

=======================================================================================================
Line                                        | Av. DstData Rawbank size (bytes) | Av. total event size (bytes)
RD_BdToEtapTauE_EtapToPiPiGamma_TauTo3Pi_SS | 7904.0                           | 1.1654e+05                  
RD_BdToKstTauE_KstToKPi_TauTo3Pi_OS         | 20505.0                          | 1.4747e+05           

Future

Eventually we should have a test like this over each stream as that will define banks and hence the appropriate event size. At the moment this script runs over ALL Sprucing lines and analyses ALL RawBanks so the event size contains everything.

Edited by Nicole Skidmore

Merge request reports