Skip to content

Commit 46680c3

Browse files
authored
[PWGHF] Add QA histograms to XicToXiPiPi candidate selector (#11982)
1 parent c83380e commit 46680c3

File tree

3 files changed

+349
-177
lines changed

3 files changed

+349
-177
lines changed

PWGHF/Core/SelectorCuts.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ static const std::vector<std::string> labelsCutVar = {"m", "pT p", "pT K", "pT P
788788
namespace hf_cuts_xic_to_xi_pi_pi
789789
{
790790
static constexpr int NBinsPt = 13;
791-
static constexpr int NCutVars = 11;
791+
static constexpr int NCutVars = 13;
792792
// default values for the pT bin edges (can be used to configure histogram axis)
793793
// offset by 1 from the bin numbers in cuts array
794794
constexpr double BinsPt[NBinsPt + 1] = {
@@ -808,20 +808,20 @@ constexpr double BinsPt[NBinsPt + 1] = {
808808
20.};
809809
auto vecBinsPt = std::vector<double>{BinsPt, BinsPt + NBinsPt + 1};
810810

811-
// default values for the cuts m Y Eta EtaDau ptPi0 ptPi1 chi2SV dL dLXY invMass Xi-Pi pairs
812-
constexpr double Cuts[NBinsPt][NCutVars] = {{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 0 < pT < 1 */
813-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 1 < pT < 2 */
814-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 2 < pT < 3 */
815-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 3 < pT < 4 */
816-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 4 < pT < 5 */
817-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 5 < pT < 6 */
818-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 6 < pT < 7 */
819-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 7 < pT < 8 */
820-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 8 < pT < 9 */
821-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 9 < pT < 10 */
822-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 10 < pT < 11 */
823-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 11 < pT < 12 */
824-
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}}; /* 12 < pT < 20 */
811+
// default values for the cuts m Y Eta EtaPi EtaXi pT Pi0 Pi1 Sum chi2SV dL dLXY invMass Xi-Pi pairs
812+
constexpr double Cuts[NBinsPt][NCutVars] = {{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 0 < pT < 1 */
813+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 1 < pT < 2 */
814+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 2 < pT < 3 */
815+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 3 < pT < 4 */
816+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 4 < pT < 5 */
817+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 5 < pT < 6 */
818+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 6 < pT < 7 */
819+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 7 < pT < 8 */
820+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 8 < pT < 9 */
821+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 9 < pT < 10 */
822+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 10 < pT < 11 */
823+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 11 < pT < 12 */
824+
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}}; /* 12 < pT < 20 */
825825

826826
// row labels
827827
static const std::vector<std::string> labelsPt = {
@@ -840,7 +840,7 @@ static const std::vector<std::string> labelsPt = {
840840
"pT bin 12"};
841841

842842
// column labels
843-
static const std::vector<std::string> labelsCutVar = {"m", "y", "eta", "eta Daughters", "pT Pi0", "pT Pi1", "chi2SV", "min decay length", "min decay length XY", "max inv mass Xi-Pi0", "max inv mass Xi-Pi1"};
843+
static const std::vector<std::string> labelsCutVar = {"m", "y", "eta", "eta Pi from XicPlus", "eta Xi Daughters", "pT Pi0", "pT Pi1", "pT Pi0 + Pi1", "chi2SV", "min decay length", "min decay length XY", "max inv mass Xi-Pi0", "max inv mass Xi-Pi1"};
844844
} // namespace hf_cuts_xic_to_xi_pi_pi
845845

846846
namespace hf_cuts_xicc_to_p_k_pi_pi

PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,16 @@ struct HfCandidateCreatorXicToXiPiPi {
143143
}
144144

145145
// add histograms to registry
146+
registry.add("hVertexerType", "Use DCAFitter or KFParticle;;entries", {HistType::kTH1F, {{2, -0.5, 1.5}}});
147+
registry.get<TH1>(HIST("hVertexerType"))->GetXaxis()->SetBinLabel(1 + aod::hf_cand::VertexerType::DCAFitter, "DCAFitter");
148+
registry.get<TH1>(HIST("hVertexerType"))->GetXaxis()->SetBinLabel(1 + aod::hf_cand::VertexerType::KfParticle, "KFParticle");
149+
registry.add("hCandCounter", "hCandCounter", {HistType::kTH1D, {{4, -0.5, 3.5}}});
150+
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + TotalSkimmedTriplets, "total");
151+
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + SelEvent, "Event selected");
152+
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + CascPreSel, "Cascade preselection");
153+
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + VertexFit, "Successful vertex fit");
154+
// physical variables
146155
if (fillHistograms) {
147-
// counter
148-
registry.add("hVertexerType", "Use DCAFitter or KFParticle;;entries", {HistType::kTH1F, {{2, -0.5, 1.5}}});
149-
registry.get<TH1>(HIST("hVertexerType"))->GetXaxis()->SetBinLabel(1 + aod::hf_cand::VertexerType::DCAFitter, "DCAFitter");
150-
registry.get<TH1>(HIST("hVertexerType"))->GetXaxis()->SetBinLabel(1 + aod::hf_cand::VertexerType::KfParticle, "KFParticle");
151-
registry.add("hCandCounter", "hCandCounter", {HistType::kTH1F, {{4, -0.5, 3.5}}});
152-
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + TotalSkimmedTriplets, "total");
153-
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + SelEvent, "Event selected");
154-
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + CascPreSel, "Cascade preselection");
155-
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + VertexFit, "Successful vertex fit");
156-
// physical variables
157156
registry.add("hMass3", "3-prong candidates;inv. mass (#Xi #pi #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{500, 2.3, 2.7}}});
158157
registry.add("hCovPVXX", "3-prong candidates;XX element of cov. matrix of prim. vtx. position (cm^{2});entries", {HistType::kTH1D, {{100, 0., 1.e-4}}});
159158
registry.add("hCovSVXX", "3-prong candidates;XX element of cov. matrix of sec. vtx. position (cm^{2});entries", {HistType::kTH1D, {{100, 0., 0.2}}});
@@ -205,9 +204,7 @@ struct HfCandidateCreatorXicToXiPiPi {
205204
{
206205
// loop over triplets of track indices
207206
for (const auto& rowTrackIndexXicPlus : rowsTrackIndexXicPlus) {
208-
if (fillHistograms) {
209-
registry.fill(HIST("hCandCounter"), TotalSkimmedTriplets);
210-
}
207+
registry.fill(HIST("hCandCounter"), TotalSkimmedTriplets);
211208

212209
// check if the event is selected
213210
auto collision = rowTrackIndexXicPlus.collision_as<Collision>();
@@ -217,9 +214,7 @@ struct HfCandidateCreatorXicToXiPiPi {
217214
/// at least one event selection not satisfied --> reject the candidate
218215
continue;
219216
}
220-
if (fillHistograms) {
221-
registry.fill(HIST("hCandCounter"), SelEvent);
222-
}
217+
registry.fill(HIST("hCandCounter"), SelEvent);
223218

224219
// Retrieve skimmed cascade and pion tracks
225220
auto cascAodElement = rowTrackIndexXicPlus.cascade_as<CascadesLinked>();
@@ -239,9 +234,7 @@ struct HfCandidateCreatorXicToXiPiPi {
239234
continue;
240235
}
241236
}
242-
if (fillHistograms) {
243-
registry.fill(HIST("hCandCounter"), CascPreSel);
244-
}
237+
registry.fill(HIST("hCandCounter"), CascPreSel);
245238

246239
//----------------------Set the magnetic field from ccdb---------------------------------------
247240
/// The static instance of the propagator was already modified in the HFTrackIndexSkimCreator,
@@ -294,9 +287,7 @@ struct HfCandidateCreatorXicToXiPiPi {
294287
LOG(info) << "Run time error found: " << error.what() << ". DCAFitterN cannot work, skipping the candidate.";
295288
continue;
296289
}
297-
if (fillHistograms) {
298-
registry.fill(HIST("hCandCounter"), VertexFit);
299-
}
290+
registry.fill(HIST("hCandCounter"), VertexFit);
300291

301292
//----------------------------calculate physical properties-----------------------
302293
// Charge of charm baryon
@@ -446,9 +437,7 @@ struct HfCandidateCreatorXicToXiPiPi {
446437
{
447438
// loop over triplets of track indices
448439
for (const auto& rowTrackIndexXicPlus : rowsTrackIndexXicPlus) {
449-
if (fillHistograms) {
450-
registry.fill(HIST("hCandCounter"), TotalSkimmedTriplets);
451-
}
440+
registry.fill(HIST("hCandCounter"), TotalSkimmedTriplets);
452441

453442
// check if the event is selected
454443
auto collision = rowTrackIndexXicPlus.collision_as<Collision>();
@@ -458,9 +447,7 @@ struct HfCandidateCreatorXicToXiPiPi {
458447
/// at least one event selection not satisfied --> reject the candidate
459448
continue;
460449
}
461-
if (fillHistograms) {
462-
registry.fill(HIST("hCandCounter"), SelEvent);
463-
}
450+
registry.fill(HIST("hCandCounter"), SelEvent);
464451

465452
// Retrieve skimmed cascade and pion tracks
466453
auto cascAodElement = rowTrackIndexXicPlus.cascade_as<aod::KFCascadesLinked>();
@@ -480,9 +467,7 @@ struct HfCandidateCreatorXicToXiPiPi {
480467
continue;
481468
}
482469
}
483-
if (fillHistograms) {
484-
registry.fill(HIST("hCandCounter"), CascPreSel);
485-
}
470+
registry.fill(HIST("hCandCounter"), CascPreSel);
486471

487472
//----------------------Set the magnetic field from ccdb-----------------------------
488473
/// The static instance of the propagator was already modified in the HFTrackIndexSkimCreator,
@@ -539,9 +524,7 @@ struct HfCandidateCreatorXicToXiPiPi {
539524
LOG(debug) << "Failed to construct XicPlus : " << e.what();
540525
continue;
541526
}
542-
if (fillHistograms) {
543-
registry.fill(HIST("hCandCounter"), VertexFit);
544-
}
527+
registry.fill(HIST("hCandCounter"), VertexFit);
545528

546529
// get chi2 values
547530
float chi2GeoXicPlus = kfXicPlus.GetChi2() / kfXicPlus.GetNDF();

0 commit comments

Comments
 (0)