diff --git a/macro/qa/run_recoQa.C b/macro/qa/run_recoQa.C index 77bc2ee517e2cb45e24936c74f53056f5c95a383..2ec575767f16e668d1d559f39c6c2fc03e249727 100644 --- a/macro/qa/run_recoQa.C +++ b/macro/qa/run_recoQa.C @@ -2,20 +2,6 @@ SPDX-License-Identifier: GPL-3.0-only Authors: Alexandru Bercuci [committer] */ -// -------------------------------------------------------------------------- -// -// Macro for simulation & reconstruction QA -// -// The following naming conventions are assumed: -// Raw data file: [dataset].event.raw.root -// Transport file: [dataset].tra.root -// Parameter file: [dataset].par.root -// Reconstruction file: [dataset].rec.root -// -// S. Gorbunov 28/09/2020 -// -// -------------------------------------------------------------------------- - // Includes needed for IDE #if !defined(__CLING__) #include "CbmDefs.h" @@ -36,8 +22,30 @@ #include <TStopwatch.h> #endif -void run_recoQa(Int_t nEvents = -1, TString recFile = "2391_node8_0_0000.rec.root", - TString setupName = "mcbm_beam_2022_05_23_nickel", Bool_t bUseMC = kFALSE, Bool_t bUseAlignment = kTRUE) +/** @brief Macro for simulation & reconstruction QA + ** @author Alex Bercuci <abercuci@niham.nipne.ro> + ** @since 22 March 2024 + ** @param nEvents Number of time-slices to process [-1 for all] + ** @param recFile Name of input reconstruction file (with extension .rec.root) + ** @param setup Name of predefined geometry setup + ** @param bUseMC Option to access also MC info if available and generate also pure QA plots + ** @param bUseAlignment Option to access the alignment file used during the reconstruction. This is based on setup name and mCBM parameters repo. + ** + ** This macro generats a list of 2D histograms which can be used to QA the reocnstruction chain + ** from the level of Detector local reconstruction to the level of primary vertex definition. + ** The output can be found under the directory structure "RecoQA" in file with extension + ** .rqa.root. The histograms are organized as function of Detectors/Sensors/Projections. The user + ** is responsible for the moment to provide a grouping of these projections with a relevant + ** meaning and any further post-processing work. + ** + **/ +/* clang-format off */ +void run_recoQa(Int_t nEvents = -1, + TString recFile = "2391_node8_0_0000.rec.root", + TString setupName = "mcbm_beam_2022_05_23_nickel", + Bool_t bUseMC = kFALSE, + Bool_t bUseAlignment = kTRUE) +/* clang-format on */ { // ======================================================================== @@ -166,19 +174,22 @@ void run_recoQa(Int_t nEvents = -1, TString recFile = "2391_node8_0_0000.rec.roo run->AddTask(pCa); // ----- Reco QA -------------------------------------------- - CbmRecoQaTask::Detector* det(nullptr); - CbmRecoQaTask::Detector::View* view(nullptr); CbmRecoQaTask* recoQa = new CbmRecoQaTask(); // recoQa->SetSetupClass(CbmRecoQaTask::kMcbm22); recoQa->SetSetupClass(CbmRecoQaTask::kMcbm24); - recoQa->AddEventFilter(CbmRecoQaTask::EventFilter::eEventCut::kMultTrk)->SetFilter({1, 2}); - recoQa->AddTrackFilter(CbmRecoQaTask::TrackFilter::eTrackCut::kSts)->SetFilter({3}); - recoQa->AddTrackFilter(CbmRecoQaTask::TrackFilter::eTrackCut::kTrd)->SetFilter({2}); - recoQa->AddTrackFilter(CbmRecoQaTask::TrackFilter::eTrackCut::kTof)->SetFilter({1}); + // // example 1. filtering events and tracks (e.g. useful for preparing sampling for alignment) + // recoQa->AddEventFilter(CbmRecoQaTask::EventFilter::eEventCut::kMultTrk)->SetFilter({1, 2}); + // recoQa->AddTrackFilter(CbmRecoQaTask::TrackFilter::eTrackCut::kSts)->SetFilter({3}); + // recoQa->AddTrackFilter(CbmRecoQaTask::TrackFilter::eTrackCut::kTrd)->SetFilter({2}); + // recoQa->AddTrackFilter(CbmRecoQaTask::TrackFilter::eTrackCut::kTof)->SetFilter({1}); + // // example 2. user access to the settings of view projections + // CbmRecoQaTask::Detector* det(nullptr); + // CbmRecoQaTask::View* view(nullptr); // if ((det = recoQa->GetDetector(ECbmModuleId:kSts))) { // view = det->GetView("U0L0M0"); // view->SetProjection(); // } + // // example 3. user access to planes defining global track extrapolation // double cos25 = TMath::Cos(TMath::DegToRad() * 25.); // recoQa->SetProjections({15.1 * cos25, 0., -20 * cos25, -38 * cos25, -50.5 * cos25}); run->AddTask(recoQa);