2525#include " Framework/O2DatabasePDGPlugin.h"
2626#include " Framework/runDataProcessing.h"
2727#include " ReconstructionDataFormats/DCA.h"
28+ #include " ReconstructionDataFormats/V0.h"
2829
2930#include " Common/Core/trackUtilities.h"
3031#include " Common/Core/TrackSelection.h"
@@ -53,9 +54,6 @@ namespace o2::aod
5354namespace full
5455{
5556DECLARE_SOA_INDEX_COLUMN (Collision, collision);
56- DECLARE_SOA_COLUMN (PtD1, ptD1, float );
57- DECLARE_SOA_COLUMN (PtD2, ptD2, float );
58- DECLARE_SOA_COLUMN (PtPi, ptPi, float );
5957DECLARE_SOA_COLUMN (PxProng0D1, pxProng0D1, float );
6058DECLARE_SOA_COLUMN (PxProng1D1, pxProng1D1, float );
6159DECLARE_SOA_COLUMN (PyProng0D1, pyProng0D1, float );
@@ -95,10 +93,12 @@ DECLARE_SOA_COLUMN(NSigTpcSoftPi, nSigTpcSoftPi, float);
9593DECLARE_SOA_COLUMN (NSigTofSoftPi, nSigTofSoftPi, float );
9694DECLARE_SOA_COLUMN (MlScoreD1, mlScoreD1, float );
9795DECLARE_SOA_COLUMN (MlScoreD2, mlScoreD2, float );
98- DECLARE_SOA_COLUMN (DecayLengthD1, decayLengthD1, float );
99- DECLARE_SOA_COLUMN (DecayLengthD2, decayLengthD2, float );
96+ DECLARE_SOA_COLUMN (ImpactParameterD1, impactParameterD1, float );
97+ DECLARE_SOA_COLUMN (ImpactParameterD2, impactParameterD2, float );
98+ DECLARE_SOA_COLUMN (ImpactParameterSoftPi, impactParameterSoftPi, float );
10099DECLARE_SOA_COLUMN (CpaD1, cpaD1, float );
101100DECLARE_SOA_COLUMN (CpaD2, cpaD2, float );
101+ DECLARE_SOA_COLUMN (Chi2PCA, chi2PCA, float );
102102DECLARE_SOA_COLUMN (SignSoftPi, signSoftPi, float );
103103DECLARE_SOA_COLUMN (DcaXYSoftPi, dcaXYSoftPi, float );
104104DECLARE_SOA_COLUMN (DcaZSoftPi, dcaZSoftPi, float );
@@ -112,9 +112,6 @@ DECLARE_SOA_COLUMN(RunNumber, runNumber, int);
112112} // namespace full
113113
114114DECLARE_SOA_TABLE (HfCandTccLites, " AOD" , " HFCANDTCCLITE" ,
115- full::PtD1,
116- full::PtD2,
117- full::PtPi,
118115 full::PxProng0D1,
119116 full::PxProng1D1,
120117 full::PyProng0D1,
@@ -154,10 +151,12 @@ DECLARE_SOA_TABLE(HfCandTccLites, "AOD", "HFCANDTCCLITE",
154151 full::NSigTofSoftPi,
155152 full::MlScoreD1,
156153 full::MlScoreD2,
157- full::DecayLengthD1,
158- full::DecayLengthD2,
154+ full::ImpactParameterD1,
155+ full::ImpactParameterD2,
156+ full::ImpactParameterSoftPi,
159157 full::CpaD1,
160158 full::CpaD2,
159+ full::Chi2PCA,
161160 full::SignSoftPi,
162161 full::DcaXYSoftPi,
163162 full::DcaZSoftPi,
@@ -184,16 +183,37 @@ struct HfTreeCreatorTccToD0D0Pi {
184183 Configurable<float > ptMinSoftPion{" ptMinSoftPion" , 0.0 , " Min pt for the soft pion" };
185184 Configurable<bool > usePionIsGlobalTrackWoDCA{" usePionIsGlobalTrackWoDCA" , true , " check isGlobalTrackWoDCA status for pions" };
186185
187- // Configurable<float> softPiEtaMax{"softPiEtaMax", 0.9f, "Soft pion max value for pseudorapidity (abs vale)"};
188- // Configurable<float> softPiChi2Max{"softPiChi2Max", 36.f, "Soft pion max value for chi2 ITS"};
189- // Configurable<int> softPiItsHitMap{"softPiItsHitMap", 127, "Soft pion ITS hitmap"};
190- // Configurable<int> softPiItsHitsMin{"softPiItsHitsMin", 1, "Minimum number of ITS layers crossed by the soft pion among those in \"softPiItsHitMap\""};
186+ // vertexing
187+ Configurable<bool > propagateToPCA{" propagateToPCA" , true , " create tracks version propagated to PCA" };
188+ Configurable<bool > useAbsDCA{" useAbsDCA" , false , " Minimise abs. distance rather than chi2" };
189+ Configurable<bool > useWeightedFinalPCA{" useWeightedFinalPCA" , false , " Recalculate vertex position using track covariances, effective only if useAbsDCA is true" };
190+ Configurable<float > maxR{" maxR" , 200 ., " reject PCA's above this radius" };
191+ Configurable<float > maxDZIni{" maxDZIni" , 4 ., " reject (if>0) PCA candidate if tracks DZ exceeds threshold" };
192+ Configurable<float > minParamChange{" minParamChange" , 1 .e -3 , " stop iterations if largest change of any Lb is smaller than this" };
193+ Configurable<float > minRelChi2Change{" minRelChi2Change" , 0.9 , " stop iterations is chi2/chi2old > this" };
194+
191195 Configurable<float > softPiDcaXYMax{" softPiDcaXYMax" , 0.065 , " Soft pion max dcaXY (cm)" };
192196 Configurable<float > softPiDcaZMax{" softPiDcaZMax" , 0.065 , " Soft pion max dcaZ (cm)" };
193197 Configurable<float > deltaMassCanMax{" deltaMassCanMax" , 2 , " delta candidate max mass (DDPi-D0D0) ((GeV/c2)" };
194198 Configurable<float > massCanMax{" massCanMax" , 4.0 , " candidate max mass (DDPi) ((GeV/c2)" };
195199
200+ // magnetic field setting from CCDB
201+ Configurable<bool > isRun2{" isRun2" , false , " enable Run 2 or Run 3 GRP objects for magnetic field" };
202+ Configurable<std::string> ccdbUrl{" ccdbUrl" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
203+ Configurable<std::string> ccdbPathLut{" ccdbPathLut" , " GLO/Param/MatLUT" , " Path for LUT parametrization" };
204+ Configurable<std::string> ccdbPathGrp{" ccdbPathGrp" , " GLO/GRP/GRP" , " Path of the grp file (Run 2)" };
205+ Configurable<std::string> ccdbPathGrpMag{" ccdbPathGrpMag" , " GLO/Config/GRPMagField" , " CCDB path of the GRPMagField object (Run 3)" };
206+
207+ o2::vertexing::DCAFitterN<3 > dfTcc; // Tcc vertex fitter
208+ o2::vertexing::DCAFitterN<2 > dfD1; // 2-prong vertex fitter (to rebuild D01 vertex)
209+ o2::vertexing::DCAFitterN<2 > dfD2; // 2-prong vertex fitter (to rebuild D02 vertex)
210+
196211 HfHelper hfHelper;
212+ Service<o2::ccdb::BasicCCDBManager> ccdb;
213+ o2::base::MatLayerCylSet* lut;
214+ o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
215+ int runNumber;
216+ double bz{0 .};
197217
198218 using TracksPid = soa::Join<aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullKa, aod::pidTOFFullKa>;
199219 using TracksWPid = soa::Join<aod::TracksWCovDcaExtra, TracksPid, aod::TrackSelection>;
@@ -209,14 +229,47 @@ struct HfTreeCreatorTccToD0D0Pi {
209229 Preslice<SelectedCandidatesMl> candsD0PerCollisionWithMl = aod::track_association::collisionId;
210230 Preslice<aod::TrackAssoc> trackIndicesPerCollision = aod::track_association::collisionId;
211231 // Partition<SelectedCandidatesMl> candidatesMlAll = aod::hf_sel_candidate_d0::isSelD0 >= 0;
212-
232+ std::shared_ptr<TH1> hCandidatesD1, hCandidatesD2, hCandidatesTcc;
233+ OutputObj<TH1F> hCovPVXX{TH1F (" hCovPVXX" , " Tcc candidates;XX element of cov. matrix of prim. vtx. position (cm^{2});entries" , 100 , 0 ., 1 .e -4 )};
234+ OutputObj<TH1F> hCovSVXX{TH1F (" hCovSVXX" , " Tcc candidates;XX element of cov. matrix of sec. vtx. position (cm^{2});entries" , 100 , 0 ., 0.2 )};
213235 void init (InitContext const &)
214236 {
215237
216238 std::array<bool , 3 > doprocess{doprocessDataWithMl, doprocessDataWithMlWithFT0C, doprocessDataWithMlWithFT0M};
217239 if (std::accumulate (doprocess.begin (), doprocess.end (), 0 ) != 1 ) {
218240 LOGP (fatal, " Only one process function can be enabled at a time." );
219241 }
242+
243+ dfD1.setPropagateToPCA (propagateToPCA);
244+ dfD1.setMaxR (maxR);
245+ dfD1.setMaxDZIni (maxDZIni);
246+ dfD1.setMinParamChange (minParamChange);
247+ dfD1.setMinRelChi2Change (minRelChi2Change);
248+ dfD1.setUseAbsDCA (useAbsDCA);
249+ dfD1.setWeightedFinalPCA (useWeightedFinalPCA);
250+
251+ dfD2.setPropagateToPCA (propagateToPCA);
252+ dfD2.setMaxR (maxR);
253+ dfD2.setMaxDZIni (maxDZIni);
254+ dfD2.setMinParamChange (minParamChange);
255+ dfD2.setMinRelChi2Change (minRelChi2Change);
256+ dfD2.setUseAbsDCA (useAbsDCA);
257+ dfD2.setWeightedFinalPCA (useWeightedFinalPCA);
258+
259+ dfTcc.setPropagateToPCA (propagateToPCA);
260+ dfTcc.setMaxR (maxR);
261+ dfTcc.setMaxDZIni (maxDZIni);
262+ dfTcc.setMinParamChange (minParamChange);
263+ dfTcc.setMinRelChi2Change (minRelChi2Change);
264+ dfTcc.setUseAbsDCA (useAbsDCA);
265+ dfTcc.setWeightedFinalPCA (useWeightedFinalPCA);
266+
267+ // Configure CCDB access
268+ ccdb->setURL (ccdbUrl);
269+ ccdb->setCaching (true );
270+ ccdb->setLocalObjectValidityChecking ();
271+ lut = o2::base::MatLayerCylSet::rectifyPtrFromFile (ccdb->get <o2::base::MatLayerCylSet>(ccdbPathLut));
272+ runNumber = 0 ;
220273 }
221274
222275 template <typename T>
@@ -247,8 +300,83 @@ struct HfTreeCreatorTccToD0D0Pi {
247300 aod::TrackAssoc const & trackIndices,
248301 TrkType const & track, aod::BCs const &)
249302 {
303+
304+ auto primaryVertex = getPrimaryVertex (collision);
305+ auto bc = collision.template bc_as <aod::BCsWithTimestamps>();
306+ if (runNumber != bc.runNumber ()) {
307+ LOG (info) << " >>>>>>>>>>>> Current run number: " << runNumber;
308+ initCCDB (bc, runNumber, ccdb, isRun2 ? ccdbPathGrp : ccdbPathGrpMag, lut, isRun2);
309+ bz = o2::base::Propagator::Instance ()->getNominalBz ();
310+ LOG (info) << " >>>>>>>>>>>> Magnetic field: " << bz;
311+ }
312+ dfTcc.setBz (bz);
313+ dfD1.setBz (bz);
314+ dfD2.setBz (bz);
315+
250316 for (const auto & candidateD1 : candidates) {
317+
318+ auto trackD1Prong0 = candidateD1.template prong0_as <TrkType>();
319+ auto trackD1Prong1 = candidateD1.template prong1_as <TrkType>();
320+ auto trackParVarD1Prong0 = getTrackParCov (trackD1Prong0);
321+ auto trackParVarD1Prong1 = getTrackParCov (trackD1Prong1);
322+ // reconstruct the 2-prong secondary vertex
323+ hCandidatesD1->Fill (SVFitting::BeforeFit);
324+ try {
325+ if (dfD1.process (trackParVarD1Prong0, trackParVarD1Prong1) == 0 ) {
326+ continue ;
327+ }
328+ } catch (const std::runtime_error& error) {
329+ LOG (info) << " Run time error found: " << error.what () << " . DCAFitterN for first D0 cannot work, skipping the candidate." ;
330+ hCandidatesD1->Fill (SVFitting::Fail);
331+ continue ;
332+ }
333+ hCandidatesD1->Fill (SVFitting::FitOk);
334+ const auto & vertexD1 = dfD1.getPCACandidatePos ();
335+ trackParVarD1Prong0.propagateTo (vertexD1[0 ], bz);
336+ trackParVarD1Prong1.propagateTo (vertexD1[0 ], bz);
337+ // Get pVec of tracks of D1
338+ std::array<float , 3 > pVecD1Prong0 = {0 };
339+ std::array<float , 3 > pVecD1Prong1 = {0 };
340+ dfD1.getTrack (0 ).getPxPyPzGlo (pVecD1Prong0);
341+ dfD1.getTrack (1 ).getPxPyPzGlo (pVecD1Prong1);
342+ // Get D1 momentum
343+ std::array<float , 3 > pVecD1 = RecoDecay::pVec (pVecD1Prong0, pVecD1Prong1);
344+
345+ // build a D1 neutral track
346+ auto trackD1 = o2::dataformats::V0 (vertexD1, pVecD1, dfD1.calcPCACovMatrixFlat (), trackParVarD1Prong0, trackParVarD1Prong1);
347+
251348 for (auto candidateD2 = candidateD1 + 1 ; candidateD2 != candidates.end (); ++candidateD2) {
349+
350+ auto trackD2Prong0 = candidateD2.template prong0_as <TrkType>();
351+ auto trackD2Prong1 = candidateD2.template prong1_as <TrkType>();
352+ auto trackParVarD2Prong0 = getTrackParCov (trackD2Prong0);
353+ auto trackParVarD2Prong1 = getTrackParCov (trackD2Prong1);
354+ // reconstruct the 2-prong secondary vertex
355+ hCandidatesD2->Fill (SVFitting::BeforeFit);
356+ try {
357+ if (dfD2.process (trackParVarD2Prong0, trackParVarD2Prong1) == 0 ) {
358+ continue ;
359+ }
360+ } catch (const std::runtime_error& error) {
361+ LOG (info) << " Run time error found: " << error.what () << " . DCAFitterN for second D0 cannot work, skipping the candidate." ;
362+ hCandidatesD2->Fill (SVFitting::Fail);
363+ continue ;
364+ }
365+ hCandidatesD2->Fill (SVFitting::FitOk);
366+ const auto & vertexD2 = dfD2.getPCACandidatePos ();
367+ trackParVarD2Prong0.propagateTo (vertexD2[0 ], bz);
368+ trackParVarD2Prong1.propagateTo (vertexD2[0 ], bz);
369+ // Get pVec of tracks of D2
370+ std::array<float , 3 > pVecD2Prong0 = {0 };
371+ std::array<float , 3 > pVecD2Prong1 = {0 };
372+ dfD2.getTrack (0 ).getPxPyPzGlo (pVecD2Prong0);
373+ dfD2.getTrack (1 ).getPxPyPzGlo (pVecD2Prong1);
374+ // Get D2 momentum
375+ std::array<float , 3 > pVecD2 = RecoDecay::pVec (pVecD2Prong0, pVecD2Prong1);
376+
377+ // build a D2 neutral track
378+ auto trackD2 = o2::dataformats::V0 (vertexD2, pVecD2, dfD2.calcPCACovMatrixFlat (), trackParVarD2Prong0, trackParVarD2Prong1);
379+
252380 for (const auto & trackId : trackIndices) {
253381 auto trackPion = trackId.template track_as <TrkType>();
254382 if (usePionIsGlobalTrackWoDCA && !trackPion.isGlobalTrackWoDCA ()) {
@@ -273,6 +401,53 @@ struct HfTreeCreatorTccToD0D0Pi {
273401 (candidateD2.prong1Id () == trackPion.globalIndex ())) {
274402 continue ;
275403 }
404+
405+ auto trackParCovPi = getTrackParCov (trackPion);
406+ std::array<float , 3 > pVecD1New = {0 ., 0 ., 0 .};
407+ std::array<float , 3 > pVecD2New = {0 ., 0 ., 0 .};
408+ std::array<float , 3 > pVecBach = {0 ., 0 ., 0 .};
409+
410+ // find the DCA between the D01, D02 and the bachelor track, for Tcc
411+ hCandidatesTcc->Fill (SVFitting::BeforeFit);
412+ try {
413+ if (dfTcc.process (trackD1, trackD2, trackParCovPi) == 0 ) {
414+ continue ;
415+ }
416+ } catch (const std::runtime_error& error) {
417+ LOG (info) << " Run time error found: " << error.what () << " . DCAFitterN for Tcc cannot work, skipping the candidate." ;
418+ hCandidatesTcc->Fill (SVFitting::Fail);
419+ continue ;
420+ }
421+ hCandidatesTcc->Fill (SVFitting::FitOk);
422+
423+ dfTcc.propagateTracksToVertex (); // propagate the softpi and D0 pair to the Tcc vertex
424+ trackD1.getPxPyPzGlo (pVecD1New); // momentum of D1 at the Tcc vertex
425+ trackD2.getPxPyPzGlo (pVecD2New); // momentum of D2 at the Tcc vertex
426+ trackParCovPi.getPxPyPzGlo (pVecBach); // momentum of pi at the Tcc vertex
427+
428+ const auto & secVertexTcc = dfTcc.getPCACandidate ();
429+ auto chi2PCA = dfTcc.getChi2AtPCACandidate ();
430+ auto covMatrixPCA = dfTcc.calcPCACovMatrixFlat ();
431+ hCovSVXX->Fill (covMatrixPCA[0 ]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line.
432+
433+ // get track impact parameters
434+ // This modifies track momenta!
435+ auto covMatrixPV = primaryVertex.getCov ();
436+ hCovPVXX->Fill (covMatrixPV[0 ]);
437+ o2::dataformats::DCA impactParameterD1;
438+ o2::dataformats::DCA impactParameterD2;
439+ o2::dataformats::DCA impactParameterSoftPi;
440+
441+ trackD1.propagateToDCA (primaryVertex, bz, &impactParameterD1);
442+ trackD2.propagateToDCA (primaryVertex, bz, &impactParameterD2);
443+ trackParCovPi.propagateToDCA (primaryVertex, bz, &impactParameterSoftPi);
444+
445+ // get uncertainty of the decay length
446+ // double phi, theta;
447+ // getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secVertexTcc, phi, theta);
448+ // auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
449+ // auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixPCA, phi, 0.));
450+
276451 // Retrieve properties of the two D0 candidates
277452 float yD1 = hfHelper.yD0 (candidateD1);
278453 float yD2 = hfHelper.yD0 (candidateD2);
@@ -292,7 +467,7 @@ struct HfTreeCreatorTccToD0D0Pi {
292467 std::copy (candidateD1.mlProbD0 ().begin (), candidateD1.mlProbD0 ().end (), std::back_inserter (mlScoresD1));
293468 massD01 = hfHelper.invMassD0ToPiK (candidateD1);
294469 }
295- if (candidateD1.isSelD0bar ()) {
470+ if (candidateD1.isSelD0bar () && !candidateD1. isSelD0 () ) {
296471 candFlagD1 = 2 ;
297472 std::copy (candidateD1.mlProbD0bar ().begin (), candidateD1.mlProbD0bar ().end (), std::back_inserter (mlScoresD1));
298473 massD01 = hfHelper.invMassD0barToKPi (candidateD1);
@@ -303,25 +478,14 @@ struct HfTreeCreatorTccToD0D0Pi {
303478 std::copy (candidateD2.mlProbD0 ().begin (), candidateD2.mlProbD0 ().end (), std::back_inserter (mlScoresD2));
304479 massD02 = hfHelper.invMassD0ToPiK (candidateD2);
305480 }
306- if (candidateD2.isSelD0bar ()) {
481+ if (candidateD2.isSelD0bar () && !candidateD2. isSelD0 () ) {
307482 candFlagD2 = 2 ;
308483 std::copy (candidateD2.mlProbD0bar ().begin (), candidateD2.mlProbD0bar ().end (), std::back_inserter (mlScoresD2));
309484 massD02 = hfHelper.invMassD0barToKPi (candidateD2);
310485 }
311486
312487 // LOG(info) << " candidateD1.collisionId() " << candidateD1.collisionId()<<" massD01 "<<massD01<<" massD02 "<<massD02 <<" trackPion.pt() "<< trackPion.pt();
313488
314- auto trackPosD1Dau = track.rawIteratorAt (candidateD1.prong0Id ()); // positive daughter D01
315- auto trackNegD1Dau = track.rawIteratorAt (candidateD1.prong1Id ()); // negative daughter D01
316-
317- auto trackPosD2Dau = track.rawIteratorAt (candidateD2.prong0Id ()); // positive daughter D02
318- auto trackNegD2Dau = track.rawIteratorAt (candidateD2.prong1Id ()); // negative daughter D02
319-
320- std::array<float , 3 > pVecPosD1Dau{trackPosD1Dau.pVector ()};
321- std::array<float , 3 > pVecNegD1Dau{trackNegD1Dau.pVector ()};
322- std::array<float , 3 > pVecPosD2Dau{trackPosD2Dau.pVector ()};
323- std::array<float , 3 > pVecNegD2Dau{trackNegD2Dau.pVector ()};
324- std::array<float , 3 > pVecSoftPion = {trackPion.pVector ()};
325489 std::array<double , 2 > massD1Daus{MassPiPlus, MassKPlus};
326490 std::array<double , 2 > massD2Daus{MassPiPlus, MassKPlus};
327491
@@ -335,27 +499,22 @@ struct HfTreeCreatorTccToD0D0Pi {
335499 massD2Daus[1 ] = MassPiPlus;
336500 }
337501
338- auto massKpipi1 = RecoDecay::m (std::array{pVecPosD1Dau, pVecNegD1Dau, pVecSoftPion }, std::array{massD1Daus[0 ], massD1Daus[1 ], MassPiPlus});
339- auto massKpipi2 = RecoDecay::m (std::array{pVecPosD2Dau, pVecNegD2Dau, pVecSoftPion }, std::array{massD2Daus[0 ], massD2Daus[1 ], MassPiPlus});
502+ auto massKpipi1 = RecoDecay::m (std::array{pVecD1Prong0, pVecD1Prong1, pVecBach }, std::array{massD1Daus[0 ], massD1Daus[1 ], MassPiPlus});
503+ auto massKpipi2 = RecoDecay::m (std::array{pVecD2Prong0, pVecD2Prong1, pVecBach }, std::array{massD2Daus[0 ], massD2Daus[1 ], MassPiPlus});
340504
341505 deltaMassD01 = massKpipi1 - massD01;
342506 deltaMassD02 = massKpipi2 - massD02;
343507
344- std::array<float , 3 > pVecD1{candidateD1.px (), candidateD1.py (), candidateD1.pz ()};
345- std::array<float , 3 > pVecD2{candidateD2.px (), candidateD2.py (), candidateD2.pz ()};
346- auto arrayMomentaDDpi = std::array{pVecD1, pVecD2, pVecSoftPion};
508+ auto arrayMomentaDDpi = std::array{pVecD1New, pVecD2New, pVecBach};
347509 const auto massD0D0Pi = RecoDecay::m (std::move (arrayMomentaDDpi), std::array{MassD0, MassD0, MassPiPlus});
348510 const auto deltaMassD0D0Pi = massD0D0Pi - (massD01 + massD02);
349- const auto massD0D0Pair = RecoDecay::m (std::array{pVecD1, pVecD2 }, std::array{MassD0, MassD0});
511+ const auto massD0D0Pair = RecoDecay::m (std::array{pVecD1New, pVecD2New }, std::array{MassD0, MassD0});
350512
351513 if (deltaMassD0D0Pi > deltaMassCanMax || massD0D0Pi > massCanMax) {
352514 continue ;
353515 }
354516
355517 rowCandidateLite (
356- candidateD1.pt (),
357- candidateD2.pt (),
358- trackPion.pt (),
359518 candidateD1.pxProng0 (),
360519 candidateD1.pxProng1 (),
361520 candidateD1.pyProng0 (),
@@ -395,10 +554,12 @@ struct HfTreeCreatorTccToD0D0Pi {
395554 trackPion.tofNSigmaPi (),
396555 mlScoresD1[0 ],
397556 mlScoresD2[0 ],
398- candidateD1.decayLength (),
399- candidateD2.decayLength (),
557+ impactParameterD1.getY (),
558+ impactParameterD2.getY (),
559+ impactParameterSoftPi.getY (),
400560 candidateD1.cpa (),
401561 candidateD2.cpa (),
562+ chi2PCA,
402563 trackPion.sign (),
403564 trackPion.dcaXY (),
404565 trackPion.dcaZ (),
0 commit comments