@@ -148,7 +148,6 @@ struct ZdcQVectors {
148148 O2_DEFINE_CONFIGURABLE (cfgEvSelsCentMin, float , 0 , " Minimum cenrality for selected events" );
149149 O2_DEFINE_CONFIGURABLE (cfgEvSelsCentMax, float , 90 , " Maximum cenrality for selected events" );
150150
151- O2_DEFINE_CONFIGURABLE (cfgUseShift, bool , false , " Use shift for PsiA and PsiC ZDC" );
152151 O2_DEFINE_CONFIGURABLE (cfgCCDBdir_Shift, std::string, " Users/c/ckoster/ZDC/LHC23_PbPb_pass5/Shift" , " CCDB directory for Shift ZDC" );
153152
154153 // define my.....
@@ -258,10 +257,10 @@ struct ZdcQVectors {
258257 registry.add <TProfile>(" QA/ZNA_Energy" , " ZNA_Energy" , kTProfile , {{8 , 0 , 8 }});
259258 registry.add <TProfile>(" QA/ZNC_Energy" , " ZNC_Energy" , kTProfile , {{8 , 0 , 8 }});
260259
261- registry.add <TH1 >(" QA/psiZDCA" , " psiZDCA" , kTH1D , {{100 , -4 , 4 }});
262- registry.add <TH1 >(" QA/psiZDCA_shift" , " psiZDCA_shift" , kTH1D , {{100 , -4 , 4 }});
263- registry.add <TH1 >(" QA/psiZDCC" , " psiZDCC" , kTH1D , {{100 , -4 , 4 }});
264- registry.add <TH1 >(" QA/psiZDCC_shift" , " psiZDCC_shift" , kTH1D , {{100 , -4 , 4 }});
260+ registry.add <TH2 >(" QA/psiZDCA" , " psiZDCA" , kTH2D , {{100 , -4 , 4 }, { 100 , 0 , 100 }});
261+ registry.add <TH2 >(" QA/psiZDCA_shift" , " psiZDCA_shift" , kTH2D , {{100 , -4 , 4 }, { 100 , 0 , 100 }});
262+ registry.add <TH2 >(" QA/psiZDCC" , " psiZDCC" , kTH2D , {{100 , -4 , 4 }, { 100 , 0 , 100 }});
263+ registry.add <TH2 >(" QA/psiZDCC_shift" , " psiZDCC_shift" , kTH2D , {{100 , -4 , 4 }, { 100 , 0 , 100 }});
265264
266265 registry.add <TProfile>(" QA/before/ZNA_pmC" , " ZNA_pmC" , kTProfile , {{1 , 0 , 1 .}});
267266 registry.add <TProfile>(" QA/before/ZNA_pm1" , " ZNA_pm1" , kTProfile , {{1 , 0 , 1 .}});
@@ -923,7 +922,7 @@ struct ZdcQVectors {
923922 double deltaPsiZDCA = 0 ;
924923 double deltaPsiZDCC = 0 ;
925924
926- if (cfgUseShift && !cfgCCDBdir_Shift.value .empty ()) {
925+ if (!cfgCCDBdir_Shift.value .empty ()) {
927926 if (lastRunNumber != runnumber) {
928927 cal.isShiftProfileFound = false ;
929928 LOGF (info, " Getting shift profile from CCDB for runnumber: %d" , runnumber);
@@ -939,19 +938,21 @@ struct ZdcQVectors {
939938 }
940939 }
941940
942- float coeffshiftxZDCC = 0.0 ;
943- float coeffshiftyZDCC = 0.0 ;
944- float coeffshiftxZDCA = 0.0 ;
945- float coeffshiftyZDCA = 0.0 ;
946-
947941 for (int ishift = 1 ; ishift <= nshift; ishift++) {
948942 registry.fill (HIST (" shift/ShiftZDCC" ), centrality, 0.5 , ishift - 0.5 , std::sin (ishift * 1.0 * psiZDCC));
949943 registry.fill (HIST (" shift/ShiftZDCC" ), centrality, 1.5 , ishift - 0.5 , std::cos (ishift * 1.0 * psiZDCC));
950944 registry.fill (HIST (" shift/ShiftZDCA" ), centrality, 0.5 , ishift - 0.5 , std::sin (ishift * 1.0 * psiZDCA));
951945 registry.fill (HIST (" shift/ShiftZDCA" ), centrality, 1.5 , ishift - 0.5 , std::cos (ishift * 1.0 * psiZDCA));
946+ }
952947
948+ float coeffshiftxZDCC = 0.0 ;
949+ float coeffshiftyZDCC = 0.0 ;
950+ float coeffshiftxZDCA = 0.0 ;
951+ float coeffshiftyZDCA = 0.0 ;
952+
953+ for (int ishift = 1 ; ishift <= nshift; ishift++) {
953954 if (cal.isShiftProfileFound ) {
954- int binshiftxZDCC = cal.shiftprofileC ->FindBin (centrality, 0.5 , ishift - 0.5 );
955+ int binshiftxZDCC = cal.shiftprofileC ->FindBin (centrality, 0.5 , ishift - 0.5 ); // bin 0.5
955956 int binshiftyZDCC = cal.shiftprofileC ->FindBin (centrality, 1.5 , ishift - 0.5 );
956957 int binshiftxZDCA = cal.shiftprofileA ->FindBin (centrality, 0.5 , ishift - 0.5 );
957958 int binshiftyZDCA = cal.shiftprofileA ->FindBin (centrality, 1.5 , ishift - 0.5 );
@@ -965,8 +966,8 @@ struct ZdcQVectors {
965966 if (binshiftyZDCA > 0 )
966967 coeffshiftyZDCA = cal.shiftprofileA ->GetBinContent (binshiftyZDCA);
967968 }
968- deltaPsiZDCC += ((2 / (1.0 * ishift)) * (-coeffshiftxZDCC * std::cos (ishift * 1.0 * psiZDCC) + coeffshiftyZDCC * std::sin (ishift * 1.0 * psiZDCC)));
969- deltaPsiZDCA += ((2 / (1.0 * ishift)) * (-coeffshiftxZDCA * std::cos (ishift * 1.0 * psiZDCA) + coeffshiftyZDCA * std::sin (ishift * 1.0 * psiZDCA)));
969+ deltaPsiZDCC += ((2 / (1.0 * ishift)) * (-1.0 * coeffshiftxZDCC * std::cos (ishift * 1.0 * psiZDCC) + coeffshiftyZDCC * std::sin (ishift * 1.0 * psiZDCC)));
970+ deltaPsiZDCA += ((2 / (1.0 * ishift)) * (-1.0 * coeffshiftxZDCA * std::cos (ishift * 1.0 * psiZDCA) + coeffshiftyZDCA * std::sin (ishift * 1.0 * psiZDCA)));
970971 }
971972
972973 psiZDCCshift += deltaPsiZDCC;
@@ -977,10 +978,10 @@ struct ZdcQVectors {
977978 psiZDCAshift = std::atan2 (std::sin (psiZDCAshift), std::cos (psiZDCAshift));
978979
979980 if (cfgFillCommonRegistry) {
980- registry.fill (HIST (" QA/psiZDCA" ), psiZDCA);
981- registry.fill (HIST (" QA/psiZDCC" ), psiZDCC);
982- registry.fill (HIST (" QA/psiZDCA_shift" ), psiZDCAshift);
983- registry.fill (HIST (" QA/psiZDCC_shift" ), psiZDCCshift);
981+ registry.fill (HIST (" QA/psiZDCA" ), psiZDCA, centrality );
982+ registry.fill (HIST (" QA/psiZDCC" ), psiZDCC, centrality );
983+ registry.fill (HIST (" QA/psiZDCA_shift" ), psiZDCAshift, centrality );
984+ registry.fill (HIST (" QA/psiZDCC_shift" ), psiZDCCshift, centrality );
984985 }
985986
986987 double qXaShift = std::hypot (qRec[1 ], qRec[0 ]) * std::cos (psiZDCAshift);
0 commit comments