Common CP Algorithms Introduction

Last update: 24 Oct 2019 [History] [Edit]

The goal of this tutorial is to give an introduction to using the common CP algorithms. The common CP algorithms are still fairly new, but by now they have been cross checked against some other frameworks and though some aspects are still a bit rough it can be used for doing physics (Oct 19). The goal is that in the medium term all analyses should be using them, as such if you are starting a new analysis, starting it using the common CP algorithms is probably the most sensible approach. For some features the details may still change, but the overall usage should stay the same.

Fundamentally, the common CP algorithms are meant to help in the analysis harmonization effort, by making it easier to replicate the way a particular analysis applies its CP tools inside another analysis. This has proven to be quite a challenge in the past, particularly when two people are using different analysis frameworks. The common CP algorithms serve as an interchangeable component that all frameworks can use to apply the CP tools (as well as analyses that do not use a framework). Furthermore, if a group needs a special configuration of the CP tools it should be easy to define such a custom configuration and use it with any framework.

The basic way CP algorithms work is that you run them all at the start of your job and they then place the corrected objects into the event store, allowing you to access them as if they were part of the input file. Indeed, you ought to be able to just write all the output objects to a “mini-xAOD” file and then run on that file without changing your analysis algorithm at all.

The basic design of the CP algorithms should allow for a great amount of flexibility to the user, e.g.:

  • the CP algorithms can be run in either EventLoop or Athena, or completely standalone without a framework (this last option is not recommended, but to accommodate existing codebases like AnalysisTop)

  • change the configuration of any CP algorithm/tool at will, re-order them or drop some of them

  • run multiple working points for a single object type (e.g. muons) and apply decorations for all of them to the same object

  • perform a basic preselection on objects/events and only apply the CP algorithms to those objects/events that pass the preselection (to save computing time)

  • split the CP algorithms up into two jobs, writing out a mini-xAOD from the first one and then read the mini-xAOD in in the second job and run the remaining CP algorithms there

About This Tutorial

This tutorial will for the most part just show you how to use muons as an example to implement your own sequence using some of the CP algorithms, and then create some histograms using those muons. You are strongly encouraged to try this out with other object types, like electrons, jets, etc. They all work very similar, so we didn’t want to spell it out for each one, plus it is sort of good practice to do this without us giving you line by line instructions. We touch on some of the more advanced topics, but in this version of the tutorial they aren’t really covered in great detail.

As this tutorial is not focused on teaching EventLoop or Athena, we will just assume that you already have an EventLoop/Athena job set up and will just drop the CP algorithms into the pre-defined job. For instructions on how to set up such a job, just follow the first 2-3 sections of this tutorial.

warning This tutorial is written from a dual-use point of view so it can be run using EventLoop or Athena. In reality it may be simpler to implement the CP algorithms in one configuration or the other so keep this in mind. However for now, the following tutorial method for implementing the algorithms is valid and can be used in your future analysis framework.

warning It is important to note again that this part of the tutorial is still a work in progress and the material is continuously evolving. As of Oct 19, the CP algorithms tutorial have been rewritten so please bear with us if things do not always run smoothly.