Skip to content

Commit a5b392d

Browse files
authored
[PWGLF] ebyeMaker: check correlation cuts for nuclei ebye analysis (#8629)
1 parent b8f2e12 commit a5b392d

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

PWGLF/TableProducer/Nuspex/ebyeMaker.cxx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ struct tagRun2V0MCalibration {
185185
TFormula* mMCScale = nullptr;
186186
} Run2V0MInfo;
187187

188+
struct tagRun2CL0Calibration {
189+
bool mCalibrationStored = false;
190+
TH1* mhVtxAmpCorr = nullptr;
191+
TH1* mhMultSelCalib = nullptr;
192+
} Run2CL0Info;
193+
188194
struct ebyeMaker {
189195
Produces<aod::CollEbyeTable> collisionEbyeTable;
190196
Produces<aod::MiniCollTable> miniCollTable;
@@ -412,6 +418,13 @@ struct ebyeMaker {
412418
} else {
413419
LOGF(fatal, "Calibration information from V0M for run %d corrupted", bc.runNumber());
414420
}
421+
Run2CL0Info.mhVtxAmpCorr = getccdb("hVtx_fnSPDClusters0_Normalized");
422+
Run2CL0Info.mhMultSelCalib = getccdb("hMultSelCalib_CL0");
423+
if ((Run2CL0Info.mhVtxAmpCorr != nullptr) && (Run2CL0Info.mhMultSelCalib != nullptr)) {
424+
Run2CL0Info.mCalibrationStored = true;
425+
} else {
426+
LOGF(fatal, "Calibration information from CL0 multiplicity for run %d corrupted", bc.runNumber());
427+
}
415428
} else {
416429
auto grpmagPath{"GLO/Config/GRPMagField"};
417430
grpmag = ccdb->getForTimeStamp<o2::parameters::GRPMagField>("GLO/Config/GRPMagField", timestamp);
@@ -1004,7 +1017,7 @@ struct ebyeMaker {
10041017
}
10051018
PROCESS_SWITCH(ebyeMaker, processRun3, "process (Run 3)", false);
10061019

1007-
void processRun2(soa::Join<aod::Collisions, aod::EvSels, aod::CentRun2CL0s, aod::TrackletMults> const& collisions, TracksFull const& tracks, aod::V0s const& V0s, aod::FV0As const& fv0as, aod::FV0Cs const& fv0cs, BCsWithRun2Info const&)
1020+
void processRun2(soa::Join<aod::Collisions, aod::EvSels, aod::TrackletMults> const& collisions, TracksFull const& tracks, aod::V0s const& V0s, aod::FV0As const& fv0as, aod::FV0Cs const& fv0cs, BCsWithRun2Info const&)
10081021
{
10091022
for (const auto& collision : collisions) {
10101023
auto bc = collision.bc_as<BCsWithRun2Info>();
@@ -1024,7 +1037,11 @@ struct ebyeMaker {
10241037
if (!(collision.sel7() && collision.alias_bit(kINT7)) && (!kINT7Intervals || (kINT7Intervals && ((cV0M >= 10 && cV0M < 30) || cV0M > 50))))
10251038
continue;
10261039

1027-
auto centralityCl0 = collision.centRun2CL0();
1040+
auto centralityCl0 = 105.0f;
1041+
if (Run2CL0Info.mCalibrationStored) {
1042+
float cl0m = bc.spdClustersL0() * Run2CL0Info.mhVtxAmpCorr->GetBinContent(Run2CL0Info.mhVtxAmpCorr->FindFixBin(collision.posZ()));
1043+
centralityCl0 = Run2CL0Info.mhMultSelCalib->GetBinContent(Run2CL0Info.mhMultSelCalib->FindFixBin(cl0m));
1044+
}
10281045
if (kUseEstimatorsCorrelationCut) {
10291046
const auto& x = centralityCl0;
10301047
const double center = estimatorsCorrelationCoef[0] + estimatorsCorrelationCoef[1] * x;

0 commit comments

Comments
 (0)