Skip to content
Snippets Groups Projects
Commit 02202456 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Update dis_electrons.cxx: define JB DA

parent ff109558
No related branches found
No related tags found
1 merge request!113Inclusive Kinematics JB DA
This commit is part of merge request !113. Comments created here will be created in the context of that merge request.
...@@ -73,26 +73,34 @@ int dis_electrons(const std::string& config_name) ...@@ -73,26 +73,34 @@ int dis_electrons(const std::string& config_name)
}; };
auto d0 = d.Define("Q2_sim", "InclusiveKinematicsTruth.Q2") auto d0 = d.Define("Q2_sim", "InclusiveKinematicsTruth.Q2")
.Define("Q2_rec", "InclusiveKinematicsElectron.Q2") .Define("Q2_el", "InclusiveKinematicsElectron.Q2")
.Define("Q2_res", combinatorial_diff_ratio, {"Q2_sim", "Q2_rec"}) .Define("Q2_jb", "InclusiveKinematicsJB.Q2")
.Define("Q2_da", "InclusiveKinematicsDA.Q2")
.Define("Q2_el_res", combinatorial_diff_ratio, {"Q2_sim", "Q2_el"})
.Define("Q2_jb_res", combinatorial_diff_ratio, {"Q2_sim", "Q2_jb"})
.Define("Q2_da_res", combinatorial_diff_ratio, {"Q2_sim", "Q2_da"})
.Define("x_sim", "InclusiveKinematicsTruth.x") .Define("x_sim", "InclusiveKinematicsTruth.x")
.Define("x_rec", "InclusiveKinematicsElectron.x") .Define("x_el", "InclusiveKinematicsElectron.x")
.Define("x_res", combinatorial_diff_ratio, {"x_sim", "x_rec"}) .Define("x_jb", "InclusiveKinematicsJB.x")
.Define("x_da", "InclusiveKinematicsDA.x")
.Define("x_el_res", combinatorial_diff_ratio, {"x_sim", "x_el"})
.Define("x_jb_res", combinatorial_diff_ratio, {"x_sim", "x_jb"})
.Define("x_da_res", combinatorial_diff_ratio, {"x_sim", "x_da"})
; ;
//Q2 //Q2
auto h_Q2_sim = d0.Histo1D({"h_Q2_sim", "; GeV^2; counts", 100, -5, 25}, "Q2_sim"); auto h_Q2_sim = d0.Histo1D({"h_Q2_sim", "; GeV^2; counts", 100, -5, 25}, "Q2_sim");
auto h_Q2_rec = d0.Histo1D({"h_Q2_rec", "; GeV^2; counts", 100, -5, 25}, "Q2_rec"); auto h_Q2_el = d0.Histo1D({"h_Q2_rec", "; GeV^2; counts", 100, -5, 25}, "Q2_rec");
auto h_Q2_res = d0.Histo1D({"h_Q2_res", "; ; counts", 100, -1, 1}, "Q2_res"); auto h_Q2_el_res = d0.Histo1D({"h_Q2_el_res", "; ; counts", 100, -1, 1}, "Q2_el_res");
//x //x
auto h_x_sim = d0.Histo1D({"h_x_sim", "; ; counts", 100, 0, +1}, "x_sim"); auto h_x_sim = d0.Histo1D({"h_x_sim", "; ; counts", 100, 0, +1}, "x_sim");
auto h_x_rec = d0.Histo1D({"h_x_rec", "; ; counts", 100, 0, +1}, "x_rec"); auto h_x_el = d0.Histo1D({"h_x_rec", "; ; counts", 100, 0, +1}, "x_rec");
auto h_x_res = d0.Histo1D({"h_x_res", "; ; counts", 100, -1, 1}, "x_res"); auto h_x_el_res = d0.Histo1D({"h_x_el_res", "; ; counts", 100, -1, 1}, "x_el_res");
TFitResultPtr f_Q2_res = h_Q2_res->Fit("gaus", "S"); TFitResultPtr f_Q2_el_res = h_Q2_el_res->Fit("gaus", "S");
if (f_Q2_res == 0) f_Q2_res->Print("V"); if (f_Q2_el_res == 0) f_Q2_el_res->Print("V");
TFitResultPtr f_x_res = h_x_res->Fit("gaus", "S"); TFitResultPtr f_x_el_res = h_x_el_res->Fit("gaus", "S");
if (f_x_res == 0) f_x_res->Print("V"); if (f_x_el_res == 0) f_x_el_res->Print("V");
// Plot our histograms. // Plot our histograms.
// TODO: to start I'm explicitly plotting the histograms, but want to // TODO: to start I'm explicitly plotting the histograms, but want to
...@@ -105,7 +113,7 @@ int dis_electrons(const std::string& config_name) ...@@ -105,7 +113,7 @@ int dis_electrons(const std::string& config_name)
gPad->SetLogx(false); gPad->SetLogx(false);
gPad->SetLogy(true); gPad->SetLogy(true);
auto& h1 = *h_Q2_sim; auto& h1 = *h_Q2_sim;
auto& h2 = *h_Q2_rec; auto& h2 = *h_Q2_el;
// histogram style // histogram style
h1.SetLineColor(common_bench::plot::kMpBlue); h1.SetLineColor(common_bench::plot::kMpBlue);
h1.SetLineWidth(2); h1.SetLineWidth(2);
...@@ -138,7 +146,7 @@ int dis_electrons(const std::string& config_name) ...@@ -138,7 +146,7 @@ int dis_electrons(const std::string& config_name)
c.cd(); c.cd();
gPad->SetLogx(false); gPad->SetLogx(false);
gPad->SetLogy(true); gPad->SetLogy(true);
auto& h1 = *h_Q2_res; auto& h1 = *h_Q2_el_res;
// histogram style // histogram style
h1.SetLineColor(common_bench::plot::kMpBlue); h1.SetLineColor(common_bench::plot::kMpBlue);
h1.SetLineWidth(2); h1.SetLineWidth(2);
...@@ -159,7 +167,7 @@ int dis_electrons(const std::string& config_name) ...@@ -159,7 +167,7 @@ int dis_electrons(const std::string& config_name)
gPad->SetLogx(true); gPad->SetLogx(true);
gPad->SetLogy(true); gPad->SetLogy(true);
auto& h1 = *h_x_sim; auto& h1 = *h_x_sim;
auto& h2 = *h_x_rec; auto& h2 = *h_x_el;
// histogram style // histogram style
h1.SetLineColor(common_bench::plot::kMpBlue); h1.SetLineColor(common_bench::plot::kMpBlue);
h1.SetLineWidth(2); h1.SetLineWidth(2);
...@@ -192,7 +200,7 @@ int dis_electrons(const std::string& config_name) ...@@ -192,7 +200,7 @@ int dis_electrons(const std::string& config_name)
c.cd(); c.cd();
gPad->SetLogx(false); gPad->SetLogx(false);
gPad->SetLogy(true); gPad->SetLogy(true);
auto& h1 = *h_x_res; auto& h1 = *h_x_el_res;
// histogram style // histogram style
h1.SetLineColor(common_bench::plot::kMpBlue); h1.SetLineColor(common_bench::plot::kMpBlue);
h1.SetLineWidth(2); h1.SetLineWidth(2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment