Event Mixing and Run-level Data Products
I'm trying to mix in a Run-level data product into an art::Event. The Run-level data product is stored in a single art file but is distributed over a number of Run fragments. The Run-level data product contains an aggregate() function so that when I read the file into art as the primary event, it gives me the correct aggregated value of the Run-level data product at the first beginRun.
However, when I try to read the Run-level data product in as a secondary file during mixing, it always gives me the value from the first Run fragment.
I can workaround this by reading the art file with the fragmented Run product and writing the aggregated product to a new file. This then gives me the correct value during mixing but adds an extra stage to the workflow.
I'm not sure whether I should be able to mix in the single file with the fragmented Run product and this is a bug, or this is a feature request for art to have additional functionality.
#2 Updated by Andrew Edmonds 7 months ago
- File beam_g4s1_sr0.fcl beam_g4s1_sr0.fcl added
- File beam_g4s1_sr1.fcl beam_g4s1_sr1.fcl added
- File eff_calc_sr01.fcl eff_calc_sr01.fcl added
- File eff_cat_sr01.fcl eff_cat_sr01.fcl added
- File eff_mix_cat_sr01.fcl eff_mix_cat_sr01.fcl added
- File eff_mix_sr01.fcl eff_mix_sr01.fcl added
Running on the code on my branch here: https://github.com/AndrewEdmonds11/Offline/tree/mdc2020-internal-bookkeeping2
The attached fcl files reproduce the behaviour with the following workflow:
1) Produce two subruns, each of 100 events:
- mu2e -c beam_g4s1_sr0.fcl
- mu2e -c beam_g4s1_sr1.fcl
2) Read output files from both subruns and create Run-level data product:
- mu2e -c eff_calc_sr01.fcl
3) Read Run-level data product in mixing job with diagnostic output:
- mu2e -c eff_mix_sr01.fcl
which shows the numerator and denominator of the first subrun only.
What does work is the following:
1) Same as (1) above
2) Same as (2) above
3) Read run-level data product from previous output file and write it out again
- mu2e -c eff_cat_sr01.fcl
4) Read the new file in a mixing job with diagnostic output:
- mu2e -c eff_mix_cat_sr01.fcl
which shows the total numerator and denominator for both subruns.
Let me know if there's any more information you want and/or need :)