Skip to content

Commit 50cc1ee

Browse files
committed
some fixes
1 parent 1dd01bc commit 50cc1ee

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

PWGLF/Tasks/vzero_cascade_absorption.cxx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#include "Common/DataModel/Centrality.h"
2727
#include "Common/DataModel/PIDResponse.h"
2828

29+
#include <vector>
30+
2931
using namespace o2;
3032
using namespace o2::framework;
3133
using namespace o2::framework::expressions;
@@ -73,8 +75,8 @@ struct vzero_cascade_absorption {
7375
Configurable<float> pMin_k0negtrack{"pMin_k0negtrack", 0.3f, "Min Momentum K0 neg track"};
7476
Configurable<float> pMax_k0negtrack{"pMax_k0negtrack", 5.0f, "Max Momentum K0 neg track"};
7577
Configurable<bool> requireITShits{"requireITShits", true, "require ITS hits for daughters"};
76-
Configurable<std::vector<int>> ITShitsBeforeTarget{"ITShitsBeforeTarget", {0, 0, 0, 1, 1, 1, 1}, "ITS Hits before target"};
77-
Configurable<std::vector<int>> ITShitsAfterTarget{"ITShitsAfterTarget", {0, 0, 0, 0, 0, 1, 1}, "ITS Hits after target"};
78+
Configurable<std::vector<float>> hit_requirement_before_target{"hit_requirement_before_target", {0, 0, 0, 1, 1, 1, 1}, "ITS Hits before target"};
79+
Configurable<std::vector<float>> hit_requirement_after_target{"hit_requirement_after_target", {0, 0, 0, 0, 0, 1, 1}, "ITS Hits after target"};
7880
Configurable<bool> useTOF{"useTOF", true, "use TOF for PID"};
7981
Configurable<float> nsigmaTPCmin{"nsigmaTPCmin", -3.0f, "Minimum nsigma TPC"};
8082
Configurable<float> nsigmaTPCmax{"nsigmaTPCmax", +3.0f, "Maximum nsigma TPC"};
@@ -289,16 +291,19 @@ bool passedAntiLambdaSelection(const T1& v0, const T2& ntrack,
289291
const auto& posTrack = v0.posTrack_as<FullTracks>();
290292
const auto& negTrack = v0.negTrack_as<FullTracks>();
291293

294+
auto hit_before_target = static_cast<std::vector<float>>(hit_requirement_before_target);
295+
auto hit_after_target = static_cast<std::vector<float>>(hit_requirement_after_target);
296+
292297
// K0 Short
293298
if (passedK0Selection(v0, negTrack, posTrack, collision)) {
294299

295300
// Before Target
296301
if (v0.v0radius() > Rmin_beforeAbs && v0.v0radius() < Rmax_beforeAbs) {
297302
if (requireITShits) {
298303
for (int i = 0; i < 7; i++) {
299-
if (ITShitsBeforeTarget[i] > 0 && !hasHitOnITSlayer(posTrack, i))
304+
if (hit_before_target[i] > 0 && !hasHitOnITSlayer(posTrack, i))
300305
continue;
301-
if (ITShitsBeforeTarget[i] > 0 && !hasHitOnITSlayer(negTrack, i))
306+
if (hit_before_target[i] > 0 && !hasHitOnITSlayer(negTrack, i))
302307
continue;
303308
}
304309
}
@@ -311,9 +316,9 @@ bool passedAntiLambdaSelection(const T1& v0, const T2& ntrack,
311316

312317
if (requireITShits) {
313318
for (int i = 0; i < 7; i++) {
314-
if (ITShitsAfterTarget[i] > 0 && !hasHitOnITSlayer(posTrack, i))
319+
if (hit_after_target[i] > 0 && !hasHitOnITSlayer(posTrack, i))
315320
continue;
316-
if (ITShitsAfterTarget[i] > 0 && !hasHitOnITSlayer(negTrack, i))
321+
if (hit_after_target[i] > 0 && !hasHitOnITSlayer(negTrack, i))
317322
continue;
318323
}
319324
}

0 commit comments

Comments
 (0)