Skip to content

Commit 0d17f93

Browse files
[PWGCF] FemtoUniverse -- Add extra histograms for K0S and Lambda. (#16117)
1 parent 597d808 commit 0d17f93

1 file changed

Lines changed: 82 additions & 42 deletions

File tree

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Helicity.cxx

Lines changed: 82 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,21 @@ struct FemtoUniversePairTaskTrackV0Helicity {
182182
} twotracksconfigs;
183183

184184
/// Helicity ranges and configurables
185-
Configurable<bool> cfgProcessHel{"cfgProcessHel", true, "Process particle pairs from all helicity ranges"};
186-
Configurable<bool> cfgProcessHel1{"cfgProcessHel1", false, "Process particle pairs from the helicity range 1"}; // 1.0 >= cosineTheta >= 0.1
187-
Configurable<bool> cfgProcessHel2{"cfgProcessHel2", false, "Process particle pairs from the helicity range 2"}; // 0.1 > cosineTheta >= -0.1
188-
Configurable<bool> cfgProcessHel3{"cfgProcessHel3", false, "Process particle pairs from the helicity range 3"}; // -0.1 > cosineTheta >= -0.5
189-
Configurable<bool> cfgProcessHel4{"cfgProcessHel4", false, "Process particle pairs from the helicity range 4"}; // -0.5 > cosineTheta >= -1.0
190-
ConfigurableAxis confInvMassMotherpTBinsHel{"confInvMassMotherpTBinsHel", {5, 0, 5}, "pT binning in the pT vs. InvMassMother plot for helicity"};
191-
ConfigurableAxis confInvMassMotherBinsHel{"confInvMassMotherBinsHel", {1000, 0.8, 1.4}, "InvMassMother binning in the pT vs. InvMassMother plot for helicity"};
192-
ConfigurableAxis confInvMassK0Short{"confInvMassK0s", {1000, 0.2, 0.8}, "Invariant mass binning for K0 Short"};
185+
struct : o2::framework::ConfigurableGroup {
186+
Configurable<bool> cfgProcessHel{"cfgProcessHel", true, "Process particle pairs from all helicity ranges"};
187+
Configurable<bool> cfgProcessHel1{"cfgProcessHel1", false, "Process particle pairs from the helicity range 1"}; // 1.0 >= cosineTheta >= 0.1
188+
Configurable<bool> cfgProcessHel2{"cfgProcessHel2", false, "Process particle pairs from the helicity range 2"}; // 0.1 > cosineTheta >= -0.1
189+
Configurable<bool> cfgProcessHel3{"cfgProcessHel3", false, "Process particle pairs from the helicity range 3"}; // -0.1 > cosineTheta >= -0.5
190+
Configurable<bool> cfgProcessHel4{"cfgProcessHel4", false, "Process particle pairs from the helicity range 4"}; // -0.5 > cosineTheta >= -1.0
191+
Configurable<float> confLimitHel0{"confLimitHel0", 1.0, "Highest value of the helicity angle"};
192+
Configurable<float> confLimitHel1{"confLimitHel1", 0.1, "Border value between ranges 1 and 2"};
193+
Configurable<float> confLimitHel2{"confLimitHel2", -0.1, "Border value between ranges 2 and 3"};
194+
Configurable<float> confLimitHel3{"confLimitHel3", -0.5, "Border value between ranges 3 and 4"};
195+
Configurable<float> confLimitHel4{"confLimitHel4", -1.0, "Lowest value of the helicity angle"};
196+
ConfigurableAxis confInvMassMotherpTBinsHel{"confInvMassMotherpTBinsHel", {5, 0, 5}, "pT binning in the pT vs. InvMassMother plot for helicity"};
197+
ConfigurableAxis confInvMassMotherBinsHel{"confInvMassMotherBinsHel", {1000, 0.8, 1.4}, "InvMassMother binning in the pT vs. InvMassMother plot for helicity"};
198+
ConfigurableAxis confInvMassK0Short{"confInvMassK0Short", {1000, 0.2, 0.8}, "Invariant mass binning for K0 Short"}; // o2-linter: disable=lowerCamelCase (consistency with generally accepted particle name)
199+
} helicityconfigs;
193200

194201
/// Efficiency
195202
Configurable<std::string> confLocalEfficiency{"confLocalEfficiency", "", "Local path to efficiency .root file"};
@@ -319,11 +326,20 @@ struct FemtoUniversePairTaskTrackV0Helicity {
319326
thetaRegistry.add("Theta/NegativeChild/hThetaPt", " ; p_{T} (GeV/#it{c}); cos(#theta)", kTH2F, {{100, 0, 10}, {110, -1.1, 1.1}});
320327
thetaRegistry.add("Theta/NegativeChild/hThetaEta", " ; #eta; cos(#theta)", kTH2F, {{100, -1, 1}, {110, -1.1, 1.1}});
321328
thetaRegistry.add("Theta/NegativeChild/hThetaPhi", " ; #phi; cos(#theta)", kTH2F, {{100, -1, 7}, {110, -1.1, 1.1}});
322-
thetaRegistry.add("Theta/Mother/hInvMassMotherHel1", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {confInvMassMotherpTBinsHel, confInvMassMotherBinsHel});
323-
thetaRegistry.add("Theta/Mother/hInvMassMotherHel2", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {confInvMassMotherpTBinsHel, confInvMassMotherBinsHel});
324-
thetaRegistry.add("Theta/Mother/hInvMassMotherHel3", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {confInvMassMotherpTBinsHel, confInvMassMotherBinsHel});
325-
thetaRegistry.add("Theta/Mother/hInvMassMotherHel4", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {confInvMassMotherpTBinsHel, confInvMassMotherBinsHel});
326-
thetaRegistry.add("Theta/Mother/hInvMassK0Short", " ; M_{K^{0}_{S}}; ;", kTH1F, {confInvMassK0Short});
329+
thetaRegistry.add("Theta/Mother/hInvMassMotherHel1", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {helicityconfigs.confInvMassMotherpTBinsHel, helicityconfigs.confInvMassMotherBinsHel});
330+
thetaRegistry.add("Theta/Mother/hInvMassMotherHel2", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {helicityconfigs.confInvMassMotherpTBinsHel, helicityconfigs.confInvMassMotherBinsHel});
331+
thetaRegistry.add("Theta/Mother/hInvMassMotherHel3", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {helicityconfigs.confInvMassMotherpTBinsHel, helicityconfigs.confInvMassMotherBinsHel});
332+
thetaRegistry.add("Theta/Mother/hInvMassMotherHel4", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {helicityconfigs.confInvMassMotherpTBinsHel, helicityconfigs.confInvMassMotherBinsHel});
333+
thetaRegistry.add("Theta/Mother/hInvMassLambdaMC", " ; M_{#Lambda}; ;", kTH1F, {helicityconfigs.confInvMassMotherBinsHel});
334+
thetaRegistry.add("Theta/Mother/hInvMassLambdaMCHel1", " ; M_{#Lambda}; ;", kTH1F, {helicityconfigs.confInvMassMotherBinsHel});
335+
thetaRegistry.add("Theta/Mother/hInvMassLambdaMCHel2", " ; M_{#Lambda}; ;", kTH1F, {helicityconfigs.confInvMassMotherBinsHel});
336+
thetaRegistry.add("Theta/Mother/hInvMassLambdaMCHel3", " ; M_{#Lambda}; ;", kTH1F, {helicityconfigs.confInvMassMotherBinsHel});
337+
thetaRegistry.add("Theta/Mother/hInvMassLambdaMCHel4", " ; M_{#Lambda}; ;", kTH1F, {helicityconfigs.confInvMassMotherBinsHel});
338+
thetaRegistry.add("Theta/Mother/hInvMassK0ShortMC", " ; M_{K^{0}_{S}}; ;", kTH1F, {helicityconfigs.confInvMassK0Short});
339+
thetaRegistry.add("Theta/Mother/hInvMassK0ShortMCHel1", " ; M_{K^{0}_{S}}; ;", kTH1F, {helicityconfigs.confInvMassK0Short});
340+
thetaRegistry.add("Theta/Mother/hInvMassK0ShortMCHel2", " ; M_{K^{0}_{S}}; ;", kTH1F, {helicityconfigs.confInvMassK0Short});
341+
thetaRegistry.add("Theta/Mother/hInvMassK0ShortMCHel3", " ; M_{K^{0}_{S}}; ;", kTH1F, {helicityconfigs.confInvMassK0Short});
342+
thetaRegistry.add("Theta/Mother/hInvMassK0ShortMCHel4", " ; M_{K^{0}_{S}}; ;", kTH1F, {helicityconfigs.confInvMassK0Short});
327343

328344
/// MC Truth
329345
registryMCtruth.add("plus/MCtruthLambda", "MC truth Lambdas;#it{p}_{T} (GeV/c); #eta", {HistType::kTH2F, {{500, 0, 5}, {400, -1.0, 1.0}}});
@@ -387,39 +403,39 @@ struct FemtoUniversePairTaskTrackV0Helicity {
387403
registryMCreco.add("ThetaMCReco/NegativeChild/hThetaPhi", " ; #phi; cos(#theta)", kTH2F, {{100, -1, 7}, {110, -1.1, 1.1}});
388404

389405
/// Correlations
390-
if (cfgProcessHel) {
406+
if (helicityconfigs.cfgProcessHel) {
391407
sameEventCont.init(&resultRegistry, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D);
392408
sameEventCont.setPDGCodes(trackconfigs.confTrkPDGCodePartOne, V0configs.confV0PDGCodePartTwo);
393409

394410
mixedEventCont.init(&resultRegistry, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D);
395411
mixedEventCont.setPDGCodes(trackconfigs.confTrkPDGCodePartOne, V0configs.confV0PDGCodePartTwo);
396412
}
397413

398-
if (cfgProcessHel1) {
414+
if (helicityconfigs.cfgProcessHel1) {
399415
sameEventContHel1.init(&resultRegistryHel1, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D);
400416
sameEventContHel1.setPDGCodes(trackconfigs.confTrkPDGCodePartOne, V0configs.confV0PDGCodePartTwo);
401417

402418
mixedEventContHel1.init(&resultRegistryHel1, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D);
403419
mixedEventContHel1.setPDGCodes(trackconfigs.confTrkPDGCodePartOne, V0configs.confV0PDGCodePartTwo);
404420
}
405421

406-
if (cfgProcessHel2) {
422+
if (helicityconfigs.cfgProcessHel2) {
407423
sameEventContHel2.init(&resultRegistryHel2, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D);
408424
sameEventContHel2.setPDGCodes(trackconfigs.confTrkPDGCodePartOne, V0configs.confV0PDGCodePartTwo);
409425

410426
mixedEventContHel2.init(&resultRegistryHel2, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D);
411427
mixedEventContHel2.setPDGCodes(trackconfigs.confTrkPDGCodePartOne, V0configs.confV0PDGCodePartTwo);
412428
}
413429

414-
if (cfgProcessHel3) {
430+
if (helicityconfigs.cfgProcessHel3) {
415431
sameEventContHel3.init(&resultRegistryHel3, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D);
416432
sameEventContHel3.setPDGCodes(trackconfigs.confTrkPDGCodePartOne, V0configs.confV0PDGCodePartTwo);
417433

418434
mixedEventContHel3.init(&resultRegistryHel3, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D);
419435
mixedEventContHel3.setPDGCodes(trackconfigs.confTrkPDGCodePartOne, V0configs.confV0PDGCodePartTwo);
420436
}
421437

422-
if (cfgProcessHel4) {
438+
if (helicityconfigs.cfgProcessHel4) {
423439
sameEventContHel4.init(&resultRegistryHel4, confkstarBins, confMultBins, confkTBins, confmTBins, confMultBins3D, confmTBins3D, confEtaBins, confPhiBins, confIsMC, confUse3D);
424440
sameEventContHel4.setPDGCodes(trackconfigs.confTrkPDGCodePartOne, V0configs.confV0PDGCodePartTwo);
425441

@@ -491,19 +507,43 @@ struct FemtoUniversePairTaskTrackV0Helicity {
491507
thetaRegistry.fill(HIST("Theta/NegativeChild/hThetaEta"), negChild.eta(), cosineTheta);
492508
thetaRegistry.fill(HIST("Theta/NegativeChild/hThetaPhi"), negChild.phi(), cosineTheta);
493509

494-
if (cosineTheta <= 1.0 && cosineTheta >= 0.1)
510+
if (cosineTheta <= helicityconfigs.confLimitHel0 && cosineTheta >= helicityconfigs.confLimitHel1)
495511
thetaRegistry.fill(HIST("Theta/Mother/hInvMassMotherHel1"), part.pt(), part.mLambda());
496-
else if (cosineTheta < 0.1 && cosineTheta >= -0.1)
512+
else if (cosineTheta < helicityconfigs.confLimitHel1 && cosineTheta >= helicityconfigs.confLimitHel2)
497513
thetaRegistry.fill(HIST("Theta/Mother/hInvMassMotherHel2"), part.pt(), part.mLambda());
498-
else if (cosineTheta < -0.1 && cosineTheta >= -0.5)
514+
else if (cosineTheta < helicityconfigs.confLimitHel2 && cosineTheta >= helicityconfigs.confLimitHel3)
499515
thetaRegistry.fill(HIST("Theta/Mother/hInvMassMotherHel3"), part.pt(), part.mLambda());
500-
else if (cosineTheta < -0.5 && cosineTheta >= -1)
516+
else if (cosineTheta < helicityconfigs.confLimitHel3 && cosineTheta >= helicityconfigs.confLimitHel4)
501517
thetaRegistry.fill(HIST("Theta/Mother/hInvMassMotherHel4"), part.pt(), part.mLambda());
502518

519+
/// Histogramming for MC Reco to calculate fraction of K0S in the Lambda sample for each helicity bin
503520
if constexpr (confIsMC) {
504521
if (part.has_fdMCParticle()) {
505-
if ((part.fdMCParticle()).pdgMCTruth() == kK0Short) {
506-
thetaRegistry.fill(HIST("Theta/Mother/hInvMassK0Short"), part.mKaon());
522+
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0)
523+
thetaRegistry.fill(HIST("Theta/Mother/hInvMassLambdaMC"), part.mLambda());
524+
else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short)
525+
thetaRegistry.fill(HIST("Theta/Mother/hInvMassK0ShortMC"), part.mKaon());
526+
527+
if (cosineTheta <= helicityconfigs.confLimitHel0 && cosineTheta >= helicityconfigs.confLimitHel1) {
528+
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0)
529+
thetaRegistry.fill(HIST("Theta/Mother/hInvMassLambdaMCHel1"), part.mLambda());
530+
else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short)
531+
thetaRegistry.fill(HIST("Theta/Mother/hInvMassK0ShortMCHel1"), part.mKaon());
532+
} else if (cosineTheta < helicityconfigs.confLimitHel1 && cosineTheta >= helicityconfigs.confLimitHel2) {
533+
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0)
534+
thetaRegistry.fill(HIST("Theta/Mother/hInvMassLambdaMCHel2"), part.mLambda());
535+
else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short)
536+
thetaRegistry.fill(HIST("Theta/Mother/hInvMassK0ShortMCHel2"), part.mKaon());
537+
} else if (cosineTheta < helicityconfigs.confLimitHel2 && cosineTheta >= helicityconfigs.confLimitHel3) {
538+
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0)
539+
thetaRegistry.fill(HIST("Theta/Mother/hInvMassLambdaMCHel3"), part.mLambda());
540+
else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short)
541+
thetaRegistry.fill(HIST("Theta/Mother/hInvMassK0ShortMCHel3"), part.mKaon());
542+
} else if (cosineTheta < helicityconfigs.confLimitHel3 && cosineTheta >= helicityconfigs.confLimitHel4) {
543+
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0)
544+
thetaRegistry.fill(HIST("Theta/Mother/hInvMassLambdaMCHel4"), part.mLambda());
545+
else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short)
546+
thetaRegistry.fill(HIST("Theta/Mother/hInvMassK0ShortMCHel4"), part.mKaon());
507547
}
508548
}
509549
}
@@ -571,28 +611,28 @@ struct FemtoUniversePairTaskTrackV0Helicity {
571611
}
572612

573613
case 1: {
574-
if (cosineTheta <= 1.0 && cosineTheta >= 0.1)
614+
if (cosineTheta < helicityconfigs.confLimitHel0 && cosineTheta >= helicityconfigs.confLimitHel1)
575615
sameEventContHel1.setPair<false>(p1, p2, multCol, confUse3D, weight);
576616

577617
break;
578618
}
579619

580620
case 2: {
581-
if (cosineTheta < 0.1 && cosineTheta >= -0.1)
621+
if (cosineTheta < helicityconfigs.confLimitHel1 && cosineTheta >= helicityconfigs.confLimitHel2)
582622
sameEventContHel2.setPair<false>(p1, p2, multCol, confUse3D, weight);
583623

584624
break;
585625
}
586626

587627
case 3: {
588-
if (cosineTheta < -0.1 && cosineTheta >= -0.5)
628+
if (cosineTheta < helicityconfigs.confLimitHel2 && cosineTheta >= helicityconfigs.confLimitHel3)
589629
sameEventContHel3.setPair<false>(p1, p2, multCol, confUse3D, weight);
590630

591631
break;
592632
}
593633

594634
case 4: {
595-
if (cosineTheta < -0.5 && cosineTheta >= -1.0)
635+
if (cosineTheta < helicityconfigs.confLimitHel3 && cosineTheta >= helicityconfigs.confLimitHel4)
596636
sameEventContHel4.setPair<false>(p1, p2, multCol, confUse3D, weight);
597637

598638
break;
@@ -609,19 +649,19 @@ struct FemtoUniversePairTaskTrackV0Helicity {
609649
auto groupPartsOne = partsOne->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache);
610650
auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache);
611651

612-
if (cfgProcessHel)
652+
if (helicityconfigs.cfgProcessHel)
613653
doSameEvent<false>(col, parts, groupPartsOne, groupPartsTwo, 0);
614654

615-
if (cfgProcessHel1)
655+
if (helicityconfigs.cfgProcessHel1)
616656
doSameEvent<false>(col, parts, groupPartsOne, groupPartsTwo, 1);
617657

618-
if (cfgProcessHel2)
658+
if (helicityconfigs.cfgProcessHel2)
619659
doSameEvent<false>(col, parts, groupPartsOne, groupPartsTwo, 2);
620660

621-
if (cfgProcessHel3)
661+
if (helicityconfigs.cfgProcessHel3)
622662
doSameEvent<false>(col, parts, groupPartsOne, groupPartsTwo, 3);
623663

624-
if (cfgProcessHel4)
664+
if (helicityconfigs.cfgProcessHel4)
625665
doSameEvent<false>(col, parts, groupPartsOne, groupPartsTwo, 4);
626666
}
627667
PROCESS_SWITCH(FemtoUniversePairTaskTrackV0Helicity, processSameEvent, "Enable processing same event for track - V0", false);
@@ -869,28 +909,28 @@ struct FemtoUniversePairTaskTrackV0Helicity {
869909
}
870910

