CbmRoot
Loading...
Searching...
No Matches
LmvmDraw.h
Go to the documentation of this file.
1/* Copyright (C) 2011-2021 UGiessen, JINR-LIT
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Semen Lebedev [committer], Elena Lebedeva */
4
5#ifndef LMVM_DRAW_H
6#define LMVM_DRAW_H
7
8#include "TObject.h"
9
10#include <functional>
11#include <string>
12#include <vector>
13
14#include "LmvmCuts.h"
15#include "LmvmDef.h"
16#include "LmvmHist.h"
17
18//#include "CbmHistManager.h"
19
20class TH1;
21class TH2D;
22class TH1D;
23class TFile;
24class TCanvas;
25//class CbmHistManager;
26
27
28class LmvmDraw : public TObject {
29
30public:
31 LmvmDraw();
32
33 virtual ~LmvmDraw() { ; }
34
43 void DrawHistFromFile(const std::string& fileName, const std::string& outputDir = "", bool useMvd = true);
44
45private:
46 Int_t fNofEvents = 0; // number of events of current job
47
48 bool fUseMvd = false; // do you want to draw histograms related to the MVD detector?
49
50 LmvmCuts fCuts; // electron identification and analysis cuts
51
53 std::string fOutputDir = ""; // output directory for results
54
59 void RebinMinvHist();
60
64 void SaveCanvasToImage();
65
66 void DrawCutEffH1(const std::string& hist, const std::string& option);
67
68 void DrawAnaStepMany(const std::string& cName, std::function<void(ELmvmAnaStep)> drawFunc);
69
70 void DrawPtY(const std::string& hist, ELmvmAnaStep step);
71 void DrawRapidity(ELmvmAnaStep step);
73 void DrawMinvSBg(ELmvmAnaStep step);
76 void DrawSrcAnaStepEpEmH1(const std::string& cName, ELmvmAnaStep step);
77
78 void DrawMisc();
79
80 void DrawSrcH1(const std::string& hist, ELmvmAnaStep step = ELmvmAnaStep::Undefined, bool doScale = true);
81 void DrawAnaStepH1(const std::string& hist, bool logy = false);
82
83 void Draw1DCut(const std::string& hist, const std::string& sigOption, double cut = -999999.);
84 void Draw2DCut(const std::string& hist, double cutCrossX = -999999., double cutCrossY = -999999.);
86 void DrawElPurity();
87 void DrawCuts();
89
90 void DrawBgSourcePairs(ELmvmAnaStep step, bool inPercent, bool drawAnaStep = true);
92
93 void DrawAccRecVsMom();
94
95 void DrawBetaMomSpectra();
96
97 void Draw2DCutTriangle(double xCr, double yCr);
98
100
101 void DrawGammaVertex();
102
103 void DrawMinvAll();
104
105 void DrawMinvBg();
106
107 void DrawSource2D(const std::string& cName, const std::string& hName, const std::vector<std::string>& yLabels,
108 double scale, const std::string& zTitle);
109
110
111 void DrawBgSourceTracks();
112
113 void SetAnalysisStepAxis(TH1* h);
114
115 void DrawMinvPt(ELmvmAnaStep step);
116
117 void DrawSrcAnaStepH1(const std::string& hName, ELmvmAnaStep step);
118
119 void DrawMvdCutQa();
120
121 void DrawMvdAndStsHist();
122
123 void DrawPmtXY();
124
125 bool SkipMvd(ELmvmAnaStep step);
126
129
131};
132
133#endif
ELmvmAnaStep
Definition LmvmDef.h:34
Data class with information on a STS local track.
void DrawMinvBgPairSrc(ELmvmAnaStep step)
Definition LmvmDraw.cxx:763
void DrawPtY(const std::string &hist, ELmvmAnaStep step)
Definition LmvmDraw.cxx:182
void DrawMisc()
Definition LmvmDraw.cxx:237
void DrawHistFromFile(const std::string &fileName, const std::string &outputDir="", bool useMvd=true)
Implement functionality of drawing histograms in the macro from the specified file,...
Definition LmvmDraw.cxx:40
void DrawSource2D(const std::string &cName, const std::string &hName, const std::vector< std::string > &yLabels, double scale, const std::string &zTitle)
Definition LmvmDraw.cxx:852
void DrawMvdCutQa()
Definition LmvmDraw.cxx:984
void DrawCutEffH1(const std::string &hist, const std::string &option)
Definition LmvmDraw.cxx:137
void Draw2DCutTriangle(double xCr, double yCr)
Definition LmvmDraw.cxx:479
void DrawAnaStepH1(const std::string &hist, bool logy=false)
Definition LmvmDraw.cxx:686
void DrawTofM2Cut()
void DrawMinvAll()
Definition LmvmDraw.cxx:716
void DrawBgSourcePairsAll()
Definition LmvmDraw.cxx:449
void Draw2DCut(const std::string &hist, double cutCrossX=-999999., double cutCrossY=-999999.)
Definition LmvmDraw.cxx:612
bool fUseMvd
Definition LmvmDraw.h:48
void DrawMinvMatching(ELmvmAnaStep step)
Definition LmvmDraw.cxx:781
ClassDef(LmvmDraw, 1)
void SetAnalysisStepAxis(TH1 *h)
Definition LmvmDraw.cxx:956
LmvmHist fH
Definition LmvmDraw.h:52
void DrawMinvSBg(ELmvmAnaStep step)
Definition LmvmDraw.cxx:735
bool SkipMvd(ELmvmAnaStep step)
Definition LmvmDraw.cxx:100
Int_t fNofEvents
Definition LmvmDraw.h:46
void Draw1DCut(const std::string &hist, const std::string &sigOption, double cut=-999999.)
Definition LmvmDraw.cxx:374
LmvmDraw & operator=(const LmvmDraw &)
void DrawMinvPt(ELmvmAnaStep step)
Definition LmvmDraw.cxx:210
void DrawMvdAndStsHist()
void DrawSrcH1(const std::string &hist, ELmvmAnaStep step=ELmvmAnaStep::Undefined, bool doScale=true)
Definition LmvmDraw.cxx:361
void DrawCombinatorialPairs()
Definition LmvmDraw.cxx:250
void DrawBgSourcePairs(ELmvmAnaStep step, bool inPercent, bool drawAnaStep=true)
Definition LmvmDraw.cxx:425
LmvmDraw(const LmvmDraw &)
void DrawMismatchesAndGhosts()
Definition LmvmDraw.cxx:935
void DrawMinvBg()
Definition LmvmDraw.cxx:489
void DrawAccRecVsMom()
Definition LmvmDraw.cxx:797
virtual ~LmvmDraw()
Definition LmvmDraw.h:33
void DrawGammaVertex()
Definition LmvmDraw.cxx:641
void SaveCanvasToImage()
Save all created canvases to images.
void DrawPmtXY()
Definition LmvmDraw.cxx:348
void DrawElPurity()
Definition LmvmDraw.cxx:535
void DrawBgSourceTracks()
Definition LmvmDraw.cxx:894
void DrawRapidity(ELmvmAnaStep step)
Definition LmvmDraw.cxx:192
void DrawCuts()
Definition LmvmDraw.cxx:398
void DrawAnaStepMany(const std::string &cName, std::function< void(ELmvmAnaStep)> drawFunc)
Definition LmvmDraw.cxx:162
void RebinMinvHist()
Rebin minv histograms for better drawing. Should be called after calculation of S/BG ratios.
Definition LmvmDraw.cxx:105
void DrawBetaMomSpectra()
Definition LmvmDraw.cxx:125
LmvmCuts fCuts
Definition LmvmDraw.h:50
void DrawSrcAnaStepH1(const std::string &hName, ELmvmAnaStep step)
Definition LmvmDraw.cxx:217
std::string fOutputDir
Definition LmvmDraw.h:53
void DrawSrcAnaStepEpEmH1(const std::string &cName, ELmvmAnaStep step)
Definition LmvmDraw.cxx:223
void DrawPtYEfficiency(ELmvmAnaStep step)
Definition LmvmDraw.cxx:198