Skip to content

Commit 22b7e61

Browse files
lhusovaLucia Anna Tarasovicova
andauthored
[PWGLF] PWGLF change in derivedcascadeanalysis.cxx (AliceO2Group#9466)
Co-authored-by: Lucia Anna Tarasovicova <[email protected]>
1 parent 08bde61 commit 22b7e61

File tree

1 file changed

+58
-13
lines changed

1 file changed

+58
-13
lines changed

PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx

Lines changed: 58 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ struct Derivedcascadeanalysis {
115115
Configurable<bool> doNoCollInRofStrictCut{"doNoCollInRofStrictCut", false, "Enable an evevnt selection which rejects a collision if there are other events within the same ITS ROF"};
116116
Configurable<bool> doNoCollInRofStandardCut{"doNoCollInRofStandardCut", true, "Enable an evevnt selection which rejects a collision if there are other events within the same ITS ROF with mult above threshold"};
117117
Configurable<bool> doMultiplicityCorrCut{"doMultiplicityCorrCut", false, "Enable multiplicity vs centrality correlation cut"};
118-
Configurable<bool> doInel1{"doInel1", true, "Enable INEL > 1 selection"};
118+
Configurable<bool> doInel0{"doInel0", true, "Enable INEL > 0 selection"};
119119
Configurable<float> zVertexCut{"zVertexCut", 10, "Cut on PV position"};
120120
} eventSelectionFlags;
121121

@@ -204,6 +204,10 @@ struct Derivedcascadeanalysis {
204204
histos.add("hEventSelection", "hEventSelection", kTH1F, {{22, 0, 22}});
205205
histos.add("hOccupancyVsOccupFt0VsCentrality", "", kTH3F, {axisOccupancy, axisOccupancyFt0, {100, 0, 100}});
206206

207+
histos.add("hNCrossedRowsNegative", "", kTH1F, {{400, -200, 200}});
208+
histos.add("hNCrossedRowsPositive", "", kTH1F, {{400, -200, 200}});
209+
histos.add("hNCrossedRowsBachelor", "", kTH1F, {{400, -200, 200}});
210+
207211
histos.add("hEventNchCorrelationAfCuts", "hEventNchCorrelationAfCuts", kTH2F, {{5000, 0, 5000}, {5000, 0, 2500}});
208212
histos.add("hEventPVcontributorsVsCentrality", "hEventPVcontributorsVsCentrality", kTH2F, {{100, 0, 100}, {5000, 0, 5000}});
209213
histos.add("hEventGlobalTracksVsCentrality", "hEventGlobalTracksVsCentrality", kTH2F, {{100, 0, 100}, {2500, 0, 2500}});
@@ -328,6 +332,12 @@ struct Derivedcascadeanalysis {
328332
histos.addClone("PtDepCutStudy/", "PtDepCutStudyMCTruth/");
329333
histos.add("hNegativeCascadePtForEfficiency", "hNegativeCascadePtForEfficiency", HistType::kTH3F, {axisPt, axisMass, {101, 0, 101}});
330334
histos.add("hPositiveCascadePtForEfficiency", "hPositiveCascadePtForEfficiency", {HistType::kTH3F, {axisPt, axisMass, {101, 0, 101}}});
335+
histos.add("hNegativeCascadePtForEfficiencyBefSel", "hNegativeCascadePtForEfficiencyBefSel", HistType::kTH3F, {axisPt, axisMass, {101, 0, 101}});
336+
histos.add("hPositiveCascadePtForEfficiencyBefSel", "hPositiveCascadePtForEfficiencyBefSel", {HistType::kTH3F, {axisPt, axisMass, {101, 0, 101}}});
337+
histos.add("hNegativeCascadePtForEfficiencyVsNch", "hNegativeCascadePtForEfficiencyVsNch", HistType::kTH3F, {axisPt, axisMass, axisNch});
338+
histos.add("hPositiveCascadePtForEfficiencyVsNch", "hPositiveCascadePtForEfficiencyVsNch", {HistType::kTH3F, {axisPt, axisMass, axisNch}});
339+
histos.add("hNegativeCascadePtForEfficiencyVsNchBefSel", "hNegativeCascadePtForEfficiencyVsNchBefSel", HistType::kTH3F, {axisPt, axisMass, axisNch});
340+
histos.add("hPositiveCascadePtForEfficiencyVsNchBefSel", "hPositiveCascadePtForEfficiencyVsNchBefSel", {HistType::kTH3F, {axisPt, axisMass, axisNch}});
331341
}
332342

333343
if (doprocessCascadesMCforEff) {
@@ -354,6 +364,11 @@ struct Derivedcascadeanalysis {
354364
histos.add("h2dGenOmegaMinus", "h2dGenOmegaMinus", kTH2D, {{101, 0.0f, 101.0f}, axisPt});
355365
histos.add("h2dGenOmegaPlus", "h2dGenOmegaPlus", kTH2D, {{101, 0.0f, 101.0f}, axisPt});
356366

367+
histos.add("h2dGenXiMinusVsNch", "h2dGenXiMinusVsNch", kTH2D, {axisNch, axisPt});
368+
histos.add("h2dGenXiPlusVsNch", "h2dGenXiPlusVsNch", kTH2D, {axisNch, axisPt});
369+
histos.add("h2dGenOmegaMinusVsNch", "h2dGenOmegaMinusVsNch", kTH2D, {axisNch, axisPt});
370+
histos.add("h2dGenOmegaPlusVsNch", "h2dGenOmegaPlusVsNch", kTH2D, {axisNch, axisPt});
371+
357372
histos.add("h2dGenXiMinusVsCentOccupancy", "h2dGenXiMinusVsCentOccupancy", kTH3D, {axisPt, {101, 0.0f, 101.0f}, axisOccupancy});
358373
histos.add("h2dGenXiPlusVsCentOccupancy", "h2dGenXiPlusVsCentOccupancy", kTH3D, {axisPt, {101, 0.0f, 101.0f}, axisOccupancy});
359374
histos.add("h2dGenOmegaMinusVsCentOccupancy", "h2dGenOmegaMinusVsCentOccupancy", kTH3D, {axisPt, {101, 0.0f, 101.0f}, axisOccupancy});
@@ -546,11 +561,11 @@ struct Derivedcascadeanalysis {
546561
if (fillHists)
547562
histos.fill(HIST("hEventSelection"), 20.5 /* Occupancy FT0 selection */);
548563

549-
if (eventSelectionFlags.doInel1 && coll.multNTracksPVeta1() <= 1) {
564+
if (eventSelectionFlags.doInel0 && coll.multNTracksPVeta1() < 1) {
550565
return false;
551566
}
552567
if (fillHists)
553-
histos.fill(HIST("hEventSelection"), 21.5 /* INEL > 1 selection */);
568+
histos.fill(HIST("hEventSelection"), 21.5 /* INEL > 0 selection */);
554569

555570
if (fillHists) {
556571
histos.fill(HIST("hOccupancyVsOccupFt0VsCentrality"), occupancy, occupancyFT0, centrality);
@@ -837,6 +852,10 @@ struct Derivedcascadeanalysis {
837852
}
838853
}
839854

855+
histos.fill(HIST("hNCrossedRowsBachelor"), bachExtra.tpcCrossedRows());
856+
histos.fill(HIST("hNCrossedRowsNegative"), negExtra.tpcCrossedRows());
857+
histos.fill(HIST("hNCrossedRowsPositive"), posExtra.tpcCrossedRows());
858+
840859
if (std::abs(posExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows || std::abs(negExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows || std::abs(bachExtra.tpcCrossedRows()) < candidateSelectionValues.mintpccrrows)
841860
continue;
842861
histos.fill(HIST("hCandidate"), ++counter);
@@ -1015,6 +1034,7 @@ struct Derivedcascadeanalysis {
10151034
float centrality = coll.centFT0C();
10161035
if (!usePbPbCentrality)
10171036
centrality = coll.centFT0M();
1037+
float nChEta05 = coll.multNTracksPVeta1();
10181038
for (const auto& casc : Cascades) {
10191039
float mass = -1;
10201040
if (isXi)
@@ -1034,16 +1054,10 @@ struct Derivedcascadeanalysis {
10341054
if (!isNegative && !isPositive)
10351055
continue;
10361056
// To have trace of how it was before selections
1037-
if (qaFlags.doBefSelCheck) {
1038-
if (isPositive)
1039-
histos.fill(HIST("InvMassBefSel/h") + HIST(kCharge[0]) + HIST("Cascade"), casc.pt(), mass, centrality);
1040-
if (isNegative)
1041-
histos.fill(HIST("InvMassBefSel/h") + HIST(kCharge[1]) + HIST("Cascade"), casc.pt(), mass, centrality);
1042-
}
1043-
10441057
if (!casc.has_cascMCCore())
10451058
continue;
10461059
auto cascMC = casc.cascMCCore_as<soa::Join<aod::CascMCCores, aod::CascMCCollRefs>>();
1060+
float ptmc = RecoDecay::sqrtSumOfSquares(cascMC.pxMC(), cascMC.pyMC());
10471061

10481062
bool isTrueMCCascade = false;
10491063
bool isTrueMCCascadeDecay = false;
@@ -1054,7 +1068,24 @@ struct Derivedcascadeanalysis {
10541068
isCorrectLambdaDecay = true;
10551069
if (isTrueMCCascade && isCorrectLambdaDecay && ((isXi && std::abs(cascMC.pdgCodeBachelor()) == 211) || (!isXi && std::abs(cascMC.pdgCodeBachelor()) == 321)))
10561070
isTrueMCCascadeDecay = true;
1057-
float ptmc = RecoDecay::sqrtSumOfSquares(cascMC.pxMC(), cascMC.pyMC());
1071+
1072+
if (qaFlags.doBefSelCheck) {
1073+
1074+
if (isPositive) {
1075+
histos.fill(HIST("InvMassBefSel/h") + HIST(kCharge[0]) + HIST("Cascade"), casc.pt(), mass, centrality);
1076+
if (isTrueMCCascade) {
1077+
histos.fill(HIST("hPositiveCascadePtForEfficiencyVsNchBefSel"), ptmc, mass, nChEta05);
1078+
histos.fill(HIST("hPositiveCascadePtForEfficiencyBefSel"), ptmc, mass, centrality);
1079+
}
1080+
}
1081+
if (isNegative) {
1082+
histos.fill(HIST("InvMassBefSel/h") + HIST(kCharge[1]) + HIST("Cascade"), casc.pt(), mass, centrality);
1083+
if (isTrueMCCascade) {
1084+
histos.fill(HIST("hNegativeCascadePtForEfficiencyVsNchBefSel"), ptmc, mass, nChEta05);
1085+
histos.fill(HIST("hNegativeCascadePtForEfficiencyBefSel"), ptmc, mass, centrality);
1086+
}
1087+
}
1088+
}
10581089

10591090
if (!isCascadeCandidateAccepted(casc, counter, centrality))
10601091
continue;
@@ -1221,13 +1252,17 @@ struct Derivedcascadeanalysis {
12211252

12221253
if (isPositive) {
12231254
histos.fill(HIST("InvMassAfterSel/h") + HIST(kCharge[0]) + HIST("Cascade"), casc.pt(), mass, centrality);
1224-
if (isTrueMCCascadeDecay)
1255+
if (isTrueMCCascadeDecay) {
12251256
histos.fill(HIST("hPositiveCascadePtForEfficiency"), ptmc, mass, centrality);
1257+
histos.fill(HIST("hPositiveCascadePtForEfficiencyVsNch"), ptmc, mass, nChEta05);
1258+
}
12261259
}
12271260
if (isNegative) {
12281261
histos.fill(HIST("InvMassAfterSel/h") + HIST(kCharge[1]) + HIST("Cascade"), casc.pt(), mass, centrality);
1229-
if (isTrueMCCascadeDecay)
1262+
if (isTrueMCCascadeDecay) {
12301263
histos.fill(HIST("hNegativeCascadePtForEfficiency"), ptmc, mass, centrality);
1264+
histos.fill(HIST("hNegativeCascadePtForEfficiencyVsNch"), ptmc, mass, nChEta05);
1265+
}
12311266
}
12321267
if (isTrueMCCascade) {
12331268
if (isPositive)
@@ -1335,17 +1370,22 @@ struct Derivedcascadeanalysis {
13351370
auto mcCollision = cascMC.straMCCollision_as<soa::Join<aod::StraMCCollisions, aod::StraMCCollMults>>();
13361371
float centrality = 100.5f;
13371372
float occupancy = 49000;
1373+
float nChEta05 = -1;
13381374
if (listBestCollisionIdx[mcCollision.globalIndex()] > -1) {
13391375
auto collision = collisions.iteratorAt(listBestCollisionIdx[mcCollision.globalIndex()]);
13401376
centrality = collision.centFT0C();
1377+
if (!usePbPbCentrality)
1378+
centrality = collision.centFT0M();
13411379
if (useTrackOccupancyDef)
13421380
occupancy = collision.trackOccupancyInTimeRange();
13431381
if (useFT0OccupancyDef)
13441382
occupancy = collision.ft0cOccupancyInTimeRange();
1383+
nChEta05 = collision.multNTracksPVeta1();
13451384
}
13461385

13471386
if (cascMC.pdgCode() == 3312) {
13481387
histos.fill(HIST("h2dGenXiMinus"), centrality, ptmc);
1388+
histos.fill(HIST("h2dGenXiMinusVsNch"), nChEta05, ptmc);
13491389
histos.fill(HIST("h2dGenXiMinusEta"), RecoDecay::eta(std::array{cascMC.pxMC(), cascMC.pyMC(), cascMC.pzMC()}));
13501390
histos.fill(HIST("h2dGenXiMinusEtaPosDaughter"), RecoDecay::eta(std::array{cascMC.pxPosMC(), cascMC.pyPosMC(), cascMC.pzPosMC()}));
13511391
histos.fill(HIST("h2dGenXiMinusEtaNegDaughter"), RecoDecay::eta(std::array{cascMC.pxNegMC(), cascMC.pyNegMC(), cascMC.pzNegMC()}));
@@ -1355,11 +1395,13 @@ struct Derivedcascadeanalysis {
13551395
}
13561396
if (cascMC.pdgCode() == -3312) {
13571397
histos.fill(HIST("h2dGenXiPlus"), centrality, ptmc);
1398+
histos.fill(HIST("h2dGenXiPlusVsNch"), nChEta05, ptmc);
13581399
histos.fill(HIST("h2dGenXiPlusVsMultMC"), mcCollision.multMCNParticlesEta05(), ptmc);
13591400
histos.fill(HIST("h2dGenXiPlusVsCentOccupancy"), ptmc, centrality, occupancy);
13601401
}
13611402
if (cascMC.pdgCode() == 3334) {
13621403
histos.fill(HIST("h2dGenOmegaMinus"), centrality, ptmc);
1404+
histos.fill(HIST("h2dGenOmegaMinusVsNch"), nChEta05, ptmc);
13631405
histos.fill(HIST("h2dGenOmegaMinusEta"), RecoDecay::eta(std::array{cascMC.pxMC(), cascMC.pyMC(), cascMC.pzMC()}));
13641406
histos.fill(HIST("h2dGenOmegaMinusEtaPosDaughter"), RecoDecay::eta(std::array{cascMC.pxPosMC(), cascMC.pyPosMC(), cascMC.pzPosMC()}));
13651407
histos.fill(HIST("h2dGenOmegaMinusEtaNegDaughter"), RecoDecay::eta(std::array{cascMC.pxNegMC(), cascMC.pyNegMC(), cascMC.pzNegMC()}));
@@ -1369,6 +1411,7 @@ struct Derivedcascadeanalysis {
13691411
}
13701412
if (cascMC.pdgCode() == -3334) {
13711413
histos.fill(HIST("h2dGenOmegaPlus"), centrality, ptmc);
1414+
histos.fill(HIST("h2dGenOmegaPlusVsNch"), nChEta05, ptmc);
13721415
histos.fill(HIST("h2dGenOmegaPlusVsMultMC"), mcCollision.multMCNParticlesEta05(), ptmc);
13731416
histos.fill(HIST("h2dGenOmegaPlusVsCentOccupancy"), ptmc, centrality, occupancy);
13741417
}
@@ -1400,6 +1443,8 @@ struct Derivedcascadeanalysis {
14001443
biggestNContribs = collision.multPVTotalContributors();
14011444
bestCollisionIndex = collision.globalIndex();
14021445
centrality = collision.centFT0C();
1446+
if (!usePbPbCentrality)
1447+
centrality = collision.centFT0M();
14031448
}
14041449
nCollisions++;
14051450

0 commit comments

Comments
 (0)