Skip to content
Snippets Groups Projects
Commit 3e4a00f6 authored by Thomas Strebler's avatar Thomas Strebler Committed by Melissa Yexley
Browse files

Clean up legacy configs in JetMonitoring

parent f516dc0b
No related branches found
No related tags found
No related merge requests found
......@@ -24,5 +24,3 @@ atlas_add_component( JetMonitoring
# Install files from the package:
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from JetMonitoring.HIJetHistoTools import jhm, selectionAndHistos
from JetMonitoring.JetMonitoringConf import JetMonitoringTool, JetKinematicHistos, JetContainerHistoFiller
from AthenaCommon.AppMgr import ToolSvc
from JetSelectorTools.JetSelectorToolsConf import JetCleaningTool
from RecExConfig.ObjKeyStore import cfgKeyStore
#New AthenaMonitoring filter tool to be added to filter out events in non-filled BCIDs
from AthenaMonitoring.BadLBFilterTool import GetLArBadLBFilterTool
monbadlb = GetLArBadLBFilterTool()
monitorTracks = cfgKeyStore.isInTransient('xAOD::JetContainer','AntiKt3PV0TrackJets')
cleaningTool = JetCleaningTool( "LooseBadJets" , CutLevel = "LooseBad")
jhm.addTool( cleaningTool )
ToolSvc += cleaningTool
def commonMonitoringTool(container, refcontainer="", pathSuffix=''):
filler = JetContainerHistoFiller(container+pathSuffix+"HistoFiller",JetContainer = container, HistoDir=container+pathSuffix+'/')
# Give a list of predefined tools from jhm or a combination of such tools
filler.HistoTools = [
# build a special kinematics histo tool plotting 2D hists :
JetKinematicHistos("kinematics",PlotOccupancy=True, PlotAveragePt=True, PlotAverageE=True, PlotNJet=True) ,
# Draw a set of histo for a particular jet selection :
selectionAndHistos( "leadingjet" , [ "basickinematics", ] ),
selectionAndHistos( "subleadingjet" , [ "basickinematics"] ),
selectionAndHistos( "60000<pt<400000" , [ "allkinematics", "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", "AverageLArQF", "N90Constituents", "FracSamplingMax"], "highpt_60_400" ),
selectionAndHistos( "400000<pt<1000000" , [ "allkinematics", "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", "AverageLArQF", "N90Constituents", "FracSamplingMax"], "highpt_400_1000" ),
selectionAndHistos( "1000000<pt<2500000" , [ "allkinematics", "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", "AverageLArQF", "N90Constituents", "FracSamplingMax"], "highpt_1000_2500" ),
selectionAndHistos( "LooseBadJets" , [ "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", JetKinematicHistos("kinematics",PlotOccupancy=True, PlotAveragePt=True, PlotAverageE=True, PlotNJet=True)]),
selectionAndHistos( "1.0<eta<1.4" , [ "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", JetKinematicHistos("kinematicsTileGap",PlotOccupancy=True, PlotAveragePt=True, PlotAverageE=True, PlotNJet=True)], "eta_1_14" ),
jhm.Width,
# distances between 2 leading jets.
jhm.leadingjetrel,
]
if "HI" in container and "Track" not in container:
filler.HistoTools += [
# jet states
# jhm.basickinematics_emscale,
# jhm.basickinematics_constscale,
# calo variables
# jhm.NegativeE,
jhm.EMFrac,
jhm.HECFrac,
jhm.Timing,
jhm.LArQuality,
# calo quality variables
jhm.AverageLArQF,
jhm.HECQuality,
jhm.FracSamplingMax,
jhm.FracSamplingMaxIndex,
jhm.N90Constituents,
jhm.ptN,
# energy per sampling
jhm.PreSamplerB,
jhm.EMB1,
jhm.EMB2,
jhm.EMB3,
jhm.PreSamplerE,
jhm.EME1,
jhm.EME2,
jhm.EME3,
jhm.HEC0,
jhm.HEC1,
jhm.HEC2,
jhm.HEC3,
jhm.FCAL0,
jhm.FCAL1,
jhm.FCAL2,
jhm.TileBar0,
jhm.TileBar1,
jhm.TileBar2,
jhm.TileExt0,
jhm.TileExt1,
jhm.TileExt2,
jhm.TileGap1,
jhm.TileGap2,
jhm.TileGap3,
############HI moments
jhm.MaxOverMean,
jhm.MaxConstituentET,
jhm.JetUnsubtractedScaleMomentum_pt,
jhm.JetUnsubtractedScaleMomentum_eta,
jhm.JetUnsubtractedScaleMomentum_phi,
jhm.JetUnsubtractedScaleMomentum_m,
jhm.JetSubtractedScaleMomentum_pt,
jhm.JetSubtractedScaleMomentum_eta,
jhm.JetSubtractedScaleMomentum_phi,
jhm.JetSubtractedScaleMomentum_m,
]
# centrality
filler.HistoTools += [jhm.centrality,]
filler.HistoTools['centrality'].RefContainer = refcontainer
# if jetFlags.useTracks:
# filler.HistoTools += [
# # track variables
# jhm.tool("JVF[0]"),
# jhm.SumPtTrkPt1000,
# jhm.GhostTrackCount,
# jhm.CHF,
# ]
if refcontainer:
# efficiency
filler.HistoTools += [jhm.effresponse,]
filler.HistoTools['effresponse'].RefContainer = refcontainer
#filler.OutputLevel =2
return filler
athenaMonTool = JetMonitoringTool(HistoTools = [ commonMonitoringTool( "AntiKt4HIJets" ), # if truth is present, we could add : , "AntiKt4TruthJets" ,
],
IntervalType = 6,) # 6 is 'Interval_t::run' interval
if monitorTracks :
athenaMonTool.HistoTools += [ commonMonitoringTool( "AntiKt4HITrackJets" ) ]
#cbg
athenaMonTool.FilterTools += [ monbadlb ]
#ToolSvc += athenaMonTool
athenaMonTool_LB = JetMonitoringTool("JetMonitoring_LB", HistoTools = [ "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", JetKinematicHistos("kinematics",PlotOccupancy=True, PlotAveragePt=True, PlotAverageE=True, PlotNJet=True) ] ,IntervalType = 2)
#cbg
athenaMonTool_LB.FilterTools += [ monbadlb ]
#ToolSvc += athenaMonTool_LB
from AthenaMonitoring.DQMonFlags import DQMonFlags
if DQMonFlags.useTrigger() :
athenaMonTool_trig = JetMonitoringTool("JetMonitoring_trig",HistoTools =
[
commonMonitoringTool( "AntiKt4HIJets", pathSuffix='_trig' ),
] , IntervalType = 6 )
#cbg
athenaMonTool_trig.FilterTools += [ monbadlb ]
#ToolSvc += athenaMonTool_trig
athenaMonTool_trig.TrigDecisionTool = getattr(ToolSvc, DQMonFlags.nameTrigDecTool())
athenaMonTool_trig.TriggerChain = "CATEGORY_monitoring_jet"
#athenaMonTool_trig.TriggerChain = "HLT_j25,HLT_j60,HLT_j200_jes_PS"
# athenaMonTool_trig.TriggerChain = "j20 ion"
#athenaMonTool_trig.OutputLevel = 2
def athenaMonitoringTools():
if DQMonFlags.useTrigger():
return [ athenaMonTool, athenaMonTool_trig ]
else:
return [ athenaMonTool ]
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
from JetMonitoring.JetHistoTools import jhm, selectionAndHistos
from JetMonitoring.JetMonitoringConf import JetMonitoringTool, JetKinematicHistos, JetContainerHistoFiller
from AthenaCommon.AppMgr import ToolSvc
from JetRec.JetRecFlags import jetFlags
from JetSelectorTools.JetSelectorToolsConf import JetCleaningTool
from RecExConfig.ObjKeyStore import cfgKeyStore
#New AthenaMonitoring filter tool to be added to filter out events in non-filled BCIDs
from AthenaMonitoring.BadLBFilterTool import GetLArBadLBFilterTool
monitorTracks = cfgKeyStore.isInTransient('xAOD::JetContainer','AntiKt3PV0TrackJets')
cleaningTool = JetCleaningTool( "LooseBadJets" , CutLevel = "LooseBad")
jhm.addTool( cleaningTool )
ToolSvc += cleaningTool
def commonMonitoringTool(container, refcontainer="", pathSuffix=''):
filler = JetContainerHistoFiller(container+pathSuffix+"HistoFiller",JetContainer = container, HistoDir=container+pathSuffix+'/')
# Give a list of predefined tools from jhm or a combination of such tools
filler.HistoTools = [
# build a special kinematics histo tool plotting 2D hists :
JetKinematicHistos("kinematics",PlotOccupancy=True, PlotAveragePt=True, PlotAverageE=True, PlotNJet=True) ,
# Draw a set of histo for a particular jet selection :
selectionAndHistos( "leadingjet" , [ "basickinematics", ] ),
selectionAndHistos( "subleadingjet" , [ "basickinematics"] ),
jhm.Width,
# distances between 2 leading jets.
jhm.leadingjetrel,
]
if "Topo" in container:
filler.HistoTools += [
# jet states
jhm.basickinematics_emscale,
jhm.basickinematics_constscale,
# calo variables
jhm.NegativeE,
jhm.EMFrac,
jhm.HECFrac,
jhm.Timing,
jhm.LArQuality,
# calo quality variables
jhm.AverageLArQF,
jhm.HECQuality,
jhm.FracSamplingMax,
jhm.FracSamplingMaxIndex,
jhm.N90Constituents,
jhm.CentroidR,
jhm.OotFracClusters5,
jhm.OotFracClusters10,
jhm.ptN,
jhm.LeadingClusterCenterLambda,
jhm.LeadingClusterSecondLambda,
jhm.LeadingClusterSecondR,
# energy per sampling
jhm.PreSamplerB,
jhm.EMB1,
jhm.EMB2,
jhm.EMB3,
jhm.PreSamplerE,
jhm.EME1,
jhm.EME2,
jhm.EME3,
jhm.HEC0,
jhm.HEC1,
jhm.HEC2,
jhm.HEC3,
jhm.FCAL0,
jhm.FCAL1,
jhm.FCAL2,
jhm.TileBar0,
jhm.TileBar1,
jhm.TileBar2,
jhm.TileExt0,
jhm.TileExt1,
jhm.TileExt2,
jhm.TileGap1,
jhm.TileGap2,
jhm.TileGap3,
selectionAndHistos( "20000<pt<500000" , [ "allkinematics", "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", "AverageLArQF", "N90Constituents", "SumPtTrkPt500[0]", "FracSamplingMax"], "highpt_20_500" ),
selectionAndHistos( "500000<pt<1000000" , [ "allkinematics", "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", "AverageLArQF", "N90Constituents", "SumPtTrkPt500[0]", "FracSamplingMax"], "highpt_500_1000" ),
selectionAndHistos( "1000000<pt<2000000" , [ "allkinematics", "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", "AverageLArQF", "N90Constituents", "SumPtTrkPt500[0]", "FracSamplingMax"], "highpt_1000_2000" ),
selectionAndHistos( "2000000<pt<8000000" , [ "allkinematics", "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", "AverageLArQF", "N90Constituents", "SumPtTrkPt500[0]", "FracSamplingMax"], "highpt_2000_8000" ),
selectionAndHistos( "1.0<eta<1.4" , [ "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", JetKinematicHistos("kinematicsTileGap",PlotOccupancy=True, PlotAveragePt=True, PlotAverageE=True, PlotNJet=True)], "eta_1_14" ),
]
if "Topo" in container and container != "AntiKt10LCTopoJets":
filler.HistoTools += [
selectionAndHistos( "LooseBadJets" , [ "ptN", "Timing", "EMFrac", "HECFrac", "LArQuality", JetKinematicHistos("kinematics",PlotOccupancy=True, PlotAveragePt=True, PlotAverageE=True, PlotNJet=True)])]
if jetFlags.useTracks:
filler.HistoTools += [
# track variables
jhm.tool("JVF[0]"),
jhm.SumPtTrkPt500,
jhm.tool("SumPtTrkPt500[0]"),
jhm.tool("NumTrkPt500[0]"),
jhm.tool("NumTrkPt1000[0]"),
jhm.tool("TrackWidthPt1000[0]"),
jhm.GhostTrackCount,
]
if refcontainer:
# efficiency
filler.HistoTools += [jhm.effresponse,]
filler.HistoTools['effresponse'].RefContainer = refcontainer
elif "PFlow" in container:
pass
#filler.OutputLevel =2
return filler
def commonMonitoringTool_LB(container, refcontainer="", pathSuffix=''):
filler = JetContainerHistoFiller(container+pathSuffix+"HistoFiller_LB",JetContainer = container, HistoDir=container+pathSuffix+'_LB/')
# Give a list of predefined tools from jhm or a combination of such tools
filler.HistoTools = [
JetKinematicHistos("kinematics",PlotOccupancy=True, PlotAveragePt=True, PlotAverageE=True, PlotNJet=True) ,
jhm.ptN,
jhm.Timing,
jhm.EMFrac,
jhm.HECFrac,
jhm.LArQuality,
]
return filler
athenaMonTool = JetMonitoringTool(HistoTools = [ commonMonitoringTool( "AntiKt4LCTopoJets" ), # if truth is present, we could add : , "AntiKt4TruthJets" ,
commonMonitoringTool( "AntiKt4EMTopoJets" ),
commonMonitoringTool( "AntiKt10LCTopoJets" ),
commonMonitoringTool( "AntiKt4EMPFlowJets" ),
],
IntervalType = 6,) # 6 is 'Interval_t::run' interval
if monitorTracks :
athenaMonTool.HistoTools += [ commonMonitoringTool( "AntiKt3PV0TrackJets" ) ]
#if jetFlags.useTracks:
# athenaMonTool.HistoTools += [ commonMonitoringTool( "AntiKt3PV0TrackJets" ) ]
#cbg
athenaMonTool.FilterTools += [ GetLArBadLBFilterTool() ]
#ToolSvc += athenaMonTool
athenaMonTool_LB = JetMonitoringTool("JetMonitoring_LB", HistoTools = [commonMonitoringTool_LB("AntiKt4EMTopoJets") ], IntervalType = 2)
#cbg
athenaMonTool_LB.FilterTools += [ GetLArBadLBFilterTool() ]
#ToolSvc += athenaMonTool_LB
from AthenaMonitoring.DQMonFlags import DQMonFlags
if DQMonFlags.useTrigger() :
athenaMonTool_trig = JetMonitoringTool("JetMonitoring_trig",HistoTools =
[
commonMonitoringTool( "AntiKt4LCTopoJets", pathSuffix='_trig' ),
commonMonitoringTool( "AntiKt4EMTopoJets", pathSuffix='_trig' ),
commonMonitoringTool( "AntiKt10LCTopoJets", pathSuffix='_trig' )
] , IntervalType = 6 )
#cbg
athenaMonTool_trig.FilterTools += [ GetLArBadLBFilterTool() ]
#ToolSvc += athenaMonTool_trig
athenaMonTool_trig.TrigDecisionTool = getattr(ToolSvc, DQMonFlags.nameTrigDecTool())
athenaMonTool_trig.TriggerChain = "CATEGORY_monitoring_jet"
#athenaMonTool_trig.TriggerChain = "HLT_j25,HLT_j60,HLT_j200_jes_PS"
#athenaMonTool_trig.OutputLevel = 2
def athenaMonitoringTools():
if DQMonFlags.useTrigger():
return [ athenaMonTool, athenaMonTool_LB, athenaMonTool_trig ]
else:
return [ athenaMonTool, athenaMonTool_LB ]
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
def JetMonGetAxisRange():
import math
from AthenaCommon.BeamFlags import jobproperties
axisranges = {}
# mlog.info ("Beam type and energy: %s , %s" %(jobproperties.Beam.beamType,jobproperties.Beam.energy))
axisranges["radBins"] = [ 0.0, 1.0, 0.025 ] # radial bins
axisranges["etaBins"] = [ -5.0, 5.0, 0.2 ] # eta bins
axisranges["phiBins"] = [ -math.pi, math.pi, 0.2 ] # phi bins
axisranges["massBins"] = [ 0.0*GeV, 30.0*GeV, 0.2* GeV ] # mass bins
axisranges["radBinsHD"] = [ 0.0, 1.0, 0.1 ]
axisranges["etaBinsHD"] = [ -5.0, 5.0, 0.1 ]
axisranges["phiBinsHD"] = [ -math.pi, math.pi, 0.1 ]
axisranges["massBinsHD"] = [ 0.0*GeV, 30.0*GeV, 0.2*GeV ]
axisranges["njBins"] = [ 0., 50.0, 1. ]
if jobproperties.Beam.beamType == 'cosmics' :
# -- 1-dim binning
axisranges["eBins"] = [ 0.0*GeV, 1500.0*GeV, 10.0*GeV ] # energy bins
axisranges["etBins"] = [ 0.0*GeV, 1500.0*GeV, 10.0*GeV ] # energy bins
axisranges["econBins"] = [ -2.0*GeV, 80.0*GeV, 0.5*GeV ] # energy bin
# -- 2-dim binning
axisranges["eBinsHD"] = [ 0.0*GeV, 1500.0*GeV, 20.0*GeV ]
axisranges["etBinsHD"] = [ 0.0*GeV, 1500.0*GeV, 20.0*GeV ]
elif jobproperties.Beam.beamType == 'collisions' :
if jobproperties.Beam.energy == 450.*GeV:
# -- 1-dim binning
axisranges["eBins"] = [ 0.0*GeV, 500.0*GeV, 5.0*GeV ] # energy bin
axisranges["etBins"] = [ 0.0*GeV, 200.0*GeV, 2.0*GeV ] # energy bin
axisranges["econBins"] = [ -2.0*GeV, 80.0*GeV, 0.4*GeV ] # energy bin
# -- 2-dim binning
axisranges["eBinsHD"] = [ 0.0*GeV, 500.0*GeV, 5.0*GeV ]
axisranges["etBinsHD"] = [ 0.0*GeV, 200.0*GeV, 2.0*GeV ]
elif jobproperties.Beam.energy == 3.5*TeV:
# -- 1-dim binning
axisranges["eBins"] = [ 0.0*GeV, 3500.0*GeV, 5.0*GeV ] # energy bin
axisranges["etBins"] = [ 0.0*GeV, 1000.0*GeV, 2.0*GeV ] # energy bin
axisranges["econBins"] = [ -2.0*GeV, 200.0*GeV, 0.6*GeV ] # energy bin
# -- 2-dim binning
axisranges["eBinsHD"] = [ 0.0*GeV, 1000.0*GeV, 5.0*GeV ]
axisranges["etBinsHD"] = [ 0.0*GeV, 500.0*GeV, 2.0*GeV ] # energy bin
else:
# -- 1-dim binning
axisranges["eBins"] = [ 0.0*GeV, 2000.0*GeV, 5.0*GeV ] # energy bin ! tuned for the p+Pb run (it was 5000.0*GeV)
axisranges["etBins"] = [ 0.0*GeV, 500.0*GeV, 2.0*GeV ] # energy bin ! tuned for the p+Pb run (it was 1000.0*GeV)
axisranges["econBins"] = [ -2.0*GeV, 120.0*GeV, 0.6*GeV ] # energy bin
# -- 2-dim binning
axisranges["eBinsHD"] = [ 0.0*GeV, 1000.0*GeV, 5.0*GeV ]
axisranges["etBinsHD"] = [ 0.0*GeV, 500.0*GeV, 2.0*GeV ] # energy bin
else:
# -- 1-dim binning
axisranges["eBins"] = [ 0.0*GeV, 1000.0*GeV, 5.0*GeV ] # energy bins
axisranges["etBins"] = [ 0.0*GeV, 200.0*GeV, 2.0*GeV ] # energy bins
axisranges["econBins"] = [ -2.0*GeV, 200.0*GeV, 0.5*GeV ] # energy bin
# -- 2-dim binning
axisranges["eBinsHD"] = [ 0.0*GeV, 1000.0*GeV, 5.0*GeV ]
axisranges["etBinsHD"] = [ 0.0*GeV, 200.0*GeV, 2.0*GeV ]
from AthenaMonitoring.DQMonFlags import DQMonFlags
if DQMonFlags.monManDataType == 'heavyioncollisions':
axisranges["njBins"] = [ 0., 100.0, 1. ]
# -- 1-dim binning
axisranges["eBins"] = [ 0.0*GeV, 5000.0*GeV, 5.0*GeV ] # energy bin
axisranges["etBins"] = [ 0.0*GeV, 1000.0*GeV, 2.0*GeV ] # energy bin
axisranges["econBins"] = [ -2.0*GeV, 120.0*GeV, 0.6*GeV ] # energy bin
# -- 2-dim binning
axisranges["eBinsHD"] = [ 0.0*GeV, 1000.0*GeV, 5.0*GeV ]
axisranges["etBinsHD"] = [ 0.0*GeV, 500.0*GeV, 2.0*GeV ] # energy bin
return axisranges
# Inspired by PhysVal_jobOptions.py
jetMonMan = AthenaMonManager( "JetMonManager",
FileKey = DQMonFlags.monManFileKey(),
Environment = DQMonFlags.monManEnvironment(),
ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup(),
DataType = DQMonFlags.monManDataType() )
topSequence += jetMonMan
if rec.doHeavyIon or rec.doHIP:
from JetMonitoring.HIJetMonitoringHistos import athenaMonitoringTools
else:
from JetMonitoring.JetMonitoringHistos import athenaMonitoringTools
jetMonMan.AthenaMonTools += athenaMonitoringTools()
# Inspired by PhysVal_jobOptions.py
# Set up the reading of the input xAOD:
FNAME = "AOD.pool.root"
#include( "AthenaPython/iread_file.py" )
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
athenaCommonFlags.FilesInput=[FNAME]
import AthenaPoolCnvSvc.ReadAthenaPool
ServiceMgr.EventSelector.InputCollections = [ FNAME ]
# Access the algorithm sequence:
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
monMan = AthenaMonManager( "PhysValMonManager" )
monMan.ManualDataTypeSetup = True
monMan.DataType = "monteCarlo"
monMan.Environment = "altprod"
monMan.ManualRunLBSetup = True
monMan.Run = 1
monMan.LumiBlock = 1
monMan.FileKey = "PhysVal"
topSequence += monMan
from JetMonitoring.JetHistoTools import jhm, selectionAndHistos
from JetMonitoring.JetMonitoringConf import JetAttributeHisto, HistoDefinitionTool, JetMonitoringTool, JetKinematicHistos, JetContainerHistoFiller
# -------------------------------------
# Configuration example.
# Build histograms in the context of a Physics Validation job.
# Start with a high-level histo filler for a JetContainer
akt4Filler = JetContainerHistoFiller("AntiKt4LCTopoJetsMon",JetContainer = "AntiKt4LCTopoJets")
akt4Filler.HistoTools += [
# Give the tool the list of histo building tools
# **********************
# Low-level configuration examples (not expected to be used in practice, just to
# show the exact low level config).
# build a specialized kinematic histos tool (this is probably redundant w.r.t attribute tools)
JetKinematicHistos("alljetkine",PlotOccupancy=True, PlotAveragePt=True, PlotNJet=True) ,
# Or a JetAttributeHisto :
JetAttributeHisto( HistoDef = HistoDefinitionTool("BchCorrCellDef", title="Jet Bad channel correction;BchCorrCell", nbinsx=60,xlow=0,xup=1.0),
AttributeTypes=["float"] , AttributeNames=["BchCorrCell"]),
# **********************
# **********************
# In practice, we can use predefined tools and high-level configuration helpers to combine them.
# Predefined tools are centralized in the JetHistoManager object : jhm
jhm.Width, # -> Width attribute
jhm.leadingjetrel, # -> relation (distances, ration) between leading jets.
# or, equivalently ask with the tool() method (needed when the tool name contains special characters)
jhm.tool("JVF[0]"), # JVF attribute. Plot only first value of the JVF vector.
# can combine 2 known 1D attribute histos into a 2D histo
jhm.tool("EMFrac:NegativeE"),
# To draw a set of histos for a particular jet selection,
# combine a selection tool with a list of low-level histogram tools
# - selection is either a name of a predefined tool or a HistosForJetSelection instance
# - similarly, list contains names or tool instances
selectionAndHistos( "leadingjet" , [ "basickinematics", "NegativeE", "JVF[0]:Width", jhm.Width] ),
selectionAndHistos( "subleadingjet" , [ "basickinematics", ] ),
selectionAndHistos( jhm.alljets , [ jhm.Timing ] ),
# Other types of selection with simple expression.
# Only jets satisfying the expression will fill the histos
# expresion must be in the form : '1.23<var<3.45'
# 'var' must be a jet attribute (float, int or vector<float>)
selectionAndHistos( "-1<eta<1" , [ "basickinematics", ] ),
selectionAndHistos( "eta<1" , [ "basickinematics", ] ),
selectionAndHistos( "JVF[0]<0.8" , [ "basickinematics", "JVF[0]"] ),
]
jetMonTool = JetMonitoringTool(HistoTools = [akt4Filler])
#ToolSvc += jetMonTool
monMan.AthenaMonTools += [ jetMonTool ]
from AthenaCommon.AppMgr import ServiceMgr
from GaudiSvc.GaudiSvcConf import THistSvc
ServiceMgr += THistSvc()
svcMgr.THistSvc.Output += ["PhysVal DATAFILE='PhysVal.root' OPT='RECREATE'"]
from AthenaCommon.AppMgr import theApp
ServiceMgr.MessageSvc.OutputLevel = INFO
ServiceMgr.MessageSvc.defaultLimit = 1000000
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment