@@ -223,6 +223,7 @@ struct muonQa {
223223 Configurable<double > fChamberResolutionX {" cfgChamberResolutionX" , 0.4 , " Chamber resolution along X configuration for refit" }; // 0.4cm pp, 0.2cm PbPb
224224 Configurable<double > fChamberResolutionY {" cfgChamberResolutionY" , 0.4 , " Chamber resolution along Y configuration for refit" }; // 0.4cm pp, 0.2cm PbPb
225225 Configurable<double > fSigmaCutImprove {" cfgSigmaCutImprove" , 6 ., " Sigma cut for track improvement" };
226+ Configurable<double > fDipoleZcorr {" cfgDipoleZcorr" , 0 .0f , " Correction to the dipole z position" };
226227 } configRealign;
227228
228229 // / Variables to event mixing criteria
@@ -1651,6 +1652,11 @@ struct muonQa {
16511652 fgValues.errorClusters .emplace_back (eCls);
16521653 fgValues.DEIDs .emplace_back (cluster.deId ());
16531654
1655+ // subtract the dipole shift correction from the cluster z position
1656+ if (configRealign.fDipoleZcorr != 0 ) {
1657+ clusterMCH->z -= configRealign.fDipoleZcorr ;
1658+ }
1659+
16541660 // Add transformed cluster into temporary variable
16551661 convertedTrack.createParamAtCluster (*clusterMCH);
16561662 }
@@ -1663,6 +1669,12 @@ struct muonQa {
16631669 LOGF (fatal, " Muon track %d has no associated clusters." , muon.globalIndex ());
16641670 }
16651671
1672+ // add back the dipole shift correction to the track z
1673+ if (configRealign.fDipoleZcorr != 0 ) {
1674+ auto & trackParam = *(convertedTrack.begin ());
1675+ trackParam.setZ (trackParam.getZ () + configRealign.fDipoleZcorr );
1676+ }
1677+
16661678 for (auto it = convertedTrack.begin (); it != convertedTrack.end (); it++) {
16671679 std::vector<float > pos = {static_cast <float >(it->getNonBendingCoor ()), static_cast <float >(it->getBendingCoor ()), static_cast <float >(it->getZ ())};
16681680 fgValues.posClusters .emplace_back (pos);
0 commit comments