14 #include <dqm/analysis/modules/DQMHistAnalysisV0.h>
39 addParam(
"OverlayPath", m_OverlayPath,
"Path to CAD drawings", std::string(
""));
44 void DQMHistAnalysisV0Module::initialize()
46 B2INFO(
"DQMHistAnalysisV0: initialized.");
49 for (
int i = 0; i < 32; i++) {
50 m_c_xvsy[i] =
new TCanvas(Form(
"V0Object/c_xvsy[%i]", i), Form(
"c_xvsy[%i]", i), 800, 800);
53 m_c_xvsz =
new TCanvas(
"V0Object/c_xvsz",
"c_xvsz", 1500, 400);
55 auto* m_fh =
new TFile(Form(
"%s/v0cad.root", m_OverlayPath.c_str()));
57 contLevelXY.resize(32);
58 for (
int i = 0; i < 32; i++) {
59 contLevelXY[i] =
new TList();
61 if (m_fh->cd(Form(
"h_%dc", i))) {
62 for (
int j = 0; j < 500; j++) {
63 auto curv = gDirectory->Get(Form(
"Graph_%d", j));
65 contLevelXY[i]->AddLast(curv);
70 contLevelXZ =
new TList();
72 if (m_fh->cd(
"h_xzc")) {
73 for (
int j = 0;
true; j++) {
74 auto curv = gDirectory->Get(Form(
"Graph_%d", j));
76 contLevelXZ->AddLast(curv);
85 void DQMHistAnalysisV0Module::event()
89 gStyle->SetOptStat(0);
90 gStyle->SetPalette(kViridis, 0, 0.7);
91 for (
int i = 0; i < 32; i++) {
92 TH2* h = (TH2*) findHist(Form(
"V0Objects/xvsy[%i]", i));
94 if (h) h->Draw(
"COLZ");
96 TList* c = contLevelXY[i];
97 if (c && c->GetSize() > 0) {
98 auto* curv = (TGraph*)c->First();
99 for (
int j = 0; j < c->GetSize(); j++) {
103 curv = (TGraph*)c->After(curv);
107 m_c_xvsy[i]->Modified();
108 m_c_xvsy[i]->Update();
111 TH2* hxz = (TH2*) findHist(
"V0Objects/xvsz");
117 if (hxz) hxz->Draw(
"COLZ");
119 TList* c = contLevelXZ;
120 if (c && c->GetSize() > 0) {
121 auto* curv = (TGraph*)c->First();
122 for (
int j = 0; j < c->GetSize(); j++) {
126 curv = (TGraph*)c->After(curv);
131 m_c_xvsz->Modified();
The base class for the histogram analysis module.
Class definition for the output module of Sequential ROOT I/O.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.