Skip to content

Commit 9b35b9f

Browse files
authored
[Common] Add QA printouts for checking
1 parent feb3aa3 commit 9b35b9f

1 file changed

Lines changed: 28 additions & 10 deletions

File tree

Common/Tasks/centralityStudypp.cxx

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,23 +208,41 @@ struct centralityStudypp {
208208
}
209209

210210
if (doCentralityQA.value) {
211-
// acquire vertex-Z equalization histograms if requested
212-
LOGF(info, "Acquiring vertex-Z profiles for run %i", mRunNumber);
211+
LOGF(info, "Acquiring centrality calibration for run %i", mRunNumber);
213212
TList* hCentralityObjects = nullptr;
214213
hCentralityObjects = ccdb->getForRun<TList>(pathCentrality, mRunNumber);
215214

216-
hCentralityFV0A = dynamic_cast<TProfile*>(hCentralityObjects->FindObject("hCalibZeqFV0"));
217-
hCentralityFT0A = dynamic_cast<TProfile*>(hCentralityObjects->FindObject("hCalibZeqFT0A"));
218-
hCentralityFT0C = dynamic_cast<TProfile*>(hCentralityObjects->FindObject("hCalibZeqFT0C"));
219-
hCentralityFT0M = dynamic_cast<TProfile*>(hCentralityObjects->FindObject("hCalibZeqFT0"));
220-
hCentralityFDDM = dynamic_cast<TProfile*>(hCentralityObjects->FindObject("hCalibZeqFDD"));
221-
hCentralityNTPV = dynamic_cast<TProfile*>(hCentralityObjects->FindObject("hCalibZeqNTracksPV"));
222-
hCentralityNGlo = dynamic_cast<TProfile*>(hCentralityObjects->FindObject("hCalibZeqNGlobal"));
223-
hCentralityMFT = dynamic_cast<TProfile*>(hCentralityObjects->FindObject("hCalibZeqMFT"));
215+
hCentralityFV0A = dynamic_cast<TH1*>(hCentralityObjects->FindObject("hCalibZeqFV0"));
216+
hCentralityFT0A = dynamic_cast<TH1*>(hCentralityObjects->FindObject("hCalibZeqFT0A"));
217+
hCentralityFT0C = dynamic_cast<TH1*>(hCentralityObjects->FindObject("hCalibZeqFT0C"));
218+
hCentralityFT0M = dynamic_cast<TH1*>(hCentralityObjects->FindObject("hCalibZeqFT0"));
219+
hCentralityFDDM = dynamic_cast<TH1*>(hCentralityObjects->FindObject("hCalibZeqFDD"));
220+
hCentralityNTPV = dynamic_cast<TH1*>(hCentralityObjects->FindObject("hCalibZeqNTracksPV"));
221+
hCentralityNGlo = dynamic_cast<TH1*>(hCentralityObjects->FindObject("hCalibZeqNGlobal"));
222+
hCentralityMFT = dynamic_cast<TH1*>(hCentralityObjects->FindObject("hCalibZeqMFT"));
224223

225224
// won't capture null pointers -> explicitly check for those when attempting to evaluate
225+
auto reportSuccess = [](TH1* a, TString name) {
226+
if(!a){
227+
LOGF(info, "Calibration missing for %s", name.data());
228+
}else{
229+
LOGF(info, "Calibration loaded for %s", name.Data())
230+
}
231+
};
232+
233+
reportSucess(hCentralityFV0A, "FV0A");
234+
reportSucess(hCentralityFT0A, "FT0A");
235+
reportSucess(hCentralityFT0C, "FT0C");
236+
reportSucess(hCentralityFT0M, "FT0M");
237+
reportSucess(hCentralityFDDM, "FDDM");
238+
reportSucess(hCentralityNTPV, "NTPV");
239+
reportSucess(hCentralityNGlo, "NGlobals");
240+
reportSucess(hCentralityMFT, "MFT");
241+
242+
LOGF(info, "Centrality calibration loading done.")
226243
}
227244

245+
228246
histPath = std::format("Run_{}/", mRunNumber);
229247

230248
histPointers.insert({histPath + "hCollisionSelection", histos.add((histPath + "hCollisionSelection").c_str(), "hCollisionSelection", {kTH1D, {{20, -0.5f, +19.5f}}})});

0 commit comments

Comments
 (0)