ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.histsampling.TH1 Class Reference
Inheritance diagram for python.histsampling.TH1:
Collaboration diagram for python.histsampling.TH1:

Public Member Functions

def __init__ (self, *args)
 
def GetRandom (self)
 
def __getattr__ (self, attr)
 

Public Attributes

 th1
 
 cheights
 

Detailed Description

Definition at line 99 of file histsampling.py.

Constructor & Destructor Documentation

◆ __init__()

def python.histsampling.TH1.__init__ (   self,
args 
)

Definition at line 102 of file histsampling.py.

102  def __init__(self, *args):
103  self.th1 = load_hist(*args)
104  self.globalbins, self.globalbin_to_axisbin, self.cheights = None, None, None
105 

Member Function Documentation

◆ __getattr__()

def python.histsampling.TH1.__getattr__ (   self,
  attr 
)

Definition at line 112 of file histsampling.py.

112  def __getattr__(self, attr):
113  "Forward all attributes to the contained TH1"
114  return getattr(self.th1, attr)
115 
116 

◆ GetRandom()

def python.histsampling.TH1.GetRandom (   self)

Definition at line 106 of file histsampling.py.

106  def GetRandom(self):
107  "A GetRandom that works for TH1s and uses Python random numbers"
108  if self.globalbins is None or self.globalbin_to_axisbin is None or self.cheights is None:
109  self.globalbins, self.globalbin_to_axisbin, self.cheights = get_sampling_vars(self.th1)
110  return get_random_x(self.th1, self.globalbins, self.cheights, self.globalbin_to_axisbin)
111 

Member Data Documentation

◆ cheights

python.histsampling.TH1.cheights

Definition at line 104 of file histsampling.py.

◆ th1

python.histsampling.TH1.th1

Definition at line 103 of file histsampling.py.


The documentation for this class was generated from the following file:
python.histsampling.get_random_x
def get_random_x(h, globalbins, cheights, globalbin_to_axisbin)
Definition: histsampling.py:74
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.histsampling.load_hist
def load_hist(*args)
Definition: histsampling.py:13
python.histsampling.get_sampling_vars
def get_sampling_vars(h)
Definition: histsampling.py:33