Skip to content

Commit e6d7ac5

Browse files
authored
Add files via upload
1 parent 5365af0 commit e6d7ac5

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ struct HfCorrelatorD0HadronsSelection {
9494
Partition<soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfCand2ProngMcRec>> selectedD0candidatesMc = aod::hf_sel_candidate_d0::isSelD0 >= selectionFlagD0 || aod::hf_sel_candidate_d0::isSelD0bar >= selectionFlagD0bar;
9595

9696
void processD0SelectionData(aod::Collision const& collision,
97-
soa::Join<aod::HfCand2Prong, aod::HfSelD0> const&)
97+
soa::Join<aod::HfCand2Prong, aod::HfSelD0> const& candidates)
9898
{
9999
bool isD0Found = 0;
100100
if (selectedD0Candidates.size() > 0) {
@@ -119,7 +119,7 @@ struct HfCorrelatorD0HadronsSelection {
119119
PROCESS_SWITCH(HfCorrelatorD0HadronsSelection, processD0SelectionData, "Process D0 Selection Data", false);
120120

121121
void processD0SelectionMcRec(aod::Collision const& collision,
122-
soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfCand2ProngMcRec> const&)
122+
soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfCand2ProngMcRec> const& candidates)
123123
{
124124
bool isD0Found = 0;
125125
if (selectedD0candidatesMc.size() > 0) {
@@ -142,15 +142,15 @@ struct HfCorrelatorD0HadronsSelection {
142142
}
143143
PROCESS_SWITCH(HfCorrelatorD0HadronsSelection, processD0SelectionMcRec, "Process D0 Selection MCRec", true);
144144

145-
void processD0SelectionMcGen(aod::McCollision const&,
145+
void processD0SelectionMcGen(aod::McCollision const& mcCollision,
146146
aod::McParticles const& mcParticles)
147147
{
148148
bool isD0Found = 0;
149149
for (const auto& particle1 : mcParticles) {
150150
if (std::abs(particle1.pdgCode()) != Pdg::kD0) {
151151
continue;
152152
}
153-
double yD = RecoDecay::y(particle1.pVector(), MassD0);
153+
double yD = RecoDecay::y(std::array{particle1.px(), particle1.py(), particle1.pz()}, MassD0);
154154
if (yCandMax >= 0. && std::abs(yD) > yCandMax) {
155155
continue;
156156
}
@@ -285,7 +285,7 @@ struct HfCorrelatorD0Hadrons {
285285
/// D0-h correlation pair builder - for real data and data-like analysis (i.e. reco-level w/o matching request via MC truth)
286286
void processData(soa::Join<aod::Collisions, aod::Mults>::iterator const& collision,
287287
aod::TracksWDca const& tracks,
288-
soa::Join<aod::HfCand2Prong, aod::HfSelD0> const&)
288+
soa::Join<aod::HfCand2Prong, aod::HfSelD0> const& candidates)
289289
{
290290
// protection against empty tables to be sliced
291291
if (selectedD0Candidates.size() == 0) {
@@ -377,7 +377,7 @@ struct HfCorrelatorD0Hadrons {
377377
// ========== soft pion removal ===================================================
378378
double invMassDstar1 = 0., invMassDstar2 = 0.;
379379
bool isSoftPiD0 = false, isSoftPiD0bar = false;
380-
auto pSum2 = RecoDecay::p2(candidate1.pVector(), track.pVector());
380+
auto pSum2 = RecoDecay::p2(candidate1.px() + track.px(), candidate1.py() + track.py(), candidate1.pz() + track.pz());
381381
auto ePion = track.energy(massPi);
382382
invMassDstar1 = std::sqrt((ePiK + ePion) * (ePiK + ePion) - pSum2);
383383
invMassDstar2 = std::sqrt((eKPi + ePion) * (eKPi + ePion) - pSum2);
@@ -429,7 +429,7 @@ struct HfCorrelatorD0Hadrons {
429429

430430
void processMcRec(soa::Join<aod::Collisions, aod::Mults>::iterator const& collision,
431431
aod::TracksWDca const& tracks,
432-
soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfCand2ProngMcRec> const&)
432+
soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfCand2ProngMcRec> const& candidates)
433433
{
434434
// protection against empty tables to be sliced
435435
if (selectedD0candidatesMc.size() == 0) {
@@ -537,7 +537,7 @@ struct HfCorrelatorD0Hadrons {
537537
// ===== soft pion removal ===================================================
538538
double invMassDstar1 = 0, invMassDstar2 = 0;
539539
bool isSoftPiD0 = false, isSoftPiD0bar = false;
540-
auto pSum2 = RecoDecay::p2(candidate1.pVector(), track.pVector());
540+
auto pSum2 = RecoDecay::p2(candidate1.px() + track.px(), candidate1.py() + track.py(), candidate1.pz() + track.pz());
541541
auto ePion = track.energy(massPi);
542542
invMassDstar1 = std::sqrt((ePiK + ePion) * (ePiK + ePion) - pSum2);
543543
invMassDstar2 = std::sqrt((eKPi + ePion) * (eKPi + ePion) - pSum2);
@@ -605,7 +605,7 @@ struct HfCorrelatorD0Hadrons {
605605
if (std::abs(particle1.pdgCode()) != Pdg::kD0) {
606606
continue;
607607
}
608-
double yD = RecoDecay::y(particle1.pVector(), MassD0);
608+
double yD = RecoDecay::y(std::array{particle1.px(), particle1.py(), particle1.pz()}, MassD0);
609609
if (yCandMax >= 0. && std::abs(yD) > yCandMax) {
610610
continue;
611611
}
@@ -647,7 +647,7 @@ struct HfCorrelatorD0Hadrons {
647647

648648
registry.fill(HIST("hTrackCounterGen"), 3); // fill after soft pion removal
649649

650-
auto getTracksSize = [&mcParticles](aod::McCollision const& /*collision*/) {
650+
auto getTracksSize = [&mcParticles](aod::McCollision const& collision) {
651651
int nTracks = 0;
652652
for (const auto& track : mcParticles) {
653653
if (track.isPhysicalPrimary() && std::abs(track.eta()) < 1.0) {
@@ -695,7 +695,7 @@ struct HfCorrelatorD0Hadrons {
695695
auto eKPi = RecoDecay::e(t1.pVectorProng0(), massK) + RecoDecay::e(t1.pVectorProng1(), massPi);
696696
double invMassDstar1 = 0., invMassDstar2 = 0.;
697697
bool isSoftPiD0 = false, isSoftPiD0bar = false;
698-
auto pSum2 = RecoDecay::p2(t1.pVector(), t2.pVector());
698+
auto pSum2 = RecoDecay::p2(t1.px() + t2.px(), t1.py() + t2.py(), t1.pz() + t2.pz());
699699
auto ePion = t2.energy(massPi);
700700
invMassDstar1 = std::sqrt((ePiK + ePion) * (ePiK + ePion) - pSum2);
701701
invMassDstar2 = std::sqrt((eKPi + ePion) * (eKPi + ePion) - pSum2);
@@ -759,7 +759,7 @@ struct HfCorrelatorD0Hadrons {
759759
auto eKPi = RecoDecay::e(t1.pVectorProng0(), massK) + RecoDecay::e(t1.pVectorProng1(), massPi);
760760
double invMassDstar1 = 0., invMassDstar2 = 0.;
761761
bool isSoftPiD0 = false, isSoftPiD0bar = false;
762-
auto pSum2 = RecoDecay::p2(t1.pVector(), t2.pVector());
762+
auto pSum2 = RecoDecay::p2(t1.px() + t2.px(), t1.py() + t2.py(), t1.pz() + t2.pz());
763763
auto ePion = t2.energy(massPi);
764764
invMassDstar1 = std::sqrt((ePiK + ePion) * (ePiK + ePion) - pSum2);
765765
invMassDstar2 = std::sqrt((eKPi + ePion) * (eKPi + ePion) - pSum2);
@@ -867,7 +867,7 @@ struct HfCorrelatorD0Hadrons {
867867
continue;
868868
}
869869

870-
double yD = RecoDecay::y(t1.pVector(), MassD0);
870+
double yD = RecoDecay::y(std::array{t1.px(), t1.py(), t1.pz()}, MassD0);
871871
if (yCandMax >= 0. && std::abs(yD) > yCandMax) {
872872
continue;
873873
}

0 commit comments

Comments
 (0)