Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
QAPlot.h
1/*
2 * QAPlot.h
3 *
4 * Created on: 11 paź 2020
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#ifndef HALQAPLOT_H_
10#define HALQAPLOT_H_
11
12#include "QAHistoSettings.h"
13#include "QAPlotReport.h"
14
15#include <Rtypes.h>
16#include <RtypesCore.h>
17#include <TString.h>
18
19#include "Std.h"
20
21
28namespace Hal {
29 class Track;
30 class Event;
31 class QAPlotAxis;
32
33 class QAPlot : public TNamed {
34 ECutUpdate fUpdate;
35 std::vector<QAHistoSettings> fSettings[3];
36 QAPlotReport* fReport;
37
38 protected:
39 inline Int_t GetSize1D() const { return fSettings[0].size(); };
44 inline Int_t GetSize2D() const { return fSettings[1].size(); };
49 inline Int_t GetSize3D() const { return fSettings[2].size(); };
55 inline TH1D* Get1D(Int_t no) const { return fReport->Get1D(no); };
61 inline TH2D* Get2D(Int_t no) const { return fReport->Get2D(no); };
67 inline TH3D* Get3D(Int_t no) const { return fReport->Get3D(no); };
68 void FillTrack(Track* track);
69 void FillEvent(Event* event);
75 virtual void FillTrackCustom1D(Track* /*track*/, TH1D* /*h*/, Int_t /*no*/) {};
81 virtual void FillEventCustom1D(Event* /*event*/, TH1D* /*h*/, Int_t /*no*/) {};
87 virtual void FillTrackCustom2D(Track* /*track*/, TH2D* /*h*/, Int_t /*no*/) {};
93 virtual void FillEventCustom2D(Event* /*event*/, TH2D* /*h*/, Int_t /*no*/) {};
99 virtual void FillTrackCustom3D(Track* /*track*/, TH3D* /*h*/, Int_t /*no*/) {};
105 virtual void FillEventCustom3D(Event* /*event*/, TH3D* /*h*/, Int_t /*no*/) {};
106
107 public:
108 QAPlot();
109 QAPlot(ECutUpdate upd);
114 QAPlot(TString name, ECutUpdate upd);
120 Int_t AddTH1(TString name, const QAPlotAxis& x, TString flag = "");
128 Int_t AddTH2(TString name, const QAPlotAxis& x, const QAPlotAxis& y, TString flag = "");
137 Int_t AddTH3(TString name, const QAPlotAxis& x, const QAPlotAxis& y, const QAPlotAxis& z, TString flag = "");
142 virtual QAPlot* MakeCopy() const { return (QAPlot*) this->Clone(); };
147 virtual Bool_t Init(Int_t id_task = -1);
152 virtual void Fill(TObject* obj);
153 ECutUpdate GetUpdateRatio() const { return fUpdate; }
154 virtual void Print(Option_t* opt = "") const;
155 virtual ~QAPlot();
156 QAPlotReport* GetReport() const;
157 QAPlot(const QAPlot& other);
158 QAPlot& operator=(const QAPlot& other);
159 ClassDef(QAPlot, 1)
160 };
161} // namespace Hal
162#endif /* HALQAPLOT_H_ */
TH3D * Get3D(Int_t no) const
TH2D * Get2D(Int_t no) const
TH1D * Get1D(Int_t no) const
virtual void FillEventCustom3D(Event *, TH3D *, Int_t)
Definition QAPlot.h:105
virtual void Fill(TObject *obj)
Definition QAPlot.cxx:144
virtual Bool_t Init(Int_t id_task=-1)
Definition QAPlot.cxx:47
Int_t AddTH1(TString name, const QAPlotAxis &x, TString flag="")
Definition QAPlot.cxx:176
Int_t AddTH2(TString name, const QAPlotAxis &x, const QAPlotAxis &y, TString flag="")
Definition QAPlot.cxx:187
Int_t AddTH3(TString name, const QAPlotAxis &x, const QAPlotAxis &y, const QAPlotAxis &z, TString flag="")
Definition QAPlot.cxx:200
virtual void FillEventCustom2D(Event *, TH2D *, Int_t)
Definition QAPlot.h:93
TH1D * Get1D(Int_t no) const
Definition QAPlot.h:55
virtual void FillTrackCustom1D(Track *, TH1D *, Int_t)
Definition QAPlot.h:75
TH3D * Get3D(Int_t no) const
Definition QAPlot.h:67
TH2D * Get2D(Int_t no) const
Definition QAPlot.h:61
Int_t GetSize3D() const
Definition QAPlot.h:49
virtual void FillTrackCustom2D(Track *, TH2D *, Int_t)
Definition QAPlot.h:87
virtual QAPlot * MakeCopy() const
Definition QAPlot.h:142
Int_t GetSize2D() const
Definition QAPlot.h:44
virtual void FillEventCustom1D(Event *, TH1D *, Int_t)
Definition QAPlot.h:81
virtual void FillTrackCustom3D(Track *, TH3D *, Int_t)
Definition QAPlot.h:99