本文整理汇总了C++中Spectrum::ToTH1方法的典型用法代码示例。如果您正苦于以下问题:C++ Spectrum::ToTH1方法的具体用法?C++ Spectrum::ToTH1怎么用?C++ Spectrum::ToTH1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spectrum
的用法示例。
在下文中一共展示了Spectrum::ToTH1方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: kirk_dune
//.........这里部分代码省略.........
CenterTitles(h);
Legend();
h->GetYaxis()->SetRangeUser(0, 600);
gPad->Print("components_nue_pid_rhc.pdf");
gPad->Print("components_nue_pid_rhc.C");
new TCanvas;
surf.DrawContour(Gaussian90Percent2D(surf), kSolid, 4);
// surfRHC.DrawContour(Gaussian90Percent2D(surfRHC), kSolid, kGreen+2);
surf2d.DrawContour(Gaussian90Percent2D(surf2d), kSolid, 1);
surf2dcheck.DrawContour(Gaussian90Percent2D(surf2d), kSolid, 1); // if there are 2 solid black lines there is a problem
surf2dsysts.DrawContour(Gaussian90Percent2D(surf2dsysts), kSolid, kGreen+2);
surf2dsystsall.DrawContour(Gaussian90Percent2D(surf2dsystsall), kSolid, 2);
surf.DrawBestFit(kRed);
surfAll.DrawContour(Gaussian90Percent2D(surfAll), 1, kMagenta);
gPad->Print("cont.pdf");
new TCanvas;
surfNue.DrawContour(Gaussian90Percent2D(surfNue), kSolid, 4);
surfNue2d.DrawContour(Gaussian90Percent2D(surfNue2d), kSolid, 1);
surfNue2dsysts.DrawContour(Gaussian90Percent2D(surfNue2dsysts), kSolid, kGreen+2);
surfNue2dsystsall.DrawContour(Gaussian90Percent2D(surfNue2dsystsall), kSolid, 2);
// surfNue2dsystsall2.DrawContour(Gaussian90Percent2D(surfNue2dsystsall2), kSolid, kMagenta); // just a check that a 50% NC syst is same as a 5%
surfNueAll.DrawContour(Gaussian90Percent2D(surfNueAll), kSolid, kMagenta);
surfNue.DrawBestFit(kRed);
gPad->Print("cont_nue.pdf");
Spectrum testnom = preddunenumu.Predict(calc);
Spectrum scaleshifted = preddunenumu.PredictSyst(calc,scaleshift);
Spectrum resshifted = preddunenumu.PredictSyst(calc,resshift);
new TCanvas;
TH1* htestnom = testnom.ToTH1(pot);
TH1* hscaleshifted = scaleshifted.ToTH1(pot);
TH1* hresshifted = resshifted.ToTH1(pot);
htestnom->SetLineWidth(2);
hscaleshifted->SetLineWidth(2);
hresshifted->SetLineWidth(2);
hscaleshifted->SetLineColor(2);
hresshifted->SetLineColor(4);
htestnom->Draw();
hscaleshifted->Draw("same");
hresshifted->Draw("same");
gPad->Print("testsysts.pdf"); // yes things are really shifting, here we can see it happen
new TCanvas;
TH1* hnom2 = nom2.ToTH1(pot);
TH1* hscale2 = scale2.ToTH1(pot);
TH1* hres2 = res2.ToTH1(pot);
hnom2->SetLineWidth(2);
hscale2->SetLineWidth(2);
hres2->SetLineWidth(2);
hscale2->SetLineColor(2);
hres2->SetLineColor(4);
hnom2->Draw();
hscale2->Draw("same");
hres2->Draw("same");