Skip to content

Commit a27022b

Browse files
jinhyunniJinhyun Park
andauthored
[PWGHF] First draft of Xic0Omegac0 workflow update (#11697)
Co-authored-by: Jinhyun Park <pjhhhk0514@kiaf-ui.sdfarm.kr>
1 parent 47b9cf1 commit a27022b

File tree

6 files changed

+3992
-32
lines changed

6 files changed

+3992
-32
lines changed

PWGHF/Core/SelectorCuts.h

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ static const std::vector<std::string> labelsCutVar = {"pT Ka from Omegac"};
764764

765765
namespace hf_cuts_xic_to_xi_pi
766766
{
767-
static constexpr int NBinsPt = 11;
767+
static constexpr int NBinsPt = 12;
768768
static constexpr int NCutVars = 28;
769769
// default values for the pT bin edges (can be used to configure histogram axis)
770770
// offset by 1 from the bin numbers in cuts array
@@ -780,22 +780,24 @@ constexpr double BinsPt[NBinsPt + 1] = {
780780
10.0,
781781
12.0,
782782
16.0,
783-
24.0};
783+
24.0,
784+
50.0};
784785

785786
const auto vecBinsPt = std::vector<double>{BinsPt, BinsPt + NBinsPt + 1};
786787

787788
// default values for the cuts
788-
constexpr double Cuts[NBinsPt][NCutVars] = {{0.2, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 0 < pt < 1 */
789-
{0.5, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 1 < pt < 2 */
790-
{0.5, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 2 < pt < 3 */
791-
{0.5, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 3 < pt < 4 */
792-
{0.5, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 4 < pt < 5 */
793-
{0.5, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 5 < pt < 6 */
794-
{0.5, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 6 < pt < 8 */
795-
{0.5, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 8 < pt < 10 */
796-
{0.5, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 10 < pt < 12 */
797-
{0.5, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 12 < pt < 16 */
798-
{0.5, 0.99, 0.97, 0.99, 0.99, 0.1, 0.2, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}}; /* 16 < pt < 24 */
789+
constexpr double Cuts[NBinsPt][NCutVars] = {{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 0 < pt < 1 */
790+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 1 < pt < 2 */
791+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 2 < pt < 3 */
792+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 3 < pt < 4 */
793+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 4 < pt < 5 */
794+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 5 < pt < 6 */
795+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 6 < pt < 8 */
796+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 8 < pt < 10 */
797+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 10 < pt < 12 */
798+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 12 < pt < 16 */
799+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}, /* 16 < pt < 24 */
800+
{0.2, 0.97, 0.97, 0.99, 0.99, 2.0, 1.0, 1.0, 0.04, 0.06, 0.06, 0.05, 0.3, 70, 60, 100, 120, 250, 250, 0.4, 100, 300, 0., 0., 1.5, 0., 0., 0.4}}; /* 24 < pt < 50 -> Implemented just for test*/
799801

800802
// row labels
801803
static const std::vector<std::string> labelsPt = {
@@ -809,11 +811,15 @@ static const std::vector<std::string> labelsPt = {
809811
"pT bin 7",
810812
"pT bin 8",
811813
"pT bin 9",
812-
"pT bin 10"};
814+
"pT bin 10",
815+
"pT bin 11"};
813816

814817
// column labels
815-
static const std::vector<std::string> labelsCutVar = {"ptPiFromCharmBaryon", "cosPACasc", "cosPAV0", "cosPaCascToXic", "cosPaV0ToCasc",
816-
"dcaCharmBaryonDau", "dcaCascDau", "dcaV0Dau", "dcaXYToPvCascDau", "dcaXYToPvV0Dau0", "dcaXYToPvV0Dau1", "kfDcaXYPiFromXic", "kfDcaXYCascToPv",
818+
static const std::vector<std::string> labelsCutVar = {"ptPiFromCharmBaryon", "cosPACasc", "cosPAV0",
819+
"cosPaCascToXic", "cosPaV0ToCasc",
820+
"dcaCharmBaryonDau", "dcaCascDau", "dcaV0Dau",
821+
"dcaXYToPvCascDau", "dcaXYToPvV0Dau0", "dcaXYToPvV0Dau1",
822+
"kfDcaXYPiFromXic", "kfDcaXYCascToPv",
817823
"chi2GeoXic", "chi2GeoCasc", "chi2GeoV0",
818824
"chi2TopoXicToPv", "chi2TopoPiFromXicToPv", "chi2TopoCascToPv", "chi2TopoV0ToPv", "chi2TopoV0ToCasc", "chi2TopoCascToXic",
819825
"cascldl", "v0ldl", "decayLenXYXic", "decayLenXYCasc", "decayLenXYLambda", "cTauXic"};

PWGHF/D2H/Tasks/taskXic0ToXiPi.cxx

Lines changed: 49 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,19 @@ struct HfTaskXic0ToXiPi {
165165
registry.add("hMassVsPtVsYVsCentVsPtPion", "Thn for Xic0 candidates with Cent&pTpi", HistType::kTHnSparseD, axesWithCent);
166166
registry.get<THnSparse>(HIST("hBdtScoreVsMassVsPtVsYVsCentVsPtPion"))->Sumw2();
167167
registry.get<THnSparse>(HIST("hMassVsPtVsYVsCentVsPtPion"))->Sumw2();
168+
} else {
169+
const AxisSpec thnAxisPromptScore{thnConfigAxisPromptScore, "BDT score prompt."};
170+
const AxisSpec thnAxisPtPion{thnConfigAxisPtPion, "Pt of Pion from Xic0."};
171+
std::vector<AxisSpec> const axesWithBdtWithoutCent = {thnAxisPromptScore, thnAxisMass, thnAxisPt, thnAxisY, thnAxisPtPion, thnConfigAxisNumPvContr};
172+
std::vector<AxisSpec> const axesWithoutCent = {thnAxisMass, thnAxisPt, thnAxisY, thnAxisPtPion, thnConfigAxisNumPvContr};
173+
registry.add("hBdtScoreVsMassVsPtVsYVsPtPion", "Thn for Xic0 candidates with BDT&Cent&pTpi", HistType::kTHnSparseD, axesWithBdtWithoutCent);
174+
registry.add("hMassVsPtVsYVsPtPion", "Thn for Xic0 candidates with Cent&pTpi", HistType::kTHnSparseD, axesWithoutCent);
175+
registry.get<THnSparse>(HIST("hBdtScoreVsMassVsPtVsYVsPtPion"))->Sumw2();
176+
registry.get<THnSparse>(HIST("hMassVsPtVsYVsPtPion"))->Sumw2();
177+
}
178+
179+
if (yCandRecMax >= 0) {
180+
registry.add("hNumRejCandidate_RapidityCut", "# of rejected candidate using rap cut;Rej;entries", {HistType::kTH1F, {thnAxisY}});
168181
}
169182
}
170183

@@ -181,6 +194,7 @@ struct HfTaskXic0ToXiPi {
181194
yCharmBaryon = candidate.y(o2::constants::physics::MassXiC0);
182195
}
183196
if (yCandRecMax >= 0. && std::abs(yCharmBaryon) > yCandRecMax) {
197+
registry.fill(HIST("hNumRejCandidate_RapidityCut"), yCharmBaryon);
184198
return;
185199
}
186200

@@ -192,22 +206,41 @@ struct HfTaskXic0ToXiPi {
192206
double const ptXic = RecoDecay::pt(candidate.pxCharmBaryon(), candidate.pyCharmBaryon());
193207
double const ptPiFromXic = RecoDecay::pt(candidate.pxBachFromCharmBaryon(), candidate.pyBachFromCharmBaryon());
194208
if constexpr (ApplyMl) {
195-
registry.fill(HIST("hBdtScoreVsMassVsPtVsYVsCentVsPtPion"),
196-
candidate.mlProbToXiPi()[0],
197-
candidate.invMassCharmBaryon(),
198-
ptXic,
199-
yCharmBaryon,
200-
centrality,
201-
ptPiFromXic,
202-
numPvContributors);
209+
if constexpr (UseCentrality) {
210+
registry.fill(HIST("hBdtScoreVsMassVsPtVsYVsCentVsPtPion"),
211+
candidate.mlProbToXiPi()[0],
212+
candidate.invMassCharmBaryon(),
213+
ptXic,
214+
yCharmBaryon,
215+
centrality,
216+
ptPiFromXic,
217+
numPvContributors);
218+
} else {
219+
registry.fill(HIST("hBdtScoreVsMassVsPtVsYVsPtPion"),
220+
candidate.mlProbToXiPi()[0],
221+
candidate.invMassCharmBaryon(),
222+
ptXic,
223+
yCharmBaryon,
224+
ptPiFromXic,
225+
numPvContributors);
226+
}
203227
} else {
204-
registry.fill(HIST("hMassVsPtVsYVsCentVsPtPion"),
205-
candidate.invMassCharmBaryon(),
206-
ptXic,
207-
yCharmBaryon,
208-
centrality,
209-
ptPiFromXic,
210-
numPvContributors);
228+
if constexpr (UseCentrality) {
229+
registry.fill(HIST("hMassVsPtVsYVsCentVsPtPion"),
230+
candidate.invMassCharmBaryon(),
231+
ptXic,
232+
yCharmBaryon,
233+
centrality,
234+
ptPiFromXic,
235+
numPvContributors);
236+
} else {
237+
registry.fill(HIST("hMassVsPtVsYVsPtPion"),
238+
candidate.invMassCharmBaryon(),
239+
ptXic,
240+
yCharmBaryon,
241+
ptPiFromXic,
242+
numPvContributors);
243+
}
211244
}
212245
}
213246

@@ -348,7 +381,7 @@ struct HfTaskXic0ToXiPi {
348381
}
349382
}
350383
}
351-
PROCESS_SWITCH(HfTaskXic0ToXiPi, processDataWithKFParticle, "process HfTaskXic0ToXiPi with KFParticle", true);
384+
PROCESS_SWITCH(HfTaskXic0ToXiPi, processDataWithKFParticle, "process HfTaskXic0ToXiPi with KFParticle", false);
352385

353386
void processDataWithDCAFitterMl(Xic0CandsMl const& candidates,
354387
CollisionsWithEvSels const& collisions)

PWGHF/TableProducer/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ o2physics_add_dpl_workflow(candidate-creator-xic0-omegac0
9090
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
9191
COMPONENT_NAME Analysis)
9292

93+
o2physics_add_dpl_workflow(candidate-creator-xic0-omegac0-qa
94+
SOURCES candidateCreatorXic0Omegac0Qa.cxx
95+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::EventFilteringUtils
96+
COMPONENT_NAME Analysis)
97+
9398
o2physics_add_dpl_workflow(candidate-creator-xic-to-xi-pi-pi
9499
SOURCES candidateCreatorXicToXiPiPi.cxx
95100
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
@@ -182,6 +187,11 @@ o2physics_add_dpl_workflow(candidate-selector-to-xi-pi
182187
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore
183188
COMPONENT_NAME Analysis)
184189

190+
o2physics_add_dpl_workflow(candidate-selector-to-xi-pi-qa
191+
SOURCES candidateSelectorToXiPiQa.cxx
192+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore
193+
COMPONENT_NAME Analysis)
194+
185195
o2physics_add_dpl_workflow(candidate-selector-xic-to-p-k-pi
186196
SOURCES candidateSelectorXicToPKPi.cxx
187197
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore
@@ -274,6 +284,11 @@ o2physics_add_dpl_workflow(tree-creator-to-xi-pi
274284
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
275285
COMPONENT_NAME Analysis)
276286

287+
o2physics_add_dpl_workflow(tree-creator-to-xi-pi-qa
288+
SOURCES treeCreatorToXiPiQa.cxx
289+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
290+
COMPONENT_NAME Analysis)
291+
277292
o2physics_add_dpl_workflow(tree-creator-xic0-to-xi-pi-kf
278293
SOURCES treeCreatorXic0ToXiPiKf.cxx
279294
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore

0 commit comments

Comments
 (0)