diff --git a/PWGDQ/Tasks/qaMatching.cxx b/PWGDQ/Tasks/qaMatching.cxx index c738673ced6..fadcd6eb6fb 100644 --- a/PWGDQ/Tasks/qaMatching.cxx +++ b/PWGDQ/Tasks/qaMatching.cxx @@ -130,12 +130,6 @@ struct qaMatching { Configurable fMuonTaggingSigmaPdcaUp{"cfgMuonTaggingPdcaUp", 4.f, ""}; Configurable fMuonTaggingChi2DiffLow{"cfgMuonTaggingChi2DiffLow", 100.f, ""}; - /// Variables to event mixing criteria - Configurable fSaveMixedMatchingParamsRate{"cfgSaveMixedMatchingParamsRate", 0.002f, ""}; - Configurable fEventMaxDeltaNMFT{"cfgEventMaxDeltaNMFT", 1, ""}; - Configurable fEventMaxDeltaVtxZ{"cfgEventMaxDeltaVtxZ", 1.f, ""}; - Configurable fEventMinDeltaBc{"cfgEventMinDeltaBc", 500, ""}; - //// Variables for ccdb Configurable ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; Configurable grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"}; @@ -156,7 +150,8 @@ struct qaMatching { } fConfigQAs; /// Variables for histograms configuration - Configurable fNCandidatesMax{"nCandidatesMax", 5, ""}; + Configurable fNCandidatesMax{"cfgNCandidatesMax", 5, "Number of matching candidates stored for each muon track"}; + Configurable fMftTrackMultiplicityMax{"cfgMftTrackMultiplicityMax", 1000, "Maximum number of MFT tracks per collision"}; double mBzAtMftCenter{0}; @@ -451,19 +446,19 @@ struct qaMatching { o2::framework::HistPtr histVsDeltaChi2; o2::framework::HistPtr histVsProdRanking; - MatchRankingHistos(std::string histName, std::string histTitle, HistogramRegistry* registry) + MatchRankingHistos(std::string histName, std::string histTitle, HistogramRegistry* registry, int mftMultMax, int numCandidates) { AxisSpec pAxis = {100, 0, 100, "p (GeV/c)"}; AxisSpec ptAxis = {100, 0, 10, "p_{T} (GeV/c)"}; AxisSpec dzAxis = {100, 0, 50, "#Deltaz (cm)"}; - AxisSpec trackMultAxis = {100, 0, 1000, "MFT track mult."}; + AxisSpec trackMultAxis = {static_cast(mftMultMax) / 10, 0, static_cast(mftMultMax), "MFT track mult."}; AxisSpec trackTypeAxis = {2, 0, 2, "MFT track type"}; int matchTypeMax = static_cast(kMatchTypeUndefined); AxisSpec matchTypeAxis = {matchTypeMax, 0, static_cast(matchTypeMax), "match type"}; AxisSpec dchi2Axis = {100, 0, 100, "#Delta#chi^{2}"}; AxisSpec dqAxis = {3, -1.5, 1.5, "MFT #DeltaQ"}; - AxisSpec indexAxis = {6, 0, 6, "ranking index"}; - AxisSpec indexProdAxis = {6, 0, 6, "ranking index (production)"}; + AxisSpec indexAxis = {numCandidates + 1, 0, static_cast(numCandidates + 1), "ranking index"}; + AxisSpec indexProdAxis = {numCandidates + 1, 0, static_cast(numCandidates + 1), "ranking index (production)"}; hist = registry->add(histName.c_str(), histTitle.c_str(), {HistType::kTH1F, {indexAxis}}); histVsP = registry->add((histName + "VsP").c_str(), (histTitle + " vs. p").c_str(), {HistType::kTH2F, {pAxis, indexAxis}}); @@ -529,7 +524,10 @@ struct qaMatching { HistogramRegistry* registry; MatchingPlotter(std::string path, - HistogramRegistry* reg, bool createPdgMomHistograms) + HistogramRegistry* reg, + bool createPdgMomHistograms, + int mftMultMax, + int numCandidates) : fMatchingPurityPlotter(path + "matching-purity/", "Matching purity", *reg, createPdgMomHistograms), fPairingEfficiencyPlotter(path + "pairing-efficiency/", "Pairing efficiency", *reg, createPdgMomHistograms), fMatchingEfficiencyPlotter(path + "matching-efficiency/", "Matching efficiency", *reg, createPdgMomHistograms), @@ -544,10 +542,10 @@ struct qaMatching { std::string histName = path + "matchRanking"; std::string histTitle = "True match ranking"; - fMatchRanking = std::make_unique(path + "matchRanking", "True match ranking", registry); - fMatchRankingGoodMCH = std::make_unique(path + "matchRankingGoodMCH", "True match ranking (good MCH tracks)", registry); - fMatchRankingPaired = std::make_unique(path + "matchRankingPaired", "True match ranking (paired MCH tracks)", registry); - fMatchRankingPairedGoodMCH = std::make_unique(path + "matchRankingPairedGoodMCH", "True match ranking (good paired MCH tracks)", registry); + fMatchRanking = std::make_unique(path + "matchRanking", "True match ranking", registry, mftMultMax, numCandidates); + fMatchRankingGoodMCH = std::make_unique(path + "matchRankingGoodMCH", "True match ranking (good MCH tracks)", registry, mftMultMax, numCandidates); + fMatchRankingPaired = std::make_unique(path + "matchRankingPaired", "True match ranking (paired MCH tracks)", registry, mftMultMax, numCandidates); + fMatchRankingPairedGoodMCH = std::make_unique(path + "matchRankingPairedGoodMCH", "True match ranking (good paired MCH tracks)", registry, mftMultMax, numCandidates); //- AxisSpec missedMatchAxis = {5, 0, 5, ""}; @@ -759,19 +757,19 @@ struct qaMatching { registry.add((histPath + "selectedMCHTracksAtMFTTrue").c_str(), "Selected MCH tracks position at MFT end - true", {HistType::kTH2F, {trackPositionXAtMFTAxis, trackPositionYAtMFTAxis}}); registry.add((histPath + "selectedMCHTracksAtMFTFake").c_str(), "Selected MCH tracks position at MFT end - fake", {HistType::kTH2F, {trackPositionXAtMFTAxis, trackPositionYAtMFTAxis}}); - fChi2MatchingPlotter = std::make_unique(histPath + "Prod/", ®istryMatching, fConfigQAs.fCreatePdgMomHistograms); + fChi2MatchingPlotter = std::make_unique(histPath + "Prod/", ®istryMatching, fConfigQAs.fCreatePdgMomHistograms, fMftTrackMultiplicityMax, fNCandidatesMax); int registryIndex = 0; for (const auto& [label, func] : matchingChi2Functions) { - fMatchingPlotters[label] = std::make_unique(histPath + label + "/", registryMatchingVec[registryIndex], fConfigQAs.fCreatePdgMomHistograms); + fMatchingPlotters[label] = std::make_unique(histPath + label + "/", registryMatchingVec[registryIndex], fConfigQAs.fCreatePdgMomHistograms, fMftTrackMultiplicityMax, fNCandidatesMax); registryIndex += 1; } for (const auto& [label, response] : matchingMlResponses) { - fMatchingPlotters[label] = std::make_unique(histPath + label + "/", (registryMatchingVec[registryIndex]), fConfigQAs.fCreatePdgMomHistograms); + fMatchingPlotters[label] = std::make_unique(histPath + label + "/", (registryMatchingVec[registryIndex]), fConfigQAs.fCreatePdgMomHistograms, fMftTrackMultiplicityMax, fNCandidatesMax); registryIndex += 1; } - fTaggedMuonsMatchingPlotter = std::make_unique(histPath + "Tagged/", ®istryMatching, fConfigQAs.fCreatePdgMomHistograms); - fSelectedMuonsMatchingPlotter = std::make_unique(histPath + "Selected/", ®istryMatching, fConfigQAs.fCreatePdgMomHistograms); + fTaggedMuonsMatchingPlotter = std::make_unique(histPath + "Tagged/", ®istryMatching, fConfigQAs.fCreatePdgMomHistograms, fMftTrackMultiplicityMax, fNCandidatesMax); + fSelectedMuonsMatchingPlotter = std::make_unique(histPath + "Selected/", ®istryMatching, fConfigQAs.fCreatePdgMomHistograms, fMftTrackMultiplicityMax, fNCandidatesMax); } void CreateDimuonHistos() @@ -979,7 +977,7 @@ struct qaMatching { AxisSpec trackTypeAxis = {static_cast(nTrackTypes), 0.0, static_cast(nTrackTypes), "track type"}; registry.add("nTracksPerType", "Number of tracks per type", {HistType::kTH1F, {trackTypeAxis}}); - AxisSpec tracksMultiplicityAxis = {10000, 0, 10000, "tracks multiplicity"}; + AxisSpec tracksMultiplicityAxis = {fMftTrackMultiplicityMax, 0, static_cast(fMftTrackMultiplicityMax), "tracks multiplicity"}; registry.add("tracksMultiplicityMFT", "MFT tracks multiplicity", {HistType::kTH1F, {tracksMultiplicityAxis}}); registry.add("tracksMultiplicityMCH", "MCH tracks multiplicity", {HistType::kTH1F, {tracksMultiplicityAxis}}); @@ -2674,7 +2672,7 @@ struct qaMatching { } } - PROCESS_SWITCH(qaMatching, processQAMC, "process qa MC", true); + PROCESS_SWITCH(qaMatching, processQAMC, "processQAMC", true); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)