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 yet!

# 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 is oriented towards using EMCal Containers. If you do not use EMCal containers, this will only be a rough guide!

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 (ie. this code must be executed before the Correction Framework AddTask in your run macro or LEGO train). 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 inputObjectBranchName = AliEmcalContainerUtils::DetermineUseDefaultName(inputObject, IsEsd);
TString newBranchName = inputObjectBranchName;
newBranchName += "New";
// Clusters
// We don't need to copy clusters since we are reclusterizing
// Tracks
inputObjectBranchName = AliEmcalContainerUtils::DetermineUseDefaultName(inputObject, IsEsd);
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
CellEnergy
CellTimeCalib
Clusterizer Clusterizer
ClusterMaker ClusterExotics
ClusterNonLinearity
ClusTrackMatcher ClusterTrackMatcher