Skip to content

Commit 5e76fc1

Browse files
prottayCMTProttay Das
and
Prottay Das
authored
added vxvy corr (AliceO2Group#7692)
Co-authored-by: Prottay Das <[email protected]>
1 parent 6091477 commit 5e76fc1

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

PWGLF/TableProducer/Common/spvector.cxx

+36-5
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,12 @@ struct spvector {
101101

102102
Configurable<bool> useGainCallib{"useGainCallib", false, "use gain calibration"};
103103
Configurable<bool> useRecentere{"useRecentere", false, "use Recentering"};
104+
Configurable<bool> useRecentereVxy{"useRecentereVxy", false, "use Recentering for Vxy"};
104105
Configurable<bool> recwitherror{"recwitherror", false, "use Recentering with error"};
105106
Configurable<bool> useShift{"useShift", false, "use Shift"};
106107
Configurable<std::string> ConfGainPath{"ConfGainPath", "Users/p/prottay/My/Object/NewPbPbpass4_10092024/gaincallib", "Path to gain calibration"};
107108
Configurable<std::string> ConfRecentere{"ConfRecentere", "Users/p/prottay/My/Object/NewPbPbpass4_23082024/recenter", "Path for recentere"};
109+
Configurable<std::string> ConfRecentereVxy{"ConfRecentereVxy", "Users/p/prottay/My/Object/NewPbPbpass4_23082024/recenter", "Path for recentereVxy"};
108110
Configurable<std::string> ConfShift{"ConfShift", "Users/p/prottay/My/Object/Finaltest2/recenereall", "Path for Shift"};
109111

110112
ConfigurableAxis configAxisCentrality{"configAxisCentrality", {80, 0.0, 80}, "centrality bining"};
@@ -155,6 +157,8 @@ struct spvector {
155157
AxisSpec qyZDCAxis = {QxyNbins, lbinQxy, hbinQxy, "Qy"};
156158
AxisSpec phiAxis = {100, -6.28, 6.28, "phi"};
157159
AxisSpec vzAxis = {20, -10, 10, "vz"};
160+
AxisSpec vxAxis = {100, -0.05, 0.0, "vx"};
161+
AxisSpec vyAxis = {100, -0.02, 0.02, "vy"};
158162

159163
histos.add("hCentrality", "hCentrality", kTH1F, {{8, 0, 80.0}});
160164
histos.add("Vz", "Vz", kTH1F, {vzAxis});
@@ -167,12 +171,16 @@ struct spvector {
167171
histos.add("QyZDCC", "QyZDCC", kTH3F, {centAxis, vzAxis, qyZDCAxis});
168172
histos.add("QxZDCA", "QxZDCA", kTH3F, {centAxis, vzAxis, qxZDCAxis});
169173
histos.add("QyZDCA", "QyZDCA", kTH3F, {centAxis, vzAxis, qyZDCAxis});
174+
histos.add("hpQxVZDCC", "hpQxVZDCC", kTProfile2D, {vxAxis, vyAxis});
175+
histos.add("hpQyVZDCC", "hpQyVZDCC", kTProfile2D, {vxAxis, vyAxis});
176+
histos.add("hpQxVZDCA", "hpQxVZDCA", kTProfile2D, {vxAxis, vyAxis});
177+
histos.add("hpQyVZDCA", "hpQyVZDCA", kTProfile2D, {vxAxis, vyAxis});
170178
histos.add("PsiZDCC", "PsiZDCC", kTH2F, {centAxis, phiAxis});
171179
histos.add("PsiZDCA", "PsiZDCA", kTH2F, {centAxis, phiAxis});
172180
histos.add("hpCosPsiAPsiC", "hpCosPsiAPsiC", kTProfile, {centAxis});
173181
histos.add("hpSinPsiAPsiC", "hpSinPsiAPsiC", kTProfile, {centAxis});
174182
histos.add("ZDCAmp", "ZDCAmp", kTProfile2D, {channelZDCAxis, vzAxis});
175-
histos.add("hZDCAmp", "hZDCAmp", kTH3F, {channelZDCAxis, vzAxis, amplitudeZDC});
183+
// histos.add("hZDCAmp", "hZDCAmp", kTH3F, {channelZDCAxis, vzAxis, amplitudeZDC});
176184

177185
// Event selection cut additional - Alex
178186
fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x - 2.5*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)", 0, 100);
@@ -197,6 +205,7 @@ struct spvector {
197205
int lastRunNumber = -999;
198206
TH2D* gainprofile;
199207
TH3D* hrecentere;
208+
TH3D* hrecentereVxy;
200209

201210
// Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPT);
202211
// Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
@@ -223,6 +232,8 @@ struct spvector {
223232

224233
currentRunNumber = collision.foundBC_as<BCsRun3>().runNumber();
225234
auto vz = collision.posZ();
235+
auto vx = collision.posX();
236+
auto vy = collision.posY();
226237
bool triggerevent = false;
227238

228239
float psiZDCC = -99;
@@ -277,7 +288,7 @@ struct spvector {
277288
qyZDCA = qyZDCA + ampl * y[iChA];
278289
sumA = sumA + ampl;
279290
histos.fill(HIST("ZDCAmp"), chanelid + 0.5, vz, ampl);
280-
histos.fill(HIST("hZDCAmp"), chanelid + 0.5, vz, ampl);
291+
// histos.fill(HIST("hZDCAmp"), chanelid + 0.5, vz, ampl);
281292
}
282293
} else {
283294

@@ -289,7 +300,7 @@ struct spvector {
289300
qyZDCC = qyZDCC + ampl * y[iChA - 4];
290301
sumC = sumC + ampl;
291302
histos.fill(HIST("ZDCAmp"), chanelid + 0.5, vz, ampl);
292-
histos.fill(HIST("hZDCAmp"), chanelid + 0.5, vz, ampl);
303+
// histos.fill(HIST("hZDCAmp"), chanelid + 0.5, vz, ampl);
293304
}
294305
}
295306
}
@@ -328,9 +339,25 @@ struct spvector {
328339
qxZDCC = (qxZDCC - hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 2.5)));
329340
qyZDCC = (qyZDCC - hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 3.5)));
330341
}
342+
}
343+
344+
if (useRecentereVxy && (currentRunNumber != lastRunNumber)) {
345+
hrecentereVxy = ccdb->getForTimeStamp<TH3D>(ConfRecentereVxy.value, bc.timestamp());
346+
}
331347

