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
21 changes: 21 additions & 0 deletions PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include <Math/Vector4D.h>
#include <TFile.h>
#include <TH2D.h>
#include <TLorentzVector.h>

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
#include <TPDGCode.h>
#include <TProfile.h>

Expand Down Expand Up @@ -192,6 +192,9 @@
Configurable<float> v0radiusMax{"v0radiusMax", 1E5, "maximum V0 radius (cm)"};
Configurable<LabeledArray<float>> lifetimecut{"lifetimecut", {DefaultLifetimeCuts[0], 2, {"lifetimecutLambda", "lifetimecutK0S"}}, "lifetimecut"};

// invariant mass selection
Configurable<float> compMassRejection{"compMassRejection", -1, "Competing mass rejection (GeV/#it{c}^{2})"};

// Additional selection on the AP plot (exclusive for K0Short)
// original equation: lArmPt*5>TMath::Abs(lArmAlpha)
Configurable<float> armPodCut{"armPodCut", 5.0f, "pT * (cut) > |alpha|, AP cut. Negative: no cut"};
Expand Down Expand Up @@ -374,6 +377,8 @@
selDCAV0Dau,
selK0ShortRapidity,
selLambdaRapidity,
selK0ShortMassRejection,
selLambdaMassRejection,
selTPCPIDPositivePion,
selTPCPIDNegativePion,
selTPCPIDPositiveProton,
Expand Down Expand Up @@ -515,21 +520,21 @@
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 523 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.tofPidNsigmaCutK0Pi < 1e+5) { // safeguard for no cut

Check failure on line 529 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.tofPidNsigmaCutLaPr < 1e+5) { // safeguard for no cut

Check failure on line 533 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.tofPidNsigmaCutLaPi < 1e+5) { // safeguard for no cut

Check failure on line 537 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 @@ -541,21 +546,21 @@
BITSET(maskTrackProperties, selNegGoodTPCTrack);
BITSET(maskTrackProperties, selNegGoodITSTrack);
// TPC signal is available: ask for negative track PID
if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut

Check failure on line 549 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.tofPidNsigmaCutK0Pi < 1e+5) { // safeguard for no cut

Check failure on line 555 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.tofPidNsigmaCutLaPi < 1e+5) { // safeguard for no cut

Check failure on line 559 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, selTOFNSigmaNegativePionLambda);
BITSET(maskLambdaSpecific, selTOFDeltaTNegativePionLambda);
}
if (v0Selections.tofPidNsigmaCutLaPr < 1e+5) { // safeguard for no cut

Check failure on line 563 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, selTOFNSigmaNegativeProtonLambda);
BITSET(maskAntiLambdaSpecific, selTOFDeltaTNegativeProtonLambda);
}
Expand All @@ -571,6 +576,12 @@
BITSET(maskAntiLambdaSpecific, selNegNotTPCOnly);
}

if (v0Selections.compMassRejection > -1) {
BITSET(maskK0ShortSpecific, selLambdaMassRejection);
BITSET(maskLambdaSpecific, selK0ShortMassRejection);
BITSET(maskAntiLambdaSpecific, selK0ShortMassRejection);
}

// Primary particle selection, central to analysis
maskSelectionK0Short = maskTopological | maskTrackProperties | maskK0ShortSpecific;
maskSelectionLambda = maskTopological | maskTrackProperties | maskLambdaSpecific;
Expand Down Expand Up @@ -706,7 +717,7 @@
// for QA and test purposes
auto hRawCentrality = histos.add<TH1>("hRawCentrality", "hRawCentrality", kTH1D, {axisConfigurations.axisRawCentrality});

for (int ii = 1; ii < 101; ii++) {

Check failure on line 720 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.
float value = 100.5f - static_cast<float>(ii);
hRawCentrality->SetBinContent(ii, value);
}
Expand All @@ -721,6 +732,8 @@
hSelectionV0s->GetXaxis()->SetBinLabel(selDCAV0Dau + 2, "DCA V0 dau.");
hSelectionV0s->GetXaxis()->SetBinLabel(selK0ShortRapidity + 2, "K^{0}_{S} rapidity");
hSelectionV0s->GetXaxis()->SetBinLabel(selLambdaRapidity + 2, "#Lambda rapidity");
hSelectionV0s->GetXaxis()->SetBinLabel(selK0ShortMassRejection + 2, "K^{0}_{S} mass rej.");
hSelectionV0s->GetXaxis()->SetBinLabel(selLambdaMassRejection + 2, "#Lambda mass rej.");
hSelectionV0s->GetXaxis()->SetBinLabel(selTPCPIDPositivePion + 2, "TPC PID #pi^{+}");
hSelectionV0s->GetXaxis()->SetBinLabel(selTPCPIDNegativePion + 2, "TPC PID #pi^{-}");
hSelectionV0s->GetXaxis()->SetBinLabel(selTPCPIDPositiveProton + 2, "TPC PID p");
Expand Down Expand Up @@ -1231,6 +1244,14 @@
if (std::abs(rapidityK0Short) < v0Selections.rapidityCut)
BITSET(bitMap, selK0ShortRapidity);

//
// competing mass rejection
//
if (std::fabs(v0.mK0Short() - o2::constants::physics::MassK0Short) > v0Selections.compMassRejection)
BITSET(bitMap, selK0ShortMassRejection);
if (std::fabs(v0.mLambda() - o2::constants::physics::MassLambda0) > v0Selections.compMassRejection)
BITSET(bitMap, selLambdaMassRejection);

auto posTrackExtra = v0.template posTrackExtra_as<DauTracks>();
auto negTrackExtra = v0.template negTrackExtra_as<DauTracks>();

Expand Down
Loading