Skip to content

Commit 42dbd4f

Browse files
authored
[PWGLF] One more minor optimization change to str builder module (#12412)
1 parent a9e5e4f commit 42dbd4f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

PWGLF/Utils/strangenessBuilderModule.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,6 +1338,12 @@ class BuilderModule
13381338
for (size_t iv0 = 0; iv0 < v0List.size(); iv0++) {
13391339
const auto& v0 = v0List[sorted_v0[iv0]];
13401340

1341+
if (!v0BuilderOpts.generatePhotonCandidates.value && v0.v0Type > 1) {
1342+
// skip photons if not requested
1343+
products.v0dataLink(-1, -1);
1344+
continue;
1345+
}
1346+
13411347
if (!baseOpts.mEnabledTables[kV0CoresBase] && v0Map[iv0] == -2) {
13421348
// this v0 hasn't been used by cascades and we're not generating V0s, so skip it
13431349
products.v0dataLink(-1, -1);
@@ -1389,7 +1395,7 @@ class BuilderModule
13891395
}
13901396
}
13911397

1392-
if (!straHelper.buildV0Candidate(v0.collisionId, pvX, pvY, pvZ, posTrack, negTrack, posTrackPar, negTrackPar, v0.isCollinearV0, baseOpts.mEnabledTables[kV0Covs], true)) {
1398+
if (!straHelper.buildV0Candidate(v0.collisionId, pvX, pvY, pvZ, posTrack, negTrack, posTrackPar, negTrackPar, v0.isCollinearV0, baseOpts.mEnabledTables[kV0Covs], v0BuilderOpts.generatePhotonCandidates)) {
13931399
products.v0dataLink(-1, -1);
13941400
continue;
13951401
}

0 commit comments

Comments
 (0)