CbmRoot
CbmAnaDielectronStudyReportAll.cxx
Go to the documentation of this file.
2 #include "CbmDrawHist.h"
3 #include "CbmHistManager.h"
4 #include "CbmLmvmHist.h"
5 #include "CbmReportElement.h"
6 #include "CbmUtils.h"
7 #include "TSystem.h"
8 
9 #include <boost/assign/list_of.hpp>
10 #include <sstream>
11 using boost::assign::list_of;
12 using std::string;
13 using std::stringstream;
14 using std::vector;
15 
17  : CbmStudyReport() {
18  SetReportName("lmvm_analysis_study_report");
19  SetReportTitle("LMVM analysis study report");
20 }
21 
23 
25  Out().precision(3);
26  Out() << R()->DocumentBegin();
27  Out() << R()->Title(0, GetTitle());
28  PrintCanvases();
29  Out() << R()->DocumentEnd();
30 }
31 
34  DrawBgMinv();
35  DrawSBgMinv();
36 }
37 
39  Int_t nofStudies = HM().size();
40  CreateCanvas("lmvm_study_report_bg_minv_ptcut",
41  "lmvm_study_report_bg_minv_ptcut",
42  600,
43  600);
44  vector<TH1*> histos1(nofStudies);
45  vector<string> legendNames;
46  for (Int_t iStudy = 0; iStudy < nofStudies; iStudy++) {
47  histos1[iStudy] = HM()[iStudy]->H1("fh_bg_minv_ptcut");
48  histos1[iStudy]->Rebin(20);
49  ;
50  histos1[iStudy]->Scale(1. / 20.);
51  histos1[iStudy]->GetXaxis()->SetRangeUser(0, 2.);
52  legendNames.push_back(GetStudyNames()[iStudy]);
53  }
54  DrawH1(histos1, legendNames, kLinear, kLinear, true, 0.6, 0.75, 0.99, 0.99);
55 }
56 
58  Int_t nofStudies = HM().size();
59  CreateCanvas("lmvm_study_report_sbg_vs_minv_ptcut",
60  "lmvm_study_report_sbg_vs_minv_ptcut",
61  600,
62  600);
63  vector<TH1*> histos1(nofStudies);
64  vector<string> legendNames;
65  for (Int_t iStudy = 0; iStudy < nofStudies; iStudy++) {
66  histos1[iStudy] = HM()[iStudy]->H1("fh_sbg_vs_minv_ptcut");
67  // histos1[iStudy]->Rebin(4);;
68  // histos1[iStudy]->Scale(1./4.);
69  histos1[iStudy]->GetXaxis()->SetRangeUser(0, 2.);
70  legendNames.push_back(GetStudyNames()[iStudy]);
71  }
72  DrawH1(histos1, legendNames, kLinear, kLog, true, 0.6, 0.75, 0.99, 0.99);
73 }
CbmReport::CreateCanvas
TCanvas * CreateCanvas(const char *name, const char *title, Int_t ww, Int_t wh)
Create canvas and put it to vector of TCanvases. Canvases created with this function will be automati...
Definition: CbmReport.cxx:82
CbmAnaDielectronStudyReportAll.h
CbmStudyReport
Base class for study reports.
Definition: CbmStudyReport.h:26
CbmReportElement::DocumentBegin
virtual std::string DocumentBegin() const =0
Return string with open tags for document.
CbmReportElement::DocumentEnd
virtual std::string DocumentEnd() const =0
Return string with close tags of the document.
CbmReport::R
const CbmReportElement * R() const
Accessor to CbmReportElement object. User has to write the report using available tags from CbmReport...
Definition: CbmReport.h:51
CbmAnaDielectronStudyReportAll::~CbmAnaDielectronStudyReportAll
virtual ~CbmAnaDielectronStudyReportAll()
Destructor.
Definition: CbmAnaDielectronStudyReportAll.cxx:22
CbmAnaDielectronStudyReportAll::DrawBgMinv
void DrawBgMinv()
Draw Invariant mass of combinatorial BG.
Definition: CbmAnaDielectronStudyReportAll.cxx:38
CbmDrawHist.h
Helper functions for drawing 1D and 2D histograms and graphs.
CbmReportElement.h
Abstract class for basic report elements (headers, tables, images etc.).
CbmHistManager.h
Histogram manager.
CbmReport::SetReportName
void SetReportName(const std::string &name)
Definition: CbmReport.h:59
DrawH1
void DrawH1(TH1 *hist, HistScale logx, HistScale logy, const string &drawOpt, Int_t color, Int_t lineWidth, Int_t lineStyle, Int_t markerSize, Int_t markerStyle)
Definition: CbmDrawHist.cxx:49
CbmReport::PrintCanvases
void PrintCanvases() const
Print images created from canvases in the report.
Definition: CbmReport.cxx:109
CbmLmvmHist.h
kLinear
@ kLinear
Definition: CbmDrawHist.h:79
CbmStudyReport::HM
const std::vector< CbmHistManager * > & HM() const
Definition: CbmStudyReport.h:74
CbmAnaDielectronStudyReportAll::Draw
void Draw()
Inherited from CbmLitStudyReport.
Definition: CbmAnaDielectronStudyReportAll.cxx:32
CbmUtils.h
CbmStudyReport::GetStudyNames
const std::vector< std::string > & GetStudyNames() const
Definition: CbmStudyReport.h:76
CbmReport::Out
std::ostream & Out() const
All text output goes to this stream.
Definition: CbmReport.h:56
SetDefaultDrawStyle
void SetDefaultDrawStyle()
Definition: CbmDrawHist.cxx:33
CbmAnaDielectronStudyReportAll::CbmAnaDielectronStudyReportAll
CbmAnaDielectronStudyReportAll()
Constructor.
Definition: CbmAnaDielectronStudyReportAll.cxx:16
CbmAnaDielectronStudyReportAll::Create
void Create()
Inherited from CbmLitStudyReport.
Definition: CbmAnaDielectronStudyReportAll.cxx:24
CbmReportElement::Title
virtual std::string Title(int size, const std::string &title) const =0
Return string with title.
CbmAnaDielectronStudyReportAll::DrawSBgMinv
void DrawSBgMinv()
Draw S/Bg ratio vs invariant mass.
Definition: CbmAnaDielectronStudyReportAll.cxx:57
kLog
@ kLog
Definition: CbmDrawHist.h:78
CbmReport::SetReportTitle
void SetReportTitle(const std::string &title)
Definition: CbmReport.h:60