16 #include <boost/assign/list_of.hpp>
18 using boost::assign::list_of;
29 Out() << R()->DocumentBegin() << std::endl;
30 Out() << R()->Title(0,
"Magnetic field QA") << std::endl;
32 Out() << R()->DocumentEnd();
40 DrawFieldRichPmtPlane();
44 vector<TGraph2D*> graphsBx = HM()->G2Vector(
"hmf_Bx_Graph2D_.*");
45 for (Int_t
i = 0;
i < graphsBx.size();
i++) {
46 string name = graphsBx[
i]->GetName();
47 string canvasName = GetReportName() +
"_map_at_z_" +
Split(name,
'_')[3];
49 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
51 TGraph2D* graphBy = HM()->G2(
FindAndReplace(name,
"_Bx_",
"_By_"));
52 TGraph2D* graphBz = HM()->G2(
FindAndReplace(name,
"_Bx_",
"_Bz_"));
53 TGraph2D* graphMod = HM()->G2(
FindAndReplace(name,
"_Bx_",
"_Mod_"));
67 vector<TGraph*> graphsBx = HM()->G1Vector(
"hmf_BxAlongZAngle_Graph_.*");
68 for (Int_t
i = 0;
i < graphsBx.size();
i++) {
69 string name = graphsBx[
i]->GetName();
71 GetReportName() +
"_map_along_z_angle_" +
Split(name,
'_')[3];
73 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
77 DrawGraph({graphsBx[
i], graphBy, graphBz, graphMod},
78 {
"B_{x}",
"B_{y}",
"B_{z}",
"|B|"},
86 gPad->SetGrid(
true,
true);
90 graphsBx = HM()->G1Vector(
"hmf_BxAlongZXY_Graph_.*");
91 for (Int_t
i = 0;
i < graphsBx.size();
i++) {
92 string name = graphsBx[
i]->GetName();
93 vector<string> splits =
Split(name,
'_');
95 GetReportName() +
"_map_along_z_xy_" + splits[3] +
"_" + splits[4];
97 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
101 DrawGraph({graphsBx[
i], graphBy, graphBz, graphMod},
102 {
"B_{x}",
"B_{y}",
"B_{z}",
"|B|"},
110 gPad->SetGrid(
true,
true);
114 graphsBx = HM()->G1Vector(
"hmf_BxAlongZXYIntegral_Graph_.*");
115 for (Int_t
i = 0;
i < graphsBx.size();
i++) {
116 string name = graphsBx[
i]->GetName();
117 vector<string> splits =
Split(name,
'_');
118 string canvasName = GetReportName() +
"_map_along_z_integral_xy_"
119 + splits[3] +
"_" + splits[4];
121 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
125 DrawGraph({graphsBx[
i], graphBy, graphBz, graphMod},
126 {
"B_{x}",
"B_{y}",
"B_{z}",
"|B|"},
134 gPad->SetGrid(
true,
true);
139 string names[] = {
"Bx",
"By",
"Bz",
"Mod"};
141 for (Int_t iName = 0; iName < 4; iName++) {
142 TGraph2D* grU = HM()->G2(
"hmf_" + names[iName] +
"_Rich_Pmt_up");
143 TGraph2D* grD = HM()->G2(
"hmf_" + names[iName] +
"_Rich_Pmt_down");
144 if (grU->GetN() == 0 || grD->GetN() == 0)
continue;
145 string canvasName = GetReportName() +
"_rich_pmt_" + names[iName];
147 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
151 string canvasName = GetReportName() +
"_rich_pmt_projection_edge";
153 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
154 TH2D* h2U = HM()->G2(
"hmf_Mod_Rich_Pmt_up")->GetHistogram();
155 TH2D* h2D = HM()->G2(
"hmf_Mod_Rich_Pmt_down")->GetHistogram();
156 Int_t nBins = h2D->GetNbinsY();
157 TH1D* hPrU = h2U->ProjectionX(
"_px", 1, 1);
158 TH1D* hPrD = h2D->ProjectionX(
"_px", nBins, nBins);
159 hPrU->GetYaxis()->SetTitle(h2U->GetZaxis()->GetTitle());
160 hPrD->GetYaxis()->SetTitle(h2D->GetZaxis()->GetTitle());
163 {
"Top plane",
"Bottom plane"},