/
CbmRichGeoTestStudyReport.cxx
109 lines (95 loc) · 4.05 KB
/
CbmRichGeoTestStudyReport.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/**
* \file CbmRichGeoTestStudyReport.cxx
* \author Semen Lebedev <s.lebedev@gsi.de>
* \date 2012
*/
#include "CbmRichGeoTestStudyReport.h"
#include "CbmReportElement.h"
#include "TSystem.h"
#include <boost/property_tree/ptree.hpp>
#include <boost/assign/list_of.hpp>
using boost::assign::list_of;
using std::endl;
using std::stringstream;
CbmRichGeoTestStudyReport::CbmRichGeoTestStudyReport()
{
SetReportName("rich_geo_qa");
}
CbmRichGeoTestStudyReport::~CbmRichGeoTestStudyReport()
{
}
void CbmRichGeoTestStudyReport::Create()
{
Out().precision(3);
Out() << R()->DocumentBegin();
Out() << R()->Title(0, GetTitle());
Out() << R()->TableBegin("Efficiencies", list_of(string("")).range(GetStudyNames()));
Out() << PrintRow("acc_mean", "ACC");
Out() << PrintRow("circle_fit_eff_mean", "Circle fit");
Out() << PrintRow("ellipse_fit_eff_mean", "Ellipse fit");
Out() << R()->TableEnd() << endl;
Out() << R()->TableBegin("Nof point and hits in ring", list_of(string("")).range(GetStudyNames()));
Out() << PrintRow("nof_points_in_ring_mean", "Nof points, mean");
Out() << PrintRow("nof_points_in_ring_rms", "Nof points, rms");
Out() << PrintRow("nof_hits_in_ring_mean", "Nof hits, mean");
Out() << PrintRow("nof_hits_in_ring_rms", "Nof hits, rms");
Out() << R()->TableEnd() << endl;
Out() << R()->TableBegin("Point fit", list_of(string("")).range(GetStudyNames()));
Out() << PrintRow("points_fit_a_axis_mean", "A axis, mean");
Out() << PrintRow("points_fit_a_axis_rms", "A axis, rms");
Out() << PrintRow("points_fit_b_axis_mean", "B axis, mean");
Out() << PrintRow("points_fit_b_axis_rms", "B axis, rms");
Out() << PrintRow("points_fit_boa_mean", "B/A, mean");
Out() << PrintRow("points_fit_boa_rms", "B/A, rms");
Out() << PrintRow("points_fit_r_mean", "Radius, mean");
Out() << PrintRow("points_fit_r_rms", "Radius, mean");
Out() << R()->TableEnd() << endl;
Out() << R()->TableBegin("Hit fit", list_of(string("")).range(GetStudyNames()));
Out() << PrintRow("hits_fit_a_axis_mean", "A axis, mean");
Out() << PrintRow("hits_fit_a_axis_rms", "A axis, rms");
Out() << PrintRow("hits_fit_b_axis_mean", "B axis, mean");
Out() << PrintRow("hits_fit_b_axis_rms", "B axis, rms");
Out() << PrintRow("hits_fit_boa_mean", "B/A, mean");
Out() << PrintRow("hits_fit_boa_rms", "B/A, rms");
Out() << PrintRow("hits_fit_r_mean", "Radius, mean");
Out() << PrintRow("hits_fit_r_rms", "Radius, mean");
Out() << R()->TableEnd() << endl;
Out() << R()->TableBegin("Point fit vs. hit fit. Ellipse.", list_of(string("")).range(GetStudyNames()));
Out() << PrintRow("diff_ellipse_da_mean", "dA, mean");
Out() << PrintRow("diff_ellipse_da_rms", "dA, rms");
Out() << PrintRow("diff_ellipse_db_mean", "dB, mean");
Out() << PrintRow("diff_ellipse_db_rms", "dB, rms");
Out() << PrintRow("diff_ellipse_dx_mean", "dX, mean");
Out() << PrintRow("diff_ellipse_dx_rms", "dX, rms");
Out() << PrintRow("diff_ellipse_dy_mean", "dY, mean");
Out() << PrintRow("diff_ellipse_dy_rms", "dY, rms");
Out() << R()->TableEnd() << endl;
Out() << R()->TableBegin("Point fit vs. hit fit. Circle.", list_of(string("")).range(GetStudyNames()));
Out() << PrintRow("diff_circle_dr_mean", "dR, mean");
Out() << PrintRow("diff_circle_dr_rms", "dR, rms");
Out() << PrintRow("diff_circle_dx_mean", "dX, mean");
Out() << PrintRow("diff_circle_dx_rms", "dX, rms");
Out() << PrintRow("diff_circle_dy_mean", "dY, mean");
Out() << PrintRow("diff_circle_dy_rms", "dY, rms");
Out() << R()->TableEnd() << endl;
Out() << R()->DocumentEnd();
}
string CbmRichGeoTestStudyReport::PrintRow(
const string& property,
const string& name)
{
vector<string> n(GetStudyNames().size(), "");
for (int i = 0; i < GetStudyNames().size(); i++) {
n[i] = PrintValue(i, property);
}
return R()->TableRow(list_of(name).range(n));
}
string CbmRichGeoTestStudyReport::PrintValue(
int studyId,
const string& valueName)
{
stringstream ss;
ss.precision(3);
// ss << fQa[studyId].get(valueName, -1.);
return ss.str();
}