Skip to content

Commit 75b8866

Browse files
committed
[EMCAL-1111] Add option for global cell scale in correction task
- The global cell scale corrects for energy loss in the material in front of the emcal. The factor needs to be applied on cell level. - Here, two scenarios are implemented: Calibration depending on the supermodule type (Full, 2/3, 1/3) or depending on the column of the Detector. The column by column calibration is supposed to distinguish regions behind the TRD support structure and the rest of the detector. - The calibration is Off by default (will be enabled as soon as it is validated) - The calibration coefficients are configurable and are stored in a vector
1 parent 52f1faf commit 75b8866

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

PWGJE/TableProducer/emcalCorrectionTask.cxx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ struct EmcalCorrectionTask {
7777
Configurable<std::string> nonlinearityFunction{"nonlinearityFunction", "DATA_TestbeamFinal", "Nonlinearity correction at cluster level"};
7878
Configurable<bool> disableNonLin{"disableNonLin", false, "Disable NonLin correction if set to true"};
7979
Configurable<bool> hasShaperCorrection{"hasShaperCorrection", true, "Apply correction for shaper saturation"};
80+
Configurable<int> applyCellAbsScale{"applyCellAbsScale", 0, "Enable absolute cell energy scale to correct for energy loss in material in front of EMCal"};
81+
Configurable<std::vector<float>> vCellAbsScaleFactor{"cellAbsScaleFactor", {1.f}, "values for absolute cell energy calibration. Different values correspond to different regions or SM types of EMCal"};
8082
Configurable<float> logWeight{"logWeight", 4.5, "logarithmic weight for the cluster center of gravity calculation"};
8183
Configurable<float> exoticCellFraction{"exoticCellFraction", 0.97, "Good cell if fraction < 1-ecross/ecell"};
8284
Configurable<float> exoticCellDiffTime{"exoticCellDiffTime", 1.e6, "If time of candidate to exotic and close cell is larger than exoticCellDiffTime (in ns), it must be noisy, set amp to 0"};
@@ -246,6 +248,9 @@ struct EmcalCorrectionTask {
246248
if (static_cast<bool>(hasShaperCorrection)) {
247249
amplitude = o2::emcal::NonlinearityHandler::evaluateShaperCorrectionCellEnergy(amplitude);
248250
}
251+
if(applyCellAbsScale){
252+
amplitude*= GetAbsCellScale(cell.cellNumber());
253+
}
249254
cellsBC.emplace_back(cell.cellNumber(),
250255
amplitude,
251256
cell.time(),
@@ -731,6 +736,22 @@ struct EmcalCorrectionTask {
731736
mHistManager.fill(HIST("hCellRowCol"), std::get<1>(res), std::get<0>(res));
732737
}
733738
}
739+
740+
float GetAbsCellScale(const int cellID){
741+
// Apply cell scale based on SM types (Full, Half (not used), EMC 1/3, DCal, DCal 1/3)
742+
// Same as in Run2 data
743+
if(applyCellAbsScale == 1){
744+
int iSM = mClusterizers.at(0)->getGeometry()->GetSuperModuleNumber(cellID);
745+
return vCellAbsScaleFactor.value[mClusterizers.at(0)->getGeometry()->GetSMType(iSM)];
746+
747+
// Apply cell scale based on columns to accoutn for material of TRD structures
748+
} else if (applyCellAbsScale == 2) {
749+
auto res = mClusterizers.at(0)->getGeometry()->GlobalRowColFromIndex(cellID);
750+
return vCellAbsScaleFactor.value[std::get<1>(res)];
751+
} else {
752+
return 1.f;
753+
}
754+
}
734755
};
735756

736757
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)