Skip to content

Commit 50e69c2

Browse files
authored
[PWGLF] Add shift correction for TPC and FT0A event plane reconstruction and fix track selection for flow task (#8620)
1 parent 68f85f6 commit 50e69c2

File tree

2 files changed

+64
-16
lines changed

2 files changed

+64
-16
lines changed

PWGLF/TableProducer/Common/epvector.cxx

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <vector>
2626
#include <TComplex.h>
2727
#include <TMath.h>
28+
#include <cstdio>
2829

2930
// o2Physics includes.
3031
#include "Framework/AnalysisDataModel.h"
@@ -95,9 +96,14 @@ struct epvector {
9596
Configurable<bool> useGainCallib{"useGainCallib", true, "use gain calibration"};
9697
Configurable<bool> useRecentere{"useRecentere", true, "use Recentering"};
9798
Configurable<bool> useShift{"useShift", false, "use Shift"};
99+
Configurable<bool> useShift2{"useShift2", false, "use Shift for others"};
98100
Configurable<std::string> ConfGainPath{"ConfGainPath", "Users/s/skundu/My/Object/test100", "Path to gain calibration"};
99101
Configurable<std::string> ConfRecentere{"ConfRecentere", "Users/s/skundu/My/Object/Finaltest2/recenereall", "Path for recentere"};
100102
Configurable<std::string> ConfShift{"ConfShift", "Users/s/skundu/My/Object/Finaltest2/recenereall", "Path for Shift"};
103+
Configurable<std::string> ConfShiftFT0A{"ConfShiftFT0A", "Users/s/skundu/My/Object/Finaltest2/recenereall", "Path for Shift FT0A"};
104+
Configurable<std::string> ConfShiftTPC{"ConfShiftTPC", "Users/s/skundu/My/Object/Finaltest2/recenereall", "Path for Shift TPC"};
105+
Configurable<std::string> ConfShiftTPCL{"ConfShiftTPCL", "Users/s/skundu/My/Object/Finaltest2/recenereall", "Path for Shift TPCL"};
106+
Configurable<std::string> ConfShiftTPCR{"ConfShiftTPCR", "Users/s/skundu/My/Object/Finaltest2/recenereall", "Path for Shift TPCR"};
101107
ConfigurableAxis configAxisCentrality{"configAxisCentrality", {80, 0.0, 80}, "centrality bining"};
102108
// Event selection cuts - Alex
103109
TF1* fMultPVCutLow = nullptr;
@@ -166,6 +172,10 @@ struct epvector {
166172
histos.add("QTPC", "QTPC", kTH3F, {centAxis, qAxis, occupancyAxis});
167173

168174
histos.add("ShiftFT0C", "ShiftFT0C", kTProfile3D, {centAxis, basisAxis, shiftAxis});
175+
histos.add("ShiftFT0A", "ShiftFT0A", kTProfile3D, {centAxis, basisAxis, shiftAxis});
176+
histos.add("ShiftTPC", "ShiftTPC", kTProfile3D, {centAxis, basisAxis, shiftAxis});
177+
histos.add("ShiftTPCL", "ShiftTPCL", kTProfile3D, {centAxis, basisAxis, shiftAxis});
178+
histos.add("ShiftTPCR", "ShiftTPCR", kTProfile3D, {centAxis, basisAxis, shiftAxis});
169179

170180
// Event selection cut additional - Alex
171181
// if (additionalEvsel) {
@@ -254,6 +264,10 @@ struct epvector {
254264
TProfile* gainprofile;
255265
TH2D* hrecentere;
256266
TProfile3D* shiftprofile;
267+
TProfile3D* shiftprofile2;
268+
TProfile3D* shiftprofile3;
269+
TProfile3D* shiftprofile4;
270+
TProfile3D* shiftprofile5;
257271

258272
Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPT);
259273
Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
@@ -361,15 +375,46 @@ struct epvector {
361375

362376
if (useShift && (currentRunNumber != lastRunNumber)) {
363377
shiftprofile = ccdb->getForTimeStamp<TProfile3D>(ConfShift.value, bc.timestamp());
378+
if (useShift2) {
379+
shiftprofile2 = ccdb->getForTimeStamp<TProfile3D>(ConfShiftFT0A.value, bc.timestamp());
380+
shiftprofile3 = ccdb->getForTimeStamp<TProfile3D>(ConfShiftTPC.value, bc.timestamp());
381+
shiftprofile4 = ccdb->getForTimeStamp<TProfile3D>(ConfShiftTPCL.value, bc.timestamp());
382+
shiftprofile5 = ccdb->getForTimeStamp<TProfile3D>(ConfShiftTPCR.value, bc.timestamp());
383+
}
364384
}
365385
if (useShift) {
366386
auto deltapsiFT0C = 0.0;
387+
auto deltapsiFT0A = 0.0;
388+
auto deltapsiTPC = 0.0;
389+
auto deltapsiTPCL = 0.0;
390+
auto deltapsiTPCR = 0.0;
367391
for (int ishift = 1; ishift <= 10; ishift++) {
368392
auto coeffshiftxFT0C = shiftprofile->GetBinContent(shiftprofile->FindBin(centrality, 0.5, ishift - 0.5));
369393
auto coeffshiftyFT0C = shiftprofile->GetBinContent(shiftprofile->FindBin(centrality, 1.5, ishift - 0.5));
370394
deltapsiFT0C = deltapsiFT0C + ((1 / (1.0 * ishift)) * (-coeffshiftxFT0C * TMath::Cos(ishift * 2.0 * psiFT0C) + coeffshiftyFT0C * TMath::Sin(ishift * 2.0 * psiFT0C)));
395+
if (useShift2) {
396+
auto coeffshiftxFT0A = shiftprofile2->GetBinContent(shiftprofile2->FindBin(centrality, 0.5, ishift - 0.5));
397+
auto coeffshiftyFT0A = shiftprofile2->GetBinContent(shiftprofile2->FindBin(centrality, 1.5, ishift - 0.5));
398+
399+
auto coeffshiftxTPC = shiftprofile3->GetBinContent(shiftprofile3->FindBin(centrality, 0.5, ishift - 0.5));
400+
auto coeffshiftyTPC = shiftprofile3->GetBinContent(shiftprofile3->FindBin(centrality, 1.5, ishift - 0.5));
401+
402+
auto coeffshiftxTPCL = shiftprofile4->GetBinContent(shiftprofile4->FindBin(centrality, 0.5, ishift - 0.5));
403+
auto coeffshiftyTPCL = shiftprofile4->GetBinContent(shiftprofile4->FindBin(centrality, 1.5, ishift - 0.5));
404+
405+
auto coeffshiftxTPCR = shiftprofile5->GetBinContent(shiftprofile5->FindBin(centrality, 0.5, ishift - 0.5));
406+
auto coeffshiftyTPCR = shiftprofile5->GetBinContent(shiftprofile5->FindBin(centrality, 1.5, ishift - 0.5));
407+
deltapsiFT0A = deltapsiFT0A + ((1 / (1.0 * ishift)) * (-coeffshiftxFT0A * TMath::Cos(ishift * 2.0 * psiFT0A) + coeffshiftyFT0A * TMath::Sin(ishift * 2.0 * psiFT0A)));
408+
deltapsiTPC = deltapsiTPC + ((1 / (1.0 * ishift)) * (-coeffshiftxTPC * TMath::Cos(ishift * 2.0 * psiTPC) + coeffshiftyTPC * TMath::Sin(ishift * 2.0 * psiTPC)));
409+
deltapsiTPCL = deltapsiTPCL + ((1 / (1.0 * ishift)) * (-coeffshiftxTPCL * TMath::Cos(ishift * 2.0 * psiTPCL) + coeffshiftyTPCL * TMath::Sin(ishift * 2.0 * psiTPCL)));
410+
deltapsiTPCR = deltapsiTPCR + ((1 / (1.0 * ishift)) * (-coeffshiftxTPCR * TMath::Cos(ishift * 2.0 * psiTPCR) + coeffshiftyTPCR * TMath::Sin(ishift * 2.0 * psiTPCR)));
411+
}
371412
}
372413
psiFT0C = psiFT0C + deltapsiFT0C;
414+
psiFT0A = psiFT0A + deltapsiFT0A;
415+
psiTPC = psiTPC + deltapsiTPC;
416+
psiTPCL = psiTPCL + deltapsiTPCL;
417+
psiTPCR = psiTPCR + deltapsiTPCR;
373418
}
374419
histos.fill(HIST("QxFT0C"), centrality, qxFT0C);
375420
histos.fill(HIST("QyFT0C"), centrality, qyFT0C);
@@ -416,6 +461,18 @@ struct epvector {
416461
for (int ishift = 1; ishift <= 10; ishift++) {
417462
histos.fill(HIST("ShiftFT0C"), centrality, 0.5, ishift - 0.5, TMath::Sin(ishift * 2.0 * psiFT0C));
418463
histos.fill(HIST("ShiftFT0C"), centrality, 1.5, ishift - 0.5, TMath::Cos(ishift * 2.0 * psiFT0C));
464+
465+
histos.fill(HIST("ShiftFT0A"), centrality, 0.5, ishift - 0.5, TMath::Sin(ishift * 2.0 * psiFT0A));
466+
histos.fill(HIST("ShiftFT0A"), centrality, 1.5, ishift - 0.5, TMath::Cos(ishift * 2.0 * psiFT0A));
467+
468+
histos.fill(HIST("ShiftTPC"), centrality, 0.5, ishift - 0.5, TMath::Sin(ishift * 2.0 * psiTPC));
469+
histos.fill(HIST("ShiftTPC"), centrality, 1.5, ishift - 0.5, TMath::Cos(ishift * 2.0 * psiTPC));
470+
471+
histos.fill(HIST("ShiftTPCL"), centrality, 0.5, ishift - 0.5, TMath::Sin(ishift * 2.0 * psiTPCL));
472+
histos.fill(HIST("ShiftTPCL"), centrality, 1.5, ishift - 0.5, TMath::Cos(ishift * 2.0 * psiTPCL));
473+
474+
histos.fill(HIST("ShiftTPCR"), centrality, 0.5, ishift - 0.5, TMath::Sin(ishift * 2.0 * psiTPCR));
475+
histos.fill(HIST("ShiftTPCR"), centrality, 1.5, ishift - 0.5, TMath::Cos(ishift * 2.0 * psiTPCR));
419476
}
420477
lastRunNumber = currentRunNumber;
421478
}

PWGLF/Tasks/Resonances/highmasslambda.cxx

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct highmasslambda {
8888
Configurable<float> cfgCutCentralityMax{"cfgCutCentralityMax", 50.0f, "Accepted maximum Centrality"};
8989
Configurable<float> cfgCutCentralityMin{"cfgCutCentralityMin", 30.0f, "Accepted minimum Centrality"};
9090
// proton track cut
91-
Configurable<bool> rejectPID{"reject PID", true, "pion, kaon, electron rejection"};
91+
Configurable<bool> rejectPID{"rejectPID", true, "pion, kaon, electron rejection"};
9292
Configurable<float> cfgCutTOFBeta{"cfgCutTOFBeta", 0.0, "cut TOF beta"};
9393
Configurable<bool> ispTdifferentialDCA{"ispTdifferentialDCA", true, "is pT differential DCA"};
9494
Configurable<bool> isPVContributor{"isPVContributor", true, "is PV contributor"};
@@ -601,7 +601,6 @@ struct highmasslambda {
601601
if (!selectionTrack(track1)) {
602602
continue;
603603
}
604-
605604
// PID check
606605
if (PIDstrategy == 0 && !selectionPID1(track1)) {
607606
continue;
@@ -634,7 +633,6 @@ struct highmasslambda {
634633
histos.fill(HIST("hNsigmaProtonKaonTPC_afterKa"), track1.tpcNSigmaPr(), track1.tpcNSigmaKa(), track1.tpcInnerParam());
635634
}
636635
}
637-
638636
histos.fill(HIST("hMomCorr"), track1.p() / track1.sign(), track1.p() - track1.tpcInnerParam(), centrality);
639637
histos.fill(HIST("hEta"), track1.eta());
640638
histos.fill(HIST("hDcaxy"), track1.dcaXY());
@@ -699,7 +697,6 @@ struct highmasslambda {
699697
histos.fill(HIST("hSparseV2SASameEvent_V2_dcatopv"), Lambdac.M(), Lambdac.Pt(), v2, v0.dcav0topv(), Proton.Pt());
700698
}
701699
}
702-
703700
if (fillRotation) {
704701
for (int nrotbkg = 0; nrotbkg < nBkgRotations; nrotbkg++) {
705702
auto anglestart = confMinRot;
@@ -780,21 +777,10 @@ struct highmasslambda {
780777
continue;
781778
}
782779
for (auto& [track1, v0] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) {
780+
783781
if (!selectionTrack(track1)) {
784782
continue;
785783
}
786-
if (!track1.hasTOF()) {
787-
if (rejectPID && !rejectPi(track1)) {
788-
continue;
789-
}
790-
if (rejectPID && !rejectEl(track1)) {
791-
continue;
792-
}
793-
if (rejectPID && !rejectKa(track1)) {
794-
continue;
795-
}
796-
}
797-
798784
// PID check
799785
if (PIDstrategy == 0 && !selectionPID1(track1)) {
800786
continue;
@@ -809,6 +795,11 @@ struct highmasslambda {
809795
continue;
810796
}
811797

798+
if (!track1.hasTOF()) {
799+
if (rejectPID && !rejectEl(track1)) {
800+
continue;
801+
}
802+
}
812803
if (!SelectionV0(collision2, v0)) {
813804
continue;
814805
}

0 commit comments

Comments
 (0)