Skip to content
Merged
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
29 changes: 27 additions & 2 deletions PWGCF/TableProducer/dptDptFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "PWGCF/Core/AnalysisConfigurableCuts.h"

#include "Common/Core/MetadataHelper.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/TrackSelection.h"
#include "Common/Core/TrackSelectionDefaults.h"
Expand Down Expand Up @@ -74,6 +75,9 @@ enum SystemType {
kXeXe, ///< **Xe-Xe** system
kppRun3, ///< **p-p Run 3** system
kPbPbRun3, ///< **Pb-Pb Run 3** system
kNeNeRun3, ///< **Ne-Ne Run 3** system
kOORun3, ///< **O-O Run 3** system
kpORun3, ///< **p-O Run 3** system
knSystems ///< number of handled systems
};

Expand Down Expand Up @@ -194,6 +198,11 @@ float overallminp = 0.0f;
//============================================================================================
std::bitset<32> collisionFlags;

//============================================================================================
// The input data metadata access helper
//============================================================================================
o2::common::core::MetadataHelper metadataInfo;

//============================================================================================
// The DptDptFilter configuration objects
//============================================================================================
Expand Down Expand Up @@ -561,6 +570,22 @@ inline TriggerSelectionType getTriggerSelection(std::string const& triggstr)
}
}

inline SystemType getSytemTypeFromMetaData()
{
auto period = metadataInfo.get("LPMProductionTag");

if (period == "LHC25ad" || period == "LHC25g5") {
return kpORun3;
} else if (period == "LHC25ae" || period == "LHC25g6") {
return kOORun3;
} else if (period == "LHC25af" || period == "LHC25g7") {
return kNeNeRun3;
} else {
LOGF(fatal, "DptDptCorrelations::getSystemTypeFromMetadata(). No automatic system type configuration for %s period", period.c_str());
}
return kPbp;
}

inline SystemType getSystemType(std::string const& sysstr)
{
/* we have to figure out how extract the system type */
Expand All @@ -572,14 +597,14 @@ inline SystemType getSystemType(std::string const& sysstr)
return kpPb;
} else if (sysstr == "Pbp") {
return kPbp;
} else if (sysstr == "pPb") {
return kpPb;
} else if (sysstr == "XeXe") {
return kXeXe;
} else if (sysstr == "ppRun3") {
return kppRun3;
} else if (sysstr == "PbPbRun3") {
return kPbPbRun3;
} else if (sysstr == "Auto") {
return getSytemTypeFromMetaData();
} else {
LOGF(fatal, "DptDptCorrelations::getSystemType(). Wrong system type: %s", sysstr.c_str());
}
Expand Down
Loading