ATLAS Offline Software
Classes | Functions
python.TrigEgammaFastCaloHypoTool Namespace Reference

Classes

class  TrigEgammaFastCaloHypoToolConfig
 

Functions

def same (val, tool)
 
def electronRingerFastCaloHypoConfig (flags, name, sequenceOut)
 
def photonRingerFastCaloHypoConfig (flags, name, sequenceOut)
 
def createTrigEgammaFastCaloHypoAlg (flags, name, sequenceOut)
 
def TrigEgammaFastCaloHypoAlgCfg (flags, name, CaloClusters)
 
def createTrigEgammaFastCaloHypoAlg_noringer (flags, name, sequenceOut)
 
def treatPidName (pidname)
 
def _IncTool (flags, name, monGroups, cpart, tool=None)
 
def TrigEgammaFastCaloHypoToolFromDict (flags, chainDict, tool=None)
 
def createTrigEgammaFastCaloElectronSelectors (flags, ConfigFilePath=None)
 
def createTrigEgammaFastCaloPhotonSelectors (flags, ConfigFilePath=None)
 

Function Documentation

◆ _IncTool()

def python.TrigEgammaFastCaloHypoTool._IncTool (   flags,
  name,
  monGroups,
  cpart,
  tool = None 
)
private

Definition at line 325 of file TrigEgammaFastCaloHypoTool.py.

325 def _IncTool(flags, name, monGroups, cpart, tool=None):
326  config = TrigEgammaFastCaloHypoToolConfig(flags, name, monGroups, cpart, tool=tool )
327  config.compile(flags)
328  return config.tool()
329 
330 

◆ createTrigEgammaFastCaloElectronSelectors()

def python.TrigEgammaFastCaloHypoTool.createTrigEgammaFastCaloElectronSelectors (   flags,
  ConfigFilePath = None 
)

Definition at line 338 of file TrigEgammaFastCaloHypoTool.py.

338 def createTrigEgammaFastCaloElectronSelectors(flags, ConfigFilePath=None):
339 
340  if not ConfigFilePath:
341  ConfigFilePath = flags.Trigger.egamma.ringerVersion
342 
343 
344  SelectorNames = {
345  'tight' : 'AsgElectronFastCaloRingerTightSelectorTool',
346  'medium' : 'AsgElectronFastCaloRingerMediumSelectorTool',
347  'loose' : 'AsgElectronFastCaloRingerLooseSelectorTool',
348  'vloose' : 'AsgElectronFastCaloRingerVeryLooseSelectorTool',
349  }
350 
351 
352  ToolConfigFile = {
353  'tight' :['ElectronRingerTightTriggerConfig.conf' ],
354  'medium' :['ElectronRingerMediumTriggerConfig.conf' ],
355  'loose' :['ElectronRingerLooseTriggerConfig.conf' ],
356  'vloose' :['ElectronRingerVeryLooseTriggerConfig.conf'],
357  }
358 
359  selectors = []
360 
361  for pidname , name in SelectorNames.items():
362  SelectorTool=CompFactory.Ringer.AsgRingerSelectorTool(name)
363  SelectorTool.ConfigFiles = [ (ConfigFilePath+'/'+path) for path in ToolConfigFile[pidname] ]
364  selectors.append(SelectorTool)
365  return selectors
366 
367 
368 

◆ createTrigEgammaFastCaloHypoAlg()

def python.TrigEgammaFastCaloHypoTool.createTrigEgammaFastCaloHypoAlg (   flags,
  name,
  sequenceOut 
)

Definition at line 50 of file TrigEgammaFastCaloHypoTool.py.

50 def createTrigEgammaFastCaloHypoAlg(flags, name, sequenceOut):
51  if 'Electron' in name:
52  return electronRingerFastCaloHypoConfig(flags, name, sequenceOut)
53  elif 'Photon' in name:
54  return photonRingerFastCaloHypoConfig(flags, name, sequenceOut)
55 
56 

◆ createTrigEgammaFastCaloHypoAlg_noringer()

def python.TrigEgammaFastCaloHypoTool.createTrigEgammaFastCaloHypoAlg_noringer (   flags,
  name,
  sequenceOut 
)

Definition at line 66 of file TrigEgammaFastCaloHypoTool.py.

66 def createTrigEgammaFastCaloHypoAlg_noringer(flags, name, sequenceOut):
67 
68  # make the Hypo
69  theFastCaloHypo = CompFactory.TrigEgammaFastCaloHypoAlg(name)
70  theFastCaloHypo.CaloClusters = sequenceOut
71 
72  # Just for electrons
73  theFastCaloHypo.PidNames = []
74  theFastCaloHypo.RingerNNSelectorTools = []
75 
76 
77  monTool = GenericMonitoringTool(flags, "MonTool_"+name,
78  HistPath = 'FastCaloL2EgammaHypo/'+name)
79  monTool.defineHistogram('TIME_exec', type='TH1F', path='EXPERT', title="Fast Calo Hypo Algtime; time [ us ] ; Nruns", xbins=80, xmin=0.0, xmax=8000.0)
80  monTool.defineHistogram('TIME_NN_exec', type='TH1F', path='EXPERT', title="Fast Calo Hypo NN Algtime; time [ us ] ; Nruns", xbins=20, xmin=0.0, xmax=1000.0)
81 
82  theFastCaloHypo.MonTool=monTool
83  return theFastCaloHypo
84 
85 
86 

