Package madgraph :: Package various :: Module histograms :: Class Bin
[hide private]
[frames] | no frames]

Class Bin

source code

object --+
         |
        Bin

A class to store Bin related features and function.

Instance Methods [hide private]
 
__init__(self, boundaries=(0.0, 0.0), wgts=None, n_entries=0)
Initializes an empty bin, necessarily with boundaries.
source code
 
__setattr__(self, name, value)
x.__setattr__('name', value) <==> x.name = value
source code
 
get_weight(self, key='central')
Accesses a specific weight from this bin.
source code
 
set_weight(self, wgt, key='central')
Accesses a specific weight from this bin.
source code
 
addEvent(self, weights=1.0)
Add an event to this bin.
source code
 
nice_string(self, order=None, short=True)
Nice representation of this Bin.
source code
 
alter_weights(self, func)
Apply a given function to all bin weights.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
combine(cls, binA, binB, func)
Function to combine two bins.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, boundaries=(0.0, 0.0), wgts=None, n_entries=0)
(Constructor)

source code 

Initializes an empty bin, necessarily with boundaries.

Overrides: object.__init__

__setattr__(self, name, value)

source code 

x.__setattr__('name', value) <==> x.name = value

Overrides: object.__setattr__
(inherited documentation)

nice_string(self, order=None, short=True)

source code 

Nice representation of this Bin. One can order the weight according to the argument if provided.

combine(cls, binA, binB, func)
Class Method

source code 

Function to combine two bins. The 'func' is such that it takes two weight dictionaries and merge them into one.