@@ -107,60 +107,60 @@ std::unordered_map<int, TH2*> gQyVsTimeZNC;
107107std::unordered_map<int , TProfile3D*> gShiftProfileZNA ;
108108std::unordered_map<int , TProfile3D*> gShiftProfileZNC ;
109109
110- TH1 * gCurrentEventCounter ;
111- TH2 * gCurrentCentroidZNA ;
112- TH2 * gCurrentCentroidZNC ;
113- TH1 * gCurrentPmcZNA ;
114- TH1 * gCurrentPm1ZNA ;
115- TH1 * gCurrentPm2ZNA ;
116- TH1 * gCurrentPm3ZNA ;
117- TH1 * gCurrentPm4ZNA ;
118- TH1 * gCurrentSumZNA ;
119- TH1 * gCurrentPmcZNC ;
120- TH1 * gCurrentPm1ZNC ;
121- TH1 * gCurrentPm2ZNC ;
122- TH1 * gCurrentPm3ZNC ;
123- TH1 * gCurrentPm4ZNC ;
124- TH1 * gCurrentSumZNC ;
125- TH2 * gCurrentQxVsCentZNA ;
126- TH2 * gCurrentQyVsCentZNA ;
127- TH2 * gCurrentQxVsVxZNA ;
128- TH2 * gCurrentQyVsVxZNA ;
129- TH2 * gCurrentQxVsVyZNA ;
130- TH2 * gCurrentQyVsVyZNA ;
131- TH2 * gCurrentQxVsVzZNA ;
132- TH2 * gCurrentQyVsVzZNA ;
133- TH2 * gCurrentQxVsCentZNC ;
134- TH2 * gCurrentQyVsCentZNC ;
135- TH2 * gCurrentQxVsVxZNC ;
136- TH2 * gCurrentQyVsVxZNC ;
137- TH2 * gCurrentQxVsVyZNC ;
138- TH2 * gCurrentQyVsVyZNC ;
139- TH2 * gCurrentQxVsVzZNC ;
140- TH2 * gCurrentQyVsVzZNC ;
141- TH2 * gCurrentQxQyVsCent ;
142- TH2 * gCurrentQyQxVsCent ;
143- TH2 * gCurrentQxQxVsCent ;
144- TH2 * gCurrentQyQyVsCent ;
145-
146- THn* gCurrentQxZNA ;
147- THn* gCurrentQyZNA ;
148- THn* gCurrentQxZNC ;
149- THn* gCurrentQyZNC ;
150-
151- TH1 * gCurrentPsiZNA ;
152- TH1 * gCurrentPsiZNC ;
153-
154- TH1 * gCurrentVx ;
155- TH1 * gCurrentVy ;
156-
157- TH2 * gCurrentQxVsTimeZNA ;
158- TH2 * gCurrentQyVsTimeZNA ;
159- TH2 * gCurrentQxVsTimeZNC ;
160- TH2 * gCurrentQyVsTimeZNC ;
161-
162- TProfile3D* gCurrentShiftProfileZNA ;
163- TProfile3D* gCurrentShiftProfileZNC ;
110+ TH1 * gCurrentEventCounter { nullptr } ;
111+ TH2 * gCurrentCentroidZNA { nullptr } ;
112+ TH2 * gCurrentCentroidZNC { nullptr } ;
113+ TH1 * gCurrentPmcZNA { nullptr } ;
114+ TH1 * gCurrentPm1ZNA { nullptr } ;
115+ TH1 * gCurrentPm2ZNA { nullptr } ;
116+ TH1 * gCurrentPm3ZNA { nullptr } ;
117+ TH1 * gCurrentPm4ZNA { nullptr } ;
118+ TH1 * gCurrentSumZNA { nullptr } ;
119+ TH1 * gCurrentPmcZNC { nullptr } ;
120+ TH1 * gCurrentPm1ZNC { nullptr } ;
121+ TH1 * gCurrentPm2ZNC { nullptr } ;
122+ TH1 * gCurrentPm3ZNC { nullptr } ;
123+ TH1 * gCurrentPm4ZNC { nullptr } ;
124+ TH1 * gCurrentSumZNC { nullptr } ;
125+ TH2 * gCurrentQxVsCentZNA { nullptr } ;
126+ TH2 * gCurrentQyVsCentZNA { nullptr } ;
127+ TH2 * gCurrentQxVsVxZNA { nullptr } ;
128+ TH2 * gCurrentQyVsVxZNA { nullptr } ;
129+ TH2 * gCurrentQxVsVyZNA { nullptr } ;
130+ TH2 * gCurrentQyVsVyZNA { nullptr } ;
131+ TH2 * gCurrentQxVsVzZNA { nullptr } ;
132+ TH2 * gCurrentQyVsVzZNA { nullptr } ;
133+ TH2 * gCurrentQxVsCentZNC { nullptr } ;
134+ TH2 * gCurrentQyVsCentZNC { nullptr } ;
135+ TH2 * gCurrentQxVsVxZNC { nullptr } ;
136+ TH2 * gCurrentQyVsVxZNC { nullptr } ;
137+ TH2 * gCurrentQxVsVyZNC { nullptr } ;
138+ TH2 * gCurrentQyVsVyZNC { nullptr } ;
139+ TH2 * gCurrentQxVsVzZNC { nullptr } ;
140+ TH2 * gCurrentQyVsVzZNC { nullptr } ;
141+ TH2 * gCurrentQxQyVsCent { nullptr } ;
142+ TH2 * gCurrentQyQxVsCent { nullptr } ;
143+ TH2 * gCurrentQxQxVsCent { nullptr } ;
144+ TH2 * gCurrentQyQyVsCent { nullptr } ;
145+
146+ THn* gCurrentQxZNA { nullptr } ;
147+ THn* gCurrentQyZNA { nullptr } ;
148+ THn* gCurrentQxZNC { nullptr } ;
149+ THn* gCurrentQyZNC { nullptr } ;
150+
151+ TH1 * gCurrentPsiZNA { nullptr } ;
152+ TH1 * gCurrentPsiZNC { nullptr } ;
153+
154+ TH1 * gCurrentVx { nullptr } ;
155+ TH1 * gCurrentVy { nullptr } ;
156+
157+ TH2 * gCurrentQxVsTimeZNA { nullptr } ;
158+ TH2 * gCurrentQyVsTimeZNA { nullptr } ;
159+ TH2 * gCurrentQxVsTimeZNC { nullptr } ;
160+ TH2 * gCurrentQyVsTimeZNC { nullptr } ;
161+
162+ TProfile3D* gCurrentShiftProfileZNA { nullptr } ;
163+ TProfile3D* gCurrentShiftProfileZNC { nullptr } ;
164164
165165} // namespace
166166
@@ -380,7 +380,7 @@ struct ZdcExtraTableReader {
380380 calibCache.clear ();
381381 }
382382
383- void initHistos (const int & runNumber)
383+ void initHistos (const int runNumber)
384384 {
385385 if (runNumber == currentRunNumber) {
386386 return ;
@@ -533,14 +533,14 @@ struct ZdcExtraTableReader {
533533 }
534534
535535 // Optimized method to load ALL calibrations for the new run at once
536- void loadCalibrations (int run )
536+ void loadCalibrations (int runNumber )
537537 {
538538 clearCache ();
539539
540540 // Vertex Calibration
541541 if (applyBeamSpotCorrection) {
542542 std::string folder = Form (" %s/step0" , qRecenteringCcdb.value .c_str ());
543- auto * lst = ccdb->getForRun <TList>(folder, run );
543+ auto * lst = ccdb->getForRun <TList>(folder, runNumber );
544544 if (lst) {
545545 hMeanVx = safeClone<TH1 >(lst->FindObject (" hMeanVx" ));
546546 hMeanVy = safeClone<TH1 >(lst->FindObject (" hMeanVy" ));
@@ -558,7 +558,7 @@ struct ZdcExtraTableReader {
558558
559559 // Load 5D (Base)
560560 std::string folderBase = Form (" %s/step%d_base" , qRecenteringCcdb.value .c_str (), step);
561- auto * lstBase = ccdb->getForRun <TList>(folderBase, run );
561+ auto * lstBase = ccdb->getForRun <TList>(folderBase, runNumber );
562562
563563 if (!lstBase) {
564564 LOGF (error, " >> CCDB TList is NULL for path: %s. Check object type (TList vs TFile)." , folderBase.c_str ());
@@ -573,7 +573,7 @@ struct ZdcExtraTableReader {
573573 // Load 1D (Refine)
574574 if ((step != calibrationStep) || isFineCalibrationStep) {
575575 std::string folderRefine = Form (" %s/step%d_refine" , qRecenteringCcdb.value .c_str (), step);
576- auto * lstRefine = ccdb->getForRun <TList>(folderRefine, run );
576+ auto * lstRefine = ccdb->getForRun <TList>(folderRefine, runNumber );
577577
578578 if (!lstRefine) {
579579 LOGF (error, " >> CCDB TList is NULL for path: %s. Check object type (TList vs TFile)." , folderRefine.c_str ());
@@ -605,10 +605,10 @@ struct ZdcExtraTableReader {
605605 if (applyShiftCorrection) {
606606 std::string folder = Form (" %s/psiHarm" , qRecenteringCcdb.value .c_str ());
607607
608- LOGF (info, " ZDC Analysis: Loading Shift Correction from %s for run %d" , folder.c_str (), run );
608+ // LOGF(info, "Loading Shift Correction from %s for runNumber %d", folder.c_str(), runNumber );
609609
610610 // Attempt to fetch TList from CCDB
611- auto * lst = ccdb->getForRun <TList>(folder, run );
611+ auto * lst = ccdb->getForRun <TList>(folder, runNumber );
612612
613613 if (!lst) {
614614 LOGF (error, " >> CCDB TList is NULL for path: %s. Check object type (TList vs TFile)." , folder.c_str ());
@@ -652,7 +652,7 @@ struct ZdcExtraTableReader {
652652 ccdb->setFatalWhenNull (false );
653653 } // end of init()
654654
655- void process (aod::ZdcExtras::iterator const & zdc /* collision */ )
655+ void process (aod::ZdcExtras::iterator const & zdc)
656656 {
657657
658658 // Apply event selection
@@ -682,15 +682,6 @@ struct ZdcExtraTableReader {
682682 return ;
683683 }
684684
685- // LOGF(info, "zvtx = %d", TESTBIT(zdc.selectionBits(), ZVtxCut));
686- // LOGF(info, "Sel8 = %d", TESTBIT(zdc.selectionBits(), Sel8));
687- // LOGF(info, "occupancy = %d", TESTBIT(zdc.selectionBits(), OccupancyCut));
688- // LOGF(info, "noSameBC = %d", TESTBIT(zdc.selectionBits(), NoSameBunchPileup));
689- // LOGF(info, "FT0vsPV = %d", TESTBIT(zdc.selectionBits(), IsGoodZvtxFT0vsPV));
690- // LOGF(info, "noCollTR = %d", TESTBIT(zdc.selectionBits(), NoCollInTimeRangeStandard));
691- // LOGF(info, "vtxITSTPC = %d", TESTBIT(zdc.selectionBits(), IsVertexITSTPC));
692- // LOGF(info, "ITS layers = %d", TESTBIT(zdc.selectionBits(), IsGoodITSLayersAll));
693-
694685 const int runNumber = zdc.runNumber ();
695686
696687 const uint64_t timestamp = zdc.timestamp (); // in milliseconds
@@ -723,7 +714,7 @@ struct ZdcExtraTableReader {
723714 }
724715
725716 bool isZNChit = false , isZNAhit = false ;
726- //
717+
727718 double tdcZNC = zdc.zncTdc ();
728719 double tdcZNA = zdc.znaTdc ();
729720
@@ -742,8 +733,7 @@ struct ZdcExtraTableReader {
742733 isZNAhit = true ;
743734 }
744735 }
745- //
746-
736+
747737 bool isZNASpDeterminable = false ;
748738 bool isZNCSpDeterminable = false ;
749739
@@ -789,15 +779,12 @@ struct ZdcExtraTableReader {
789779
790780 double qxZNArec = 0 ., qyZNArec = 0 .;
791781 double qxZNCrec = 0 ., qyZNCrec = 0 .;
792-
793- //
782+
794783 double cent = zdc.centrality ();
795784 double vx = zdc.vx ();
796785 double vy = zdc.vy ();
797786 double vz = zdc.vz ();
798787
799- // double vx_corrected = vx;
800- // double vy_corrected = vy;
801788
802789 if (applyBeamSpotCorrection) {
803790 // Use cached vertex pointers
@@ -814,8 +801,7 @@ struct ZdcExtraTableReader {
814801
815802 qxZNArec = qx;
816803 qyZNArec = qy;
817-
818- //
804+
819805 for (int step = 1 ; step <= calibrationStep; step++) {
820806
821807 int cacheIdx = step - 1 ;
@@ -937,27 +923,20 @@ struct ZdcExtraTableReader {
937923
938924 qxZNCrec = qx;
939925 qyZNCrec = qy;
940-
941- // LOGF(info, "Qx init = %f", qxZNCrec);
942-
926+
943927 // Iterate through steps using cached vector
944928 for (int step = 1 ; step <= calibrationStep; step++) {
945929
946930 int cacheIdx = step - 1 ;
947931 if (cacheIdx >= static_cast <int >(calibCache.size ()))
948932 continue ;
949-
950- // LOGF(info, "Go to step = %d", step);
951-
933+
952934 const auto & calib = calibCache[cacheIdx];
953935
954936 // Apply 5D Base calibration
955937 if (calib.hMeanQxZNC && calib.hMeanQyZNC ) {
956938 qxZNCrec -= getMeanQFromMap (calib.hMeanQxZNC , cent, vx, vy, vz);
957939 qyZNCrec -= getMeanQFromMap (calib.hMeanQyZNC , cent, vx, vy, vz);
958-
959- // LOGF(info, "Go to base calibration step = %d", step);
960- // LOGF(info, "Qx after base calibration step %d = %f", step, qxZNCrec);
961940 }
962941
963942 if ((step != calibrationStep) || isFineCalibrationStep) {
@@ -974,16 +953,12 @@ struct ZdcExtraTableReader {
974953
975954 qxZNCrec -= getMeanQ1D (calib.hMeanQxVyZNC , vy);
976955 qyZNCrec -= getMeanQ1D (calib.hMeanQyVyZNC , vy);
977- // LOGF(info, "Go to refine calibration step = %d", step);
978- // LOGF(info, "Qx after fine calibration step %d = %f", step, qxZNCrec);
979956 }
980957 }
981958
982959 double valuesQxZNC[5 ] = {cent, vx, vy, vz, qxZNCrec};
983960 double valuesQyZNC[5 ] = {cent, vx, vy, vz, qyZNCrec};
984-
985- // LOGF(info, "Qx cal = %f", qxZNCrec);
986-
961+
987962 gCurrentCentroidZNC ->Fill (qxZNCrec, qyZNCrec);
988963
989964 gCurrentQxVsCentZNC ->Fill (cent, qxZNCrec);
0 commit comments