AliPhysics  6fe3466 (6fe3466)
Switch to the EMCal Correction Framework

Switching to the EMCal correction framework is a straightforward process. It should be possible to configure with your desired settings in less than an hour.

# Transition your correction settings to the EMCal Corrections Framework

If you plan to test and verify that everything works the same (which we strongly encourage!) be certain not to delete your previous corrections!

# Configure your run macro or wagon

Follow the same procedure as described on EMCal Correction Framework.

# Test and verify the changes

To test and verify the changes, we have a general procedure, as well as tools to help verify automatically. NOTE: This procedure only works for analyses already using EMCal Containers! Older tasks must first update to at least use EMCal containers to use this tool! See here for instructions to update, if you need. Alternatively, you can test without EMCal containers, but these instructions do not apply.

The general procedure is as follows:

• Configure the EMCal Corrections Framework to run side-by-side with the previous corrections
• Add two copies of your Analysis Task to your run macro to compare the result of using output from both sets of corrections
• Compare and verify the result using an automatic comparison tool

## Testing the changes

First, you must add some additional options to your run macro. In particular, we need to configure the EMCal Corrections Framework to copy cells, clusters, and tracks to ensure that the two sets of corrections do not interfere with each other. This has two simple steps:

• A change to the corrections configuration

To enable side-by-side testing, we will need to setup the copy of branches before setting up the EMCal Correction Framework AddTask. This is required to ensure that the two correction frameworks do not interfere with each other. To copy the proper input objects (we only need to copy cells and tracks - clusters will be created automatically), use something like the code below (assuming AOD branch naming):

// Cells
bool IsEsd = (iDataType == kEsd);
TString newBranchName = inputObjectBranchName;
newBranchName += "New";
// Clusters
// We don't need to copy clusters since we are reclusterizing
// Tracks
newBranchName = inputObjectBranchName;
newBranchName += "New";

The names in newBranchName determine the name of the new branches. In principle, this could be anything, but we strongly recommend using the "usedefault" name and then adding "New" onto the end. So for AODs, it would be "emcalCellsNew" for cells, "caloClustersNew" for clusters, and "tracksNew" for tracks.

### Configure the corrections for side-by-side testing

Before beginning, be certain to read the introduction to YAML and configuring corrections available here.

You can map the current corrections to the new ones with the following table. Note that each new correction is preceded by the name AliEmcalCorrection:

Current Correction Name New Correction Name