CbmRoot
CbmRichGeoTestStudyReport.cxx
Go to the documentation of this file.
1 
7 #include "CbmReportElement.h"
8 
9 #include "TSystem.h"
10 
11 #include <boost/assign/list_of.hpp>
12 #include <boost/property_tree/ptree.hpp>
13 using boost::assign::list_of;
14 using std::endl;
15 using std::stringstream;
16 using std::vector;
17 
19  SetReportName("rich_geo_qa");
20 }
21 
23 
25  Out().precision(3);
26  Out() << R()->DocumentBegin();
27  Out() << R()->Title(0, GetTitle());
28 
29  Out() << R()->TableBegin("Efficiencies",
30  list_of(string("")).range(GetStudyNames()));
31  Out() << PrintRow("acc_mean", "ACC");
32  Out() << PrintRow("circle_fit_eff_mean", "Circle fit");
33  Out() << PrintRow("ellipse_fit_eff_mean", "Ellipse fit");
34  Out() << R()->TableEnd() << endl;
35 
36  Out() << R()->TableBegin("Nof point and hits in ring",
37  list_of(string("")).range(GetStudyNames()));
38  Out() << PrintRow("nof_points_in_ring_mean", "Nof points, mean");
39  Out() << PrintRow("nof_points_in_ring_rms", "Nof points, rms");
40  Out() << PrintRow("nof_hits_in_ring_mean", "Nof hits, mean");
41  Out() << PrintRow("nof_hits_in_ring_rms", "Nof hits, rms");
42  Out() << R()->TableEnd() << endl;
43 
44  Out() << R()->TableBegin("Point fit",
45  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",
57  list_of(string("")).range(GetStudyNames()));
58  Out() << PrintRow("hits_fit_a_axis_mean", "A axis, mean");
59  Out() << PrintRow("hits_fit_a_axis_rms", "A axis, rms");
60  Out() << PrintRow("hits_fit_b_axis_mean", "B axis, mean");
61  Out() << PrintRow("hits_fit_b_axis_rms", "B axis, rms");
62  Out() << PrintRow("hits_fit_boa_mean", "B/A, mean");
63  Out() << PrintRow("hits_fit_boa_rms", "B/A, rms");
64  Out() << PrintRow("hits_fit_r_mean", "Radius, mean");
65  Out() << PrintRow("hits_fit_r_rms", "Radius, mean");
66  Out() << R()->TableEnd() << endl;
67 
68  Out() << R()->TableBegin("Point fit vs. hit fit. Ellipse.",
69  list_of(string("")).range(GetStudyNames()));
70  Out() << PrintRow("diff_ellipse_da_mean", "dA, mean");
71  Out() << PrintRow("diff_ellipse_da_rms", "dA, rms");
72  Out() << PrintRow("diff_ellipse_db_mean", "dB, mean");
73  Out() << PrintRow("diff_ellipse_db_rms", "dB, rms");
74  Out() << PrintRow("diff_ellipse_dx_mean", "dX, mean");
75  Out() << PrintRow("diff_ellipse_dx_rms", "dX, rms");
76  Out() << PrintRow("diff_ellipse_dy_mean", "dY, mean");
77  Out() << PrintRow("diff_ellipse_dy_rms", "dY, rms");
78  Out() << R()->TableEnd() << endl;
79 
80  Out() << R()->TableBegin("Point fit vs. hit fit. Circle.",
81  list_of(string("")).range(GetStudyNames()));
82  Out() << PrintRow("diff_circle_dr_mean", "dR, mean");
83  Out() << PrintRow("diff_circle_dr_rms", "dR, rms");
84  Out() << PrintRow("diff_circle_dx_mean", "dX, mean");
85  Out() << PrintRow("diff_circle_dx_rms", "dX, rms");
86  Out() << PrintRow("diff_circle_dy_mean", "dY, mean");
87  Out() << PrintRow("diff_circle_dy_rms", "dY, rms");
88  Out() << R()->TableEnd() << endl;
89 
90  Out() << R()->DocumentEnd();
91 }
92 
93 string CbmRichGeoTestStudyReport::PrintRow(const string& property,
94  const string& name) {
95  vector<string> n(GetStudyNames().size(), "");
96  for (unsigned int i = 0; i < GetStudyNames().size(); i++) {
97  n[i] = PrintValue(i, property);
98  }
99  return R()->TableRow(list_of(name).range(n));
100 }
101 
103  const string& /*valueName*/) {
104  stringstream ss;
105  ss.precision(3);
106  // ss << fQa[studyId].get(valueName, -1.);
107  return ss.str();
108 }
CbmReportElement::TableBegin
virtual std::string TableBegin(const std::string &caption, const std::vector< std::string > &colNames) const =0
Return string with table open tag.
CbmRichGeoTestStudyReport::PrintRow
virtual string PrintRow(const string &property, const string &name)
Print one row in a table.
Definition: CbmRichGeoTestStudyReport.cxx:93
CbmRichGeoTestStudyReport.h
Creates study report for RICH geometry testing.
CbmReportElement::DocumentBegin
virtual std::string DocumentBegin() const =0
Return string with open tags for document.
CbmReportElement::TableRow
virtual std::string TableRow(const std::vector< std::string > &row) const =0
Return string with table row tags.
CbmReportElement::DocumentEnd
virtual std::string DocumentEnd() const =0
Return string with close tags of the document.
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmRichGeoTestStudyReport::PrintValue
virtual string PrintValue(int studyId, const string &valueTitle)
Definition: CbmRichGeoTestStudyReport.cxx:102
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
CbmReportElement.h
Abstract class for basic report elements (headers, tables, images etc.).
CbmRichGeoTestStudyReport::Create
void Create()
Inherited from CbmLitStudyReport.
Definition: CbmRichGeoTestStudyReport.cxx:24
CbmReport::SetReportName
void SetReportName(const std::string &name)
Definition: CbmReport.h:59
CbmRichGeoTestStudyReport::~CbmRichGeoTestStudyReport
virtual ~CbmRichGeoTestStudyReport()
Destructor.
Definition: CbmRichGeoTestStudyReport.cxx:22
CbmRichGeoTestStudyReport::CbmRichGeoTestStudyReport
CbmRichGeoTestStudyReport()
Constructor.
Definition: CbmRichGeoTestStudyReport.cxx:18
CbmReportElement::TableEnd
virtual std::string TableEnd() const =0
Return string with table close tag.
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
CbmReportElement::Title
virtual std::string Title(int size, const std::string &title) const =0
Return string with title.