Skip to content

Commit 49949aa

Browse files
committed
Add independent sideband cuts, add v0 for resonances
1 parent f70d39c commit 49949aa

File tree

1 file changed

+77
-34
lines changed

1 file changed

+77
-34
lines changed

PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx

Lines changed: 77 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ std::vector<double> centbinning(90);
8989
int nBootstrap = 10;
9090
GFWRegions regions;
9191
GFWCorrConfigs configs;
92-
GFWCorrConfigs configsradial;
92+
GFWCorrConfigs configsV02;
93+
GFWCorrConfigs configsV0;
9394
std::vector<double> multGlobalCorrCutPars;
9495
std::vector<double> multPVCorrCutPars;
9596
std::vector<double> multGlobalPVCorrCutPars;
@@ -203,17 +204,26 @@ struct FlowGenericFramework {
203204
O2_DEFINE_CONFIGURABLE(cfgUseStrictPID, bool, true, "Use strict PID cuts for TPC")
204205
O2_DEFINE_CONFIGURABLE(cfgTofPtCut, float, 0.5, "pt cut on TOF for PID");
205206
O2_DEFINE_CONFIGURABLE(cfgUseItsPID, bool, true, "Use ITS PID for particle identification")
206-
O2_DEFINE_CONFIGURABLE(cfgK0SignalMin, float, 0.48, "Minimum cut on K0 mT signal (upper limit of left sideband)");
207-
O2_DEFINE_CONFIGURABLE(cfgK0SignalMax, float, 0.51, "Minimum cut on K0 mT signal (lower limit of right sideband)");
208-
O2_DEFINE_CONFIGURABLE(cfgLambdaSignalMin, float, 1.1, "Minimum cut on Lambda mT signal (upper limit of left sideband)");
209-
O2_DEFINE_CONFIGURABLE(cfgLambdaSignalMax, float, 1.3, "Minimum cut on Lambda mT signal (lower limit of right sideband)");
207+
O2_DEFINE_CONFIGURABLE(cfgK0SignalMin, float, 0.48, "Minimum cut on K0 mT signal");
208+
O2_DEFINE_CONFIGURABLE(cfgK0SignalMax, float, 0.51, "Maximum cut on K0 mT signal");
209+
O2_DEFINE_CONFIGURABLE(cfgLambdaSignalMin, float, 1.1, "Minimum cut on Lambda mT signal");
210+
O2_DEFINE_CONFIGURABLE(cfgLambdaSignalMax, float, 1.3, "Maximum cut on Lambda mT signal");
211+
O2_DEFINE_CONFIGURABLE(cfgK0SideBand1Min, float, 0.44, "Minimum cut on K0 side band 1");
212+
O2_DEFINE_CONFIGURABLE(cfgK0SideBand1Max, float, 0.47, "Maximum cut on K0 side band 1");
213+
O2_DEFINE_CONFIGURABLE(cfgK0SideBand2Min, float, 0.52, "Minimum cut on K0 side band 2");
214+
O2_DEFINE_CONFIGURABLE(cfgK0SideBand2Max, float, 0.56, "Maximum cut on K0 side band 2");
215+
O2_DEFINE_CONFIGURABLE(cfgLambdaSideBand1Min, float, 1.0, "Minimum cut on Lambda side band 1");
216+
O2_DEFINE_CONFIGURABLE(cfgLambdaSideBand1Max, float, 1.05, "Maximum cut on Lambda side band 1");
217+
O2_DEFINE_CONFIGURABLE(cfgLambdaSideBand2Min, float, 1.4, "Minimum cut on Lambda side band 2");
218+
O2_DEFINE_CONFIGURABLE(cfgLambdaSideBand2Max, float, 1.6, "Maximum cut on Lambda side band 2");
210219
} cfgPIDCuts;
211220

212221
Configurable<GFWBinningCuts> cfgGFWBinning{"cfgGFWBinning", {40, 16, 72, 300, 0, 3000, 0.2, 10.0, 0.2, 3.0, {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 4, 4.5, 5, 5.5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90}}, "Configuration for binning"};
213222
Configurable<GFWRegions> cfgRegions{"cfgRegions", {{"refN", "refP", "refFull"}, {-0.8, 0.4, -0.8}, {-0.4, 0.8, 0.8}, {0, 0, 0}, {1, 1, 1}}, "Configurations for GFW regions"};
214223

