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
16
17 if (any('egammaMon:online' in group for group in monGroups) or doValidationMonitoring):
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