CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes
create_public_lumi_plots.LumiDataBlock Class Reference
Inheritance diagram for create_public_lumi_plots.LumiDataBlock:

Public Member Functions

def __iadd__ (self, other)
 
def __init__ (self, data_point=None)
 
def __lt__ (self, other)
 
def add (self, new_point)
 
def copy (self)
 
def is_empty (self)
 
def lum_cert_tot (self, units="b^{-1}")
 
def lum_del_tot (self, units="b^{-1}")
 
def lum_rec_tot (self, units="b^{-1}")
 
def max_inst_lum (self, units="Hz/b")
 
def straighten (self)
 
def time_begin (self)
 
def time_end (self)
 
def time_mid (self)
 

Public Attributes

 data_points
 

Static Public Attributes

 scale_factors
 

Detailed Description

A supposedly coherent block of LumiDataPoints.

NOTE: No checks on duplicates, sorting, etc.

Definition at line 106 of file create_public_lumi_plots.py.

Constructor & Destructor Documentation

def create_public_lumi_plots.LumiDataBlock.__init__ (   self,
  data_point = None 
)

Definition at line 128 of file create_public_lumi_plots.py.

128  def __init__(self, data_point=None):
129  if not data_point:
130  self.data_points = []
131  else:
132  self.data_points = [data_point]
133  # End of __init__().
134 

Member Function Documentation

def create_public_lumi_plots.LumiDataBlock.__iadd__ (   self,
  other 
)

Definition at line 135 of file create_public_lumi_plots.py.

135  def __iadd__(self, other):
136  self.data_points.extend(other.data_points)
137  # End of __iadd__().
138  return self
139 
def create_public_lumi_plots.LumiDataBlock.__lt__ (   self,
  other 
)

Definition at line 140 of file create_public_lumi_plots.py.

References create_public_lumi_plots.LumiDataBlock.time_mid().

140  def __lt__(self, other):
141  # End of __lt__().
142  return self.time_mid() < other.time_mid()
143 
def create_public_lumi_plots.LumiDataBlock.add (   self,
  new_point 
)

Definition at line 144 of file create_public_lumi_plots.py.

Referenced by counter.Counter.register().

144  def add(self, new_point):
145  self.data_points.append(new_point)
146  # End of add().
147 
def create_public_lumi_plots.LumiDataBlock.copy (   self)

Definition at line 148 of file create_public_lumi_plots.py.

148  def copy(self):
149  # End of copy().
150  return copy.deepcopy(self)
151 
def create_public_lumi_plots.LumiDataBlock.is_empty (   self)
def create_public_lumi_plots.LumiDataBlock.lum_cert_tot (   self,
  units = "b^{-1}" 
)

Definition at line 168 of file create_public_lumi_plots.py.

References create_public_lumi_plots.LumiDataBlock.data_points.

168  def lum_cert_tot(self, units="b^{-1}"):
169  res = sum([i.lum_cert for i in self.data_points])
170  res *= LumiDataBlock.scale_factors[units]
171  # End of lum_cert_tot().
172  return res
173 
def create_public_lumi_plots.LumiDataBlock.lum_del_tot (   self,
  units = "b^{-1}" 
)

Definition at line 156 of file create_public_lumi_plots.py.

References create_public_lumi_plots.LumiDataBlock.data_points.

156  def lum_del_tot(self, units="b^{-1}"):
157  res = sum([i.lum_del for i in self.data_points])
158  res *= LumiDataBlock.scale_factors[units]
159  # End of lum_del_tot().
160  return res
161 
def create_public_lumi_plots.LumiDataBlock.lum_rec_tot (   self,
  units = "b^{-1}" 
)

Definition at line 162 of file create_public_lumi_plots.py.

References create_public_lumi_plots.LumiDataBlock.data_points.

162  def lum_rec_tot(self, units="b^{-1}"):
163  res = sum([i.lum_rec for i in self.data_points])
164  res *= LumiDataBlock.scale_factors[units]
165  # End of lum_rec_tot().
166  return res
167 
def create_public_lumi_plots.LumiDataBlock.max_inst_lum (   self,
  units = "Hz/b" 
)

Definition at line 174 of file create_public_lumi_plots.py.

References create_public_lumi_plots.LumiDataBlock.data_points, and SiStripPI.max.

174  def max_inst_lum(self, units="Hz/b"):
175  res = 0.
176  if len(self.data_points):
177  res = max([i.lum_del for i in self.data_points])
178  res /= NUM_SEC_IN_LS
179  res *= LumiDataBlock.scale_factors[units]
180  # End of max_inst_lum().
181  return res
182 
def create_public_lumi_plots.LumiDataBlock.straighten (   self)

Definition at line 183 of file create_public_lumi_plots.py.

183  def straighten(self):
184  self.data_points.sort()
185  # End of straighten().
186 
def create_public_lumi_plots.LumiDataBlock.time_begin (   self)

Definition at line 187 of file create_public_lumi_plots.py.

References create_public_lumi_plots.LumiDataBlock.data_points, and min().

Referenced by create_public_lumi_plots.LumiDataBlock.time_mid().

187  def time_begin(self):
188  res = min([i.timestamp for i in self.data_points])
189  # End of time_begin().
190  return res
191 
T min(T a, T b)
Definition: MathUtil.h:58
def create_public_lumi_plots.LumiDataBlock.time_end (   self)
def create_public_lumi_plots.LumiDataBlock.time_mid (   self)

Definition at line 197 of file create_public_lumi_plots.py.

References create_public_lumi_plots.LumiDataBlock.time_begin(), and create_public_lumi_plots.LumiDataBlock.time_end().

Referenced by create_public_lumi_plots.LumiDataBlock.__lt__().

197  def time_mid(self):
198  delta = self.time_end() - self.time_begin()
199  delta_sec = delta.days * 24 * 60 * 60 + delta.seconds
200  res = self.time_begin() + datetime.timedelta(seconds=.5*delta_sec)
201  # End of time_mid().
202  return res
203 

Member Data Documentation

create_public_lumi_plots.LumiDataBlock.data_points
create_public_lumi_plots.LumiDataBlock.scale_factors
static

Definition at line 113 of file create_public_lumi_plots.py.