ATLAS Offline Software
Loading...
Searching...
No Matches
python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig Class Reference
Collaboration diagram for python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig:

Public Member Functions

 __init__ (self, name, monGroups, cpart, flags, tool=None)
 chain (self)
 pidname (self)
 etthr (self)
 lrtInfo (self)
 idperfInfo (self)
 tool (self)
 nocut (self)
 ringer (self)
 nominal (self)
 addLRTCut (self)
 compile (self, flags)
 addMonitoring (self, flags)

Private Attributes

 __log = logging.getLogger('TrigEgammaFastElectronHypoTool')
 __name = name
 __threshold = float(cpart['threshold'])
 __sel = cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
 __idperfInfo = cpart['idperfInfo']
 __lrtInfo = cpart['lrtInfo']
 __monGroups = monGroups
 __tool = tool

Static Private Attributes

list __operation_points
dict __trigElectronLrtd0Cut

Detailed Description

Definition at line 11 of file TrigEgammaFastElectronHypoTool.py.

Constructor & Destructor Documentation

◆ __init__()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__init__ ( self,
name,
monGroups,
cpart,
flags,
tool = None )

Definition at line 35 of file TrigEgammaFastElectronHypoTool.py.

35 def __init__(self, name, monGroups, cpart, flags, tool=None):
36
37 self.__log = logging.getLogger('TrigEgammaFastElectronHypoTool')
38 self.__name = name
39 self.__threshold = float(cpart['threshold'])
40 self.__sel = cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
41 self.__idperfInfo = cpart['idperfInfo']
42 self.__lrtInfo = cpart['lrtInfo']
43 self.__monGroups = monGroups
44
45 if not tool:
46 tool = CompFactory.TrigEgammaFastElectronHypoTool(name)
47
48 self.__tool = tool
49 tool.AcceptAll = False
50 tool.DoRinger = flags.Trigger.egamma.enableFastElectronRinger
51 tool.TrackPt = 0.0
52 tool.CaloTrackdETA = 0.2
53 tool.CaloTrackdPHI = 990.
54 tool.CaloTrackdEoverPLow = 0.0
55 tool.CaloTrackdEoverPHigh = 999.0
56 tool.TRTRatio = -999.
57 tool.PidName = ""
58
59 self.__log.debug( 'Chain :%s', self.__name )
60 self.__log.debug( 'Threshold :%s', self.__threshold )
61 self.__log.debug( 'Pidname :%s', self.__sel )
62
63
const bool debug

Member Function Documentation

◆ addLRTCut()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.addLRTCut ( self)

Definition at line 107 of file TrigEgammaFastElectronHypoTool.py.

107 def addLRTCut(self):
108 self.tool().DoLRT = True
109 self.tool().d0Cut=self.__trigElectronLrtd0Cut[self.lrtInfo()]
110
111

◆ addMonitoring()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.addMonitoring ( self,
flags )

Definition at line 140 of file TrigEgammaFastElectronHypoTool.py.

140 def addMonitoring(self, flags):
141
142 monTool = GenericMonitoringTool(flags, "MonTool"+self.__name)
143 cuts=['Has Track','ptCalo','#Delta #eta', '#Delta #phi','etOverPt_low','etOverPt_high','TRTHitRatio']
144 monTool.defineHistogram('CutCounter', type='TH1I', path='EXPERT', title="FastElectron Hypo Cut Counter;Cut Counter", xbins=7, xmin=0, xmax=7, opt="kCumulative",xlabels=cuts)
145 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)
146 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)
147 monTool.defineHistogram('CaloTrackEoverP', type='TH1F', path='EXPERT', title="FastElectron Hypo E/p;E/p;Nevents", xbins=120, xmin=0, xmax=12)
148 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)
149 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)
150 monTool.defineHistogram('CaloEta', type='TH1F', path='EXPERT', title="FastElectron Hypo #eta^{calo} ; #eta^{calo};Nevents", xbins=200, xmin=-2.5, xmax=2.5)
151 monTool.defineHistogram('CaloPhi', type='TH1F', path='EXPERT', title="FastElectron Hypo #phi^{calo} ; #phi^{calo};Nevents", xbins=320, xmin=-3.2, xmax=3.2)
152 monTool.defineHistogram('d0Value', type="TH1F", path='EXPERT', title="FastElectron Hypo Track d0; d0 [mm]", xbins=100, xmin=-1, xmax=1)
153 if self.tool().DoRinger:
154 monTool.defineHistogram('NNOutput',type='TH1F', path='EXPERT',title="NN Output; NN; Count", xbins=17,xmin=-8,xmax=+8)
155
156 monTool.HistPath = 'FastElectronHypo/'+self.__name
157 self.tool().MonTool = monTool
158
159
160
161

◆ chain()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.chain ( self)

Definition at line 64 of file TrigEgammaFastElectronHypoTool.py.

