Skip to content
Snippets Groups Projects
Commit 9dbb8204 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'flake8_d3pdjet' into 'master'

Jet[Tag]D3PDMaker: enable flake8

See merge request atlas/athena!39247
parents 07554f78 3fc792f5
No related branches found
No related tags found
No related merge requests found
Showing
with 69 additions and 706 deletions
...@@ -14,6 +14,6 @@ atlas_add_component( JetD3PDMaker ...@@ -14,6 +14,6 @@ atlas_add_component( JetD3PDMaker
LINK_LIBRARIES ${Boost_LIBRARIES} TrigCaloEvent CaloEvent CaloGeoHelpers CaloIdentifier AthenaBaseComps AthenaKernel Navigation StoreGateLib Identifier EventKernel FourMomUtils GaudiKernel AnalysisTriggerEvent D3PDMakerInterfaces D3PDMakerUtils TriggerD3PDMakerLib JetTagEvent JetTagInfo JetEvent Particle TileConditionsLib TileEvent TileIdentifier VxVertex ) LINK_LIBRARIES ${Boost_LIBRARIES} TrigCaloEvent CaloEvent CaloGeoHelpers CaloIdentifier AthenaBaseComps AthenaKernel Navigation StoreGateLib Identifier EventKernel FourMomUtils GaudiKernel AnalysisTriggerEvent D3PDMakerInterfaces D3PDMakerUtils TriggerD3PDMakerLib JetTagEvent JetTagInfo JetEvent Particle TileConditionsLib TileEvent TileIdentifier VxVertex )
# Install files from the package: # Install files from the package:
atlas_install_python_modules( python/*.py ) atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py ) atlas_install_joboptions( share/*.py )
...@@ -12,12 +12,8 @@ from JetD3PDMaker.jetMETD3PDTrigger import jetMETTriggerBitsD3PDObject ...@@ -12,12 +12,8 @@ from JetD3PDMaker.jetMETD3PDTrigger import jetMETTriggerBitsD3PDObject
from MuonD3PDMaker.MuonD3PDObject import MuonD3PDObject from MuonD3PDMaker.MuonD3PDObject import MuonD3PDObject
from JetD3PDMaker.JetD3PDObject import JetD3PDObject from JetD3PDMaker.JetD3PDObject import JetD3PDObject
from TrackD3PDMaker.xAODVertexD3PDObject import PrimaryxAODVertexD3PDObject from TrackD3PDMaker.xAODVertexD3PDObject import PrimaryxAODVertexD3PDObject
from MissingETD3PDMaker.MissingETD3PDObject import *
from CaloD3PDMaker.MBTSD3PDObject import MBTSD3PDObject
from egammaD3PDAnalysis.egammaUserDataConfig import egammaUserDataConfig
from EventCommonD3PDMaker.LBMetadataConfig import LBMetadataConfig from EventCommonD3PDMaker.LBMetadataConfig import LBMetadataConfig
from TruthD3PDMaker.GenEventD3PDObject import GenEventD3PDObject from TruthD3PDMaker.GenEventD3PDObject import GenEventD3PDObject
from TruthD3PDAnalysis.truthParticleConfig import truthParticleConfig
from TruthD3PDMaker.TruthParticleD3PDObject import TruthParticleD3PDObject from TruthD3PDMaker.TruthParticleD3PDObject import TruthParticleD3PDObject
from RecExConfig.RecFlags import rec from RecExConfig.RecFlags import rec
...@@ -47,7 +43,6 @@ def JetD3PD (file, ...@@ -47,7 +43,6 @@ def JetD3PD (file,
file = file, file = file,
D3PDSvc = D3PDSvc, D3PDSvc = D3PDSvc,
streamNameRoot = streamNameRoot) streamNameRoot = streamNameRoot)
JetIncludes = ['AssocTrackCont']
alg += EventInfoD3PDObject (**_args (level, 'EventInfo', kw )) alg += EventInfoD3PDObject (**_args (level, 'EventInfo', kw ))
alg += ElectronD3PDObject (**_args (level, 'Electron', kw)) alg += ElectronD3PDObject (**_args (level, 'Electron', kw))
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# import JetD3PDMaker
import D3PDMakerCoreComps import D3PDMakerCoreComps
import EventCommonD3PDMaker import EventCommonD3PDMaker
# import BackgroundD3PDMaker from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
from D3PDMakerCoreComps.D3PDObject import D3PDObject, \
make_SGDataVector_D3PDObject
# from D3PDMakerCoreComps.release_version import at_least_version
# from D3PDMakerCoreComps.resolveSGKey import resolveSGKey
# from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
# from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
# from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
# from EventCommonD3PDMaker.DRAssociation import DRAssociation
# from JetD3PDAnalysis.JetVertexFractionConfig import JetVertexFractionConfig
# from JetD3PDMaker import JetD3PDMakerConf
# from JetRecTools.JetRecToolsConf import *
# from JetMomentTools.JetMomentToolsConf import *
# from RecExConfig.RecFlags import rec
# from AthenaCommon.AlgSequence import AlgSequence
# from JetRec import JetRecConf
# from JetRecTools import JetRecToolsConf
# from JetTagD3PDMaker.AddBTagD3PDInfo import addBTagInfoToJetObject
# from AthenaCommon.Logging import logging
# # # #
# # Useful options: # # Useful options:
...@@ -40,166 +18,16 @@ from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags ...@@ -40,166 +18,16 @@ from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
# # # #
# # Reconstruction versions prior to 15.6.8 didn't fill in the jet timing/quality.
# # Fix up such jets here.
# def _fixJetTiming (c, **kw):
# if at_least_version ('15.6.8'): return
# sgkey_in = c.Getter.SGKey
# try:
# sgkey_in = resolveSGKey ('JetCollection', sgkey_in)
# except:
# if not kw.get('allowMissing'): raise
# return
# sgkey_out = sgkey_in + '_timing'
# seq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName())
# if not hasattr (seq, sgkey_out):
# tools = []
# caloqual_kw = {'doCellBasedVariables' : True,
# 'doConstituentBasedVariables' : True,
# 'doSamplingBasedVariables' : True,
# 'cutOnTile' : 254,
# 'cutOnLAr' : 4000,
# 'doTileQuality' : True,
# 'doLArQuality' : True}
# if hasattr (JetRecToolsConf, 'JetTimeQualityTool'):
# # rel 15 setup
# tool1 = JetRecToolsConf.JetTimeQualityTool (sgkey_out + 'TimeTool',
# DoTime = False,
# DoQuality = False,
# UseCells = False)
# if rec.readESD() or rec.readRDO():
# tool1.DoTime = True
# tool1.DoQuality = True
# tool1.UseCells = True
# if rec.readAOD() and (sgkey_in.find ('H1Topo') >= 0 or
# sgkey_in.find ('LCTopo') >= 0):
# tool1.DoTime = True
# tools.append (tool1)
# else:
# # rel 16
# caloqual_kw['doTiming'] = True
# tool2 = JetCaloQualityTool (sgkey_out + 'QualTool',
# **caloqual_kw)
# tools.append (tool2)
# alg = JetD3PDMaker.JetFixupAlg (sgkey_out,
# InputKey = sgkey_in,
# OutputKey = sgkey_out,
# Tools = tools)
# for t in tools:
# alg += t
# seq += alg
# c.Getter.SGKey = sgkey_out
# return
# def _getprop (c, n):
# return getattr (c, n, c.getDefaultProperty(n))
# def _jetVertexAlgHook (c, prefix, sgkey, typeName,
# seq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()),
# *args, **kw):
# jvf = getattr(c, c.getName() + '_JetVertexFraction', None)
# if jvf :setattr(jvf,'FillFullJVF',True) # impose FillFullJVF in this case
# if jvf and (_getprop (jvf, 'FromUD') or _getprop (jvf, 'FillFullJVF')):
# JetVertexFractionConfig (seq = seq,
# prefix = prefix,
# # nb. Use this rather than the sgkey
# # passed in; _fixJetTiming may
# # have changed it.
# sgkey = c.Getter.SGKey,
# typeName = typeName)
# return
# # Don't make this unless target has been specified.
# def _constitAssocLevel (reqlev, args):
# if reqlev < 1: return False
# if not args.has_key ('Target') or not args['Target']: return False
# return True
# def _jetMomentsHook (c, prefix, sgkey, typeName,
# seq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()),
# *args, **kw):
# from JetD3PDAnalysis.JetMomentCalcConfig import JetMomentCalcConfig
# # Always turn this on if we're making jets --- it changes jvf results.
# from JetRec.JetRecFlags import jetFlags
# if hasattr(jetFlags, 'jetPerformanceJob'):
# jetFlags.jetPerformanceJob = True
# if hasattr (c, c.name() + '_Special'):
# JetMomentCalcConfig (c.Getter.SGKey, 'all', seq=seq)
# else:
# key = resolveSGKey ('JetCollection', c.Getter.SGKey)
# if hasattr (c, c.name() + '_ActiveArea'):
# JetMomentCalcConfig (c.Getter.SGKey, None, seq=seq)
# if hasattr (c, c.name() + '_TruthMF') and 'Topo' in key:
# JetMomentCalcConfig (c.Getter.SGKey, ['truthMF'], seq=seq)
# if hasattr (c, c.name() + '_TracksMoments') and 'Topo' in key:
# JetMomentCalcConfig (c.Getter.SGKey, ['trackMoments'], seq=seq)
# if hasattr (c, c.name() + '_OriginCorrection'):
# JetMomentCalcConfig (c.Getter.SGKey, ['origin'], seq=seq)
# return
# def _jetClusterMomentsHook (c, prefix, sgkey, typeName,
# seq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()),
# *args, **kw):
# if hasattr (c, c.name() + '_JetClusterMoment'):
# from JetRec.JetMomentGetter import make_JetMomentGetter
# try:
# from JetMomentTools.JetMomentToolsConf import JetMomentsFromClusters
# except ImportError:
# # JetMomentsFromClusters available only in AtlasPhysics, not
# # in AtlasProduction or development.
# log = logging.getLogger ('JetD3PDObject')
# log.warn ('JetMomentsFromClusters not available; skipping.')
# return
# jt = JetMomentsFromClusters(ClusterMoments=["CENTER_LAMBDA","SECOND_R","SECOND_LAMBDA"],
# ClusterPt=True)
# make_JetMomentGetter(resolveSGKey ('JetCollection', c.Getter.SGKey),
# [jt])
# return
def getJetD3PDObject(objectname='JetD3PDObject', prefix='jet_', btagleveloffset=7): def getJetD3PDObject(objectname='JetD3PDObject', prefix='jet_', btagleveloffset=7):
object = make_SGDataVector_D3PDObject ('DataVector<xAOD::Jet_v1>', object = make_SGDataVector_D3PDObject ('DataVector<xAOD::Jet_v1>',
D3PDMakerFlags.JetSGKey(), D3PDMakerFlags.JetSGKey(),
prefix, objectname) prefix, objectname)
# object.defineHook (_fixJetTiming)
# object.defineHook (_jetVertexAlgHook)
# object.defineHook (_jetMomentsHook)
# object.defineHook (_jetClusterMomentsHook)
object.defineBlock(0, 'Kinematics', object.defineBlock(0, 'Kinematics',
EventCommonD3PDMaker.FourMomFillerTool, EventCommonD3PDMaker.FourMomFillerTool,
WriteE = True) WriteE = True)
# object.defineBlock(1, 'OriginCorrection',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['EtaOrigin' , 'PhiOrigin' , 'MOrigin'
# ])
# object.defineBlock(1, 'WIDTH',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['WIDTH'
# ])
object.defineBlock ( object.defineBlock (
1, 'DQMoments', 1, 'DQMoments',
D3PDMakerCoreComps.AuxDataFillerTool, D3PDMakerCoreComps.AuxDataFillerTool,
...@@ -221,10 +49,6 @@ def getJetD3PDObject(objectname='JetD3PDObject', prefix='jet_', btagleveloffset= ...@@ -221,10 +49,6 @@ def getJetD3PDObject(objectname='JetD3PDObject', prefix='jet_', btagleveloffset=
'ootFracClusters10 < float: 0', 'ootFracClusters10 < float: 0',
]) ])
# object.defineBlock(1, 'JetSamplingsFrac',
# JetD3PDMaker.JetSamplingsFracFillerTool)
# object.defineBlock(1, 'JetQual',
# JetD3PDMaker.JetCaloUtilsFillerTool)
object.defineBlock ( object.defineBlock (
1, 'JetQual', 1, 'JetQual',
D3PDMakerCoreComps.AuxDataFillerTool, D3PDMakerCoreComps.AuxDataFillerTool,
...@@ -234,228 +58,7 @@ def getJetD3PDObject(objectname='JetD3PDObject', prefix='jet_', btagleveloffset= ...@@ -234,228 +58,7 @@ def getJetD3PDObject(objectname='JetD3PDObject', prefix='jet_', btagleveloffset=
'isUgly < int: 0', 'isUgly < int: 0',
'hecf = HECFrac < float: 0', 'hecf = HECFrac < float: 0',
]) ])
# object.defineBlock(1, 'EMFraction',
# JetD3PDMaker.JetEMFractionFillerTool)
# object.defineBlock(1, 'JES',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=[ 'Offset', 'EMJES', 'EMJES_EtaCorr','EMJESnooffset' ])
# object.defineBlock(1, 'JESMoments',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['LCJES', 'LCJES_EtaCorr' ])
# object.defineBlock(1, 'EMScale',
# JetD3PDMaker.JetSignalStateFillerTool,
# WriteE = True,
# SignalStateNumber = 0,
# SignalStatePrefix = 'emscale')
# object.defineBlock(1, 'ActiveArea',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['ActiveArea', 'ActiveAreaPx', 'ActiveAreaPy', 'ActiveAreaPz', 'ActiveAreaE'])
# # Including JetVertexFraction should also include JVtx and TruthMF,
# # unless explicitly excluded.
# def _jvfLOD (reqlev, args, hookargs):
# if reqlev < 3: return False
# if not 'JVtx' in hookargs['exclude']:
# hookargs['include'].append ('JVtx')
# if not 'TruthMF' in hookargs['exclude']:
# hookargs['include'].append ('TruthMF')
# return True
# try:
# # tracksAvailableForJets not defined in every release. Temporarily put it in
# # a try / except block
# from JetRec.TrackSelectionForJets import tracksAvailableForJets
# dotrackVars = tracksAvailableForJets()
# except:
# dotrackVars = True
# if dotrackVars:
# object.defineBlock(_jvfLOD, 'JetVertexFraction',
# JetD3PDMaker.JetVertexFractionFillerTool,
# UDPrefix=D3PDMakerFlags.JetUserDataPrefix(),
# )
# object.defineBlock(3, 'JVtx',
# JetD3PDMaker.JetVtxFillerTool)
# object.defineBlock(3, 'TruthMF',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['TruthMFindex','TruthMF'])
# object.defineBlock(3, 'Layer',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['GSCFactorF','WidthFraction'])
# object.defineBlock(4, 'Samplings',
# JetD3PDMaker.JetSamplingsFillerTool)
# object.defineBlock(4, 'JetShape',
# JetD3PDMaker.JetShapeFillerTool)
# object.defineBlock(4, 'Constituents',
# JetD3PDMaker.JetConstituentFillerTool,
# SignalStateNumber = -1,
# SignalStatePrefix = 'default')
# object.defineBlock(4, 'ConstituentScale',
# JetD3PDMaker.JetSignalStateFillerTool,
# WriteE = True,
# SignalStateNumber = 2,
# SignalStatePrefix = 'constscale')
# object.defineBlock(5, 'JetLArHVMoment',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['LArBadHVEnergy','LArBadHVRatio'])
# object.defineBlock(9, 'JetClusterMoment',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['CENTER_LAMBDA','SECOND_R','SECOND_LAMBDA',
# 'CLUSTER_PT'])
# addBTagInfoToJetObject(object,btagleveloffset)
# # Track association cannot be done unless there are tracks.
# # As often this is not the case track association will be done only
# # if this is explicitly asked for. by defining it in the include list.
# #
# # You can also enable it by passing an argument to JetD3PDObject
# # like:
# # AssocTrackCont_target='mytarget_'
# def _jetAssocLevel (reqlev, args):
# return args.has_key ('target') or (reqlev >= 999)
# IndexMultiAssociation (object,
# JetD3PDMaker.FlavorAssociationTool,
# 'trk',
# prefix = 'flavor_assoctrk_',
# level = _jetAssocLevel,
# blockname = 'AssocTrackCont')
# object.defineBlock(10, 'JetRoIword',
# JetD3PDMaker.JetROIWordFillerTool
# )
# #JetElAssoc = DRAssociation(object,"ElectronContainer",D3PDMakerFlags.ElectronSGKey(),0.2,prefix='el_',matched="matched",blockname="El02Match")
# #JetMuAssoc = DRAssociation(object,"Analysis::MuonContainer",D3PDMakerFlags.MuonSGKey(),0.2,prefix='mu_',matched="matched",blockname="Mu02Match")
# #JetTrkAssoc = DRAssociation(object,"Rec::TrackParticleContainer",D3PDMakerFlags.TrackSGKey(),0.4,prefix='trk_',matched="matched",blockname="Trk04Match")
# #---------------- Trigger Object ----------------------------
# #if D3PDMakerFlags.DoTrigger():
# if False:
# JetL1Assoc = SimpleAssociation(object,
# JetD3PDMaker.JetL1TriggerObjectAssociationTool,
# matched = 'matched',
# blockname = 'L1Info',
# prefix = 'L1_',
# MaxDR = 0.6,
# ChainPattern = 'L1_J.*')
# JetL1Assoc.defineBlock (99, 'L1Kinematics',
# EventCommonD3PDMaker.FourMomFillerTool,
# WriteE = True,
# WriteEt = False,
# WriteM = False)
# JetL2Assoc = SimpleAssociation(object,
# JetD3PDMaker.JetL2TriggerObjectAssociationTool,
# matched = 'matched',
# blockname = 'L2Info',
# prefix = 'L2_',
# MaxDR = 0.25,
# ChainPattern = 'L2_j.*')
# JetL2Assoc.defineBlock (99, 'L2Kinematics',
# EventCommonD3PDMaker.FourMomFillerTool,
# WriteE = True,
# WriteEt = False,
# WriteM = False)
# JetEFAssoc = SimpleAssociation(object,
# JetD3PDMaker.JetEFTriggerObjectAssociationTool,
# matched = 'matched',
# blockname = 'EFInfo',
# prefix = 'EF_',
# MaxDR = 0.25,
# ChainPattern = 'EF_j.*')
# JetEFAssoc.defineBlock (99, 'EFKinematics',
# EventCommonD3PDMaker.FourMomFillerTool,
# WriteE = True,
# WriteEt = False,
# WriteM = False)
# pass
# ConstitAssoc = ContainedVectorMultiAssociation \
# (object,
# #JetD3PDMaker.JetConstituentAssociationTool,
# EventCommonD3PDMaker.NavigableConstituentAssociationTool,
# 'constit_',
# TypeName = 'CaloCluster',
# nrowName = '',
# level = 1)
# ConstitAssoc.defineBlock (_constitAssocLevel, 'ConstitIndex',
# D3PDMakerCoreComps.IndexFillerTool,
# Target = '')
# # Beam Background Identification Method
# object.defineBlock( 999, 'BeamBackground',
# BackgroundD3PDMaker.BeamBackgroundJetFillerTool)
# #---------------- special jet moments ----------------------------
# object.defineBlock(999, 'TrackMF',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['TrackMFindex','TrackMF'])
# object.defineBlock(999, 'TracksMoments',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['nTrk_pv0_1GeV', 'sumPtTrk_pv0_1GeV', 'nTrk_allpv_1GeV', 'sumPtTrk_allpv_1GeV',
# 'nTrk_pv0_500MeV', 'sumPtTrk_pv0_500MeV',
# 'trackWIDTH_pv0_1GeV','trackWIDTH_allpv_1GeV'
# ])
# object.defineBlock(999, 'JetLabel',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['JetLabel'])
# object.defineBlock(999, 'Special',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['LikeLihood_0',
# 'LowEtConstituentsFrac','KtDr',
# ])
# object.defineBlock(999, 'VoronoiArea',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['VoronoiArea', 'VoronoiAreaPx', 'VoronoiAreaPy', 'VoronoiAreaPz', 'VoronoiAreaE',
# ])
# object.defineBlock(999, 'Isolation',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['IsoKR20Perp', 'IsoKR20Par', 'IsoKR20SumPt', 'IsoDelta2Perp', 'IsoDelta2Par',
# 'IsoDelta2SumPt', 'IsoFixedCone8Perp', 'IsoFixedCone8Par', 'IsoFixedCone8SumPt',
# 'IsoFixedArea13Perp', 'IsoFixedArea13Par', 'IsoFixedArea13SumPt',
# 'Iso6To88Perp', 'Iso6To88Par', 'Iso6To88SumPt',
# ])
# object.defineBlock(999, 'SplitInfo',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['SPLIT12', 'SPLIT23', 'SPLIT34'])
# object.defineBlock(999, 'Uncertainties',
# JetD3PDMaker.JetMomentFillerTool,
# Moments=['SmearingFactor'])
return object return object
JetD3PDObject = getJetD3PDObject() JetD3PDObject = getJetD3PDObject()
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
import D3PDMakerCoreComps
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject
from JetD3PDMaker.jetMETD3PDTrigger import jetMETTriggerBitsD3PDObject
from JetD3PDMaker.JetTileD3PDObject import JetTileD3PDObject
#from MissingETD3PDMaker.MissingETD3PDObject import *
from EventCommonD3PDMaker.LBMetadataConfig import LBMetadataConfig
from TruthD3PDMaker.GenEventD3PDObject import GenEventD3PDObject
from TruthD3PDMaker.TruthParticleD3PDObject import TruthParticleD3PDObject
from RecExConfig.RecFlags import rec
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
inputSGkey='AntiKt4TopoEMNewJets'
def _args (level, name, kwin, **kw):
kw = kw.copy()
kw['level'] = level
for (k, v) in kwin.items():
if k.startswith (name + '_'):
kw[k[len(name)+1:]] = v
return kw
# TD: changed the tuplename here:
def JetTileD3PD (file,
level = 4,
tuplename = 'MyTuple',
seq = topSequence,
D3PDSvc = 'D3PD::RootD3PDSvc',
streamNameRoot = None,
**kw):
alg = D3PDMakerCoreComps.MakerAlg(tuplename,
seq,
file = file,
D3PDSvc = D3PDSvc,
streamNameRoot = streamNameRoot)
JetIncludes = ['AssocTrackCont']
alg += EventInfoD3PDObject (**_args (level, 'EventInfo', kw ))
alg += JetTileD3PDObject (**_args(level,inputSGkey, kw, sgkey=inputSGkey, prefix='AntiKt4Topo_' ) )
from TriggerD3PDMaker.BGCodeD3PDObject import BGCodeD3PDObject
from TriggerD3PDMaker.BunchStructureMetadata import addBunchStructureMetadata
alg += BGCodeD3PDObject (**_args (2, 'BGCode', kw))
addBunchStructureMetadata( alg )
from TriggerD3PDMaker.TrigDecisionD3PDObject import TrigDecisionD3PDObject
from TriggerD3PDMaker.TrigConfMetadata import addTrigConfMetadata
alg += TrigDecisionD3PDObject (**_args(10, 'TrigDecision', kw))
addTrigConfMetadata( alg )
if D3PDMakerFlags.DoTrigger():
alg += jetMETTriggerBitsD3PDObject(level)
from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
TrackD3PDFlags.storeVertexTrackIndexAssociation.set_Value_and_Lock(False)
TrackD3PDFlags.storeVertexTrackAssociation.set_Value_and_Lock(False)
TrackD3PDFlags.storeVertexFitQuality.set_Value_and_Lock(False)
from TrackD3PDMaker.xAODVertexD3PDObject import PrimaryxAODVertexD3PDObject
alg += PrimaryxAODVertexD3PDObject (**_args (0, 'PrimaryVertex', kw,
allowMissing = True,
sgkey = D3PDMakerFlags.VertexSGKey(),
prefix = 'vxp_'))
if rec.doTruth():
alg += GenEventD3PDObject (**_args (1, 'GenEvent', kw))
alg += TruthParticleD3PDObject(**_args (1, 'TruthParticle', kw))
alg += JetTileD3PDObject (**_args (1, 'AntiKt4TruthJets', kw, sgkey='AntiKt4TruthJets', prefix='AntiKt4Truth_' ) )
alg.MetadataTools += [LBMetadataConfig()]
return alg
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Haifeng.Li@cern.ch
# For May reprocess data
import D3PDMakerCoreComps
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject
from egammaD3PDMaker.ElectronD3PDObject import ElectronD3PDObject
from egammaD3PDMaker.PhotonD3PDObject import PhotonD3PDObject
from JetD3PDMaker.jetMETD3PDTrigger import jetMETTriggerBitsD3PDObject
from MuonD3PDMaker.MuonD3PDObject import MuonD3PDObject
from JetD3PDMaker.JetD3PDObject import JetD3PDObject
from TrackD3PDMaker.xAODVertexD3PDObject import PrimaryxAODVertexD3PDObject
from MissingETD3PDMaker.MissingETD3PDObject import *
from CaloD3PDMaker.MBTSD3PDObject import MBTSD3PDObject
from egammaD3PDAnalysis.egammaUserDataConfig import egammaUserDataConfig
from EventCommonD3PDMaker.LBMetadataConfig import LBMetadataConfig
from TruthD3PDMaker.GenEventD3PDObject import GenEventD3PDObject
from TruthD3PDAnalysis.truthParticleConfig import truthParticleConfig
from TruthD3PDMaker.TruthParticleD3PDObject import TruthParticleD3PDObject
from RecExConfig.RecFlags import rec
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
def JetD3PD (file,
level = 4,
tuplename = 'jet',
seq = topSequence,
D3PDSvc = 'D3PD::RootD3PDSvc'):
egammaUserDataConfig (seq)
if rec.doTruth():
truthParticleConfig (seq)
JetIncludes = ['AssocTrackCont']
alg = D3PDMakerCoreComps.MakerAlg(tuplename, seq,
file = file, D3PDSvc = D3PDSvc)
#-- General
alg += EventInfoD3PDObject (level)
alg += ElectronD3PDObject (0)
alg += PhotonD3PDObject (0)
alg += MuonD3PDObject (0)
alg += PrimaryxAODVertexD3PDObject (4, allowMissing = True,
sgkey = D3PDMakerFlags.VertexSGKey(),
prefix = 'vxp_')
#-- JET
alg += JetD3PDObject (level, sgkey='AntiKt4H1TopoJets', include = JetIncludes, prefix='AntiKt4H1Topo_' )
alg += JetD3PDObject (level, sgkey='AntiKt6H1TopoJets', include = JetIncludes, prefix='AntiKt6H1Topo_' )
#alg += JetD3PDObject (level, sgkey='Cone4H1TopoJets', include = JetIncludes, prefix='Cone4H1Topo_' )
#-- MET
alg += RefFinalMETD3PDObject (level)
alg += MuonMETD3PDObject (level)
alg += MuonBoyMETD3PDObject (level)
alg += FinalMETD3PDObject (level)
alg += CryoMETD3PDObject (level)
alg += CryoConeMETD3PDObject (level)
alg += RefEleMETD3PDObject (level)
alg += RefJetMETD3PDObject (level)
alg += RefGammaMETD3PDObject (level)
alg += RefTauMETD3PDObject (level)
alg += CellOutMETD3PDObject (level)
alg += BaseMETD3PDObject (level)
alg += Base0METD3PDObject (level)
alg += CalibMETD3PDObject (level)
alg += MuonBoySpectroMETD3PDObject (level)
alg += MuonBoyTrackMETD3PDObject (level)
alg += TopoMETD3PDObject (level)
alg += CorrTopoMETD3PDObject (level)
alg += LocHadTopoMETD3PDObject (level)
alg += TopoObjMETD3PDObject (level)
#-- Trigger
if D3PDMakerFlags.DoTrigger():
alg += jetMETTriggerBitsD3PDObject(level)
#-- Truth
if rec.doTruth() :
alg += GenEventD3PDObject (1)
#alg += TruthParticleD3PDObject (level)
#alg += JetD3PDObject (level, sgkey='Cone4TruthJets' , prefix='Cone4Truth_' )
alg += JetD3PDObject (3, sgkey='AntiKt4TruthJets', prefix='AntiKt4Truth_' )
#alg += JetD3PDObject (3, sgkey='AntiKt6TruthJets', prefix='AntiKt6Truth_' )
#-- Meta Data
alg.MetadataTools += [LBMetadataConfig()]
return alg
################################################################################ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Package: JetTagD3PDMaker
################################################################################
# Declare the package name: # Declare the package name:
atlas_subdir( JetTagD3PDMaker ) atlas_subdir( JetTagD3PDMaker )
# External dependencies: # External dependencies:
find_package( Boost COMPONENTS filesystem thread system ) find_package( Boost )
find_package( CLHEP ) find_package( CLHEP )
# Component(s) in the package: # Component(s) in the package:
...@@ -14,9 +12,9 @@ atlas_add_component( JetTagD3PDMaker ...@@ -14,9 +12,9 @@ atlas_add_component( JetTagD3PDMaker
src/*.cxx src/*.cxx
src/components/*.cxx src/components/*.cxx
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel AthContainers EventKernel EventPrimitives GaudiKernel GeneratorObjects InDetIdentifier InDetReadoutGeometry D3PDMakerUtils JetTagEvent JetTagInfo MuonIDEvent McParticleEvent JetEvent muonEvent Particle egammaEvent TrkParticleBase VxJetVertex VxSecVertex VxVertex TrkVertexFitterInterfaces InDetConditionsSummaryService ) LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel AthContainers EventPrimitives GaudiKernel GeneratorObjects InDetIdentifier InDetReadoutGeometry D3PDMakerUtils JetTagEvent JetTagInfo MuonIDEvent McParticleEvent JetEvent muonEvent Particle egammaEvent StoreGateLib TrkParticleBase VxJetVertex VxSecVertex VxVertex InDetConditionsSummaryService )
# Install files from the package: # Install files from the package:
atlas_install_python_modules( python/*.py ) atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py ) atlas_install_joboptions( share/*.py )
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
# #
## @file JetTagD3PDMaker/python/AddBTagInfoToJetObject.py ## @file JetTagD3PDMaker/python/AddBTagInfoToJetObject.py
## @brief Python function to add BTagging specific fillers and association tools to a JetD3PDObject ## @brief Python function to add BTagging specific fillers and association tools to a JetD3PDObject
...@@ -32,14 +30,10 @@ addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=X) ...@@ -32,14 +30,10 @@ addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=X)
alg+=JetD3PDObject(level, <additional options>) alg+=JetD3PDObject(level, <additional options>)
""" """
import JetTagD3PDMaker import JetTagD3PDMaker
import TrackD3PDMaker
import TruthD3PDMaker
import EventCommonD3PDMaker import EventCommonD3PDMaker
import MuonD3PDMaker import MuonD3PDMaker
import TruthD3PDMaker
import D3PDMakerCoreComps
from D3PDMakerCoreComps.D3PDObject import D3PDObject
from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
from D3PDMakerCoreComps.IndexAssociation import IndexAssociation from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
...@@ -51,7 +45,6 @@ from TrkExTools.AtlasExtrapolator import AtlasExtrapolator ...@@ -51,7 +45,6 @@ from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
from TruthD3PDMaker.TruthD3PDMakerFlags import TruthD3PDFlags
def _jetTagAssocLevel (reqlev, args): def _jetTagAssocLevel (reqlev, args):
if not args.has_key ('target') : if not args.has_key ('target') :
...@@ -67,7 +60,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -67,7 +60,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
from AthenaCommon.Logging import logging from AthenaCommon.Logging import logging
addBTagInfoLogger = logging.getLogger( "addBTagInfoToJetObject" ) addBTagInfoLogger = logging.getLogger( "addBTagInfoToJetObject" )
if JetD3PDObject.allBlocknames().has_key(JetTagD3PDKeys.BTagWeightsBlockName()) : if JetTagD3PDKeys.BTagWeightsBlockName() in JetD3PDObject.allBlocknames():
addBTagInfoLogger.warning("btag blocks already added to JetD3PDObject - ignore") addBTagInfoLogger.warning("btag blocks already added to JetD3PDObject - ignore")
return return
...@@ -153,7 +146,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -153,7 +146,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
JetTrack = ContainedVectorMultiAssociation(JetD3PDObject, JetTrack = ContainedVectorMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagJetTrackAssociationTool, JetTagD3PDMaker.JetTagJetTrackAssociationTool,
level = btagLevelOffset+4, level = btagLevelOffset+4,
prefix=JetTagD3PDKeys.JetTrackAssocPrefix(), prefix=JetTagD3PDKeys.JetTrackAssocPrefix(),
...@@ -164,7 +157,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -164,7 +157,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.JetTrackGhostAssoc(): if LocalFlags.JetTrackGhostAssoc():
JetTrackAssoc = IndexMultiAssociation(JetD3PDObject, JetTrackAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagJetTrackAssociationTool, JetTagD3PDMaker.JetTagJetTrackAssociationTool,
'', ## set target when calling the JetD3PDObject '', ## set target when calling the JetD3PDObject
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -230,7 +223,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -230,7 +223,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.JetMuonAssoc(): if LocalFlags.JetMuonAssoc():
JetMuonAssoc = IndexMultiAssociation(JetD3PDObject, JetMuonAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagJetMuonAssociationTool, JetTagD3PDMaker.JetTagJetMuonAssociationTool,
'', ## set target when calling the JetD3PDObject '', ## set target when calling the JetD3PDObject
level =_jetTagAssocLevel, level =_jetTagAssocLevel,
...@@ -239,7 +232,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -239,7 +232,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.AddSecondMuonCollection(): if LocalFlags.AddSecondMuonCollection():
JetMuon2Assoc = IndexMultiAssociation(JetD3PDObject, JetMuon2Assoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagJetMuonAssociationTool, JetTagD3PDMaker.JetTagJetMuonAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -249,7 +242,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -249,7 +242,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.JetElectronAssoc(): if LocalFlags.JetElectronAssoc():
JetElectronAssoc = IndexMultiAssociation(JetD3PDObject, JetElectronAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagJetElectronAssociationTool, JetTagD3PDMaker.JetTagJetElectronAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -258,7 +251,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -258,7 +251,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.JetPhotonAssoc(): if LocalFlags.JetPhotonAssoc():
JetPhotonAssoc = IndexMultiAssociation(JetD3PDObject, JetPhotonAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagJetPhotonAssociationTool, JetTagD3PDMaker.JetTagJetPhotonAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -269,8 +262,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -269,8 +262,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if rec.doTruth and LocalFlags.JetGenSoftLeptonAssoc(): if rec.doTruth and LocalFlags.JetGenSoftLeptonAssoc():
JetGenSoftLeptonAssoc = IndexMultiAssociation(\ JetGenSoftLeptonAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetD3PDObject,
JetTagD3PDMaker.JetTagJetGenSoftLeptonAssociationTool, JetTagD3PDMaker.JetTagJetGenSoftLeptonAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -281,8 +273,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -281,8 +273,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
JetGenSoftLepton = ContainedVectorMultiAssociation(\ JetGenSoftLepton = ContainedVectorMultiAssociation(JetD3PDObject, # noqa: F841
JetD3PDObject,
JetTagD3PDMaker.JetTagJetGenSoftLeptonAssociationTool, JetTagD3PDMaker.JetTagJetGenSoftLeptonAssociationTool,
level = btagLevelOffset+4, level = btagLevelOffset+4,
prefix=JetTagD3PDKeys.JetGenSoftLeptonAssocPrefix(), prefix=JetTagD3PDKeys.JetGenSoftLeptonAssocPrefix(),
...@@ -475,7 +466,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -475,7 +466,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.IPInfoPlus(): if LocalFlags.IPInfoPlus():
IPInfoPlusTrackAssoc = IndexMultiAssociation(JetD3PDObject, IPInfoPlusTrackAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagIPInfoPlusTrackAssociationTool, JetTagD3PDMaker.JetTagIPInfoPlusTrackAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -515,7 +506,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -515,7 +506,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
AddNormDist=True) AddNormDist=True)
SVInfoPlusTrackAssoc = IndexMultiAssociation(JetD3PDObject, SVInfoPlusTrackAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagSVInfoPlusTrackAssociationTool, JetTagD3PDMaker.JetTagSVInfoPlusTrackAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -552,7 +543,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -552,7 +543,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
InfoType="SV0InfoPlus", InfoType="SV0InfoPlus",
AllowMissing = True) AllowMissing = True)
SV0InfoPlusTrackAssoc = IndexMultiAssociation(JetD3PDObject, SV0InfoPlusTrackAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagSVInfoPlusTrackAssociationTool, JetTagD3PDMaker.JetTagSVInfoPlusTrackAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -583,7 +574,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -583,7 +574,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.SoftMuonInfo(): if LocalFlags.SoftMuonInfo():
SoftMuonInfoMuonAssoc = IndexMultiAssociation(JetD3PDObject, SoftMuonInfoMuonAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -630,8 +621,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -630,8 +621,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.AddSecondMuonCollection(): if LocalFlags.AddSecondMuonCollection():
SoftMuon2InfoMuon2Assoc = IndexMultiAssociation(\ SoftMuon2InfoMuon2Assoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetD3PDObject,
JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -663,7 +653,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -663,7 +653,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.SoftMuonChi2Info(): if LocalFlags.SoftMuonChi2Info():
SoftMuonChi2InfoMuonAssoc = IndexMultiAssociation(JetD3PDObject, SoftMuonChi2InfoMuonAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -712,8 +702,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -712,8 +702,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.AddSecondMuonCollection(): if LocalFlags.AddSecondMuonCollection():
SoftMuon2Chi2InfoMuon2Assoc = IndexMultiAssociation(\ SoftMuon2Chi2InfoMuon2Assoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetD3PDObject,
JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool, JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -747,8 +736,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -747,8 +736,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.SoftElectronInfo(): if LocalFlags.SoftElectronInfo():
SoftElectronInfoElectronAssoc = IndexMultiAssociation(\ SoftElectronInfoElectronAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetD3PDObject,
JetTagD3PDMaker.JetTagSoftElecInfoegammaAssociationTool, JetTagD3PDMaker.JetTagSoftElecInfoegammaAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -784,8 +772,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -784,8 +772,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
AllowMissing = True) AllowMissing = True)
MultiSVInfoPlusTrackAssoc = IndexMultiAssociation(\ MultiSVInfoPlusTrackAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetD3PDObject,
JetTagD3PDMaker.JetTagMultiSVInfoMSVVtxInfoAssociationTool, JetTagD3PDMaker.JetTagMultiSVInfoMSVVtxInfoAssociationTool,
'', '',
level = _jetTagAssocLevel, level = _jetTagAssocLevel,
...@@ -853,7 +840,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -853,7 +840,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.JFVxOnJetAxisAssocLabel() != "": if LocalFlags.JFVxOnJetAxisAssocLabel() != "":
JetVxOnJetAxisAssoc = IndexMultiAssociation(JetD3PDObject, JetVxOnJetAxisAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetTagD3PDMaker.JetTagJetVxOnJetAxisAssociationTool, JetTagD3PDMaker.JetTagJetVxOnJetAxisAssociationTool,
LocalFlags.JFVxOnJetAxisAssocLabel(), LocalFlags.JFVxOnJetAxisAssocLabel(),
level = btagLevelOffset+5, level = btagLevelOffset+5,
...@@ -864,8 +851,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -864,8 +851,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.JetFitterFlipVxOnJetAxisAssoc(): if LocalFlags.JetFitterFlipVxOnJetAxisAssoc():
JFFlipJetVxOnJetAxisAssoc = IndexMultiAssociation(\ JFFlipJetVxOnJetAxisAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetD3PDObject,
JetTagD3PDMaker.JetTagJetVxOnJetAxisAssociationTool, JetTagD3PDMaker.JetTagJetVxOnJetAxisAssociationTool,
LocalFlags.JFVxOnJetAxisAssocLabel(), LocalFlags.JFVxOnJetAxisAssocLabel(),
level = btagLevelOffset+6, level = btagLevelOffset+6,
...@@ -877,8 +863,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -877,8 +863,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.JFTwoTrackVertexAssocLabel() != "": if LocalFlags.JFTwoTrackVertexAssocLabel() != "":
JetJFTwoTrackVertexAssoc = IndexMultiAssociation(\ JetJFTwoTrackVertexAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetD3PDObject,
JetTagD3PDMaker.JetTagJetJFTwoTrackVertexAssociationTool, JetTagD3PDMaker.JetTagJetJFTwoTrackVertexAssociationTool,
LocalFlags.JFTwoTrackVertexAssocLabel(), LocalFlags.JFTwoTrackVertexAssocLabel(),
level = btagLevelOffset+5, level = btagLevelOffset+5,
...@@ -889,8 +874,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3 ...@@ -889,8 +874,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
if LocalFlags.JetFitterFlipTwoTrackVertexAssoc(): if LocalFlags.JetFitterFlipTwoTrackVertexAssoc():
JetJFFlipTwoTrackVertexAssoc = IndexMultiAssociation(\ JetJFFlipTwoTrackVertexAssoc = IndexMultiAssociation(JetD3PDObject, # noqa: F841
JetD3PDObject,
JetTagD3PDMaker.JetTagJetJFTwoTrackVertexAssociationTool, JetTagD3PDMaker.JetTagJetJFTwoTrackVertexAssociationTool,
LocalFlags.JFTwoTrackVertexAssocLabel(), LocalFlags.JFTwoTrackVertexAssocLabel(),
level = btagLevelOffset+6, level = btagLevelOffset+6,
......
...@@ -6,30 +6,24 @@ ...@@ -6,30 +6,24 @@
# @brief Construct a btagging d3pd. # @brief Construct a btagging d3pd.
# #
from __future__ import print_function
from AthenaCommon.AppMgr import ServiceMgr from AthenaCommon.AppMgr import ServiceMgr
from AthenaCommon.AppMgr import ToolSvc
from RecExConfig.RecFlags import rec from RecExConfig.RecFlags import rec
from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
from TruthD3PDMaker.TruthD3PDMakerFlags import TruthD3PDFlags
def _modifyMuonObject(MuonD3PDObject): def _modifyMuonObject(MuonD3PDObject):
if not MuonD3PDObject.allBlocknames().has_key("BtagMuonTrackMatchingBlock"): if "BtagMuonTrackMatchingBlock" not in MuonD3PDObject.allBlocknames():
if JetTagD3PDFlags.TrackAssocLabel() != "": if JetTagD3PDFlags.TrackAssocLabel() != "":
from D3PDMakerCoreComps.IndexAssociation import IndexAssociation from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
import MuonD3PDMaker import MuonD3PDMaker
mtassoc = IndexAssociation(MuonD3PDObject, _ = IndexAssociation(MuonD3PDObject,
MuonD3PDMaker.MuonTrackParticleAssociationTool, MuonD3PDMaker.MuonTrackParticleAssociationTool,
JetTagD3PDFlags.TrackAssocLabel(), JetTagD3PDFlags.TrackAssocLabel(),
level = 500, level = 500,
prefix=JetTagD3PDKeys.MuonInDetTrackAssocPrefix(), prefix=JetTagD3PDKeys.MuonInDetTrackAssocPrefix(),
blockname="BtagMuonTrackMatchingBlock", blockname="BtagMuonTrackMatchingBlock",
Type = 'InDet') Type = 'InDet')
...@@ -312,7 +306,7 @@ def BTaggingD3PD(alg = None, ...@@ -312,7 +306,7 @@ def BTaggingD3PD(alg = None,
if JetTagD3PDFlags.AddFatJets(): if JetTagD3PDFlags.AddFatJets():
from JetTagD3PDMaker.JetTagJSD3PDObjects import JSD3PD_Tool from JetTagD3PDMaker.JetTagJSD3PDObjects import JSD3PD_Tool
for xx in JetTagD3PDKeys.FatJetsList(): for xx in JetTagD3PDKeys.FatJetsList():
if xx[0] != None and xx[1] != None: if xx[0] is not None and xx[1] is not None:
jsD3PD = JSD3PD_Tool(xx) jsD3PD = JSD3PD_Tool(xx)
jsD3PD.addToAlg(alg) jsD3PD.addToAlg(alg)
......
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagClustersD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagClustersD3PDObject.py
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
## @author Georges Aad ## @author Georges Aad
## @date Nov, 2010 ## @date Nov, 2010
## ##
import D3PDMakerCoreComps
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
def getJetTagClusterD3PDObject(level=0, **kw): def getJetTagClusterD3PDObject(level=0, **kw):
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagElectronInJetD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagElectronInJetD3PDObject.py
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
## @date Nov, 2010 ## @date Nov, 2010
## ##
import JetTagD3PDMaker
import TrackD3PDMaker
import egammaD3PDMaker import egammaD3PDMaker
import EventCommonD3PDMaker import EventCommonD3PDMaker
##from egammaD3PDMaker.isem_version import isem_version ## use 16 ##from egammaD3PDMaker.isem_version import isem_version ## use 16
...@@ -19,8 +17,6 @@ from ROOT import egammaPID ...@@ -19,8 +17,6 @@ from ROOT import egammaPID
import D3PDMakerCoreComps import D3PDMakerCoreComps
from D3PDMakerCoreComps.D3PDObject import D3PDObject from D3PDMakerCoreComps.D3PDObject import D3PDObject
from D3PDMakerCoreComps.IndexAssociation import IndexAssociation from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagEventInfoD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagEventInfoD3PDObject.py
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
## @date Nov, 2010 ## @date Nov, 2010
## ##
import D3PDMakerCoreComps
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject
def getJetTagEventInfoD3PDObject(level=1, **kw): def getJetTagEventInfoD3PDObject(level=1, **kw):
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from JetD3PDMaker.JetD3PDObject import getJetD3PDObject from JetD3PDMaker.JetD3PDObject import getJetD3PDObject
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from RecExConfig.RecFlags import rec
from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
from D3PDMakerCoreComps.IndexAssociation import IndexAssociation from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
import JetSubstructureD3PDMaker import JetSubstructureD3PDMaker
from D3PDMakerCoreComps.D3PDObject import make_SG_D3PDObject from D3PDMakerCoreComps.D3PDObject import make_SG_D3PDObject
import EventCommonD3PDMaker
#from JetTagD3PDMaker.AddBTagD3PDInfo import addBTagInfoToJetObject
from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
import JetTagD3PDMaker import JetTagD3PDMaker
...@@ -37,14 +33,14 @@ def AddHadronicInfo(obj, additionalMoments = [], theblockname = 'SubjetMomentsHa ...@@ -37,14 +33,14 @@ def AddHadronicInfo(obj, additionalMoments = [], theblockname = 'SubjetMomentsHa
def AddAssocJetsIndex(obj, jetassocname, jettarget, intermediate_names = [], level=0): def AddAssocJetsIndex(obj, jetassocname, jettarget, intermediate_names = [], level=0):
JetAssocTrack = IndexMultiAssociation(obj, _ = IndexMultiAssociation(obj,
JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool, JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,
jettarget,level = level, jettarget,level = level,
prefix=jetassocname+'_', prefix=jetassocname+'_',
blockname=jetassocname+'blockindex', blockname=jetassocname+'blockindex',
AssociationName = jetassocname , AssociationName = jetassocname ,
IntermediateAssociationNames=intermediate_names, IntermediateAssociationNames=intermediate_names,
OutputLevel=3 ) OutputLevel=3 )
def AddConstitIndex(object, typename='CaloCluster', target='cl_', myprefix='', level=0): def AddConstitIndex(object, typename='CaloCluster', target='cl_', myprefix='', level=0):
...@@ -64,7 +60,6 @@ def AddConstitIndex(object, typename='CaloCluster', target='cl_', myprefix='', l ...@@ -64,7 +60,6 @@ def AddConstitIndex(object, typename='CaloCluster', target='cl_', myprefix='', l
def AddConstitTruthIndex(object, typename='TruthParticle', level=0): def AddConstitTruthIndex(object, typename='TruthParticle', level=0):
import EventCommonD3PDMaker import EventCommonD3PDMaker
import D3PDMakerCoreComps
import TruthD3PDMaker import TruthD3PDMaker
ConstitAssoc = ContainedVectorMultiAssociation \ ConstitAssoc = ContainedVectorMultiAssociation \
(object, (object,
...@@ -74,10 +69,10 @@ def AddConstitTruthIndex(object, typename='TruthParticle', level=0): ...@@ -74,10 +69,10 @@ def AddConstitTruthIndex(object, typename='TruthParticle', level=0):
TypeName = typename, WriteWeight = False, TypeName = typename, WriteWeight = False,
level = level) level = level)
genpart = IndexAssociation (ConstitAssoc, _ = IndexAssociation (ConstitAssoc,
TruthD3PDMaker.TruthParticleGenParticleAssociationTool, TruthD3PDMaker.TruthParticleGenParticleAssociationTool,
TruthD3PDFlags.GenParticleAssocLabel(), TruthD3PDFlags.GenParticleAssocLabel(),
prefix='mcpart_') prefix='mcpart_')
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagJetD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagJetD3PDObject.py
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
import JetTagD3PDMaker import JetTagD3PDMaker
import D3PDMakerCoreComps import D3PDMakerCoreComps
from D3PDMakerCoreComps.D3PDObject import D3PDObject
from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
from AthenaCommon.AlgSequence import AlgSequence from AthenaCommon.AlgSequence import AlgSequence
from RecExConfig.ObjKeyStore import cfgKeyStore from RecExConfig.ObjKeyStore import cfgKeyStore
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
...@@ -53,11 +51,11 @@ def _jetFilterAlgHook (c, prefix, sgkey, ...@@ -53,11 +51,11 @@ def _jetFilterAlgHook (c, prefix, sgkey,
del filterargs['name'] del filterargs['name']
### if some argument do not exist set them to the flag values ### if some argument do not exist set them to the flag values
if not 'PtMinCut' in filterargs: if 'PtMinCut' not in filterargs:
filterargs['PtMinCut']=JetTagD3PDFlags.JetFilterPtMinCut() filterargs['PtMinCut']=JetTagD3PDFlags.JetFilterPtMinCut()
if not 'EtaCut' in filterargs: if 'EtaCut' not in filterargs:
filterargs['EtaCut']=JetTagD3PDFlags.JetFilterEtaCut() filterargs['EtaCut']=JetTagD3PDFlags.JetFilterEtaCut()
if not 'UseEMScale' in filterargs: if 'UseEMScale' not in filterargs:
filterargs['UseEMScale']=JetTagD3PDFlags.JetFilterUseEMScale() filterargs['UseEMScale']=JetTagD3PDFlags.JetFilterUseEMScale()
preseq += JetTagD3PDMaker.JetTagJetFilterAlg(algname, preseq += JetTagD3PDMaker.JetTagJetFilterAlg(algname,
...@@ -139,7 +137,7 @@ def getJetTagJetD3PDObject(filteredsgkey, origsgkey, level=4, prefix=None, ...@@ -139,7 +137,7 @@ def getJetTagJetD3PDObject(filteredsgkey, origsgkey, level=4, prefix=None,
**kw): **kw):
if prefix == None: if prefix is None:
import re import re
prefix = re.sub('Jets','',origsgkey) prefix = re.sub('Jets','',origsgkey)
prefix = re.sub('AOD','',prefix) prefix = re.sub('AOD','',prefix)
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagMETD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagMETD3PDObject.py
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
## @author Georges Aad ## @author Georges Aad
## @date Nov, 2010 ## @date Nov, 2010
## ##
import D3PDMakerCoreComps
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
import re import re
from MissingETD3PDMaker.MissingETD3PDObject import RefFinalMETD3PDObject from MissingETD3PDMaker.MissingETD3PDObject import RefFinalMETD3PDObject
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagMSVVtxInJetD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagMSVVtxInJetD3PDObject.py
...@@ -13,7 +13,6 @@ import JetTagD3PDMaker ...@@ -13,7 +13,6 @@ import JetTagD3PDMaker
import D3PDMakerCoreComps import D3PDMakerCoreComps
from D3PDMakerCoreComps.D3PDObject import D3PDObject from D3PDMakerCoreComps.D3PDObject import D3PDObject
from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
......
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagMuonInJetD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagMuonInJetD3PDObject.py
...@@ -18,7 +18,6 @@ import D3PDMakerCoreComps ...@@ -18,7 +18,6 @@ import D3PDMakerCoreComps
from D3PDMakerCoreComps.D3PDObject import D3PDObject from D3PDMakerCoreComps.D3PDObject import D3PDObject
from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
from D3PDMakerCoreComps.IndexAssociation import IndexAssociation from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagPhotonInJetD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagPhotonInJetD3PDObject.py
...@@ -7,14 +7,11 @@ ...@@ -7,14 +7,11 @@
## @date Nov, 2010 ## @date Nov, 2010
## ##
import JetTagD3PDMaker
import TrackD3PDMaker
import egammaD3PDMaker import egammaD3PDMaker
import EventCommonD3PDMaker import EventCommonD3PDMaker
import D3PDMakerCoreComps import D3PDMakerCoreComps
from D3PDMakerCoreComps.D3PDObject import D3PDObject from D3PDMakerCoreComps.D3PDObject import D3PDObject
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagPixModCondD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagPixModCondD3PDObject.py
...@@ -11,15 +11,11 @@ import JetTagD3PDMaker ...@@ -11,15 +11,11 @@ import JetTagD3PDMaker
import D3PDMakerCoreComps import D3PDMakerCoreComps
from D3PDMakerCoreComps.D3PDObject import D3PDObject from D3PDMakerCoreComps.D3PDObject import D3PDObject
from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
def _jetTagPixModCondAssocLevel (reqlev, args): def _jetTagPixModCondAssocLevel (reqlev, args):
if not args.has_key ('PixelSummarySvc') : if not args.has_key ('PixelSummarySvc') :
return False return False
if args['PixelSummarySvc'] == None: if args['PixelSummarySvc'] is None:
return False return False
return True return True
......
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagPrimaryVertexD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagPrimaryVertexD3PDObject.py
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
## @author Georges Aad ## @author Georges Aad
## @date Nov, 2010 ## @date Nov, 2010
## ##
import D3PDMakerCoreComps
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from TrackD3PDMaker.xAODVertexD3PDObject import BuildxAODVertexD3PDObject from TrackD3PDMaker.xAODVertexD3PDObject import BuildxAODVertexD3PDObject
from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
......
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
## @file JetTagD3PDMaker/python/JetTagTrackD3PDObject.py ## @file JetTagD3PDMaker/python/JetTagTrackD3PDObject.py
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
## @author Georges Aad ## @author Georges Aad
## @date Nov, 2010 ## @date Nov, 2010
## ##
import D3PDMakerCoreComps
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
from TrackD3PDMaker.xAODTrackD3PDObject import xAODTrackD3PDObject from TrackD3PDMaker.xAODTrackD3PDObject import xAODTrackD3PDObject
from RecExConfig.RecFlags import rec from RecExConfig.RecFlags import rec
...@@ -15,7 +13,6 @@ from RecExConfig.RecFlags import rec ...@@ -15,7 +13,6 @@ from RecExConfig.RecFlags import rec
from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
from TruthD3PDMaker.TruthD3PDMakerFlags import TruthD3PDFlags from TruthD3PDMaker.TruthD3PDMakerFlags import TruthD3PDFlags
from TruthD3PDMaker.TruthD3PDMakerKeys import TruthD3PDKeys
## configure TrackD3PDFlags before calling this function ## configure TrackD3PDFlags before calling this function
##eg: ##eg:
...@@ -45,7 +42,7 @@ def getJetTagTrackD3PDObject(level=20, **kw): ...@@ -45,7 +42,7 @@ def getJetTagTrackD3PDObject(level=20, **kw):
if not rec.doTruth: if not rec.doTruth:
TrackD3PDFlags.doTruth = False TrackD3PDFlags.doTruth = False
if TruthD3PDFlags.GenParticleAssocLabel() == None or TruthD3PDFlags.GenParticleAssocLabel() == "": if TruthD3PDFlags.GenParticleAssocLabel() is None or TruthD3PDFlags.GenParticleAssocLabel() == "":
TrackD3PDFlags.doTruth = False TrackD3PDFlags.doTruth = False
......
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