Skip to content

Commit 0c387ef

Browse files
authored
[PWGLF] Fix event selection in MC table for spin correlation and add new process function for high mass resonance ananlysis (#16220)
1 parent ee1fb03 commit 0c387ef

3 files changed

Lines changed: 416 additions & 18 deletions

File tree

PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ struct lambdaspincorrelation {
114114
{
115115
rctChecker.init(rctCut.cfgEvtRCTFlagCheckerLabel, rctCut.cfgEvtRCTFlagCheckerZDCCheck, rctCut.cfgEvtRCTFlagCheckerLimitAcceptAsBad);
116116
AxisSpec thnAxisInvMass{iMNbins, lbinIM, hbinIM, "#it{M} (GeV/#it{c}^{2})"};
117-
histos.add("hEvtSelInfo", "hEvtSelInfo", kTH1F, {{5, 0, 5.0}});
117+
histos.add("hEvtSelInfo", "hEvtSelInfo", kTH1F, {{10, 0, 10.0}});
118118
histos.add("hLambdaMass", "hLambdaMass", kTH1F, {thnAxisInvMass});
119119
histos.add("hV0Info", "hV0Info", kTH1F, {{5, 0, 5.0}});
120120
}
@@ -234,6 +234,46 @@ struct lambdaspincorrelation {
234234
return {lambdaTag, aLambdaTag, true}; // Valid candidate
235235
}
236236

237+
std::tuple<int, int, bool> getLambdaTagsMC(const auto& v0, const auto& collision)
238+
{
239+
auto postrack = v0.template posTrack_as<AllTrackCandidatesMC>();
240+
auto negtrack = v0.template negTrack_as<AllTrackCandidatesMC>();
241+
242+
int lambdaTag = 0;
243+
int aLambdaTag = 0;
244+
245+
const auto signpos = postrack.sign();
246+
const auto signneg = negtrack.sign();
247+
248+
if (signpos < 0 || signneg > 0) {
249+
return {0, 0, false};
250+
}
251+
252+
if (isSelectedV0Daughter(v0, postrack, 0) &&
253+
isSelectedV0Daughter(v0, negtrack, 1) &&
254+
v0.mLambda() > lbinIM &&
255+
v0.mLambda() < hbinIM) {
256+
lambdaTag = 1;
257+
}
258+
259+
if (isSelectedV0Daughter(v0, negtrack, 0) &&
260+
isSelectedV0Daughter(v0, postrack, 1) &&
261+
v0.mAntiLambda() > lbinIM &&
262+
v0.mAntiLambda() < hbinIM) {
263+
aLambdaTag = 1;
264+
}
265+
266+
if (!lambdaTag && !aLambdaTag) {
267+
return {0, 0, false};
268+
}
269+
270+
if (!selectionV0(collision, v0)) {
271+
return {0, 0, false};
272+
}
273+
274+
return {lambdaTag, aLambdaTag, true};
275+
}
276+
237277
ROOT::Math::PxPyPzMVector lambda, antiLambda, proton, pion, antiProton, antiPion;
238278
ROOT::Math::PxPyPzMVector lambdaDummy, pionDummy, protonDummy;
239279

@@ -474,6 +514,7 @@ struct lambdaspincorrelation {
474514
ResoV0s const& V0s,
475515
aod::McParticles const&)
476516
{
517+
histos.fill(HIST("hEvtSelInfo"), 0.5);
477518
if (collisions.size() == 1) {
478519

479520
for (const auto& collision : collisions) {
@@ -498,7 +539,7 @@ struct lambdaspincorrelation {
498539
auto vz = collision.posZ();
499540
int occupancy = collision.trackOccupancyInTimeRange();
500541

501-
histos.fill(HIST("hEvtSelInfo"), 0.5);
542+
histos.fill(HIST("hEvtSelInfo"), 1.5);
502543

503544
if (std::abs(collision.posZ()) < cfgCutVertex &&
504545
(!rctCut.requireRCTFlagChecker || rctChecker(collision)) &&
@@ -513,29 +554,27 @@ struct lambdaspincorrelation {
513554
(!useGoodITSLayersAll || collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) &&
514555
occupancy < cfgCutOccupancy) {
515556

516-
histos.fill(HIST("hEvtSelInfo"), 1.5);
557+
histos.fill(HIST("hEvtSelInfo"), 2.5);
517558

518559
for (const auto& v0 : V0s) {
519-
520-
auto [lambdaTag, aLambdaTag, isValid] = getLambdaTags(v0, collision);
560+
histos.fill(HIST("hEvtSelInfo"), 3.5); // all V0s seen
561+
auto [lambdaTag, aLambdaTag, isValid] = getLambdaTagsMC(v0, collision);
521562

522563
if (isValid) {
523-
564+
histos.fill(HIST("hEvtSelInfo"), 4.5); // passed getLambdaTagsMC
524565
auto postrack1 = v0.template posTrack_as<AllTrackCandidatesMC>();
525566
auto negtrack1 = v0.template negTrack_as<AllTrackCandidatesMC>();
526567

527568
// Reject candidates whose reconstructed daughters are not MC-labelled.
528569
if (!postrack1.has_mcParticle() || !negtrack1.has_mcParticle()) {
570+
histos.fill(HIST("hEvtSelInfo"), 5.5); // rejected: no MC label
529571
continue;
530572
}
531573

532-
auto mcPos = postrack1.mcParticle();
533-
auto mcNeg = negtrack1.mcParticle();
574+
// auto mcPos = postrack1.mcParticle();
575+
// auto mcNeg = negtrack1.mcParticle();
534576

535-
// Reject gap/background-event daughters.
536-
if (mcPos.fromBackgroundEvent() || mcNeg.fromBackgroundEvent()) {
537-
continue;
538-
}
577+
histos.fill(HIST("hEvtSelInfo"), 6.5); // rejected: no MC label
539578

540579
if (lambdaTag) {
541580
histos.fill(HIST("hV0Info"), 0.5);
@@ -626,7 +665,7 @@ struct lambdaspincorrelation {
626665
}
627666

628667
if (numbV0 > 1 && v0Cospa.size() > 1) {
629-
histos.fill(HIST("hEvtSelInfo"), 2.5);
668+
histos.fill(HIST("hEvtSelInfo"), 7.5);
630669

631670
lambdaEventmc(centrality, vz);
632671
auto indexEvent = lambdaEventmc.lastIndex();

0 commit comments

Comments
 (0)