ATLAS Offline Software
Loading...
Searching...
No Matches
TrigEgammaForwardPrecisionCaloHypoTool Namespace Reference

Functions

 _IncTool (flags, name, threshold, sel)
 TrigEgammaForwardPrecisionCaloHypoToolFromDict (flags, d)

Function Documentation

◆ _IncTool()

TrigEgammaForwardPrecisionCaloHypoTool._IncTool ( flags,
name,
threshold,
sel )
protected

Definition at line 6 of file TrigEgammaForwardPrecisionCaloHypoTool.py.

6def _IncTool(flags, name, threshold, sel):
7
8 from AthenaConfiguration.ComponentFactory import CompFactory
9 tool = CompFactory.TrigEgammaForwardPrecisionCaloHypoTool(name)
10
11 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
12 monTool = GenericMonitoringTool(flags, "MonTool_"+name)
13 monTool.defineHistogram('dEta', type='TH1F', path='EXPERT', title="PrecisionCalo Hypo #Delta#eta_{L2 L1}; #Delta#eta_{L2 L1}", xbins=80, xmin=-0.01, xmax=0.01)
14 monTool.defineHistogram('dPhi', type='TH1F', path='EXPERT', title="PrecisionCalo Hypo #Delta#phi_{L2 L1}; #Delta#phi_{L2 L1}", xbins=80, xmin=-0.01, xmax=0.01)
15 monTool.defineHistogram('Et_em', type='TH1F', path='EXPERT', title="PrecisionCalo Hypo cluster E_{T}^{EM};E_{T}^{EM} [MeV]", xbins=50, xmin=-2000, xmax=100000)
16 monTool.defineHistogram('Eta', type='TH1F', path='EXPERT', title="PrecisionCalo Hypo entries per Eta;Eta", xbins=100, xmin=-2.5, xmax=2.5)
17 monTool.defineHistogram('Phi', type='TH1F', path='EXPERT', title="PrecisionCalo Hypo entries per Phi;Phi", xbins=128, xmin=-3.2, xmax=3.2)
18 monTool.defineHistogram('EtaBin', type='TH1I', path='EXPERT', title="PrecisionCalo Hypo entries per Eta bin;Eta bin no.", xbins=11, xmin=-0.5, xmax=10.5)
19
20 cuts=['Input','#Delta #eta L2-L1', '#Delta #phi L2-L1','eta','E_{T}^{EM}']
21
22 monTool.defineHistogram('CutCounter', type='TH1I', path='EXPERT', title="PrecisionCalo Hypo Passed Cuts;Cut",
23 xbins=13, xmin=-1.5, xmax=12.5, opt="kCumulative", xlabels=cuts)
24
25 monTool.HistPath = 'PrecisionCaloHypo_FWD/'+tool.getName()
26 tool.MonTool = monTool
27
28
29 tool.EtaBins = [0.0, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
30 def same( val ):
31 return [val]*( len( tool.EtaBins ) - 1 )
32
33 tool.ETthr = same( float(threshold)*GeV )
34 tool.dETACLUSTERthr = 0.1
35 tool.dPHICLUSTERthr = 0.1
36 tool.ET2thr = same( 90.0*GeV )
37
38 if sel == 'nocut':
39 tool.AcceptAll = True
40 tool.ETthr = same( float( threshold )*GeV )
41 tool.dETACLUSTERthr = 9999.
42 tool.dPHICLUSTERthr = 9999.
43
44 elif sel == "etcut":
45 tool.ETthr = same( ( float( threshold ) - 3 )*GeV )
46 # No other cuts applied
47 tool.dETACLUSTERthr = 9999.
48 tool.dPHICLUSTERthr = 9999.
49
50 return tool
51
52

◆ TrigEgammaForwardPrecisionCaloHypoToolFromDict()

TrigEgammaForwardPrecisionCaloHypoTool.TrigEgammaForwardPrecisionCaloHypoToolFromDict ( flags,
d )
Use menu decoded chain dictionary to configure the tool 

Definition at line 53 of file TrigEgammaForwardPrecisionCaloHypoTool.py.

53def TrigEgammaForwardPrecisionCaloHypoToolFromDict( flags, d ):
54 """ Use menu decoded chain dictionary to configure the tool """
55 cparts = [i for i in d['chainParts'] if ((i['signature']=='Electron') or (i['signature']=='Photon'))]
56
57 def __th(cpart):
58 return cpart['threshold']
59
60 def __sel(cpart):
61 return cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
62
63 name = d['chainName']
64
65 return _IncTool( flags, name, __th( cparts[0]), __sel( cparts[0] ) )