Public Member Functions | |
def | __init__ |
def | absval |
def | check_filled_bins |
def | do_test |
Public Attributes | |
name |
def utils::Chi2::__init__ | ( | self, | |
threshold | |||
) |
Reimplemented from utils::StatisticalTest.
def utils::Chi2::absval | ( | self | ) |
Definition at line 254 of file utils.py.
00255 : 00256 nbins=getNbins(self.h1) 00257 binc=0 00258 for i in xrange(1,nbins): 00259 for h in self.h1,self.h2: 00260 binc=h.GetBinContent(i) 00261 if binc<0: 00262 h.SetBinContent(i,-1*binc) 00263 if h.GetBinError(i)==0 and binc!=0: 00264 #print "Histo ",h.GetName()," Bin:",i,"-Content:",h.GetBinContent(i)," had zero error" 00265 h.SetBinContent(i,0) 00266
def utils::Chi2::check_filled_bins | ( | self, | |
min_filled | |||
) |
def utils::Chi2::do_test | ( | self | ) |
Reimplemented from utils::StatisticalTest.
Definition at line 267 of file utils.py.
00268 : 00269 self.absval() 00270 if self.check_filled_bins(3): 00271 if self.h1.InheritsFrom("TProfile") or (self.h1.GetEntries()!=self.h1.GetSumOfWeights()): 00272 chi2=self.h1.Chi2Test(self.h2,'WW') 00273 #if chi2==0: print "DEBUG",self.h1.GetName(),"Chi2 is:", chi2 00274 return chi2 00275 else: 00276 return self.h1.Chi2Test(self.h2,'UU') 00277 else: 00278 return 1 00279 #return test_codes["FEW_BINS"] 00280 00281 #-------------------------------------------------------------------------------
Reimplemented from utils::StatisticalTest.