Skip to content
Merged
Show file tree
Hide file tree
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
35 changes: 30 additions & 5 deletions PWGJE/Tasks/lfJetSpectra.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ struct LfJetSpectra {
kStepDcaV0Dau,
kStepDauEta,
kStepCompetingMass,
kStepArmenteros,
kNSelectionSteps };
static constexpr std::array<std::string_view, kNSelectionSteps> StepLabels = {"all", "jet finder acc.", "not rejected", "signal flag", "radius", "DCA dau-PV", "cos PA", "DCA V0 dau", "dau #eta", "competing mass"};
static constexpr int StepAllPassed = kNSelectionSteps - 1; // last step: all the selections passed
static constexpr std::array<std::string_view, kNSelectionSteps> StepLabels = {"all", "jet finder acc.", "not rejected", "signal flag", "radius", "DCA dau-PV", "cos PA", "DCA V0 dau", "dau #eta", "competing mass", "Armenteros"};

// Folders of the V0 QA histograms: all the stored V0s (before selections) and the selected V0s of each species.
// The first three entries are also the species names used in the MC histograms
Expand Down Expand Up @@ -221,6 +223,9 @@ struct LfJetSpectra {
Configurable<bool> doCompetingMassRejection{"doCompetingMassRejection", true, "Apply the competing V0 mass rejection"};
Configurable<float> lambdaRejWindow{"lambdaRejWindow", 0.005, "Lambda mass window rejected for K0s candidates (GeV/c^2)"};
Configurable<float> k0sRejWindow{"k0sRejWindow", 0.010, "K0s mass window rejected for (Anti)Lambda candidates (GeV/c^2)"};
// Armenteros-Podolanski selections
Configurable<float> armenterosK0sMin{"armenterosK0sMin", 0., "K0s candidates: require qT^Arm > armenterosK0sMin * |alpha^Arm| (0 = no cut, typical 0.2)"};
Configurable<float> armenterosLambdaMax{"armenterosLambdaMax", 0., "(Anti)Lambda candidates: require qT^Arm < armenterosLambdaMax * |alpha^Arm|, with alpha^Arm > 0 for Lambda and < 0 for AntiLambda (0 = no cut, typical 0.2)"};
// invariant mass windows, used only in the per-jet V0 multiplicity and momentum fraction histograms
Configurable<float> k0sMassWindow{"k0sMassWindow", 0.015, "Half-width of the K0s mass window around the PDG mass (GeV/c^2), per-jet V0 histograms"};
Configurable<float> lambdaMassWindow{"lambdaMassWindow", 0.006, "Half-width of the (Anti)Lambda mass window around the PDG mass (GeV/c^2), per-jet V0 histograms"};
Expand Down Expand Up @@ -860,7 +865,7 @@ struct LfJetSpectra {
}

// V0 selection for a given species hypothesis, applied step by step. Returns the last step passed
// (kStepCompetingMass = all the selections passed). It is used both for the selection and for the cut flow QA
// (StepAllPassed = all the selections passed). It is used both for the selection and for the cut flow QA
template <typename T>
int lastPassedSelectionStep(T const& v0, V0Species species, bool isJetFinderV0)
{
Expand Down Expand Up @@ -895,14 +900,34 @@ struct LfJetSpectra {
if (v0Cuts.doCompetingMassRejection && competingMassDelta(v0, species) < ((species == kK0s) ? v0Cuts.lambdaRejWindow : v0Cuts.k0sRejWindow)) {
return kStepDauEta;
}
return kStepCompetingMass;
if (!passedArmenteros(v0, species)) {
return kStepCompetingMass;
}
return kStepArmenteros;
}

// Armenteros-Podolanski selection. K0s: above the line qT = c |alpha|. (Anti)Lambda: below the line and on the side of
// the (anti)proton (alpha > 0 for Lambda, < 0 for AntiLambda), which removes the K0s band and the opposite (anti)Lambda
template <typename T>
bool passedArmenteros(T const& v0, V0Species species)
{
const float alpha = v0.alpha();
const float qt = v0.qtarm();
if (species == kK0s) {
return v0Cuts.armenterosK0sMin <= 0.f || qt > v0Cuts.armenterosK0sMin * std::abs(alpha);
}
if (v0Cuts.armenterosLambdaMax <= 0.f) {
return true;
}
const bool rightSide = (species == kLambda) ? (alpha > 0.f) : (alpha < 0.f);
return rightSide && qt < v0Cuts.armenterosLambdaMax * std::abs(alpha);
}

// Full selection of a V0 (accepted by the jet finder) for a given species hypothesis
template <typename T>
bool passedV0Selection(T const& v0, V0Species species)
{
return lastPassedSelectionStep(v0, species, true) == kStepCompetingMass;
return lastPassedSelectionStep(v0, species, true) == StepAllPassed;
}

// Invariant mass window of a species, used only in the per-jet V0 multiplicity and momentum fraction histograms
Expand Down Expand Up @@ -969,7 +994,7 @@ struct LfJetSpectra {
for (int step = kStepAll; step <= lastStep; step++) {
registryQC.fill(HIST("QA/V0CutFlow"), species, step);
}
if (lastStep != kStepCompetingMass) {
if (lastStep != StepAllPassed) {
continue;
}
if (species == kK0s) {
Expand Down
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Strangeness/v0selector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ struct V0SelectorTask {
std::vector<float> mincuts = {rmin, ctaumin, cospamin, dcadmin, dcapmin, dcanmin};
std::vector<float> maxcuts = {rmax, ctaumax, cospamax, dcadmax, dcapmax, dcanmax};

if (competingMassCuts) {
if (massCuts) {
vals.push_back(v0.mAntiLambda());
mincuts.push_back(AntiLambdaMassLowVals->at(ptBin));
maxcuts.push_back(AntiLambdaMassHighVals->at(ptBin));
Expand Down
Loading