@@ -307,16 +307,20 @@ void Controller::process()
307307 << " fit=" << trcAlgRef
308308 << " \n " ;
309309 }
310- o2::dataformats::DCA origDCA, fitDCA;
311- const auto & conf = AlignConfig::Instance ();
312- if (prop->propagateToDCABxByBz (*vtx, trcOrig, conf.maxStep , MatCorrType (conf.matCorType ), &origDCA) &&
313- prop->propagateToDCABxByBz (*vtx, trcAlgRef, conf.maxStep , MatCorrType (conf.matCorType ), &origDCA)) {
314- (*mDBGOut ) << " trcompatpv"
315- << " orig=" << trcOrig
316- << " origDCA=" << origDCA
317- << " fit=" << trcAlgRef
318- << " fitDCA=" << fitDCA
319- << " \n " ;
310+ if (vtx) {
311+ o2::dataformats::DCA origDCA, fitDCA;
312+ trackParam_t trcOrigPV (trcIn.getX (), trcIn.getAlpha (), dpar, dcov, trcIn.getCharge ());
313+ trackParam_t trcFitPV (*mAlgTrack );
314+ const auto & conf = AlignConfig::Instance ();
315+ if (prop->propagateToDCABxByBz (*vtx, trcOrigPV, conf.maxStep , MatCorrType (conf.matCorType ), &origDCA) &&
316+ prop->propagateToDCABxByBz (*vtx, trcFitPV, conf.maxStep , MatCorrType (conf.matCorType ), &fitDCA)) {
317+ (*mDBGOut ) << " trcompatpv"
318+ << " orig=" << trcOrigPV
319+ << " origDCA=" << origDCA
320+ << " fit=" << trcFitPV
321+ << " fitDCA=" << fitDCA
322+ << " \n " ;
323+ }
320324 }
321325 }
322326 // RS: this is to substitute the refitter track by MC truth, just for debugging
0 commit comments