CbmRoot
Loading...
Searching...
No Matches
CbmAnaDielectronStudyReportAll.cxx
Go to the documentation of this file.
1/* Copyright (C) 2012-2019 UGiessen, JINR-LIT
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Elena Lebedeva, Semen Lebedev [committer] */
4
6
7#include "CbmDrawHist.h"
8#include "CbmHistManager.h"
9#include "CbmReportElement.h"
10#include "CbmUtils.h"
11
12#include "TSystem.h"
13
14#include <boost/assign/list_of.hpp>
15
16#include <sstream>
17
18#include "LmvmHist.h"
19using boost::assign::list_of;
20using std::string;
21using std::stringstream;
22using std::vector;
23
25{
26 SetReportName("lmvm_analysis_study_report");
27 SetReportTitle("LMVM analysis study report");
28}
29
31
33{
34 Out().precision(3);
35 Out() << R()->DocumentBegin();
36 Out() << R()->Title(0, GetTitle());
38 Out() << R()->DocumentEnd();
39}
40
46
48{
49 Int_t nofStudies = HM().size();
50 CreateCanvas("lmvmStudyAll_minvBg_ptcut", "lmvmStudyAll_minvBg_ptcut", 1000, 1000);
51 vector<TH1*> histos1(nofStudies);
52 vector<string> legendNames;
53 for (Int_t iStudy = 0; iStudy < nofStudies; iStudy++) {
54 histos1[iStudy] = HM()[iStudy]->H1("fh_bg_minv_ptcut");
55 histos1[iStudy]->Rebin(20);
56 ;
57 histos1[iStudy]->Scale(1. / 20.);
58 histos1[iStudy]->GetXaxis()->SetRangeUser(0, 2.);
59 legendNames.push_back(GetStudyNames()[iStudy]);
60 }
61 DrawH1(histos1, legendNames, kLinear, kLinear, true, 0.6, 0.75, 0.99, 0.99);
62}
void SetDefaultDrawStyle()
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)
Helper functions for drawing 1D and 2D histograms and graphs.
@ kLinear
Definition CbmDrawHist.h:69
Histogram manager.
Abstract class for basic report elements (headers, tables, images etc.).
int Int_t
void Create()
Inherited from CbmLitStudyReport.
void Draw()
Inherited from CbmLitStudyReport.
void DrawBgMinv()
Draw Invariant mass of combinatorial BG.
virtual std::string Title(int size, const std::string &title) const =0
Return string with title.
virtual std::string DocumentBegin() const =0
Return string with open tags for document.
virtual std::string DocumentEnd() const =0
Return string with close tags of the document.
std::ostream & Out() const
All text output goes to this stream.
Definition CbmReport.h:66
void SetReportName(const std::string &name)
Definition CbmReport.h:69
void PrintCanvases() const
Print images created from canvases in the report.
void SetReportTitle(const std::string &title)
Definition CbmReport.h:70
const CbmReportElement * R() const
Accessor to CbmReportElement object. User has to write the report using available tags from CbmReport...
Definition CbmReport.h:61
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:94
Base class for study reports.
const std::vector< std::string > & GetStudyNames() const
const std::vector< CbmHistManager * > & HM() const