Skip to content

Commit ec353ec

Browse files
author
Chiara De Martin
committed
compute resolution with V0A as reference detector
1 parent 5235c64 commit ec353ec

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

PWGLF/TableProducer/Strangeness/cascadeflow.cxx

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ struct cascadeFlow {
183183
struct : ConfigurableGroup {
184184
Configurable<bool> cfgShiftCorr{"cfgShiftCorr", 0, ""};
185185
Configurable<std::string> cfgShiftPathFT0C{"cfgShiftPathFT0C", "Users/c/chdemart/OOpass2Shift/ShiftFT0C", "Path for Shift"};
186+
Configurable<std::string> cfgShiftPathFV0A{"cfgShiftPathFV0A", "Users/c/chdemart/OOpass2Shift/ShiftFV0A", "Path for Shift"};
186187
Configurable<std::string> cfgShiftPathTPCL{"cfgShiftPathTPCL", "Users/c/chdemart/OOpass2Shift/ShiftTPCL", "Path for Shift"};
187188
Configurable<std::string> cfgShiftPathTPCR{"cfgShiftPathTPCR", "Users/c/chdemart/OOpass2Shift/ShiftTPCR", "Path for Shift"};
188189
} ShiftConfigs;
@@ -493,10 +494,12 @@ struct cascadeFlow {
493494
int lastRunNumber = -999;
494495
TProfile3D* shiftprofile;
495496
TProfile3D* shiftprofileFT0C;
497+
TProfile3D* shiftprofileFV0A;
496498
TProfile3D* shiftprofileTPCL;
497499
TProfile3D* shiftprofileTPCR;
498500
std::string fullCCDBShiftCorrPath;
499501
std::string fullCCDBShiftCorrPathFT0C;
502+
std::string fullCCDBShiftCorrPathFV0A;
500503
std::string fullCCDBShiftCorrPathTPCL;
501504
std::string fullCCDBShiftCorrPathTPCR;
502505

@@ -516,10 +519,11 @@ struct cascadeFlow {
516519
}
517520

518521
template <typename TCollision>
519-
double ComputeEPResolutionwShifts(TCollision coll, double psiT0C, double psiTPCA, double psiTPCC, TProfile3D* shiftprofileA, TProfile3D* shiftprofileB, TProfile3D* shiftprofileC)
522+
double ComputeEPResolutionwShifts(TCollision coll, double psiT0C, double psiV0A, double psiTPCA, double psiTPCC, TProfile3D* shiftprofileA, TProfile3D* shiftprofileB, TProfile3D* shiftprofileC, TProfile3D* shiftprofileD)
520523
{
521524
int nmode = 2;
522525
auto deltapsiFT0C = 0.0;
526+
auto deltapsiFV0A = 0.0;
523527
auto deltapsiTPCA = 0.0;
524528
auto deltapsiTPCC = 0.0;
525529
for (int ishift = 1; ishift <= 10; ishift++) {
@@ -529,14 +533,19 @@ struct cascadeFlow {
529533
auto coeffshiftyTPCA = shiftprofileB->GetBinContent(shiftprofileTPCL->FindBin(coll.centFT0C(), 3.5, ishift - 0.5));
530534
auto coeffshiftxTPCC = shiftprofileC->GetBinContent(shiftprofileTPCR->FindBin(coll.centFT0C(), 4.5, ishift - 0.5));
531535
auto coeffshiftyTPCC = shiftprofileC->GetBinContent(shiftprofileTPCR->FindBin(coll.centFT0C(), 5.5, ishift - 0.5));
536+
auto coeffshiftxFV0A = shiftprofileD->GetBinContent(shiftprofileFV0A->FindBin(coll.centFT0C(), 0.5, ishift - 0.5));
537+
auto coeffshiftyFV0A = shiftprofileD->GetBinContent(shiftprofileFV0A->FindBin(coll.centFT0C(), 1.5, ishift - 0.5));
538+
532539
deltapsiFT0C += ((1 / (1.0 * ishift)) * (-coeffshiftxFT0C * TMath::Cos(ishift * static_cast<float>(nmode) * psiT0C) + coeffshiftyFT0C * TMath::Sin(ishift * static_cast<float>(nmode) * psiT0C)));
540+
deltapsiFV0A += ((1 / (1.0 * ishift)) * (-coeffshiftxFV0A * TMath::Cos(ishift * static_cast<float>(nmode) * psiV0A) + coeffshiftyFV0A * TMath::Sin(ishift * static_cast<float>(nmode) * psiV0A)));
533541
deltapsiTPCA += ((1 / (1.0 * ishift)) * (-coeffshiftxTPCA * TMath::Cos(ishift * static_cast<float>(nmode) * psiTPCA) + coeffshiftyTPCA * TMath::Sin(ishift * static_cast<float>(nmode) * psiTPCA)));
534542
deltapsiTPCC += ((1 / (1.0 * ishift)) * (-coeffshiftxTPCC * TMath::Cos(ishift * static_cast<float>(nmode) * psiTPCC) + coeffshiftyTPCC * TMath::Sin(ishift * static_cast<float>(nmode) * psiTPCC)));
535543
}
536544
// histos.fill(HIST("psi2/QA/EP_FT0C_shifted"), coll.centFT0C(), psiT0C + deltapsiFT0C);
537545
// histos.fill(HIST("psi2/QA/EP_TPCA_shifted"), coll.centFT0C(), psiTPCA + deltapsiTPCA);
538546
// histos.fill(HIST("psi2/QA/EP_TPCC_shifted"), coll.centFT0C(), psiTPCC + deltapsiTPCC);
539547
resolution.fill(HIST("QVectorsT0CTPCA_Shifted"), coll.centFT0C(), TMath::Cos(static_cast<float>(nmode) * (psiT0C + deltapsiFT0C - psiTPCA - deltapsiTPCA)));
548+
resolution.fill(HIST("QVectorsT0CV0A_Shifted"), coll.centFT0C(), TMath::Cos(static_cast<float>(nmode) * (psiT0C + deltapsiFT0C - psiV0A - deltapsiFV0A)));
540549
resolution.fill(HIST("QVectorsT0CTPCC_Shifted"), coll.centFT0C(), TMath::Cos(static_cast<float>(nmode) * (psiT0C + deltapsiFT0C - psiTPCC - deltapsiTPCC)));
541550
resolution.fill(HIST("QVectorsTPCAC_Shifted"), coll.centFT0C(), TMath::Cos(static_cast<float>(nmode) * (psiTPCA + deltapsiTPCA - psiTPCC - deltapsiTPCC)));
542551
return true;
@@ -748,15 +757,19 @@ struct cascadeFlow {
748757
resolution.add("QVectorsT0CTPCA", "QVectorsT0CTPCA", HistType::kTH2F, {axisQVs, CentAxisPerCent});
749758
resolution.add("QVectorsT0CTPCC", "QVectorsT0CTPCC", HistType::kTH2F, {axisQVs, CentAxisPerCent});
750759
resolution.add("QVectorsTPCAC", "QVectorsTPCAC", HistType::kTH2F, {axisQVs, CentAxisPerCent});
760+
resolution.add("QVectorsT0CV0A", "QVectorsT0CV0A", HistType::kTH2F, {axisQVs, CentAxisPerCent});
751761
resolution.add("QVectorsNormT0CTPCA", "QVectorsNormT0CTPCA", HistType::kTH2F, {axisQVsNorm, CentAxisPerCent});
752762
resolution.add("QVectorsNormT0CTPCC", "QVectorsNormT0CTPCC", HistType::kTH2F, {axisQVsNorm, CentAxisPerCent});
753763
resolution.add("QVectorsNormTPCAC", "QVectorsNormTPCCB", HistType::kTH2F, {axisQVsNorm, CentAxisPerCent});
764+
resolution.add("QVectorsNormT0CV0A", "QVectorsNormT0CV0A", HistType::kTH2F, {axisQVs, CentAxisPerCent});
754765
resolution.add("QVectorsSpecPlane", "QVectorsSpecPlane", HistType::kTH2F, {axisQVsNorm, CentAxisPerCent});
755766
resolution.add("QVectorsT0CTPCA_Shifted", "QVectorsT0CTPCA_Shifted", HistType::kTH2F, {axisQVs, CentAxisPerCent});
756767
resolution.add("QVectorsT0CTPCC_Shifted", "QVectorsT0CTPCC_Shifted", HistType::kTH2F, {axisQVs, CentAxisPerCent});
757768
resolution.add("QVectorsTPCAC_Shifted", "QVectorsTPCAC_Shifted", HistType::kTH2F, {axisQVs, CentAxisPerCent});
769+
resolution.add("QVectorsT0CV0A_Shifted", "QVectorsT0CV0A_Shifted", HistType::kTH2F, {axisQVs, CentAxisPerCent});
758770

759771
histos.add("ShiftFT0C", "ShiftFT0C", kTProfile3D, {CentAxis, basisAxis, shiftAxis});
772+
histos.add("ShiftFV0A", "ShiftFV0A", kTProfile3D, {CentAxis, basisAxis, shiftAxis});
760773
histos.add("ShiftTPCL", "ShiftTPCL", kTProfile3D, {CentAxis, basisAxis, shiftAxis});
761774
histos.add("ShiftTPCR", "ShiftTPCR", kTProfile3D, {CentAxis, basisAxis, shiftAxis});
762775

@@ -1106,7 +1119,7 @@ struct cascadeFlow {
11061119

11071120
if (ShiftConfigs.cfgShiftCorr) {
11081121
psiT0CCorr = ApplyShiftCorrection(coll, psiT0C, shiftprofileFT0C);
1109-
ComputeEPResolutionwShifts(coll, psiT0C, psiTPCA, psiTPCC, shiftprofileFT0C, shiftprofileTPCL, shiftprofileTPCR);
1122+
ComputeEPResolutionwShifts(coll, psiT0C, psiT0C, psiTPCA, psiTPCC, shiftprofileFT0C, shiftprofileTPCL, shiftprofileTPCR, shiftprofileFT0C);
11101123
}
11111124

11121125
histos.fill(HIST("hPsiT0C"), psiT0CCorr);
@@ -1419,7 +1432,7 @@ struct cascadeFlow {
14191432

14201433
if (ShiftConfigs.cfgShiftCorr) {
14211434
psiT0CCorr = ApplyShiftCorrection(coll, psiT0C, shiftprofileFT0C);
1422-
ComputeEPResolutionwShifts(coll, psiT0C, psiTPCA, psiTPCC, shiftprofileFT0C, shiftprofileTPCL, shiftprofileTPCR);
1435+
ComputeEPResolutionwShifts(coll, psiT0C, psiT0C, psiTPCA, psiTPCC, shiftprofileFT0C, shiftprofileTPCL, shiftprofileTPCR, shiftprofileFT0C);
14231436
}
14241437

14251438
histos.fill(HIST("hPsiT0C"), psiT0CCorr);
@@ -1691,6 +1704,9 @@ struct cascadeFlow {
16911704
qvecRe = coll.qvecFV0ARe();
16921705
qvecIm = coll.qvecFV0AIm();
16931706
}
1707+
1708+
double qvecReV0A = coll.qvecFV0ARe();
1709+
double qvecImV0A = coll.qvecFV0AIm();
16941710

16951711
histos.fill(HIST("hEventCentralityBefEPSel"), collisionCentrality);
16961712
histos.fill(HIST("hEventCentralityBefEPSelT0M"), coll.centFT0M());
@@ -1714,17 +1730,22 @@ struct cascadeFlow {
17141730
histos.fill(HIST("hEventVertexZ"), coll.posZ());
17151731

17161732
ROOT::Math::XYZVector eventplaneVecT0C{qvecRe, qvecIm, 0};
1733+
ROOT::Math::XYZVector eventplaneVecV0A{qvecReV0A, qvecImV0A, 0};
17171734
ROOT::Math::XYZVector eventplaneVecTPCA{coll.qvecBPosRe(), coll.qvecBPosIm(), 0};
17181735
ROOT::Math::XYZVector eventplaneVecTPCC{coll.qvecBNegRe(), coll.qvecBNegIm(), 0};
17191736

17201737
const float psiT0C = std::atan2(qvecIm, qvecRe) * 0.5f;
1738+
const float psiV0A = std::atan2(qvecImV0A, qvecReV0A) * 0.5f;
17211739
const float psiTPCA = std::atan2(coll.qvecBPosIm(), coll.qvecBPosRe()) * 0.5f;
17221740
const float psiTPCC = std::atan2(coll.qvecBNegIm(), coll.qvecBNegRe()) * 0.5f;
17231741
float psiT0CCorr = psiT0C;
17241742
for (int ishift = 1; ishift <= 10; ishift++) {
17251743
histos.fill(HIST("ShiftFT0C"), collisionCentrality, 0.5, ishift - 0.5, std::sin(ishift * 2 * psiT0C));
17261744
histos.fill(HIST("ShiftFT0C"), collisionCentrality, 1.5, ishift - 0.5, std::cos(ishift * 2 * psiT0C));
17271745

1746+
histos.fill(HIST("ShiftFV0A"), collisionCentrality, 0.5, ishift - 0.5, std::sin(ishift * 2 * psiV0A));
1747+
histos.fill(HIST("ShiftFV0A"), collisionCentrality, 1.5, ishift - 0.5, std::cos(ishift * 2 * psiV0A));
1748+
17281749
histos.fill(HIST("ShiftTPCL"), collisionCentrality, 0.5, ishift - 0.5, std::sin(ishift * 2 * psiTPCA));
17291750
histos.fill(HIST("ShiftTPCL"), collisionCentrality, 1.5, ishift - 0.5, std::cos(ishift * 2 * psiTPCA));
17301751

@@ -1738,16 +1759,18 @@ struct cascadeFlow {
17381759
fullCCDBShiftCorrPathFT0C = ShiftConfigs.cfgShiftPathFT0C;
17391760
fullCCDBShiftCorrPathTPCL = ShiftConfigs.cfgShiftPathTPCL;
17401761
fullCCDBShiftCorrPathTPCR = ShiftConfigs.cfgShiftPathTPCR;
1762+
fullCCDBShiftCorrPathFV0A = ShiftConfigs.cfgShiftPathFV0A;
17411763
shiftprofileFT0C = ccdb->getForTimeStamp<TProfile3D>(fullCCDBShiftCorrPathFT0C, coll.timestamp());
17421764
shiftprofileTPCL = ccdb->getForTimeStamp<TProfile3D>(fullCCDBShiftCorrPathTPCL, coll.timestamp());
17431765
shiftprofileTPCR = ccdb->getForTimeStamp<TProfile3D>(fullCCDBShiftCorrPathTPCR, coll.timestamp());
1766+
shiftprofileFV0A = ccdb->getForTimeStamp<TProfile3D>(fullCCDBShiftCorrPathFV0A, coll.timestamp());
17441767
lastRunNumber = currentRunNumber;
17451768
}
17461769
}
17471770

17481771
if (ShiftConfigs.cfgShiftCorr) {
17491772
psiT0CCorr = ApplyShiftCorrection(coll, psiT0C, shiftprofileFT0C);
1750-
ComputeEPResolutionwShifts(coll, psiT0C, psiTPCA, psiTPCC, shiftprofileFT0C, shiftprofileTPCL, shiftprofileTPCR);
1773+
ComputeEPResolutionwShifts(coll, psiT0C, psiV0A, psiTPCA, psiTPCC, shiftprofileFT0C, shiftprofileTPCL, shiftprofileTPCR, shiftprofileFV0A);
17511774
}
17521775

17531776
histos.fill(HIST("hPsiT0C"), psiT0CCorr);
@@ -1756,9 +1779,11 @@ struct cascadeFlow {
17561779
resolution.fill(HIST("QVectorsT0CTPCA"), eventplaneVecT0C.Dot(eventplaneVecTPCA), collisionCentrality);
17571780
resolution.fill(HIST("QVectorsT0CTPCC"), eventplaneVecT0C.Dot(eventplaneVecTPCC), collisionCentrality);
17581781
resolution.fill(HIST("QVectorsTPCAC"), eventplaneVecTPCA.Dot(eventplaneVecTPCC), collisionCentrality);
1782+
resolution.fill(HIST("QVectorsT0CV0A"), eventplaneVecT0C.Dot(eventplaneVecV0A), collisionCentrality);
17591783
resolution.fill(HIST("QVectorsNormT0CTPCA"), eventplaneVecT0C.Dot(eventplaneVecTPCA) / (coll.qTPCR() * coll.sumAmplFT0C()), collisionCentrality);
17601784
resolution.fill(HIST("QVectorsNormT0CTPCC"), eventplaneVecT0C.Dot(eventplaneVecTPCC) / (coll.qTPCL() * coll.sumAmplFT0C()), collisionCentrality);
17611785
resolution.fill(HIST("QVectorsNormTPCAC"), eventplaneVecTPCA.Dot(eventplaneVecTPCC) / (coll.qTPCR() * coll.qTPCL()), collisionCentrality);
1786+
resolution.fill(HIST("QVectorsNormT0CV0A"), eventplaneVecT0C.Dot(eventplaneVecV0A) / (coll.sumAmplFT0C() * coll.sumAmplFV0A()), collisionCentrality);
17621787

17631788
std::vector<float> bdtScore[nParticles];
17641789
for (auto const& v0 : V0s) {
@@ -1974,7 +1999,7 @@ struct cascadeFlow {
19741999

19752000
if (ShiftConfigs.cfgShiftCorr) {
19762001
psiT0CCorr = ApplyShiftCorrection(coll, psiT0C, shiftprofileFT0C);
1977-
ComputeEPResolutionwShifts(coll, psiT0C, psiTPCA, psiTPCC, shiftprofileFT0C, shiftprofileTPCL, shiftprofileTPCR);
2002+
ComputeEPResolutionwShifts(coll, psiT0C, psiT0C, psiTPCA, psiTPCC, shiftprofileFT0C, shiftprofileTPCL, shiftprofileTPCR, shiftprofileFT0C);
19782003
}
19792004

19802005
histos.fill(HIST("hpsiT0C"), psiT0CCorr);

0 commit comments

Comments
 (0)