Skip to content

Restructure, extension and automatization of the spark_tnp framework

The following PR pretends to extend the spark_tnp framework. Several improvements have been made.

Restructure

The code is restructure in folders and modules so it can be easily extended by adding new modules without touching the existing parts. This will be the case for the Generalized Endpoint method and the Muon Momentum Scale corrections.

Furthermore, the installation of the framework is duplicated so users may want to choose between install a full but heavier micromamba environment (Automatization), or install a python venv (Simple). The last option will be preferred by users that just want to measure efficiencies without taking care of complex workflows. It does not allow the usage of the LAW automatization.

Also, python console_scripts are used via pip to avoid going through all the folders to run the code.

Muon Plotter

A new module is added to perform Data/MC comparisons in a correct way. It allows HTCondor submission via LAW automatization.

To do: Add a new simple function to have the possibility of having the MC corrected by our scale factors

Automatization

The full chain of efficiency and scale factors production, from muon nanoAOD to json files, is automatized using LAW. The LAW framework has been extended to allow file targets stored in HDFS and Hadoop.

New documentation is added here:

https://muon-wiki.docs.cern.ch/Automatization/

7 automatic tasks in 2 workflows are created.

Physics

The issue with slow fits from ROOT>=6.30 is fixed now by defining the range of the fit variable before of the definition of the signal and background PDFs. The results and performance from ROOT v6.26 is recovered since we avoid the extra integrals that are performed when the PDFs are defined before setting the fit range.

To do

  • Update the READMEs to be equal to the ones in the webpage
  • Extend the muon plotter to allow for HTCondor submission without LAW
  • Extend muon plotter to allow scale factor corrected MC

Merge request reports