5 '''@file JetMonitoringExample.py
8 @brief Example python configuration for the Run III Jet Monitoring
13 '''Function to configures some algorithms in the monitoring system.'''
19 from AthenaMonitoring
import AthMonitorCfgHelper
20 helper = AthMonitorCfgHelper(inputFlags,
'ExampleAthMonitorCfg')
24 from JetMonitoring.JetMonitoringConfig
import JetMonAlgSpec, HistoSpec, SelectSpec, ToolSpec
28 ak4conf = JetMonAlgSpec(
30 JetContainerName =
"AntiKt4LCTopoJets",
55 HistoSpec(
'HECFrac', (50,-0.1,1.4), title=
"HEC E fraction;HEC frac;" ),
63 HistoSpec(
'lowpt', (100,0,150) , title=
'p_{T};p_{T} [GeV];', xvar=
'pt:GeV'),
84 SelectSpec(
'central',
98 SelectSpec(
'subleading',
101 path=
'standardHistos',
108 SelectSpec(
'highJVF',
114 SelectSpec(
'LooseBadJets',
127 ak4conf.toAlg(helper)
136 def defineHistoForJetTrigg(conf, parentAlg, monhelper , path):
138 group = monhelper.addGroup(parentAlg, conf.Group,
'Jets/'+parentAlg.JetContainerName)
140 group.defineHistogram(
'trigPassed,jetVar',title=
'titletrig', type=
"TEfficiency", path=
'jetTrigg', xbins=100 , xmin=0, xmax=500000. ,)
143 from JetMonitoring.JetMonitoringConfig
import retrieveVarToolConf
144 trigConf = JetMonAlgSpec(
146 JetContainerName =
"AntiKt4LCTopoJets",
147 TriggerChain =
"HLT_j260",
149 trigConf.appendHistos(
151 ToolSpec(
'JetHistoTriggEfficiency',
'jetTrigg',
153 Group=
'jetTrigGroup',
156 ProbeTrigChain=
"HLT_j260",defineHistoFunc=defineHistoForJetTrigg),
159 trigConf.toAlg(helper)
161 return helper.result()
163 if __name__==
'__main__':
165 from AthenaCommon.Logging
import log
170 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
172 fileName =
'/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/data16_13TeV.00311321.physics_Main.recon.AOD.r9264/AOD.11038520._000001.pool.root.1'
174 flags.Input.Files = [fileName]
175 flags.Input.isMC =
False
176 flags.Output.HISTFileName =
'JetExampleMonitorOutput.root'
180 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
181 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
187 cfg.merge(exampleMonitorAcc)