Skip to content
Merged
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
14 changes: 13 additions & 1 deletion PWGHF/D2H/Tasks/taskD0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ struct HfTaskD0 {
Configurable<bool> storeTrackQuality{"storeTrackQuality", false, "Flag to store track quality information"};
Configurable<bool> storeZdcEnergy{"storeZdcEnergy", false, "Flag to store ZDC energy info"};
Configurable<bool> storeZdcTime{"storeZdcTime", false, "Flag to store ZDC time info"};
Configurable<bool> storeEtaProngs{"storeEtaProngs", false, "Flag to store eta of the prongs"};
// ML inference
Configurable<bool> applyMl{"applyMl", false, "Flag to apply ML selections"};
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Expand Down Expand Up @@ -167,6 +168,7 @@ struct HfTaskD0 {
ConfigurableAxis thnConfigAxisFDD{"thnConfigAxisFDD", {200, 0., 4000.}, "axis for FDD amplitude (a.u.)"};
ConfigurableAxis thnConfigAxisZN{"thnConfigAxisZN", {510, -1.5, 49.5}, "axis for ZN energy (a.u.)"};
ConfigurableAxis thnConfigAxisTimeZN{"thnConfigAxisTimeZN", {700, -35., 35.}, "axis for ZN energy (a.u.)"};
ConfigurableAxis thnConfigAxisEtaProng{"thnConfigAxisEtaProng", {200, -1., 1.}, "axis for eta of D0 prongs"};

HistogramRegistry registry{
"registry",
Expand Down Expand Up @@ -322,6 +324,7 @@ struct HfTaskD0 {
const AxisSpec thnAxisEnergyZNC{thnConfigAxisZN, "ZNC energy"};
const AxisSpec thnAxisTimeZNA{thnConfigAxisTimeZN, "ZNA Time"};
const AxisSpec thnAxisTimeZNC{thnConfigAxisTimeZN, "ZNC Time"};
const AxisSpec thnAxisEtaProngs{thnConfigAxisEtaProng, "Eta of prongs"};

if (doprocessMcWithDCAFitterN || doprocessMcWithDCAFitterNCent || doprocessMcWithKFParticle || doprocessMcWithDCAFitterNMl || doprocessMcWithDCAFitterNMlCent || doprocessMcWithKFParticleMl) {
std::vector<AxisSpec> axesAcc = {thnAxisGenPtD, thnAxisGenPtB, thnAxisY, thnAxisOrigin, thnAxisNumPvContr};
Expand Down Expand Up @@ -387,6 +390,10 @@ struct HfTaskD0 {
axes.push_back(thnAxisTimeZNA);
axes.push_back(thnAxisTimeZNC);
}
if (storeEtaProngs) {
axes.push_back(thnAxisEtaProngs);
axes.push_back(thnAxisEtaProngs);
}
}

if (applyMl) {
Expand Down Expand Up @@ -853,7 +860,8 @@ struct HfTaskD0 {
int const nAxesOccIR = storeOccupancyAndIR ? 2 : 0; // occupancy and IR if storeOccupancyAndIR
int const nAxesZdcEnergy = storeZdcEnergy ? 2 : 0; // ZDC energy if storeZdcEnergy
int const nAxesZdcTime = storeZdcTime ? 2 : 0; // ZDC time if storeZdctime
int const nAxesTotal = NAxesBase + NAxesMl + nAxesCent + nAxesOccIR + nAxesZdcEnergy + nAxesZdcTime;
int const nAxesEtaProngs = storeEtaProngs ? 2 : 0; // Eta distributions of prong
int const nAxesTotal = NAxesBase + NAxesMl + nAxesCent + nAxesOccIR + nAxesZdcEnergy + nAxesZdcTime + nAxesEtaProngs;

std::vector<double> valuesToFill;
valuesToFill.reserve(nAxesTotal);
Expand Down Expand Up @@ -893,6 +901,10 @@ struct HfTaskD0 {
valuesToFill.push_back(static_cast<double>(zdcTimeZNA));
valuesToFill.push_back(static_cast<double>(zdcTimeZNC));
}
if (storeEtaProngs) {
valuesToFill.push_back(static_cast<double>(track0.eta()));
valuesToFill.push_back(static_cast<double>(track1.eta()));
}
if constexpr (FillMl) {
registry.get<THnSparse>(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"))->Fill(valuesToFill.data());
} else {
Expand Down
Loading