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
23 changes: 15 additions & 8 deletions PWGCF/EbyEFluctuations/Tasks/radialFlowDecorr.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,26 @@ struct RadialFlowDecorr {

// Systematic-variation selector for DATA. Base is the main measurement; each
// variation reads its own DataMean object (systSuffix) for the correlation step.
// kSystEtaBinning additionally changes the eta bin width via cfgEtaBinWidth.
// kSystEff and kSystEffPtDep scale the efficiency by cfgEffVarPercent; kSystEffPtDep
// always uses the pT-dependent shape. kSystCent is run with a different
// cfgCentralityChoice than the base (base FT0C, variation FT0M).
enum ESystType {
kSystBase = 0,
kSystCent,
kSystDCA,
kSystEff,
kSystEffPtDep,
kSystFlat,
kSystNITS,
kSystNTPC,
kSystPileup,
kSystVz,
kSystEtaBinning,
kNSystType
};
// Suffix appended to the DataMean CCDB path per systematic (Base -> no suffix).
inline static const std::vector<std::string> systSuffix = {
"", "_systDCA", "_systEff", "_systFlat",
"_systNITS", "_systNTPC", "_systPileup", "_systVz", "_systEtaBinning"};
"", "_systCent", "_systDCA", "_systEff", "_systEffpTDep", "_systFlat",
"_systNITS", "_systNTPC", "_systPileup", "_systVz"};

static constexpr float KinvalidCentrality = -1.0f;

Expand Down Expand Up @@ -181,8 +184,8 @@ struct RadialFlowDecorr {
Configurable<int> cfgNchOMax{"cfgNchOMax", 800, "Max Nch range for OO collisions"};

Configurable<int> cfgSys{"cfgSys", 1, "Which collision system? 1-->PbPb, 2-->NeNe, 3-->OO, 4-->pp"};
Configurable<int> cfgSystType{"cfgSystType", 0, "Systematic variation: 0=Base,1=systDCA,2=systEff,3=systFlat,4=systNITS,5=systNTPC,6=systPileup,7=systVz,8=systEtaBinning"};
Configurable<int> cfgNBootstrap{"cfgNBootstrap", 16, "Number of Poisson bootstrap samples (base data run only)"};
Configurable<int> cfgSystType{"cfgSystType", 0, "Systematic variation: 0=Base,1=systCent,2=systDCA,3=systEff,4=systEffpTDep,5=systFlat,6=systNITS,7=systNTPC,8=systPileup,9=systVz"};
Configurable<int> cfgNBootstrap{"cfgNBootstrap", 20, "Number of Poisson bootstrap samples (base data run only)"};
Configurable<int> cfgBootstrapSeed{"cfgBootstrapSeed", 0, "TRandom3 seed for bootstrap (0 = machine-random per job)"};

Configurable<bool> cfgFlat{"cfgFlat", false, "Whether to use flattening weights"};
Expand Down Expand Up @@ -490,11 +493,12 @@ struct RadialFlowDecorr {

float efficiencyVariationFactor(float pt) const
{
if (cfgSystType.value != kSystEff) {
if (cfgSystType.value != kSystEff && cfgSystType.value != kSystEffPtDep) {
return 1.f;
}
// Empirical shape: full variation at cfgPtMin, zero at cfgPtMax.
const float shape = cfgEffVarPtDep.value ? (cfgPtMax.value - pt) / (cfgPtMax.value - cfgPtMin.value) : 1.f;
const bool ptDep = cfgEffVarPtDep.value || cfgSystType.value == kSystEffPtDep;
const float shape = ptDep ? (cfgPtMax.value - pt) / (cfgPtMax.value - cfgPtMin.value) : 1.f;
return 1.f + 0.01f * cfgEffVarPercent.value * shape;
}

Expand Down Expand Up @@ -1029,6 +1033,9 @@ struct RadialFlowDecorr {
void init(InitContext&)
{
TH1::SetDefaultSumw2(true);
if (cfgSystType == kSystCent && cfgCentralityChoice == kCentFT0C) {
LOGF(warning, "cfgSystType=systCent but cfgCentralityChoice is still FT0C (the base estimator).");
}
// Nch axes by system
if (cfgSys == kPbPb) {
nChAxis = {cfgNchPbMax / 2, KBinOffset, cfgNchPbMax + KBinOffset, "Nch", "PV-contributor track multiplicity"};
Expand Down
Loading