CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
pileupCalc.EquidistantBinning Class Reference
Inheritance diagram for pileupCalc.EquidistantBinning:

Public Member Functions

def __init__
 
def find
 
def width
 

Public Attributes

 centers
 
 edges
 
 num
 
 xMax
 
 xMin
 

Detailed Description

Definition at line 54 of file pileupCalc.py.

Constructor & Destructor Documentation

def pileupCalc.EquidistantBinning.__init__ (   self,
  num,
  xMin,
  xMax 
)

Definition at line 55 of file pileupCalc.py.

55 
56  def __init__(self, num, xMin, xMax):
57  self.num = num
58  self.xMin = xMin
59  self.xMax = xMax
60  self.edges = np.linspace(xMin, xMax, num=num+1)
self.centers = .5*(self.edges[:-1] + self.edges[1:])

Member Function Documentation

def pileupCalc.EquidistantBinning.find (   self,
  x 
)

Definition at line 64 of file pileupCalc.py.

References Counter.num, MatrixUtil.WF.num, MonitorElementData::Scalar.num, pileupCalc.EquidistantBinning.num, NewPedBunch.num, egHLT::BinData::Data2D.xMax, SimpleHistogramGenerator.xMax, pileupCalc.EquidistantBinning.xMax, HLTObjectMonitorProtonLead::hltPlot.xMax, HLTObjectMonitor::hltPlot.xMax, DTTopology.xMax, egHLT::BinData::Data2D.xMin, SimpleHistogramGenerator.xMin, pileupCalc.EquidistantBinning.xMin, HLTObjectMonitorProtonLead::hltPlot.xMin, HLTObjectMonitor::hltPlot.xMin, and DTTopology.xMin.

64 
65  def find(self, x):
66  return np.floor((x-self.xMin)*self.num/(self.xMax-self.xMin)).astype(np.int)
def pileupCalc.EquidistantBinning.width (   self)

Definition at line 62 of file pileupCalc.py.

References Counter.num, MatrixUtil.WF.num, MonitorElementData::Scalar.num, pileupCalc.EquidistantBinning.num, NewPedBunch.num, egHLT::BinData::Data2D.xMax, SimpleHistogramGenerator.xMax, pileupCalc.EquidistantBinning.xMax, HLTObjectMonitorProtonLead::hltPlot.xMax, HLTObjectMonitor::hltPlot.xMax, DTTopology.xMax, egHLT::BinData::Data2D.xMin, SimpleHistogramGenerator.xMin, pileupCalc.EquidistantBinning.xMin, HLTObjectMonitorProtonLead::hltPlot.xMin, HLTObjectMonitor::hltPlot.xMin, and DTTopology.xMin.

62 
63  def width(self):
return (self.xMax-self.xMin)/self.num

Member Data Documentation

pileupCalc.EquidistantBinning.centers

Definition at line 60 of file pileupCalc.py.

pileupCalc.EquidistantBinning.edges

Definition at line 59 of file pileupCalc.py.

pileupCalc.EquidistantBinning.num

Definition at line 56 of file pileupCalc.py.

Referenced by pileupCalc.EquidistantBinning.find(), and pileupCalc.EquidistantBinning.width().

pileupCalc.EquidistantBinning.xMax

Definition at line 58 of file pileupCalc.py.

Referenced by pileupCalc.EquidistantBinning.find(), and pileupCalc.EquidistantBinning.width().

pileupCalc.EquidistantBinning.xMin

Definition at line 57 of file pileupCalc.py.

Referenced by pileupCalc.EquidistantBinning.find(), and pileupCalc.EquidistantBinning.width().