◆ createTrigEgammaFastCaloPhotonSelectors()

def python.TrigEgammaFastCaloHypoTool.createTrigEgammaFastCaloPhotonSelectors (   flags,
  ConfigFilePath = None 
)

Definition at line 369 of file TrigEgammaFastCaloHypoTool.py.

369 def createTrigEgammaFastCaloPhotonSelectors(flags, ConfigFilePath=None):
370 
371  if not ConfigFilePath:
372  ConfigFilePath = flags.Trigger.egamma.photonRingerVersion
373 
374 
375  SelectorNames = {
376  'tight' : 'AsgPhotonFastCaloRingerTightSelectorTool',
377  'medium' : 'AsgPhotonFastCaloRingerMediumSelectorTool',
378  'loose' : 'AsgPhotonFastCaloRingerLooseSelectorTool',
379  }
380 
381 
382  ToolConfigFile = {
383  'tight' :['PhotonRingerTightTriggerConfig.conf' ],
384  'medium' :['PhotonRingerMediumTriggerConfig.conf' ],
385  'loose' :['PhotonRingerLooseTriggerConfig.conf' ],
386  }
387 
388  selectors = []
389 
390  for pidname , name in SelectorNames.items():
391  SelectorTool=CompFactory.Ringer.AsgRingerSelectorTool(name)
392  SelectorTool.UseTansigOutput = True # FIXME: Should be removed in the next round
393  SelectorTool.ConfigFiles = [ (ConfigFilePath+'/'+path) for path in ToolConfigFile[pidname] ]
394  selectors.append(SelectorTool)
395  return selectors

◆ electronRingerFastCaloHypoConfig()

def python.TrigEgammaFastCaloHypoTool.electronRingerFastCaloHypoConfig (   flags,
  name,
  sequenceOut 
)

Definition at line 17 of file TrigEgammaFastCaloHypoTool.py.

17 def electronRingerFastCaloHypoConfig(flags, name, sequenceOut):
18  # make the Hypo
19  theFastCaloHypo = CompFactory.TrigEgammaFastCaloHypoAlg(name)
20  theFastCaloHypo.CaloClusters = sequenceOut
21  theFastCaloHypo.PidNames = ["tight", "medium", "loose", "vloose"]
22  theFastCaloHypo.RingerNNSelectorTools = createTrigEgammaFastCaloElectronSelectors(flags)
23 
24  monTool = GenericMonitoringTool(flags, "MonTool_"+name, HistPath = 'FastCaloL2EgammaHypo/'+name)
25  monTool.defineHistogram('TIME_exec', type='TH1F', path='EXPERT', title="Fast Calo Hypo Algtime; time [ us ] ; Nruns", xbins=80, xmin=0.0, xmax=8000.0)
26  monTool.defineHistogram('TIME_NN_exec', type='TH1F', path='EXPERT', title="Fast Calo Hypo NN Algtime; time [ us ] ; Nruns", xbins=50, xmin=0.0, xmax=50)
27 
28  theFastCaloHypo.MonTool=monTool
29  return theFastCaloHypo
30 
31 #
32 # For photons
33 #

◆ photonRingerFastCaloHypoConfig()

def python.TrigEgammaFastCaloHypoTool.photonRingerFastCaloHypoConfig (   flags,
  name,
  sequenceOut 
)

Definition at line 34 of file TrigEgammaFastCaloHypoTool.py.

34 def photonRingerFastCaloHypoConfig(flags, name, sequenceOut):
35  # make the Hypo
36  theFastCaloHypo = CompFactory.TrigEgammaFastCaloHypoAlg(name)
37  theFastCaloHypo.CaloClusters = sequenceOut
38  theFastCaloHypo.PidNames = ["tight", "medium", "loose"]
39  theFastCaloHypo.RingerNNSelectorTools = createTrigEgammaFastCaloPhotonSelectors(flags)
40 
41  monTool = GenericMonitoringTool(flags, "MonTool_"+name, HistPath = 'FastCaloL2EgammaHypo/'+name)
42  monTool.defineHistogram('TIME_exec', type='TH1F', path='EXPERT', title="Fast Calo Hypo Algtime; time [ us ] ; Nruns", xbins=80, xmin=0.0, xmax=8000.0)
43  monTool.defineHistogram('TIME_NN_exec', type='TH1F', path='EXPERT', title="Fast Calo Hypo NN Algtime; time [ us ] ; Nruns", xbins=50, xmin=0.0, xmax=50)
44 
45  theFastCaloHypo.MonTool=monTool
46  return theFastCaloHypo
47 
48 
49 