215224
Configurable<GFWCorrConfigs> cfgCorrConfig{"cfgCorrConfig", {{"refP {2} refN {-2}", "refP {3} refN {-3}", "refP {4} refN {-4}", "refFull {2 -2}", "refFull {2 2 -2 -2}"}, {"ChGap22", "ChGap32", "ChGap42", "ChFull22", "ChFull24"}, {0, 0, 0, 0, 0}, {15, 1, 1, 0, 0}}, "Configurations for each correlation to calculate"};
216-
Configurable<GFWCorrConfigs> cfgCorrConfigRadial{"cfgCorrConfigRadial", {{"refP {2} refN {-2}", "refP {3} refN {-3}", "refP {4} refN {-4}"}, {"ChGap22", "ChGap32", "ChGap42"}, {1, 1, 1}, {0, 0, 0}}, "Configurations for each radial flow correlation to calculate"};
225+
Configurable<GFWCorrConfigs> cfgCorrConfigV02{"cfgCorrConfigV02", {{"refP {2} refN {-2}", "refP {3} refN {-3}", "refP {4} refN {-4}"}, {"ChGap22", "ChGap32", "ChGap42"}, {1, 1, 1}, {0, 0, 0}}, "Configurations for each radial flow correlation to calculate"};
226+
Configurable<GFWCorrConfigs> cfgCorrConfigV0{"cfgCorrConfigV0", {{"refP {2} refN {-2}", "refP {3} refN {-3}", "refP {4} refN {-4}"}, {"ChGap22", "ChGap32", "ChGap42"}, {1, 1, 1}, {0, 0, 0}}, "Configurations for each radial flow correlation to calculate"};
217227

