3 from AthenaCommon.Logging
import logging
5 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
6 from AthenaConfiguration.ComponentFactory
import CompFactory
13 __operation_points = [
'tight' ,
28 __trigElectronLrtd0Cut = {
'lrtloose' :2.0,
35 def __init__(self, name, monGroups, cpart, tool=None):
37 self.
__log = logging.getLogger(
'TrigEgammaFastElectronHypoTool')
40 self.
__sel = cpart[
'addInfo'][0]
if cpart[
'addInfo']
else cpart[
'IDinfo']
46 tool = CompFactory.TrigEgammaFastElectronHypoTool(name)
49 tool.AcceptAll =
False
52 tool.CaloTrackdETA = 0.2
53 tool.CaloTrackdPHI = 990.
54 tool.CaloTrackdEoverPLow = 0.0
55 tool.CaloTrackdEoverPHigh = 999.0
84 self.
tool().AcceptAll =
True
90 self.
tool().DoRinger =
True
96 self.
tool().TrackPt = 1.0 * GeV
98 self.
tool().TrackPt = 2.0 * GeV
100 self.
tool().TrackPt = 3.0 * GeV
101 elif self.
etthr() >= 50:
102 self.
tool().TrackPt = 5.0 * GeV
103 self.
tool().CaloTrackdETA = 999.
104 self.
tool().CaloTrackdPHI = 999.
108 self.
tool().DoLRT =
True
128 if hasattr(self.
tool(),
"MonTool"):
130 doValidationMonitoring = flags.Trigger.doValidationMonitoring
133 if (any(
'egammaMon:online' in group
for group
in monGroups)
or doValidationMonitoring):
143 monTool.defineHistogram(
'CutCounter', type=
'TH1I', path=
'EXPERT', title=
"FastElectron Hypo Cut Counter;Cut Counter", xbins=8, xmin=-1.5, xmax=7.5, opt=
"kCumulative")
144 monTool.defineHistogram(
'CaloTrackdEta', type=
'TH1F', path=
'EXPERT', title=
"FastElectron Hypo #Delta #eta between cluster and track;#Delta #eta;Nevents", xbins=80, xmin=-0.4, xmax=0.4)
145 monTool.defineHistogram(
'CaloTrackdPhi', type=
'TH1F', path=
'EXPERT', title=
"FastElectron Hypo #Delta #phi between cluster and track;#Delta #phi;Nevents", xbins=80, xmin=-0.4, xmax=0.4)
146 monTool.defineHistogram(
'CaloTrackEoverP', type=
'TH1F', path=
'EXPERT', title=
"FastElectron Hypo E/p;E/p;Nevents", xbins=120, xmin=0, xmax=12)
147 monTool.defineHistogram(
'PtTrack', type=
'TH1F', path=
'EXPERT', title=
"FastElectron Hypo p_{T}^{track} [MeV];p_{T}^{track} [MeV];Nevents", xbins=50, xmin=0, xmax=100000)
148 monTool.defineHistogram(
'PtCalo', type=
'TH1F', path=
'EXPERT', title=
"FastElectron Hypo p_{T}^{calo} [MeV];p_{T}^{calo} [MeV];Nevents", xbins=50, xmin=0, xmax=100000)
149 monTool.defineHistogram(
'CaloEta', type=
'TH1F', path=
'EXPERT', title=
"FastElectron Hypo #eta^{calo} ; #eta^{calo};Nevents", xbins=200, xmin=-2.5, xmax=2.5)
150 monTool.defineHistogram(
'CaloPhi', type=
'TH1F', path=
'EXPERT', title=
"FastElectron Hypo #phi^{calo} ; #phi^{calo};Nevents", xbins=320, xmin=-3.2, xmax=3.2)
151 monTool.defineHistogram(
'd0Value', type=
"TH1F", path=
'EXPERT', title=
"FastElectron Hypo Track d0; d0 [mm]", xbins=100, xmin=-1, xmax=1)
152 if self.
tool().DoRinger:
153 monTool.defineHistogram(
'NNOutput',type=
'TH1F', path=
'EXPERT',title=
"NN Output; NN; Count", xbins=17,xmin=-8,xmax=+8)
155 monTool.HistPath =
'FastElectronHypo/'+self.
__name
156 self.
tool().MonTool = monTool
161 def _IncTool(flags, name, monGroups, cpart, tool=None):
163 config.compile(flags)
169 """ Use menu decoded chain dictionary to configure the tool """
170 cparts = [i
for i
in chainDict[
'chainParts']
if (i[
'signature']==
'Electron')]
171 return _IncTool( flags, chainDict[
'chainName'], chainDict[
'monGroups'], cparts[0] , tool=tool)