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 362 of file plotscripts.py.


Constructor & Destructor Documentation

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

Definition at line 363 of file plotscripts.py.

00364                           :
00365     self.name = name
00366     self.edges = (phiedges[stationIndex(name)])[:]
00367     self.ed = sorted(self.edges)
00368     # add some padding to the end
00369     self.ed.append(pi+1.)
    self.n = len(self.edges)

Member Function Documentation

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

Definition at line 370 of file plotscripts.py.

00371                              :
00372     # wrap x in the most negative phi sector into positive phi
00373     x = xx[0]
00374     if x < self.ed[0]: x += 2*pi
00375     # locate sector
00376     for i in range(0,self.n):
00377       if x <= self.ed[i]: continue
00378       if x > self.ed[i+1]: continue
00379       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.

00381               :
00382     print self.name, self.n
00383     print self.edges
00384     print self.ed
00385 


Member Data Documentation

Definition at line 363 of file plotscripts.py.

Definition at line 363 of file plotscripts.py.

Definition at line 363 of file plotscripts.py.

Definition at line 363 of file plotscripts.py.