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.

114 def mean(data_list):
115  return sum(data_list)/(len(data_list)+0.)
116 

Referenced by StdDev().

◆ read_TPLfile()

def TkAlMap.read_TPLfile (   file_name)

Definition at line 124 of file TkAlMap.py.

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 

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

Referenced by TkAlMap.TkAlMap.load_geometry().

◆ StdDev()

def TkAlMap.StdDev (   data_list)

Definition at line 117 of file TkAlMap.py.

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 

References mean().

Referenced by ThroughputService.postEndJob().

Variable Documentation

◆ extension

TkAlMap.extension

Definition at line 774 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 757 of file TkAlMap.py.

◆ TkMap_temp

TkAlMap.TkMap_temp = copy.deepcopy(TkMap)

Definition at line 768 of file TkAlMap.py.

◆ var_list

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

Definition at line 765 of file TkAlMap.py.

dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
TkAlMap.StdDev
def StdDev(data_list)
Definition: TkAlMap.py:117
submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
TkAlMap.mean
def mean(data_list)
Definition: TkAlMap.py:114
TkAlMap.read_TPLfile
def read_TPLfile(file_name)
Definition: TkAlMap.py:124
createfilelist.int
int
Definition: createfilelist.py:10