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 ...@@ -33,6 +33,6 @@ set(INTERFACE_DEPENDENCIES
generate_cbm_library() 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 DESTINATION include
) )
...@@ -186,6 +186,16 @@ void mcbm_qa(Int_t nEvents = 0, TString dataset = "data/mcbm_beam_2020_03_test", ...@@ -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 // appears, if the CbmMuchHitFinderQa task runs before the CbmCaInputQaSts
// task. // 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 --------------------------------------------------------- // ----- MUCH QA ---------------------------------------------------------
if (bUseMuch) { if (bUseMuch) {
run->AddTask(new CbmMuchTransportQa()); run->AddTask(new CbmMuchTransportQa());
...@@ -194,7 +204,7 @@ void mcbm_qa(Int_t nEvents = 0, TString dataset = "data/mcbm_beam_2020_03_test", ...@@ -194,7 +204,7 @@ void mcbm_qa(Int_t nEvents = 0, TString dataset = "data/mcbm_beam_2020_03_test",
CbmMuchHitFinderQa* muchHitFinderQa = new CbmMuchHitFinderQa(); CbmMuchHitFinderQa* muchHitFinderQa = new CbmMuchHitFinderQa();
muchHitFinderQa->SetGeoFileName(muchParFile); muchHitFinderQa->SetGeoFileName(muchParFile);
//run->AddTask(muchHitFinderQa); run->AddTask(muchHitFinderQa);
// CA Input QA // CA Input QA
auto* pCaInputMuch = new CbmCaInputQaMuch(verbose, bUseMC); 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", ...@@ -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 ----------------------------------------------------------- // ----- TRD QA -----------------------------------------------------------
if (bUseTrd) { if (bUseTrd) {
// CA Input QA // CA Input QA
......
...@@ -363,7 +363,6 @@ void CbmMuchHitFinderQa::FinishTask() ...@@ -363,7 +363,6 @@ void CbmMuchHitFinderQa::FinishTask()
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
void CbmMuchHitFinderQa::DrawCanvases() void CbmMuchHitFinderQa::DrawCanvases()
{ {
for (Int_t i = 0; i < fNstations; i++) { for (Int_t i = 0; i < fNstations; i++) {
fCanvPointsInCluster->cd(i + 1); fCanvPointsInCluster->cd(i + 1);
fhPointsInCluster[i]->DrawCopy("", ""); fhPointsInCluster[i]->DrawCopy("", "");
...@@ -386,13 +385,15 @@ void CbmMuchHitFinderQa::DrawCanvases() ...@@ -386,13 +385,15 @@ void CbmMuchHitFinderQa::DrawCanvases()
histo->Draw(); //necessary to create stats pointer histo->Draw(); //necessary to create stats pointer
fCanvPull->Update(); fCanvPull->Update();
TPaveStats* st = (TPaveStats*) histo->FindObject("stats"); TPaveStats* st = (TPaveStats*) histo->FindObject("stats");
st->SetX1NDC(0.621); if (st) {
st->SetX2NDC(0.940); st->SetX1NDC(0.621);
st->SetY1NDC(0.657); st->SetX2NDC(0.940);
st->SetY2NDC(0.929); st->SetY1NDC(0.657);
st->SetOptStat(1110); st->SetY2NDC(0.929);
st->SetOptFit(11); st->SetOptStat(1110);
//st->SetTextSize(0.04); st->SetOptFit(11);
//st->SetTextSize(0.04);
}
histo->DrawCopy("", ""); histo->DrawCopy("", "");
//version below only changes canvas but not hist folder //version below only changes canvas but not hist folder
//TH1* hClone = histo->DrawCopy("", ""); //TH1* hClone = histo->DrawCopy("", "");
...@@ -413,13 +414,15 @@ void CbmMuchHitFinderQa::DrawCanvases() ...@@ -413,13 +414,15 @@ void CbmMuchHitFinderQa::DrawCanvases()
histo->Draw(); //necessary to create stats pointer histo->Draw(); //necessary to create stats pointer
fCanvResidual->Update(); fCanvResidual->Update();
TPaveStats* st = (TPaveStats*) histo->FindObject("stats"); TPaveStats* st = (TPaveStats*) histo->FindObject("stats");
st->SetX1NDC(0.621); if (st) {
st->SetX2NDC(0.940); st->SetX1NDC(0.621);
st->SetY1NDC(0.657); st->SetX2NDC(0.940);
st->SetY2NDC(0.929); st->SetY1NDC(0.657);
st->SetOptStat(1110); st->SetY2NDC(0.929);
st->SetOptFit(11); st->SetOptStat(1110);
//st->SetTextSize(0.04); st->SetOptFit(11);
//st->SetTextSize(0.04);
}
histo->DrawCopy("", ""); histo->DrawCopy("", "");
} }
} }
......
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