CbmRoot
CbmLitRadLengthQaReport.cxx
Go to the documentation of this file.
1 
7 #include "CbmDrawHist.h"
8 #include "CbmHistManager.h"
9 #include "CbmReportElement.h"
10 
11 #include "TProfile2D.h"
12 
14  SetReportName("radlength_qa");
15 }
16 
18 
20  Out().precision(3);
21  Out() << R()->DocumentBegin();
22  Out() << R()->Title(0, GetTitle());
23 
24  PrintCanvases();
25 
26  Out() << R()->DocumentEnd();
27 }
28 
30  DrawDetector("Total");
31  DrawDetector("Mvd");
32  DrawDetector("Sts");
33  DrawDetector("Rich");
34  DrawDetector("Trd");
35  DrawDetector("Much");
36  DrawDetector("Tof");
37 
38  DrawDetectorStation("Mvd");
39  DrawDetectorStation("Sts");
40  DrawDetectorStation("Trd");
41  DrawDetectorStation("Much");
42  DrawDetectorStation("MuchAbsorber");
43 }
44 
45 void CbmLitRadLengthQaReport::DrawDetector(const string& detName) {
46  if (HM()->Exists("hrl_Thickness_" + detName + "_H1")) {
47  TCanvas* canvas1 =
48  CreateCanvas(string("hrl_Thickness_" + detName + "_H1").c_str(),
49  string("hrl_Thickness_" + detName + "_H1").c_str(),
50  1200,
51  1000);
52  DrawH1(HM()->H1("hrl_Thickness_" + detName + "_H1"));
53  }
54 
55  if (HM()->Exists("hrl_Thickness_" + detName + "_P2")) {
56  TCanvas* canvas2 =
57  CreateCanvas(string("hrl_Thickness_" + detName + "_P2").c_str(),
58  string("hrl_Thickness_" + detName + "_P2").c_str(),
59  1200,
60  1000);
61  DrawH2(HM()->P2("hrl_Thickness_" + detName + "_P2"));
62  }
63 
64  if (HM()->Exists("hrl_RadThickness_" + detName + "_H1")) {
65  TCanvas* canvas3 =
66  CreateCanvas(string("hrl_RadThickness_" + detName + "_H1").c_str(),
67  string("hrl_RadThickness_" + detName + "_H1").c_str(),
68  1200,
69  1000);
70  DrawH1(HM()->H1("hrl_RadThickness_" + detName + "_H1"));
71  }
72 
73  if (HM()->Exists("hrl_RadThickness_" + detName + "_P2")) {
74  TCanvas* canvas4 =
75  CreateCanvas(string("hrl_RadThickness_" + detName + "_P2").c_str(),
76  string("hrl_RadThickness_" + detName + "_P2").c_str(),
77  1200,
78  1000);
79  DrawH2(HM()->P2("hrl_RadThickness_" + detName + "_P2"));
80  }
81 
82  if (HM()->Exists("hrl_ThicknessSilicon_" + detName + "_H1")) {
83  TCanvas* canvas5 =
84  CreateCanvas(string("hrl_ThicknessSilicon_" + detName + "_H1").c_str(),
85  string("hrl_ThicknessSilicon_" + detName + "_H1").c_str(),
86  1200,
87  1000);
88  DrawH1(HM()->H1("hrl_ThicknessSilicon_" + detName + "_H1"));
89  }
90 
91  if (HM()->Exists("hrl_ThicknessSilicon_" + detName + "_P2")) {
92  TCanvas* canvas6 =
93  CreateCanvas(string("hrl_ThicknessSilicon_" + detName + "_P2").c_str(),
94  string("hrl_ThicknessSilicon_" + detName + "_P2").c_str(),
95  1200,
96  1000);
97  DrawH2(HM()->P2("hrl_ThicknessSilicon_" + detName + "_P2"));
98  }
99 }
100 
101 void CbmLitRadLengthQaReport::DrawDetectorStation(const string& detName) {
102  DrawH1ByPattern("hrl_RadThickness_" + detName + "_.+_H1");
103  DrawH2ByPattern("hrl_RadThickness_" + detName + "_.+_P2");
104  DrawH1ByPattern("hrl_Thickness_" + detName + "_.+_H1");
105  DrawH2ByPattern("hrl_Thickness_" + detName + "_.+_P2");
106  DrawH1ByPattern("hrl_ThicknessSilicon_" + detName + "_.+_H1");
107  DrawH2ByPattern("hrl_ThicknessSilicon_" + detName + "_.+_P2");
108 }
109 
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
CbmLitRadLengthQaReport::Draw
virtual void Draw()
Inherited from CbmSimulationReport.
Definition: CbmLitRadLengthQaReport.cxx:29
CbmReportElement::DocumentBegin
virtual std::string DocumentBegin() const =0
Return string with open tags for document.
CbmLitRadLengthQaReport::~CbmLitRadLengthQaReport
virtual ~CbmLitRadLengthQaReport()
Destructor.
Definition: CbmLitRadLengthQaReport.cxx:17
CbmReportElement::DocumentEnd
virtual std::string DocumentEnd() const =0
Return string with close tags of the document.
CbmLitRadLengthQaReport::Create
virtual void Create()
Inherited from CbmSimulationReport.
Definition: CbmLitRadLengthQaReport.cxx:19
CbmLitRadLengthQaReport::CbmLitRadLengthQaReport
CbmLitRadLengthQaReport()
Constructor.
Definition: CbmLitRadLengthQaReport.cxx:13
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
CbmDrawHist.h
Helper functions for drawing 1D and 2D histograms and graphs.
CbmLitRadLengthQaReport::DrawDetectorStation
void DrawDetectorStation(const string &detName)
Definition: CbmLitRadLengthQaReport.cxx:101
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
CbmLitRadLengthQaReport::DrawDetector
void DrawDetector(const string &detName)
Definition: CbmLitRadLengthQaReport.cxx:45
CbmReport::PrintCanvases
void PrintCanvases() const
Print images created from canvases in the report.
Definition: CbmReport.cxx:109
CbmSimulationReport::H1
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
Definition: CbmSimulationReport.h:73
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmSimulationReport::DrawH1ByPattern
void DrawH1ByPattern(const std::string &histNamePattern)
Select by pattern TH1 histograms and draw each histogram on separate canvas.
CbmSimulationReport::DrawH2ByPattern
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.
Definition: CbmSimulationReport.cxx:81
CbmSimulationReport::HM
CbmHistManager * HM() const
Return pointer to Histogram manager.
Definition: CbmSimulationReport.h:92
CbmSimulationReport
Base class for simulation reports.
Definition: CbmSimulationReport.h:28
CbmReport::Out
std::ostream & Out() const
All text output goes to this stream.
Definition: CbmReport.h:56
DrawH2
void DrawH2(TH2 *hist, HistScale logx, HistScale logy, HistScale logz, const string &drawOpt)
Definition: CbmDrawHist.cxx:84
CbmLitRadLengthQaReport.h
Create report for radiation length QA.
CbmReportElement::Title
virtual std::string Title(int size, const std::string &title) const =0
Return string with title.
CbmLitRadLengthQaReport
Create report for radiation length QA.
Definition: CbmLitRadLengthQaReport.h:23