CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
plotscripts.SawTeethFunction Class Reference

Public Member Functions

def __call__
 
def __init__
 
def pp
 

Public Attributes

 ed
 
 edges
 
 n
 
 name
 

Detailed Description

Definition at line 362 of file plotscripts.py.

Constructor & Destructor Documentation

def plotscripts.SawTeethFunction.__init__ (   self,
  name 
)

Definition at line 363 of file plotscripts.py.

364  def __init__(self, name):
365  self.name = name
366  self.edges = (phiedges[stationIndex(name)])[:]
367  self.ed = sorted(self.edges)
368  # add some padding to the end
369  self.ed.append(pi+1.)
self.n = len(self.edges)
def stationIndex
Definition: plotscripts.py:386

Member Function Documentation

def plotscripts.SawTeethFunction.__call__ (   self,
  xx,
  par 
)

Definition at line 370 of file plotscripts.py.

References plotscripts.SawTeethFunction.ed, and plotscripts.SawTeethFunction.n.

371  def __call__(self, xx, par):
372  # wrap x in the most negative phi sector into positive phi
373  x = xx[0]
374  if x < self.ed[0]: x += 2*pi
375  # locate sector
376  for i in range(0,self.n):
377  if x <= self.ed[i]: continue
378  if x > self.ed[i+1]: continue
379  return par[i*2] + par[i*2+1]*(x - self.ed[i])
return 0
def plotscripts.SawTeethFunction.pp (   self)

Definition at line 380 of file plotscripts.py.

References plotscripts.SawTeethFunction.ed, plotscripts.SawTeethFunction.edges, plotscripts.SawTeethFunction.n, MuonGeometrySanityCheckPoint.name, and plotscripts.SawTeethFunction.name.

381  def pp(self):
382  print self.name, self.n
383  print self.edges
384  print self.ed
385 

Member Data Documentation

plotscripts.SawTeethFunction.ed

Definition at line 366 of file plotscripts.py.

Referenced by plotscripts.SawTeethFunction.__call__(), and plotscripts.SawTeethFunction.pp().

plotscripts.SawTeethFunction.edges

Definition at line 365 of file plotscripts.py.

Referenced by plotscripts.SawTeethFunction.pp().

plotscripts.SawTeethFunction.n

Definition at line 369 of file plotscripts.py.

Referenced by plotscripts.SawTeethFunction.__call__(), and plotscripts.SawTeethFunction.pp().

plotscripts.SawTeethFunction.name

Definition at line 364 of file plotscripts.py.

Referenced by BeautifulSoup.SoupStrainer.__init__(), BeautifulSoup.SoupStrainer.__str__(), BeautifulSoup.Tag._invert(), TreeCrawler.Package.dump(), validateAlignments.Alignment.getRepMap(), plotscripts.SawTeethFunction.pp(), BeautifulSoup.SoupStrainer.searchTag(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), and python.Vispa.Views.PropertyView.Property.valueChanged().