Skip to content

Commit ff52550

Browse files
minjungkim12claude
andcommitted
[PWGHF] Add FT0A and FT0C axes to taskD0 UPC THnSparse
- Add ConfigurableAxis for FT0A and FT0C (1001 bins, -1.5 to 999.5) - Bin centers at -1, 0, 1, 2, ..., 999 for integer amplitude values - Add axes to THnSparse when doprocessDataWithDCAFitterNMlWithUpc is enabled - Include FT0A and FT0C amplitudes in fillTHnData lambda function - Enables detailed analysis of forward detector signals in UPC events - Complements gap type classification with raw detector information 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 03673b5 commit ff52550

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

PWGHF/D2H/Tasks/taskD0.cxx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ struct HfTaskD0 {
154154
ConfigurableAxis thnConfigAxisMinTpcNCrossedRows{"thnConfigAxisMinTpcNCrossedRows", {10, 70, 180}, "axis for minimum TPC NCls crossed rows of candidate prongs"};
155155
ConfigurableAxis thnConfigAxisIR{"thnConfigAxisIR", {5000, 0, 500}, "Interaction rate (kHz)"};
156156
ConfigurableAxis thnConfigAxisGapType{"thnConfigAxisGapType", {3, -0.5, 2.5}, "axis for UPC gap type (0=GapA, 1=GapC, 2=DoubleGap)"};
157+
ConfigurableAxis thnConfigAxisFT0A{"thnConfigAxisFT0A", {1001, -1.5, 999.5}, "axis for FT0-A amplitude (a.u.)"};
158+
ConfigurableAxis thnConfigAxisFT0C{"thnConfigAxisFT0C", {1001, -1.5, 999.5}, "axis for FT0-C amplitude (a.u.)"};
157159

158160
HistogramRegistry registry{
159161
"registry",
@@ -299,6 +301,8 @@ struct HfTaskD0 {
299301
const AxisSpec thnAxisMinTpcNCrossedRows{thnConfigAxisMinTpcNCrossedRows, "Minimum TPC crossed rows"};
300302
const AxisSpec thnAxisIR{thnConfigAxisIR, "Interaction rate"};
301303
const AxisSpec thnAxisGapType{thnConfigAxisGapType, "Gap type"};
304+
const AxisSpec thnAxisFT0A{thnConfigAxisFT0A, "FT0-A amplitude"};
305+
const AxisSpec thnAxisFT0C{thnConfigAxisFT0C, "FT0-C amplitude"};
302306

303307
if (doprocessMcWithDCAFitterN || doprocessMcWithDCAFitterNCent || doprocessMcWithKFParticle || doprocessMcWithDCAFitterNMl || doprocessMcWithDCAFitterNMlCent || doprocessMcWithKFParticleMl) {
304308
std::vector<AxisSpec> axesAcc = {thnAxisGenPtD, thnAxisGenPtB, thnAxisY, thnAxisOrigin, thnAxisNumPvContr};
@@ -334,6 +338,8 @@ struct HfTaskD0 {
334338
}
335339
if (doprocessDataWithDCAFitterNMlWithUpc) {
336340
axes.push_back(thnAxisGapType);
341+
axes.push_back(thnAxisFT0A);
342+
axes.push_back(thnAxisFT0C);
337343
}
338344
if (applyMl) {
339345
const AxisSpec thnAxisBkgScore{thnConfigAxisBkgScore, "BDT score bkg."};
@@ -600,13 +606,15 @@ struct HfTaskD0 {
600606
registry.fill(HIST("hMassVsPhi"), massD0bar, ptCandidate, candidate.phi());
601607
}
602608

603-
// Fill THnSparse with gap type using vectorized approach similar to taskDplus
609+
// Fill THnSparse with gap type and FIT signals using vectorized approach
604610
if constexpr (fillMl) {
605611
auto fillTHnData = [&](float mass, int d0Type) {
606612
std::vector<double> valuesToFill{candidate.mlProbD0()[0], candidate.mlProbD0()[1], candidate.mlProbD0()[2],
607613
static_cast<double>(mass), static_cast<double>(ptCandidate),
608614
static_cast<double>(HfHelper::yD0(candidate)), static_cast<double>(d0Type)};
609615
valuesToFill.push_back(static_cast<double>(gapTypeInt));
616+
valuesToFill.push_back(static_cast<double>(fitInfo.ampFT0A));
617+
valuesToFill.push_back(static_cast<double>(fitInfo.ampFT0C));
610618
registry.get<THnSparse>(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"))->Fill(valuesToFill.data());
611619
};
612620

@@ -623,6 +631,8 @@ struct HfTaskD0 {
623631
std::vector<double> valuesToFill{static_cast<double>(mass), static_cast<double>(ptCandidate),
624632
static_cast<double>(HfHelper::yD0(candidate)), static_cast<double>(d0Type)};
625633
valuesToFill.push_back(static_cast<double>(gapTypeInt));
634+
valuesToFill.push_back(static_cast<double>(fitInfo.ampFT0A));
635+
valuesToFill.push_back(static_cast<double>(fitInfo.ampFT0C));
626636
registry.get<THnSparse>(HIST("hMassVsPtVsPtBVsYVsOriginVsD0Type"))->Fill(valuesToFill.data());
627637
};
628638

0 commit comments

Comments
 (0)