Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions PWGCF/TableProducer/dptDptFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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<std::string> 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<std::string> tmpLabeledArray = {};
getTaskOptionValue(initContext, "dpt-dpt-filter", "cfgSystemForPeriod", tmpLabeledArray, false);
fSystem = getSystemType(tmpLabeledArray);

/* required ambiguous tracks checks? */
if (dofilterDetectorLevelWithoutPIDAmbiguous || dofilterDetectorLevelWithPIDAmbiguous || dofilterDetectorLevelWithFullPIDAmbiguous ||
Expand Down
40 changes: 22 additions & 18 deletions PWGCF/TableProducer/dptDptFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(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<int>(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<int>(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<int>(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
Expand Down
Loading