Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@
Configurable<bool> skipTPConly{"skipTPConly", false, "skip V0s comprised of at least one TPC only prong"};
Configurable<bool> requirePosITSonly{"requirePosITSonly", false, "require that positive track is ITSonly (overrides TPC quality)"};
Configurable<bool> requireNegITSonly{"requireNegITSonly", false, "require that negative track is ITSonly (overrides TPC quality)"};
Configurable<bool> requirePosTPConly{"requirePosTPConly", false, "require that positive track is TPConly (overrides ITS-TOF quality)"};
Configurable<bool> requireNegTPConly{"requireNegTPConly", false, "require that negative track is TPConly (overrides ITS-TOF quality)"};
Configurable<bool> requirePosDeepSec{"requirePosDeepSec", false, "require that positive track is a deep secondary (overrides ITS quality)"};
Configurable<bool> requireNegDeepSec{"requireNegDeepSec", false, "require that negative track is a deep secondary (overrides ITS quality)"};
Configurable<bool> rejectPosITSafterburner{"rejectPosITSafterburner", false, "reject positive track formed out of afterburner ITS tracks"};
Configurable<bool> rejectNegITSafterburner{"rejectNegITSafterburner", false, "reject negative track formed out of afterburner ITS tracks"};
Configurable<bool> requirePosITSafterburnerOnly{"requirePosITSafterburnerOnly", false, "require positive track formed out of afterburner ITS tracks"};
Expand Down Expand Up @@ -418,6 +422,10 @@
selNegGoodITSTrack, // at least min # ITS clusters
selPosItsOnly,
selNegItsOnly,
selPosTPCOnly,
selNegTPCOnly,
selPosDeepSec,
selNegDeepSec,
selPosNotTPCOnly,
selNegNotTPCOnly,
selConsiderK0Short, // for mc tagging
Expand Down Expand Up @@ -530,25 +538,50 @@
if (v0Selections.requirePosITSonly) {
BITSET(maskTrackProperties, selPosItsOnly);
BITSET(maskTrackProperties, selPosGoodITSTrack);
} else if (v0Selections.requirePosTPConly) {
BITSET(maskTrackProperties, selPosTPCOnly);
BITSET(maskTrackProperties, selPosGoodTPCTrack);
} else if (v0Selections.requirePosDeepSec) {
BITSET(maskTrackProperties, selPosDeepSec);
BITSET(maskTrackProperties, selPosGoodTPCTrack);
// TPC signal is available: ask for positive track PID
if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut

Check failure on line 548 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
BITSET(maskK0ShortSpecific, selTPCPIDPositivePion);
BITSET(maskLambdaSpecific, selTPCPIDPositiveProton);
BITSET(maskAntiLambdaSpecific, selTPCPIDPositivePion);
}
// TOF PID
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 554 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
BITSET(maskK0ShortSpecific, selTOFNSigmaPositivePionK0Short);
BITSET(maskK0ShortSpecific, selTOFDeltaTPositivePionK0Short);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut

Check failure on line 558 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
BITSET(maskLambdaSpecific, selTOFNSigmaPositiveProtonLambda);
BITSET(maskLambdaSpecific, selTOFDeltaTPositiveProtonLambda);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 562 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
BITSET(maskAntiLambdaSpecific, selTOFNSigmaPositivePionLambda);
BITSET(maskAntiLambdaSpecific, selTOFDeltaTPositivePionLambda);
}
} else {
BITSET(maskTrackProperties, selPosGoodTPCTrack);
BITSET(maskTrackProperties, selPosGoodITSTrack);
// TPC signal is available: ask for positive track PID
if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut

Check failure on line 570 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
BITSET(maskK0ShortSpecific, selTPCPIDPositivePion);
BITSET(maskLambdaSpecific, selTPCPIDPositiveProton);
BITSET(maskAntiLambdaSpecific, selTPCPIDPositivePion);
}
// TOF PID
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 576 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
BITSET(maskK0ShortSpecific, selTOFNSigmaPositivePionK0Short);
BITSET(maskK0ShortSpecific, selTOFDeltaTPositivePionK0Short);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut

