Skip to content

Commit 692e479

Browse files
author
Luigi Dello Stritto
committed
PWGHF: add TF border cut at the particle generate level
1 parent 3967859 commit 692e479

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,9 @@ struct HfCandidateCreator3ProngExpressions {
476476
bool createLc{false};
477477
bool createXic{false};
478478
float zPvPosMax{1000.f};
479+
float useTimeFrameBorderCut{false};
480+
481+
using BCsInfo = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels>;
479482

480483
void init(InitContext& initContext)
481484
{
@@ -495,6 +498,8 @@ struct HfCandidateCreator3ProngExpressions {
495498
createXic = option.defaultValue.get<bool>();
496499
} else if (option.name.compare("zPvPosMax") == 0) {
497500
zPvPosMax = option.defaultValue.get<float>();
501+
} else if (option.name.compare("useTimeFrameBorderCut") == 0) {
502+
useTimeFrameBorderCut = option.defaultValue.get<bool>();
498503
}
499504
}
500505
break;
@@ -511,7 +516,8 @@ struct HfCandidateCreator3ProngExpressions {
511516
/// Performs MC matching.
512517
void processMc(aod::TracksWMc const& tracks,
513518
aod::McParticles const& mcParticles,
514-
aod::McCollisions const&)
519+
aod::McCollisions const&,
520+
BCsInfo const&)
515521
{
516522
rowCandidateProng3->bindExternalIndices(&tracks);
517523

@@ -635,6 +641,14 @@ struct HfCandidateCreator3ProngExpressions {
635641
continue;
636642
}
637643

644+
if (useTimeFrameBorderCut) { // accept only mc particles coming from bc that are far away from TF border and ITSROFrame
645+
auto bc = mcCollision.bc_as<BCsInfo>();
646+
if (!bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) || !bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) {
647+
rowMcMatchGen(flag, origin, channel);
648+
continue;
649+
}
650+
}
651+
638652
// D± → π± K∓ π±
639653
if (createDplus) {
640654
if (RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kDPlus, std::array{+kPiPlus, -kKPlus, +kPiPlus}, true, &sign, 2)) {

0 commit comments

Comments
 (0)