64 def chain(self):
65 return self.__name
66

◆ compile()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.compile ( self,
flags )

Definition at line 115 of file TrigEgammaFastElectronHypoTool.py.

115 def compile(self, flags):
116
117 if 'idperf' in self.idperfInfo():
118 self.nocut()
119 else:
120 self.nominal()
121
122 # secondary extra cut
123 if self.lrtInfo() in self.__trigElectronLrtd0Cut.keys():
124 self.addLRTCut()
125
126
127 # add mon tool
128 if hasattr(self.tool(), "MonTool"):
129
130 doValidationMonitoring = flags.Trigger.doValidationMonitoring # True to monitor all chains for validation purposes
131 monGroups = self.__monGroups
132
133 if (any('egammaMon:online' in group for group in monGroups) or doValidationMonitoring):
134 self.addMonitoring(flags)
135
136

◆ etthr()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.etthr ( self)

Definition at line 70 of file TrigEgammaFastElectronHypoTool.py.

70 def etthr(self):
71 return self.__threshold
72

◆ idperfInfo()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.idperfInfo ( self)

Definition at line 76 of file TrigEgammaFastElectronHypoTool.py.

76 def idperfInfo(self):
77 return self.__idperfInfo
78

◆ lrtInfo()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.lrtInfo ( self)

Definition at line 73 of file TrigEgammaFastElectronHypoTool.py.

73 def lrtInfo(self):
74 return self.__lrtInfo
75

◆ nocut()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.nocut ( self)

Definition at line 83 of file TrigEgammaFastElectronHypoTool.py.

83 def nocut(self):
84 self.tool().AcceptAll = True
85

◆ nominal()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.nominal ( self)

Definition at line 94 of file TrigEgammaFastElectronHypoTool.py.

94 def nominal(self):
95 if self.etthr() < 15:
96 self.tool().TrackPt = 1.0 * GeV
97 elif self.etthr() >= 15 and self.etthr() < 20:
98 self.tool().TrackPt = 2.0 * GeV
99 elif self.etthr() >= 20 and self.etthr() < 50:
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.
105
106

◆ pidname()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.pidname ( self)

Definition at line 67 of file TrigEgammaFastElectronHypoTool.py.

67 def pidname( self ):
68 return self.__sel
69

◆ ringer()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.ringer ( self)

Definition at line 89 of file TrigEgammaFastElectronHypoTool.py.

89 def ringer(self):
90 self.tool().DoRinger = True
91 self.tool().PidName = self.pidname()
92
93

◆ tool()

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.tool ( self)

Definition at line 79 of file TrigEgammaFastElectronHypoTool.py.

79 def tool(self):
80 return self.__tool
81
82

Member Data Documentation

◆ __idperfInfo

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__idperfInfo = cpart['idperfInfo']
private

Definition at line 41 of file TrigEgammaFastElectronHypoTool.py.

◆ __log

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__log = logging.getLogger('TrigEgammaFastElectronHypoTool')
private

Definition at line 37 of file TrigEgammaFastElectronHypoTool.py.

◆ __lrtInfo

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__lrtInfo = cpart['lrtInfo']
private

Definition at line 42 of file TrigEgammaFastElectronHypoTool.py.

◆ __monGroups

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__monGroups = monGroups
private

Definition at line 43 of file TrigEgammaFastElectronHypoTool.py.

◆ __name

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__name = name
private

Definition at line 38 of file TrigEgammaFastElectronHypoTool.py.

◆ __operation_points

list python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__operation_points
staticprivate
Initial value:
= [ 'tight' ,
'medium' ,
'loose' ,
'vloose' ,
'lhtight' ,
'lhmedium' ,
'lhloose' ,
'lhvloose' ,
'mergedtight',
'dnntight' ,
'dnnmedium',
'dnnloose' ,
'dnnvloose',
]

Definition at line 13 of file TrigEgammaFastElectronHypoTool.py.

◆ __sel

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__sel = cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
private

Definition at line 40 of file TrigEgammaFastElectronHypoTool.py.

◆ __threshold

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__threshold = float(cpart['threshold'])
private

Definition at line 39 of file TrigEgammaFastElectronHypoTool.py.

◆ __tool

python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__tool = tool
private

Definition at line 48 of file TrigEgammaFastElectronHypoTool.py.

◆ __trigElectronLrtd0Cut

dict python.TrigEgammaFastElectronHypoTool.TrigEgammaFastElectronHypoToolConfig.__trigElectronLrtd0Cut
staticprivate
Initial value:
= { 'lrtloose' :2.0,
'lrtmedium':3.0,
'lrttight' :5.0,
'lrtxtight':10.0,
'lrtvxtight':20.0
}

Definition at line 28 of file TrigEgammaFastElectronHypoTool.py.


The documentation for this class was generated from the following file: