Skip to content

Commit 9e4836b

Browse files
prottayCMTProttay Das
andauthored
[PWGLF] added vzvstime and additional step of rec with updated deno of v1 (#17060)
Co-authored-by: Prottay Das <prottay@alipap1.cern.ch>
1 parent 74a3100 commit 9e4836b

2 files changed

Lines changed: 259 additions & 5 deletions

File tree

PWGLF/TableProducer/Common/spvector.cxx

Lines changed: 202 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,32 +185,45 @@ struct spvector {
185185
Configurable<bool> finecent3{"finecent3", false, "Apply fine centrality recentering, stage 3"};
186186
Configurable<bool> finecent4{"finecent4", false, "Apply fine centrality recentering, stage 4"};
187187
Configurable<bool> finecent5{"finecent5", false, "Apply fine centrality recentering, stage 5"};
188+
Configurable<bool> finecent6{"finecent6", false, "Apply fine centrality recentering, stage 6"};
188189

189190
Configurable<bool> finecentvx1{"finecentvx1", false, "Apply fine (cent,Vx) recentering, stage 1"};
190191
Configurable<bool> finecentvx2{"finecentvx2", false, "Apply fine (cent,Vx) recentering, stage 2"};
191192
Configurable<bool> finecentvx3{"finecentvx3", false, "Apply fine (cent,Vx) recentering, stage 3"};
192193
Configurable<bool> finecentvx4{"finecentvx4", false, "Apply fine (cent,Vx) recentering, stage 4"};
193194
Configurable<bool> finecentvx5{"finecentvx5", false, "Apply fine (cent,Vx) recentering, stage 5"};
195+
Configurable<bool> finecentvx6{"finecentvx6", false, "Apply fine (cent,Vx) recentering, stage 6"};
194196

195197
Configurable<bool> finecentvy1{"finecentvy1", false, "Apply fine (cent,Vy) recentering, stage 1"};
196198
Configurable<bool> finecentvy2{"finecentvy2", false, "Apply fine (cent,Vy) recentering, stage 2"};
197199
Configurable<bool> finecentvy3{"finecentvy3", false, "Apply fine (cent,Vy) recentering, stage 3"};
198200
Configurable<bool> finecentvy4{"finecentvy4", false, "Apply fine (cent,Vy) recentering, stage 4"};
199201
Configurable<bool> finecentvy5{"finecentvy5", false, "Apply fine (cent,Vy) recentering, stage 5"};
202+
Configurable<bool> finecentvy6{"finecentvy6", false, "Apply fine (cent,Vy) recentering, stage 6"};
200203

201204
Configurable<bool> finecentvz1{"finecentvz1", false, "Apply fine (cent,Vz) recentering, stage 1"};
202205
Configurable<bool> finecentvz2{"finecentvz2", false, "Apply fine (cent,Vz) recentering, stage 2"};
203206
Configurable<bool> finecentvz3{"finecentvz3", false, "Apply fine (cent,Vz) recentering, stage 3"};
204207
Configurable<bool> finecentvz4{"finecentvz4", false, "Apply fine (cent,Vz) recentering, stage 4"};
205208
Configurable<bool> finecentvz5{"finecentvz5", false, "Apply fine (cent,Vz) recentering, stage 5"};
209+
Configurable<bool> finecentvz6{"finecentvz6", false, "Apply fine (cent,Vz) recentering, cycle 6"};
210+
211+
Configurable<bool> finevztime1{"finevztime1", false, "Apply fine (Vz,time) recentering, cycle 1"};
212+
Configurable<bool> finevztime2{"finevztime2", false, "Apply fine (Vz,time) recentering, cycle 2"};
213+
Configurable<bool> finevztime3{"finevztime3", false, "Apply fine (Vz,time) recentering, cycle 3"};
214+
Configurable<bool> finevztime4{"finevztime4", false, "Apply fine (Vz,time) recentering, cycle 4"};
215+
Configurable<bool> finevztime5{"finevztime5", false, "Apply fine (Vz,time) recentering, cycle 5"};
216+
206217
Configurable<bool> useRecenterefinecentSp{"useRecenterefinecentSp", false, "use finecent Recentering with THn"};
207218
Configurable<bool> useRecenterefinecentvxvyvzSp{"useRecenterefinecentvxvyvzSp", false, "use finecentvxvyvz Recentering with THn"};
219+
Configurable<bool> useRecenterefinevztimeSp{"useRecenterefinevztimeSp", false, "use fine (Vz,time) recentering with TH3F"};
208220

209221
Configurable<std::string> confRecentereCentSp{"confRecentereCentSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for cent recentering"};
210222
Configurable<std::string> confRecentereCentSp2{"confRecentereCentSp2", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for cent recentering 2"};
211223
Configurable<std::string> confRecentereCentSp3{"confRecentereCentSp3", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for cent recentering 3"};
212224
Configurable<std::string> confRecentereCentSp4{"confRecentereCentSp4", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for cent recentering 4"};
213225
Configurable<std::string> confRecentereCentSp5{"confRecentereCentSp5", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for cent recentering 5"};
226+
Configurable<std::string> confRecentereCentSp6{"confRecentereCentSp6", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for cent recentering 6"};
214227
Configurable<std::string> confRecentereCentVxSp{"confRecentereCentVxSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for centvx recentering"};
215228
Configurable<std::string> confRecentereCentVySp{"confRecentereCentVySp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for centvy recentering"};
216229
Configurable<std::string> confRecentereCentVzSp{"confRecentereCentVzSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for centvz recentering"};
@@ -226,6 +239,14 @@ struct spvector {
226239
Configurable<std::string> confRecentereCentVxSp5{"confRecentereCentVxSp5", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for centvx5 recentering"};
227240
Configurable<std::string> confRecentereCentVySp5{"confRecentereCentVySp5", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for centvy5 recentering"};
228241
Configurable<std::string> confRecentereCentVzSp5{"confRecentereCentVzSp5", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for centvz5 recentering"};
242+
Configurable<std::string> confRecentereCentVxSp6{"confRecentereCentVxSp6", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for centvx6 recentering"};
243+
Configurable<std::string> confRecentereCentVySp6{"confRecentereCentVySp6", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for centvy6 recentering"};
244+
Configurable<std::string> confRecentereCentVzSp6{"confRecentereCentVzSp6", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn path for centvz6 recentering"};
245+
Configurable<std::string> confRecentereVzTimeSp{"confRecentereVzTimeSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "TH3F path for (Vz,time) recentering, cycle 1"};
246+
Configurable<std::string> confRecentereVzTimeSp2{"confRecentereVzTimeSp2", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "TH3F path for (Vz,time) recentering, cycle 2"};
247+
Configurable<std::string> confRecentereVzTimeSp3{"confRecentereVzTimeSp3", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "TH3F path for (Vz,time) recentering, cycle 3"};
248+
Configurable<std::string> confRecentereVzTimeSp4{"confRecentereVzTimeSp4", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "TH3F path for (Vz,time) recentering, cycle 4"};
249+
Configurable<std::string> confRecentereVzTimeSp5{"confRecentereVzTimeSp5", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "TH3F path for (Vz,time) recentering, cycle 5"};
229250
} confignewpro;
230251

231252
struct : ConfigurableGroup {
@@ -393,6 +414,54 @@ struct spvector {
393414
"V_{y};V_{x} (cm);<Q_{y}^{ZNC}>",
394415
kTProfile2D,
395416
{vyfineAxis, vxfineAxis});
417+
418+
histos.add("pQxZDCAvsCentTimeAfter",
419+
"<Q_{x}^{ZNA}> after recentering;"
420+
"centrality (%);Time (min);<Q_{x}^{ZNA}>",
421+
kTProfile2D,
422+
{centfineAxis, timefineAxis});
423+
424+
histos.add("pQyZDCAvsCentTimeAfter",
425+
"<Q_{y}^{ZNA}> after recentering;"
426+
"centrality (%);Time (min);<Q_{y}^{ZNA}>",
427+
kTProfile2D,
428+
{centfineAxis, timefineAxis});
429+
430+
histos.add("pQxZDCCvsCentTimeAfter",
431+
"<Q_{x}^{ZNC}> after recentering;"
432+
"centrality (%);Time (min);<Q_{x}^{ZNC}>",
433+
kTProfile2D,
434+
{centfineAxis, timefineAxis});
435+
436+
histos.add("pQyZDCCvsCentTimeAfter",
437+
"<Q_{y}^{ZNC}> after recentering;"
438+
"centrality (%);Time (min);<Q_{y}^{ZNC}>",
439+
kTProfile2D,
440+
{centfineAxis, timefineAxis});
441+
442+
histos.add("pQxZDCAvsVzTimeAfter",
443+
"<Q_{x}^{ZNA}> after recentering;"
444+
"vz (cm);Time (min);<Q_{x}^{ZNA}>",
445+
kTProfile2D,
446+
{vzfineAxis, timefineAxis});
447+
448+
histos.add("pQyZDCAvsVzTimeAfter",
449+
"<Q_{y}^{ZNA}> after recentering;"
450+
"vz (cm);Time (min);<Q_{y}^{ZNA}>",
451+
kTProfile2D,
452+
{vzfineAxis, timefineAxis});
453+
454+
histos.add("pQxZDCCvsVzTimeAfter",
455+
"<Q_{x}^{ZNC}> after recentering;"
456+
"vz (cm);Time (min);<Q_{x}^{ZNC}>",
457+
kTProfile2D,
458+
{vzfineAxis, timefineAxis});
459+
460+
histos.add("pQyZDCCvsVzTimeAfter",
461+
"<Q_{y}^{ZNC}> after recentering;"
462+
"vz (cm);Time (min);<Q_{y}^{ZNC}>",
463+
kTProfile2D,
464+
{vzfineAxis, timefineAxis});
396465
}
397466

398467
histos.add("PsiZDCC", "PsiZDCC", kTH2F, {centfineAxis, phiAxis});
@@ -430,9 +499,10 @@ struct spvector {
430499
TH2F* hrecentereTimeSp2 = nullptr;
431500
TH2F* hrecentereTimeSp3 = nullptr;
432501
// One payload for each of the five iterations.
433-
std::array<TH3F*, 5> hrecenterecentvxSpA{};
434-
std::array<TH3F*, 5> hrecenterecentvySpA{};
435-
std::array<TH3F*, 5> hrecenterecentvzSpA{};
502+
std::array<TH3F*, 6> hrecenterecentvxSpA{};
503+
std::array<TH3F*, 6> hrecenterecentvySpA{};
504+
std::array<TH3F*, 6> hrecenterecentvzSpA{};
505+
std::array<TH3F*, 5> hrecenterevztimeSpA{};
436506

437507
bool CorrectfineCent(TH2F* hrecenterecentSp,
438508
auto centrality,
@@ -653,6 +723,44 @@ struct spvector {
653723
return true;
654724
}
655725

726+
bool CorrectfineVzTime(TH3F* hrecenterevstimeSp,
727+
auto vz,
728+
auto timeMin,
729+
auto& qxZDCA,
730+
auto& qyZDCA,
731+
auto& qxZDCC,
732+
auto& qyZDCC)
733+
{
734+
if (!hrecenterevstimeSp) {
735+
return false;
736+
}
737+
738+
// Payload axes:
739+
// X = Vz
740+
// Y = time from run start
741+
// Z = component
742+
// component channels:
743+
// 0.5 = Qx ZNA
744+
// 1.5 = Qy ZNA
745+
// 2.5 = Qx ZNC
746+
// 3.5 = Qy ZNC
747+
const double meanxAvstime = hrecenterevstimeSp->GetBinContent(
748+
hrecenterevstimeSp->FindBin(vz + 0.00001, timeMin + 0.00001, 0.5));
749+
const double meanyAvstime = hrecenterevstimeSp->GetBinContent(
750+
hrecenterevstimeSp->FindBin(vz + 0.00001, timeMin + 0.00001, 1.5));
751+
const double meanxCvstime = hrecenterevstimeSp->GetBinContent(
752+
hrecenterevstimeSp->FindBin(vz + 0.00001, timeMin + 0.00001, 2.5));
753+
const double meanyCvstime = hrecenterevstimeSp->GetBinContent(
754+
hrecenterevstimeSp->FindBin(vz + 0.00001, timeMin + 0.00001, 3.5));
755+
756+
qxZDCA -= meanxAvstime;
757+
qyZDCA -= meanyAvstime;
758+
qxZDCC -= meanxCvstime;
759+
qyZDCC -= meanyCvstime;
760+
761+
return true;
762+
}
763+
656764
using BCsRun3 = soa::Join<aod::BCsWithTimestamps, aod::Run3MatchedToBCSparse>;
657765
using MyCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::FT0sCorrected, aod::CentFT0Cs>;
658766
Preslice<aod::Zdcs> zdcPerCollision = aod::collision::bcId;
@@ -1042,6 +1150,16 @@ struct spvector {
10421150
}
10431151
}
10441152

1153+
if (confignewpro.finevztime1) {
1154+
if (confignewpro.useRecenterefinevztimeSp &&
1155+
(currentRunNumber != lastRunNumber || !hrecenterevztimeSpA[0])) {
1156+
hrecenterevztimeSpA[0] = ccdb->getForTimeStamp<TH3F>(confignewpro.confRecentereVzTimeSp.value, bc.timestamp());
1157+
}
1158+
if (!CorrectfineVzTime(hrecenterevztimeSpA[0], vz, timeMin, qxZDCA, qyZDCA, qxZDCC, qyZDCC)) {
1159+
LOGF(fatal, "Cannot apply fine (Vz, time) recentering, stage 1");
1160+
}
1161+
}
1162+
10451163
// -------------------- Stage 2 --------------------
10461164
if (confignewpro.finecent2) {
10471165
if (confignewpro.useRecenterefinecentSp &&
@@ -1083,6 +1201,16 @@ struct spvector {
10831201
}
10841202
}
10851203

1204+
if (confignewpro.finevztime2) {
1205+
if (confignewpro.useRecenterefinevztimeSp &&
1206+
(currentRunNumber != lastRunNumber || !hrecenterevztimeSpA[1])) {
1207+
hrecenterevztimeSpA[1] = ccdb->getForTimeStamp<TH3F>(confignewpro.confRecentereVzTimeSp2.value, bc.timestamp());
1208+
}
1209+
if (!CorrectfineVzTime(hrecenterevztimeSpA[1], vz, timeMin, qxZDCA, qyZDCA, qxZDCC, qyZDCC)) {
1210+
LOGF(fatal, "Cannot apply fine (Vz, time) recentering, stage 2");
1211+
}
1212+
}
1213+
10861214
// -------------------- Stage 3 --------------------
10871215
if (confignewpro.finecent3) {
10881216
if (confignewpro.useRecenterefinecentSp &&
@@ -1124,6 +1252,16 @@ struct spvector {
11241252
}
11251253
}
11261254

1255+
if (confignewpro.finevztime3) {
1256+
if (confignewpro.useRecenterefinevztimeSp &&
1257+
(currentRunNumber != lastRunNumber || !hrecenterevztimeSpA[2])) {
1258+
hrecenterevztimeSpA[2] = ccdb->getForTimeStamp<TH3F>(confignewpro.confRecentereVzTimeSp3.value, bc.timestamp());
1259+
}
1260+
if (!CorrectfineVzTime(hrecenterevztimeSpA[2], vz, timeMin, qxZDCA, qyZDCA, qxZDCC, qyZDCC)) {
1261+
LOGF(fatal, "Cannot apply fine (Vz, time) recentering, stage 3");
1262+
}
1263+
}
1264+
11271265
// -------------------- Stage 4 --------------------
11281266
if (confignewpro.finecent4) {
11291267
if (confignewpro.useRecenterefinecentSp &&
@@ -1165,6 +1303,16 @@ struct spvector {
11651303
}
11661304
}
11671305

1306+
if (confignewpro.finevztime4) {
1307+
if (confignewpro.useRecenterefinevztimeSp &&
1308+
(currentRunNumber != lastRunNumber || !hrecenterevztimeSpA[3])) {
1309+
hrecenterevztimeSpA[3] = ccdb->getForTimeStamp<TH3F>(confignewpro.confRecentereVzTimeSp4.value, bc.timestamp());
1310+
}
1311+
if (!CorrectfineVzTime(hrecenterevztimeSpA[3], vz, timeMin, qxZDCA, qyZDCA, qxZDCC, qyZDCC)) {
1312+
LOGF(fatal, "Cannot apply fine (Vz, time) recentering, stage 4");
1313+
}
1314+
}
1315+
11681316
// -------------------- Stage 5 --------------------
11691317
if (confignewpro.finecent5) {
11701318
if (confignewpro.useRecenterefinecentSp &&
@@ -1205,6 +1353,57 @@ struct spvector {
12051353
LOGF(fatal, "Cannot apply fine (cent,Vz) recentering, stage 5");
12061354
}
12071355
}
1356+
1357+
if (confignewpro.finevztime5) {
1358+
if (confignewpro.useRecenterefinevztimeSp &&
1359+
(currentRunNumber != lastRunNumber || !hrecenterevztimeSpA[4])) {
1360+
hrecenterevztimeSpA[4] = ccdb->getForTimeStamp<TH3F>(confignewpro.confRecentereVzTimeSp5.value, bc.timestamp());
1361+
}
1362+
if (!CorrectfineVzTime(hrecenterevztimeSpA[4], vz, timeMin, qxZDCA, qyZDCA, qxZDCC, qyZDCC)) {
1363+
LOGF(fatal, "Cannot apply fine (Vz, time) recentering, stage 5");
1364+
}
1365+
}
1366+
1367+
// -------------------- Stage 6 --------------------
1368+
if (confignewpro.finecent6) {
1369+
if (confignewpro.useRecenterefinecentSp &&
1370+
(currentRunNumber != lastRunNumber || !hrecenterecentSpA[5])) {
1371+
hrecenterecentSpA[5] = ccdb->getForTimeStamp<TH2F>(confignewpro.confRecentereCentSp6.value, bc.timestamp());
1372+
}
1373+
if (!CorrectfineCent(hrecenterecentSpA[5], centrality, qxZDCA, qyZDCA, qxZDCC, qyZDCC)) {
1374+
LOGF(fatal, "Cannot apply fine centrality recentering, stage 6");
1375+
}
1376+
}
1377+
1378+
if (confignewpro.finecentvx6) {
1379+
if (confignewpro.useRecenterefinecentvxvyvzSp &&
1380+
(currentRunNumber != lastRunNumber || !hrecenterecentvxSpA[5])) {
1381+
hrecenterecentvxSpA[5] = ccdb->getForTimeStamp<TH3F>(confignewpro.confRecentereCentVxSp6.value, bc.timestamp());
1382+
}
1383+
if (!CorrectfineCentVx(hrecenterecentvxSpA[5], centrality, vx, qxZDCA, qyZDCA, qxZDCC, qyZDCC)) {
1384+
LOGF(fatal, "Cannot apply fine (cent,Vx) recentering, stage 6");
1385+
}
1386+
}
1387+
1388+
if (confignewpro.finecentvy6) {
1389+
if (confignewpro.useRecenterefinecentvxvyvzSp &&
1390+
(currentRunNumber != lastRunNumber || !hrecenterecentvySpA[5])) {
1391+
hrecenterecentvySpA[5] = ccdb->getForTimeStamp<TH3F>(confignewpro.confRecentereCentVySp6.value, bc.timestamp());
1392+
}
1393+
if (!CorrectfineCentVy(hrecenterecentvySpA[5], centrality, vy, qxZDCA, qyZDCA, qxZDCC, qyZDCC)) {
1394+
LOGF(fatal, "Cannot apply fine (cent,Vy) recentering, stage 6");
1395+
}
1396+
}
1397+
1398+
if (confignewpro.finecentvz6) {
1399+
if (confignewpro.useRecenterefinecentvxvyvzSp &&
1400+
(currentRunNumber != lastRunNumber || !hrecenterecentvzSpA[5])) {
1401+
hrecenterecentvzSpA[5] = ccdb->getForTimeStamp<TH3F>(confignewpro.confRecentereCentVzSp6.value, bc.timestamp());
1402+
}
1403+
if (!CorrectfineCentVz(hrecenterecentvzSpA[5], centrality, vz, qxZDCA, qyZDCA, qxZDCC, qyZDCC)) {
1404+
LOGF(fatal, "Cannot apply fine (cent,Vz) recentering, stage 6");
1405+
}
1406+
}
12081407
}
12091408

12101409
histos.fill(HIST("hpQxZDCAvstime"), timeMin, qxZDCA);

0 commit comments

Comments
 (0)