CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions | Variables
TkAlMap Namespace Reference

Classes

class  TkAlMap
 

Functions

def mean
 
def read_TPLfile
 
def StdDev
 

Variables

dictionary KNOWN_VARIABLES
 
tuple TkMap = TkAlMap('test', 'Here goes the title', 'run/tree.root', True, height=1400, GEO_file='TkAlMapDesign_phase0_cfg.py')
 
tuple TkMap_temp = copy.deepcopy(TkMap)
 
list var_list = ['dx', 'dy']
 

Function Documentation

def TkAlMap.mean (   data_list)

Definition at line 114 of file TkAlMap.py.

Referenced by StdDev().

115 def mean(data_list):
116  return sum(data_list)/(len(data_list)+0.)
def mean
Definition: TkAlMap.py:114
def TkAlMap.read_TPLfile (   file_name)

Definition at line 124 of file TkAlMap.py.

References submitPVValidationJobs.split().

Referenced by TkAlMap.TkAlMap.load_geometry().

125 def read_TPLfile(file_name):
126  o_file = open(file_name, 'r')
127  lines = o_file.readlines()
128  o_file.close()
129 
130  TPL_dict = {}
131  for line in lines:
132  if '#' in line: continue
133  splt_line = line.replace('\n', '').split(' ')
134  det_id = int(splt_line[0])
135  x = []
136  y = []
137  for idx,coo in enumerate(splt_line[1:]):
138  #print(coo)
139  try:
140  val = float(coo)
141  if (idx%2) == 0:
142  y.append(val)
143  else:
144  x.append(val)
145  except ValueError:
146  continue
147  TPL_dict[det_id] = {}
148  TPL_dict[det_id]['x'] = x
149  TPL_dict[det_id]['y'] = y
150  return TPL_dict
def read_TPLfile
Definition: TkAlMap.py:124
def TkAlMap.StdDev (   data_list)

Definition at line 117 of file TkAlMap.py.

References mean().

Referenced by ThroughputService.postEndJob().

118 def StdDev(data_list):
119  s2 = 0.
120  m = mean(data_list)
121  for point in data_list:
122  s2 += (point-m)**2
123  return math.sqrt(s2/(len(data_list)+0.))
def mean
Definition: TkAlMap.py:114
def StdDev
Definition: TkAlMap.py:117

Variable Documentation

dictionary TkAlMap.KNOWN_VARIABLES

Definition at line 19 of file TkAlMap.py.

tuple TkAlMap.TkMap = TkAlMap('test', 'Here goes the title', 'run/tree.root', True, height=1400, GEO_file='TkAlMapDesign_phase0_cfg.py')

Definition at line 757 of file TkAlMap.py.

tuple TkAlMap.TkMap_temp = copy.deepcopy(TkMap)

Definition at line 768 of file TkAlMap.py.

list TkAlMap.var_list = ['dx', 'dy']

Definition at line 765 of file TkAlMap.py.