SBNSoftware / sbnci

Packages, modules and scripts for the SBN continuous integration system
2 stars 4 forks source link

Add functionality to allow the plot normalisation to be turned on/off from the cfg file. #12

Closed henrylay97 closed 3 years ago

henrylay97 commented 3 years ago

The CompareDataDistributions.C script executes the joint plotting and comparison of the new histograms to the reference histograms. Part of this approach is to scale the histograms based on their number of entries. In my use of the reconstruction validation workflow I found that for some plots we wanted to see if there had been changes in normalisation (for example this might indicate an improvement in efficiency that wouldn't be visible in just a shape comparison). I do, however, understand why the option to normalise the plots is very useful in other scenarios.

This PR adds the ability to turn the normalisation on and off via environmental variables that will be set from the workflow's config file in lar_ci. This allows this parameter to be different between different modules in the workflow (i.e. we can pick and chose). It does not allow picking and choosing at a plot-by-plot level, this would require further work.

I've tested and use this using a separate branch that hard-coded the normalisation to be off. I have also tested this branch with the added flexibility on a test run of the reconstruction validation. As you can see the pfpvalidation, pfpslicevalidation and pandorashower modules all had the normalisation turned off whilst the recoeff module (muon & proton folders) had the normalisation turned on.

I've requested a review from Vito only as this PR is purely to do with the plotting machinery and not the physics modules. If needed @absolution1 can confirm the physics motivation for this feature (I hope!).

henrylay97 commented 3 years ago

These are both great suggestions, thanks Vito! I'll pop them in!