AliPhysics  a8fcd8c (a8fcd8c)
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 and the old correction framework AddTask (ie. this code must be executed before the Correction Framework AddTask and before the old 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, use something like the code below (be certain to set IsEsd as appropriate):

// Cells
bool IsEsd = (iDataType == kEsd);
TString inputObjectBranchName = AliEmcalContainerUtils::DetermineUseDefaultName(inputObject, IsEsd);
TString newBranchName = inputObjectBranchName;
newBranchName += "New";
// Clusters
inputObjectBranchName = AliEmcalContainerUtils::DetermineUseDefaultName(inputObject, IsEsd);
newBranchName = inputObjectBranchName;
newBranchName += "New";
// 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

# Some suggestions and tips if the tests disagree

Testing is very important, but it can take a few iterations to get all of your settings right! If they don't match the first time, check your settings again closely. It is often helpful to test locally with a relatively small number of events (perhaps ~1000) to allow rapid iteration. Anecdotally, we have observed the time cuts, non-linearity function, and clusterizer type to cause many of the issues. In addition, a few defaults were updated in the EMCal and EMCal-Jet sample tasks that are work checking. Those values include:

Settings Previous value New default Reason for change
cell time cuts +/- 50 us +/- 1 Clarify they are off by default. This can make a difference in some periods!
Non-linearity function kBeamTestCorrected kBeamTestCorrectedv3 Update in EMCal Analysis Recommendations
Mass for track prop Pion mass PID mass hypothesis Experts decided this was the best setting
Point for track prop Vertex DCA Experts decided this was the best setting

Lastly, please note that due to small differences in the Tender clusterizer and the New Corrections Framework clusterizer, exact agreement may not be possible. However, the differences should be very small. Note that this does not apply to the standalone clusterizer (where perfect agreement is expected)!