ATLAS Offline Software
Loading...
Searching...
No Matches
python.TrigEgammaPrecisionCaloHypoTool Namespace Reference

Functions

 _IncTool (flags, name, monGroups, threshold, sel, tool=None)
 TrigEgammaPrecisionCaloHypoToolFromDict (flags, d, tool=None)

Function Documentation

◆ _IncTool()

python.TrigEgammaPrecisionCaloHypoTool._IncTool ( flags,
name,
monGroups,
threshold,
sel,
tool = None )
protected

Definition at line 6 of file TrigEgammaPrecisionCaloHypoTool.py.

6def _IncTool(flags, name, monGroups, threshold, sel, tool=None):
7
8
9 if not tool:
10 from AthenaConfiguration.ComponentFactory import CompFactory
11 tool = CompFactory.TrigEgammaPrecisionCaloHypoTool(name)
12
13 if hasattr(tool, "MonTool"):
14
15 doValidationMonitoring = flags.Trigger.doValidationMonitoring # True to monitor all chains for validation purposes
16
17 if (any('egammaMon:online' in group for group in monGroups) or doValidationMonitoring):
18 monTool = GenericMonitoringTool(flags, "MonTool_"+name,
19 HistPath = 'PrecisionCaloHypo/'+tool.getName())
20 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)
21 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)
22 monTool.defineHistogram('Eta', type='TH1F', path='EXPERT', title="PrecisionCalo Hypo entries per Eta;Eta", xbins=100, xmin=-2.5, xmax=2.5)
23 monTool.defineHistogram('Phi', type='TH1F', path='EXPERT', title="PrecisionCalo Hypo entries per Phi;Phi", xbins=128, xmin=-3.2, xmax=3.2)
24 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)
25
26 cuts=['Input','#Delta #eta L2-L1', '#Delta #phi L2-L1','eta','E_{T}^{EM}']
27
28 monTool.defineHistogram('CutCounter', type='TH1I', path='EXPERT', title="PrecisionCalo Hypo Passed Cuts;Cut", xbins=5, xmin=0, xmax=5, opt="kCumulative", xlabels=cuts)
29
30 tool.MonTool = monTool
31
32
33 tool.EtaBins = [0.0, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
34 def same( val ):
35 return [val]*( len( tool.EtaBins ) - 1 )
36
37 tool.ETthr = same( float(threshold)*GeV )
38 tool.dETACLUSTERthr = 0.1
39 tool.dPHICLUSTERthr = 0.1
40 tool.ET2thr = same( 90.0*GeV )
41
42 if sel == 'nocut':
43 tool.AcceptAll = True
44 tool.ETthr = same( float( threshold )*GeV )
45 tool.dETACLUSTERthr = 9999.
46 tool.dPHICLUSTERthr = 9999.
47
48 if sel == 'etcut' or sel == 'nopid' or sel == 'ion':
49 tool.ETthr = same( float( threshold )*GeV )
50 tool.dETACLUSTERthr = 9999.
51 tool.dPHICLUSTERthr = 9999.
52
53
54 return tool
55
56

◆ TrigEgammaPrecisionCaloHypoToolFromDict()

python.TrigEgammaPrecisionCaloHypoTool.TrigEgammaPrecisionCaloHypoToolFromDict ( flags,
d,
tool = None )
Use menu decoded chain dictionary to configure the tool 

Definition at line 57 of file TrigEgammaPrecisionCaloHypoTool.py.

57def TrigEgammaPrecisionCaloHypoToolFromDict( flags, d, tool=None ):
58 """ Use menu decoded chain dictionary to configure the tool """
59 cparts = [i for i in d['chainParts'] if ((i['signature']=='Electron') or (i['signature']=='Photon'))]
60
61 def __th(cpart):
62 return cpart['threshold']
63
64 def __sel(cpart):
65 return 'ion' if 'ion' in cpart['extra'] else (cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo'])
66
67 return _IncTool(flags, d['chainName'], d['monGroups'], __th( cparts[0]), __sel( cparts[0] ) , tool=tool)