ATLAS Offline Software
PlotCalibrationGains.py
Go to the documentation of this file.
1 #!/bin/env python
2 
3 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4 
5 import ROOT
6 import sys
7 import time
8 import os
9 
10 from array import array
11 from PyCool import cool
12 from optparse import OptionParser
13 from math import fabs
14 
15 class L1CaloMap:
16 
17  def __init__(self,title,XaxisTitle="",YaxisTitle=""):
18 
19  self.nxbins = 66
20  self.xbins = array('d',[-49.5,-44.5,-40.50,-36.5,-32.5,-31.5,-29.5,
21  -27.5,-25.5,-24.5,-23.5,-22.5,-21.5,-20.5,-19.5,
22  -18.5,-17.5,-16.5,-15.5,-14.5,-13.5,-12.5,-11.5,
23  -10.5,-9.5,-8.5,-7.5,-6.5,-5.5,-4.5,-3.5,
24  -2.5,-1.5,-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,
25  7.5,8.5,9.5,10.5,11.5,12.5,13.5,14.5,15.5,16.5,
26  17.5,18.5,19.5,20.5,21.5,22.5,23.5,24.5,26.5,28.5,
27  30.5,31.5,35.5,39.5,43.5,47.5])
28 
29  self.h_1 = ROOT.TH2F("GainTTsMap" ,title, self.nxbins,self.xbins,64,0.,64)
30 
31  self.h_1.GetXaxis().SetTitle(XaxisTitle)
32  self.h_1.GetYaxis().SetTitle(YaxisTitle)
33 
34  def Draw(self):
35  self.h_1.SetStats(0)
36  self.h_1.Draw("colz")
37  ROOT.gPad.RedrawAxis()
38 
39  def Fill(self,eta,phi,gain=1):
40 
41  if eta >= 32 or eta < -32:
42  self.h_1.Fill(eta,phi+3.5,gain)
43  self.h_1.Fill(eta,phi+2.5,gain)
44  self.h_1.Fill(eta,phi+1.5,gain)
45  self.h_1.Fill(eta,phi+0.5,gain)
46  elif eta >= 25 or eta < -25:
47  self.h_1.Fill(eta,phi+1.5,gain)
48  self.h_1.Fill(eta,phi+0.5,gain)
49  else:
50  self.h_1.Fill(eta,phi+0.5,gain)
51 
52 
53  def SetMinimum(self,minimum):
54  self.h_1.SetMinimum(minimum)
55 
56  def SetMaximum(self,maximum):
57  self.h_1.SetMaximum(maximum)
58 
60 
61  def __init__(self):
62  self.coolIdPath=ROOT.PathResolver.find_calib_file("TrigT1Calo/COOLIdDump_v1.txt")
63  input = open(self.coolIdPath)
66 
67  for line in input.readlines():
68  parts = line.split(' ')
69  emCool = parts[4].rstrip()
70  hadCool = parts[5].rstrip()
71  self.list_of_channels_em[(parts[0],parts[1])] = '0x'+emCool
72  self.list_of_channels_had[(parts[0],parts[1])] = '0x'+hadCool
73 
74  input.close()
75 
76  def LoadReceiverPPMMap(self):
77 
79  self.UNIX2COOL = 1000000000
80 
81  # get database service and open database
82  dbSvc = cool.DatabaseSvcFactory.databaseService()
83  dbString = 'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TRIGGER;dbname=CONDBR2'
84  try:
85  db = dbSvc.openDatabase(dbString, False)
86  except Exception as e:
87  print ('Error: Problem opening database', e)
88  sys.exit(1)
89 
90  folder_name = "/TRIGGER/Receivers/RxPpmIdMap"
91  folder=db.getFolder(folder_name)
92 
93  startUtime = int(time.time())
94  endUtime = int(time.time())
95  startValKey = startUtime * self.UNIX2COOL
96  endValKey = endUtime * self.UNIX2COOL
97  chsel = cool.ChannelSelection(0,sys.maxsize)
98 
99  try:
100  itr=folder.browseObjects(startValKey, endValKey, chsel)
101  except Exception as e:
102  print (e)
103  sys.exit(1)
104 
105  for row in itr:
106  ReceiverId = hex(int(row.channelId()))
107  payload = row.payload()
108  PPMId = hex(int(payload['ppmid']))
109  self.receiver_to_ppm_map[ReceiverId]= PPMId
110 
111 # print (self.receiver_to_ppm_map)
112  # close database
113  db.closeDatabase()
114 
115 
116  def getPPMfromReceiver(self,ReceiverId):
117 
118  if ReceiverId in self.receiver_to_ppm_map:
119  return self.receiver_to_ppm_map[ReceiverId]
120  else:
121  return None
122 
123  def getReceiverfromPPM(self,PPMId,strategy_string=None):
124 
125  ReceiverChannels = [item[0] for item in self.receiver_to_ppm_map.items() if item[1]==PPMId]
126 
127  if strategy_string is None:
128  print (" Warning! in getReceiverfromPPM no runtype given, using default!")
129  return ReceiverChannels[0]
130 
131  if self.isPPMFCAL(PPMId) and self.isCoolHad(PPMId): # pick correct FCAL23 channel
132 
133  if strategy_string == "GainOneOvEmbFcalHighEta":
134  for channel in ReceiverChannels:
135  if self.getFCAL23RecEta(channel) == 'HighEta':
136  return channel
137  if strategy_string == "GainOneOvEmecFcalLowEta":
138  for channel in ReceiverChannels:
139  if self.getFCAL23RecEta(channel) == 'LowEta':
140  return channel
141 
142  elif self.isPPMOverlap(PPMId):
143 
144  if strategy_string == "GainOneOvEmbFcalHighEta":
145  for channel in ReceiverChannels:
146  if self.getOverlapLayer(channel) == 'EMB':
147  return channel
148  if strategy_string == "GainOneOvEmecFcalLowEta":
149  for channel in ReceiverChannels:
150  if self.getOverlapLayer(channel) == 'EMEC':
151  return channel
152 
153  else:
154  return ReceiverChannels[0]
155 
156 
157  def getCoolEm(self,i_eta,i_phi):
158  if (str(i_eta),str(i_phi)) in self.list_of_channels_em:
159  cool = self.list_of_channels_em[(str(i_eta),str(i_phi))]
160  cool.rstrip()
161  cool.lstrip()
162  return (cool)
163  else:
164  return ('')
165 
166 
167  def getCoolHad(self,i_eta,i_phi):
168  if (str(i_eta),str(i_phi)) in self.list_of_channels_had:
169  cool = self.list_of_channels_had[(str(i_eta),str(i_phi))]
170  cool.rstrip()
171  cool.lstrip()
172  return (cool)
173  else:
174  return ('')
175 
176  def isCoolEm(self,CoolId):
177  return (CoolId in self.list_of_channels_em.values())
178 
179  def isCoolHad(self,CoolId):
180  return (CoolId in self.list_of_channels_had.values())
181 
182  def getEtaBin(self,CoolId):
183  if self.isCoolEm(CoolId):
184  channel = [item[0] for item in self.list_of_channels_em.items() if item[1]==CoolId]
185  return int(channel[0][0])
186  elif self.isCoolHad(CoolId):
187  channel = [item[0] for item in self.list_of_channels_had.items() if item[1]==CoolId]
188  return int(channel[0][0])
189  else:
190  return -1
191 
192  def getPhiBin(self,CoolId):
193  if self.isCoolEm(CoolId):
194  channel = [item[0] for item in self.list_of_channels_em.items() if item[1]==CoolId]
195  return int(channel[0][1])
196  elif self.isCoolHad(CoolId):
197  channel = [item[0] for item in self.list_of_channels_had.items() if item[1]==CoolId]
198  return int(channel[0][1])
199  else:
200  return -1
201 
202  def getMissingReceiverChannels(self, channel_list):
203 
204  missing_channels= [channel for channel in self.receiver_to_ppm_map.keys() if channel not in channel_list]
205  return missing_channels
206 
207 
208  def getReceiverCMCP(self,ReceiverId):
209 
210  recI=int(ReceiverId,16)
211 
212  crate = recI/1024
213  recI = recI - crate*1024
214 
215  module = recI/64
216  recI = recI - module*64
217 
218  conn = recI/16
219  recI = recI - conn*16
220 
221  pair = recI
222 
223  return [crate,module,conn,pair]
224 
225  def isPPMFCAL(self,CoolId):
226 
227  eta_bin = self.getEtaBin(CoolId)
228 
229  if eta_bin >= 32 or eta_bin <= -36:
230  return True
231  else:
232  return False
233 
234 
235  def isPPMOverlap(self,CoolId):
236 
237  eta_bin = self.getEtaBin(CoolId)
238  if self.isCoolEm(CoolId) is True and (eta_bin == 14 or eta_bin == -15):
239  return True
240  else:
241  return False
242 
243  def getOverlapLayer(self,RecCoolId):
244 
245  ppm_id = self.getPPMfromReceiver(RecCoolId)
246 
247  if not self.isPPMOverlap(ppm_id):
248  return None
249 
250  cabling = self.getReceiverCMCP(RecCoolId)
251  if cabling[0] < 2: # unconnected channel has barrel crate nr.
252  return 'Unconnected'
253  elif cabling[2] == 0:
254  return 'EMEC'
255  elif cabling[2] == 2:
256  return 'EMB'
257  else:
258  print ("Error in GetOverlapLayer, can't determine layer!")
259  return None
260 
261  def getFCAL23RecEta(self,RecCoolId):
262 
263  ppm_id = self.getPPMfromReceiver(RecCoolId)
264 
265  if (not self.isPPMFCAL(ppm_id)) or (not self.isCoolHad(ppm_id)):
266  return None
267  eta_bin = self.getEtaBin(ppm_id)
268 
269  RecCoolInt = int(RecCoolId,16)
270  if RecCoolInt%2 == 1:
271  isRecOdd = True
272  else:
273  isRecOdd = False
274 
275  if eta_bin>0:
276  if isRecOdd:
277  return 'LowEta'
278  else:
279  return 'HighEta'
280  else:
281  if isRecOdd:
282  return 'HighEta'
283  else:
284  return 'LowEta'
285 
286 
288 
289  def __init__(self):
290 
295  self.UNIX2COOL = 1000000000
296 
297  self.run_nr=None
298  self.strategy=None
299 
300  def LoadGainsXml(self,name):
301 
302  input_file = open(name)
303 
304  for line in input_file.readlines():
305  parts = line.split(' ')
306  if parts[0] == '<Channel':
307  list_cool=parts[1].split('\'')
308  cool_id=list_cool[1]
309 
310  list_gain=parts[2].split('\'')
311  gain=list_gain[1]
312  self.measured_gains[cool_id]=gain
313 
314  list_offset=parts[3].split('\'')
315  offset=list_offset[1]
316  self.measured_offset[cool_id]=offset
317 
318  list_chi2=parts[4].split('\'')
319  chi2=list_chi2[1]
320  self.measured_chi2[cool_id]=chi2
321 
322 
323  input_file.close()
324 
325  def LoadReferenceXml(self,name):
326 
327  input_gains_reference = open(name)
328 
329  for line in input_gains_reference.readlines():
330  parts = line.split(' ')
331  if parts[0] == '<Channel':
332  list_cool=parts[1].split('\'')
333  cool_id=list_cool[1]
334 
335  list_gain=parts[2].split('\'')
336  gain=list_gain[1]
337  self.reference_gains[cool_id]=gain
338 
339 
340  def LoadGainsSqlite(self,name):
341 
342  # get database service and open database
343  dbSvc = cool.DatabaseSvcFactory.databaseService()
344 
345  dbString='sqlite://;schema='+name+';dbname=L1CALO'
346  try:
347  db = dbSvc.openDatabase(dbString, False)
348  except Exception as e:
349  print ('Error: Problem opening database', e)
350  sys.exit(1)
351 
352  folder_name = '/TRIGGER/L1Calo/V1/Results/EnergyScanResults'
353  folder=db.getFolder(folder_name)
354 
355  startUtime = int(time.time())
356  endUtime = int(time.time())
357  startValKey = startUtime * self.UNIX2COOL
358  endValKey = endUtime * self.UNIX2COOL
359  chsel = cool.ChannelSelection(0,sys.maxsize)
360 
361  try:
362  itr=folder.browseObjects(startValKey, endValKey, chsel)
363  except Exception as e:
364  print (e)
365  sys.exit(1)
366 
367  for row in itr:
368  CoolId = hex(int(row.channelId()))
369  payload = row.payload()
370  self.measured_gains[CoolId] = payload['Slope']
371  self.measured_chi2[CoolId] = payload['Chi2']
372  self.measured_offset[CoolId] = payload['Offset']
373 
374 # print (self.measured_gains)
375 
376  folder_gen_name = '/TRIGGER/L1Calo/V1/Results/EnergyScanRunInfo'
377  folder_gen=db.getFolder(folder_gen_name)
378 
379  try:
380  itr=folder_gen.browseObjects(startValKey, endValKey, chsel)
381  for row in itr:
382  payload = row.payload()
383  self.run_nr = payload['RunNumber']
384  self.strategy = payload['GainStrategy']
385  print ("Run nr. = ", self.run_nr , " Strategy = ", self.strategy)
386 
387  except Exception: # Doesn't seem to catch C++ exceptions :-(
388  print ("Warning, in LoadGainsSqlite can't get runtype info! Hope this is not serious!")
389 
390 
391  # close database
392  db.closeDatabase()
393 
394  def LoadReferenceSqlite(self,name):
395 
396  # get database service and open database
397  dbSvc = cool.DatabaseSvcFactory.databaseService()
398 
399  dbString='sqlite://;schema='+name+';dbname=L1CALO'
400  try:
401  db = dbSvc.openDatabase(dbString, False)
402  except Exception as e:
403  print ('Error: Problem opening database', e)
404  sys.exit(1)
405 
406  folder_name = '/TRIGGER/L1Calo/V1/Results/EnergyScanResults'
407  folder=db.getFolder(folder_name)
408 
409  startUtime = int(time.time())
410  endUtime = int(time.time())
411  startValKey = startUtime * self.UNIX2COOL
412  endValKey = endUtime * self.UNIX2COOL
413  chsel = cool.ChannelSelection(0,sys.maxsize)
414 
415  try:
416  itr=folder.browseObjects(startValKey, endValKey, chsel)
417  except Exception as e:
418  print (e)
419  sys.exit(1)
420 
421  for row in itr:
422  CoolId = hex(int(row.channelId()))
423  payload = row.payload()
424  self.reference_gains[CoolId]=payload['Slope']
425 
426 # print (self.measured_gains)
427  # close database
428  db.closeDatabase()
429 
430 
431  def LoadReferenceOracle(self,mapping_tool):
432 
433  # get database service and open database
434  dbSvc = cool.DatabaseSvcFactory.databaseService()
435 
436  dbString = 'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TRIGGER;dbname=CONDBR2'
437  try:
438  db = dbSvc.openDatabase(dbString, False)
439  except Exception as e:
440  print ('Error: Problem opening database', e)
441  sys.exit(1)
442 
443  folder_name = "/TRIGGER/Receivers/Factors/CalibGains"
444  folder=db.getFolder(folder_name)
445 
446  startUtime = int(time.time())
447  endUtime = int(time.time())
448  startValKey = startUtime * self.UNIX2COOL
449  endValKey = endUtime * self.UNIX2COOL
450  chsel = cool.ChannelSelection(0,sys.maxsize)
451 
452  try:
453  itr=folder.browseObjects(startValKey, endValKey, chsel)
454  except Exception as e:
455  print (e)
456  sys.exit(1)
457 
458  for row in itr:
459  ReceiverId = hex(int(row.channelId()))
460  PPMId = mapping_tool.getPPMfromReceiver(ReceiverId)
461  payload = row.payload()
462  gain = payload['factor']
463 
464  if PPMId is not None:
465  if self.strategy is None: #run type not known
466  self.reference_gains[PPMId]=gain
467  else:
468  if mapping_tool.getReceiverfromPPM(PPMId,self.strategy) == ReceiverId: # correct receiver?
469 # print ("Using receiver nr.", ReceiverId, "for PPM nr.",PPMId)
470  self.reference_gains[PPMId]=gain
471 # else:
472 # print ("Skipping receiver nr.", ReceiverId, "for PPM nr.",PPMId)
473 
474 
475  # print (self.reference_gains)
476  # close database
477  db.closeDatabase()
478 
479 
480  def getGain(self,coolId):
481  if (coolId in self.measured_gains):
482  return float(self.measured_gains[coolId])
483  else:
484  return ''
485 
486  def getChi2(self,coolId):
487  if (coolId in self.measured_chi2):
488  return float(self.measured_chi2[coolId])
489  else:
490  return ''
491 
492  def getOffset(self,coolId):
493  if (coolId in self.measured_offset):
494  return float(self.measured_offset[coolId])
495  else:
496  return ''
497 
498 
499  def getReferenceGain(self,coolId):
500  if (coolId in self.reference_gains):
501  return float(self.reference_gains[coolId])
502  else:
503  return ''
504 
505  def passesSelection(self,coolId):
506  if ((coolId in self.measured_gains) and
507  (self.getGain(coolId) > 0.5 and self.getGain(coolId)<1.6) and
508 # (self.getGain(coolId) > 0.5 and self.getGain(coolId)<2.1) and
509 # (self.getOffset(coolId) > -2 and self.getOffset(coolId) < 2)):
510  (self.getOffset(coolId) > -10 and self.getOffset(coolId) < 10)):
511  return True
512  else:
513  return False
514 
515 
517 
518  def __init__(self,name,nbins=40,minimum=0.,maximum=2.,XaxisTitle="",YaxisTitle=""):
519 
520  self.nPartitions=5
521  self.ext = ["all","00_15","15_25","25_32","32_50"]
522  self.name = ["all","EMB","EMEC outer","EMEC Inner","FCAL 1"]
523 
524 
525  self.his_partitions = []
526 
527  for i_em_partition in range(0,self.nPartitions):
528  self.his_partitions.append(ROOT.TH1F("GainTTEm"+self.ext[i_em_partition],name+" for "+self.name[i_em_partition],nbins,minimum,maximum))
529 
530  for i_em_partition in range(0,self.nPartitions):
531  self.his_partitions[i_em_partition].GetXaxis().SetTitle(XaxisTitle)
532  self.his_partitions[i_em_partition].GetYaxis().SetTitle(YaxisTitle)
533 
534 
535 
536  def get_partition_number(self,eta_bin):
537 
538  indem = -1
539  if ( -9 <= eta_bin and eta_bin <= 8):
540  indem = 1
541  elif ((eta_bin>8 and eta_bin<=14) or (eta_bin>=-15 and eta_bin<-9)):
542 # elif ((eta_bin>8 and eta_bin<14) or (eta_bin>-15 and eta_bin<-9)): # cut out overlap
543  indem = 1
544  elif ((eta_bin>14 and eta_bin<=24) or (eta_bin>=-25 and eta_bin<-15)):
545  indem = 2
546  elif ((eta_bin>24 and eta_bin<=31) or (eta_bin>=-32 and eta_bin<-25)):
547  indem = 3
548  elif ((eta_bin>31) or (eta_bin<-32)):
549  indem = 4
550 
551  return indem
552 
553 
554  def Fill(self,eta_bin,gain):
555 
556  partition=self.get_partition_number(eta_bin)
557 
558  if partition > 0:
559  self.his_partitions[0].Fill(gain)
560  self.his_partitions[partition].Fill(gain)
561  else:
562  print ("Warning in EmPartitionPlots, nonexisting partition!" )
563 
564 
566 
567  def __init__(self,name,nbins=40,minimum=0.,maximum=2.,XaxisTitle="",YaxisTitle=""):
568 
569  self.nPartitions=6
570  self.ext = ["all","00_09","09_15","15_25","25_32","32_50"]
571  self.name = ["all","Tile LB","Tile EB","HEC outer", "HEC inner","FCAL 2/3"]
572 
573  self.his_partitions = []
574 
575  for i_had_partition in range(0,self.nPartitions):
576  self.his_partitions.append(ROOT.TH1F("GainTTHad"+self.ext[i_had_partition],name+" for "+self.name[i_had_partition],nbins,minimum,maximum))
577 
578  for i_had_partition in range(0,self.nPartitions):
579  self.his_partitions[i_had_partition].GetXaxis().SetTitle(XaxisTitle)
580  self.his_partitions[i_had_partition].GetYaxis().SetTitle(YaxisTitle)
581 
582  def get_partition_number(self,eta_bin):
583 
584  indhad = -1
585  if ( -9 <= eta_bin and eta_bin <= 8):
586  indhad = 1
587  elif ((eta_bin>8 and eta_bin<=14) or (eta_bin>=-15 and eta_bin<-9)):
588 # elif ((eta_bin>8 and eta_bin<14) or (eta_bin>-15 and eta_bin<-9)): # cut out overlap
589  indhad = 2
590  elif ((eta_bin>14 and eta_bin<=24) or (eta_bin>=-25 and eta_bin<-15)):
591  indhad = 3
592  elif ((eta_bin>24 and eta_bin<=31) or (eta_bin>=-32 and eta_bin<-25)):
593  indhad = 4
594  elif ((eta_bin>31) or (eta_bin<-32)):
595  indhad = 5
596 
597  return indhad
598 
599  def Fill(self,eta_bin,gain):
600 
601  partition=self.get_partition_number(eta_bin)
602 
603  if partition > 0:
604  self.his_partitions[0].Fill(gain)
605  self.his_partitions[partition].Fill(gain)
606  else:
607  print ("Warning in HadPartitionPlots, nonexisting partition!" )
608 
609 
610 def PlotCalibrationGains(input_file_name="",reference_file_name="",isInputXml=False,isInputSqlite=False,isRefXml=False,isRefSqlite=False,isRefOracle=False):
611 
612  ROOT.gStyle.SetPalette(1)
613  ROOT.gStyle.SetOptStat(111111)
614  ROOT.gStyle.SetCanvasColor(10)
615 
616  c1 = ROOT.TCanvas('c1','Example',200,10,700,500)
617  c2 = ROOT.TCanvas('c2','Example Partitions',200,10,700,500)
618  c2.Divide(3,2)
619 
620  h_gains_em = L1CaloMap("Eta-phi map of EM gains","#eta bin","#phi bin")
621  h_gains_had = L1CaloMap("Eta-phi map of HAD gains","#eta bin","#phi bin")
622 
623  h_gains_em_fselect = L1CaloMap("Eta-phi map of EM gains that failed selection","#eta bin","#phi bin")
624  h_gains_had_fselect = L1CaloMap("Eta-phi map of HAD gains that failed selection","#eta bin","#phi bin")
625 
626  h_chi2_em = L1CaloMap("Eta-phi map of EM Chi2","#eta bin","#phi bin")
627  h_chi2_had = L1CaloMap("Eta-phi map of HAD Chi2","#eta bin","#phi bin")
628 
629  h_offset_em = L1CaloMap("Eta-phi map of EM offsets","#eta bin","#phi bin")
630  h_offset_had = L1CaloMap("Eta-phi map of HAD offsets","#eta bin","#phi bin")
631 
632 
633  h_unfitted_em = L1CaloMap("Eta-phi map of EM failed fits","#eta bin","#phi bin")
634  h_unfitted_had = L1CaloMap("Eta-phi map of HAD failed fits","#eta bin","#phi bin")
635 
636  h_drifted_em = L1CaloMap("EM TTs that drifted more then 10 %","#eta bin","#phi bin")
637  h_drifted_had = L1CaloMap("HAD TTs that drifted more then 10 %","#eta bin","#phi bin")
638 
639 
640  h_gains_em_reference = L1CaloMap("Eta-phi map of EM gains (gain-reference)","#eta bin","#phi bin")
641  h_gains_had_reference = L1CaloMap("Eta-phi map of HAD gains (gain-reference)","#eta bin","#phi bin")
642 
643  h_gains_em_reference_rel = L1CaloMap("Eta-phi map of EM gains: (gain-reference)/reference","#eta bin","#phi bin")
644  h_gains_had_reference_rel = L1CaloMap("Eta-phi map of HAD gains: (gain-reference)/reference","#eta bin","#phi bin")
645 
646 
647  em_partition_gains = EmPartitionPlots(" EM gains",40,0.6,1.4,"gain","N")
648  had_partition_gains = HadPartitionPlots(" HAD gains",40,0.5,2.5,"gain","N")
649 
650  em_partition_gains_ref = EmPartitionPlots(" EM gains - reference",40,-0.2,0.2,"gain-reference","N")
651  had_partition_gains_ref = HadPartitionPlots(" HAD gains - reference",40,-1.,1.,"gain-reference","N")
652 
653  em_partition_gains_ref_rel = EmPartitionPlots(" EM gains-reference / reference",40,-0.2,0.2,"(gain-reference)/reference","N")
654  had_partition_gains_ref_rel = HadPartitionPlots(" HAD gains-reference / reference",40,-1.,1.,"(gain-reference)/reference","N")
655 
656  threshold_change = 0.1
657 
658  geometry_convertor = L1CaloGeometryConvertor()
659  receiver_gains = GainReader()
660 
661  bad_gain_file = open('bad_gains.txt','w')
662  drifted_towers_file = open('drifted_towers.txt','w')
663 
664  if isInputXml is True:
665  print ("Taking input from xml file: ", input_file_name)
666  receiver_gains.LoadGainsXml(input_file_name)
667  elif isInputSqlite is True:
668  print ("Taking input from Sqlite file: ", input_file_name)
669  receiver_gains.LoadGainsSqlite(input_file_name)
670  else:
671  print ("No option for input file selected, assuming sqlite file energyscanresults.sqlite")
672  receiver_gains.LoadGainsSqlite("energyscanresults.sqlite")
673 
674 
675  if isRefXml is True:
676  print ("Taking reference from Xml file: ",reference_file_name)
677  receiver_gains.LoadReferenceXml(reference_file_name)
678  elif isRefSqlite is True:
679  print ("Taking reference from Sqlite file: ",reference_file_name)
680  receiver_gains.LoadReferenceSqlite(reference_file_name)
681  elif isRefOracle is True:
682  print ("Taking reference from Oracle")
683  geometry_convertor.LoadReceiverPPMMap()
684  receiver_gains.LoadReferenceOracle(geometry_convertor)
685  else:
686  print (" No option for reference file, assuming Oracle")
687  geometry_convertor.LoadReceiverPPMMap()
688  receiver_gains.LoadReferenceOracle(geometry_convertor)
689 
690 
691  for i_eta in range(-49,45):
692  for i_phi in range(0,64):
693 
694  coolEm = geometry_convertor.getCoolEm(i_eta,i_phi)
695  coolHad = geometry_convertor.getCoolHad(i_eta,i_phi)
696 
697  if not coolEm == '': # there is a channel for this eta-phi
698 
699  gain = receiver_gains.getGain(coolEm)
700  chi2 = receiver_gains.getChi2(coolEm)
701  offset = receiver_gains.getOffset(coolEm)
702  reference_gain = receiver_gains.getReferenceGain(coolEm)
703  passes_selection = receiver_gains.passesSelection(coolEm)
704 
705  if (not gain == '') and (not reference_gain == ''): # both gains should be available
706 
707  if gain == -1. :
708  h_unfitted_em.Fill(i_eta,i_phi)
709  bad_gain_file.write('%i %i %s EM gain= %.3f \n' % (i_eta,i_phi,coolEm,float(gain)))
710  h_gains_em_reference.Fill(i_eta,i_phi,-100.)
711  h_gains_em_reference_rel.Fill(i_eta,i_phi,-100.)
712  else:
713  h_gains_em.Fill(i_eta,i_phi,gain)
714  h_chi2_em.Fill(i_eta,i_phi,chi2)
715  h_offset_em.Fill(i_eta,i_phi,offset)
716  em_partition_gains.Fill(i_eta,gain)
717  em_partition_gains_ref.Fill(i_eta,gain-reference_gain)
718  h_gains_em_reference.Fill(i_eta,i_phi,gain-reference_gain)
719 
720  if passes_selection is False:
721  h_gains_em_fselect.Fill(i_eta,i_phi)
722  bad_gain_file.write('%i %i %s EM gain= %.3f chi2= %.3f offset= %.3f \n' % (i_eta,i_phi,coolEm,float(gain),float(chi2),float(offset)))
723 # h_gains_em_reference.Fill(i_eta,i_phi,-100.)
724 # h_gains_em_reference_rel.Fill(i_eta,i_phi,-100.)
725 
726  if reference_gain > 0:
727  em_partition_gains_ref_rel.Fill(i_eta,(gain-reference_gain)/reference_gain)
728  h_gains_em_reference_rel.Fill(i_eta,i_phi,(gain-reference_gain)/reference_gain)
729  if fabs((gain-reference_gain)/reference_gain) > threshold_change:
730  h_drifted_em.Fill(i_eta,i_phi)
731  drifted_towers_file.write('%i %i %s EM gain= %.3f refGain= %.3f (%.3f %%) \n' % (i_eta,i_phi,coolEm,float(gain),float(reference_gain),(gain-reference_gain)*100/reference_gain))
732 
733 
734 
735 
736  if not coolHad == '': # there is a channel for this eta-phi
737 
738  gain = receiver_gains.getGain(coolHad)
739  chi2 = receiver_gains.getChi2(coolHad)
740  offset = receiver_gains.getOffset(coolHad)
741  reference_gain = receiver_gains.getReferenceGain(coolHad)
742  passes_selection = receiver_gains.passesSelection(coolHad)
743 
744  if (not gain == '') and (not reference_gain == ''): # both gains should be available
745 
746  if gain == -1. :
747  h_unfitted_had.Fill(i_eta,i_phi)
748  bad_gain_file.write('%i %i %s HAD gain= %.3f \n' % (i_eta,i_phi,coolHad,float(gain)))
749  h_gains_had_reference.Fill(i_eta,i_phi,-100.)
750  h_gains_had_reference_rel.Fill(i_eta,i_phi,-100.)
751  else:
752  h_gains_had.Fill(i_eta,i_phi,gain)
753  h_chi2_had.Fill(i_eta,i_phi,chi2)
754  h_offset_had.Fill(i_eta,i_phi,offset)
755  had_partition_gains.Fill(i_eta,gain)
756  had_partition_gains_ref.Fill(i_eta,gain-reference_gain)
757  h_gains_had_reference.Fill(i_eta,i_phi,gain-reference_gain)
758 
759  if passes_selection is False:
760  h_gains_had_fselect.Fill(i_eta,i_phi)
761  bad_gain_file.write( '%i %i %s HAD gain= %.3f chi2= %.3f offset= %.3f \n' % (i_eta,i_phi,coolHad,float(gain),float(chi2),float(offset)))
762 # h_gains_had_reference.Fill(i_eta,i_phi,-100.)
763 # h_gains_had_reference_rel.Fill(i_eta,i_phi,-100.)
764 
765  if reference_gain > 0:
766  had_partition_gains_ref_rel.Fill(i_eta,(gain-reference_gain)/reference_gain)
767  h_gains_had_reference_rel.Fill(i_eta,i_phi,(gain-reference_gain)/reference_gain)
768  if fabs((gain-reference_gain)/reference_gain) > threshold_change:
769  h_drifted_had.Fill(i_eta,i_phi)
770  drifted_towers_file.write('%i %i %s HAD gain= %.3f refGain= %.3f (%.3f %%) \n' % (i_eta,i_phi,coolHad,float(gain),float(reference_gain),(gain-reference_gain)*100/reference_gain))
771 
772 
773 
774 #print (measured_gains )
775  c1.cd()
776  ROOT.gPad.SetLogy(0)
777 
778  h_gains_em.SetMinimum(0.6)
779  h_gains_em.SetMaximum(1.4)
780 # h_gains_em.SetMaximum(2.1)
781  h_gains_em.Draw()
782  c1.Print("Gains.ps(")
783 
784  h_gains_had.SetMinimum(0.6)
785  h_gains_had.SetMaximum(1.4)
786  h_gains_had.Draw()
787  c1.Print("Gains.ps")
788 
789  h_drifted_em.Draw()
790  c1.Print("Gains.ps")
791 
792  h_drifted_had.Draw()
793  c1.Print("Gains.ps")
794 
795 
796  c1.cd()
797  ROOT.gPad.SetLogy(0)
798 
799  h_gains_em_reference_rel.SetMinimum(-0.5)
800  h_gains_em_reference_rel.SetMaximum(0.5)
801  h_gains_em_reference_rel.Draw()
802  c1.Print("Gains.ps")
803 
804  h_gains_had_reference_rel.SetMinimum(-0.5)
805  h_gains_had_reference_rel.SetMaximum(0.5)
806  h_gains_had_reference_rel.Draw()
807  c1.Print("Gains.ps")
808 
809 # ROOT.gPad.SetRightMargin(0.01)
810  h_gains_em_reference_rel.SetMinimum(-0.1)
811  h_gains_em_reference_rel.SetMaximum(0.1)
812  h_gains_em_reference_rel.Draw()
813  c1.Update()
814  palette = h_gains_em_reference_rel.h_1.GetListOfFunctions().FindObject("palette")
815  if palette:
816  palette.SetLabelSize(0.025)
817 
818  h_gains_em_reference_rel.Draw()
819  c1.Print("Gains.ps")
820 
821  h_gains_had_reference_rel.SetMinimum(-0.1)
822  h_gains_had_reference_rel.SetMaximum(0.1)
823  h_gains_had_reference_rel.Draw()
824  c1.Update()
825 
826  palette = h_gains_had_reference_rel.h_1.GetListOfFunctions().FindObject("palette")
827  if palette:
828  palette.SetLabelSize(0.025)
829 
830  h_gains_had_reference_rel.Draw()
831  c1.Print("Gains.ps")
832 
833 
834  c1.cd()
835  ROOT.gPad.SetLogy(0)
836 
837  h_gains_em_reference.SetMinimum(-0.5)
838  h_gains_em_reference.SetMaximum(0.5)
839 
840  h_gains_em_reference.Draw()
841  c1.Print("Gains.ps")
842 
843  h_gains_had_reference.SetMinimum(-0.5)
844  h_gains_had_reference.SetMaximum(0.5)
845 
846 # h_gains_had_reference.SetMinimum(-0.2)
847 # h_gains_had_reference.SetMaximum(0.2)
848 
849  h_gains_had_reference.Draw()
850  c1.Print("Gains.ps")
851 
852  c1.cd()
853  ROOT.gPad.SetLogy(0)
854  h_chi2_em.SetMinimum(0.1)
855  h_chi2_em.SetMaximum(100)
856  h_chi2_em.Draw()
857  c1.Print("Gains.ps")
858 
859  c1.cd()
860  ROOT.gPad.SetLogy(0)
861  h_chi2_had.SetMinimum(0.1)
862  h_chi2_had.SetMaximum(100)
863  h_chi2_had.Draw()
864  c1.Print("Gains.ps")
865 
866  c1.cd()
867  ROOT.gPad.SetLogy(0)
868  h_offset_em.SetMinimum(-1.)
869  h_offset_em.SetMaximum(1.)
870  h_offset_em.Draw()
871  c1.Print("Gains.ps")
872 
873  c1.cd()
874  ROOT.gPad.SetLogy(0)
875  h_offset_had.SetMinimum(-1.)
876  h_offset_had.SetMaximum(1.)
877  h_offset_had.Draw()
878  c1.Print("Gains.ps")
879 
880 
881  #c2.cd()
882  c2.Clear()
883  c2.Divide(3,2)
884  for i_p in range(0,em_partition_gains.nPartitions):
885  c2.cd(i_p+1)
886  if em_partition_gains.his_partitions[i_p].GetEntries() > 0:
887  ROOT.gPad.SetLogy()
888  else:
889  ROOT.gPad.SetLogy(0)
890  em_partition_gains.his_partitions[i_p].Draw()
891 
892  c2.Print("Gains.ps")
893 
894  #c2.cd()
895  c2.Clear()
896  c2.Divide(3,2)
897  for i_p in range(0,had_partition_gains.nPartitions):
898  c2.cd(i_p+1)
899  if had_partition_gains.his_partitions[i_p].GetEntries() > 0:
900  ROOT.gPad.SetLogy()
901  else:
902  ROOT.gPad.SetLogy(0)
903  had_partition_gains.his_partitions[i_p].Draw()
904 
905  c2.Print("Gains.ps")
906 
907 
908  #c2.cd()
909  c2.Clear()
910  c2.Divide(3,2)
911  for i_p in range(0,em_partition_gains_ref.nPartitions):
912  c2.cd(i_p+1)
913  if em_partition_gains_ref.his_partitions[i_p].GetEntries() > 0:
914  ROOT.gPad.SetLogy()
915  else:
916  ROOT.gPad.SetLogy(0)
917  em_partition_gains_ref.his_partitions[i_p].Draw()
918 
919  c2.Print("Gains.ps")
920 
921  #c2.cd()
922  c2.Clear()
923  c2.Divide(3,2)
924  for i_p in range(0,had_partition_gains_ref.nPartitions):
925  c2.cd(i_p+1)
926  if had_partition_gains_ref.his_partitions[i_p].GetEntries() > 0:
927  ROOT.gPad.SetLogy()
928  else:
929  ROOT.gPad.SetLogy(0)
930  had_partition_gains_ref.his_partitions[i_p].Draw()
931 
932  c2.Print("Gains.ps")
933 
934  #c2.cd()
935  c2.Clear()
936  c2.Divide(3,2)
937  for i_p in range(0,em_partition_gains_ref_rel.nPartitions):
938  c2.cd(i_p+1)
939  if em_partition_gains_ref_rel.his_partitions[i_p].GetEntries() > 0:
940  ROOT.gPad.SetLogy()
941  else:
942  ROOT.gPad.SetLogy(0)
943  em_partition_gains_ref_rel.his_partitions[i_p].Draw()
944 
945  c2.Print("Gains.ps")
946 
947  #c2.cd()
948  c2.Clear()
949  c2.Divide(3,2)
950  for i_p in range(0,had_partition_gains_ref_rel.nPartitions):
951  c2.cd(i_p+1)
952  if had_partition_gains_ref_rel.his_partitions[i_p].GetEntries() > 0:
953  ROOT.gPad.SetLogy()
954  else:
955  ROOT.gPad.SetLogy(0)
956  had_partition_gains_ref_rel.his_partitions[i_p].Draw()
957 
958  c2.Print("Gains.ps")
959 
960 
961  c1.cd()
962  ROOT.gPad.SetLogy(0)
963 
964  h_gains_em_fselect.Draw()
965  c1.Print("Gains.ps")
966 
967  h_gains_had_fselect.Draw()
968  c1.Print("Gains.ps")
969 
970 
971  h_unfitted_em.Draw()
972  c1.Print("Gains.ps")
973 
974  h_unfitted_had.Draw()
975  c1.Print("Gains.ps)")
976 
977  os.system("ps2pdf Gains.ps")
978 
979  bad_gain_file.close()
980  drifted_towers_file.close()
981 
982  print ("finished!")
983 
984 if __name__ == "__main__":
985 
986  print ("Starting plot_gains_xml")
987 
988  parser = OptionParser()
989 
990  parser.add_option("-f","--InputFile",action="store",type="string",dest="input_file_name",help="Name of input file")
991 
992  parser.add_option("-r","--ReferenceFile",action="store",type="string",dest="reference_file_name",help="Name of reference file")
993 
994  parser.add_option("--InputXml",action="store_true",dest="isInputXml",help="Input is .xml file")
995  parser.add_option("--InputSqlite",action="store_true",dest="isInputSqlite",help="Input is .sqlite file")
996  parser.add_option("--RefXml",action="store_true",dest="isRefXml",help="Reference is .xml file")
997  parser.add_option("--RefSqlite",action="store_true",dest="isRefSqlite",help="Reference is .sqlite file")
998  parser.add_option("--RefOracle",action="store_true",dest="isRefOracle",help="Reference is from Oracle")
999 
1000  (options, args) = parser.parse_args()
1001 
1002  PlotCalibrationGains(options.input_file_name, options.reference_file_name, options.isInputXml,
1003  options.isInputSqlite, options.isRefXml, options.isRefSqlite, options.isRefOracle)
PlotCalibrationGains.HadPartitionPlots.name
name
Definition: PlotCalibrationGains.py:571
PlotCalibrationGains.L1CaloGeometryConvertor.LoadReceiverPPMMap
def LoadReceiverPPMMap(self)
Definition: PlotCalibrationGains.py:76
PlotCalibrationGains.L1CaloGeometryConvertor.isCoolEm
def isCoolEm(self, CoolId)
Definition: PlotCalibrationGains.py:176
PlotCalibrationGains.EmPartitionPlots.name
name
Definition: PlotCalibrationGains.py:522
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
PlotCalibrationGains.GainReader.LoadReferenceOracle
def LoadReferenceOracle(self, mapping_tool)
Definition: PlotCalibrationGains.py:431
PlotCalibrationGains.EmPartitionPlots.get_partition_number
def get_partition_number(self, eta_bin)
Definition: PlotCalibrationGains.py:536
PlotCalibrationGains.HadPartitionPlots.get_partition_number
def get_partition_number(self, eta_bin)
Definition: PlotCalibrationGains.py:582
PlotCalibrationGains.HadPartitionPlots.his_partitions
his_partitions
Definition: PlotCalibrationGains.py:573
PlotCalibrationGains.GainReader.__init__
def __init__(self)
Definition: PlotCalibrationGains.py:289
PlotCalibrationGains.L1CaloMap.Fill
def Fill(self, eta, phi, gain=1)
Definition: PlotCalibrationGains.py:39
PlotCalibrationGains.L1CaloMap.__init__
def __init__(self, title, XaxisTitle="", YaxisTitle="")
Definition: PlotCalibrationGains.py:17
PlotCalibrationGains.L1CaloGeometryConvertor.getCoolHad
def getCoolHad(self, i_eta, i_phi)
Definition: PlotCalibrationGains.py:167
PlotCalibrationGains.GainReader.getOffset
def getOffset(self, coolId)
Definition: PlotCalibrationGains.py:492
GetEntries
TGraphErrors * GetEntries(TH2F *histo)
Definition: TRTCalib_makeplots.cxx:4019
PlotCalibrationGains.L1CaloGeometryConvertor.UNIX2COOL
UNIX2COOL
Definition: PlotCalibrationGains.py:79
PlotCalibrationGains.L1CaloGeometryConvertor.__init__
def __init__(self)
Definition: PlotCalibrationGains.py:61
PlotCalibrationGains.EmPartitionPlots.Fill
def Fill(self, eta_bin, gain)
Definition: PlotCalibrationGains.py:554
PlotCalibrationGains.L1CaloMap.xbins
xbins
Definition: PlotCalibrationGains.py:20
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
PlotCalibrationGains.L1CaloGeometryConvertor.getOverlapLayer
def getOverlapLayer(self, RecCoolId)
Definition: PlotCalibrationGains.py:243
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:805
PlotCalibrationGains.L1CaloMap.SetMinimum
def SetMinimum(self, minimum)
Definition: PlotCalibrationGains.py:53
PlotCalibrationGains.HadPartitionPlots.Fill
def Fill(self, eta_bin, gain)
Definition: PlotCalibrationGains.py:599
PlotCalibrationGains.L1CaloGeometryConvertor.isPPMOverlap
def isPPMOverlap(self, CoolId)
Definition: PlotCalibrationGains.py:235
PlotCalibrationGains.PlotCalibrationGains
def PlotCalibrationGains(input_file_name="", reference_file_name="", isInputXml=False, isInputSqlite=False, isRefXml=False, isRefSqlite=False, isRefOracle=False)
Definition: PlotCalibrationGains.py:610
PlotCalibrationGains.EmPartitionPlots.__init__
def __init__(self, name, nbins=40, minimum=0., maximum=2., XaxisTitle="", YaxisTitle="")
Definition: PlotCalibrationGains.py:518
PlotCalibrationGains.HadPartitionPlots.__init__
def __init__(self, name, nbins=40, minimum=0., maximum=2., XaxisTitle="", YaxisTitle="")
Definition: PlotCalibrationGains.py:567
PlotCalibrationGains.HadPartitionPlots.nPartitions
nPartitions
Definition: PlotCalibrationGains.py:569
PlotCalibrationGains.GainReader.measured_gains
measured_gains
Definition: PlotCalibrationGains.py:291
PlotCalibrationGains.GainReader.LoadReferenceSqlite
def LoadReferenceSqlite(self, name)
Definition: PlotCalibrationGains.py:394
PlotCalibrationGains.L1CaloGeometryConvertor.isCoolHad
def isCoolHad(self, CoolId)
Definition: PlotCalibrationGains.py:179
PlotCalibrationGains.L1CaloGeometryConvertor.getEtaBin
def getEtaBin(self, CoolId)
Definition: PlotCalibrationGains.py:182
PlotCalibrationGains.L1CaloMap.Draw
def Draw(self)
Definition: PlotCalibrationGains.py:34
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
PlotCalibrationGains.L1CaloGeometryConvertor
Definition: PlotCalibrationGains.py:59
PlotCalibrationGains.GainReader.measured_chi2
measured_chi2
Definition: PlotCalibrationGains.py:293
PlotCalibrationGains.GainReader
Definition: PlotCalibrationGains.py:287
PlotCalibrationGains.GainReader.UNIX2COOL
UNIX2COOL
Definition: PlotCalibrationGains.py:295
PlotCalibrationGains.L1CaloGeometryConvertor.list_of_channels_had
list_of_channels_had
Definition: PlotCalibrationGains.py:65
PlotCalibrationGains.EmPartitionPlots
Definition: PlotCalibrationGains.py:516
PlotCalibrationGains.GainReader.getChi2
def getChi2(self, coolId)
Definition: PlotCalibrationGains.py:486
PlotCalibrationGains.EmPartitionPlots.nPartitions
nPartitions
Definition: PlotCalibrationGains.py:520
PlotCalibrationGains.GainReader.strategy
strategy
Definition: PlotCalibrationGains.py:298
array
PlotCalibrationGains.GainReader.run_nr
run_nr
Definition: PlotCalibrationGains.py:297
PlotCalibrationGains.L1CaloMap.h_1
h_1
Definition: PlotCalibrationGains.py:29
PlotCalibrationGains.L1CaloMap.SetMaximum
def SetMaximum(self, maximum)
Definition: PlotCalibrationGains.py:56
PlotCalibrationGains.GainReader.LoadGainsSqlite
def LoadGainsSqlite(self, name)
Definition: PlotCalibrationGains.py:340
PlotCalibrationGains.L1CaloGeometryConvertor.coolIdPath
coolIdPath
Definition: PlotCalibrationGains.py:62
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
PlotCalibrationGains.GainReader.getReferenceGain
def getReferenceGain(self, coolId)
Definition: PlotCalibrationGains.py:499
PlotCalibrationGains.L1CaloGeometryConvertor.getReceiverCMCP
def getReceiverCMCP(self, ReceiverId)
Definition: PlotCalibrationGains.py:208
PlotCalibrationGains.L1CaloGeometryConvertor.getPPMfromReceiver
def getPPMfromReceiver(self, ReceiverId)
Definition: PlotCalibrationGains.py:116
PlotCalibrationGains.EmPartitionPlots.ext
ext
Definition: PlotCalibrationGains.py:521
Trk::open
@ open
Definition: BinningType.h:40
PlotCalibrationGains.L1CaloGeometryConvertor.list_of_channels_em
list_of_channels_em
Definition: PlotCalibrationGains.py:64
PlotCalibrationGains.L1CaloGeometryConvertor.getFCAL23RecEta
def getFCAL23RecEta(self, RecCoolId)
Definition: PlotCalibrationGains.py:261
PlotCalibrationGains.L1CaloGeometryConvertor.getMissingReceiverChannels
def getMissingReceiverChannels(self, channel_list)
Definition: PlotCalibrationGains.py:202
PlotCalibrationGains.GainReader.LoadReferenceXml
def LoadReferenceXml(self, name)
Definition: PlotCalibrationGains.py:325
PlotCalibrationGains.L1CaloMap.nxbins
nxbins
Definition: PlotCalibrationGains.py:19
PlotCalibrationGains.HadPartitionPlots.ext
ext
Definition: PlotCalibrationGains.py:570
PlotCalibrationGains.L1CaloGeometryConvertor.receiver_to_ppm_map
receiver_to_ppm_map
Definition: PlotCalibrationGains.py:78
PlotCalibrationGains.GainReader.reference_gains
reference_gains
Definition: PlotCalibrationGains.py:292
PlotCalibrationGains.L1CaloGeometryConvertor.getPhiBin
def getPhiBin(self, CoolId)
Definition: PlotCalibrationGains.py:192
PlotCalibrationGains.L1CaloGeometryConvertor.getCoolEm
def getCoolEm(self, i_eta, i_phi)
Definition: PlotCalibrationGains.py:157
PlotCalibrationGains.L1CaloGeometryConvertor.getReceiverfromPPM
def getReceiverfromPPM(self, PPMId, strategy_string=None)
Definition: PlotCalibrationGains.py:123
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
PlotCalibrationGains.EmPartitionPlots.his_partitions
his_partitions
Definition: PlotCalibrationGains.py:525
PlotCalibrationGains.HadPartitionPlots
Definition: PlotCalibrationGains.py:565
PlotCalibrationGains.GainReader.LoadGainsXml
def LoadGainsXml(self, name)
Definition: PlotCalibrationGains.py:300
PlotCalibrationGains
Definition: PlotCalibrationGains.py:1
readCCLHist.float
float
Definition: readCCLHist.py:83
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
PlotCalibrationGains.L1CaloGeometryConvertor.isPPMFCAL
def isPPMFCAL(self, CoolId)
Definition: PlotCalibrationGains.py:225
PlotCalibrationGains.GainReader.getGain
def getGain(self, coolId)
Definition: PlotCalibrationGains.py:480
PlotCalibrationGains.L1CaloMap
Definition: PlotCalibrationGains.py:15
PlotCalibrationGains.GainReader.measured_offset
measured_offset
Definition: PlotCalibrationGains.py:294
PlotCalibrationGains.GainReader.passesSelection
def passesSelection(self, coolId)
Definition: PlotCalibrationGains.py:505