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

◆ mean()

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

◆ read_TPLfile()

def TkAlMap.read_TPLfile (   file_name)

Definition at line 124 of file TkAlMap.py.

References nano_mu_digi_cff.float, createfilelist.int, and submitPVValidationJobs.split().

Referenced by TkAlMap.TkAlMap.load_geometry().

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

◆ StdDev()

def TkAlMap.StdDev (   data_list)

Definition at line 117 of file TkAlMap.py.

References mean().

Referenced by ThroughputService.postEndJob().

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

◆ extension

TkAlMap.extension

Definition at line 777 of file TkAlMap.py.

◆ KNOWN_VARIABLES

dictionary TkAlMap.KNOWN_VARIABLES

Definition at line 19 of file TkAlMap.py.

◆ TkMap

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

Definition at line 760 of file TkAlMap.py.

◆ TkMap_temp

TkAlMap.TkMap_temp = copy.deepcopy(TkMap)

Definition at line 771 of file TkAlMap.py.

◆ var_list

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

Definition at line 768 of file TkAlMap.py.