Belle II Software development
DQMHistAnalysisRootFitExample.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8//+
9// File : DQMHistAnalysisRooFitExample.h
10// Description : An example module for DQM histogram analysis
11//-
12
13#pragma once
14
15#include <dqm/core/DQMHistAnalysis.h>
16
17#include <TCanvas.h>
18#include <RooWorkspace.h>
19#include <RooDataHist.h>
20#include <RooPlot.h>
21#include <RooFitResult.h>
22#include <RooAbsPdf.h>
23
24namespace Belle2 {
32
33 // Public functions
34 public:
35
40
45
49 void initialize(void) override final;
50
54 void beginRun(void) override final;
55
59 void event(void) override final;
60
64 void endRun(void) override final;
65
69 void terminate(void) override final;
70
71 private:
72
73 // Data member
75 RooWorkspace* w = nullptr;
77 RooRealVar* x = nullptr;
79 RooDataHist* data = nullptr;
81 RooPlot* plot = nullptr;
83 RooFitResult* r = nullptr;
85 RooAbsPdf* model = nullptr;
86
87
89 TCanvas* m_c0 = nullptr;
90 };
92} // end namespace Belle2
93
The base class for the histogram analysis module.
Class definition for the output module of Sequential ROOT I/O.
void terminate(void) override final
This method is called at the end of the event processing.
void initialize(void) override final
Initializer.
RooDataHist * data
The data of histogram for fitting.
void endRun(void) override final
This method is called if the current run ends.
TCanvas * m_c0
The drawing canvas for plotting the fitting result.
RooPlot * plot
The plot of the fitting result.
void beginRun(void) override final
Called when entering a new run.
void event(void) override final
This method is called for each event.
Abstract base class for different kinds of events.