Skip to content
Snippets Groups Projects
Commit 13bcf1b5 authored by Sergei Zharko's avatar Sergei Zharko Committed by Sergey Gorbunov
Browse files

BUGFIX: CbmMuchHitFinderQa.cxx: Added a nullptr check in the "stats" pave accessing

parent 73c04eff
No related branches found
No related tags found
1 merge request!1138CA: Updates on CA tracking QA tasks
Pipeline #22053 passed
......@@ -33,6 +33,6 @@ set(INTERFACE_DEPENDENCIES
generate_cbm_library()
Install(FILES CbmQaTask.h CbmQaCanvas.h CbmQaTable.h CbmQaHist.h CbmQaEff.h CbmQaPie.h CbmQaConstants.h
Install(FILES CbmQaTask.h CbmQaCanvas.h CbmQaTable.h CbmQaHist.h CbmQaEff.h CbmQaPie.h CbmQaConstants.h CbmQaCmpDrawer.h
DESTINATION include
)
......@@ -186,6 +186,16 @@ void mcbm_qa(Int_t nEvents = 0, TString dataset = "data/mcbm_beam_2020_03_test",
// appears, if the CbmMuchHitFinderQa task runs before the CbmCaInputQaSts
// task.
// ----- STS QA -----------------------------------------------------------
if (bUseSts) {
// CA Input QA
auto* pCaInputSts = new CbmCaInputQaSts(verbose, bUseMC);
pCaInputSts->SetEfficiencyThrsh(0.5, 0, 100);
run->AddTask(pCaInputSts);
}
// ------------------------------------------------------------------------
// ----- MUCH QA ---------------------------------------------------------
if (bUseMuch) {
run->AddTask(new CbmMuchTransportQa());
......@@ -194,7 +204,7 @@ void mcbm_qa(Int_t nEvents = 0, TString dataset = "data/mcbm_beam_2020_03_test",
CbmMuchHitFinderQa* muchHitFinderQa = new CbmMuchHitFinderQa();
muchHitFinderQa->SetGeoFileName(muchParFile);
//run->AddTask(muchHitFinderQa);
run->AddTask(muchHitFinderQa);
// CA Input QA
auto* pCaInputMuch = new CbmCaInputQaMuch(verbose, bUseMC);
......@@ -203,15 +213,6 @@ void mcbm_qa(Int_t nEvents = 0, TString dataset = "data/mcbm_beam_2020_03_test",
}
// ------------------------------------------------------------------------
// ----- STS QA -----------------------------------------------------------
if (bUseSts) {
// CA Input QA
auto* pCaInputSts = new CbmCaInputQaSts(verbose, bUseMC);
pCaInputSts->SetEfficiencyThrsh(0.5, 0, 100);
run->AddTask(pCaInputSts);
}
// ------------------------------------------------------------------------
// ----- TRD QA -----------------------------------------------------------
if (bUseTrd) {
// CA Input QA
......
......@@ -363,7 +363,6 @@ void CbmMuchHitFinderQa::FinishTask()
// -------------------------------------------------------------------------
void CbmMuchHitFinderQa::DrawCanvases()
{
for (Int_t i = 0; i < fNstations; i++) {
fCanvPointsInCluster->cd(i + 1);
fhPointsInCluster[i]->DrawCopy("", "");
......@@ -386,6 +385,7 @@ void CbmMuchHitFinderQa::DrawCanvases()
histo->Draw(); //necessary to create stats pointer
fCanvPull->Update();
TPaveStats* st = (TPaveStats*) histo->FindObject("stats");
if (st) {
st->SetX1NDC(0.621);
st->SetX2NDC(0.940);
st->SetY1NDC(0.657);
......@@ -393,6 +393,7 @@ void CbmMuchHitFinderQa::DrawCanvases()
st->SetOptStat(1110);
st->SetOptFit(11);
//st->SetTextSize(0.04);
}
histo->DrawCopy("", "");
//version below only changes canvas but not hist folder
//TH1* hClone = histo->DrawCopy("", "");
......@@ -413,6 +414,7 @@ void CbmMuchHitFinderQa::DrawCanvases()
histo->Draw(); //necessary to create stats pointer
fCanvResidual->Update();
TPaveStats* st = (TPaveStats*) histo->FindObject("stats");
if (st) {
st->SetX1NDC(0.621);
st->SetX2NDC(0.940);
st->SetY1NDC(0.657);
......@@ -420,6 +422,7 @@ void CbmMuchHitFinderQa::DrawCanvases()
st->SetOptStat(1110);
st->SetOptFit(11);
//st->SetTextSize(0.04);
}
histo->DrawCopy("", "");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment