Skip to content

Commit 6704c92

Browse files
Update derivedlambdakzeroanalysis
1 parent 3695b2c commit 6704c92

1 file changed

Lines changed: 87 additions & 113 deletions

File tree

PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

Lines changed: 87 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ struct derivedlambdakzeroanalysis {
110110
Configurable<bool> analyseAntiLambda{"analyseAntiLambda", true, "process AntiLambda-like candidates"};
111111
Configurable<bool> calculateFeeddownMatrix{"calculateFeeddownMatrix", true, "fill feeddown matrix if MC"};
112112

113-
Configurable<bool> doPPAnalysis{"doPPAnalysis", false, "if in pp, set to true"};
114113
Configurable<std::string> irSource{"irSource", "", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"};
115114
Configurable<int> centralityEstimator{"centralityEstimator", kCentFT0C, "Run 3 centrality estimator (0:CentFT0C, 1:CentFT0M, 2:CentFT0CVariant1, 3:CentMFT, 4:CentNGlobal, 5:CentFV0A)"};
116115
Configurable<bool> doUPCanalysis{"doUPCanalysis", true, "Study V0s in hadronic and UPC collisions"};
@@ -188,8 +187,7 @@ struct derivedlambdakzeroanalysis {
188187
Configurable<int> v0TypeSelection{"v0TypeSelection", 1, "select on a certain V0 type (leave negative if no selection desired)"};
189188

190189
// Selection criteria: acceptance
191-
Configurable<float> rapidityMinCut{"rapidityMinCut", -0.5, "min rapidity"};
192-
Configurable<float> rapidityMaxCut{"rapidityMaxCut", 0.5, "max rapidity"};
190+
Configurable<float> rapidityCut{"rapidityCut", 0.5, "rapidity"};
193191
Configurable<float> daughterEtaCut{"daughterEtaCut", 0.8, "max eta for daughters"};
194192

195193
// Standard 5 topological criteria
@@ -686,7 +684,7 @@ struct derivedlambdakzeroanalysis {
686684
}
687685

688686
// Event Counters
689-
histos.add("hEventSelection", "hEventSelection", kTH1D, {{21, -0.5f, +20.5f}});
687+
histos.add("hEventSelection", "hEventSelection", kTH1D, {{23, -0.5f, +22.5f}});
690688
if (isRun3) {
691689
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(1, "All collisions");
692690
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(2, "sel8 cut");
@@ -704,16 +702,13 @@ struct derivedlambdakzeroanalysis {
704702
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(14, "kNoCollInTimeRangeNarrow");
705703
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(15, "kNoCollInRofStd");
706704
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(16, "kNoCollInRofStrict");
707-
if (doPPAnalysis) {
708-
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(17, "INEL>0");
709-
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(18, "INEL>1");
710-
} else {
711-
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(17, "Below min occup.");
712-
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(18, "Above max occup.");
713-
}
714-
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(19, "Below min IR");
715-
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(20, "Above max IR");
716-
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(21, "RCT flags");
705+
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(17, "INEL>0");
706+
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(18, "INEL>1");
707+
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(19, "Below min occup.");
708+
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(20, "Above max occup.");
709+
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(21, "Below min IR");
710+
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(22, "Above max IR");
711+
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(23, "RCT flags");
717712
} else {
718713
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(1, "All collisions");
719714
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(2, "sel8 cut");
@@ -731,17 +726,15 @@ struct derivedlambdakzeroanalysis {
731726
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(14, "kNoV0MOnVsOfPileup");
732727
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(15, "kNoSPDOnVsOfPileup");
733728
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(16, "kNoSPDClsVsTklBG");
734-
if (doPPAnalysis) {
735-
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(17, "INEL>0");
736-
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(18, "INEL>1");
737-
}
729+
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(17, "INEL>0");
730+
histos.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(18, "INEL>1");
738731
}
739732

740733
histos.add("hEventCentrality", "hEventCentrality", kTH1D, {axisConfigurations.axisCentralityFine});
741734
histos.add("hCentralityVsNch", "hCentralityVsNch", kTH2D, {axisConfigurations.axisCentralityFine, axisConfigurations.axisNch});
742735
if (doEventQA) {
743736
if (isRun3) {
744-
histos.add("hEventSelectionVsCentrality", "hEventSelectionVsCentrality", kTH2D, {{21, -0.5f, +20.5f}, axisConfigurations.axisCentralityFine});
737+
histos.add("hEventSelectionVsCentrality", "hEventSelectionVsCentrality", kTH2D, {{23, -0.5f, +22.5f}, axisConfigurations.axisCentralityFine});
745738
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(1, "All collisions");
746739
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(2, "sel8 cut");
747740
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(3, "kIsTriggerTVX");
@@ -758,16 +751,13 @@ struct derivedlambdakzeroanalysis {
758751
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(14, "kNoCollInTimeRangeNarrow");
759752
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(15, "kNoCollInRofStd");
760753
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(16, "kNoCollInRofStrict");
761-
if (doPPAnalysis) {
762-
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(17, "INEL>0");
763-
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(18, "INEL>1");
764-
} else {
765-
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(17, "Below min occup.");
766-
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(18, "Above max occup.");
767-
}
768-
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(19, "Below min IR");
769-
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(20, "Above max IR");
770-
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(21, "RCT flags");
754+
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(17, "INEL>0");
755+
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(18, "INEL>1");
756+
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(19, "Below min occup.");
757+
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(20, "Above max occup.");
758+
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(21, "Below min IR");
759+
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(22, "Above max IR");
760+
histos.get<TH2>(HIST("hEventSelectionVsCentrality"))->GetXaxis()->SetBinLabel(23, "RCT flags");
771761

772762
histos.add("hCentralityVsNGlobal", "hCentralityVsNGlobal", kTH2D, {axisConfigurations.axisCentralityFine, axisConfigurations.axisNch});
773763
histos.add("hEventCentVsMultFT0M", "hEventCentVsMultFT0M", kTH2D, {axisConfigurations.axisCentralityFine, axisConfigurations.axisMultFT0M});
@@ -1382,11 +1372,9 @@ struct derivedlambdakzeroanalysis {
13821372
BITSET(bitMap, selDCAV0Dau);
13831373

13841374
// rapidity
1385-
if (rapidityLambda > v0Selections.rapidityMinCut &&
1386-
rapidityLambda < v0Selections.rapidityMaxCut)
1375+
if (std::abs(rapidityLambda) < v0Selections.rapidityCut)
13871376
BITSET(bitMap, selLambdaRapidity);
1388-
if (rapidityK0Short > v0Selections.rapidityMinCut &&
1389-
rapidityK0Short < v0Selections.rapidityMaxCut)
1377+
if (std::abs(rapidityK0Short) < v0Selections.rapidityCut)
13901378
BITSET(bitMap, selK0ShortRapidity);
13911379

13921380
//
@@ -2245,8 +2233,7 @@ struct derivedlambdakzeroanalysis {
22452233
if (std::abs(v0mother.pdgCode()) == o2::constants::physics::Pdg::kXi0)
22462234
rapidityXi = RecoDecay::y(std::array{v0mother.px(), v0mother.py(), v0mother.pz()}, o2::constants::physics::MassXi0);
22472235

2248-
if (rapidityXi < v0Selections.rapidityMinCut ||
2249-
rapidityXi > v0Selections.rapidityMaxCut)
2236+
if (std::fabs(rapidityXi) > 0.5f)
22502237
return; // not a valid mother rapidity (PDG selection is later)
22512238

22522239
// __________________________________________
@@ -2450,47 +2437,44 @@ struct derivedlambdakzeroanalysis {
24502437
}
24512438
}
24522439

2453-
if (doPPAnalysis) { // we are in pp
2454-
if (eventSelections.requireINEL0 && collision.multNTracksPVeta1() < 1) {
2455-
return false;
2456-
}
2457-
if (fillHists) {
2458-
histos.fill(HIST("hEventSelection"), 16 /* INEL > 0 */);
2459-
if (doEventQA) {
2460-
histos.fill(HIST("hEventSelectionVsCentrality"), 16 /* INEL > 0 */, centrality);
2461-
}
2440+
if (eventSelections.requireINEL0 && collision.multNTracksPVeta1() < 1) {
2441+
return false;
2442+
}
2443+
if (fillHists) {
2444+
histos.fill(HIST("hEventSelection"), 16 /* INEL > 0 */);
2445+
if (doEventQA) {
2446+
histos.fill(HIST("hEventSelectionVsCentrality"), 16 /* INEL > 0 */, centrality);
24622447
}
2448+
}
24632449

2464-
if (eventSelections.requireINEL1 && collision.multNTracksPVeta1() < 2) {
2465-
return false;
2466-
}
2467-
if (fillHists) {
2468-
histos.fill(HIST("hEventSelection"), 17 /* INEL > 1 */);
2469-
if (doEventQA) {
2470-
histos.fill(HIST("hEventSelectionVsCentrality"), 17 /* INEL > 1 */, centrality);
2471-
}
2450+
if (eventSelections.requireINEL1 && collision.multNTracksPVeta1() < 2) {
2451+
return false;
2452+
}
2453+
if (fillHists) {
2454+
histos.fill(HIST("hEventSelection"), 17 /* INEL > 1 */);
2455+
if (doEventQA) {
2456+
histos.fill(HIST("hEventSelectionVsCentrality"), 17 /* INEL > 1 */, centrality);
24722457
}
2458+
}
24732459

2474-
} else { // we are in Pb-Pb
2475-
float collisionOccupancy = eventSelections.useFT0CbasedOccupancy ? collision.ft0cOccupancyInTimeRange() : collision.trackOccupancyInTimeRange();
2476-
if (eventSelections.minOccupancy >= 0 && collisionOccupancy < eventSelections.minOccupancy) {
2477-
return false;
2478-
}
2479-
if (fillHists) {
2480-
histos.fill(HIST("hEventSelection"), 16 /* Below min occupancy */);
2481-
if (doEventQA) {
2482-
histos.fill(HIST("hEventSelectionVsCentrality"), 16 /* Below min occupancy */, centrality);
2483-
}
2460+
float collisionOccupancy = eventSelections.useFT0CbasedOccupancy ? collision.ft0cOccupancyInTimeRange() : collision.trackOccupancyInTimeRange();
2461+
if (eventSelections.minOccupancy >= 0 && collisionOccupancy < eventSelections.minOccupancy) {
2462+
return false;
2463+
}
2464+
if (fillHists) {
2465+
histos.fill(HIST("hEventSelection"), 18 /* Below min occupancy */);
2466+
if (doEventQA) {
2467+
histos.fill(HIST("hEventSelectionVsCentrality"), 18 /* Below min occupancy */, centrality);
24842468
}
2469+
}
24852470

2486-
if (eventSelections.maxOccupancy >= 0 && collisionOccupancy > eventSelections.maxOccupancy) {
2487-
return false;
2488-
}
2489-
if (fillHists) {
2490-
histos.fill(HIST("hEventSelection"), 17 /* Above max occupancy */);
2491-
if (doEventQA) {
2492-
histos.fill(HIST("hEventSelectionVsCentrality"), 17 /* Above max occupancy */, centrality);
2493-
}
2471+
if (eventSelections.maxOccupancy >= 0 && collisionOccupancy > eventSelections.maxOccupancy) {
2472+
return false;
2473+
}
2474+
if (fillHists) {
2475+
histos.fill(HIST("hEventSelection"), 19 /* Above max occupancy */);
2476+
if (doEventQA) {
2477+
histos.fill(HIST("hEventSelectionVsCentrality"), 19 /* Above max occupancy */, centrality);
24942478
}
24952479
}
24962480

@@ -2500,29 +2484,29 @@ struct derivedlambdakzeroanalysis {
25002484
return false;
25012485
}
25022486
if (fillHists) {
2503-
histos.fill(HIST("hEventSelection"), 18 /* Below min IR */);
2487+
histos.fill(HIST("hEventSelection"), 20 /* Below min IR */);
25042488
if (doEventQA) {
2505-
histos.fill(HIST("hEventSelectionVsCentrality"), 18 /* Below min IR */, centrality);
2489+
histos.fill(HIST("hEventSelectionVsCentrality"), 20 /* Below min IR */, centrality);
25062490
}
25072491
}
25082492

25092493
if (eventSelections.maxIR >= 0 && interactionRate > eventSelections.maxIR) {
25102494
return false;
25112495
}
25122496
if (fillHists) {
2513-
histos.fill(HIST("hEventSelection"), 19 /* Above max IR */);
2497+
histos.fill(HIST("hEventSelection"), 21 /* Above max IR */);
25142498
if (doEventQA) {
2515-
histos.fill(HIST("hEventSelectionVsCentrality"), 19 /* Above max IR */, centrality);
2499+
histos.fill(HIST("hEventSelectionVsCentrality"), 21 /* Above max IR */, centrality);
25162500
}
25172501
}
25182502

25192503
if (!rctConfigurations.cfgRCTLabel.value.empty() && !rctFlagsChecker(collision)) {
25202504
return false;
25212505
}
25222506
if (fillHists) {
2523-
histos.fill(HIST("hEventSelection"), 20 /* Pass CBT condition */);
2507+
histos.fill(HIST("hEventSelection"), 22 /* Pass CBT condition */);
25242508
if (doEventQA) {
2525-
histos.fill(HIST("hEventSelectionVsCentrality"), 20 /* Pass CBT condition */, centrality);
2509+
histos.fill(HIST("hEventSelectionVsCentrality"), 22 /* Pass CBT condition */, centrality);
25262510
}
25272511
}
25282512

@@ -2617,19 +2601,17 @@ struct derivedlambdakzeroanalysis {
26172601
if (fillHists)
26182602
histos.fill(HIST("hEventSelection"), 15 /* No beam-gas according to cluster-vs-tracklet correlation */);
26192603

2620-
if (doPPAnalysis) { // we are in pp
2621-
if (eventSelections.requireINEL0 && collision.multNTracksPVeta1() < 1) {
2622-
return false;
2623-
}
2624-
if (fillHists)
2625-
histos.fill(HIST("hEventSelection"), 16 /* INEL > 0 */);
2604+
if (eventSelections.requireINEL0 && collision.multNTracksPVeta1() < 1) {
2605+
return false;
2606+
}
2607+
if (fillHists)
2608+
histos.fill(HIST("hEventSelection"), 16 /* INEL > 0 */);
26262609

2627-
if (eventSelections.requireINEL1 && collision.multNTracksPVeta1() < 2) {
2628-
return false;
2629-
}
2630-
if (fillHists)
2631-
histos.fill(HIST("hEventSelection"), 17 /* INEL > 1 */);
2610+
if (eventSelections.requireINEL1 && collision.multNTracksPVeta1() < 2) {
2611+
return false;
26322612
}
2613+
if (fillHists)
2614+
histos.fill(HIST("hEventSelection"), 17 /* INEL > 1 */);
26332615
}
26342616

26352617
return true;
@@ -2685,7 +2667,7 @@ struct derivedlambdakzeroanalysis {
26852667

26862668
if (qaCentrality) {
26872669
auto hRawCentrality = histos.get<TH1>(HIST("hRawCentrality"));
2688-
centrality = hRawCentrality->GetBinContent(hRawCentrality->FindBin(doPPAnalysis ? collision.multFT0A() + collision.multFT0C() : collision.multFT0C()));
2670+
centrality = hRawCentrality->GetBinContent(hRawCentrality->FindBin(centralityEstimator == kCentFT0M ? collision.multFT0A() + collision.multFT0C() : collision.multFT0C()));
26892671
}
26902672

26912673
if (doUPCanalysis) {
@@ -2752,14 +2734,12 @@ struct derivedlambdakzeroanalysis {
27522734
if (eventSelections.applyZVtxSelOnMCPV && std::abs(mcCollision.posZ()) > eventSelections.maxZVtxPosition) {
27532735
continue;
27542736
}
2755-
if (doPPAnalysis) { // we are in pp
2756-
if (eventSelections.requireINEL0 && mcCollision.multMCNParticlesEta10() < 1) {
2757-
continue;
2758-
}
2737+
if (eventSelections.requireINEL0 && mcCollision.multMCNParticlesEta10() < 1) {
2738+
continue;
2739+
}
27592740

2760-
if (eventSelections.requireINEL1 && mcCollision.multMCNParticlesEta10() < 2) {
2761-
continue;
2762-
}
2741+
if (eventSelections.requireINEL1 && mcCollision.multMCNParticlesEta10() < 2) {
2742+
continue;
27632743
}
27642744

27652745
histos.fill(HIST("hGenEvents"), mcCollision.multMCNParticlesEta05(), 0 /* all gen. events*/);
@@ -2997,22 +2977,19 @@ struct derivedlambdakzeroanalysis {
29972977
else if (std::abs(v0MC.pdgCode()) == PDG_t::kLambda0)
29982978
ymc = v0MC.rapidityMC(1);
29992979

3000-
if (ymc < v0Selections.rapidityMinCut ||
3001-
ymc > v0Selections.rapidityMaxCut)
2980+
if (std::abs(ymc) > v0Selections.rapidityCut)
30022981
continue;
30032982

30042983
auto mcCollision = v0MC.template straMCCollision_as<soa::Join<aod::StraMCCollisions, aod::StraMCCollMults>>();
30052984
if (eventSelections.applyZVtxSelOnMCPV && std::abs(mcCollision.posZ()) > eventSelections.maxZVtxPosition) {
30062985
continue;
30072986
}
3008-
if (doPPAnalysis) { // we are in pp
3009-
if (eventSelections.requireINEL0 && mcCollision.multMCNParticlesEta10() < 1) {
3010-
continue;
3011-
}
2987+
if (eventSelections.requireINEL0 && mcCollision.multMCNParticlesEta10() < 1) {
2988+
continue;
2989+
}
30122990

3013-
if (eventSelections.requireINEL1 && mcCollision.multMCNParticlesEta10() < 2) {
3014-
continue;
3015-
}
2991+
if (eventSelections.requireINEL1 && mcCollision.multMCNParticlesEta10() < 2) {
2992+
continue;
30162993
}
30172994

30182995
float centrality = 100.5f;
@@ -3063,22 +3040,19 @@ struct derivedlambdakzeroanalysis {
30633040
else if (std::abs(cascMC.pdgCode()) == PDG_t::kOmegaMinus)
30643041
ymc = cascMC.rapidityMC(2);
30653042

3066-
if (ymc < v0Selections.rapidityMinCut ||
3067-
ymc > v0Selections.rapidityMaxCut)
3043+
if (std::abs(ymc) > v0Selections.rapidityCut)
30683044
continue;
30693045

30703046
auto mcCollision = cascMC.template straMCCollision_as<soa::Join<aod::StraMCCollisions, aod::StraMCCollMults>>();
30713047
if (eventSelections.applyZVtxSelOnMCPV && std::abs(mcCollision.posZ()) > eventSelections.maxZVtxPosition) {
30723048
continue;
30733049
}
3074-
if (doPPAnalysis) { // we are in pp
3075-
if (eventSelections.requireINEL0 && mcCollision.multMCNParticlesEta10() < 1) {
3076-
continue;
3077-
}
3050+
if (eventSelections.requireINEL0 && mcCollision.multMCNParticlesEta10() < 1) {
3051+
continue;
3052+
}
30783053

3079-
if (eventSelections.requireINEL1 && mcCollision.multMCNParticlesEta10() < 2) {
3080-
continue;
3081-
}
3054+
if (eventSelections.requireINEL1 && mcCollision.multMCNParticlesEta10() < 2) {
3055+
continue;
30823056
}
30833057

30843058
float centrality = 100.5f;

0 commit comments

Comments
 (0)