CbmRoot
CbmAnaDielectronTaskDrawAll.h
Go to the documentation of this file.
1 
7 #ifndef CBM_ANA_DIELECTRON_TASK_DRAW_ALL
8 #define CBM_ANA_DIELECTRON_TASK_DRAW_ALL
9 
10 #include <map>
11 #include <string>
12 #include <vector>
13 
14 #include "CbmLmvmHist.h"
15 
16 #include "TObject.h"
17 
18 class TH1;
19 class TH2D;
20 class TH1D;
21 class TFile;
22 class TCanvas;
23 class CbmHistManager;
24 
25 enum SignalType { kInmed = 0, kQgp = 1, kOmega = 2, kPhi = 3, kOmegaD = 4 };
26 
27 class CbmAnaDielectronTaskDrawAll : public TObject {
28 
29 public:
34  : TObject()
35  , fUseMvd(false)
36  , fDrawQgp(false)
37  , fHM()
38  , fh_mean_bg_minv()
44  , fh_sum_s_minv()
45  , fOutputDir("") {
46  ;
47  }
48 
53 
64  void DrawHistosFromFile(const std::string& fileNameInmed,
65  const std::string& fileNameQgp,
66  const std::string& fileNameOmega,
67  const std::string& fileNamePhi,
68  const std::string& fileNameOmegaDalitz,
69  const std::string& outputDir = "",
70  Bool_t useMvd = false);
71 
72 private:
73  static const int fNofSignals = 5;
74 
75  Bool_t
76  fUseMvd; // do you want to draw histograms related to the MVD detector?
77  Bool_t fDrawQgp; // do you wan to draq QGP signal
78 
79  //[0]=rho0, [1]=omega, [2]=phi, [3]=omegaDalitz
80  std::vector<CbmHistManager*> fHM;
81 
82  // index: AnalysisSteps
83  std::vector<TH1D*> fh_mean_bg_minv; //mean histograms from all files
84  std::vector<TH1D*> fh_mean_eta_minv;
85  std::vector<TH1D*> fh_mean_pi0_minv;
86  std::vector<TH2D*> fh_mean_eta_minv_pt;
87  std::vector<TH2D*> fh_mean_pi0_minv_pt;
88  std::vector<TH1D*>
89  fh_mean_sbg_vs_minv; //Coctail/BG vs. invariant mass for different analysis steps
90 
91 
92  // index: AnalysisSteps
93  std::vector<TH1D*> fh_sum_s_minv; // sum of all signals
94 
95  std::string fOutputDir; // output directory for figures
96 
97  TH1D* H1(int signalType, const std::string& name);
98 
99  TH2D* H2(int signalType, const std::string& name);
100 
105 
109  void DrawSBgVsMinv();
110 
114  void DrawMinvAll();
115 
120  void DrawMinv(CbmLmvmAnalysisSteps step);
121 
125  void DrawMinvPtAll();
126 
131  void DrawMinvPt(CbmLmvmAnalysisSteps step);
132 
136  void FillMeanHist();
137 
141  void SaveHist();
142 
146  void FillSumSignalsHist();
147 
153  void CalcCutEffRange(Double_t minMinv, Double_t maxMinv);
154 
160  TH1D* SBgRange(Double_t minMinv, Double_t maxMinv);
161 
165  void SBgRangeAll();
166 
170  void DrawSBgSignals();
171 
175  void SaveCanvasToImage();
176 
177 
180 
182 };
183 
184 #endif
CbmAnaDielectronTaskDrawAll::ClassDef
ClassDef(CbmAnaDielectronTaskDrawAll, 1)
CbmAnaDielectronTaskDrawAll::H2
TH2D * H2(int signalType, const std::string &name)
Definition: CbmAnaDielectronTaskDrawAll.cxx:94
CbmAnaDielectronTaskDrawAll::DrawMinv
void DrawMinv(CbmLmvmAnalysisSteps step)
Draw invariant mass spectra for all signal types for specified analysis step.
Definition: CbmAnaDielectronTaskDrawAll.cxx:146
CbmAnaDielectronTaskDrawAll::DrawMinvPtAll
void DrawMinvPtAll()
Draw invariant mass vs Pt histograms.
Definition: CbmAnaDielectronTaskDrawAll.cxx:441
CbmAnaDielectronTaskDrawAll::fUseMvd
Bool_t fUseMvd
Definition: CbmAnaDielectronTaskDrawAll.h:76
CbmAnaDielectronTaskDrawAll::SaveCanvasToImage
void SaveCanvasToImage()
Save all created canvases to images.
Definition: CbmAnaDielectronTaskDrawAll.cxx:776
CbmAnaDielectronTaskDrawAll::DrawMinvAll
void DrawMinvAll()
Draw invariant mass histograms.
Definition: CbmAnaDielectronTaskDrawAll.cxx:129
CbmAnaDielectronTaskDrawAll::CbmAnaDielectronTaskDrawAll
CbmAnaDielectronTaskDrawAll()
Default constructor.
Definition: CbmAnaDielectronTaskDrawAll.h:33
CbmAnaDielectronTaskDrawAll::DrawSBgSignals
void DrawSBgSignals()
Draw S/BG vs plots for different signals.
Definition: CbmAnaDielectronTaskDrawAll.cxx:678
kOmega
@ kOmega
Definition: CbmAnaDielectronTaskDrawAll.h:25
CbmAnaDielectronTaskDrawAll::CbmAnaDielectronTaskDrawAll
CbmAnaDielectronTaskDrawAll(const CbmAnaDielectronTaskDrawAll &)
CbmAnaDielectronTaskDrawAll::SaveHist
void SaveHist()
Save histograms for the study report.
Definition: CbmAnaDielectronTaskDrawAll.cxx:524
kOmegaD
@ kOmegaD
Definition: CbmAnaDielectronTaskDrawAll.h:25
CbmAnaDielectronTaskDrawAll::FillSumSignalsHist
void FillSumSignalsHist()
Fill sum signals.
Definition: CbmAnaDielectronTaskDrawAll.cxx:540
CbmAnaDielectronTaskDrawAll::DrawMinvPt
void DrawMinvPt(CbmLmvmAnalysisSteps step)
Draw invariant mass spectra vs Pt for all signal types for specified analysis step.
Definition: CbmAnaDielectronTaskDrawAll.cxx:446
CbmAnaDielectronTaskDrawAll::fHM
std::vector< CbmHistManager * > fHM
Definition: CbmAnaDielectronTaskDrawAll.h:80
CbmAnaDielectronTaskDrawAll::SBgRangeAll
void SBgRangeAll()
Draw S/BG vs plots for different mass ranges.
Definition: CbmAnaDielectronTaskDrawAll.cxx:646
CbmAnaDielectronTaskDrawAll::fh_mean_eta_minv_pt
std::vector< TH2D * > fh_mean_eta_minv_pt
Definition: CbmAnaDielectronTaskDrawAll.h:86
CbmAnaDielectronTaskDrawAll::fh_sum_s_minv
std::vector< TH1D * > fh_sum_s_minv
Definition: CbmAnaDielectronTaskDrawAll.h:93
kQgp
@ kQgp
Definition: CbmAnaDielectronTaskDrawAll.h:25
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmLmvmHist.h
CbmAnaDielectronTaskDrawAll::fh_mean_pi0_minv
std::vector< TH1D * > fh_mean_pi0_minv
Definition: CbmAnaDielectronTaskDrawAll.h:85
CbmAnaDielectronTaskDrawAll::fh_mean_pi0_minv_pt
std::vector< TH2D * > fh_mean_pi0_minv_pt
Definition: CbmAnaDielectronTaskDrawAll.h:87
CbmAnaDielectronTaskDrawAll::DrawHistosFromFile
void DrawHistosFromFile(const std::string &fileNameInmed, const std::string &fileNameQgp, const std::string &fileNameOmega, const std::string &fileNamePhi, const std::string &fileNameOmegaDalitz, const std::string &outputDir="", Bool_t useMvd=false)
Implement functionality of drawing histograms in the macro from the specified files,...
Definition: CbmAnaDielectronTaskDrawAll.cxx:36
kInmed
@ kInmed
Definition: CbmAnaDielectronTaskDrawAll.h:25
CbmAnaDielectronTaskDrawAll::FillMeanHist
void FillMeanHist()
It creates a mean histogram from 4 files.
Definition: CbmAnaDielectronTaskDrawAll.cxx:478
CbmAnaDielectronTaskDrawAll::fDrawQgp
Bool_t fDrawQgp
Definition: CbmAnaDielectronTaskDrawAll.h:77
CbmAnaDielectronTaskDrawAll::CalcCutEffRange
void CalcCutEffRange(Double_t minMinv, Double_t maxMinv)
Calculate cut efficiency in specified invariant mass region.
Definition: CbmAnaDielectronTaskDrawAll.cxx:563
CbmAnaDielectronTaskDrawAll::fh_mean_sbg_vs_minv
std::vector< TH1D * > fh_mean_sbg_vs_minv
Definition: CbmAnaDielectronTaskDrawAll.h:89
CbmAnaDielectronTaskDrawAll::fNofSignals
static const int fNofSignals
Definition: CbmAnaDielectronTaskDrawAll.h:73
CbmAnaDielectronTaskDrawAll::fOutputDir
std::string fOutputDir
Definition: CbmAnaDielectronTaskDrawAll.h:95
CbmAnaDielectronTaskDrawAll::SBgRange
TH1D * SBgRange(Double_t minMinv, Double_t maxMinv)
Create S/BG vs cuts for specified invariant mass range.
Definition: CbmAnaDielectronTaskDrawAll.cxx:615
CbmAnaDielectronTaskDrawAll::H1
TH1D * H1(int signalType, const std::string &name)
Definition: CbmAnaDielectronTaskDrawAll.cxx:90
CbmAnaDielectronTaskDrawAll::fh_mean_bg_minv
std::vector< TH1D * > fh_mean_bg_minv
Definition: CbmAnaDielectronTaskDrawAll.h:83
CbmAnaDielectronTaskDrawAll
Definition: CbmAnaDielectronTaskDrawAll.h:27
CbmAnaDielectronTaskDrawAll::operator=
CbmAnaDielectronTaskDrawAll operator=(const CbmAnaDielectronTaskDrawAll &)
CbmAnaDielectronTaskDrawAll::fh_mean_eta_minv
std::vector< TH1D * > fh_mean_eta_minv
Definition: CbmAnaDielectronTaskDrawAll.h:84
CbmAnaDielectronTaskDrawAll::~CbmAnaDielectronTaskDrawAll
virtual ~CbmAnaDielectronTaskDrawAll()
Destructor.
Definition: CbmAnaDielectronTaskDrawAll.h:52
CbmAnaDielectronTaskDrawAll::GetCoctailMinv
TH1D * GetCoctailMinv(CbmLmvmAnalysisSteps step)
Create and return cotail vs. minv.
Definition: CbmAnaDielectronTaskDrawAll.cxx:98
CbmAnaDielectronTaskDrawAll::DrawSBgVsMinv
void DrawSBgVsMinv()
Draw S/Bg vs minv.
Definition: CbmAnaDielectronTaskDrawAll.cxx:397
kPhi
@ kPhi
Definition: CbmAnaDielectronTaskDrawAll.h:25
CbmLmvmAnalysisSteps
CbmLmvmAnalysisSteps
Definition: CbmLmvmHist.h:15
SignalType
SignalType
Definition: CbmAnaDielectronTaskDrawAll.h:25