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 "LmvmCuts.h"
9#include "LmvmDef.h"
10#include "LmvmHist.h"
11#include "TObject.h"
12
13#include <functional>
14#include <string>
15#include <vector>
16
17//#include "CbmHistManager.h"
18
19class TH1;
20class TH2D;
21class TH1D;
22class TFile;
23class TCanvas;
24//class CbmHistManager;
25
26
27class LmvmDraw : public TObject {
28
29 public:
30 LmvmDraw();
31
32 virtual ~LmvmDraw() { ; }
33
42 void DrawHistFromFile(const std::string& fileName, const std::string& outputDir = "", bool useMvd = true);
43
44 private:
45 Int_t fNofEvents = 0; // number of events of current job
46
47 bool fUseMvd = false; // do you want to draw histograms related to the MVD detector?
48
49 LmvmCuts fCuts; // electron identification and analysis cuts
50
52 std::string fOutputDir = ""; // output directory for results
53
58 void RebinMinvHist();
59
63 void SaveCanvasToImage();
64
65 void DrawCutEffH1(const std::string& hist, const std::string& option);
66
67 void DrawAnaStepMany(const std::string& cName, std::function<void(ELmvmAnaStep)> drawFunc);
68
69 void DrawPtY(const std::string& hist, ELmvmAnaStep step);
70 void DrawRapidity(ELmvmAnaStep step);
72 void DrawMinvSBg(ELmvmAnaStep step);
75 void DrawSrcAnaStepEpEmH1(const std::string& cName, ELmvmAnaStep step);
76
77 void DrawMisc();
78
79 void DrawSrcH1(const std::string& hist, ELmvmAnaStep step = ELmvmAnaStep::Undefined, bool doScale = true);
80 void DrawAnaStepH1(const std::string& hist, bool logy = false);
81
82 void Draw1DCut(const std::string& hist, const std::string& sigOption, double cut = -999999.);
83 void Draw2DCut(const std::string& hist, double cutCrossX = -999999., double cutCrossY = -999999.);
85 void DrawElPurity();
86 void DrawCuts();
87
88 void DrawBgSourcePairs(ELmvmAnaStep step, bool inPercent, bool drawAnaStep = true);
90
91 void DrawAccRecVsMom();
92
93 void DrawBetaMomSpectra();
94
95 void Draw2DCutTriangle(double xCr, double yCr);
96
98
99 void DrawGammaVertex();
100
101 void DrawMinvBg();
102
103 void DrawSource2D(const std::string& cName, const std::string& hName, const std::vector<std::string>& yLabels,
104 double scale, const std::string& zTitle);
105
106
107 void DrawBgSourceTracks();
108
109 void SetAnalysisStepAxis(TH1* h);
110
111 void DrawMinvPt(ELmvmAnaStep step);
112
113 void DrawSrcAnaStepH1(const std::string& hName, ELmvmAnaStep step);
114
115 void DrawMvdCutQa();
116
117 void DrawMvdAndStsHist();
118
119 void DrawPmtXY();
120
121 bool SkipMvd(ELmvmAnaStep step);
122
125
127};
128
129#endif
ELmvmAnaStep
Definition LmvmDef.h:34
int Int_t
Data class with information on a STS local track.
void DrawMinvBgPairSrc(ELmvmAnaStep step)
Definition LmvmDraw.cxx:590
void DrawPtY(const std::string &hist, ELmvmAnaStep step)
Definition LmvmDraw.cxx:166
void DrawMisc()
Definition LmvmDraw.cxx:221
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:679
void DrawMvdCutQa()
Definition LmvmDraw.cxx:813
void DrawCutEffH1(const std::string &hist, const std::string &option)
Definition LmvmDraw.cxx:121
void Draw2DCutTriangle(double xCr, double yCr)
Definition LmvmDraw.cxx:357
void DrawAnaStepH1(const std::string &hist, bool logy=false)
Definition LmvmDraw.cxx:533
void DrawTofM2Cut()
void DrawBgSourcePairsAll()
Definition LmvmDraw.cxx:327
void Draw2DCut(const std::string &hist, double cutCrossX=-999999., double cutCrossY=-999999.)
Definition LmvmDraw.cxx:459
bool fUseMvd
Definition LmvmDraw.h:47
void DrawMinvMatching(ELmvmAnaStep step)
Definition LmvmDraw.cxx:608
ClassDef(LmvmDraw, 1)
void SetAnalysisStepAxis(TH1 *h)
Definition LmvmDraw.cxx:783
LmvmHist fH
Definition LmvmDraw.h:51
void DrawMinvSBg(ELmvmAnaStep step)
Definition LmvmDraw.cxx:562
bool SkipMvd(ELmvmAnaStep step)
Definition LmvmDraw.cxx:94
Int_t fNofEvents
Definition LmvmDraw.h:45
void Draw1DCut(const std::string &hist, const std::string &sigOption, double cut=-999999.)
Definition LmvmDraw.cxx:259
LmvmDraw & operator=(const LmvmDraw &)
void DrawMinvPt(ELmvmAnaStep step)
Definition LmvmDraw.cxx:194
void DrawMvdAndStsHist()
Definition LmvmDraw.cxx:831
void DrawSrcH1(const std::string &hist, ELmvmAnaStep step=ELmvmAnaStep::Undefined, bool doScale=true)
Definition LmvmDraw.cxx:246
void DrawBgSourcePairs(ELmvmAnaStep step, bool inPercent, bool drawAnaStep=true)
Definition LmvmDraw.cxx:303
LmvmDraw(const LmvmDraw &)
void DrawMismatchesAndGhosts()
Definition LmvmDraw.cxx:762
void DrawMinvBg()
Definition LmvmDraw.cxx:367
void DrawAccRecVsMom()
Definition LmvmDraw.cxx:624
virtual ~LmvmDraw()
Definition LmvmDraw.h:32
void DrawGammaVertex()
Definition LmvmDraw.cxx:488
void SaveCanvasToImage()
Save all created canvases to images.
Definition LmvmDraw.cxx:850
void DrawPmtXY()
Definition LmvmDraw.cxx:233
void DrawElPurity()
Definition LmvmDraw.cxx:402
void DrawBgSourceTracks()
Definition LmvmDraw.cxx:721
void DrawRapidity(ELmvmAnaStep step)
Definition LmvmDraw.cxx:176
void DrawCuts()
Definition LmvmDraw.cxx:283
void DrawAnaStepMany(const std::string &cName, std::function< void(ELmvmAnaStep)> drawFunc)
Definition LmvmDraw.cxx:146
void RebinMinvHist()
Rebin minv histograms for better drawing. Should be called after calculation of S/BG ratios.
Definition LmvmDraw.cxx:99
void DrawBetaMomSpectra()
Definition LmvmDraw.cxx:109
LmvmCuts fCuts
Definition LmvmDraw.h:49
void DrawSrcAnaStepH1(const std::string &hName, ELmvmAnaStep step)
Definition LmvmDraw.cxx:201
std::string fOutputDir
Definition LmvmDraw.h:52
void DrawSrcAnaStepEpEmH1(const std::string &cName, ELmvmAnaStep step)
Definition LmvmDraw.cxx:207
void DrawPtYEfficiency(ELmvmAnaStep step)
Definition LmvmDraw.cxx:182