One more try. I think my mail got deleted due to ~150 kB of attachments! So, see them at
http://www-user.slac.stanford.edu/richard/DropBox/KS/ <http://www-user.slac.stanford.edu/richard/DropBox/KS/>
Richard
-----Original Message-----
From: Dubois, Richard
Sent: Friday, March 21, 2003 2:25 PM
To: 'Roottalk@pcroot.cern.ch'
Subject: oddity with KS tests
We're using the TH1::KolmogorovTest function to compare histograms for our code release systems tests. For some fraction of the histograms we get the warning that the histogram is weighted - and then we get what seem like non-sensical KS values.
I've attached two histogram files. For histogram TKRTRKENERGY, the KS value is (essentially) zero. I've attached the overplot of the histograms.
In any case, the histograms are *not* weighted, so we're wondering why the KS test thinks they are.
Here's the snippet of code filling the histogram:
dummy = new TH1F("TKRTRKENERGY","Track Energy",200, 0., 2000.);
Double_t trkE = track->getKalEnergy();
((TH1F*)GetObjectPtr("TKRTRKENERGY"))->Fill(trkE);
This is for Root 3.04.02 on linux RH7.2.
root [1] TFile* f = new TFile("/nfs/farm/g/glast/u05/systests/Gleam/v5r1p1/Ver$
root [2] TFile* g = new TFile("/nfs/farm/g/glast/u05/systests/Gleam/v5r0p6/Ver$
root [3] TH1* hf2 = f->Get("TKRTRKENERGY")
root [4] TH1* hg2 = g->Get("TKRTRKENERGY")
root [5] double x = hf2->KolmogorovTest((TH1*)hg2)
Warning in <TH1F::KolmogorovTest>: Weighted events and no Sumw2, hist:TKRTRKENER
GY
Warning in <TH1F::KolmogorovTest>: Weighted events and no Sumw2, hist:TKRTRKENER
GY
root [6] x
(double)4.16499306271588573e-40
Regards,
Richard
--
Richard Dubois
Stanford Linear Accelerator Center
Stanford, CA
650-926-3824
650-926-8616 (FAX)
http://www.slac.stanford.edu/~richard
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET