ATLAS Offline Software
Loading...
Searching...
No Matches
TrigVrtSecInclusiveHypoConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentFactory import CompFactory
4from AthenaConfiguration.AthConfigFlags import AthConfigFlags
5
6from AthenaCommon.Logging import logging
7log = logging.getLogger('TrigVrtSecIclusiveHypoTool')
8
9from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
10
11def createTrigVSIHypoAlgCfg(flags: AthConfigFlags, name: str, **kwargs) ->CompFactory:
12
13 # Setup the hypothesis algorithm
14 theHypoAlg = CompFactory.TrigVSIHypoAlg(name, **kwargs)
15
16 # monitoring
17 monTool = GenericMonitoringTool(flags, "IM_MonTool"+name)
18 #
19 monTool.defineHistogram("nVtx", type='TH1F', path='EXPERT', title="Nr of TrigVSI vertices;N TrigVSI vertices size;Nevents", xbins=50, xmin=0, xmax=500)
20 monTool.defineHistogram("preselNVtx", type='TH1F', path='EXPERT', title="Nr of vertices passed preselection on hypo;N vertices;Nevents", xbins=50, xmin=0, xmax=500)
21 monTool.defineHistogram("maxVtxNTrk", type='TH1F', path='EXPERT', title="Max Ntracks of a vertex in each event;Max Ntracks;Nevents", xbins=15, xmin=0, xmax=15)
22 monTool.defineHistogram("maxVtxMass", type='TH1F', path='EXPERT', title="Max vertex mass in each event;Max mass;Nevents", xbins=50, xmin=0, xmax=100000.)
23 #
24 monTool.HistPath = 'TrigVSIHypoAlg'
25 theHypoAlg.MonTool = monTool
26
27 return theHypoAlg
28
29
30def TrigVSIHypoToolFromDict( chainDict ):
31 """ Use menu decoded chain dictionary to configure the tool """
32
33 name = chainDict['chainName']
34 from AthenaConfiguration.ComponentFactory import CompFactory
35 tool = CompFactory.TrigVSIHypoTool(name)
36
37 return tool
CompFactory createTrigVSIHypoAlgCfg(AthConfigFlags flags, str name, **kwargs)