871911
case 1: {
872-
if (cosineTheta <= 1.0 && cosineTheta >= 0.1)
912+
if (cosineTheta < helicityconfigs.confLimitHel0 && cosineTheta >= helicityconfigs.confLimitHel1)
873913
mixedEventContHel1.setPair<false>(p1, p2, multCol, confUse3D, weight);
874914

875915
break;
876916
}
877917

878918
case 2: {
879-
if (cosineTheta < 0.1 && cosineTheta >= -0.1)
919+
if (cosineTheta < helicityconfigs.confLimitHel1 && cosineTheta >= helicityconfigs.confLimitHel2)
880920
mixedEventContHel2.setPair<false>(p1, p2, multCol, confUse3D, weight);
881921

882922
break;
883923
}
884924

885925
case 3: {
886-
if (cosineTheta < -0.1 && cosineTheta >= -0.5)
926+
if (cosineTheta < helicityconfigs.confLimitHel2 && cosineTheta >= helicityconfigs.confLimitHel3)
887927
mixedEventContHel3.setPair<false>(p1, p2, multCol, confUse3D, weight);
888928

889929
break;
890930
}
891931

892932
case 4: {
893-
if (cosineTheta < -0.5 && cosineTheta >= -1.0)
933+
if (cosineTheta < helicityconfigs.confLimitHel3 && cosineTheta >= helicityconfigs.confLimitHel4)
894934
mixedEventContHel4.setPair<false>(p1, p2, multCol, confUse3D, weight);
895935

896936
break;
@@ -917,19 +957,19 @@ struct FemtoUniversePairTaskTrackV0Helicity {
917957

918958
void processMixedEvent(FilteredFDCollisions const& cols, FemtoFullParticles const& parts)
919959
{
920-
if (cfgProcessHel)
960+
if (helicityconfigs.cfgProcessHel)
921961
doMixedEvent(cols, parts, partsOne, partsTwo, 0);
922962

923-
if (cfgProcessHel1)
963+
if (helicityconfigs.cfgProcessHel1)
924964
doMixedEvent(cols, parts, partsOne, partsTwo, 1);
925965

926-
if (cfgProcessHel2)
966+
if (helicityconfigs.cfgProcessHel2)
927967
doMixedEvent(cols, parts, partsOne, partsTwo, 2);
928968

929-
if (cfgProcessHel3)
969+
if (helicityconfigs.cfgProcessHel3)
930970
doMixedEvent(cols, parts, partsOne, partsTwo, 3);
931971

932-
if (cfgProcessHel4)
972+
if (helicityconfigs.cfgProcessHel4)
933973
doMixedEvent(cols, parts, partsOne, partsTwo, 4);
934974
}
935975
PROCESS_SWITCH(FemtoUniversePairTaskTrackV0Helicity, processMixedEvent, "Enable processing mixed event for track - V0", false);

0 commit comments

Comments
 (0)