diff --git a/PWGCF/TableProducer/dptDptFilter.cxx b/PWGCF/TableProducer/dptDptFilter.cxx index 86db0a8ce95..81b811da6c0 100644 --- a/PWGCF/TableProducer/dptDptFilter.cxx +++ b/PWGCF/TableProducer/dptDptFilter.cxx @@ -434,24 +434,28 @@ struct Multiplicity { if (fhCL1EtaGapMultiplicity != nullptr) { fhCL1EtaGapMultiplicity->Fill(cl1EtaGapM, dNchdEta); } + /* if there is not calibration assign 50% mutltiplicity */ + if (fhV0MMultPercentile == nullptr && fhCL1MultPercentile == nullptr && fhCL1EtaGapMultPercentile == nullptr) { + multiplicityClass = 50; + } switch (classestimator) { case kV0M: if (fhV0MMultPercentile != nullptr) { multiplicityClass = fhV0MMultPercentile->GetBinContent(fhV0MMultPercentile->FindFixBin(v0am + v0cm)); - multiplicity = v0am + v0cm; } + multiplicity = v0am + v0cm; break; case kCL1: if (fhCL1MultPercentile != nullptr) { multiplicityClass = fhCL1MultPercentile->GetBinContent(fhCL1MultPercentile->FindFixBin(cl1m)); - multiplicity = cl1m; } + multiplicity = cl1m; break; case kCL1GAP: if (fhCL1EtaGapMultPercentile != nullptr) { multiplicityClass = fhCL1EtaGapMultPercentile->GetBinContent(fhCL1EtaGapMultPercentile->FindFixBin(cl1EtaGapM)); - multiplicity = cl1EtaGapM; } + multiplicity = cl1EtaGapM; break; default: break; @@ -639,10 +643,10 @@ struct DptDptFilter { triggerSelectionFlags = getTriggerSelection(cfgEventSelection.triggSel.value.c_str()); traceCollId0 = cfgTraceCollId0; - /* get the system type */ + /* get the data type and the system type */ + fDataType = getDataType(cfgDataType); fSystem = getSystemType(cfgSystemForPeriod.value); fLhcRun = multRunForSystemMap.at(fSystem); - fDataType = getDataType(cfgDataType); /* the multiplicities outliers exclusion */ multiplicityCentralityCorrelationsExclusion = getExclusionFormula(cfgEventSelection.multiplicitiesExclusionFormula->getData()[fSystem][0].c_str()); @@ -1200,13 +1204,13 @@ struct DptDptFilterTracks { tpcExcluder = TpcExcludeTrack(tpcExclude); tpcExcluder.setCuts(pLowCut, pUpCut, nLowCut, nUpCut); - /* self configure system type and data type */ - o2::framework::LabeledArray tmpLabeledArray = {}; - getTaskOptionValue(initContext, "dpt-dpt-filter", "cfgSystemForPeriod", tmpLabeledArray, false); - fSystem = getSystemType(tmpLabeledArray); + /* self configure data type and system */ std::string tmpstr; getTaskOptionValue(initContext, "dpt-dpt-filter", "cfgDataType", tmpstr, false); fDataType = getDataType(tmpstr); + o2::framework::LabeledArray tmpLabeledArray = {}; + getTaskOptionValue(initContext, "dpt-dpt-filter", "cfgSystemForPeriod", tmpLabeledArray, false); + fSystem = getSystemType(tmpLabeledArray); /* required ambiguous tracks checks? */ if (dofilterDetectorLevelWithoutPIDAmbiguous || dofilterDetectorLevelWithPIDAmbiguous || dofilterDetectorLevelWithFullPIDAmbiguous || diff --git a/PWGCF/TableProducer/dptDptFilter.h b/PWGCF/TableProducer/dptDptFilter.h index 1d431bbde3f..d584938e927 100644 --- a/PWGCF/TableProducer/dptDptFilter.h +++ b/PWGCF/TableProducer/dptDptFilter.h @@ -896,27 +896,31 @@ inline std::bitset<32> getTriggerSelection(std::string_view const& triggstr) inline SystemType getSystemType(auto const& periodsForSysType) { - auto period = metadataInfo.get("LPMProductionTag"); - auto anchoredPeriod = metadataInfo.get("AnchorProduction"); - bool checkAnchor = anchoredPeriod.length() > 0; - - for (SystemType sT = SystemNoSystem; sT < SystemNoOfSystems; ++sT) { - const std::string& periods = periodsForSysType[static_cast(sT)][0]; - auto contains = [periods](auto const& period) { - if (periods.find(period) != std::string::npos) { - return true; - } - return false; - }; - if (periods.length() > 0) { - if (contains(period) || (checkAnchor && contains(anchoredPeriod))) { - LOGF(info, "DptDptCorrelations::getSystemType(). Assigned system type %s for period %s", systemExternalNamesMap.at(static_cast(sT)).data(), period.c_str()); - return sT; + if (fDataType != kOnTheFly) { + auto period = metadataInfo.get("LPMProductionTag"); + auto anchoredPeriod = metadataInfo.get("AnchorProduction"); + bool checkAnchor = anchoredPeriod.length() > 0; + + for (SystemType sT = SystemNoSystem; sT < SystemNoOfSystems; ++sT) { + const std::string& periods = periodsForSysType[static_cast(sT)][0]; + auto contains = [periods](auto const& period) { + if (periods.find(period) != std::string::npos) { + return true; + } + return false; + }; + if (periods.length() > 0) { + if (contains(period) || (checkAnchor && contains(anchoredPeriod))) { + LOGF(info, "DptDptCorrelations::getSystemType(). Assigned system type %s for period %s", systemExternalNamesMap.at(static_cast(sT)).data(), period.c_str()); + return sT; + } } } + LOGF(fatal, "DptDptCorrelations::getSystemType(). No system type for period: %s", period.c_str()); + return SystemPbPb; + } else { + return SystemNeNeRun3; } - LOGF(fatal, "DptDptCorrelations::getSystemType(). No system type for period: %s", period.c_str()); - return SystemPbPb; } /// \brief Type of data according to the configuration string