Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. void test() {
  2. // === Provokes error
  3. // root -l -q test.C
  4. // or
  5. // lldb -- root.exe -l -q test.C
  6. // break set --name TH1::KolmogorovTest
  7.  
  8. const size_t NBINS = 200;
  9.  
  10. TH1F * h0 = new TH1F("h0", "h0", NBINS, 0., 1.);
  11. TH1F * h1 = new TH1F("h1", "h1", NBINS, 0., 1.);
  12.  
  13. for (size_t i = 0; i<NBINS-1; ++i) {
  14. h0->AddBinContent(i, i);
  15. h1->AddBinContent(i, i);
  16. }
  17. h0->AddBinContent(1, -20.);
  18. h1->AddBinContent(1, -20.);
  19.  
  20. // std::cout << "Integral: " << h0->ComputeIntegral(true) << std::endl;
  21. std::cout << "Before : h0[1]: " << h0->GetBinContent(1) << std::endl;
  22. std::cout << "Res : " << h0->KolmogorovTest(h1, "X") << std::endl;
  23. std::cout << "After : h0[1]: " << h0->GetBinContent(1) << std::endl;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement