Skip to content

Commit 6e3e6e5

Browse files
committed
Remove new variable from candidateCreator
1 parent 28cb75a commit 6e3e6e5

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

PWGHF/DataModel/CandidateReconstructionTables.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,6 @@ DECLARE_SOA_COLUMN(DecLenCascade, decLenCascade, double);
10681068
DECLARE_SOA_COLUMN(DecLenV0, decLenV0, double);
10691069
DECLARE_SOA_COLUMN(ErrorDecayLengthCharmBaryon, errorDecayLengthCharmBaryon, float);
10701070
DECLARE_SOA_COLUMN(ErrorDecayLengthXYCharmBaryon, errorDecayLengthXYCharmBaryon, float);
1071-
DECLARE_SOA_COLUMN(IsPionGlbTrkWoDca, isPionGlbTrkWoDca, bool);
10721071

10731072
// MC matching result:
10741073
DECLARE_SOA_COLUMN(FlagMcMatchRec, flagMcMatchRec, int8_t); // reconstruction level
@@ -1116,7 +1115,7 @@ DECLARE_SOA_TABLE(HfCandToXiPi, "AOD", "HFCANDTOXIPI",
11161115
hf_cand_toxipi::DcaZToPvV0Dau0, hf_cand_toxipi::DcaZToPvV0Dau1, hf_cand_toxipi::DcaZToPvCascDau,
11171116
hf_cand_toxipi::DcaCascDau, hf_cand_toxipi::DcaV0Dau, hf_cand_toxipi::DcaCharmBaryonDau,
11181117
hf_cand_toxipi::DecLenCharmBaryon, hf_cand_toxipi::DecLenCascade, hf_cand_toxipi::DecLenV0, hf_cand_toxipi::ErrorDecayLengthCharmBaryon, hf_cand_toxipi::ErrorDecayLengthXYCharmBaryon,
1119-
hf_track_index::HFflag, hf_cand_toxipi::IsPionGlbTrkWoDca);
1118+
hf_track_index::HFflag);
11201119

11211120
// table with results of reconstruction level MC matching
11221121
DECLARE_SOA_TABLE(HfToXiPiMCRec, "AOD", "HFTOXIPIMCREC", //!

PWGHF/TableProducer/candidateCreatorToXiPi.cxx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ struct HfCandidateCreatorToXiPi {
103103
void process(aod::Collisions const&,
104104
aod::BCsWithTimestamps const&,
105105
TracksWCovDca const&,
106-
aod::TrackSelection const&,
107106
MyCascTable const&, CascadesLinked const&,
108107
MySkimIdx const& candidates)
109108
{
@@ -295,10 +294,6 @@ struct HfCandidateCreatorToXiPi {
295294
// set hfFlag
296295
int hfFlag = 1 << aod::hf_cand_toxipi::DecayType::DecayToXiPi;
297296

298-
// check if pion track satisfies globalTrackWoDca selections
299-
auto trackPionSelInfo = cand.prong0_as<aod::TrackSelection>();
300-
bool isGlbTrkWoDca = trackPionSelInfo.isGlobalTrackWoDCA();
301-
302297
// fill test histograms
303298
hInvMassCharmBaryon->Fill(mCharmBaryon);
304299
hCandidateCounter->Fill(3);
@@ -332,7 +327,7 @@ struct HfCandidateCreatorToXiPi {
332327
dcazV0Dau0, dcazV0Dau1, dcazPiFromCasc,
333328
dcaCascDau, dcaV0Dau, dcaCharmBaryonDau,
334329
decLenCharmBaryon, decLenCascade, decLenV0, errorDecayLengthCharmBaryon, errorDecayLengthXYCharmBaryon,
335-
hfFlag, isGlbTrkWoDca);
330+
hfFlag);
336331

337332
} // loop over LF Cascade-bachelor candidates
338333
} // end of process

PWGHF/TableProducer/treeCreatorToXiPi.cxx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ struct HfTreeCreatorToXiPi {
182182
}
183183

184184
template <typename T>
185-
void fillCandidate(const T& candidate, int8_t flagMc, int8_t debugMc, int8_t originMc)
185+
void fillCandidate(const T& candidate, bool IsPionGlbTrkWoDca, int8_t flagMc, int8_t debugMc, int8_t originMc)
186186
{
187187
rowCandidateFull(
188188
candidate.xPv(),
@@ -267,7 +267,7 @@ struct HfTreeCreatorToXiPi {
267267
candidate.impactParCascXY() / candidate.errImpactParCascXY(),
268268
candidate.impactParPiFromCharmBaryonXY() / candidate.errImpactParPiFromCharmBaryonXY(),
269269
candidate.decLenCharmBaryon() / candidate.errorDecayLengthCharmBaryon(),
270-
candidate.isPionGlbTrkWoDca(),
270+
IsPionGlbTrkWoDca,
271271
candidate.statusPidLambda(),
272272
candidate.statusPidCascade(),
273273
candidate.statusPidCharmBaryon(),
@@ -290,13 +290,18 @@ struct HfTreeCreatorToXiPi {
290290
originMc);
291291
}
292292

293-
void processData(aod::Collisions const& collisions,
293+
void processData(aod::Collisions const& collisions, aod::TrackSelection const&,
294294
soa::Join<aod::HfCandToXiPi, aod::HfSelToXiPi> const& candidates)
295295
{
296296
// Filling candidate properties
297297
rowCandidateFull.reserve(candidates.size());
298298
for (const auto& candidate : candidates) {
299-
fillCandidate(candidate, -7, -7, RecoDecay::OriginType::None);
299+
300+
// check if pion track satisfies globalTrackWoDca selections
301+
auto trackPionSelInfo = candidate.PiFromCharmBaryon_as<aod::TrackSelection>();
302+
bool isPiGlbTrkWoDca = trackPionSelInfo.isGlobalTrackWoDCA();
303+
304+
fillCandidate(candidate, isPiGlbTrkWoDca, -7, -7, RecoDecay::OriginType::None);
300305
}
301306
}
302307
PROCESS_SWITCH(HfTreeCreatorToXiPi, processData, "Process data", true);
@@ -307,7 +312,12 @@ struct HfTreeCreatorToXiPi {
307312
// Filling candidate properties
308313
rowCandidateFull.reserve(candidates.size());
309314
for (const auto& candidate : candidates) {
310-
fillCandidate(candidate, candidate.flagMcMatchRec(), candidate.debugMcRec(), candidate.originRec());
315+
316+
// check if pion track satisfies globalTrackWoDca selections
317+
auto trackPionSelInfo = candidate.PiFromCharmBaryon_as<aod::TrackSelection>();
318+
bool isPiGlbTrkWoDca = trackPionSelInfo.isGlobalTrackWoDCA();
319+
320+
fillCandidate(candidate, isPiGlbTrkWoDca, candidate.flagMcMatchRec(), candidate.debugMcRec(), candidate.originRec());
311321
}
312322
}
313323
PROCESS_SWITCH(HfTreeCreatorToXiPi, processMc, "Process MC", false);

0 commit comments

Comments
 (0)