Check failure on line 580 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
BITSET(maskLambdaSpecific, selTOFNSigmaPositiveProtonLambda);
BITSET(maskLambdaSpecific, selTOFDeltaTPositiveProtonLambda);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 584 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
BITSET(maskAntiLambdaSpecific, selTOFNSigmaPositivePionLambda);
BITSET(maskAntiLambdaSpecific, selTOFDeltaTPositivePionLambda);
}
Expand All @@ -556,6 +589,31 @@
if (v0Selections.requireNegITSonly) {
BITSET(maskTrackProperties, selNegItsOnly);
BITSET(maskTrackProperties, selNegGoodITSTrack);
} else if (v0Selections.requireNegTPConly) {
BITSET(maskTrackProperties, selNegTPCOnly);
BITSET(maskTrackProperties, selNegGoodTPCTrack);
} else if (v0Selections.requireNegDeepSec) {
BITSET(maskTrackProperties, selNegDeepSec);
BITSET(maskTrackProperties, selNegGoodTPCTrack);
// TPC signal is available: ask for negative track PID
if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut

Check failure on line 599 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
BITSET(maskK0ShortSpecific, selTPCPIDNegativePion);
BITSET(maskLambdaSpecific, selTPCPIDNegativePion);
BITSET(maskAntiLambdaSpecific, selTPCPIDNegativeProton);
}
// TOF PID
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 605 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
BITSET(maskK0ShortSpecific, selTOFNSigmaNegativePionK0Short);
BITSET(maskK0ShortSpecific, selTOFDeltaTNegativePionK0Short);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut
BITSET(maskLambdaSpecific, selTOFNSigmaNegativePionLambda);
BITSET(maskLambdaSpecific, selTOFDeltaTNegativePionLambda);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut
BITSET(maskAntiLambdaSpecific, selTOFNSigmaNegativeProtonLambda);
BITSET(maskAntiLambdaSpecific, selTOFDeltaTNegativeProtonLambda);
}
} else {
BITSET(maskTrackProperties, selNegGoodTPCTrack);
BITSET(maskTrackProperties, selNegGoodITSTrack);
Expand Down Expand Up @@ -775,6 +833,10 @@
hSelectionV0s->GetXaxis()->SetBinLabel(selNegGoodITSTrack + 2, "Neg. good ITS track");
hSelectionV0s->GetXaxis()->SetBinLabel(selPosItsOnly + 2, "Pos. ITS-only");
hSelectionV0s->GetXaxis()->SetBinLabel(selNegItsOnly + 2, "Neg. ITS-only");
hSelectionV0s->GetXaxis()->SetBinLabel(selPosTPCOnly + 2, "Pos. TPC-only");
hSelectionV0s->GetXaxis()->SetBinLabel(selNegTPCOnly + 2, "Neg. TPC-only");
hSelectionV0s->GetXaxis()->SetBinLabel(selPosDeepSec + 2, "Pos. deep sec.");
hSelectionV0s->GetXaxis()->SetBinLabel(selNegDeepSec + 2, "Neg. deep sec.");
hSelectionV0s->GetXaxis()->SetBinLabel(selPosNotTPCOnly + 2, "Pos. not TPC-only");
hSelectionV0s->GetXaxis()->SetBinLabel(selNegNotTPCOnly + 2, "Neg. not TPC-only");
hSelectionV0s->GetXaxis()->SetBinLabel(selConsiderK0Short + 2, "True K^{0}_{S}");
Expand Down Expand Up @@ -1488,6 +1550,41 @@
BITSET(bitMap, selPosNotTPCOnly);
if (negTrackExtra.detectorMap() != o2::aod::track::TPC)
BITSET(bitMap, selNegNotTPCOnly);
if (!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) &&
!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) &&
!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) &&
!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) &&
!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TOF)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD)) &&
verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::TPC)))
BITSET(bitMap, selPosTPCOnly);
if (!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TOF)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC | o2::aod::track::TRD)) &&
verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC)))
BITSET(bitMap, selNegTPCOnly);
// deep secondary : TPC-TRD, TPC-TOF, TPC-TRD-TOF
if (!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) &&
!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) &&
!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) &&
!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) &&
!verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::ITS)) &&
verifyMask(posTrackExtra.detectorMap(), (o2::aod::track::TPC)))
BITSET(bitMap, selPosDeepSec);
if (!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD | o2::aod::track::TOF)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TOF)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC | o2::aod::track::TRD)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS | o2::aod::track::TPC)) &&
!verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::ITS)) &&
verifyMask(negTrackExtra.detectorMap(), (o2::aod::track::TPC)))
BITSET(bitMap, selNegDeepSec);

// proper lifetime
if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassLambda0 < v0Selections.lifetimecut->get("lifetimecutLambda"))
Expand Down
Loading