CMS 3D CMS Logo

Classes | Functions | Variables
TkAlMap Namespace Reference

Classes

class  TkAlMap
 

Functions

def mean (data_list)
 
def read_TPLfile (file_name)
 
def StdDev (data_list)
 

Variables

 extension
 
dictionary KNOWN_VARIABLES
 
 TkMap = TkAlMap('test', 'Here goes the title', 'run/tree.root', True, height=1400, GEO_file='TkAlMapDesign_phase0_cfg.py')
 
 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().

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

Definition at line 124 of file TkAlMap.py.

References objects.autophobj.float, createfilelist.int, and split.

Referenced by TkAlMap.TkAlMap.load_geometry().

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

Definition at line 117 of file TkAlMap.py.

References mean().

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

Variable Documentation

TkAlMap.extension

Definition at line 774 of file TkAlMap.py.

dictionary TkAlMap.KNOWN_VARIABLES

Definition at line 19 of file TkAlMap.py.

TkAlMap.TkMap = TkAlMap('test', 'Here goes the title', 'run/tree.root', True, height=1400, GEO_file='TkAlMapDesign_phase0_cfg.py')
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.