Skip to content
Snippets Groups Projects
Commit 97f0f032 authored by Sergei Zharko's avatar Sergei Zharko
Browse files

CA-QA: adding the Setup QA task for full-CBM, adding material maps histograms to the Setup QA task

parent 45511adf
No related branches found
No related tags found
1 merge request!1931Adding KF-setup to the ca::Parameters
......@@ -58,7 +58,7 @@ namespace cbm::algo::kf
/// \tparam EDetID concrete index type of the det ID (can be either an enum, or an integral type)
/// \param globId Internal layer index
/// \return pair(detector ID, local ID) of the layer
template<class EDetID>
template<class EDetID = int>
std::pair<EDetID, int> GlobalToLocal(int globId) const;
/// \brief Converts external pair (detID, locID) to internal layer index
......
......@@ -293,6 +293,11 @@ void run_qa(TString dataTraColl,
TString caParFile = recFile;
caParFile.ReplaceAll(".root", ".ca.par");
auto* pCaInputQaSetup = new cbm::ca::InputQaSetup(verbose, bUseMC);
pCaInputQaSetup->ReadParameters(caParFile.Data());
pCaInputQaSetup->SetSetupName(setup.Data());
qaManager->AddTask(pCaInputQaSetup);
auto* pCaOutputQa = new cbm::ca::OutputQa(verbose, bUseMC, recoMode);
pCaOutputQa->SetStsTrackingMode();
pCaOutputQa->ReadParameters(caParFile.Data());
......
......@@ -11,6 +11,7 @@
#include "CaInitManager.h"
#include "CbmCaTrackingSetupBuilder.h"
#include "CbmL1DetectorID.h"
#include "CbmMCDataManager.h"
#include "FairRootManager.h"
#include "TAxis.h"
......@@ -407,6 +408,32 @@ try {
}
}
auto CreateMaterialBudgetHistograms = [&](const auto& kfSetup, const TString& dir) {
for (int iLayer = 0; iLayer < kfSetup.GetNofLayers(); ++iLayer) {
const auto& matMap{kfSetup.GetMaterial(iLayer)};
auto [detID, stationID] = kfSetup.GetIndexMap().GlobalToLocal(iLayer);
TString sN = Form("%s/mat_budget_%s_st%d", dir.Data(), kDetName[detID], stationID);
TString sT =
Form("Material budget map for %s station %d;x [cm];y [cm]; X/X_{0} [\%]", kDetName[detID], stationID);
auto nBins{matMap.GetNbins()};
auto xMin{-matMap.GetXYmax()};
auto xMax{+matMap.GetXYmax()};
auto* pHist = MakeQaObject<TH2F>(sN, sT, nBins, xMin, xMax, nBins, xMin, xMax);
for (int iX = 0; iX < nBins; ++iX) {
for (int iY = 0; iY < nBins; ++iY) {
pHist->SetBinContent(iX + 1, iY + 1, 100. * matMap.GetThicknessX0(iX, iY));
}
}
}
};
MakeQaDirectory("TrackingKFSetup");
MakeQaDirectory("TrackingKFSetup/geometry");
CreateMaterialBudgetHistograms(fpParameters->GetGeometrySetup(), "TrackingKFSetup/geometry");
MakeQaDirectory("TrackingKFSetup/active");
CreateMaterialBudgetHistograms(fpParameters->GetActiveSetup(), "TrackingKFSetup/active");
LOG(error) << fName << ": initializing... \033[1;32mDone\033[0m";
return kSUCCESS;
}
......
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