Skip to content

Commit e6b911e

Browse files
authored
[PWGLF] V0 Selector (#12790)
1 parent e154893 commit e6b911e

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

PWGLF/TableProducer/Strangeness/v0selector.cxx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ using namespace o2::framework::expressions;
3636
struct V0SelectorTask {
3737
Produces<aod::V0SignalFlags> v0FlagTable;
3838

39+
Configurable<bool> selectK0S{"selectK0S", true, "Check V0s for K0S cuts"};
40+
Configurable<bool> selectLambda{"selectLambda", true, "Check V0s for Lambda cuts"};
41+
Configurable<bool> selectAntiLambda{"selectAntiLambda", true, "Check V0s for AntiLambda cuts"};
42+
3943
Configurable<std::vector<float>> K0SPtBins{"K0SPtBins", {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 15.0, 20.0, 25.0, 30.0}, "K0S pt Vals"};
4044
Configurable<std::vector<float>> K0SRminVals{"K0SRminVals", {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}, "K0S min R values"};
4145
Configurable<std::vector<float>> K0SRmaxVals{"K0SRmaxVals", {40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0}, "K0S max R values"};
@@ -85,7 +89,7 @@ struct V0SelectorTask {
8589
Configurable<std::vector<float>> AntiLambdaMassLowVals{"AntiLambdaMassLowVals", {1.08, 1.08, 1.08, 1.08, 1.08, 1.08, 1.08, 1.08}, "AntiLambda mass cut lower values (MeV)"};
8690
Configurable<std::vector<float>> AntiLambdaMassHighVals{"AntiLambdaMassHighVals", {1.125, 1.125, 1.125, 1.125, 1.125, 1.125, 1.125, 1.125}, "AntiLambda mass cut upper values (MeV)"};
8791

88-
Configurable<bool> randomSelection{"randomSelection", true, "Randomly select V0s"};
92+
Configurable<bool> randomSelection{"randomSelection", false, "Randomly select V0s"};
8993
Configurable<std::vector<float>> K0SFraction{"K0SFraction", {2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0}, "Fraction of K0S to randomly select"};
9094
Configurable<std::vector<float>> LambdaFraction{"LambdaFraction", {2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0}, "Fraction of Lambda to randomly select"};
9195
Configurable<std::vector<float>> AntiLambdaFraction{"AntiLambdaFraction", {2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0}, "Fraction of AntiLambda to randomly select"};
@@ -277,13 +281,16 @@ struct V0SelectorTask {
277281
{
278282
for (const auto& v0 : v0s) {
279283
uint8_t flag = 0;
280-
flag += K0SCuts(collision, v0) * aod::v0flags::FK0S;
281-
flag += LambdaCuts(collision, v0) * aod::v0flags::FLAMBDA;
282-
flag += AntiLambdaCuts(collision, v0) * aod::v0flags::FANTILAMBDA;
284+
if (selectK0S)
285+
flag += K0SCuts(collision, v0) * aod::v0flags::FK0S;
286+
if (selectLambda)
287+
flag += LambdaCuts(collision, v0) * aod::v0flags::FLAMBDA;
288+
if (selectAntiLambda)
289+
flag += AntiLambdaCuts(collision, v0) * aod::v0flags::FANTILAMBDA;
283290

284291
if (flag == 0)
285292
flag += aod::v0flags::FREJECTED;
286-
else
293+
else if (randomSelection)
287294
flag += RandomlyReject(v0, flag) * aod::v0flags::FREJECTED;
288295

289296
v0FlagTable(flag);

0 commit comments

Comments
 (0)