Skip to content
Snippets Groups Projects
Commit a9e1cdc4 authored by Ziyue Zhang's avatar Ziyue Zhang
Browse files

WIP: add 2d corr plot

parent 30ebef5b
No related branches found
No related tags found
1 merge request!42Add y, Q2, x, t resolution tests
...@@ -175,7 +175,8 @@ int vm_invar(const std::string& config_name) ...@@ -175,7 +175,8 @@ int vm_invar(const std::string& config_name)
h_Var1D[i][1]->SetLineWidth(1); h_Var1D[i][1]->SetLineWidth(1);
//for pad 2: sim~rec 2d //for pad 2: sim~rec 2d
//place holder h_Var2D[i]->GetXaxis()->CenterTitle();
h_Var2D[i]->GetYaxis()->CenterTitle();
//for pad 3: rec - sim //for pad 3: rec - sim
h_Var1D[i][2]->SetLineColor(plot::kMpGrey); h_Var1D[i][2]->SetLineColor(plot::kMpGrey);
...@@ -214,8 +215,11 @@ int vm_invar(const std::string& config_name) ...@@ -214,8 +215,11 @@ int vm_invar(const std::string& config_name)
tptr[i][j]->SetTextColor(plot::kMpBlue); tptr[i][j]->SetTextColor(plot::kMpBlue);
tptr[i][j] = t[i][j]->AddText("reconstructed"); tptr[i][j] = t[i][j]->AddText("reconstructed");
tptr[i][j]->SetTextColor(plot::kMpOrange); tptr[i][j]->SetTextColor(plot::kMpOrange);
plot::draw_label(10, 100, detector);
break; break;
case 1: case 1:
gPad->SetLogz();
h_Var2D[i]->Draw("colz");
break;//2d break;//2d
case 2://dx case 2://dx
h_Var1D[i][2]->Draw("hist"); h_Var1D[i][2]->Draw("hist");
...@@ -226,7 +230,7 @@ int vm_invar(const std::string& config_name) ...@@ -226,7 +230,7 @@ int vm_invar(const std::string& config_name)
}else{ }else{
tptr[i][j] = t[i][j]->AddText(fmt::format("#Delta{}", VarName[i]).c_str()); tptr[i][j] = t[i][j]->AddText(fmt::format("#Delta{}", VarName[i]).c_str());
} }
tptr[i][j]->SetTextColor(1); tptr[i][j]->SetTextColor(plot::kMpGrey);
break; break;
case 3://dx/x case 3://dx/x
h_Var1D[i][3]->Draw("hist"); h_Var1D[i][3]->Draw("hist");
...@@ -237,12 +241,11 @@ int vm_invar(const std::string& config_name) ...@@ -237,12 +241,11 @@ int vm_invar(const std::string& config_name)
}else{ }else{
tptr[i][j] = t[i][j]->AddText(fmt::format("#Delta{}/{}", VarName[i], VarName[i]).c_str()); tptr[i][j] = t[i][j]->AddText(fmt::format("#Delta{}/{}", VarName[i], VarName[i]).c_str());
} }
tptr[i][j]->SetTextColor(1); tptr[i][j]->SetTextColor(plot::kMpGrey);
break; break;
default: default:
break; break;
} }
plot::draw_label(10, 100, detector);
t[i][j]->Draw(); t[i][j]->Draw();
} }
ctmp->Print(fmt::format("{}{}.png", output_prefix, VarName[i]).c_str()); ctmp->Print(fmt::format("{}{}.png", output_prefix, VarName[i]).c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment