CbmRoot
Loading...
Searching...
No Matches
CbmLitRadLengthQaReport.cxx
Go to the documentation of this file.
1/* Copyright (C) 2013-2020 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer], Semen Lebedev */
4
11
12#include "CbmDrawHist.h"
13#include "CbmHistManager.h"
14#include "CbmReportElement.h"
15#include "TProfile2D.h"
16
18
20
22{
23 Out().precision(3);
24 Out() << R()->DocumentBegin();
25 Out() << R()->Title(0, GetTitle());
26
28
29 Out() << R()->DocumentEnd();
30}
31
33{
35
36 DrawDetector("Total");
37 DrawDetector("Mvd");
38 DrawDetector("Sts");
39 DrawDetector("Rich");
40 DrawDetector("Trd");
41 DrawDetector("Much");
42 DrawDetector("Tof");
43
47 DrawDetectorStation("Much");
48 DrawDetectorStation("MuchAbsorber");
49}
50
51void CbmLitRadLengthQaReport::DrawDetector(const string& detName)
52{
53 if (HM()->Exists("hrl_Thickness_" + detName + "_H1")) {
54 CreateCanvas(string("hrl_Thickness_" + detName + "_H1").c_str(), string("hrl_Thickness_" + detName + "_H1").c_str(),
55 1200, 1000);
56 DrawH1(HM()->H1("hrl_Thickness_" + detName + "_H1"));
57 }
58
59 if (HM()->Exists("hrl_Thickness_" + detName + "_P2")) {
60 CreateCanvas(string("hrl_Thickness_" + detName + "_P2").c_str(), string("hrl_Thickness_" + detName + "_P2").c_str(),
61 1200, 1000);
62 DrawH2(HM()->P2("hrl_Thickness_" + detName + "_P2"));
63 }
64
65 if (HM()->Exists("hrl_RadThickness_" + detName + "_H1")) {
66 CreateCanvas(string("hrl_RadThickness_" + detName + "_H1").c_str(),
67 string("hrl_RadThickness_" + detName + "_H1").c_str(), 1200, 1000);
68 DrawH1(HM()->H1("hrl_RadThickness_" + detName + "_H1"));
69 }
70
71 if (HM()->Exists("hrl_RadThickness_" + detName + "_P2")) {
72 CreateCanvas(string("hrl_RadThickness_" + detName + "_P2").c_str(),
73 string("hrl_RadThickness_" + detName + "_P2").c_str(), 1200, 1000);
74 DrawH2(HM()->P2("hrl_RadThickness_" + detName + "_P2"));
75
76
77 CreateCanvas(string("hrl_RadThickness_" + detName + "_P2_zoom").c_str(),
78 string("hrl_RadThickness_" + detName + "_P2_zoom").c_str(), 1200, 1000);
79 TProfile2D* pr = (TProfile2D*) HM()->P2("hrl_RadThickness_" + detName + "_P2")->Clone();
80 pr->GetZaxis()->SetRangeUser(0, 100);
81 DrawH2(pr);
82 }
83
84 if (HM()->Exists("hrl_ThicknessSilicon_" + detName + "_H1")) {
85 CreateCanvas(string("hrl_ThicknessSilicon_" + detName + "_H1").c_str(),
86 string("hrl_ThicknessSilicon_" + detName + "_H1").c_str(), 1200, 1000);
87 DrawH1(HM()->H1("hrl_ThicknessSilicon_" + detName + "_H1"));
88 }
89
90 if (HM()->Exists("hrl_ThicknessSilicon_" + detName + "_P2")) {
91 CreateCanvas(string("hrl_ThicknessSilicon_" + detName + "_P2").c_str(),
92 string("hrl_ThicknessSilicon_" + detName + "_P2").c_str(), 1200, 1000);
93 DrawH2(HM()->P2("hrl_ThicknessSilicon_" + detName + "_P2"));
94 }
95}
96
98{
99 DrawH1ByPattern("hrl_RadThickness_" + detName + "_.+_H1");
100 DrawH2ByPattern("hrl_RadThickness_" + detName + "_.+_P2");
101 DrawH1ByPattern("hrl_Thickness_" + detName + "_.+_H1");
102 DrawH2ByPattern("hrl_Thickness_" + detName + "_.+_P2");
103 DrawH1ByPattern("hrl_ThicknessSilicon_" + detName + "_.+_H1");
104 DrawH2ByPattern("hrl_ThicknessSilicon_" + detName + "_.+_P2");
105}
106
ClassImp(CbmConverterManager)
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)
void DrawH2(TH2 *hist, HistScale logx, HistScale logy, HistScale logz, const string &drawOpt)
Helper functions for drawing 1D and 2D histograms and graphs.
Histogram manager.
Create report for radiation length QA.
Abstract class for basic report elements (headers, tables, images etc.).
TProfile2D * P2(const std::string &name) const
Return pointer to TProfile2D.
Create report for radiation length QA.
virtual void Draw()
Inherited from CbmSimulationReport.
virtual void Create()
Inherited from CbmSimulationReport.
virtual ~CbmLitRadLengthQaReport()
Destructor.
void DrawDetector(const string &detName)
void DrawDetectorStation(const string &detName)
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.
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 simulation reports.
void DrawH1ByPattern(const std::string &histNamePattern)
Select by pattern TH1 histograms and draw each histogram on separate canvas.
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
CbmHistManager * HM() const
Return pointer to Histogram manager.
void DrawH2ByPattern(const std::string &histNamePattern, HistScale logx=kLinear, HistScale logy=kLinear, HistScale logz=kLinear, const std::string &drawOpt="")
Select by pattern TH2 histograms and draw each histogram on separate canvas.