Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider the following formatting changes to #8742 #27

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions PWGHF/HFC/DataModel/CorrelationTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ DECLARE_SOA_COLUMN(PtD, ptD, float); //! Transverse mom
DECLARE_SOA_COLUMN(PtHadron, ptHadron, float); //! Transverse momentum of Hadron
DECLARE_SOA_COLUMN(MD, mD, float); //! Invariant mass of D0
DECLARE_SOA_COLUMN(MDbar, mDbar, float); //! Invariant mass of D0bar
DECLARE_SOA_COLUMN(MlScoreBkgD0, mlScoreBkgD0, float); //! ML background score for D0 selection
DECLARE_SOA_COLUMN(MlScoreNonPromptD0, mlScoreNonPromptD0, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(MlScorePromptD0, mlScorePromptD0, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(MlScoreBkgD0bar, mlScoreBkgD0bar, float); //! ML background score for D0 selection
DECLARE_SOA_COLUMN(MlScoreNonPromptD0bar, mlScoreNonPromptD0bar, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(MlScorePromptD0bar, mlScorePromptD0bar, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(MlScoreBkgD0, mlScoreBkgD0, float); //! ML background score for D0 selection
DECLARE_SOA_COLUMN(MlScoreNonPromptD0, mlScoreNonPromptD0, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(MlScorePromptD0, mlScorePromptD0, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(MlScoreBkgD0bar, mlScoreBkgD0bar, float); //! ML background score for D0 selection
DECLARE_SOA_COLUMN(MlScoreNonPromptD0bar, mlScoreNonPromptD0bar, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(MlScorePromptD0bar, mlScorePromptD0bar, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(SignalStatus, signalStatus, int); //! Tag for D0,D0bar
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin for the MixedEvent
DECLARE_SOA_COLUMN(IsAutoCorrelated, isAutoCorrelated, bool); //! Correlation Status
Expand Down
18 changes: 9 additions & 9 deletions PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ struct HfCorrelatorD0Hadrons {
registry.fill(HIST("hMultiplicity"), nTracks);
std::vector<float> outputMlD0 = {-1., -1., -1.};
std::vector<float> outputMlD0bar = {-1., -1., -1.};

for (const auto& candidate : candidates) {
if (std::abs(hfHelper.yD0(candidate)) >= yCandMax || candidate.pt() <= ptCandMin || candidate.pt() >= ptTrackMax) {
continue;
Expand Down Expand Up @@ -339,8 +339,8 @@ struct HfCorrelatorD0Hadrons {
outputMlD0bar[iclass] = candidate.mlProbD0bar()[classMl->at(iclass)];
}
}
entryD0CandRecoInfo(hfHelper.invMassD0ToPiK(candidate), hfHelper.invMassD0barToKPi(candidate), candidate.pt(), outputMlD0[0], outputMlD0[2], outputMlD0bar[0], outputMlD0bar[2]);
entryD0CandRecoInfo(hfHelper.invMassD0ToPiK(candidate), hfHelper.invMassD0barToKPi(candidate), candidate.pt(), outputMlD0[0], outputMlD0[2], outputMlD0bar[0], outputMlD0bar[2]);

// ========================== Fill general histos ================================
registry.fill(HIST("hPtCand"), candidate.pt());
registry.fill(HIST("hPtProng0"), candidate.ptProng0());
Expand Down Expand Up @@ -411,7 +411,7 @@ struct HfCorrelatorD0Hadrons {
poolBin,
correlationStatus);
entryD0HadronRecoInfo(hfHelper.invMassD0ToPiK(candidate), hfHelper.invMassD0barToKPi(candidate), signalStatus);
entryD0HadronMlInfo(outputMlD0[0],outputMlD0[1],outputMlD0[2],outputMlD0bar[0],outputMlD0bar[1],outputMlD0bar[2]);
entryD0HadronMlInfo(outputMlD0[0], outputMlD0[1], outputMlD0[2], outputMlD0bar[0], outputMlD0bar[1], outputMlD0bar[2]);

} // end inner loop (tracks)

Expand Down Expand Up @@ -580,7 +580,7 @@ struct HfCorrelatorD0Hadrons {
correlationStatus);
entryD0HadronRecoInfo(hfHelper.invMassD0ToPiK(candidate), hfHelper.invMassD0barToKPi(candidate), signalStatus);
} // end inner loop (Tracks)
} // end of outer loop (D0)
} // end of outer loop (D0)
registry.fill(HIST("hZvtx"), collision.posZ());
registry.fill(HIST("hMultV0M"), collision.multFT0M());
}
Expand Down Expand Up @@ -716,21 +716,21 @@ struct HfCorrelatorD0Hadrons {
invMassDstar2 = std::sqrt((eKPi + ePion) * (eKPi + ePion) - pSum2);
std::vector<float> outputMlD0 = {-1., -1., -1.};
std::vector<float> outputMlD0bar = {-1., -1., -1.};

if (t1.isSelD0() >= selectionFlagD0) {
if ((std::abs(invMassDstar1 - hfHelper.invMassD0ToPiK(t1)) - softPiMass) < ptSoftPionMax) {
isSoftPiD0 = true;
}
for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) {
outputMlD0[iclass] = t1.mlProbD0()[classMl->at(iclass)];
outputMlD0[iclass] = t1.mlProbD0()[classMl->at(iclass)];
}
}
if (t1.isSelD0bar() >= selectionFlagD0bar) {
if ((std::abs(invMassDstar2 - hfHelper.invMassD0barToKPi(t1)) - softPiMass) < ptSoftPionMax) {
isSoftPiD0bar = true;
}
for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) {
outputMlD0bar[iclass] = t1.mlProbD0bar()[classMl->at(iclass)];
outputMlD0bar[iclass] = t1.mlProbD0bar()[classMl->at(iclass)];
}
}

Expand All @@ -752,7 +752,7 @@ struct HfCorrelatorD0Hadrons {
bool correlationStatus = false;
entryD0HadronPair(getDeltaPhi(t1.phi(), t2.phi()), t1.eta() - t2.eta(), t1.pt(), t2.pt(), poolBin, correlationStatus);
entryD0HadronRecoInfo(hfHelper.invMassD0ToPiK(t1), hfHelper.invMassD0barToKPi(t1), signalStatus);
entryD0HadronMlInfo(outputMlD0[0],outputMlD0[1],outputMlD0[2],outputMlD0bar[0],outputMlD0bar[1],outputMlD0bar[2]);
entryD0HadronMlInfo(outputMlD0[0], outputMlD0[1], outputMlD0[2], outputMlD0bar[0], outputMlD0bar[1], outputMlD0bar[2]);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/HFC/Tasks/taskCorrelationD0Hadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ struct HfTaskCorrelationD0Hadrons {
registry.fill(HIST("hBdtScorePromptD0bar"), bdtScorePromptD0bar);
registry.fill(HIST("hBdtScoreBkgD0bar"), bdtScoreBkgD0bar);
}

for (const auto& pairEntry : pairEntries) {
// define variables for widely used quantities
double deltaPhi = pairEntry.deltaPhi();
Expand All @@ -289,7 +289,7 @@ struct HfTaskCorrelationD0Hadrons {
if (ptHadron > ptHadronMax) {
ptHadron = ptHadronMax + 0.5;
}
if (bdtScorePromptD0 < mlOutputPromptD0->at(ptBinD) || bdtScoreBkgD0 > mlOutputBkgD0->at(ptBinD) ||
if (bdtScorePromptD0 < mlOutputPromptD0->at(ptBinD) || bdtScoreBkgD0 > mlOutputBkgD0->at(ptBinD) ||
bdtScorePromptD0bar < mlOutputPromptD0bar->at(ptBinD) || bdtScoreBkgD0bar > mlOutputBkgD0bar->at(ptBinD)) {
continue;
}
Expand Down
Loading