CbmRoot
CbmAnaDielectronTaskDraw.h
Go to the documentation of this file.
1 
7 #ifndef CBM_ANA_DIELECTRON_TASK_DRAW_H
8 #define CBM_ANA_DIELECTRON_TASK_DRAW_H
9 
10 #include "CbmLmvmCuts.h"
11 #include "CbmLmvmHist.h"
12 
13 #include "TObject.h"
14 
15 #include <string>
16 #include <vector>
17 
18 class TH1;
19 class TH2D;
20 class TH1D;
21 class TFile;
22 class TCanvas;
23 class CbmHistManager;
24 
25 
26 class CbmAnaDielectronTaskDraw : public TObject {
27 
28 public:
30 
31  virtual ~CbmAnaDielectronTaskDraw() { ; }
32 
41  void DrawHistFromFile(const std::string& fileName,
42  const std::string& outputDir = "",
43  Bool_t useMvd = true,
44  Bool_t drawSig = true);
45 
46 private:
47  Int_t fNofEvents;
48  Bool_t
49  fUseMvd; // do you want to draw histograms related to the MVD detector?
50  Bool_t
51  fDrawSignificance; // do you want to draw significance histograms of 1D cuts?
52 
53  CbmLmvmCuts fCuts; // electron identification and analysis cuts
54 
55  CbmHistManager* fHM; //histogram manager
56  std::string fOutputDir; // output directory for results
57 
62  void RebinMinvHist();
63 
68  TH1D* H1(const std::string& name);
69 
74  TH2D* H2(const std::string& name);
75 
79  void SaveCanvasToImage();
80 
89  void DrawEfficiencyOnHist(TH1* h1, TH1* h2, Double_t xPos, Double_t yPos);
90 
98  TH1D* CreateSignificanceH1D(TH1D* s,
99  TH1D* bg,
100  const std::string& name,
101  const std::string& option);
102 
106  TH2D* CreateSignificanceH2D(TH2D* signal,
107  TH2D* bg,
108  const std::string& name,
109  const std::string& title);
110 
117  void SOverBg(CbmLmvmAnalysisSteps step);
118 
123  void SOverBgAll();
124 
130  void DrawPtYDistribution(int step, bool drawAnaStep = true);
131 
136  void DrawPtYDistributionAll();
137 
142 
148  void DrawPtYEfficiency(int step, bool drawAnaStep = true);
149 
153  void DrawPtYEfficiencyAll();
154 
159 
164 
168  void DrawMotherPdg();
169 
173  void DrawPPAngleMCSignal();
174 
175  // Draw distribution and significance of 1D analysis cut
176  void Draw1DSourceTypes(const std::string& hName, bool doScale = true);
177 
178  void Draw1DCut(const std::string& hName,
179  const std::string& sigOption,
180  double cutValue = -999999.);
181 
182  void DrawElPiMomHis();
183 
184  void Draw2DCutTriangle(double xCross, double yCross);
185 
186  void Draw2DCut(const std::string& hist,
187  double cutCrossX = -999999.,
188  double cutCrossY = -999999.);
189 
190  void DrawCutDistributions();
191 
193 
194  void
195  DrawSourcesBgPairsEpEm(int step, bool inPercent, bool drawAnaStep = true);
196 
200  void DrawSourcesBgPairsAll();
201 
202  void DrawGammaVertex();
203 
204  void Draw1DHistoForEachAnalysisStep(const std::string& hist,
205  Bool_t logy = false);
206 
207  //Draw Invariant mass distributions after each cut
209 
210  void DrawMinvSandBg(int step);
211 
212  // Invariant mass distribution after each cut for source of BG
213  void DrawMinvSandBgAll();
214 
215 
216  void DrawMinvSource(int step, bool drawAnaStep = true);
217 
218  // Invariant mass distribution after each cut for source of BG
219  void DrawMinvSourceAll();
220 
221  /*
222  * \brief Remove MVD bins from histograms if MVD detector was not used.
223  */
224  void RemoveMvdCutBins();
225 
226 
227  void DrawBgSource2D(const std::string& canvasName,
228  const std::string& histName,
229  const std::vector<std::string>& yLabels,
230  double scale,
231  const std::string& zTitle);
232 
233 
234  //SOURCE TRACKS
235  void DrawBgSourceTracks();
236 
240  void SetAnalysisStepLabels(TH1* h);
241 
242  void DrawMinvPtAll();
243 
245 
246  void DrawMvdCutQa();
247 
248  void DrawMvdAndStsHist();
249 
250  void DrawPmtXY();
251 
254 
256 };
257 
258 #endif
CbmAnaDielectronTaskDraw::fCuts
CbmLmvmCuts fCuts
Definition: CbmAnaDielectronTaskDraw.h:53
CbmAnaDielectronTaskDraw::fDrawSignificance
Bool_t fDrawSignificance
Definition: CbmAnaDielectronTaskDraw.h:51
CbmAnaDielectronTaskDraw::DrawPtYDistribution
void DrawPtYDistribution(int step, bool drawAnaStep=true)
Definition: CbmAnaDielectronTaskDraw.cxx:278
CbmAnaDielectronTaskDraw::DrawMismatchesAndGhosts
void DrawMismatchesAndGhosts()
Definition: CbmAnaDielectronTaskDraw.cxx:1268
CbmLmvmCuts.h
CbmAnaDielectronTaskDraw::ClassDef
ClassDef(CbmAnaDielectronTaskDraw, 1)
CbmAnaDielectronTaskDraw::DrawMinvSourceAll
void DrawMinvSourceAll()
Definition: CbmAnaDielectronTaskDraw.cxx:885
CbmAnaDielectronTaskDraw::DrawMinvSandBgAll
void DrawMinvSandBgAll()
Definition: CbmAnaDielectronTaskDraw.cxx:832
CbmAnaDielectronTaskDraw::DrawSourcesBgPairsEpEm
void DrawSourcesBgPairsEpEm(int step, bool inPercent, bool drawAnaStep=true)
Definition: CbmAnaDielectronTaskDraw.cxx:515
CbmAnaDielectronTaskDraw::DrawRapidityDistributionAll
void DrawRapidityDistributionAll()
Definition: CbmAnaDielectronTaskDraw.cxx:312
CbmAnaDielectronTaskDraw::DrawPtYEfficiencyAll
void DrawPtYEfficiencyAll()
Definition: CbmAnaDielectronTaskDraw.cxx:342
CbmAnaDielectronTaskDraw::SOverBg
void SOverBg(CbmLmvmAnalysisSteps step)
Fit signal histogram using Fit("gaus"). Calculate S/BG ratio in 2 sigma region. Print summary table o...
Definition: CbmAnaDielectronTaskDraw.cxx:240
CbmAnaDielectronTaskDraw::Draw1DHistoForEachAnalysisStep
void Draw1DHistoForEachAnalysisStep(const std::string &hist, Bool_t logy=false)
Definition: CbmAnaDielectronTaskDraw.cxx:741
CbmAnaDielectronTaskDraw::RemoveMvdCutBins
void RemoveMvdCutBins()
Definition: CbmAnaDielectronTaskDraw.cxx:1125
CbmAnaDielectronTaskDraw::DrawMvdCutQa
void DrawMvdCutQa()
Definition: CbmAnaDielectronTaskDraw.cxx:1390
CbmAnaDielectronTaskDraw::CreateSignificanceH2D
TH2D * CreateSignificanceH2D(TH2D *signal, TH2D *bg, const std::string &name, const std::string &title)
Definition: CbmAnaDielectronTaskDraw.cxx:191
CbmAnaDielectronTaskDraw::DrawBgSource2D
void DrawBgSource2D(const std::string &canvasName, const std::string &histName, const std::vector< std::string > &yLabels, double scale, const std::string &zTitle)
Definition: CbmAnaDielectronTaskDraw.cxx:1154
CbmAnaDielectronTaskDraw::fNofEvents
Int_t fNofEvents
Definition: CbmAnaDielectronTaskDraw.h:47
CbmAnaDielectronTaskDraw::SOverBgAll
void SOverBgAll()
Definition: CbmAnaDielectronTaskDraw.cxx:265
CbmAnaDielectronTaskDraw::DrawElPiMomHis
void DrawElPiMomHis()
Definition: CbmAnaDielectronTaskDraw.cxx:977
CbmAnaDielectronTaskDraw::DrawBgSourceTracks
void DrawBgSourceTracks()
Definition: CbmAnaDielectronTaskDraw.cxx:1211
CbmAnaDielectronTaskDraw::SaveCanvasToImage
void SaveCanvasToImage()
Save all created canvases to images.
Definition: CbmAnaDielectronTaskDraw.cxx:1431
CbmAnaDielectronTaskDraw::~CbmAnaDielectronTaskDraw
virtual ~CbmAnaDielectronTaskDraw()
Definition: CbmAnaDielectronTaskDraw.h:31
CbmAnaDielectronTaskDraw::fUseMvd
Bool_t fUseMvd
Definition: CbmAnaDielectronTaskDraw.h:49
CbmAnaDielectronTaskDraw::Draw1DCut
void Draw1DCut(const std::string &hName, const std::string &sigOption, double cutValue=-999999.)
Definition: CbmAnaDielectronTaskDraw.cxx:436
CbmAnaDielectronTaskDraw::DrawMinvSandBg
void DrawMinvSandBg(int step)
Definition: CbmAnaDielectronTaskDraw.cxx:801
CbmAnaDielectronTaskDraw::SetAnalysisStepLabels
void SetAnalysisStepLabels(TH1 *h)
Set labels of X axis usinf analysis steps names.
Definition: CbmAnaDielectronTaskDraw.cxx:1318
CbmAnaDielectronTaskDraw::H1
TH1D * H1(const std::string &name)
Return TH1D* pointer to the specified histogram.
Definition: CbmAnaDielectronTaskDraw.cxx:121
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
h
Data class with information on a STS local track.
CbmAnaDielectronTaskDraw::DrawEfficiencyOnHist
void DrawEfficiencyOnHist(TH1 *h1, TH1 *h2, Double_t xPos, Double_t yPos)
Draw an integrated efficiency on a histogram (100.*h1->GetEntries()/h2->GetEntries())....
Definition: CbmAnaDielectronTaskDraw.cxx:135
CbmLmvmHist.h
CbmAnaDielectronTaskDraw::DrawPPAngleMCSignal
void DrawPPAngleMCSignal()
Definition: CbmAnaDielectronTaskDraw.cxx:399
CbmAnaDielectronTaskDraw::DrawMvdAndStsHist
void DrawMvdAndStsHist()
Definition: CbmAnaDielectronTaskDraw.cxx:1410
CbmAnaDielectronTaskDraw::DrawMotherPdg
void DrawMotherPdg()
Definition: CbmAnaDielectronTaskDraw.cxx:386
CbmAnaDielectronTaskDraw::Draw2DCut
void Draw2DCut(const std::string &hist, double cutCrossX=-999999., double cutCrossY=-999999.)
Definition: CbmAnaDielectronTaskDraw.cxx:604
CbmAnaDielectronTaskDraw::H2
TH2D * H2(const std::string &name)
Return TH2D* pointer to the specified histogram.
Definition: CbmAnaDielectronTaskDraw.cxx:131
CbmAnaDielectronTaskDraw::Draw1DSourceTypes
void Draw1DSourceTypes(const std::string &hName, bool doScale=true)
Definition: CbmAnaDielectronTaskDraw.cxx:421
CbmAnaDielectronTaskDraw::CbmAnaDielectronTaskDraw
CbmAnaDielectronTaskDraw(const CbmAnaDielectronTaskDraw &)
CbmAnaDielectronTaskDraw::DrawMinvForEachAnalysisStep
void DrawMinvForEachAnalysisStep()
Definition: CbmAnaDielectronTaskDraw.cxx:772
CbmLmvmCuts
Definition: CbmLmvmCuts.h:15
CbmAnaDielectronTaskDraw::DrawSourcesBgPairsAll
void DrawSourcesBgPairsAll()
Definition: CbmAnaDielectronTaskDraw.cxx:542
CbmAnaDielectronTaskDraw::operator=
CbmAnaDielectronTaskDraw & operator=(const CbmAnaDielectronTaskDraw &)
CbmAnaDielectronTaskDraw::DrawMomentumEfficiencyAll
void DrawMomentumEfficiencyAll()
Definition: CbmAnaDielectronTaskDraw.cxx:366
CbmAnaDielectronTaskDraw::DrawBgSourcesVsMomentum
void DrawBgSourcesVsMomentum()
Definition: CbmAnaDielectronTaskDraw.cxx:1343
CbmAnaDielectronTaskDraw::DrawMinvPtAll
void DrawMinvPtAll()
Definition: CbmAnaDielectronTaskDraw.cxx:1328
CbmAnaDielectronTaskDraw::DrawMinvSource
void DrawMinvSource(int step, bool drawAnaStep=true)
Definition: CbmAnaDielectronTaskDraw.cxx:848
CbmAnaDielectronTaskDraw::fOutputDir
std::string fOutputDir
Definition: CbmAnaDielectronTaskDraw.h:56
CbmAnaDielectronTaskDraw
Definition: CbmAnaDielectronTaskDraw.h:26
CbmAnaDielectronTaskDraw::fHM
CbmHistManager * fHM
Definition: CbmAnaDielectronTaskDraw.h:55
CbmAnaDielectronTaskDraw::DrawCutDistributions
void DrawCutDistributions()
Definition: CbmAnaDielectronTaskDraw.cxx:464
CbmAnaDielectronTaskDraw::DrawHistFromFile
void DrawHistFromFile(const std::string &fileName, const std::string &outputDir="", Bool_t useMvd=true, Bool_t drawSig=true)
Implement functionality of drawing histograms in the macro from the specified file,...
Definition: CbmAnaDielectronTaskDraw.cxx:51
CbmAnaDielectronTaskDraw::Draw2DCutTriangle
void Draw2DCutTriangle(double xCross, double yCross)
Definition: CbmAnaDielectronTaskDraw.cxx:590
CbmAnaDielectronTaskDraw::DrawGammaVertex
void DrawGammaVertex()
Definition: CbmAnaDielectronTaskDraw.cxx:670
CbmAnaDielectronTaskDraw::DrawMomentumDistributionAll
void DrawMomentumDistributionAll()
Definition: CbmAnaDielectronTaskDraw.cxx:358
CbmAnaDielectronTaskDraw::CreateSignificanceH1D
TH1D * CreateSignificanceH1D(TH1D *s, TH1D *bg, const std::string &name, const std::string &option)
Definition: CbmAnaDielectronTaskDraw.cxx:150
CbmAnaDielectronTaskDraw::DrawPtYDistributionAll
void DrawPtYDistributionAll()
Definition: CbmAnaDielectronTaskDraw.cxx:288
CbmAnaDielectronTaskDraw::DrawPmtXY
void DrawPmtXY()
Definition: CbmAnaDielectronTaskDraw.cxx:404
CbmAnaDielectronTaskDraw::RebinMinvHist
void RebinMinvHist()
Rebin minv histograms for better drawing. Should be called after calculation of S/BG ratios.
Definition: CbmAnaDielectronTaskDraw.cxx:99
CbmLmvmAnalysisSteps
CbmLmvmAnalysisSteps
Definition: CbmLmvmHist.h:15
CbmAnaDielectronTaskDraw::DrawPtYEfficiency
void DrawPtYEfficiency(int step, bool drawAnaStep=true)
Draw efficiency in dependence on Pt and Rapidity. Efficiency is normalized to the previous step.
Definition: CbmAnaDielectronTaskDraw.cxx:328
CbmAnaDielectronTaskDraw::CbmAnaDielectronTaskDraw
CbmAnaDielectronTaskDraw()
Definition: CbmAnaDielectronTaskDraw.cxx:42