Belle II Software development
DQMHistAnalysisEcmsMonObj.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#pragma once
10
11#include <unordered_map>
12#include <string>
13//DQM
14#include <dqm/core/DQMHistAnalysis.h>
15#include <TCanvas.h>
16#include <TH1D.h>
17#include <RooDataHist.h>
18#include <RooAddPdf.h>
19#include <RooArgusBG.h>
20#include <RooGaussian.h>
21#include <RooRealVar.h>
22
23namespace Belle2 {
28
33
34 public:
35
40
45
50 void initialize() override final;
51
56 void beginRun() override final;
57
61 void event() override final;
62
67 void endRun() override final;
68
73 void terminate() override final;
74
75
79 TCanvas* plotArgusFit(RooDataHist* dataE0, RooAddPdf& sumB0, RooArgusBG& argus,
80 RooGaussian& gauss, RooRealVar& eNow, TString nTag = "");
81
85 std::unordered_map<std::string, double> fitEcmsBB(TH1D* hB0, TH1D* hBp);
86
87 protected:
89 TCanvas* m_canvas = nullptr;
90
91 };
92
94} // Belle2 namespace
95
96
void initialize() override final
Initialize the Module.
TCanvas * plotArgusFit(RooDataHist *dataE0, RooAddPdf &sumB0, RooArgusBG &argus, RooGaussian &gauss, RooRealVar &eNow, TString nTag="")
Plot the fit and return TCanvas with the plot.
std::unordered_map< std::string, double > fitEcmsBB(TH1D *hB0, TH1D *hBp)
Fit the histograms and return the fitted parameters.
TCanvas * m_canvas
Canvas to keep plots of the fit.
MonitoringObject * m_monObj
monitoring object
void terminate() override final
Termination action.
void event() override final
This method is called for each event.
void endRun() override final
End-of-run action.
void beginRun() override final
Called when entering a new run.
DQMHistAnalysisModule()
Constructor / Destructor.
MonitoringObject is a basic object to hold data for the run-dependency monitoring Run summary TCanvas...
Abstract base class for different kinds of events.