EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmRichGeoTestStudyReport.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmRichGeoTestStudyReport.cxx
1 
7 #include "CbmReportElement.h"
8 
9 #include "TSystem.h"
10 
11 #include <boost/property_tree/ptree.hpp>
12 #include <boost/assign/list_of.hpp>
13 using boost::assign::list_of;
14 using std::endl;
15 using std::stringstream;
16 
18 {
19  SetReportName("rich_geo_qa");
20 }
21 
23 {
24 }
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 
91  const string& property,
92  const string& name)
93 {
94  vector<string> n(GetStudyNames().size(), "");
95  for (int i = 0; i < GetStudyNames().size(); i++) {
96  n[i] = PrintValue(i, property);
97  }
98  return R()->TableRow(list_of(name).range(n));
99 }
100 
102  int studyId,
103  const string& valueName)
104 {
105  stringstream ss;
106  ss.precision(3);
107  // ss << fQa[studyId].get(valueName, -1.);
108  return ss.str();
109 }