332-
// if (vz>0.0)
333-
// LOG(info) <<"###################Accesed#####################"<<" "<<currentRunNumber<<" "<<vz<<" "<<centrality<<" "<<hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 0.5));
348+
if (useRecentereVxy && hrecentereVxy) {
349+
if (recwitherror) {
350+
qxZDCA = (qxZDCA - hrecentereVxy->GetBinContent(hrecentereVxy->FindBin(vx, vy, 0.5))) / hrecentereVxy->GetBinError(hrecentereVxy->FindBin(vx, vy, 0.5));
351+
qyZDCA = (qyZDCA - hrecentereVxy->GetBinContent(hrecentereVxy->FindBin(vx, vy, 1.5))) / hrecentereVxy->GetBinError(hrecentereVxy->FindBin(vx, vy, 1.5));
352+
qxZDCC = (qxZDCC - hrecentereVxy->GetBinContent(hrecentereVxy->FindBin(vx, vy, 2.5))) / hrecentereVxy->GetBinError(hrecentereVxy->FindBin(vx, vy, 2.5));
353+
qyZDCC = (qyZDCC - hrecentereVxy->GetBinContent(hrecentereVxy->FindBin(vx, vy, 3.5))) / hrecentereVxy->GetBinError(hrecentereVxy->FindBin(vx, vy, 3.5));
354+
} else {
355+
356+
qxZDCA = (qxZDCA - hrecentereVxy->GetBinContent(hrecentereVxy->FindBin(vx, vy, 0.5)));
357+
qyZDCA = (qyZDCA - hrecentereVxy->GetBinContent(hrecentereVxy->FindBin(vx, vy, 1.5)));
358+
qxZDCC = (qxZDCC - hrecentereVxy->GetBinContent(hrecentereVxy->FindBin(vx, vy, 2.5)));
359+
qyZDCC = (qyZDCC - hrecentereVxy->GetBinContent(hrecentereVxy->FindBin(vx, vy, 3.5)));
360+
}
334361
}
335362

336363
psiZDCC = 1.0 * TMath::ATan2(qyZDCC, qxZDCC);
@@ -346,6 +373,10 @@ struct spvector {
346373
histos.fill(HIST("QyZDCC"), centrality, vz, qyZDCC);
347374
histos.fill(HIST("QxZDCA"), centrality, vz, qxZDCA);
348375
histos.fill(HIST("QyZDCA"), centrality, vz, qyZDCA);
376+
histos.fill(HIST("hpQxVZDCC"), vx, vy, qxZDCC);
377+
histos.fill(HIST("hpQyVZDCC"), vx, vy, qyZDCC);
378+
histos.fill(HIST("hpQxVZDCA"), vx, vy, qxZDCA);
379+
histos.fill(HIST("hpQyVZDCA"), vx, vy, qyZDCA);
349380
histos.fill(HIST("PsiZDCA"), centrality, psiZDCA);
350381
histos.fill(HIST("PsiZDCC"), centrality, psiZDCC);
351382

0 commit comments

Comments
 (0)