diff --git a/Common/Tasks/qaMuon.cxx b/Common/Tasks/qaMuon.cxx index 370c61f7afe..dd1a9c6d76d 100644 --- a/Common/Tasks/qaMuon.cxx +++ b/Common/Tasks/qaMuon.cxx @@ -223,6 +223,7 @@ struct muonQa { Configurable fChamberResolutionX{"cfgChamberResolutionX", 0.4, "Chamber resolution along X configuration for refit"}; // 0.4cm pp, 0.2cm PbPb Configurable fChamberResolutionY{"cfgChamberResolutionY", 0.4, "Chamber resolution along Y configuration for refit"}; // 0.4cm pp, 0.2cm PbPb Configurable fSigmaCutImprove{"cfgSigmaCutImprove", 6., "Sigma cut for track improvement"}; + Configurable fDipoleZcorr{"cfgDipoleZcorr", 0.0f, "Correction to the dipole z position"}; } configRealign; /// Variables to event mixing criteria @@ -1651,6 +1652,11 @@ struct muonQa { fgValues.errorClusters.emplace_back(eCls); fgValues.DEIDs.emplace_back(cluster.deId()); + // subtract the dipole shift correction from the cluster z position + if (configRealign.fDipoleZcorr != 0) { + clusterMCH->z -= configRealign.fDipoleZcorr; + } + // Add transformed cluster into temporary variable convertedTrack.createParamAtCluster(*clusterMCH); } @@ -1663,6 +1669,12 @@ struct muonQa { LOGF(fatal, "Muon track %d has no associated clusters.", muon.globalIndex()); } + // add back the dipole shift correction to the track z + if (configRealign.fDipoleZcorr != 0) { + auto& trackParam = *(convertedTrack.begin()); + trackParam.setZ(trackParam.getZ() + configRealign.fDipoleZcorr); + } + for (auto it = convertedTrack.begin(); it != convertedTrack.end(); it++) { std::vector pos = {static_cast(it->getNonBendingCoor()), static_cast(it->getBendingCoor()), static_cast(it->getZ())}; fgValues.posClusters.emplace_back(pos);