Skip to content
Snippets Groups Projects
Commit 52a6f06a authored by Alexandru Bercuci's avatar Alexandru Bercuci
Browse files

update macro for the new class organization. Provide doc and example for

users
parent df8762a1
No related branches found
No related tags found
1 merge request!1939Reco QA - primary vertex
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment