1515// / \author Chiara De Martin (chiara.de.martin@cern.ch)
1616// / \author Maximiliano Puccio (maximiliano.puccio@cern.ch)
1717
18- #include < vector>
19- #include < string>
20- #include < memory>
21- #include " Math/Vector3D.h"
22- #include " TRandom3.h"
18+ #include " PWGLF/DataModel/LFStrangenessPIDTables.h"
19+ #include " PWGLF/DataModel/LFStrangenessTables.h"
20+ #include " PWGLF/DataModel/cascqaanalysis.h"
21+
2322#include " Common/DataModel/Centrality.h"
2423#include " Common/DataModel/EventSelection.h"
2524#include " Common/DataModel/Multiplicity.h"
2625#include " Common/DataModel/PIDResponse.h"
2726#include " Common/DataModel/TrackSelectionTables.h"
28- #include " Framework/AnalysisTask.h"
27+ #include " Tools/ML/MlResponse.h"
28+
29+ #include " CCDB/BasicCCDBManager.h"
2930#include " Framework/ASoAHelpers.h"
31+ #include " Framework/AnalysisTask.h"
3032#include " Framework/O2DatabasePDGPlugin.h"
3133#include " Framework/runDataProcessing.h"
32- #include " PWGLF/DataModel/cascqaanalysis.h"
33- #include " PWGLF/DataModel/LFStrangenessTables.h"
34- #include " PWGLF/DataModel/LFStrangenessPIDTables.h"
35- #include " Tools/ML/MlResponse.h"
36- #include " CCDB/BasicCCDBManager.h"
34+
35+ #include " Math/Vector3D.h"
36+ #include " TRandom3.h"
37+
38+ #include < memory>
39+ #include < string>
40+ #include < vector>
3741
3842using namespace o2 ;
3943using namespace o2 ::framework;
@@ -171,12 +175,18 @@ struct cascadeFlow {
171175 ConfigurableAxis axisQVsNorm{" axisQVsNorm" , {200 , -1 .f , 1 .f }, " axisQVsNorm" };
172176
173177 // Configurable for shift correction
174- Configurable<bool > cfgShiftCorr{" cfgShiftCorr" , 0 , " " };
175- Configurable<std::string> cfgShiftPath{" cfgShiftPath" , " Users/j/junlee/Qvector/QvecCalib/Shift" , " Path for Shift" };
176- Configurable<int > cfgnMods{" cfgnMods" , 1 , " The number of modulations of interest starting from 2" };
178+ struct : ConfigurableGroup {
179+ Configurable<bool > cfgShiftCorr{" cfgShiftCorr" , 0 , " " };
180+ Configurable<std::string> cfgShiftPath{" cfgShiftPath" , " Users/j/junlee/Qvector/QvecCalib/Shift" , " Path for Shift" };
181+ Configurable<std::string> cfgShiftPathFT0C{" cfgShiftPathFT0C" , " Users/j/junlee/Qvector/QvecCalib/Shift" , " Path for Shift" };
182+ Configurable<std::string> cfgShiftPathTPCL{" cfgShiftPathTPCL" , " Users/j/junlee/Qvector/QvecCalib/Shift" , " Path for Shift" };
183+ Configurable<std::string> cfgShiftPathTPCR{" cfgShiftPathTPCR" , " Users/j/junlee/Qvector/QvecCalib/Shift" , " Path for Shift" };
184+ Configurable<int > cfgnMods{" cfgnMods" , 1 , " The number of modulations of interest starting from 2" };
185+ } ShiftConfigs;
177186 // Configurable<float> cfgHarmonic{"cfgHarmonic", 2, "Harmonic for event plane calculation"};
178187
179188 // THN axes
189+ struct : ConfigurableGroup {
180190 ConfigurableAxis thnConfigAxisFT0C{" thnConfigAxisFT0C" , {8 , 0 , 80 }, " FT0C centrality (%)" };
181191 ConfigurableAxis thnConfigAxisEta{" thnConfigAxisEta" , {8 , -0.8 , 0.8 }, " pseudorapidity" };
182192 ConfigurableAxis thnConfigAxisPt{" thnConfigAxisPt" , {VARIABLE_WIDTH, 0.8 , 1.0 , 1.2 , 1.4 , 1.6 , 1.8 , 2 , 2.25 , 2.5 , 2.75 , 3 , 3.5 , 4 , 5 , 6 , 8 , 10 }, " #it{p}_{T} (GeV/#it{c})" };
@@ -196,6 +206,7 @@ struct cascadeFlow {
196206 ConfigurableAxis thnConfigAxisCosThetaXiAlpha{" thnConfigAxisCosThetaXiAlpha" , {200 , -2.8 , 2.8 }, " " };
197207 ConfigurableAxis thnConfigAxisCosThetaOmegaAlpha{" thnConfigAxisCosThetaOmegaAlpha" , {200 , -70 , 70 }, " " };
198208 ConfigurableAxis thnConfigAxisCosThetaProtonAlpha{" thnConfigAxisCosThetaProtonAlpha" , {200 , -2 , 2 }, " " };
209+ } thnAxisConfigs;
199210
200211 // Event selection criteria
201212 Configurable<float > cutzvertex{" cutzvertex" , 10 .0f , " Accepted z-vertex range (cm)" };
@@ -473,7 +484,13 @@ struct cascadeFlow {
473484 int currentRunNumber = -999 ;
474485 int lastRunNumber = -999 ;
475486 std::vector<TProfile3D*> shiftprofile{};
487+ std::vector<TProfile3D*> shiftprofileFT0C{};
488+ std::vector<TProfile3D*> shiftprofileTPCL{};
489+ std::vector<TProfile3D*> shiftprofileTPCR{};
476490 std::string fullCCDBShiftCorrPath;
491+ std::string fullCCDBShiftCorrPathFT0C;
492+ std::string fullCCDBShiftCorrPathTPCL;
493+ std::string fullCCDBShiftCorrPathTPCR;
477494
478495 template <typename TCollision>
479496 double ApplyShiftCorrection (TCollision coll, double psiT0C)
@@ -775,25 +792,25 @@ struct cascadeFlow {
775792 histos.add (" hv1EPvsv1SP" , " hV1EPvsV1SP" , HistType::kTH2F , {{100 , -1 , 1 }, {100 , -1 , 1 }});
776793 histos.add (" hv1SP_ZDCA_vs_ZDCC" , " hv1SP_ZDCA_vs_ZDCC" , HistType::kTH2F , {{100 , -1 , 1 }, {100 , -1 , 1 }});
777794
778- const AxisSpec thnAxisFT0C{thnConfigAxisFT0C, " FT0C (%)" };
779- const AxisSpec thnAxisEta{thnConfigAxisEta, " #eta" };
780- const AxisSpec thnAxisPt{thnConfigAxisPt, " p_{T}" };
781- const AxisSpec thnAxisPtLambda{thnConfigAxisPtLambda, " p_{T, #Lambda}" };
782- const AxisSpec thnAxisCharge{thnConfigAxisCharge, " Charge" };
783- const AxisSpec thnAxisPsiDiff{thnConfigAxisPsiDiff, " 2(phi-Psi)" };
784- const AxisSpec thnAxisMassXi{thnConfigAxisMassXi, " inv. mass (#Lambda #pi) (GeV/#it{c}^{2})" };
785- const AxisSpec thnAxisMassOmega{thnConfigAxisMassOmega, " inv. mass (#Lambda K) (GeV/#it{c}^{2})" };
786- const AxisSpec thnAxisMassLambda{thnConfigAxisMassLambda, " inv. mass (p #pi) (GeV/#it{c}^{2})" };
787- const AxisSpec thnAxisBDTScore{thnConfigAxisBDTScore, " BDT score" };
788- const AxisSpec thnAxisV2{thnConfigAxisV2, " v_{2}" };
789- const AxisSpec thnAxisPzs2Xi{thnConfigAxisPzs2Xi, " Pzs2Xi" };
790- const AxisSpec thnAxisPzs2Omega{thnConfigAxisPzs2Omega, " Pzs2Omega" };
791- const AxisSpec thnAxisPzs2Lambda{thnConfigAxisPzs2Lambda, " Pzs2Lambda" };
792- const AxisSpec thnAxisCos2Theta{thnConfigAxisCos2Theta, " Cos2Theta" };
793- const AxisSpec thnAxisCos2ThetaL{thnConfigAxisCos2ThetaL, " Cos2ThetaL" };
794- const AxisSpec thnAxisCosThetaXiAlpha{thnConfigAxisCosThetaXiAlpha, " CosThetaXiWithAlpha" };
795- const AxisSpec thnAxisCosThetaOmegaAlpha{thnConfigAxisCosThetaOmegaAlpha, " CosThetaOmegaWithAlpha" };
796- const AxisSpec thnAxisCosThetaProtonAlpha{thnConfigAxisCosThetaProtonAlpha, " CosThetaProtonWithAlpha" };
795+ const AxisSpec thnAxisFT0C{thnAxisConfigs. thnConfigAxisFT0C , " FT0C (%)" };
796+ const AxisSpec thnAxisEta{thnAxisConfigs. thnConfigAxisEta , " #eta" };
797+ const AxisSpec thnAxisPt{thnAxisConfigs. thnConfigAxisPt , " p_{T}" };
798+ const AxisSpec thnAxisPtLambda{thnAxisConfigs. thnConfigAxisPtLambda , " p_{T, #Lambda}" };
799+ const AxisSpec thnAxisCharge{thnAxisConfigs. thnConfigAxisCharge , " Charge" };
800+ const AxisSpec thnAxisPsiDiff{thnAxisConfigs. thnConfigAxisPsiDiff , " 2(phi-Psi)" };
801+ const AxisSpec thnAxisMassXi{thnAxisConfigs. thnConfigAxisMassXi , " inv. mass (#Lambda #pi) (GeV/#it{c}^{2})" };
802+ const AxisSpec thnAxisMassOmega{thnAxisConfigs. thnConfigAxisMassOmega , " inv. mass (#Lambda K) (GeV/#it{c}^{2})" };
803+ const AxisSpec thnAxisMassLambda{thnAxisConfigs. thnConfigAxisMassLambda , " inv. mass (p #pi) (GeV/#it{c}^{2})" };
804+ const AxisSpec thnAxisBDTScore{thnAxisConfigs. thnConfigAxisBDTScore , " BDT score" };
805+ const AxisSpec thnAxisV2{thnAxisConfigs. thnConfigAxisV2 , " v_{2}" };
806+ const AxisSpec thnAxisPzs2Xi{thnAxisConfigs. thnConfigAxisPzs2Xi , " Pzs2Xi" };
807+ const AxisSpec thnAxisPzs2Omega{thnAxisConfigs. thnConfigAxisPzs2Omega , " Pzs2Omega" };
808+ const AxisSpec thnAxisPzs2Lambda{thnAxisConfigs. thnConfigAxisPzs2Lambda , " Pzs2Lambda" };
809+ const AxisSpec thnAxisCos2Theta{thnAxisConfigs. thnConfigAxisCos2Theta , " Cos2Theta" };
810+ const AxisSpec thnAxisCos2ThetaL{thnAxisConfigs. thnConfigAxisCos2ThetaL , " Cos2ThetaL" };
811+ const AxisSpec thnAxisCosThetaXiAlpha{thnAxisConfigs. thnConfigAxisCosThetaXiAlpha , " CosThetaXiWithAlpha" };
812+ const AxisSpec thnAxisCosThetaOmegaAlpha{thnAxisConfigs. thnConfigAxisCosThetaOmegaAlpha , " CosThetaOmegaWithAlpha" };
813+ const AxisSpec thnAxisCosThetaProtonAlpha{thnAxisConfigs. thnConfigAxisCosThetaProtonAlpha , " CosThetaProtonWithAlpha" };
797814
798815 histos.add (" massXi_ProtonAcc" , " massXi" , HistType::kTH1F , {thnAxisMassXi});
799816 histos.add (" massOmega_ProtonAcc" , " massOmega" , HistType::kTH1F , {thnAxisMassOmega});
@@ -1059,21 +1076,26 @@ struct cascadeFlow {
10591076 histos.fill (HIST (" ShiftTPCR" ), coll.centFT0C (), 1.5 , ishift - 0.5 , std::cos (ishift * 2 * psiTPCC));
10601077 }
10611078
1062- if (cfgShiftCorr) {
1079+ if (ShiftConfigs. cfgShiftCorr ) {
10631080 currentRunNumber = coll.runNumber ();
10641081 if (currentRunNumber != lastRunNumber) {
1065- shiftprofile.clear ();
1066- for (int i = 2 ; i < cfgnMods + 2 ; i++) {
1067- fullCCDBShiftCorrPath = cfgShiftPath;
1068- fullCCDBShiftCorrPath += " /v" ;
1069- fullCCDBShiftCorrPath += std::to_string (i);
1070- auto objshift = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPath, coll.timestamp ());
1071- shiftprofile.push_back (objshift);
1072- }
1082+ shiftprofileFT0C.clear ();
1083+ shiftprofileTPCL.clear ();
1084+ shiftprofileTPCR.clear ();
1085+ fullCCDBShiftCorrPathFT0C = ShiftConfigs.cfgShiftPathFT0C ;
1086+ fullCCDBShiftCorrPathTPCL = ShiftConfigs.cfgShiftPathTPCL ;
1087+ fullCCDBShiftCorrPathTPCR = ShiftConfigs.cfgShiftPathTPCR ;
1088+ auto objshiftFT0C = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathFT0C, coll.timestamp ());
1089+ shiftprofileFT0C.push_back (objshiftFT0C);
1090+ auto objshiftTPCL = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathTPCL, coll.timestamp ());
1091+ shiftprofileTPCL.push_back (objshiftTPCL);
1092+ auto objshiftTPCR = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathTPCR, coll.timestamp ());
1093+ shiftprofileTPCR.push_back (objshiftTPCR);
10731094 lastRunNumber = currentRunNumber;
10741095 }
10751096 }
1076- if (cfgShiftCorr) {
1097+
1098+ if (ShiftConfigs.cfgShiftCorr ) {
10771099 psiT0CCorr = ApplyShiftCorrection (coll, psiT0C);
10781100 ComputeEPResolutionwShifts (coll, psiT0C, psiTPCA, psiTPCC);
10791101 }
@@ -1373,21 +1395,25 @@ struct cascadeFlow {
13731395 histos.fill (HIST (" ShiftTPCR" ), coll.centFT0C (), 1.5 , ishift - 0.5 , std::cos (ishift * 2 * psiTPCC));
13741396 }
13751397
1376- if (cfgShiftCorr) {
1398+ if (ShiftConfigs. cfgShiftCorr ) {
13771399 currentRunNumber = coll.runNumber ();
13781400 if (currentRunNumber != lastRunNumber) {
1379- shiftprofile.clear ();
1380- for (int i = 2 ; i < cfgnMods + 2 ; i++) {
1381- fullCCDBShiftCorrPath = cfgShiftPath;
1382- fullCCDBShiftCorrPath += " /v" ;
1383- fullCCDBShiftCorrPath += std::to_string (i);
1384- auto objshift = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPath, coll.timestamp ());
1385- shiftprofile.push_back (objshift);
1386- }
1401+ shiftprofileFT0C.clear ();
1402+ shiftprofileTPCL.clear ();
1403+ shiftprofileTPCR.clear ();
1404+ fullCCDBShiftCorrPathFT0C = ShiftConfigs.cfgShiftPathFT0C ;
1405+ fullCCDBShiftCorrPathTPCL = ShiftConfigs.cfgShiftPathTPCL ;
1406+ fullCCDBShiftCorrPathTPCR = ShiftConfigs.cfgShiftPathTPCR ;
1407+ auto objshiftFT0C = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathFT0C, coll.timestamp ());
1408+ shiftprofileFT0C.push_back (objshiftFT0C);
1409+ auto objshiftTPCL = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathTPCL, coll.timestamp ());
1410+ shiftprofileTPCL.push_back (objshiftTPCL);
1411+ auto objshiftTPCR = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathTPCR, coll.timestamp ());
1412+ shiftprofileTPCR.push_back (objshiftTPCR);
13871413 lastRunNumber = currentRunNumber;
13881414 }
13891415 }
1390- if (cfgShiftCorr) {
1416+ if (ShiftConfigs. cfgShiftCorr ) {
13911417 psiT0CCorr = ApplyShiftCorrection (coll, psiT0C);
13921418 ComputeEPResolutionwShifts (coll, psiT0C, psiTPCA, psiTPCC);
13931419 }
@@ -1674,21 +1700,25 @@ struct cascadeFlow {
16741700 histos.fill (HIST (" ShiftTPCR" ), coll.centFT0C (), 1.5 , ishift - 0.5 , std::cos (ishift * 2 * psiTPCC));
16751701 }
16761702
1677- if (cfgShiftCorr) {
1703+ if (ShiftConfigs. cfgShiftCorr ) {
16781704 currentRunNumber = coll.runNumber ();
16791705 if (currentRunNumber != lastRunNumber) {
1680- shiftprofile.clear ();
1681- for (int i = 2 ; i < cfgnMods + 2 ; i++) {
1682- fullCCDBShiftCorrPath = cfgShiftPath;
1683- fullCCDBShiftCorrPath += " /v" ;
1684- fullCCDBShiftCorrPath += std::to_string (i);
1685- auto objshift = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPath, coll.timestamp ());
1686- shiftprofile.push_back (objshift);
1687- }
1706+ shiftprofileFT0C.clear ();
1707+ shiftprofileTPCL.clear ();
1708+ shiftprofileTPCR.clear ();
1709+ fullCCDBShiftCorrPathFT0C = ShiftConfigs.cfgShiftPathFT0C ;
1710+ fullCCDBShiftCorrPathTPCL = ShiftConfigs.cfgShiftPathTPCL ;
1711+ fullCCDBShiftCorrPathTPCR = ShiftConfigs.cfgShiftPathTPCR ;
1712+ auto objshiftFT0C = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathFT0C, coll.timestamp ());
1713+ shiftprofileFT0C.push_back (objshiftFT0C);
1714+ auto objshiftTPCL = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathTPCL, coll.timestamp ());
1715+ shiftprofileTPCL.push_back (objshiftTPCL);
1716+ auto objshiftTPCR = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathTPCR, coll.timestamp ());
1717+ shiftprofileTPCR.push_back (objshiftTPCR);
16881718 lastRunNumber = currentRunNumber;
16891719 }
16901720 }
1691- if (cfgShiftCorr) {
1721+ if (ShiftConfigs. cfgShiftCorr ) {
16921722 psiT0CCorr = ApplyShiftCorrection (coll, psiT0C);
16931723 ComputeEPResolutionwShifts (coll, psiT0C, psiTPCA, psiTPCC);
16941724 }
@@ -1902,21 +1932,25 @@ struct cascadeFlow {
19021932 histos.fill (HIST (" ShiftTPCR" ), coll.centFT0C (), 1.5 , ishift - 0.5 , std::cos (ishift * 2 * psiTPCC));
19031933 }
19041934
1905- if (cfgShiftCorr) {
1935+ if (ShiftConfigs. cfgShiftCorr ) {
19061936 currentRunNumber = coll.runNumber ();
19071937 if (currentRunNumber != lastRunNumber) {
1908- shiftprofile.clear ();
1909- for (int i = 2 ; i < cfgnMods + 2 ; i++) {
1910- fullCCDBShiftCorrPath = cfgShiftPath;
1911- fullCCDBShiftCorrPath += " /v" ;
1912- fullCCDBShiftCorrPath += std::to_string (i);
1913- auto objshift = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPath, coll.timestamp ());
1914- shiftprofile.push_back (objshift);
1915- }
1938+ shiftprofileFT0C.clear ();
1939+ shiftprofileTPCL.clear ();
1940+ shiftprofileTPCR.clear ();
1941+ fullCCDBShiftCorrPathFT0C = ShiftConfigs.cfgShiftPathFT0C ;
1942+ fullCCDBShiftCorrPathTPCL = ShiftConfigs.cfgShiftPathTPCL ;
1943+ fullCCDBShiftCorrPathTPCR = ShiftConfigs.cfgShiftPathTPCR ;
1944+ auto objshiftFT0C = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathFT0C, coll.timestamp ());
1945+ shiftprofileFT0C.push_back (objshiftFT0C);
1946+ auto objshiftTPCL = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathTPCL, coll.timestamp ());
1947+ shiftprofileTPCL.push_back (objshiftTPCL);
1948+ auto objshiftTPCR = ccdb->getForTimeStamp <TProfile3D>(fullCCDBShiftCorrPathTPCR, coll.timestamp ());
1949+ shiftprofileTPCR.push_back (objshiftTPCR);
19161950 lastRunNumber = currentRunNumber;
19171951 }
19181952 }
1919- if (cfgShiftCorr) {
1953+ if (ShiftConfigs. cfgShiftCorr ) {
19201954 psiT0CCorr = ApplyShiftCorrection (coll, psiT0C);
19211955 ComputeEPResolutionwShifts (coll, psiT0C, psiTPCA, psiTPCC);
19221956 }
0 commit comments