CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
utils.KS Class Reference
Inheritance diagram for utils.KS:
utils.StatisticalTest

Public Member Functions

def __init__ (self, threshold)
 
def do_test (self)
 
- Public Member Functions inherited from utils.StatisticalTest
def __init__ (self, threshold)
 
def do_test (self)
 
def get_rank (self)
 
def get_status (self)
 
def set_operands (self, h1, h2)
 

Public Attributes

 name
 
- Public Attributes inherited from utils.StatisticalTest
 h1
 
 h2
 
 is_init
 
 name
 
 rank
 2D! return test_codes["2D"] More...
 
 threshold
 

Detailed Description

Definition at line 189 of file utils.py.

Constructor & Destructor Documentation

def utils.KS.__init__ (   self,
  threshold 
)

Definition at line 190 of file utils.py.

190  def __init__(self, threshold):
191  StatisticalTest.__init__(self,threshold)
192  self.name="KS"
193 
def __init__(self, threshold)
Definition: utils.py:190

Member Function Documentation

def utils.KS.do_test (   self)

Definition at line 194 of file utils.py.

References FitSlicesYTool.h1, ConfigurableHisto.h1, DQMSourceExample.h1, utils.StatisticalTest.h1, PlotAlignmentValidation::DMRPlotInfo.h1, FitSlicesYTool.h2, EgammaTowerIsolationNew< NC >::Sum.h2, ConfigurableHisto.h2, EgammaTowerIsolationNew< NC >.h2, DQMSourceExample.h2, utils.StatisticalTest.h2, and PlotAlignmentValidation::DMRPlotInfo.h2.

194  def do_test(self):
195 
196  # Calculate errors if not there...
197  for h in self.h1,self.h2:
198  w2s=h.GetSumw2()
199  if w2s.GetSize()==0:
200  h.Sumw2()
201 
202  ## If errors are 0:
203  #zero_errors=True
204  #for h in self.h1,self.h2:
205  #for ibin in xrange(Nbins1):
206  #if h.GetBinError(ibin+1) >0:
207  #zero_errors=False
208  #break
209  #if zero_errors:
210  #return test_codes["ZERO_ERR"]
211 
212  return self.h1.KolmogorovTest(self.h2)
213 
214 #-------------------------------------------------------------------------------
def do_test(self)
Definition: utils.py:194

Member Data Documentation

utils.KS.name