Skip to content

Commit

Permalink
PWGHF: add TF border cut at the particle generate level
Browse files Browse the repository at this point in the history
  • Loading branch information
Luigi Dello Stritto committed May 28, 2024
1 parent ccf5157 commit 3630707
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion PWGHF/TableProducer/candidateCreator3Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ struct HfCandidateCreator3ProngExpressions {
bool createLc{false};
bool createXic{false};
float zPvPosMax{1000.f};
float useTimeFrameBorderCut{false};

using BCsInfo = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels>;

void init(InitContext& initContext)
{
Expand All @@ -490,6 +493,8 @@ struct HfCandidateCreator3ProngExpressions {
createXic = option.defaultValue.get<bool>();
} else if (option.name.compare("zPvPosMax") == 0) {
zPvPosMax = option.defaultValue.get<float>();
} else if (option.name.compare("useTimeFrameBorderCut") == 0) {
useTimeFrameBorderCut = option.defaultValue.get<bool>();
}
}
break;
Expand All @@ -506,7 +511,8 @@ struct HfCandidateCreator3ProngExpressions {
/// Performs MC matching.
void processMc(aod::TracksWMc const& tracks,
aod::McParticles const& mcParticles,
aod::McCollisions const&)
aod::McCollisions const&,
BCsInfo const&)
{
rowCandidateProng3->bindExternalIndices(&tracks);

Expand Down Expand Up @@ -630,6 +636,14 @@ struct HfCandidateCreator3ProngExpressions {
continue;
}

if (useTimeFrameBorderCut) { // accept only mc particles coming from bc that are far away from TF border and ITSROFrame
auto bc = mcCollision.bc_as<BCsInfo>();
if (!bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) || !bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) {
rowMcMatchGen(flag, origin, channel);
continue;
}
}

// D± → π± K∓ π±
if (createDplus) {
if (RecoDecay::isMatchedMCGen(mcParticles, particle, Pdg::kDPlus, std::array{+kPiPlus, -kKPlus, +kPiPlus}, true, &sign, 2)) {
Expand Down

0 comments on commit 3630707

Please sign in to comment.