◆ same()

def python.TrigEgammaFastCaloHypoTool.same (   val,
  tool 
)

Definition at line 10 of file TrigEgammaFastCaloHypoTool.py.

10 def same( val , tool):
11  return [val]*( len( tool.EtaBins ) - 1 )
12 
13 
14 #
15 # For electrons
16 #

◆ treatPidName()

def python.TrigEgammaFastCaloHypoTool.treatPidName (   pidname)

Definition at line 87 of file TrigEgammaFastCaloHypoTool.py.

87 def treatPidName(pidname):
88  if 'tight' in pidname:
89  return 'tight'
90  elif 'medium' in pidname:
91  return 'medium'
92  # this should be before loose to works
93  elif 'vloose' in pidname:
94  return 'vloose'
95  else:
96  return 'loose'
97 
98 #
99 # For electron and photons
100 #

◆ TrigEgammaFastCaloHypoAlgCfg()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoAlgCfg (   flags,
  name,
  CaloClusters 
)

Definition at line 57 of file TrigEgammaFastCaloHypoTool.py.

57 def TrigEgammaFastCaloHypoAlgCfg(flags, name, CaloClusters):
58  acc = ComponentAccumulator()
59  acc.addEventAlgo(createTrigEgammaFastCaloHypoAlg(flags, name=name, sequenceOut=CaloClusters))
60  return acc
61 
62 #
63 # For photons only
64 # NOTE: For future, ringer will be applied at the fast photon step
65 #

◆ TrigEgammaFastCaloHypoToolFromDict()

def python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolFromDict (   flags,
  chainDict,
  tool = None 
)
Use menu decoded chain dictionary to configure the tool 

Definition at line 331 of file TrigEgammaFastCaloHypoTool.py.

331 def TrigEgammaFastCaloHypoToolFromDict(flags, chainDict , tool=None):
332  """ Use menu decoded chain dictionary to configure the tool """
333  cparts = [i for i in chainDict['chainParts'] if ((i['signature']=='Electron') or (i['signature']=='Photon'))]
334  return _IncTool( flags, chainDict['chainName'], chainDict['monGroups'], cparts[0], tool=tool)
335 
336 
337 
python.TrigEgammaFastCaloHypoTool.createTrigEgammaFastCaloHypoAlg_noringer
def createTrigEgammaFastCaloHypoAlg_noringer(flags, name, sequenceOut)
Definition: TrigEgammaFastCaloHypoTool.py:66
python.TrigEgammaFastCaloHypoTool._IncTool
def _IncTool(flags, name, monGroups, cpart, tool=None)
Definition: TrigEgammaFastCaloHypoTool.py:325
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrigEgammaFastCaloHypoTool.electronRingerFastCaloHypoConfig
def electronRingerFastCaloHypoConfig(flags, name, sequenceOut)
Definition: TrigEgammaFastCaloHypoTool.py:17
python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoToolFromDict
def TrigEgammaFastCaloHypoToolFromDict(flags, chainDict, tool=None)
Definition: TrigEgammaFastCaloHypoTool.py:331
python.TrigEgammaFastCaloHypoTool.treatPidName
def treatPidName(pidname)
Definition: TrigEgammaFastCaloHypoTool.py:87
GenericMonitoringTool
Definition: GenericMonitoringTool.h:51
python.TrigEgammaFastCaloHypoTool.same
def same(val, tool)
Definition: TrigEgammaFastCaloHypoTool.py:10
python.TrigEgammaFastCaloHypoTool.createTrigEgammaFastCaloElectronSelectors
def createTrigEgammaFastCaloElectronSelectors(flags, ConfigFilePath=None)
Definition: TrigEgammaFastCaloHypoTool.py:338
python.TrigEgammaFastCaloHypoTool.photonRingerFastCaloHypoConfig
def photonRingerFastCaloHypoConfig(flags, name, sequenceOut)
Definition: TrigEgammaFastCaloHypoTool.py:34
python.TrigEgammaFastCaloHypoTool.TrigEgammaFastCaloHypoAlgCfg
def TrigEgammaFastCaloHypoAlgCfg(flags, name, CaloClusters)
Definition: TrigEgammaFastCaloHypoTool.py:57
python.TrigEgammaFastCaloHypoTool.createTrigEgammaFastCaloHypoAlg
def createTrigEgammaFastCaloHypoAlg(flags, name, sequenceOut)
Definition: TrigEgammaFastCaloHypoTool.py:50
python.TrigEgammaFastCaloHypoTool.createTrigEgammaFastCaloPhotonSelectors
def createTrigEgammaFastCaloPhotonSelectors(flags, ConfigFilePath=None)
Definition: TrigEgammaFastCaloHypoTool.py:369