CbmRoot
Loading...
Searching...
No Matches
CbmRichGeoTestStudyReport.cxx
Go to the documentation of this file.
1/* Copyright (C) 2012-2016 UGiessen/JINR-LIT, Giessen/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev, Semen Lebedev [committer] */
4
11
12#include "CbmReportElement.h"
13#include "TSystem.h"
14
15#include <boost/assign/list_of.hpp>
16#include <boost/property_tree/ptree.hpp>
17using boost::assign::list_of;
18using std::endl;
19using std::stringstream;
20using std::vector;
21
23
25
27{
28 Out().precision(3);
29 Out() << R()->DocumentBegin();
30 Out() << R()->Title(0, GetTitle());
31
32 Out() << R()->TableBegin("Efficiencies", list_of(string("")).range(GetStudyNames()));
33 Out() << PrintRow("acc_mean", "ACC");
34 Out() << PrintRow("circle_fit_eff_mean", "Circle fit");
35 Out() << PrintRow("ellipse_fit_eff_mean", "Ellipse fit");
36 Out() << R()->TableEnd() << endl;
37
38 Out() << R()->TableBegin("Nof point and hits in ring", list_of(string("")).range(GetStudyNames()));
39 Out() << PrintRow("nof_points_in_ring_mean", "Nof points, mean");
40 Out() << PrintRow("nof_points_in_ring_rms", "Nof points, rms");
41 Out() << PrintRow("nof_hits_in_ring_mean", "Nof hits, mean");
42 Out() << PrintRow("nof_hits_in_ring_rms", "Nof hits, rms");
43 Out() << R()->TableEnd() << endl;
44
45 Out() << R()->TableBegin("Point fit", list_of(string("")).range(GetStudyNames()));
46 Out() << PrintRow("points_fit_a_axis_mean", "A axis, mean");
47 Out() << PrintRow("points_fit_a_axis_rms", "A axis, rms");
48 Out() << PrintRow("points_fit_b_axis_mean", "B axis, mean");
49 Out() << PrintRow("points_fit_b_axis_rms", "B axis, rms");
50 Out() << PrintRow("points_fit_boa_mean", "B/A, mean");
51 Out() << PrintRow("points_fit_boa_rms", "B/A, rms");
52 Out() << PrintRow("points_fit_r_mean", "Radius, mean");
53 Out() << PrintRow("points_fit_r_rms", "Radius, mean");
54 Out() << R()->TableEnd() << endl;
55
56 Out() << R()->TableBegin("Hit fit", list_of(string("")).range(GetStudyNames()));
57 Out() << PrintRow("hits_fit_a_axis_mean", "A axis, mean");
58 Out() << PrintRow("hits_fit_a_axis_rms", "A axis, rms");
59 Out() << PrintRow("hits_fit_b_axis_mean", "B axis, mean");
60 Out() << PrintRow("hits_fit_b_axis_rms", "B axis, rms");
61 Out() << PrintRow("hits_fit_boa_mean", "B/A, mean");
62 Out() << PrintRow("hits_fit_boa_rms", "B/A, rms");
63 Out() << PrintRow("hits_fit_r_mean", "Radius, mean");
64 Out() << PrintRow("hits_fit_r_rms", "Radius, mean");
65 Out() << R()->TableEnd() << endl;
66
67 Out() << R()->TableBegin("Point fit vs. hit fit. Ellipse.", list_of(string("")).range(GetStudyNames()));
68 Out() << PrintRow("diff_ellipse_da_mean", "dA, mean");
69 Out() << PrintRow("diff_ellipse_da_rms", "dA, rms");
70 Out() << PrintRow("diff_ellipse_db_mean", "dB, mean");
71 Out() << PrintRow("diff_ellipse_db_rms", "dB, rms");
72 Out() << PrintRow("diff_ellipse_dx_mean", "dX, mean");
73 Out() << PrintRow("diff_ellipse_dx_rms", "dX, rms");
74 Out() << PrintRow("diff_ellipse_dy_mean", "dY, mean");
75 Out() << PrintRow("diff_ellipse_dy_rms", "dY, rms");
76 Out() << R()->TableEnd() << endl;
77
78 Out() << R()->TableBegin("Point fit vs. hit fit. Circle.", list_of(string("")).range(GetStudyNames()));
79 Out() << PrintRow("diff_circle_dr_mean", "dR, mean");
80 Out() << PrintRow("diff_circle_dr_rms", "dR, rms");
81 Out() << PrintRow("diff_circle_dx_mean", "dX, mean");
82 Out() << PrintRow("diff_circle_dx_rms", "dX, rms");
83 Out() << PrintRow("diff_circle_dy_mean", "dY, mean");
84 Out() << PrintRow("diff_circle_dy_rms", "dY, rms");
85 Out() << R()->TableEnd() << endl;
86
87 Out() << R()->DocumentEnd();
88}
89
90string CbmRichGeoTestStudyReport::PrintRow(const string& property, const string& name)
91{
92 vector<string> n(GetStudyNames().size(), "");
93 for (unsigned int i = 0; i < GetStudyNames().size(); i++) {
94 n[i] = PrintValue(i, property);
95 }
96 return R()->TableRow(list_of(name).range(n));
97}
98
99string CbmRichGeoTestStudyReport::PrintValue(int /*studyId*/, const string& /*valueName*/)
100{
101 stringstream ss;
102 ss.precision(3);
103 // ss << fQa[studyId].get(valueName, -1.);
104 return ss.str();
105}
Abstract class for basic report elements (headers, tables, images etc.).
Creates study report for RICH geometry testing.
static constexpr size_t size()
Definition KfSimdPseudo.h:2
virtual std::string TableRow(const std::vector< std::string > &row) const =0
Return string with table row tags.
virtual std::string Title(int size, const std::string &title) const =0
Return string with title.
virtual std::string TableBegin(const std::string &caption, const std::vector< std::string > &colNames) const =0
Return string with table open tag.
virtual std::string DocumentBegin() const =0
Return string with open tags for document.
virtual std::string TableEnd() const =0
Return string with table close tag.
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
const CbmReportElement * R() const
Accessor to CbmReportElement object. User has to write the report using available tags from CbmReport...
Definition CbmReport.h:61
void Create()
Inherited from CbmLitStudyReport.
virtual string PrintValue(int studyId, const string &valueTitle)
virtual ~CbmRichGeoTestStudyReport()
Destructor.
virtual string PrintRow(const string &property, const string &name)
Print one row in a table.
const std::vector< std::string > & GetStudyNames() const