|  | 
| def | __init__ (self) | 
|  | 
| def | LoadGainsXml (self, name) | 
|  | 
| def | LoadReferenceXml (self, name) | 
|  | 
| def | LoadGainsSqlite (self, name) | 
|  | 
| def | LoadReferenceSqlite (self, name) | 
|  | 
| def | LoadReferenceOracle (self, mapping_tool) | 
|  | 
| def | getGain (self, coolId) | 
|  | 
| def | getChi2 (self, coolId) | 
|  | 
| def | getOffset (self, coolId) | 
|  | 
| def | getReferenceGain (self, coolId) | 
|  | 
| def | passesSelection (self, coolId) | 
|  | 
Definition at line 296 of file PlotCalibrationGains.py.
 
◆ __init__()
      
        
          | def PlotCalibrationGains.GainReader.__init__ | ( |  | self | ) |  | 
      
 
Definition at line 298 of file PlotCalibrationGains.py.
  300         self.measured_gains={}
 
  301         self.reference_gains={}
 
  302         self.measured_chi2={}
 
  303         self.measured_offset={}
 
  304         self.UNIX2COOL = 1000000000
 
 
 
 
◆ getChi2()
      
        
          | def PlotCalibrationGains.GainReader.getChi2 | ( |  | self, | 
        
          |  |  |  | coolId | 
        
          |  | ) |  |  | 
      
 
 
◆ getGain()
      
        
          | def PlotCalibrationGains.GainReader.getGain | ( |  | self, | 
        
          |  |  |  | coolId | 
        
          |  | ) |  |  | 
      
 
Definition at line 482 of file PlotCalibrationGains.py.
  482     def getGain(self,coolId):
 
  483         if (coolId 
in self.measured_gains):
 
  484             return float(self.measured_gains[coolId])
 
 
 
◆ getOffset()
      
        
          | def PlotCalibrationGains.GainReader.getOffset | ( |  | self, | 
        
          |  |  |  | coolId | 
        
          |  | ) |  |  | 
      
 
 
◆ getReferenceGain()
      
        
          | def PlotCalibrationGains.GainReader.getReferenceGain | ( |  | self, | 
        
          |  |  |  | coolId | 
        
          |  | ) |  |  | 
      
 
Definition at line 500 of file PlotCalibrationGains.py.
  500     def getReferenceGain(self,coolId):
 
  501         if (coolId 
in self.reference_gains):
 
  502             return float(self.reference_gains[coolId])
 
 
 
◆ LoadGainsSqlite()
      
        
          | def PlotCalibrationGains.GainReader.LoadGainsSqlite | ( |  | self, | 
        
          |  |  |  | name | 
        
          |  | ) |  |  | 
      
 
Definition at line 348 of file PlotCalibrationGains.py.
  348     def LoadGainsSqlite(self,name):
 
  351         dbSvc = cool.DatabaseSvcFactory.databaseService()
 
  353         dbString=
'sqlite://;schema='+name+
';dbname=L1CALO' 
  355             db = dbSvc.openDatabase(dbString, 
False)       
 
  356         except Exception 
as e:
 
  357             print (
'Error: Problem opening database', e)
 
  360         folder_name = 
'/TRIGGER/L1Calo/V1/Results/EnergyScanResults' 
  361         folder=db.getFolder(folder_name)
 
  363         startUtime = 
int(time.time())
 
  364         endUtime = 
int(time.time())
 
  365         startValKey = startUtime * self.UNIX2COOL
 
  366         endValKey = endUtime * self.UNIX2COOL
 
  367         chsel = cool.ChannelSelection(0,sys.maxsize)
 
  370             itr=folder.browseObjects(startValKey, endValKey, chsel)
 
  371         except Exception 
as e:
 
  376             CoolId = hex(
int(row.channelId()))
 
  377             payload = row.payload()
 
  378             self.measured_gains[CoolId]  = payload[
'Slope']
 
  379             self.measured_chi2[CoolId]   = payload[
'Chi2']
 
  380             self.measured_offset[CoolId] = payload[
'Offset']
 
  382         folder_gen_name = 
'/TRIGGER/L1Calo/V1/Results/EnergyScanRunInfo' 
  383         folder_gen=db.getFolder(folder_gen_name)
 
  386             itr=folder_gen.browseObjects(startValKey, endValKey, chsel)
 
  388                 payload = row.payload()
 
  389                 self.run_nr   = payload[
'RunNumber']
 
  390                 self.strategy = payload[
'GainStrategy']
 
  391                 if (self.strategy == 
''): self.strategy=
'NA'  
  392             print ( (
"Run nr. = %d, Strategy = %s") % (self.run_nr, self.strategy) )
 
  395             print (
"Warning, in LoadGainsSqlite can't get runtype info! Hope this is not serious!")
 
 
 
◆ LoadGainsXml()
      
        
          | def PlotCalibrationGains.GainReader.LoadGainsXml | ( |  | self, | 
        
          |  |  |  | name | 
        
          |  | ) |  |  | 
      
 
Definition at line 309 of file PlotCalibrationGains.py.
  309     def LoadGainsXml(self,name):
 
  311         input_file = 
open(name)
 
  313         for line 
in input_file.readlines():
 
  314             parts = line.split(
' ')
 
  315             if parts[0] == 
'<Channel':
 
  316                 list_cool=parts[1].
split(
'\'')
 
  319                 list_gain=parts[2].
split(
'\'')
 
  321                 self.measured_gains[cool_id]=gain
 
  323                 list_offset=parts[3].
split(
'\'')
 
  324                 offset=list_offset[1]
 
  325                 self.measured_offset[cool_id]=offset
 
  327                 list_chi2=parts[4].
split(
'\'')
 
  329                 self.measured_chi2[cool_id]=chi2
 
 
 
