Beispiel #1
0
myname = "JetRec_jobOptions:"

# Import the jet reconstruction control flags.
from JetRec.JetRecFlags import jetFlags
from RecExConfig.ObjKeyStore import cfgKeyStore
from AthenaCommon import Logging
jetlog = Logging.logging.getLogger('JetRec_jobOptions')

# Skip truth if rec says it is absent.
if not rec.doTruth():
  jetFlags.useTruth = False 
jetlog.info( " Truth enabled ? jetFlags.useTruth == %s", jetFlags.useTruth() )

#skip track if not built or not present in the job
if not rec.doInDet()  \
   and ( not cfgKeyStore.isInTransient("xAOD::VertexContainer_v1","PrimaryVertices") \
         or not cfgKeyStore.isInTransient('xAOD::TrackParticleContainer_v1','InDetTrackParticles') ):
    jetFlags.useTracks = False
jetlog.info( " Tracks enabled ? jetFlags.useTracks == %s", jetFlags.useTracks() )

#skip muon segment if not built
if not rec.doMuon() or not rec.doMuonCombined() :
    jetFlags.useMuonSegments = False
    print rec.doMuon() , rec.doMuonCombined()
jetlog.info( " MuonSegments enabled ? jetFlags.useMuonSegments == %s", jetFlags.useMuonSegments() )

#skip cluster  if not built
if not rec.doCalo():
    jetFlags.useTopo = False
jetlog.info( " TopCluster enabled ? jetFlags.useTopo == %s", jetFlags.useTopo() )
    
Beispiel #2
0
print myname + "Initial useTruth: " + sflagstat(jetFlags.useTruth)
print myname + "     rec.doTruth: " + str(rec.doTruth())
if not jetFlags.useTruth.statusOn:
  jetFlags.useTruth = rec.doTruth()
print myname + "  Final useTruth: " + sflagstat(jetFlags.useTruth)

# Skip use of topoclusters if not built
# No action if someone has already set the flag.
print myname + "Initial use topoclusters: " + str(jetFlags.useTopo())
if not jetFlags.useTopo.statusOn:
  jetFlags.useTopo = rec.doCalo()
print myname + "  Final use topoclusters: " + str(jetFlags.useTopo())

# Skip tracks if tracks or vertices are not present in the job.
# No action if someone has already set the flag.
haveTracks = cfgKeyStore.isInTransient('xAOD::TrackParticleContainer','InDetTrackParticles')
haveVertices = cfgKeyStore.isInTransient("xAOD::VertexContainer","PrimaryVertices")
recTracks = rec.doInDet()
recVertices = bool(InDetFlags.doVertexFinding) and (recTracks or haveTracks)
print myname + "Initial useTracks: " + sflagstat(jetFlags.useTracks)
print myname + "      rec doInDet: " + str(recTracks)
print myname + "  doVertexFinding: " + str(recVertices)
print myname + "      have tracks: " + str(haveTracks)
print myname + "    have vertices: " + str(haveVertices)
if not jetFlags.useTracks.statusOn:
  jetFlags.useTracks = (recTracks or haveTracks) and (recVertices or haveVertices)
print myname + "  Final useTracks: " + sflagstat(jetFlags.useTracks)

if not jetFlags.useVertices.statusOn:
  jetFlags.useVertices = (recVertices or haveVertices)
print myname + "   useVertices: " + sflagstat(jetFlags.useVertices)
Beispiel #3
0
print myname + "Initial useTruth: " + sflagstat(jetFlags.useTruth)
print myname + "     rec.doTruth: " + str(rec.doTruth())
if not jetFlags.useTruth.statusOn:
    jetFlags.useTruth = rec.doTruth()
print myname + "  Final useTruth: " + sflagstat(jetFlags.useTruth)

# Skip use of topoclusters if not built
# No action if someone has already set the flag.
print myname + "Initial use topoclusters: " + str(jetFlags.useTopo())
if not jetFlags.useTopo.statusOn:
    jetFlags.useTopo = rec.doCalo()
print myname + "  Final use topoclusters: " + str(jetFlags.useTopo())

# Skip tracks if tracks or vertices are not present in the job.
# No action if someone has already set the flag.
haveTracks = cfgKeyStore.isInTransient('xAOD::TrackParticleContainer',
                                       'InDetTrackParticles')
haveVertices = cfgKeyStore.isInTransient("xAOD::VertexContainer",
                                         "PrimaryVertices")
recTracks = rec.doInDet()
recVertices = bool(InDetFlags.doVertexFinding) and (recTracks or haveTracks)
print myname + "Initial useTracks: " + sflagstat(jetFlags.useTracks)
print myname + "      rec doInDet: " + str(recTracks)
print myname + "  doVertexFinding: " + str(recVertices)
print myname + "      have tracks: " + str(haveTracks)
print myname + "    have vertices: " + str(haveVertices)
if not jetFlags.useTracks.statusOn:
    jetFlags.useTracks = (recTracks or haveTracks) and (recVertices
                                                        or haveVertices)
print myname + "  Final useTracks: " + sflagstat(jetFlags.useTracks)

if not jetFlags.useVertices.statusOn:
Beispiel #4
0
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration

from JetMonitoring.JetHistoTools import jhm, selectionAndHistos
from JetMonitoring.JetMonitoringConf import JetAttributeHisto, HistoDefinitionTool, 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
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,