Skip to content

Commit

Permalink
Merge pull request #27 from alibuild/alibot-cleanup-8742
Browse files Browse the repository at this point in the history
Please consider the following formatting changes to #8742
  • Loading branch information
samrangy authored Nov 29, 2024
2 parents bb03560 + ebbc4d7 commit 312fba8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
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

0 comments on commit 312fba8

Please sign in to comment.