◆ LoadReferenceOracle()
      
        
          | def PlotCalibrationGains.GainReader.LoadReferenceOracle | ( |  | self, | 
        
          |  |  |  | mapping_tool | 
        
          |  | ) |  |  | 
      
 
Definition at line 436 of file PlotCalibrationGains.py.
  436     def LoadReferenceOracle(self,mapping_tool):
 
  439         dbSvc = cool.DatabaseSvcFactory.databaseService()
 
  441         dbString = 
'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TRIGGER;dbname=CONDBR2' 
  443             db = dbSvc.openDatabase(dbString, 
False)        
 
  444         except Exception 
as e:
 
  445             print (
'Error: Problem opening database', e)
 
  448         folder_name = 
"/TRIGGER/Receivers/Factors/CalibGains" 
  449         folder=db.getFolder(folder_name)
 
  451         startUtime = 
int(time.time())
 
  452         endUtime = 
int(time.time())
 
  453         startValKey = startUtime * self.UNIX2COOL
 
  454         endValKey = endUtime * self.UNIX2COOL
 
  455         chsel = cool.ChannelSelection(0,sys.maxsize)
 
  458             itr=folder.browseObjects(startValKey, endValKey, chsel)
 
  459         except Exception 
as e:
 
  464             ReceiverId = hex(
int(row.channelId()))
 
  465             PPMId = mapping_tool.getPPMfromReceiver(ReceiverId)
 
  466             payload = row.payload()
 
  467             gain = payload[
'factor']
 
  469             if PPMId 
is not None:
 
  470                 if self.strategy 
is None:                 
 
  471                     self.reference_gains[PPMId]=gain
 
  473                     if mapping_tool.getReceiverfromPPM(PPMId,self.strategy) == ReceiverId:  
 
  475                         self.reference_gains[PPMId]=gain
 
 
 
◆ LoadReferenceSqlite()
      
        
          | def PlotCalibrationGains.GainReader.LoadReferenceSqlite | ( |  | self, | 
        
          |  |  |  | name | 
        
          |  | ) |  |  | 
      
 
Definition at line 400 of file PlotCalibrationGains.py.
  400     def LoadReferenceSqlite(self,name):
 
  403         dbSvc = cool.DatabaseSvcFactory.databaseService()
 
  405         dbString=
'sqlite://;schema='+name+
';dbname=L1CALO' 
  407             db = dbSvc.openDatabase(dbString, 
False)        
 
  408         except Exception 
as e:
 
  409             print (
'Error: Problem opening database', e)
 
  412         folder_name = 
'/TRIGGER/L1Calo/V1/Results/EnergyScanResults' 
  413         folder=db.getFolder(folder_name)
 
  415         startUtime = 
int(time.time())
 
  416         endUtime = 
int(time.time())
 
  417         startValKey = startUtime * self.UNIX2COOL
 
  418         endValKey = endUtime * self.UNIX2COOL
 
  419         chsel = cool.ChannelSelection(0,sys.maxsize)
 
  422             itr=folder.browseObjects(startValKey, endValKey, chsel)
 
  423         except Exception 
as e:
 
  428             CoolId = hex(
int(row.channelId()))
 
  429             payload = row.payload()
 
  430             self.reference_gains[CoolId]=payload[
'Slope']
 
 
 
◆ LoadReferenceXml()
      
        
          | def PlotCalibrationGains.GainReader.LoadReferenceXml | ( |  | self, | 
        
          |  |  |  | name | 
        
          |  | ) |  |  | 
      
 
Definition at line 333 of file PlotCalibrationGains.py.
  333     def LoadReferenceXml(self,name): 
 
  335         input_gains_reference = 
open(name)
 
  337         for line 
in input_gains_reference.readlines():
 
  338             parts = line.split(
' ')
 
  339             if parts[0] == 
'<Channel':
 
  340                 list_cool=parts[1].
split(
'\'')
 
  343                 list_gain=parts[2].
split(
'\'')
 
  345                 self.reference_gains[cool_id]=gain
 
 
 
◆ passesSelection()
      
        
          | def PlotCalibrationGains.GainReader.passesSelection | ( |  | self, | 
        
          |  |  |  | coolId | 
        
          |  | ) |  |  | 
      
 
Definition at line 506 of file PlotCalibrationGains.py.
  507         if ((coolId 
in self.measured_gains) 
and  
  508             (self.getGain(coolId) > 0.5 
and self.getGain(coolId)<1.6) 
and 
  511             (self.getOffset(coolId) > -10 
and self.getOffset(coolId) < 10)):
 
 
 
 
◆ measured_chi2
      
        
          | PlotCalibrationGains.GainReader.measured_chi2 | 
      
 
 
◆ measured_gains
      
        
          | PlotCalibrationGains.GainReader.measured_gains | 
      
 
 
◆ measured_offset
      
        
          | PlotCalibrationGains.GainReader.measured_offset | 
      
 
 
◆ reference_gains
      
        
          | PlotCalibrationGains.GainReader.reference_gains | 
      
 
 
◆ run_nr
      
        
          | PlotCalibrationGains.GainReader.run_nr | 
      
 
 
◆ strategy
      
        
          | PlotCalibrationGains.GainReader.strategy | 
      
 
 
◆ UNIX2COOL
      
        
          | PlotCalibrationGains.GainReader.UNIX2COOL | 
      
 
 
The documentation for this class was generated from the following file:
 
double getChi2(int &ndof, double ipt, double eta1, double seta1, double phi1, double sphi1, double ipt1, double sipt1, double eta2, double seta2, double phi2, double sphi2, double ipt2, double sipt2, bool useAbsPt)
Get OLD style (i.e. muFast time) Chi2.