Skip to content

Commit f697382

Browse files
lhusovaLucia Anna Tarasovicova
andauthored
[PWGLF] Changes in derivedcascadeanalysis.cxx (#9767)
Co-authored-by: Lucia Anna Tarasovicova <lucia.anna.husova@cern.ch>
1 parent dcdf65c commit f697382

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ struct Derivedcascadeanalysis {
117117
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"};
118118
Configurable<bool> doMultiplicityCorrCut{"doMultiplicityCorrCut", false, "Enable multiplicity vs centrality correlation cut"};
119119
Configurable<bool> doInel0{"doInel0", true, "Enable INEL > 0 selection"};
120+
Configurable<bool> doITSallLayersCut{"doITSallLayersCut", false, "Enable event selection which rejects collisions when ITS was rebooting."};
121+
Configurable<bool> doInel0MCGen{"doInel0MCGen", true, "Enable INEL > 0 selection for MC gen events"};
122+
Configurable<bool> applyZVtxSelOnMCPV{"applyZVtxSelOnMCPV", false, "Enable z vertex cut selection on generated events"};
120123
Configurable<float> zVertexCut{"zVertexCut", 10, "Cut on PV position"};
121124
} eventSelectionFlags;
122125

@@ -342,7 +345,7 @@ struct Derivedcascadeanalysis {
342345
}
343346

344347
if (doprocessCascadesMCforEff) {
345-
histos.add("hGenEvents", "", HistType::kTH2F, {{axisNch}, {2, 0, 2}});
348+
histos.add("hGenEvents", "", HistType::kTH2F, {{axisNch}, {4, 0, 4}});
346349
histos.add("hCentralityVsMultMC", "", kTH2F, {{101, 0.0f, 101.0f}, axisNch});
347350
histos.add("hRecMultVsMultMC", "", kTH2F, {axisNch, axisNch});
348351
histos.add("hGenMultMCFT0C", "", kTH1F, {{500, 0, 5000}});
@@ -381,10 +384,10 @@ struct Derivedcascadeanalysis {
381384
histos.add("h2dGenOmegaMinusVsNchVsOccupancy", "h2dGenOmegaMinusVsNchVsOccupancy", kTH3D, {axisPt, axisNch, axisOccupancy});
382385
histos.add("h2dGenOmegaPlusVsNchVsOccupancy", "h2dGenOmegaPlusVsNchVsOccupancy", kTH3D, {axisPt, axisNch, axisOccupancy});
383386

384-
histos.add("h2dGenXiMinusVsMultMC", "h2dGenXiMinusVsMultMC", kTH2D, {axisNch, axisPt});
385-
histos.add("h2dGenXiPlusVsMultMC", "h2dGenXiPlusVsMultMC", kTH2D, {axisNch, axisPt});
386-
histos.add("h2dGenOmegaMinusVsMultMC", "h2dGenOmegaMinusVsMultMC", kTH2D, {axisNch, axisPt});
387-
histos.add("h2dGenOmegaPlusVsMultMC", "h2dGenOmegaPlusVsMultMC", kTH2D, {axisNch, axisPt});
387+
histos.add("h2dGenXiMinusVsMultMCVsCentrality", "h2dGenXiMinusVsMultMCVsCentrality", kTH3D, {axisNch, {101, 0.0f, 101.0f}, axisPt});
388+
histos.add("h2dGenXiPlusVsMultMCVsCentrality", "h2dGenXiPlusVsMultMCVsCentrality", kTH3D, {axisNch, {101, 0.0f, 101.0f}, axisPt});
389+
histos.add("h2dGenOmegaMinusVsMultMCVsCentrality", "h2dGenOmegaMinusVsMultMCVsCentrality", kTH3D, {axisNch, {101, 0.0f, 101.0f}, axisPt});
390+
histos.add("h2dGenOmegaPlusVsMultMCVsCentrality", "h2dGenOmegaPlusVsMultMCVsCentrality", kTH3D, {axisNch, {101, 0.0f, 101.0f}, axisPt});
388391
}
389392
}
390393
template <typename TCascade>
@@ -556,8 +559,11 @@ struct Derivedcascadeanalysis {
556559
if (fillHists)
557560
histos.fill(HIST("hEventSelection"), 18.5 /*rejects a collision if there are other events within the same ITS ROF above mult threshold*/);
558561

562+
if (eventSelectionFlags.doITSallLayersCut && !coll.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
563+
return false;
564+
}
559565
if (fillHists)
560-
histos.fill(HIST("hEventSelection"), 19.5 /*currently no cut applied*/);
566+
histos.fill(HIST("hEventSelection"), 19.5 /*rejects collisions if ITS was in rebooting stage*/);
561567

562568
float occupancyFT0 = coll.ft0cOccupancyInTimeRange();
563569
if (minOccupancyFT0 > 0 && occupancyFT0 < minOccupancyFT0) {
@@ -1385,6 +1391,14 @@ struct Derivedcascadeanalysis {
13851391
continue;
13861392

13871393
auto mcCollision = cascMC.straMCCollision_as<soa::Join<aod::StraMCCollisions, aod::StraMCCollMults>>();
1394+
if (eventSelectionFlags.applyZVtxSelOnMCPV && std::abs(mcCollision.posZ()) > eventSelectionFlags.zVertexCut) {
1395+
continue;
1396+
}
1397+
1398+
if (eventSelectionFlags.doInel0MCGen && mcCollision.multMCNParticlesEta10() < 1) {
1399+
continue;
1400+
}
1401+
13881402
float centrality = 100.5f;
13891403
float occupancy = 49000;
13901404
float nChEta05 = -1;
@@ -1411,14 +1425,14 @@ struct Derivedcascadeanalysis {
14111425
histos.fill(HIST("h2dGenXiMinusEtaPosDaughter"), RecoDecay::eta(std::array{cascMC.pxPosMC(), cascMC.pyPosMC(), cascMC.pzPosMC()}));
14121426
histos.fill(HIST("h2dGenXiMinusEtaNegDaughter"), RecoDecay::eta(std::array{cascMC.pxNegMC(), cascMC.pyNegMC(), cascMC.pzNegMC()}));
14131427
histos.fill(HIST("h2dGenXiMinusEtaBach"), RecoDecay::eta(std::array{cascMC.pxBachMC(), cascMC.pyBachMC(), cascMC.pzBachMC()}));
1414-
histos.fill(HIST("h2dGenXiMinusVsMultMC"), mcCollision.multMCNParticlesEta05(), ptmc);
1428+
histos.fill(HIST("h2dGenXiMinusVsMultMCVsCentrality"), mcCollision.multMCNParticlesEta05(), centrality, ptmc);
14151429
histos.fill(HIST("h2dGenXiMinusVsCentOccupancy"), ptmc, centrality, occupancy);
14161430
histos.fill(HIST("h2dGenXiMinusVsNchVsOccupancy"), ptmc, nChEta05, occupancy);
14171431
}
14181432
if (cascMC.pdgCode() == -3312) {
14191433
histos.fill(HIST("h2dGenXiPlus"), centrality, ptmc);
14201434
histos.fill(HIST("h2dGenXiPlusVsNch"), nChEta05, ptmc);
1421-
histos.fill(HIST("h2dGenXiPlusVsMultMC"), mcCollision.multMCNParticlesEta05(), ptmc);
1435+
histos.fill(HIST("h2dGenXiPlusVsMultMCVsCentrality"), mcCollision.multMCNParticlesEta05(), centrality, ptmc);
14221436
histos.fill(HIST("h2dGenXiPlusVsCentOccupancy"), ptmc, centrality, occupancy);
14231437
histos.fill(HIST("h2dGenXiPlusVsNchVsOccupancy"), ptmc, nChEta05, occupancy);
14241438
}
@@ -1429,14 +1443,14 @@ struct Derivedcascadeanalysis {
14291443
histos.fill(HIST("h2dGenOmegaMinusEtaPosDaughter"), RecoDecay::eta(std::array{cascMC.pxPosMC(), cascMC.pyPosMC(), cascMC.pzPosMC()}));
14301444
histos.fill(HIST("h2dGenOmegaMinusEtaNegDaughter"), RecoDecay::eta(std::array{cascMC.pxNegMC(), cascMC.pyNegMC(), cascMC.pzNegMC()}));
14311445
histos.fill(HIST("h2dGenOmegaMinusEtaBach"), RecoDecay::eta(std::array{cascMC.pxBachMC(), cascMC.pyBachMC(), cascMC.pzBachMC()}));
1432-
histos.fill(HIST("h2dGenOmegaMinusVsMultMC"), mcCollision.multMCNParticlesEta05(), ptmc);
1446+
histos.fill(HIST("h2dGenOmegaMinusVsMultMCVsCentrality"), mcCollision.multMCNParticlesEta05(), centrality, ptmc);
14331447
histos.fill(HIST("h2dGenOmegaMinusVsCentOccupancy"), ptmc, centrality, occupancy);
14341448
histos.fill(HIST("h2dGenOmegaMinusVsNchVsOccupancy"), ptmc, nChEta05, occupancy);
14351449
}
14361450
if (cascMC.pdgCode() == -3334) {
14371451
histos.fill(HIST("h2dGenOmegaPlus"), centrality, ptmc);
14381452
histos.fill(HIST("h2dGenOmegaPlusVsNch"), nChEta05, ptmc);
1439-
histos.fill(HIST("h2dGenOmegaPlusVsMultMC"), mcCollision.multMCNParticlesEta05(), ptmc);
1453+
histos.fill(HIST("h2dGenOmegaPlusVsMultMCVsCentrality"), mcCollision.multMCNParticlesEta05(), centrality, ptmc);
14401454
histos.fill(HIST("h2dGenOmegaPlusVsCentOccupancy"), ptmc, centrality, occupancy);
14411455
histos.fill(HIST("h2dGenOmegaPlusVsNchVsOccupancy"), ptmc, nChEta05, occupancy);
14421456
}
@@ -1451,6 +1465,16 @@ struct Derivedcascadeanalysis {
14511465
for (auto const& mcCollision : mcCollisions) {
14521466
histos.fill(HIST("hGenEvents"), mcCollision.multMCNParticlesEta05(), 0.5 /* all gen. events*/);
14531467

1468+
if (eventSelectionFlags.applyZVtxSelOnMCPV && std::abs(mcCollision.posZ()) > eventSelectionFlags.zVertexCut) {
1469+
continue;
1470+
}
1471+
histos.fill(HIST("hGenEvents"), mcCollision.multMCNParticlesEta05(), 1.5 /* gen. events with vertex cut*/);
1472+
1473+
if (eventSelectionFlags.doInel0MCGen && mcCollision.multMCNParticlesEta10() < 1) {
1474+
continue;
1475+
}
1476+
histos.fill(HIST("hGenEvents"), mcCollision.multMCNParticlesEta05(), 2.5 /* gen. events with INEL>0t*/);
1477+
14541478
auto groupedCollisions = collisions.sliceBy(perMcCollision, mcCollision.globalIndex());
14551479
// Check if there is at least one of the reconstructed collisions associated to this MC collision
14561480
// If so, we consider it
@@ -1492,7 +1516,7 @@ struct Derivedcascadeanalysis {
14921516
histos.fill(HIST("hGenMCNParticlesEta10"), mcCollision.multMCNParticlesEta10());
14931517

14941518
if (atLeastOne) {
1495-
histos.fill(HIST("hGenEvents"), mcCollision.multMCNParticlesEta05(), 1.5 /* at least 1 rec. event*/);
1519+
histos.fill(HIST("hGenEvents"), mcCollision.multMCNParticlesEta05(), 3.5 /* at least 1 rec. event*/);
14961520
}
14971521
}
14981522
return listBestCollisionIdx;

0 commit comments

Comments
 (0)