Skip to content

Commit bb36e04

Browse files
jikim1290alibuild
andauthored
[Common] EventPlane: adding shift correction (#12967)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 3718a3d commit bb36e04

File tree

3 files changed

+315
-3
lines changed

3 files changed

+315
-3
lines changed

Common/DataModel/Qvectors.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,24 @@ DECLARE_SOA_COLUMN(QvecTPCnegImVec, qvecTPCnegImVec, std::vector<float>);
5151
DECLARE_SOA_COLUMN(QvecTPCallReVec, qvecTPCallReVec, std::vector<float>);
5252
DECLARE_SOA_COLUMN(QvecTPCallImVec, qvecTPCallImVec, std::vector<float>);
5353

54+
DECLARE_SOA_COLUMN(QvecShiftedRe, qvecShiftedRe, std::vector<float>);
55+
DECLARE_SOA_COLUMN(QvecShiftedIm, qvecShiftedIm, std::vector<float>);
56+
57+
DECLARE_SOA_COLUMN(QvecShiftedFT0CReVec, qvecShiftedFT0CReVec, std::vector<float>);
58+
DECLARE_SOA_COLUMN(QvecShiftedFT0CImVec, qvecShiftedFT0CImVec, std::vector<float>);
59+
DECLARE_SOA_COLUMN(QvecShiftedFT0AReVec, qvecShiftedFT0AReVec, std::vector<float>);
60+
DECLARE_SOA_COLUMN(QvecShiftedFT0AImVec, qvecShiftedFT0AImVec, std::vector<float>);
61+
DECLARE_SOA_COLUMN(QvecShiftedFT0MReVec, qvecShiftedFT0MReVec, std::vector<float>);
62+
DECLARE_SOA_COLUMN(QvecShiftedFT0MImVec, qvecShiftedFT0MImVec, std::vector<float>);
63+
DECLARE_SOA_COLUMN(QvecShiftedFV0AReVec, qvecShiftedFV0AReVec, std::vector<float>);
64+
DECLARE_SOA_COLUMN(QvecShiftedFV0AImVec, qvecShiftedFV0AImVec, std::vector<float>);
65+
DECLARE_SOA_COLUMN(QvecShiftedTPCposReVec, qvecShiftedTPCposReVec, std::vector<float>);
66+
DECLARE_SOA_COLUMN(QvecShiftedTPCposImVec, qvecShiftedTPCposImVec, std::vector<float>);
67+
DECLARE_SOA_COLUMN(QvecShiftedTPCnegReVec, qvecShiftedTPCnegReVec, std::vector<float>);
68+
DECLARE_SOA_COLUMN(QvecShiftedTPCnegImVec, qvecShiftedTPCnegImVec, std::vector<float>);
69+
DECLARE_SOA_COLUMN(QvecShiftedTPCallReVec, qvecShiftedTPCallReVec, std::vector<float>);
70+
DECLARE_SOA_COLUMN(QvecShiftedTPCallImVec, qvecShiftedTPCallImVec, std::vector<float>);
71+
5472
DECLARE_SOA_COLUMN(QvecFT0CRe, qvecFT0CRe, float);
5573
DECLARE_SOA_COLUMN(QvecFT0CIm, qvecFT0CIm, float);
5674
DECLARE_SOA_COLUMN(QvecFT0ARe, qvecFT0ARe, float);
@@ -104,6 +122,9 @@ DECLARE_SOA_COLUMN(LabelsBTot, labelsBTot, std::vector<int>);
104122
DECLARE_SOA_TABLE(Qvectors, "AOD", "QVECTORDEVS", //! Table with all Qvectors.
105123
qvec::Cent, qvec::IsCalibrated, qvec::QvecRe, qvec::QvecIm, qvec::QvecAmp);
106124
using Qvector = Qvectors::iterator;
125+
DECLARE_SOA_TABLE(QvectorsShifteds, "AOD", "QVECTORSCDEVS", //! Table with all shifted Qvectors.
126+
qvec::Cent, qvec::IsCalibrated, qvec::QvecShiftedRe, qvec::QvecShiftedIm, qvec::QvecAmp);
127+
using QvectorShifted = QvectorsShifteds::iterator;
107128

108129
DECLARE_SOA_TABLE(QvectorFT0Cs, "AOD", "QVECTORSFT0C", qvec::IsCalibrated, qvec::QvecFT0CRe, qvec::QvecFT0CIm, qvec::SumAmplFT0C);
109130
DECLARE_SOA_TABLE(QvectorFT0As, "AOD", "QVECTORSFT0A", qvec::IsCalibrated, qvec::QvecFT0ARe, qvec::QvecFT0AIm, qvec::SumAmplFT0A);
@@ -121,6 +142,14 @@ DECLARE_SOA_TABLE(QvectorTPCposVecs, "AOD", "QVECTORSTPCPVEC", qvec::IsCalibrate
121142
DECLARE_SOA_TABLE(QvectorTPCnegVecs, "AOD", "QVECTORSTPCNVEC", qvec::IsCalibrated, qvec::QvecTPCnegReVec, qvec::QvecTPCnegImVec, qvec::NTrkTPCneg, qvec::LabelsTPCneg);
122143
DECLARE_SOA_TABLE(QvectorTPCallVecs, "AOD", "QVECTORSTPCAVEC", qvec::IsCalibrated, qvec::QvecTPCallReVec, qvec::QvecTPCallImVec, qvec::NTrkTPCall, qvec::LabelsTPCall);
123144

145+
DECLARE_SOA_TABLE(QvectorShiftedFT0CVecs, "AOD", "QVECSHIFTEDFT0C", qvec::IsCalibrated, qvec::QvecShiftedFT0CReVec, qvec::QvecShiftedFT0CImVec, qvec::SumAmplFT0C);
146+
DECLARE_SOA_TABLE(QvectorShiftedFT0AVecs, "AOD", "QVECSHIFTEDFT0A", qvec::IsCalibrated, qvec::QvecShiftedFT0AReVec, qvec::QvecShiftedFT0AImVec, qvec::SumAmplFT0A);
147+
DECLARE_SOA_TABLE(QvectorShiftedFT0MVecs, "AOD", "QVECSHIFTEDFT0M", qvec::IsCalibrated, qvec::QvecShiftedFT0MReVec, qvec::QvecShiftedFT0MImVec, qvec::SumAmplFT0M);
148+
DECLARE_SOA_TABLE(QvectorShiftedFV0AVecs, "AOD", "QVECSHIFTEDFV0A", qvec::IsCalibrated, qvec::QvecShiftedFV0AReVec, qvec::QvecShiftedFV0AImVec, qvec::SumAmplFV0A);
149+
DECLARE_SOA_TABLE(QvectorShiftedTPCposVecs, "AOD", "QVECSHIFTEDTPCP", qvec::IsCalibrated, qvec::QvecShiftedTPCposReVec, qvec::QvecShiftedTPCposImVec, qvec::NTrkTPCpos, qvec::LabelsTPCpos);
150+
DECLARE_SOA_TABLE(QvectorShiftedTPCnegVecs, "AOD", "QVECSHIFTEDTPCN", qvec::IsCalibrated, qvec::QvecShiftedTPCnegReVec, qvec::QvecShiftedTPCnegImVec, qvec::NTrkTPCneg, qvec::LabelsTPCneg);
151+
DECLARE_SOA_TABLE(QvectorShiftedTPCallVecs, "AOD", "QVECSHIFTEDTPCA", qvec::IsCalibrated, qvec::QvecShiftedTPCallReVec, qvec::QvecShiftedTPCallImVec, qvec::NTrkTPCall, qvec::LabelsTPCall);
152+
124153
using QvectorFT0C = QvectorFT0Cs::iterator;
125154
using QvectorFT0A = QvectorFT0As::iterator;
126155
using QvectorFT0M = QvectorFT0Ms::iterator;
@@ -137,6 +166,14 @@ using QvectorTPCposVec = QvectorTPCposVecs::iterator;
137166
using QvectorTPCnegVec = QvectorTPCnegVecs::iterator;
138167
using QvectorTPCallVec = QvectorTPCallVecs::iterator;
139168

169+
using QvectorShiftedFT0CVec = QvectorShiftedFT0CVecs::iterator;
170+
using QvectorShiftedFT0AVec = QvectorShiftedFT0AVecs::iterator;
171+
using QvectorShiftedFT0MVec = QvectorShiftedFT0MVecs::iterator;
172+
using QvectorShiftedFV0AVec = QvectorShiftedFV0AVecs::iterator;
173+
using QvectorShiftedTPCposVec = QvectorShiftedTPCposVecs::iterator;
174+
using QvectorShiftedTPCnegVec = QvectorShiftedTPCnegVecs::iterator;
175+
using QvectorShiftedTPCallVec = QvectorShiftedTPCallVecs::iterator;
176+
140177
// Deprecated, will be removed in future after transition time //
141178
DECLARE_SOA_TABLE(QvectorBPoss, "AOD", "QVECTORSBPOS", qvec::IsCalibrated, qvec::QvecBPosRe, qvec::QvecBPosIm, qvec::NTrkBPos, qvec::LabelsBPos);
142179
DECLARE_SOA_TABLE(QvectorBNegs, "AOD", "QVECTORSBNEG", qvec::IsCalibrated, qvec::QvecBNegRe, qvec::QvecBNegIm, qvec::NTrkBNeg, qvec::LabelsBNeg);

Common/TableProducer/qVectorsTable.cxx

Lines changed: 131 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ struct qVectorsTable {
9898
Configurable<std::string> cfgGainEqPath{"cfgGainEqPath", "Users/j/junlee/Qvector/GainEq", "CCDB path for gain equalization constants"};
9999
Configurable<std::string> cfgQvecCalibPath{"cfgQvecCalibPath", "Analysis/EventPlane/QVecCorrections", "CCDB pasth for Q-vecteor calibration constants"};
100100

101+
Configurable<bool> cfgShiftCorr{"cfgShiftCorr", false, "configurable flag for shift correction"};
102+
Configurable<std::string> cfgShiftPath{"cfgShiftPath", "", "CCDB path for shift correction"};
103+
101104
ConfigurableAxis cfgaxisFITamp{"cfgaxisFITamp", {1000, 0, 5000}, ""};
102105

103106
Configurable<bool> cfgUseFT0C{"cfgUseFT0C", false, "Initial value for using FT0C. By default obtained from DataModel."};
@@ -126,6 +129,15 @@ struct qVectorsTable {
126129
Produces<aod::QvectorTPCnegVecs> qVectorTPCnegVec;
127130
Produces<aod::QvectorTPCallVecs> qVectorTPCallVec;
128131

132+
Produces<aod::QvectorsShifteds> qVectorShifted;
133+
Produces<aod::QvectorShiftedFT0CVecs> qVectorFT0CShiftedVec;
134+
Produces<aod::QvectorShiftedFT0AVecs> qVectorFT0AShiftedVec;
135+
Produces<aod::QvectorShiftedFT0MVecs> qVectorFT0MShiftedVec;
136+
Produces<aod::QvectorShiftedFV0AVecs> qVectorFV0AShiftedVec;
137+
Produces<aod::QvectorShiftedTPCposVecs> qVectorTPCposShiftedVec;
138+
Produces<aod::QvectorShiftedTPCnegVecs> qVectorTPCnegShiftedVec;
139+
Produces<aod::QvectorShiftedTPCallVecs> qVectorTPCallShiftedVec;
140+
129141
std::vector<float> FT0RelGainConst{};
130142
std::vector<float> FV0RelGainConst{};
131143

@@ -146,6 +158,7 @@ struct qVectorsTable {
146158
float cent;
147159

148160
std::vector<TH3F*> objQvec{};
161+
std::vector<TProfile3D*> shiftprofile{};
149162

150163
// Deprecated, will be removed in future after transition time //
151164
Configurable<bool> cfgUseBPos{"cfgUseBPos", false, "Initial value for using BPos. By default obtained from DataModel."};
@@ -265,6 +278,19 @@ struct qVectorsTable {
265278
}
266279
objQvec.push_back(objqvec);
267280
}
281+
282+
if (cfgShiftCorr) {
283+
shiftprofile.clear();
284+
for (std::size_t i = 0; i < cfgnMods->size(); i++) {
285+
int ind = cfgnMods->at(i);
286+
fullPath = cfgShiftPath;
287+
fullPath += "/v";
288+
fullPath += std::to_string(ind);
289+
auto objshift = getForTsOrRun<TProfile3D>(fullPath, timestamp, runnumber);
290+
shiftprofile.push_back(objshift);
291+
}
292+
}
293+
268294
fullPath = cfgGainEqPath;
269295
fullPath += "/FT0";
270296
const auto objft0Gain = getForTsOrRun<std::vector<float>>(fullPath, timestamp, runnumber);
@@ -560,6 +586,25 @@ struct qVectorsTable {
560586
std::vector<float> qvecReTPCall{};
561587
std::vector<float> qvecImTPCall{};
562588

589+
std::vector<float> qvecShiftedRe{};
590+
std::vector<float> qvecShiftedIm{};
591+
std::vector<float> qvecShiftedAmp{};
592+
593+
std::vector<float> qvecReShiftedFT0C{};
594+
std::vector<float> qvecImShiftedFT0C{};
595+
std::vector<float> qvecReShiftedFT0A{};
596+
std::vector<float> qvecImShiftedFT0A{};
597+
std::vector<float> qvecReShiftedFT0M{};
598+
std::vector<float> qvecImShiftedFT0M{};
599+
std::vector<float> qvecReShiftedFV0A{};
600+
std::vector<float> qvecImShiftedFV0A{};
601+
std::vector<float> qvecReShiftedTPCpos{};
602+
std::vector<float> qvecImShiftedTPCpos{};
603+
std::vector<float> qvecReShiftedTPCneg{};
604+
std::vector<float> qvecImShiftedTPCneg{};
605+
std::vector<float> qvecReShiftedTPCall{};
606+
std::vector<float> qvecImShiftedTPCall{};
607+
563608
auto bc = coll.bc_as<aod::BCsWithTimestamps>();
564609
int currentRun = bc.runNumber();
565610
if (runNumber != currentRun) {
@@ -577,8 +622,8 @@ struct qVectorsTable {
577622
IsCalibrated = false;
578623
}
579624
for (std::size_t id = 0; id < cfgnMods->size(); id++) {
580-
int ind = cfgnMods->at(id);
581-
CalQvec(ind, coll, tracks, qvecRe, qvecIm, qvecAmp, TrkTPCposLabel, TrkTPCnegLabel, TrkTPCallLabel);
625+
int nmode = cfgnMods->at(id);
626+
CalQvec(nmode, coll, tracks, qvecRe, qvecIm, qvecAmp, TrkTPCposLabel, TrkTPCnegLabel, TrkTPCallLabel);
582627
if (cent < cfgMaxCentrality) {
583628
for (auto i{0u}; i < kTPCall + 1; i++) {
584629
helperEP.DoRecenter(qvecRe[(kTPCall + 1) * 4 * id + i * 4 + 1], qvecIm[(kTPCall + 1) * 4 * id + i * 4 + 1],
@@ -596,6 +641,79 @@ struct qVectorsTable {
596641
helperEP.DoRescale(qvecRe[(kTPCall + 1) * 4 * id + i * 4 + 3], qvecIm[(kTPCall + 1) * 4 * id + i * 4 + 3],
597642
objQvec.at(id)->GetBinContent(static_cast<int>(cent) + 1, 5, i + 1), objQvec.at(id)->GetBinContent(static_cast<int>(cent) + 1, 6, i + 1));
598643
}
644+
if (cfgShiftCorr) {
645+
auto deltapsiFT0C = 0.0;
646+
auto deltapsiFT0A = 0.0;
647+
auto deltapsiFT0M = 0.0;
648+
auto deltapsiFV0A = 0.0;
649+
auto deltapsiTPCpos = 0.0;
650+
auto deltapsiTPCneg = 0.0;
651+
auto deltapsiTPCall = 0.0;
652+
653+
auto psidefFT0C = TMath::ATan2(qvecIm[(kTPCall + 1) * 4 * id + kFT0C * 4 + 3], qvecRe[(kTPCall + 1) * 4 * id + kFT0C * 4 + 3]) / static_cast<float>(nmode);
654+
auto psidefFT0A = TMath::ATan2(qvecIm[(kTPCall + 1) * 4 * id + kFT0A * 4 + 3], qvecRe[(kTPCall + 1) * 4 * id + kFT0A * 4 + 3]) / static_cast<float>(nmode);
655+
auto psidefFT0M = TMath::ATan2(qvecIm[(kTPCall + 1) * 4 * id + kFT0M * 4 + 3], qvecRe[(kTPCall + 1) * 4 * id + kFT0M * 4 + 3]) / static_cast<float>(nmode);
656+
auto psidefFV0A = TMath::ATan2(qvecIm[(kTPCall + 1) * 4 * id + kFV0A * 4 + 3], qvecRe[(kTPCall + 1) * 4 * id + kFV0A * 4 + 3]) / static_cast<float>(nmode);
657+
auto psidefTPCpos = TMath::ATan2(qvecIm[(kTPCall + 1) * 4 * id + kTPCpos * 4 + 3], qvecRe[(kTPCall + 1) * 4 * id + kTPCpos * 4 + 3]) / static_cast<float>(nmode);
658+
auto psidefTPCneg = TMath::ATan2(qvecIm[(kTPCall + 1) * 4 * id + kTPCneg * 4 + 3], qvecRe[(kTPCall + 1) * 4 * id + kTPCneg * 4 + 3]) / static_cast<float>(nmode);
659+
auto psidefTPCall = TMath::ATan2(qvecIm[(kTPCall + 1) * 4 * id + kTPCall * 4 + 3], qvecRe[(kTPCall + 1) * 4 * id + kTPCall * 4 + 3]) / static_cast<float>(nmode);
660+
661+
for (int ishift = 1; ishift <= 10; ishift++) {
662+
auto coeffshiftxFT0C = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kFT0C, ishift - 0.5));
663+
auto coeffshiftyFT0C = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kFT0C + 1, ishift - 0.5));
664+
auto coeffshiftxFT0A = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kFT0A, ishift - 0.5));
665+
auto coeffshiftyFT0A = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kFT0A + 1, ishift - 0.5));
666+
auto coeffshiftxFT0M = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kFT0M, ishift - 0.5));
667+
auto coeffshiftyFT0M = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kFT0M + 1, ishift - 0.5));
668+
auto coeffshiftxFV0A = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kFV0A, ishift - 0.5));
669+
auto coeffshiftyFV0A = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kFV0A + 1, ishift - 0.5));
670+
auto coeffshiftxTPCpos = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kTPCpos, ishift - 0.5));
671+
auto coeffshiftyTPCpos = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kTPCpos + 1, ishift - 0.5));
672+
auto coeffshiftxTPCneg = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kTPCneg, ishift - 0.5));
673+
auto coeffshiftyTPCneg = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kTPCneg + 1, ishift - 0.5));
674+
auto coeffshiftxTPCall = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kTPCall, ishift - 0.5));
675+
auto coeffshiftyTPCall = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kTPCall + 1, ishift - 0.5));
676+
677+
deltapsiFT0C += ((1 / (1.0 * ishift)) * (-coeffshiftxFT0C * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFT0C) + coeffshiftyFT0C * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFT0C)));
678+
deltapsiFT0A += ((1 / (1.0 * ishift)) * (-coeffshiftxFT0A * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFT0A) + coeffshiftyFT0A * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFT0A)));
679+
deltapsiFT0M += ((1 / (1.0 * ishift)) * (-coeffshiftxFT0M * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFT0M) + coeffshiftyFT0M * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFT0M)));
680+
deltapsiFV0A += ((1 / (1.0 * ishift)) * (-coeffshiftxFV0A * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFV0A) + coeffshiftyFV0A * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFV0A)));
681+
deltapsiTPCpos += ((1 / (1.0 * ishift)) * (-coeffshiftxTPCpos * TMath::Cos(ishift * static_cast<float>(nmode) * psidefTPCpos) + coeffshiftyTPCpos * TMath::Sin(ishift * static_cast<float>(nmode) * psidefTPCpos)));
682+
deltapsiTPCneg += ((1 / (1.0 * ishift)) * (-coeffshiftxTPCneg * TMath::Cos(ishift * static_cast<float>(nmode) * psidefTPCneg) + coeffshiftyTPCneg * TMath::Sin(ishift * static_cast<float>(nmode) * psidefTPCneg)));
683+
deltapsiTPCall += ((1 / (1.0 * ishift)) * (-coeffshiftxTPCall * TMath::Cos(ishift * static_cast<float>(nmode) * psidefTPCall) + coeffshiftyTPCall * TMath::Sin(ishift * static_cast<float>(nmode) * psidefTPCall)));
684+
}
685+
686+
qvecReShiftedFT0C.push_back(qvecRe[(kTPCall + 1) * 4 * id + kFT0C * 4 + 3] * TMath::Cos(deltapsiFT0C) - qvecIm[(kTPCall + 1) * 4 * id + kFT0C * 4 + 3] * TMath::Sin(deltapsiFT0C));
687+
qvecImShiftedFT0C.push_back(qvecRe[(kTPCall + 1) * 4 * id + kFT0C * 4 + 3] * TMath::Sin(deltapsiFT0C) + qvecIm[(kTPCall + 1) * 4 * id + kFT0C * 4 + 3] * TMath::Cos(deltapsiFT0C));
688+
qvecReShiftedFT0A.push_back(qvecRe[(kTPCall + 1) * 4 * id + kFT0A * 4 + 3] * TMath::Cos(deltapsiFT0A) - qvecIm[(kTPCall + 1) * 4 * id + kFT0A * 4 + 3] * TMath::Sin(deltapsiFT0A));
689+
qvecImShiftedFT0A.push_back(qvecRe[(kTPCall + 1) * 4 * id + kFT0A * 4 + 3] * TMath::Sin(deltapsiFT0A) + qvecIm[(kTPCall + 1) * 4 * id + kFT0A * 4 + 3] * TMath::Cos(deltapsiFT0A));
690+
qvecReShiftedFT0M.push_back(qvecRe[(kTPCall + 1) * 4 * id + kFT0M * 4 + 3] * TMath::Cos(deltapsiFT0M) - qvecIm[(kTPCall + 1) * 4 * id + kFT0M * 4 + 3] * TMath::Sin(deltapsiFT0M));
691+
qvecImShiftedFT0M.push_back(qvecRe[(kTPCall + 1) * 4 * id + kFT0M * 4 + 3] * TMath::Sin(deltapsiFT0M) + qvecIm[(kTPCall + 1) * 4 * id + kFT0M * 4 + 3] * TMath::Cos(deltapsiFT0M));
692+
qvecReShiftedFV0A.push_back(qvecRe[(kTPCall + 1) * 4 * id + kFV0A * 4 + 3] * TMath::Cos(deltapsiFV0A) - qvecIm[(kTPCall + 1) * 4 * id + kFV0A * 4 + 3] * TMath::Sin(deltapsiFV0A));
693+
qvecImShiftedFV0A.push_back(qvecRe[(kTPCall + 1) * 4 * id + kFV0A * 4 + 3] * TMath::Sin(deltapsiFV0A) + qvecIm[(kTPCall + 1) * 4 * id + kFV0A * 4 + 3] * TMath::Cos(deltapsiFV0A));
694+
qvecReShiftedTPCpos.push_back(qvecRe[(kTPCall + 1) * 4 * id + kTPCpos * 4 + 3] * TMath::Cos(deltapsiTPCpos) - qvecIm[(kTPCall + 1) * 4 * id + kTPCpos * 4 + 3] * TMath::Sin(deltapsiTPCpos));
695+
qvecImShiftedTPCpos.push_back(qvecRe[(kTPCall + 1) * 4 * id + kTPCpos * 4 + 3] * TMath::Sin(deltapsiTPCpos) + qvecIm[(kTPCall + 1) * 4 * id + kTPCpos * 4 + 3] * TMath::Cos(deltapsiTPCpos));
696+
qvecReShiftedTPCneg.push_back(qvecRe[(kTPCall + 1) * 4 * id + kTPCneg * 4 + 3] * TMath::Cos(deltapsiTPCneg) - qvecIm[(kTPCall + 1) * 4 * id + kTPCneg * 4 + 3] * TMath::Sin(deltapsiTPCneg));
697+
qvecImShiftedTPCneg.push_back(qvecRe[(kTPCall + 1) * 4 * id + kTPCneg * 4 + 3] * TMath::Sin(deltapsiTPCneg) + qvecIm[(kTPCall + 1) * 4 * id + kTPCneg * 4 + 3] * TMath::Cos(deltapsiTPCneg));
698+
qvecReShiftedTPCall.push_back(qvecRe[(kTPCall + 1) * 4 * id + kTPCall * 4 + 3] * TMath::Cos(deltapsiTPCall) - qvecIm[(kTPCall + 1) * 4 * id + kTPCall * 4 + 3] * TMath::Sin(deltapsiTPCall));
699+
qvecImShiftedTPCall.push_back(qvecRe[(kTPCall + 1) * 4 * id + kTPCall * 4 + 3] * TMath::Sin(deltapsiTPCall) + qvecIm[(kTPCall + 1) * 4 * id + kTPCall * 4 + 3] * TMath::Cos(deltapsiTPCall));
700+
701+
qvecShiftedRe.push_back(qvecReShiftedFT0C[id]);
702+
qvecShiftedRe.push_back(qvecReShiftedFT0A[id]);
703+
qvecShiftedRe.push_back(qvecReShiftedFT0M[id]);
704+
qvecShiftedRe.push_back(qvecReShiftedFV0A[id]);
705+
qvecShiftedRe.push_back(qvecReShiftedTPCpos[id]);
706+
qvecShiftedRe.push_back(qvecReShiftedTPCneg[id]);
707+
qvecShiftedRe.push_back(qvecReShiftedTPCall[id]);
708+
709+
qvecShiftedIm.push_back(qvecImShiftedFT0C[id]);
710+
qvecShiftedIm.push_back(qvecImShiftedFT0A[id]);
711+
qvecShiftedIm.push_back(qvecImShiftedFT0M[id]);
712+
qvecShiftedIm.push_back(qvecImShiftedFV0A[id]);
713+
qvecShiftedIm.push_back(qvecImShiftedTPCpos[id]);
714+
qvecShiftedIm.push_back(qvecImShiftedTPCneg[id]);
715+
qvecShiftedIm.push_back(qvecImShiftedTPCall[id]);
716+
}
599717
}
600718
int CorrLevel = cfgCorrLevel == 0 ? 0 : cfgCorrLevel - 1;
601719
qvecReFT0C.push_back(qvecRe[(kTPCall + 1) * 4 * id + kFT0C * 4 + CorrLevel]);
@@ -639,6 +757,17 @@ struct qVectorsTable {
639757
qVectorTPCnegVec(IsCalibrated, qvecReTPCneg, qvecImTPCneg, qvecAmp[kTPCneg], TrkTPCnegLabel);
640758
qVectorTPCallVec(IsCalibrated, qvecReTPCall, qvecImTPCall, qvecAmp[kTPCall], TrkTPCallLabel);
641759

760+
if (cfgShiftCorr) {
761+
qVectorShifted(cent, IsCalibrated, qvecShiftedRe, qvecShiftedIm, qvecAmp);
762+
qVectorFT0CShiftedVec(IsCalibrated, qvecReShiftedFT0C, qvecImShiftedFT0C, qvecAmp[kFT0C]);
763+
qVectorFT0AShiftedVec(IsCalibrated, qvecReShiftedFT0A, qvecImShiftedFT0A, qvecAmp[kFT0A]);
764+
qVectorFT0MShiftedVec(IsCalibrated, qvecReShiftedFT0M, qvecImShiftedFT0M, qvecAmp[kFT0M]);
765+
qVectorFV0AShiftedVec(IsCalibrated, qvecReShiftedFV0A, qvecImShiftedFV0A, qvecAmp[kFV0A]);
766+
qVectorTPCposShiftedVec(IsCalibrated, qvecReShiftedTPCpos, qvecImShiftedTPCpos, qvecAmp[kTPCpos], TrkTPCposLabel);
767+
qVectorTPCnegShiftedVec(IsCalibrated, qvecReShiftedTPCneg, qvecImShiftedTPCneg, qvecAmp[kTPCneg], TrkTPCnegLabel);
768+
qVectorTPCallShiftedVec(IsCalibrated, qvecReShiftedTPCall, qvecImShiftedTPCall, qvecAmp[kTPCall], TrkTPCallLabel);
769+
}
770+
642771
// Deprecated, will be removed in future after transition time //
643772
if (useDetector["QvectorBPoss"])
644773
qVectorBPos(IsCalibrated, qvecReTPCpos.at(0), qvecImTPCpos.at(0), qvecAmp[kTPCpos], TrkTPCposLabel);

0 commit comments

Comments
 (0)