CMS 3D CMS Logo

Public Member Functions | Public Attributes

plotscripts::SawTeethFunction Class Reference

List of all members.

Public Member Functions

def __call__
def __init__
def pp

Public Attributes

 ed
 edges
 n
 name

Detailed Description

Definition at line 329 of file plotscripts.py.


Constructor & Destructor Documentation

def plotscripts::SawTeethFunction::__init__ (   self,
  name 
)

Definition at line 330 of file plotscripts.py.

00331                           :
00332     self.name = name
00333     self.edges = (phiedges[stationIndex(name)])[:]
00334     self.ed = sorted(self.edges)
00335     # add some padding to the end
00336     self.ed.append(pi+1.)
    self.n = len(self.edges)

Member Function Documentation

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

Definition at line 337 of file plotscripts.py.

00338                              :
00339     # wrap x in the most negative phi sector into positive phi
00340     x = xx[0]
00341     if x < self.ed[0]: x += 2*pi
00342     # locate sector
00343     for i in range(0,self.n):
00344       if x <= self.ed[i]: continue
00345       if x > self.ed[i+1]: continue
00346       return par[i*2] + par[i*2+1]*(x - self.ed[i])
    return 0
def plotscripts::SawTeethFunction::pp (   self)

Definition at line 347 of file plotscripts.py.

00348               :
00349     print self.name, self.n
00350     print self.edges
00351     print self.ed
00352 


Member Data Documentation

Definition at line 330 of file plotscripts.py.

Definition at line 330 of file plotscripts.py.

Definition at line 330 of file plotscripts.py.

Definition at line 330 of file plotscripts.py.