Skip to content

Commit

Permalink
Took a sketchy stab at fixing the q2 plot appearance when we rebin.
Browse files Browse the repository at this point in the history
  • Loading branch information
bamesserly committed Mar 21, 2024
1 parent 7c39d98 commit f84f553
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions xsec/plotting_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,8 @@ void Plot_CrossSection(Plotter p, MnvH1D* data, MnvH1D* mc,
PlotUtils::MnvH1D* data_xsec = nullptr;
PlotUtils::MnvH1D* mc_xsec = nullptr;

// if (p.m_variable->Name() == "q2") {
if (false) {
if (p.m_variable->Name() == "q2") {
//if (false) {
data_xsec = RebinQ2Plot(*data);
mc_xsec = RebinQ2Plot(*mc);
} else {
Expand Down Expand Up @@ -901,6 +901,16 @@ void Plot_CrossSection(Plotter p, MnvH1D* data, MnvH1D* mc,
data_xsec_w_stat_error->Scale(1.e42, "width");
mc_xsec_w_stat_error->Scale(1.e42, "width");

// already divided by 0.25 - 0.006
// but we really want to divide by 0.25
// TODO sketchy AF
if(p.m_variable->Name() == "q2") {
data_xsec_w_tot_error->SetBinContent(0, data_xsec_w_tot_error->GetBinContent(0)*(0.025 - 0.006)/0.025);
data_xsec_w_stat_error->SetBinContent(0, data_xsec_w_tot_error->GetBinContent(0)*(0.025 - 0.006)/0.025);
mc_xsec_w_stat_error->SetBinContent(0, mc_xsec_w_stat_error->GetBinContent(0)*(0.025 - 0.006)/0.025);
}
//if (this is q2) scale the first bin differently

// Y label
// std::string yaxis = "d#sigma/d" + p.m_variable->m_hists.m_xlabel + "
// (10^{-38} cm^{2}/" + p.m_variable->m_units + "/nucleon)";
Expand Down

0 comments on commit f84f553

Please sign in to comment.