diff --git a/Common/TableProducer/muonRealignment.cxx b/Common/TableProducer/muonRealignment.cxx index 9da3a27d97f..aeaf316a972 100644 --- a/Common/TableProducer/muonRealignment.cxx +++ b/Common/TableProducer/muonRealignment.cxx @@ -81,8 +81,8 @@ struct MuonRealignment { Configurable geoNewPathLocal{"geoNewPathLocal", "", "Local path of the GRP object if not using CCDB"}; Configurable nolaterthanRef{"ccdb-no-later-than-ref", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object of reference basis"}; Configurable nolaterthanNew{"ccdb-no-later-than-new", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object of new basis"}; - Configurable cfgChamberResolutionX{"cfgChamberResolutionX", 0.04, "Chamber resolution along X configuration for refit"}; // 0.4cm pp, 0.2cm PbPb - Configurable cfgChamberResolutionY{"cfgChamberResolutionY", 0.04, "Chamber resolution along Y configuration for refit"}; // 0.4cm pp, 0.2cm PbPb + Configurable cfgChamberResolutionX{"cfgChamberResolutionX", 0.4, "Chamber resolution along X configuration for refit"}; // 0.4cm pp, 0.2cm PbPb + Configurable cfgChamberResolutionY{"cfgChamberResolutionY", 0.4, "Chamber resolution along Y configuration for refit"}; // 0.4cm pp, 0.2cm PbPb Configurable cfgSigmaCutImprove{"cfgSigmaCutImprove", 6., "Sigma cut for track improvement"}; // 6 for pp, 4 for PbPb Configurable fUseRemoteField{"cfgUseRemoteField", true, "Chose whether to fetch the magnetic field from ccdb or set it manually"}; Configurable fUseRemoteGeometry{"cfgUseRemoteGeometry", false, "Chose whether to fetch new geometry from ccdb or set it manually"}; diff --git a/PWGDQ/TableProducer/tableMaker.cxx b/PWGDQ/TableProducer/tableMaker.cxx index 3abfcb317e7..1922ab6e1ab 100644 --- a/PWGDQ/TableProducer/tableMaker.cxx +++ b/PWGDQ/TableProducer/tableMaker.cxx @@ -1123,7 +1123,24 @@ struct TableMaker { for (const auto& muonId : fwdtrackIndices) { // start loop over tracks auto muon = muonId.template fwdtrack_as(); trackFilteringTag = static_cast(0); - VarManager::FillTrack(muon); + if constexpr (static_cast(TMuonRealignFillMap)) { + // Update muon information using realigned tracks + if (static_cast(muon.trackType()) > 2) { + // Update only MCH or MCH-MID tracks with realigned information + auto muonRealignSelected = tracksMuonRealign.select(aod::fwdtrackrealign::fwdtrackId == muonId.fwdtrackId() && aod::fwdtrackrealign::collisionId == collision.globalIndex()); + if (muonRealignSelected.size() == 1) { + for (const auto& muonRealign : muonRealignSelected) { + VarManager::FillTrack(muonRealign); + } + } else { + LOGF(fatal, "Inconsistent size of realigned muon track candidates."); + } + } else { + VarManager::FillTrack(muon); + } + } else { + VarManager::FillTrack(muon); + } if (muon.index() > idxPrev + 1) { // checks if some muons are filtered even before the skimming function nDel += muon.index() - (idxPrev + 1); diff --git a/PWGDQ/Tasks/mchAlignRecord.cxx b/PWGDQ/Tasks/mchAlignRecord.cxx index f1339c5d4a1..c24b9683a3b 100644 --- a/PWGDQ/Tasks/mchAlignRecord.cxx +++ b/PWGDQ/Tasks/mchAlignRecord.cxx @@ -117,8 +117,8 @@ struct mchAlignRecordTask { Configurable fAllowedVarZ{"variation-z", 2.0, "Allowed variation for z axis in cm"}; Configurable cfgSigmaX{"cfgSigmaX", 1000., "Sigma cut along X"}; Configurable cfgSigmaY{"cfgSigmaY", 1000., "Sigma cut along Y"}; - Configurable cfgChamberResolutionX{"cfgChamberResolutionX", 0.04, "Chamber resolution along X configuration for refit"}; // 0.4cm pp, 0.2cm PbPb - Configurable cfgChamberResolutionY{"cfgChamberResolutionY", 0.04, "Chamber resolution along Y configuration for refit"}; // 0.4cm pp, 0.2cm PbPb + Configurable cfgChamberResolutionX{"cfgChamberResolutionX", 0.4, "Chamber resolution along X configuration for refit"}; // 0.4cm pp, 0.2cm PbPb + Configurable cfgChamberResolutionY{"cfgChamberResolutionY", 0.4, "Chamber resolution along Y configuration for refit"}; // 0.4cm pp, 0.2cm PbPb Configurable cfgSigmaCutImprove{"cfgSigmaCutImprove", 6., "Sigma cut for track improvement"}; struct : ConfigurableGroup { Configurable> cfgDetElem{"cfgDetElem", @@ -129,6 +129,8 @@ struct mchAlignRecordTask { "List of param mask for d.o.f to be fixed"}; } fFixDetElem; + Preslice perMuon = aod::fwdtrkcl::fwdtrackId; + void init(InitContext& ic) { @@ -335,13 +337,9 @@ struct mchAlignRecordTask { continue; } + auto clustersSliced = clusters.sliceBy(perMuon, track.globalIndex()); // Slice clusters by muon id // Loop over attached clusters - for (auto const& cluster : clusters) { - - if (cluster.template fwdtrack_as() != track) { - continue; - } - + for (auto const& cluster : clustersSliced) { clIndex += 1; mch::Cluster* mch_cluster = new mch::Cluster();