4 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
11 __operation_points = [
'tight' ,
19 return [val]*( len( self.
tool().EtaBins ) - 1 )
21 def __init__(self, name,monGroups, cpart, tool=None):
23 from AthenaCommon.Logging
import logging
24 self.
__log = logging.getLogger(
'TrigEgammaFastPhotonHypoTool')
27 self.
__sel =
'ion' if 'ion' in cpart[
'extra']
else (cpart[
'addInfo'][0]
if cpart[
'addInfo']
else cpart[
'IDinfo'])
31 from AthenaConfiguration.ComponentFactory
import CompFactory
32 tool = CompFactory.TrigEgammaFastPhotonHypoTool(name)
36 tool.EtaBins = [0.0, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
37 tool.ETthr = self.
same( 0.0 )
38 tool.CARCOREthr = self.
same( 0.0 )
39 tool.CAERATIOthr = self.
same( 0.0)
40 tool.F1thr = self.
same( 0.005 )
41 tool.ET2thr = self.
same( 90.0 * GeV )
42 tool.HADET2thr = self.
same( 999. * GeV )
43 tool.HADETthr = self.
same( 999. * GeV )
67 self.
__log.
debug(
'Chain :%s configured with etcut selection', self.
chain() )
71 self.
__log.
debug(
'Chain :%s configured with nocut selection', self.
chain() )
72 self.
tool().AcceptAll =
True
75 from TrigEgammaHypo.TrigEgammaFastCutDefs
import TrigFastPhotonCutMaps
76 self.
__log.
debug(
'Chain :%s configured with nominal selection', self.
chain() )
78 self.
tool().CARCOREthr = TrigFastPhotonCutMaps( self.
etthr() ).MapsCARCOREthr[ self.
pidname() ]
79 self.
tool().CAERATIOthr = TrigFastPhotonCutMaps( self.
etthr() ).MapsCAERATIOthr [ self.
pidname() ]
80 self.
tool().HADETthr = TrigFastPhotonCutMaps( self.
etthr() ).MapsHADETthr[ self.
pidname() ]
81 self.
tool().HADET2thr = self.
same(999.0 * GeV)
83 self.
tool().ET2thr = self.
same( 90.0*GeV )
90 if self.
pidname()
in (
'etcut',
'ion',
'nopid'):
94 elif 0 == self.
etthr():
101 if hasattr(self.
tool(),
"MonTool"):
103 doValidationMonitoring = flags.Trigger.doValidationMonitoring
106 if (any(
'egammaMon:online' in group
for group
in monGroups)
or doValidationMonitoring):
116 HistPath =
'FastPhotonHypo/'+self.
chain())
117 monTool.defineHistogram(
'CutCounter', type=
'TH1I', path=
'EXPERT', title=
"FastPhoton Hypo Cut Counter;Cut Counter", xbins=8, xmin=-1.5, xmax=7.5, opt=
"kCumulative")
118 monTool.defineHistogram(
'Et', type=
'TH1F', path=
'EXPERT', title=
"FastPhoton Hypo E_{T}^{EM};E_{T}^{EM} [MeV]",xbins=50, xmin=-2000, xmax=100000)
119 monTool.defineHistogram(
'Eta', type=
'TH1F', path=
'EXPERT', title=
"FastPhoton Hypo #eta^{calo} ; #eta^{calo};Nevents", xbins=200, xmin=-2.5, xmax=2.5)
120 monTool.defineHistogram(
'Phi', type=
'TH1F', path=
'EXPERT', title=
"FastPhoton Hypo #phi^{calo} ; #phi^{calo};Nevents", xbins=320, xmin=-3.2, xmax=3.2)
121 monTool.defineHistogram(
'Rcore', type=
'TH1F', path=
'EXPERT', title=
"FastPhoton Hypo R_{core};E^{3x7}/E^{7x7} in sampling 2",xbins=48, xmin=-0.1, xmax=1.1)
122 monTool.defineHistogram(
'Eratio', type=
'TH1F', path=
'EXPERT',title=
"FastPhoton Hypo E_{ratio};E^{max1}-E^{max2}/E^{max1}+E^{max2} in sampling 1 (excl.crack)",xbins=64, xmin=-0.1, xmax=1.5)
123 monTool.defineHistogram(
'Et_had', type=
'TH1F', path=
'EXPERT', title=
"FastPhoton Hypo E_{T}^{had} in first layer;E_{T}^{had} [MeV]",xbins=50, xmin=-2000, xmax=100000)
124 monTool.defineHistogram(
'F1', type=
'TH1F', path=
'EXPERT', title=
"FastPhoton Hypo f_{1};f_{1}", xbins=34, xmin=-0.5, xmax=1.2)
126 self.
__tool.MonTool = monTool
131 def _IncTool(flags, name, monGroups, cpart, tool=None):
133 config.compile(flags)
139 """ Use menu decoded chain dictionary to configure the tool """
140 cparts = [i
for i
in chainDict[
'chainParts']
if i[
'signature']==
'Photon' ]
141 return _IncTool( flags, chainDict[
'chainName'], chainDict[
'monGroups'], cparts[0] , tool=tool)