218228
ConfigurableAxis axisNsigmaTPC{"axisNsigmaTPC", {80, -5, 5}, "nsigmaTPC axis"};
219229
ConfigurableAxis axisNsigmaTOF{"axisNsigmaTOF", {80, -5, 5}, "nsigmaTOF axis"};
@@ -365,7 +375,8 @@ struct FlowGenericFramework {
365375
GFW* fGFW = new GFW();
366376
std::vector<GFW::CorrConfig> corrconfigs;
367377

368-
std::vector<GFW::CorrConfig> corrconfigsradial;
378+
std::vector<GFW::CorrConfig> corrconfigsV02;
379+
std::vector<GFW::CorrConfig> corrconfigsV0;
369380

370381
TRandom3* fRndm = new TRandom3(0);
371382
TAxis* fPtAxis;
@@ -418,11 +429,16 @@ struct FlowGenericFramework {
418429
o2::analysis::gfw::configs.SetpTCorrMasks(cfgCorrConfig->GetpTCorrMasks());
419430
o2::analysis::gfw::regions.Print();
420431
o2::analysis::gfw::configs.Print();
421-
o2::analysis::gfw::configsradial.SetCorrs(cfgCorrConfigRadial->GetCorrs());
422-
o2::analysis::gfw::configsradial.SetHeads(cfgCorrConfigRadial->GetHeads());
423-
o2::analysis::gfw::configsradial.SetpTDifs(cfgCorrConfigRadial->GetpTDifs());
424-
o2::analysis::gfw::configsradial.SetpTCorrMasks(cfgCorrConfigRadial->GetpTCorrMasks());
425-
o2::analysis::gfw::configsradial.Print();
432+
o2::analysis::gfw::configsV02.SetCorrs(cfgCorrConfigV02->GetCorrs());
433+
o2::analysis::gfw::configsV02.SetHeads(cfgCorrConfigV02->GetHeads());
434+
o2::analysis::gfw::configsV02.SetpTDifs(cfgCorrConfigV02->GetpTDifs());
435+
o2::analysis::gfw::configsV02.SetpTCorrMasks(cfgCorrConfigV02->GetpTCorrMasks());
436+
o2::analysis::gfw::configsV02.Print();
437+
o2::analysis::gfw::configsV0.SetCorrs(cfgCorrConfigV0->GetCorrs());
438+
o2::analysis::gfw::configsV0.SetHeads(cfgCorrConfigV0->GetHeads());
439+
o2::analysis::gfw::configsV0.SetpTDifs(cfgCorrConfigV0->GetpTDifs());
440+
o2::analysis::gfw::configsV0.SetpTCorrMasks(cfgCorrConfigV0->GetpTCorrMasks());
441+
o2::analysis::gfw::configsV0.Print();
426442
o2::analysis::gfw::ptbinning = cfgGFWBinning->GetPtBinning();
427443
o2::analysis::gfw::ptpoilow = cfgGFWBinning->GetPtPOImin();
428444
o2::analysis::gfw::ptpoiup = cfgGFWBinning->GetPtPOImax();
@@ -631,16 +647,22 @@ struct FlowGenericFramework {
631647
LOGF(error, "Configuration contains vectors of different size - check the GFWCorrConfig configurable");
632648

633649
// Radial flow configs
634-
for (auto i = 0; i < o2::analysis::gfw::configsradial.GetSize(); ++i) {
635-
corrconfigsradial.push_back(fGFW->GetCorrelatorConfig(o2::analysis::gfw::configsradial.GetCorrs()[i], o2::analysis::gfw::configsradial.GetHeads()[i], o2::analysis::gfw::configsradial.GetpTDifs()[i]));
650+
for (auto i = 0; i < o2::analysis::gfw::configsV02.GetSize(); ++i) {
651+
corrconfigsV02.push_back(fGFW->GetCorrelatorConfig(o2::analysis::gfw::configsV02.GetCorrs()[i], o2::analysis::gfw::configsV02.GetHeads()[i], o2::analysis::gfw::configsV02.GetpTDifs()[i]));
636652
}
637-
if (corrconfigsradial.empty())
638-
LOGF(error, "Radial configuration contains vectors of different size - check the GFWCorrConfig configurable");
653+
if (corrconfigsV02.empty())
654+
LOGF(error, "Radial (V02) configuration contains vectors of different size - check the GFWCorrConfig configurable");
655+
for (auto i = 0; i < o2::analysis::gfw::configsV0.GetSize(); ++i) {
656+
corrconfigsV0.push_back(fGFW->GetCorrelatorConfig(o2::analysis::gfw::configsV0.GetCorrs()[i], o2::analysis::gfw::configsV0.GetHeads()[i], o2::analysis::gfw::configsV0.GetpTDifs()[i]));
657+
}
658+
if (corrconfigsV0.empty())
659+
LOGF(error, "Radial (V0) configuration contains vectors of different size - check the GFWCorrConfig configurable");
639660

640661
fGFW->CreateRegions();
641662
TObjArray* oba = new TObjArray();
642663
addConfigObjectsToObjArray(oba, corrconfigs);
643-
addConfigObjectsToObjArray(oba, corrconfigsradial);
664+
addConfigObjectsToObjArray(oba, corrconfigsV02);
665+
addConfigObjectsToObjArray(oba, corrconfigsV0);
644666

645667
if (doprocessData || doprocessRun2 || doprocessMCReco) {
646668
fFC->SetName("FlowContainer");
@@ -1270,17 +1292,30 @@ struct FlowGenericFramework {
12701292
for (std::size_t i = 0; i < fractions[3].size(); ++i)
12711293
registry.fill(HIST("npt_pr"), fPtAxis->GetBinCenter(i + 1), centmult, fractions[3][i]);
12721294

1273-
if (corrconfigsradial.size() < 4)
1295+
if (corrconfigsV02.size() < 4)
12741296
return;
12751297

12761298
for (uint l_ind = 0; l_ind < 4; ++l_ind) {
12771299
for (int i = 1; i <= fPtAxis->GetNbins(); i++) {
1278-
auto dnx = fGFW->Calculate(corrconfigsradial.at(l_ind), i - 1, kTRUE).real();
1300+
auto dnx = fGFW->Calculate(corrconfigsV02.at(l_ind), i - 1, kTRUE).real();
12791301
if (dnx == 0)
12801302
continue;
1281-
auto val = fGFW->Calculate(corrconfigsradial.at(l_ind), i - 1, kFALSE).real() / dnx;
1303+
auto val = fGFW->Calculate(corrconfigsV02.at(l_ind), i - 1, kFALSE).real() / dnx;
12821304
if (std::abs(val) < 1)
1283-
(dt == kGen) ? fFCgen->FillProfile(Form("%s_pt_%i", corrconfigsradial.at(l_ind).Head.c_str(), i), centmult, val * fractions[l_ind][i - 1], dnx, rndm) : fFC->FillProfile(Form("%s_pt_%i", corrconfigsradial.at(l_ind).Head.c_str(), i), centmult, val * fractions[l_ind][i - 1], dnx, rndm);
1305+
(dt == kGen) ? fFCgen->FillProfile(Form("%s_pt_%i", corrconfigsV02.at(l_ind).Head.c_str(), i), centmult, val * fractions[l_ind][i - 1], dnx, rndm) : fFC->FillProfile(Form("%s_pt_%i", corrconfigsV02.at(l_ind).Head.c_str(), i), centmult, val * fractions[l_ind][i - 1], dnx, rndm);
1306+
}
1307+
}
1308+
1309+
if (corrconfigsV0.size() < 4)
1310+
return;
1311+
1312+
if (fFCpts[0]->corrDen[0] == 0.)
1313+
return;
1314+
1315+
for (uint l_ind = 0; l_ind < 4; ++l_ind) {
1316+
double mpt = fFCpts[0]->corrNum[1] / fFCpts[0]->corrDen[1];
1317+
for (int i = 1; i <= fPtAxis->GetNbins(); i++) {
1318+
(dt == kGen) ? fFCgen->FillProfile(Form("%s_pt_%i", corrconfigsV02.at(l_ind).Head.c_str(), i), centmult, mpt * fractions[l_ind][i - 1], 1., rndm) : fFC->FillProfile(Form("%s_pt_%i", corrconfigsV02.at(l_ind).Head.c_str(), i), centmult, mpt * fractions[l_ind][i - 1], 1., rndm);
12841319
}
12851320
}
12861321
return;
@@ -1359,12 +1394,12 @@ struct FlowGenericFramework {
13591394
if (selectK0(collision, v0, centrality, weff)) {
13601395
int ptBinIndex = fPtAxis->FindBin(v0.pt()) - 1;
13611396
if (!(ptBinIndex < 0 || ptBinIndex >= static_cast<int>(o2::analysis::gfw::ptbinning.size()))) {
1362-
if (v0.mK0Short() < cfgPIDCuts.cfgK0SignalMin)
1397+
if (v0.mK0Short() > cfgPIDCuts.cfgK0SideBand1Min && v0.mK0Short() < cfgPIDCuts.cfgK0SideBand1Max)
13631398
npt_resonances[0][ptBinIndex] += (cfgUseNchCorrection) ? weff : 1.0;
1364-
else if (v0.mK0Short() > cfgPIDCuts.cfgK0SignalMax)
1365-
npt_resonances[2][ptBinIndex] += (cfgUseNchCorrection) ? weff : 1.0;
1366-
else
1399+
if (v0.mK0Short() > cfgPIDCuts.cfgK0SignalMin && v0.mK0Short() < cfgPIDCuts.cfgK0SignalMax)
13671400
npt_resonances[1][ptBinIndex] += (cfgUseNchCorrection) ? weff : 1.0;
1401+
if (v0.mK0Short() > cfgPIDCuts.cfgK0SideBand2Min && v0.mK0Short() < cfgPIDCuts.cfgK0SideBand2Max)
1402+
npt_resonances[2][ptBinIndex] += (cfgUseNchCorrection) ? weff : 1.0;
13681403
}
13691404
}
13701405
}
@@ -1374,12 +1409,12 @@ struct FlowGenericFramework {
13741409
if (selectLambda(collision, v0, centrality, weff)) {
13751410
int ptBinIndex = fPtAxis->FindBin(v0.pt()) - 1;
13761411
if (!(ptBinIndex < 0 || ptBinIndex >= static_cast<int>(o2::analysis::gfw::ptbinning.size()))) {
1377-
if (v0.mLambda() < cfgPIDCuts.cfgLambdaSignalMin)
1412+
if (v0.mLambda() > cfgPIDCuts.cfgLambdaSideBand1Min && v0.mLambda() < cfgPIDCuts.cfgLambdaSideBand1Max)
13781413
npt_resonances[3][ptBinIndex] += (cfgUseNchCorrection) ? weff : 1.0;
1379-
else if (v0.mLambda() > cfgPIDCuts.cfgLambdaSignalMax)
1380-
npt_resonances[5][ptBinIndex] += (cfgUseNchCorrection) ? weff : 1.0;
1381-
else
1414+
if (v0.mLambda() > cfgPIDCuts.cfgLambdaSignalMin && v0.mLambda() < cfgPIDCuts.cfgLambdaSignalMax)
13821415
npt_resonances[4][ptBinIndex] += (cfgUseNchCorrection) ? weff : 1.0;
1416+
if (v0.mLambda() > cfgPIDCuts.cfgLambdaSideBand2Min && v0.mLambda() < cfgPIDCuts.cfgLambdaSideBand2Max)
1417+
npt_resonances[5][ptBinIndex] += (cfgUseNchCorrection) ? weff : 1.0;
13831418
}
13841419
}
13851420
}
@@ -1414,16 +1449,24 @@ struct FlowGenericFramework {
14141449
for (std::size_t i = 0; i < fractions_resonances[4].size(); ++i)
14151450
registry.fill(HIST("npt_Lambda_sig"), fPtAxis->GetBinCenter(i + 1), centrality, fractions_resonances[4][i]);
14161451

1417-
for (uint l_ind = 4; l_ind < corrconfigsradial.size(); ++l_ind) {
1452+
for (uint l_ind = 4; l_ind < corrconfigsV02.size(); ++l_ind) {
14181453
for (int i = 1; i <= fPtAxis->GetNbins(); i++) {
1419-
auto dnx = fGFW->Calculate(corrconfigsradial.at(l_ind), i - 1, kTRUE).real();
1454+
auto dnx = fGFW->Calculate(corrconfigsV02.at(l_ind), i - 1, kTRUE).real();
14201455
if (dnx == 0)
14211456
continue;
1422-
auto val = fGFW->Calculate(corrconfigsradial.at(l_ind), i - 1, kFALSE).real() / dnx;
1457+
auto val = fGFW->Calculate(corrconfigsV02.at(l_ind), i - 1, kFALSE).real() / dnx;
14231458
if (std::abs(val) < 1)
1424-
(dt == kGen) ? fFCgen->FillProfile(Form("%s_pt_%i", corrconfigsradial.at(l_ind).Head.c_str(), i), centrality, val * fractions_resonances[l_ind - 4][i - 1], dnx, lRandom) : fFC->FillProfile(Form("%s_pt_%i", corrconfigsradial.at(l_ind).Head.c_str(), i), centrality, val * fractions_resonances[l_ind - 4][i - 1], dnx, lRandom);
1459+
(dt == kGen) ? fFCgen->FillProfile(Form("%s_pt_%i", corrconfigsV02.at(l_ind).Head.c_str(), i), centrality, val * fractions_resonances[l_ind - 4][i - 1], dnx, lRandom) : fFC->FillProfile(Form("%s_pt_%i", corrconfigsV02.at(l_ind).Head.c_str(), i), centrality, val * fractions_resonances[l_ind - 4][i - 1], dnx, lRandom);
1460+
}
1461+
}
1462+
1463+
for (uint l_ind = 4; l_ind < corrconfigsV0.size(); ++l_ind) {
1464+
double mpt = fFCpts[0]->corrNum[1] / fFCpts[0]->corrDen[1];
1465+
for (int i = 1; i <= fPtAxis->GetNbins(); i++) {
1466+
(dt == kGen) ? fFCgen->FillProfile(Form("%s_pt_%i", corrconfigsV0.at(l_ind).Head.c_str(), i), centrality, mpt * fractions_resonances[l_ind - 4][i - 1], 1.0, lRandom) : fFC->FillProfile(Form("%s_pt_%i", corrconfigsV0.at(l_ind).Head.c_str(), i), centrality, mpt * fractions_resonances[l_ind - 4][i - 1], 1.0, lRandom);
14251467
}
14261468
}
1469+
14271470
int multiplicity = 0;
14281471
switch (cfgUseNchCorrection) {
14291472
case 0:
@@ -1467,7 +1510,7 @@ struct FlowGenericFramework {
14671510
double weffCh = getEfficiency(track, 0);
14681511
if (std::abs(track.eta()) < cfgEtaNch) {
14691512
if (weffCh > 0)
1470-
acceptedTracks.total += weffCh;
1513+
acceptedTracks.total += (cfgUseNchCorrection) ? weffCh : 1.0;
14711514
++acceptedTracks.total_uncorr;
14721515
}
14731516

0 commit comments

Comments
 (0)