@@ -271,25 +271,25 @@ class TrackPropagationModule
271271 // std::array<float, 3> trackPxPyPz;
272272 // std::array<float, 3> trackPxPyPzTuned = {0.0, 0.0, 0.0};
273273 double q2OverPtNew = -9999 .;
274+ bool isPropagationOK = true ;
274275 // Only propagate tracks which have passed the innermost wall of the TPC (e.g. skipping loopers etc). Others fill unpropagated.
275276 if (track.x () < cGroup.minPropagationRadius .value ) {
276- if (track.trackType () == o2::aod::track::TrackIU) {
277- if (fillTracksCov) {
278- if constexpr (isMc) { // checking MC and fillCovMat block begins
279- // bool hasMcParticle = track.has_mcParticle();
280- if (cGroup.useTrackTuner .value ) {
281- trackTunedTracks->Fill (1 ); // all tracks
282- bool hasMcParticle = track.has_mcParticle ();
283- if (hasMcParticle) {
284- auto mcParticle = track.mcParticle ();
285- trackTunerObj.tuneTrackParams (mcParticle, mTrackParCov , matCorr, &mDcaInfoCov , trackTunedTracks);
286- q2OverPtNew = mTrackParCov .getQ2Pt ();
287- }
277+ if (fillTracksCov) {
278+ if constexpr (isMc) { // checking MC and fillCovMat block begins
279+ // bool hasMcParticle = track.has_mcParticle();
280+ if (cGroup.useTrackTuner .value ) {
281+ trackTunedTracks->Fill (1 ); // all tracks
282+ bool hasMcParticle = track.has_mcParticle ();
283+ if (hasMcParticle) {
284+ auto mcParticle = track.mcParticle ();
285+ trackTunerObj.tuneTrackParams (mcParticle, mTrackParCov , matCorr, &mDcaInfoCov , trackTunedTracks);
286+ q2OverPtNew = mTrackParCov .getQ2Pt ();
288287 }
289- } // MC and fillCovMat block ends
290- }
291- bool isPropagationOK = true ;
292-
288+ }
289+ } // MC and fillCovMat block ends
290+ }
291+
292+ if (track.trackType () == o2::aod::track::TrackIU) {
293293 if (track.has_collision ()) {
294294 auto const & collision = collisions.rawIteratorAt (track.collisionId ());
295295 if (fillTracksCov) {
@@ -311,21 +311,6 @@ class TrackPropagationModule
311311 if (isPropagationOK) {
312312 trackType = o2::aod::track::Track;
313313 }
314- // filling some QA histograms for track tuner test purpose
315- if (fillTracksCov) {
316- if constexpr (isMc) { // checking MC and fillCovMat block begins
317- if (track.has_mcParticle () && isPropagationOK) {
318- auto mcParticle1 = track.mcParticle ();
319- // && abs(mcParticle1.pdgCode())==211
320- if (mcParticle1.isPhysicalPrimary ()) {
321- registry.fill (HIST (" hDCAxyVsPtRec" ), mDcaInfoCov .getY (), mTrackParCov .getPt ());
322- registry.fill (HIST (" hDCAxyVsPtMC" ), mDcaInfoCov .getY (), mcParticle1.pt ());
323- registry.fill (HIST (" hDCAzVsPtRec" ), mDcaInfoCov .getZ (), mTrackParCov .getPt ());
324- registry.fill (HIST (" hDCAzVsPtMC" ), mDcaInfoCov .getZ (), mcParticle1.pt ());
325- }
326- }
327- } // MC and fillCovMat block ends
328- }
329314 } else {
330315 if (fillTracksDCA || fillTracksDCACov) {
331316 if (track.has_collision ()) {
@@ -348,6 +333,21 @@ class TrackPropagationModule
348333 }
349334 }
350335 }
336+ // filling some QA histograms for track tuner test purpose
337+ if (fillTracksCov) {
338+ if constexpr (isMc) { // checking MC and fillCovMat block begins
339+ if (track.has_mcParticle () && isPropagationOK) {
340+ auto mcParticle1 = track.mcParticle ();
341+ // && abs(mcParticle1.pdgCode())==211
342+ if (mcParticle1.isPhysicalPrimary ()) {
343+ registry.fill (HIST (" hDCAxyVsPtRec" ), mDcaInfoCov .getY (), mTrackParCov .getPt ());
344+ registry.fill (HIST (" hDCAxyVsPtMC" ), mDcaInfoCov .getY (), mcParticle1.pt ());
345+ registry.fill (HIST (" hDCAzVsPtRec" ), mDcaInfoCov .getZ (), mTrackParCov .getPt ());
346+ registry.fill (HIST (" hDCAzVsPtMC" ), mDcaInfoCov .getZ (), mcParticle1.pt ());
347+ }
348+ }
349+ } // MC and fillCovMat block ends
350+ }
351351 }
352352 // Filling modified Q/Pt values at IU/production point by track tuner in track tuner table
353353 if (cGroup.useTrackTuner .value && cGroup.fillTrackTunerTable .value ) {
0 commit comments