Skip to content

Commit 3113641

Browse files
author
Valerio Di Bella
committed
clean error + add histograms
1 parent 96ac357 commit 3113641

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

PWGHF/HFC/TableProducer/correlatorDplusDplusReduced.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ struct HfCorrelatorDplusDplusReduced {
283283
}
284284
}
285285

286-
void processData(aod::Collisions const& collisions, SelectedCandidates const& candidates, aod::Tracks const&)
286+
void processData(aod::Collisions const& collisions, SelectedCandidates const& candidates, aod::Tracks const&, aod::BCsWithTimestamps const&)
287287
{
288288
static int lastRunNumber = -1;
289289
// reserve memory
@@ -316,15 +316,15 @@ struct HfCorrelatorDplusDplusReduced {
316316
fillEvent(collision);
317317
for (const auto& candidate : candidatesInThisCollision) {
318318
auto prong_candidate = candidate.prong1_as<aod::Tracks>();
319-
auto candidate_sign = prong_candidate.sign();
319+
auto candidate_sign = -prong_candidate.sign();
320320
fillCandidateTable<aod::Collisions>(candidate, rowCandidateFullEvents.lastIndex(), candidate_sign);
321321
}
322322
}
323323
}
324324
PROCESS_SWITCH(HfCorrelatorDplusDplusReduced, processData, "Process data per collision", false);
325325

326326
void processMcRec(aod::Collisions const& collisions,
327-
SelectedCandidatesMc const& candidates)
327+
SelectedCandidatesMc const& candidates, aod::Tracks const&)
328328
{
329329
// reserve memory
330330
rowCandidateFullEvents.reserve(collisions.size());
@@ -343,7 +343,7 @@ struct HfCorrelatorDplusDplusReduced {
343343
fillEvent(collision);
344344
for (const auto& candidate : candidatesInThisCollision) {
345345
auto prong_candidate = candidate.prong1_as<aod::Tracks>();
346-
auto candidate_sign = prong_candidate.sign();
346+
auto candidate_sign = -prong_candidate.sign();
347347
fillCandidateTable<aod::Collisions, true>(candidate, rowCandidateFullEvents.lastIndex(), candidate_sign);
348348
}
349349
}

PWGHF/HFC/Tasks/taskCorrelationDplusDplusReduced.cxx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ struct HfTaskCorrelationDplusDplusReduced {
5555
void init(InitContext const&)
5656
{
5757
registry.add("hMassDplus", "D+ candidates;inv. mass (#pi#pi K) (GeV/#it{c}^{2}))", {HistType::kTH1F, {{120, 1.5848, 2.1848}}});
58+
registry.add("hMassDminus", "D- candidates;inv. mass (#pi#pi K) (GeV/#it{c}^{2}))", {HistType::kTH1F, {{120, 1.5848, 2.1848}}});
5859
registry.add("hMassDplusMatched", "D+ matched candidates;inv. mass (#pi#pi K) (GeV/#it{c}^{2}))", {HistType::kTH1F, {{120, 1.5848, 2.1848}}});
60+
registry.add("hMassDminusMatched", "D- matched candidates;inv. mass (#pi#pi K) (GeV/#it{c}^{2}))", {HistType::kTH1F, {{120, 1.5848, 2.1848}}});
5961
registry.add("hMassDplusminusPair", "D plus-minus pair candidates;inv. mass (#pi K) (GeV/#it{c}^{2});inv. mass (#pi K) (GeV/#it{c}^{2})", {HistType::kTH2F, {{120, 1.5848, 2.1848}, {120, 1.5848, 2.1848}}});
6062
registry.add("hMassDplusPair", "D plus pair candidates;inv. mass (#pi K) (GeV/#it{c}^{2});inv. mass (#pi K) (GeV/#it{c}^{2})", {HistType::kTH2F, {{120, 1.5848, 2.1848}, {120, 1.5848, 2.1848}}});
6163
registry.add("hMassDminusPair", "D minus pair candidates;inv. mass (#pi K) (GeV/#it{c}^{2});inv. mass (#pi K) (GeV/#it{c}^{2})", {HistType::kTH2F, {{120, 1.5848, 2.1848}, {120, 1.5848, 2.1848}}});
@@ -72,7 +74,11 @@ struct HfTaskCorrelationDplusDplusReduced {
7274
auto sign1 = 1;
7375
if (cand1.pt() < 0) {
7476
sign1 = -1;
77+
registry.fill(HIST("hMassDminus"), mass1);
78+
} else {
79+
registry.fill(HIST("hMassDplus"), mass1);
7580
}
81+
7682
for (auto cand2 = cand1 + 1; cand2 != localCandidates.end(); ++cand2) {
7783
auto mass2 = cand2.m();
7884
auto sign2 = 1;
@@ -100,9 +106,15 @@ struct HfTaskCorrelationDplusDplusReduced {
100106

101107
for (const auto& cand1 : localCandidates) {
102108
auto mass1 = cand1.m();
103-
registry.fill(HIST("hMassDplus"), mass1);
104-
if (std::abs(cand1.flagMcMatchRec()) == hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi)
105-
registry.fill(HIST("hMassDplusMatched"), mass1);
109+
if (cand1.pt() < 0) {
110+
registry.fill(HIST("hMassDminus"), mass1);
111+
if (std::abs(cand1.flagMcMatchRec()) == hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi)
112+
registry.fill(HIST("hMassDminusMatched"), mass1);
113+
} else {
114+
registry.fill(HIST("hMassDplus"), mass1);
115+
if (std::abs(cand1.flagMcMatchRec()) == hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi)
116+
registry.fill(HIST("hMassDplusMatched"), mass1);
117+
}
106118
}
107119
}
108120
PROCESS_SWITCH(HfTaskCorrelationDplusDplusReduced, processLocalDataMcRec, "Process local MC data", false);

0 commit comments

Comments
 (0)