Skip to content
Snippets Groups Projects
Commit 52f34167 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'cleanup_D3PDMakerConfig' into 'master'

D3PDMakerConfig: package cleanup

See merge request atlas/athena!38124
parents cba9e58a 95b6af86
No related branches found
No related tags found
No related merge requests found
Showing
with 3 additions and 4585 deletions
##Creation: George Redlinger & David Cote, September 2010
##This file defines the SUSYEGAMMA stream and filters instances
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
#====================================================================
# Define the particle and event selections
#====================================================================
# from D2PDMaker.SUSYFilters import SetupEGammaStreamFilters
# acceptAlgs=SetupEGammaStreamFilters(topSequence)
from SUSYD3PDMaker.SUSYTriggerFilters import SetupSUSYTriggerFilters
acceptAlgs=SetupSUSYTriggerFilters(topSequence)
#====================================================================
# Define the test DPD output stream
#====================================================================
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
from D2PDMaker.D2PDHelpers import buildFileName
from D2PDMaker.D2PDFlags import D2PDFlags
# This stream HAS TO start with "StreamD2AODM_"! If the input was an (D)ESD(M), this should start with "StreamD2ESD(M)_".
# See this twiki for more information: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DPDNamingConvention
fileName = buildFileName( D2PDFlags.WriteDAOD_SUSYEGammaStream )
streamName = D2PDFlags.WriteDAOD_SUSYEGammaStream.StreamName
SUSYEGammaStream = MSMgr.NewPoolStream( streamName, fileName )
# Only events that pass the filters listed below are written out
# AcceptAlgs = logical OR of filters
# RequireAlgs = logical AND of filters
SUSYEGammaStream.AcceptAlgs( acceptAlgs )
#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
# are copied to the output file.
excludeList = []
excludeList = list(set(excludeList)) # This removes dublicates from the list
dpdOutput.addAllItemsFromInputExceptExcludeList( streamName, excludeList )
# You need to add your newly created output containers from above to the output stream
SUSYEGammaStream.AddItem( ['CompositeParticleContainer#*'] )
SUSYEGammaStream.AddItem( ['INav4MomLinkContainer#*'] )
##Creation: George Redlinger & David Cote, September 2010
##This file defines the SUSYJETS stream and filters instances
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
#====================================================================
# Define the particle and event selections
#====================================================================
#from D2PDMaker.SUSYFilters import SetupJetsStreamFilters
#acceptAlgs=SetupJetsStreamFilters(topSequence)
from SUSYD3PDMaker.SUSYTriggerFilters import SetupSUSYTriggerFilters
acceptAlgs=SetupSUSYTriggerFilters(topSequence)
#====================================================================
# Define the test DPD output stream
#====================================================================
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
from D2PDMaker.D2PDHelpers import buildFileName
from D2PDMaker.D2PDFlags import D2PDFlags
# This stream HAS TO start with "StreamD2AODM_"! If the input was an (D)ESD(M), this should start with "StreamD2ESD(M)_".
# See this twiki for more information: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DPDNamingConvention
fileName = buildFileName( D2PDFlags.WriteDAOD_SUSYJetsStream )
streamName = D2PDFlags.WriteDAOD_SUSYJetsStream.StreamName
SUSYJetStream = MSMgr.NewPoolStream( streamName, fileName )
# Only events that pass the filters listed below are written out
# AcceptAlgs = logical OR of filters
# RequireAlgs = logical AND of filters
SUSYJetStream.AcceptAlgs( acceptAlgs )
#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
# are copied to the output file.
excludeList = []
dpdOutput.addAllItemsFromInputExceptExcludeList( streamName, excludeList )
# You need to add your newly created output containers from above to the output stream
SUSYJetStream.AddItem( ['CompositeParticleContainer#*'] )
SUSYJetStream.AddItem( ['INav4MomLinkContainer#*'] )
##Creation: George Redlinger & David Cote, September 2010
##This file defines the SUSYMUONS stream and filters instances
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
#====================================================================
# Define the particle and event selections
#====================================================================
#from D2PDMaker.SUSYFilters import SetupMuonsStreamFilters
#acceptAlgs=SetupMuonsStreamFilters(topSequence)
from SUSYD3PDMaker.SUSYTriggerFilters import SetupSUSYTriggerFilters
acceptAlgs=SetupSUSYTriggerFilters(topSequence)
#====================================================================
# Define the test DPD output stream
#====================================================================
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
from D2PDMaker.D2PDHelpers import buildFileName
from D2PDMaker.D2PDFlags import D2PDFlags
# This stream HAS TO start with "StreamD2AODM_"! If the input was an (D)ESD(M), this should start with "StreamD2ESD(M)_".
# See this twiki for more information: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DPDNamingConvention
fileName = buildFileName( D2PDFlags.WriteDAOD_SUSYMuonsStream )
streamName = D2PDFlags.WriteDAOD_SUSYMuonsStream.StreamName
SUSYMuonStream = MSMgr.NewPoolStream( streamName, fileName )
# Only events that pass the filters listed below are written out
# AcceptAlgs = logical OR of filters
# RequireAlgs = logical AND of filters
SUSYMuonStream.AcceptAlgs( acceptAlgs )
#---------------------------------------------------
# Add the containers to the output stream
#---------------------------------------------------
from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
# Take all items from the input, except for the ones listed in the excludeList
# If the excludeList is empty, all containers from the input file (e.g. AOD)
# are copied to the output file.
excludeList = []
excludeList = list(set(excludeList)) # This removes dublicates from the list
dpdOutput.addAllItemsFromInputExceptExcludeList( streamName, excludeList )
# You need to add your newly created output containers from above to the output stream
SUSYMuonStream.AddItem( ['CompositeParticleContainer#*'] )
SUSYMuonStream.AddItem( ['INav4MomLinkContainer#*'] )
################################################################################ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Package: D3PDMakerConfig
################################################################################
# Declare the package name: # Declare the package name:
atlas_subdir( D3PDMakerConfig ) atlas_subdir( D3PDMakerConfig )
# 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 )
atlas_install_runtime( test/D3PDMakerConfig_TestConfiguration.xml )
atlas_install_scripts( scripts/D3PDSizeSummary.py ) atlas_install_scripts( scripts/D3PDSizeSummary.py )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
import copy
def getGroomedJetsConfig():
dictsConf = []
GroomedDictsTrimming = [
# { 'Type' : 'Trimming', 'args' : { 'SmallR' : 0.3, 'PtFrac' : 0.01} },
# { 'Type' : 'Trimming' , 'args' : {} }, # default ={ 'SmallR' : 0.3, 'PtFrac' : 0.03} },
#{ 'Type' : 'Trimming', 'args' : { 'SmallR' : 0.3, 'PtFrac' : 0.05, 'SaveSubjets' : True } },
{ 'Type' : 'Trimming', 'args' : { 'SmallR' : 0.3, 'PtFrac' : 0.05, 'SaveSubjets' : True, 'AreaCorr': True } },
# { 'Type' : 'Trimming', 'args' : { 'SmallR' : 0.2, 'PtFrac' : 0.01} },
# { 'Type' : 'Trimming', 'args' : { 'SmallR' : 0.2, 'PtFrac' : 0.03} },
# { 'Type' : 'Trimming', 'args' : { 'SmallR' : 0.2, 'PtFrac' : 0.05} }
]
GroomedDictsFiltering = [
#{ 'Type' : 'BDRSFiltering', 'args' : { 'minSplitR' : 0., 'massFraction' : 0.20 } },
#{ 'Type' : 'BDRSFiltering', 'args' : { 'minSplitR' : 0., 'massFraction' : 0.33 } },
{ 'Type' : 'BDRSFiltering', 'args' : { 'minSplitR' : 0., 'massFraction' : 0.67, 'SaveSubjets' : True } }
]
GroomedDictsPruning = [
{ 'Type' : 'Pruning', 'args' : { 'Name' : 'PrunedKt', 'RcutFactor' : 0.5, 'Zcut' : 0.05 } },
{ 'Type' : 'Pruning', 'args' : { 'Name' : 'PrunedKt', 'RcutFactor' : 0.5, 'Zcut' : 0.10 } },
{ 'Type' : 'Pruning', 'args' : { 'Name' : 'PrunedKt', 'RcutFactor' : 0.5, 'Zcut' : 0.15 } },
{ 'Type' : 'Pruning', 'args' : { 'Name' : 'PrunedKt', 'RcutFactor' : 1., 'Zcut' : 0.05 } },
{ 'Type' : 'Pruning', 'args' : { 'Name' : 'PrunedKt', 'RcutFactor' : 1., 'Zcut' : 0.10 } },
{ 'Type' : 'Pruning', 'args' : { 'Name' : 'PrunedKt', 'RcutFactor' : 1., 'Zcut' : 0.15 } }
]
# not needed anymore
#GroomedDictsKtSubJets = [ { 'Type' : 'KtSubJets' ,'args' : {} } ] # default = { 'NSubJets' : 3 } } ]
#### AntiKt R=1.0 ####
ParentDict = {
'JetFinder' : 'AntiKt',
'JetdR' : 1.0,
'JetInput' : 'Track',
}
dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsTrimming)] ]
##
ParentDict = {
'JetFinder' : 'AntiKt',
'JetdR' : 1.0,
'JetInput' : 'Truth',
}
dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsTrimming)] ]
##
ParentDict = {
'JetFinder' : 'AntiKt',
'JetdR' : 1.0,
'JetInput' : 'LCTopo',
}
dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsTrimming)] ]
#### C/A R=1.2####
ParentDict = {
'JetFinder' : 'CamKt',
'JetdR' : 1.2,
'JetInput' : 'Truth',
}
dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsFiltering)] ]
##
ParentDict = {
'JetFinder' : 'CamKt',
'JetdR' : 1.2,
'JetInput' : 'Track',
}
dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsFiltering)] ]
##
ParentDict = {
'JetFinder' : 'CamKt',
'JetdR' : 1.2,
'JetInput' : 'LCTopo',
}
dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsFiltering)] ]
#### AntiKt R=1.2 ####
#ParentDict = {
# 'JetFinder' : 'AntiKt',
# 'JetdR' : 1.2,
# 'JetInput' : 'Track',
# }
#dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsTrimming+GroomedDictsKtSubJets)] ]
##
#ParentDict = {
# 'JetFinder' : 'AntiKt',
# 'JetdR' : 1.2,
# 'JetInput' : 'Truth',
# }
#dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsTrimming+GroomedDictsKtSubJets)] ]
##
#ParentDict = {
# 'JetFinder' : 'AntiKt',
# 'JetdR' : 1.2,
# 'JetInput' : 'LCTopo',
# }
#dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsTrimming+GroomedDictsKtSubJets)] ]
#### C/A R=1.0####
#ParentDict = {
# 'JetFinder' : 'CamKt',
# 'JetdR' : 1.0,
# 'JetInput' : 'Truth',
# }
#dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsTrimming+GroomedDictsKtSubJets)] ]
##
#ParentDict = {
# 'JetFinder' : 'CamKt',
# 'JetdR' : 1.0,
# 'JetInput' : 'Track',
# }
#dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsTrimming+GroomedDictsKtSubJets)] ]
##
#ParentDict = {
# 'JetFinder' : 'CamKt',
# 'JetdR' : 1.0,
# 'JetInput' : 'LCTopo',
# }
#dictsConf += [ [ParentDict, copy.deepcopy(GroomedDictsTrimming+GroomedDictsKtSubJets)] ]
return dictsConf
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
from JetD3PDMaker.JetD3PDObject import getJetD3PDObject
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from RecExConfig.RecFlags import rec
from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
import JetSubstructureD3PDMaker
from D3PDMakerCoreComps.D3PDObject import make_SG_D3PDObject, make_SGDataVector_D3PDObject
import EventCommonD3PDMaker
from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
import JetTagD3PDMaker
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
def getJetCollectionD3PDObject(objectname = 'JetCollectionD3PDObject', prefix = 'jet_'):
return make_SG_D3PDObject('JetCollection','','jet_', objectname)
def AddUniqueMoments(obj, momlist, theblockname = 'ConfigParams', level = 0):
obj.defineBlock(level, theblockname, JetSubstructureD3PDMaker.JetMomentUniqueFillerTool, Moments = momlist, OutputLevel=3)
def AddLeptonicInfo(obj, level = 0):
############ Electron #####
IndJetElectronAssoc = IndexMultiAssociation(obj, JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,'el_',level = level,
prefix='Electron_', blockname='elecblockindex', AssociationName='jetsubstructure_electrons',
IndexedMoments=['contained'], IndexedMomentsSuffix = "_E" )
# IndexedMoments=['X', 'Y', 'Z','MINIISO', 'MINIISO10','DR','X_Prime', 'Y_Prime','Z_Prime', 'DR_Prime', 'contained']
############# Muon #########
IndJetMuonAssoc = IndexMultiAssociation(obj, JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,'mu_',level = level,
prefix='Muon_', blockname='muonblockindex', AssociationName='jetsubstructure_muons',
IndexedMoments=['contained'], IndexedMomentsSuffix = "_U")
# IndexedMoments=['X', 'Y', 'Z','MINIISO', 'MINIISO10','DR', 'X_Prime', 'Y_Prime','Z_Prime', 'DR_Prime','contained']
def AddTruthLeptonicInfo(object, typename='TruthParticle', target='mc_', level=0, extra_list_m=[]):
import TruthD3PDMaker
LeptAssoc = ContainedVectorMultiAssociation \
(object,
JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,
'Lepton_',
blockname=typename+'Leptonblockindex',
level = level, AssociationName='jetsubstructure_truthleptons', IndexedMoments=['contained'] + extra_list_m, IndexedMomentsSuffix = "_L")
genPart = SimpleAssociation(LeptAssoc,TruthD3PDMaker.TruthParticleGenParticleAssociationTool, blockname = 'TruthParticleGenParticleAssociationTool_AddTruthLeptonicInfo')
trupart2 = IndexAssociation (genPart, TruthD3PDMaker.GenParticleTruthParticleAssociationTool, blockname = 'GenParticleTruthParticleAssociationTool_AddTruthLeptonicInfo',
target = 'mc_',
Target = 'mc_')
def AddHadronicInfo(obj, additionalMoments = [], theblockname = 'SubjetMomentsHadronic', level=0):
from JetD3PDMaker import JetMomentFillerTool
obj.defineBlock(level, theblockname, JetMomentFillerTool,Moments= [] + additionalMoments)
def AddAssocJetsIndex(obj, jetassocname, jettarget, intermediate_names = [], level=0):
JetAssocTrack = IndexMultiAssociation(obj, JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,jettarget,level = level,
prefix=jetassocname+'_',
blockname=jetassocname+'blockindex', AssociationName = jetassocname , IntermediateAssociationNames=intermediate_names, OutputLevel=3 )
def AddConstitIndex(object, typename='CaloCluster', target='cl_lc_', level=0):
import EventCommonD3PDMaker
import D3PDMakerCoreComps
ConstitAssoc = ContainedVectorMultiAssociation \
(object,
EventCommonD3PDMaker.NavigableConstituentAssociationTool,
'constit_',
blockname=typename+'NavigableConstituentAssociationTool',
TypeName = typename, WriteWeight = True,
level = level)
ConstitAssoc.defineBlock (0, 'ConstitIndex'+typename, D3PDMakerCoreComps.IndexFillerTool, Target = target)
def AddAssocConstitIndex(object, typename='Analysis::Electron', target='el_', level=0):
import EventCommonD3PDMaker
import D3PDMakerCoreComps
ConstitAssoc = ContainedVectorMultiAssociation \
(object,
EventCommonD3PDMaker.NavigableConstituentAssociationTool,
'constit_'+target,
blockname=typename+'NavigableConstituentAssociationTool',
TypeName = typename, WriteWeight = True,
level = level)
ConstitAssoc.defineBlock (0, 'ConstitIndex'+typename, D3PDMakerCoreComps.IndexFillerTool, Target = target)
def AddConstitTruthIndex(object, typename='TruthParticle', target='mc_', level=0):
import EventCommonD3PDMaker
import D3PDMakerCoreComps
import TruthD3PDMaker
ConstitAssoc = ContainedVectorMultiAssociation \
(object,
EventCommonD3PDMaker.NavigableConstituentAssociationTool,
'constit_',
blockname=typename+'NavigableConstituentAssociationTool',
TypeName = typename, WriteWeight = False,
level = level)
genPart = SimpleAssociation(ConstitAssoc,TruthD3PDMaker.TruthParticleGenParticleAssociationTool)
trupart2 = IndexAssociation (genPart, TruthD3PDMaker.GenParticleTruthParticleAssociationTool,
target = 'mc_',
Target = 'mc_')
def AddBTaggingInfo(obj, level = 0, block_prefix = "my"):
obj.defineBlock(level,block_prefix+JetTagD3PDKeys.BTagWeightsBlockName(),
JetTagD3PDMaker.JetTagBTagWeightsFillerTool,
prefix=JetTagD3PDKeys.BTagWeightsPrefix(),
TaggerNames=JetTagD3PDFlags.Taggers())
#addBTagInfoToJetObject(obj,0)
def AddBTaggingInfoFromSubjets(obj, sj_assoc_name = 'SplitFiltSubjets', sj_prefix = "subjets", level=0):
t = ContainedVectorMultiAssociation(obj, JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,level = level, prefix= sj_prefix+"_",
blockname='blockbtag'+sj_assoc_name, nrowName = 'nsj', OutputLevel=3, AssociationName=sj_assoc_name, IntermediateAssociationNames=['Parent'])
#t.defineBlock(0, 'myKinematics', EventCommonD3PDMaker.FourMomFillerTool, WriteE = True)
AddBTaggingInfo(t, 0, "my"+sj_assoc_name)
myJSD3PD = []
def CommonJSD3PD(jetsToWrite, alg):
global myJSD3PD
if not alg:
raise TypeError("alg should be specified!")
jsD3PD=None
for val in myJSD3PD:
if val[0]==jetsToWrite:
print ("using existing JSD3PD")
jsD3PD=val[1]
break
if jsD3PD==None:
jsD3PD = JSD3PD_Tool(jetsToWrite)
myJSD3PD += [ (jetsToWrite, jsD3PD) ]
jsD3PD.addToAlg(alg)
class JSD3PD_Tool(object):
def __init__(self,jetsToWrite):
self.commonExcludeList = [] #'El02Match','Mu02Match','L1Info','L2Info','EFInfo']
self.commonIncludeList = ['El02Match','Mu02Match','L1Info','L2Info','EFInfo', 'SubjetMomentsHadronic']
MyJetD3PDObject = getJetD3PDObject(objectname='MyJetD3PDObject')
MyGroomedJetD3PDObject = getJetD3PDObject(objectname='MyGroomedJetD3PDObject')
import re
JetAlgPattern = re.compile(r'^(\D+)(\d{1,2})(\D+)Jets') #assuming standard notation
ars = JetAlgPattern.match(jetsToWrite[0]).groups()
self.parentJets = ''.join(ars) #remove the 'Jets' at the end
#global self.parentJets
self.groomedJetsList = jetsToWrite[1]
## Electron LC cluster overlap map
if ('LCTopo' in self.parentJets):
MyJetAssocD3PDObject = make_SGDataVector_D3PDObject('DataVector<INavigable4Momentum>', 'ElectronAODCollection_CaloCalTopoCluster_jetsubstructure_electrons', 'ElecTopoClusterAssoc_', 'myJetAssocD3PDObject')
AddAssocConstitIndex(MyJetAssocD3PDObject)
AddAssocConstitIndex(MyJetAssocD3PDObject, 'CaloCluster', 'cl_lc_')
#alg += MyJetAssocD3PDObject(0)
if 'Track' in self.parentJets:
AddConstitIndex(MyGroomedJetD3PDObject, typename='Rec::TrackParticle', target='trk')
AddConstitIndex(MyJetD3PDObject, typename='Rec::TrackParticle', target='trk')
#AddLeptonicInfo(MyJetD3PDObject,level=0)
#AddLeptonicInfo(MyGroomedJetD3PDObject,99)
elif 'Topo' in self.parentJets:
AddConstitIndex(MyGroomedJetD3PDObject)
AddConstitIndex(MyJetD3PDObject)
AddLeptonicInfo(MyJetD3PDObject, level=0)
AddLeptonicInfo(MyGroomedJetD3PDObject,99)
AddAssocJetsIndex(MyJetD3PDObject, 'TrackAssoc', 'trk')
AddAssocJetsIndex(MyGroomedJetD3PDObject, 'TrackAssoc', 'trk')
elif 'Truth' in self.parentJets:
AddConstitTruthIndex(MyJetD3PDObject)
AddConstitTruthIndex(MyGroomedJetD3PDObject)
AddTruthLeptonicInfo(MyJetD3PDObject, level=0)
AddTruthLeptonicInfo(MyGroomedJetD3PDObject, level=0)
if 'Track' not in self.parentJets and 'Truth' not in self.parentJets:
AddAssocJetsIndex(MyJetD3PDObject, 'TrackJets', 'jet_' + ars[0] + ars[1] + 'TrackZ_')
if rec.doTruth():
if self.parentJets == "AntiKt10LCTopo" or self.parentJets == "CamKt12LCTopo":
AddAssocJetsIndex(MyJetD3PDObject, 'TruthJets', 'jet_' + ars[0] + ars[1] + 'Truth_')
else :
AddAssocJetsIndex(MyJetD3PDObject, 'TruthJets', 'jet_' + ars[0] + ars[1] + 'Truth_')
#AddAssocJetsIndex(MyJetD3PDObject, 'TruthJets', 'jet_' + ars[0] + ars[1] + 'Truth_')
self.JetQualInclude = []
if 'Topo' in self.parentJets or 'LCTopo' in self.parentJets:
self.commonIncludeList += ['ConstituentScale', 'EMScale', 'EMFraction', 'JetSamplingsFrac'] #, 'El02Match', 'Mu02Match', 'L1Info', 'L2Info', 'EFInfo']
AddHadronicInfo(MyJetD3PDObject, ['OriginIndex','nTrk','sumPtTrk','EtaOrigin' , 'PhiOrigin' , 'MOrigin'], theblockname = 'OriginIndexBlock')
AddHadronicInfo(MyGroomedJetD3PDObject, ['EtaOrigin' , 'PhiOrigin' , 'MOrigin' ], theblockname = 'OriginIndexBlock')
if (self.parentJets == 'AntiKt10LCTopo') or (self.parentJets == 'CamKt12LCTopo'):
AddHadronicInfo(MyJetD3PDObject, ['LCJES', 'LCJES_EtaCorr', 'LCJES_MassCorr' ], theblockname='LCJESBlock')
AddHadronicInfo(MyGroomedJetD3PDObject, ['LCJES', 'LCJES_EtaCorr', 'LCJES_MassCorr' ], theblockname='LCJESBlock')
self.VtxInclude = []
#if 'Topo' in self.parentJets:
# self.VtxInclude += ['JVtx','JetVertexFraction']
self.VtxInclude += ['JVtx','JetVertexFraction']
tmpParentJets = self.parentJets.replace("JS", "")
AddAssocJetsIndex(MyGroomedJetD3PDObject, 'Parent', 'jet_' + tmpParentJets + '_')
for gr in self.groomedJetsList:
AddAssocJetsIndex(MyJetD3PDObject, gr, 'jet_' + tmpParentJets + gr + '_')
MyGroomedJetCollectionD3PDObject = getJetCollectionD3PDObject(objectname = "MyGroomedJetCollectionD3PDObject")
AddUniqueMoments(MyGroomedJetCollectionD3PDObject, ['SmallR','PtFrac', 'NSub'], theblockname = 'TrimConfigMoments', level=99)
AddUniqueMoments(MyGroomedJetCollectionD3PDObject, ['NSubjets','ktycut2','massFraction','minRfilt','minSplitR'], theblockname = 'FiltConfigMoments', level = 0)
AddHadronicInfo(MyGroomedJetD3PDObject, ['CORE_RBB','CORE_RFILT'], theblockname = 'FiltMoments', level=99)
AddHadronicInfo(MyGroomedJetD3PDObject, ['Tau1','Tau2','Tau3', 'WIDTH', 'SPLIT12', 'SPLIT23', 'SPLIT34', 'ZCUT12', 'ZCUT23', 'ZCUT34','Dip12', 'Dip13', 'Dip23','DipExcl12','PlanarFlow','Angularity','ActiveArea', 'ActiveArea_px', 'ActiveArea_py', 'ActiveArea_pz', 'ActiveArea_e', 'VoronoiArea', 'QW', 'PullMag', 'PullPhi', 'Pull_C00', 'Pull_C01', 'Pull_C10', 'Pull_C11'], theblockname = 'jsObsblock' )
AddHadronicInfo(MyJetD3PDObject, ['Tau1','Tau2','Tau3', 'WIDTH', 'SPLIT12', 'SPLIT23', 'SPLIT34', 'ZCUT12', 'ZCUT23', 'ZCUT34','Dip12', 'Dip13', 'Dip23','DipExcl12','PlanarFlow','Angularity','ActiveArea','ActiveArea_px', 'ActiveArea_py', 'ActiveArea_pz', 'ActiveArea_e','VoronoiArea', 'QW', 'PullMag', 'PullPhi', 'Pull_C00', 'Pull_C01', 'Pull_C10', 'Pull_C11'], theblockname = 'jsObsblock' )
#add area corrected kinematics for the groomed jets
from D3PDMakerConfig.CommonGroomedJetsConfig import getGroomedJetsConfig
dictsConfig = getGroomedJetsConfig()
from D3PDMakerConfig.CommonJSjets import buildName
self.AreaCorr = []
for dC in dictsConfig:
for l in dC[1]:
if 'AreaCorr' in l['args']:
if l['args']['AreaCorr']: self.AreaCorr.append(buildName(l))
if (self.AreaCorr) and ((self.parentJets == 'AntiKt10LCTopo') or (self.parentJets == 'CamKt12LCTopo')):
AddHadronicInfo(MyGroomedJetD3PDObject, ['m_areacorrected', 'pt_areacorrected', 'phi_areacorrected','eta_areacorrected', 'm_voronoiareacorrected', 'pt_voronoiareacorrected', 'phi_voronoiareacorrected','eta_voronoiareacorrected', 'm_voronoighostareacorrected', 'pt_voronoighostareacorrected', 'phi_voronoighostareacorrected','eta_voronoighostareacorrected'], theblockname = 'AreaCorrectedMoments', level=99)
## in groomedJetsList, subjets name should follow the name of the 'full/composite' jet.
for idx,gr in enumerate(self.groomedJetsList):
## names are unique
if 'KtSubjets' in gr:
#AddBTaggingInfoFromSubjets(MyGroomedJetD3PDObject, sj_assoc_name = gr, sj_prefix = gr, level = 99)
AddAssocJetsIndex(MyGroomedJetD3PDObject, gr, 'jet_' + tmpParentJets + gr + '_', intermediate_names = ['Parent'], level=99)
elif 'Subjets' in gr and idx != 0 and 'Subjets' not in self.groomedJetsList[idx-1]:
#AddBTaggingInfoFromSubjets(MyGroomedJetD3PDObject, sj_assoc_name = gr, sj_prefix = gr, level = 99)
AddAssocJetsIndex(MyGroomedJetD3PDObject, gr, 'jet_' + tmpParentJets + gr + '_', intermediate_names = ['Parent'], level=99)
if 'LCTopo' in self.parentJets:
AddBTaggingInfoFromSubjets(MyGroomedJetD3PDObject, sj_assoc_name = gr, sj_prefix = gr, level = 99)
elif 'Subjets' in gr:
raise ValueError("Subjets without full composite jet ?") ## not suppose to happen
self.MyJetD3PDObject = MyJetD3PDObject
self.MyGroomedJetD3PDObject = MyGroomedJetD3PDObject
self.MyGroomedJetCollectionD3PDObject = MyGroomedJetCollectionD3PDObject
if ('LCTopo' in self.parentJets):
self.MyJetAssocD3PDObject = MyJetAssocD3PDObject
def addToAlg(self,alg):
outputJetsName = self.parentJets
if(self.parentJets.find("JS")>-1):
#outputJetsName = self.parentJets.replace("JS", "")
pass
if ('LCTopo' in self.parentJets) and (not hasattr(alg, 'ElecTopoClusterAssoc_Filler')):
alg += self.MyJetAssocD3PDObject(0)
jet_suffix = 'Jets'
if 'Subjets' in self.parentJets:
jet_suffix = 'JetsReTagged'# replacing by NewJets
#jet_suffix = 'NewJets'
alg += self.MyJetD3PDObject(0, prefix='jet_' + outputJetsName.replace("JS", "") + '_', sgkey=self.parentJets+jet_suffix, exclude=self.commonExcludeList, include = self.commonIncludeList + self.VtxInclude + self.JetQualInclude + ['elecblockindex','muonblockindex', 'LCJESBlock', 'OriginIndexBlock'])
for idx,gr in enumerate(self.groomedJetsList):
kw = {}
includelist = []
includelist_unique = []
if 'Trim' in gr and 'Subjets' not in gr:
includelist_unique += ['TrimConfigMoments', 'blockindex']
if [x for x in self.AreaCorr if x in gr]:
includelist += ['AreaCorrectedMoments']
if len(self.groomedJetsList) > idx+1 and 'Subjets' in self.groomedJetsList[idx+1]:
includelist += [self.groomedJetsList[idx+1]+'blockindex']
#if 'LCTopo' in self.parentJets:
# includelist += ['blockbtag'+self.groomedJetsList[idx+1]]
elif 'Filt' in gr and 'Subjets' not in gr:
includelist += ['FiltMoments']
includelist_unique += ['FiltConfigMoments']
#if len(self.groomedJetsList) > idx+1 and 'Subjets' in self.groomedJetsList[idx+1]:
# includelist += ['blockbtag'+self.groomedJetsList[idx+1], self.groomedJetsList[idx+1]+'blockindex']
elif 'Subjets' in gr:
includelist += ['minSplitR']
if 'LCTopo' in self.parentJets:
includelist += [JetTagD3PDKeys.TruthInfoBlockName(), JetTagD3PDKeys.BTagWeightsBlockName()]
#kw[JetTagD3PDKeys.JetTrackAssocBlockName()+'_target']= "trk"
#kw[JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()+'_target']= "trk"
alg += self.MyGroomedJetD3PDObject(0, prefix='jet_' + outputJetsName.replace("JS", "") + gr + '_', sgkey=self.parentJets + gr + 'Jets', include = includelist + self.commonIncludeList + ['OriginIndexBlock','FiltMoments','LCJESBlock','minSplitR', 'elecblockindex', 'muonblockindex'],exclude=self.commonExcludeList,**kw)
alg += self.MyGroomedJetCollectionD3PDObject( 0, prefix='jet_' + outputJetsName.replace("JS", "") + gr + '_config_', sgkey=self.parentJets + gr + 'Jets', include = includelist_unique)
return
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
###############################################################
#
# JetTrackZClusterTool jobOptions file
# # PhysicsAnalysis/JetEtMissDPDModifier/share/JetTrackZClusterTool_jobOptions.py
# # https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/D3PDMaker/SUSYD3PDMaker/trunk/share/JetTrackZClusterTool_jobOptions.py
#==============================================================
#--------------------------------------------------------------
# JetTrackZClusterTool Options
#--------------------------------------------------------------
# Import configurable for tool
from JetRecTools.JetRecToolsConf import JetTrackZClusterTool
from JetRec.JetGetters import *
from JetRec.JetRecConf import *
def createJSTrackJets ( theseq, myjetfinder, myjetdr ):
# Setup tool so that it can be used
JS_MyJetTrackZClusterTool = JetTrackZClusterTool( "JS_JetTrackZClusterTool_%s%d" % (myjetfinder,myjetdr*10) )
JS_MyJetTrackZClusterTool.TrackJetMinMulti = 2
JS_MyJetTrackZClusterTool.TrackJetMinPt = 50000 # MeV
JS_MyJetTrackZClusterTool.UseVtxSeeding = True
JS_MyJetTrackZClusterTool.DeltaZRange = 10000.0
JS_MyJetTrackZClusterTool.TrackParticleContainerName = "TrackParticleCandidate"
JS_MyJetTrackZClusterTool.VxContainerName = "VxPrimaryCandidate"
JS_MyJetTrackZClusterTool.OutputLevel = 3
#--------------------------------------------------------------
# TrackSelector Tool Options
#--------------------------------------------------------------
from AthenaCommon.AppMgr import ToolSvc
from D3PDMakerConfig.CommonTrackJetSeletorTool import GetCachedTrackSelectorTool
if hasattr(ToolSvc, "CachedTrackSelectorTool"):
JS_MyJetTrackZClusterTool.TrackSelector = ToolSvc.CachedTrackSelectorTool
else:
JS_MyJetTrackZClusterTool.TrackSelector = GetCachedTrackSelectorTool()
#--------------------------------------------------------------
# JetFinder Tool Options (Anti-Kt)
#--------------------------------------------------------------
from JetRec.JetRecConf import JetFastJetFinderTool
myfastfinder = JetFastJetFinderTool("JS_%s%dTrackJetFinder" % (myjetfinder,myjetdr*10))
if myjetfinder == 'AntiKt':
myfastfinder.Algorithm = "anti-kt"
elif myjetfinder == 'CamKt':
myfastfinder.Algorithm = "cambridge"
myfastfinder.Radius = myjetdr
myfastfinder.RecombScheme = "E"
myfastfinder.Strategy = "Best"
myfastfinder.FailIfMisconfigured = True
myfastfinder.Inclusive = True
myfastfinder.CalculateJetArea = False
myfastfinder.StoreNFlipValues = 0
ToolSvc += myfastfinder
# Tell "TrackZClusterTool" to use this tool
JS_MyJetTrackZClusterTool.JetFinder = myfastfinder
#-------------------------------------------------------------
# Jet Getter
#-------------------------------------------------------------
JS_TrackZToolList = [JS_MyJetTrackZClusterTool,
JetSignalSelectorTool('JSTZ_JetFinalPtCut',UseTransverseMomentum = True,MinimumSignal= jetFlags.finalMinEt()),
JetSorterTool('JSTZ_JetSorter',SortOrder="ByPtDown") ]
mytrackzjetgetter = make_StandardJetGetter(myjetfinder, myjetdr,'TrackZ',seq = theseq, allTools = JS_TrackZToolList)
return mytrackzjetgetter
#==============================================================
#
# End of job options file
#
###############################################################
This diff is collapsed.
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
def GetCachedTrackSelectorTool():
from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
from AthenaCommon.AppMgr import ToolSvc
ToolSvc += InDet__InDetDetailedTrackSelectorTool( "MyDetailedTrackSelectorTool" )
ToolSvc.MyDetailedTrackSelectorTool.pTMin = 500 # MeV
ToolSvc.MyDetailedTrackSelectorTool.etaMax = 2.5
ToolSvc.MyDetailedTrackSelectorTool.nHitBLayer = 0
ToolSvc.MyDetailedTrackSelectorTool.nHitPix = 1
ToolSvc.MyDetailedTrackSelectorTool.nHitBLayerPlusPix = 0
ToolSvc.MyDetailedTrackSelectorTool.nHitSct = 6
ToolSvc.MyDetailedTrackSelectorTool.nHitSi = 7
ToolSvc.MyDetailedTrackSelectorTool.nHitTrt = 0
ToolSvc.MyDetailedTrackSelectorTool.IPd0Max = 1.5 # d0 cut
ToolSvc.MyDetailedTrackSelectorTool.IPz0Max = 1.5 # z0*sin(theta) cut
ToolSvc.MyDetailedTrackSelectorTool.z0Max = 200 # z0 cut
ToolSvc.MyDetailedTrackSelectorTool.fitChi2OnNdfMax = 10000 #3
ToolSvc.MyDetailedTrackSelectorTool.d0significanceMax = -1.
ToolSvc.MyDetailedTrackSelectorTool.z0significanceMax = -1.
ToolSvc.MyDetailedTrackSelectorTool.Extrapolator = ToolSvc.InDetExtrapolator
ToolSvc.MyDetailedTrackSelectorTool.OutputLevel = 3
from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool
atst = AtlasTrackSummaryTool()
ToolSvc += atst
ToolSvc.MyDetailedTrackSelectorTool.TrackSummaryTool = atst
from JetSubStructure.JetSubStructureConf import JetSubStructure__CachedTrackSelectorTool
ToolSvc += JetSubStructure__CachedTrackSelectorTool("CachedTrackSelectorTool")
ToolSvc.CachedTrackSelectorTool.TrackSelector = ToolSvc.MyDetailedTrackSelectorTool
return ToolSvc.CachedTrackSelectorTool
This diff is collapsed.
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# $Id: GenObjectsFilterTool.py 348268 2011-02-28 16:12:50Z krasznaa $
#
##
# @short Function returning a pre-configured instance of GenObjectsFilterTool
#
# This configuration of the tool lets the user select almost all particles
# from the truth record.
#
def CoreTruthFilterTool():
# Name for this tool instance:
toolName = "CoreTruthFilterTool"
# Instantiate the tool if necessary:
from AthenaCommon.AppMgr import ToolSvc
if not hasattr( ToolSvc, toolName ):
from TruthD3PDAnalysis.TruthD3PDAnalysisConf import D3PD__GenObjectsFilterTool
ToolSvc += D3PD__GenObjectsFilterTool( toolName )
# Get hold of the tool:
tool = getattr( ToolSvc, toolName )
# Set all of the tool's properties:
tool.PtMin = 100.0
tool.EtaMax = 5.0
tool.RemoveEmptyEvents = True
tool.RemoveDummyEvents = True
tool.RemoveInTimePileUp = True
tool.Remove2BCPileUp = True
tool.Remove800nsPileUp = True
tool.RemoveCavernBkg = False
tool.SelectTruthTracks = False
# Return this tool to the user:
return tool
...@@ -97,37 +97,6 @@ jobproperties.D3PDProdFlags.add_JobProperty (WriteMuonD3PD) ...@@ -97,37 +97,6 @@ jobproperties.D3PDProdFlags.add_JobProperty (WriteMuonD3PD)
listAllKnownD3PD.append (prodFlags.WriteMuonD3PD) listAllKnownD3PD.append (prodFlags.WriteMuonD3PD)
class WritePhysicsD3PD (JobProperty):
"""Produce the physics D3PD."""
statusOn = True
allowedTypes = ['bool']
StoredValue = False
StreamName = 'StreamNTUP_PHYSICS'
FileName = ''
isVirtual = False
DPDMakerScript = "D3PDMakerConfig/PhysicsD3PD_prodJobOFragment.py"
TreeNames = ['physics', 'physicsTrigDec']
SubSteps = ['a2d', 'e2d']
jobproperties.D3PDProdFlags.add_JobProperty (WritePhysicsD3PD)
listAllKnownD3PD.append (prodFlags.WritePhysicsD3PD)
class WriteLongLivedParticleD3PD (JobProperty):
"""Produce the Long Lived Particle D3PD."""
statusOn = True
allowedTypes = ['bool']
StoredValue = False
StreamName = 'StreamNTUP_SUSYLLP'
FileName = ''
isVirtual = False
DPDMakerScript = "LongLivedParticleD3PDMaker/LongLivedParticleD3PD_prodJob\
OFragment.py"
TreeNames = ['llp']
SubSteps = ['a2d', 'e2d']
jobproperties.D3PDProdFlags.add_JobProperty (WriteLongLivedParticleD3PD)
listAllKnownD3PD.append (prodFlags.WriteLongLivedParticleD3PD)
class WriteBackgroundD3PD (JobProperty): class WriteBackgroundD3PD (JobProperty):
"""Produce the Background D3PD.""" """Produce the Background D3PD."""
statusOn = True statusOn = True
...@@ -162,20 +131,6 @@ jobproperties.D3PDProdFlags.add_JobProperty (WriteTriggerD3PD) ...@@ -162,20 +131,6 @@ jobproperties.D3PDProdFlags.add_JobProperty (WriteTriggerD3PD)
listAllKnownD3PD.append (prodFlags.WriteTriggerD3PD) listAllKnownD3PD.append (prodFlags.WriteTriggerD3PD)
class WriteTrigMuonD3PD (JobProperty):
"""Produce the TrigMuon D3PD."""
statusOn = True
allowedTypes = ['bool']
StoredValue = False
StreamName = 'StreamNTUP_TRIGMU'
FileName = ''
isVirtual = False
DPDMakerScript = "TrigMuonD3PDMaker/TrigMuonD3PD_prodJobOFragment.py"
TreeNames = ['trigger']
SubSteps = ['e2d', 'a2d']
jobproperties.D3PDProdFlags.add_JobProperty (WriteTrigMuonD3PD)
listAllKnownD3PD.append (prodFlags.WriteTrigMuonD3PD)
# #
# #
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# $Id$
#
# @file GenericD3PDMaker/python/GenericTriggerBitsD3PDObject.py
# shamelessly copied by Gustaaf Brooijmans from SUSY:
# @author Bjorn H. Samset <b.h.samset@fys.uio.no>
# @date Jan, 2010
# @brief Define trigger bit blocks for Generic.
#
import D3PDMakerCoreComps
import TriggerD3PDMaker
from TriggerD3PDMaker.defineTriggerBits import defineTriggerBits
from D3PDMakerCoreComps.D3PDObject import make_Void_D3PDObject
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
#from SUSYD3PDMaker.SUSYD3PDFlags import SUSYD3PDFlags
# Create the object type.
GenericTriggerBitsD3PDObject = make_Void_D3PDObject( "", "GenericTriggerBitsD3PDObject",
"GenericTriggerBitsFiller" )
######
# Define blocks.
if D3PDMakerFlags.DoTrigger():
#-- for R&D NTUP_Generic{SKIM}, put level of detail at 10
defineTriggerBits (GenericTriggerBitsD3PDObject, 10,
['EF_.*'])
##Tau bits
defineTriggerBits (GenericTriggerBitsD3PDObject, 10,
['L1_Tau*',
'EF_Tau*',
'EF_mu4T*',
'EF_2mu4T*',
'EF_mu4Tmu6',
])
##for TAU group
defineTriggerBits (GenericTriggerBitsD3PDObject, 10,
['L1_J.*',
'L1_2J.*',
'L1_3J.*',
'L1_4J.*',
'EF_g.*',
'EF_2mu10.*',
'EF_xs.*'
])
##jet MET bits
defineTriggerBits (GenericTriggerBitsD3PDObject, 10,
[#Level1
'L1_J10',
'L1_J10_win6',
'L1_J15',
'L1_J20',
'L1_J30',
'L1_J50',
'L1_J75',
'L1_J175',
'L1_J250',
'L1_2J10_J50',
'L1_2J10_J75',
'L1_3J10',
'L1_3J15',
'L1_3J20',
'L1_3J50',
'L1_3J10_J50',
'L1_4J10',
'L1_4J15',
'L1_XE20',
'L1_XE25',
'L1_XE30',
'L1_XE35',
'L1_XE40',
'L1_XE50',
'L1_XE60',
'L1_XS15',
'L1_XS20',
'L1_XS25',
'L1_XS30',
'L1_XS35',
'L1_XS40',
'L1_XS45',
'L1_XS50',
'L1_JE100',
'L1_JE140',
'L1_JE200',
'L1_2J5',
'L1_2J10',
'L1_2J10_win6',
'L1_2J10_J30_JE140',
'L1_2J15',
'L1_J15_MV',
'L1_J15_LV',
'L1_J15_NL',
'L1_J50_XE20',
'L1_J50_XE25',
# 'L1_MBTS_A',
# 'L1_MBTS_C',
# 'L1_MBTS_1',
# 'L1_MBTS_2',
# 'L1_MBTS_1_1',
# 'L1_MBTSA0',
# 'L1_MBTSA1',
# 'L1_MBTSA2',
# 'L1_MBTSA3',
# 'L1_MBTSA4',
# 'L1_MBTSA5',
# 'L1_MBTSA6',
# 'L1_MBTSA7',
# 'L1_MBTSA8',
# 'L1_MBTSA9',
# 'L1_MBTSA10',
# 'L1_MBTSA11',
# 'L1_MBTSA12',
# 'L1_MBTSA13',
# 'L1_MBTSA14',
# 'L1_MBTSA15',
# 'L1_MBTSC0',
# 'L1_MBTSC0',
# 'L1_MBTSC1',
# 'L1_MBTSC2',
# 'L1_MBTSC3',
# 'L1_MBTSC4',
# 'L1_MBTSC5',
# 'L1_MBTSC6',
# 'L1_MBTSC7',
# 'L1_MBTSC8',
# 'L1_MBTSC9',
# 'L1_MBTSC10',
# 'L1_MBTSC11',
# 'L1_MBTSC12',
# 'L1_MBTSC13',
# 'L1_MBTSC14',
# 'L1_MBTSC15',
'L1_TE150',
'L1_TE360',
'L1_JE120',
'L1_JE280',
#Level 2
'L2_j25',
'L2_j35',
'L2_j50',
'L2_j70',
'L2_j95',
'L2_2b10_medium_L1JE100',
'L2_2b10_medium_L1JE140',
'L2_2b15_medium_3L1J15',
'L2_2b20_medium_3L1J20',
'L2_2b10_medium_4L1J10',
'L2_2b10_medium_L1_2J10J50',
'L2_3b10_loose_4L1J10',
'L2_3b15_loose_4L1J15',
'L2_2j25_j70',
'L2_2j25_j95',
'L2_3j25',
'L2_3j25_j70',
'L2_3j70',
'L2_4j25',
'L2_4j25',
'L2_5j25',
'L2_6j25',
'L2_xe10_noMu',
'L2_xe30_noMu',
'L2_xe35_noMu',
'L2_xe40_noMu',
'L2_xe50_noMu',
'L2_xe60_noMu',
'L2_xe70_noMu',
'L2_je255',
'L2_2j25_j70_anymct100',
#Event Filter
'EF_j10v3',
'EF_j20v2',
'EF_j40',
'EF_j80v2',
'EF_2j10',
'EF_2j20',
'EF_2j40',
'EF_2j10_deta3_5',
'EF_2j10_deta5',
'EF_2j20_deta3_5',
'EF_2j40_deta3_5',
'EF_j10_a4_EFFS',
'EF_j15_a4_EFFS',
'EF_j20_a4_EFFS',
'EF_j30_a4_EFFS',
'EF_j40_a4_EFFS',
'EF_j55_a4_EFFS',
'EF_j75_a4_EFFS',
'EF_j100_a4_EFFS',
'EF_j135_a4_EFFS',
'EF_j180_a4_EFFS',
'EF_j240_a4_EFFS',
'EF_L1J175_NoAlg',
'EF_L1J250_NoAlg',
'EF_3j30_a4_EFFS',
'EF_3j75_a4_EFFS',
'EF_4j30_a4_EFFS',
'EF_5j30_a4_EFFS',
'EF_6j30_a4_EFFS',
'EF_xe*',
'EF_xs*',
#'EF_xe20_noMu',
#'EF_xe25_noMu',
#'EF_xe30_noMu',
#'EF_xe40_noMu',
#'EF_xe50_noMu',
#'EF_xe60_noMu',
#'EF_xe70_noMu',
#'EF_xe80_noMu',
#'EF_xe90_noMu',
#'EF_jeXXX',
'EF_j120_j55_j40_a4_EFFS',
'EF_j75_a4_EFFS_jetNoEF_EFxe20_noMu',
'EF_j75_a4_EFFS_jetNoEF_EFxe25_noMu',
'EF_j75_a4_EFFS_xe40_loose_noMu',
'EF_j75_a4_EFFS_xe45_loose_noMu',
'EF_j75_a4_EFFS_xe50_loose_noMu',
'EF_j75_a4_EFFS_xe55_loose_noMu',
'EF_j75_a4_EFFS_xe60_loose_noMu',
'EF_j75_2j30_a4_EFFS_HT350',
'EF_j75_2j30_a4_EFFS_HT400',
'EF_j100_a4_EFFS_HT350',
'EF_j100_a4_EFFS_HT400',
'EF_j75_j30_a4_EFFS_L2anymct150',
'EF_j75_j30_a4_EFFS_L2anymct175',
'EF_j75_j30_a4_EFFS_anymct150',
'EF_j75_j30_a4_EFFS_anymct175',
'EF_j75_j30_a4_EFFS_leadingmct150',
'EF_j135_j30_a4_EFFS_dphi04',
'EF_j180_j30_a4_EFFS_dphi04',
'EF_SeededStreamerL1CaloXS',
# 2010 Items
'L1_J10',
'L1_J15',
'L1_J30',
'L1_J55',
'L1_J75',
'L1_2J10',
'L1_2J15',
'L1_3J10',
'L1_4J10',
'L1_J5',
'L1_J95',
'L1_J115',
'L1_2J10_J30',
'L1_2J10_J55',
'L1_2J15_J75',
'L2_2j25_j45_dphi03',
'L2_2j25_j70_dphi03',
'L2_2j30_j90_dphi03',
'L2_2j25_j45_anymct100',
'L2_2j25_j45_anymct150',
'L2_2j25_j45_anymct175',
'L2_2j30_anymct100',
'L2_2j30_anymct150',
'L2_2j30_anymct175',
'L2_2j25_j70_anymct150',
'L2_2j25_j70_anymct175',
'L2_2j25_j45_leadingmct100',
'L2_2j25_j45_leadingmct150',
'L2_2j25_j45_leadingmct175',
'L2_2j30_leadingmct100',
'L2_2j30_leadingmct175',
'L2_2j30_leadingmct150',
'L2_2j25_j70_leadingmct150',
'L2_2j25_j70_leadingmct175',
'EF_j75_jetNoEF_EFxe20_noMu',
'EF_j75_jetNoEF_EFxe25_noMu',
'EF_2j35_jetNoEF',
'EF_j35_jetNoEF',
'EF_j50_jetNoEF',
'EF_j75_jetNoEF',
'EF_j95_jetNoEF',
'EF_j115_jetNoEF',
'EF_j135_jetNoEF',
'EF_3j20',
'EF_j30_jetNoCut',
'EF_j35_jetNoCut',
'EF_j95_jetNoCut',
'EF_2j30_jetNoCut',
'EF_2j50_jetNoCut',
'EF_2j75_jetNoCut',
'EF_3j30_jetNoCut',
'EF_3j35_jetNoCut',
'EF_3j50_jetNoCut',
'EF_3j75_jetNoCut',
'EF_4j30_jetNoCut',
'EF_4j35_jetNoCut',
'EF_4j50_jetNoCut',
'EF_5j30_jetNoCut',
'EF_2j30_jetNoEF',
'EF_2j50_jetNoEF',
'EF_2j75_jetNoEF',
'EF_3j30_jetNoEF',
'EF_3j35_jetNoEF',
'EF_3j50_jetNoEF',
'EF_3j75_jetNoEF',
'EF_4j30_jetNoEF',
'EF_4j35_jetNoEF',
'EF_4j50_jetNoEF',
'EF_5j30_jetNoEF',
'EF_xe40',
'EF_xe25',
'EF_xe50',
'EF_xe80',
])
##bjet bits
defineTriggerBits (GenericTriggerBitsD3PDObject, 10,
[# Level 2
#Event Filter
'EF_b*',
'EF_2b*',
'EF_3b*',
#'EF_b10_tight_4L1J10',
#'EF_b10_tight_L1JE140',
#'EF_b10_loose_EFxe25_noMu_L1JE140',
#'EF_2b10_medium_4L1J10',
#'EF_2b10_medium_3L1J10',
#'EF_2b10_medium_L1JE140',
#'EF_2b20_medium_3L1J20',
#'EF_2b15_medium_3L1J15',
#'EF_3b10_loose_4L1J10',
#'EF_3b15_loose_4L1J15',
])
##egamma bits
defineTriggerBits (GenericTriggerBitsD3PDObject, 10,
[#Level 1
'L1_EM10',
'L1_EM12',
'L1_EM14',
'L1_EM16',
'L1_EM30',
'L1_2EM3',
'L1_2EM5',
'L1_2EM7',
'L1_2EM10',
'L1_2EM14',
'L1_3EM5',
'L1_2EM3_EM7',
# Level 2
'L2_e10_medium',
'L2_e15_medium',
'L2_e15_tight',
'L2_e20_loose',
'L2_e20_medium',
'L2_2e10_medium',
'L2_g10_loose',
'L2_g11_etcut',
'L2_g15_loose',
'L2_g20_etcut',
'L2_g20_loose',
'L2_g40_loose',
'L2_g60_loose',
'L2_g80_loose',
'L2_g150_etcut',
'L2_2g15_loose',
'L2_2g20_loose',
'L2_2e12_medium',
'L2_3e10_medium',
'L2_e60_loose',
'L2_e22_medium',
'L2_e20_medium1',
'L2_mu*',
'L2_2mu*',
#Event Filter
'EF_e*',
'EF_2e*',
'EF_g*',
'EF_2g*',
'EF_2e7T_medium1',
'EF_e12Tvh_loose1',
'EF_e12Tvh_medium1',
'EF_e18vh_medium1',
'EF_e7T_loose1',
'EF_2e7T_medium1_L2StarB_mu6',
'EF_e12Tvh_loose1_vbf_L1TAU11I_EM10VH_FJ15',
'EF_e12Tvh_loose1_vbf_L1TAU11I_EM10VH_J15CF',
#'EF_e10_loose',
#'EF_e10_medium',
#'EF_e15_medium',
#'EF_e15_tight',
#'EF_e20_loose',
#'EF_e20_medium',
#'EF_e20_medium1',
#'EF_2e10_medium',
#'EF_2e12_medium',
#'EF_3e10_medium',
#'EF_g10_loose',
#'EF_g11_etcut',
#'EF_g15_loose',
#'EF_g20_etcut',
#'EF_g20_loose',
#'EF_g40_loose',
#'EF_g40_loose_EFxe40_noMu',
#'EF_g40_tight',
#'EF_g60_loose',
#'EF_g80_loose',
#'EF_g150_etcut',
#'EF_2g15_loose',
#'EF_2g20_loose',
#'EF_g100_etcut_g50_etcut',
# 2010 Items
'EF_g17_etcut',
'EF_2e5_medium',
'L1_EM13I',
'L1_EM18',
'L1_EM18I',
'L1_EM23I',
'L1_EM100',
])
##muon bits
defineTriggerBits (GenericTriggerBitsD3PDObject, 10,
[#Level 1
'L1_MU0',
'L1_MU6',
'L1_MU10',
'L1_MU11',
'L1_MU15',
'L1_MU20',
'L1_2MU0',
'L1_2MU4',
'L1_2MU6',
'L1_2MU10',
#Level 2
'L2_mu10',
'L2_mu15',
'L2_mu20',
'L2_mu20_MSonly',
'L2_mu20_MSOnlyBarrel',
'L2_mu20_slow',
'L2_2mu4',
'L2_2mu10',
#'L2_2mu13',
'L2_2mu*',
'L2_mu13_MG',
'L2_mu13_MG',
'L2_mu22_MG',
'L2_mu20_MG',
'L2_mu18_MG',
#Event Filter
'EF_mu*',
'EF_2mu*',
'EF_mu4',
'EF_mu6',
'EF_mu10',
'EF_mu10_MSonly'
'EF_mu13',
'EF_mu13_MG',
'EF_mu13_tight',
'EF_mu15',
'EF_mu15i',
'EF_mu15_MG',
'EF_mu18',
'EF_mu18_MG',
'EF_mu20',
'EF_mu20i',
'EF_mu20_MG',
'EF_mu20_MSonly'
'EF_mu20_slow',
'EF_mu20i',
'EF_mu22',
'EF_mu22_MG',
'EF_mu40',
'EF_mu40_MSonly',
'EF_mu40_MSonly_barrel',
'EF_mu40_MSonly_tight',
'EF_mu40_MSonly_tighter',
'EF_2mu4',
'EF_2mu6',
'EF_2mu10',
'EF_2mu10_loose',
'EF_mu15_mu10_EFFS',
#'EF_2mu4T_DiMu_Barrel',
#'EF_2mu4T_DiMu_BarrelOnly',
#'EF_mu4Tmu6_DiMu_Barrel',
#'EF_mu4Tmu6_DiMu_noVtx_noOS',
'EF_3mu6',
'EF_3mu6_MSonly',
# 2010 Items
])
##mixed bits
defineTriggerBits (GenericTriggerBitsD3PDObject, 10,
[# Level 1
'L1_MU0_J5',
'L1_MU0_J10',
'L1_MU0_J40',
'L1_MU0_J70',
'L1_EM10_XE20',
# Level 2
'L2_mu4_j10',
'L2_mu4_j15',
'L2_mu4_j10_matched',
'L2_mu4_j20_matched',
'L2_mu4_j70_matched',
'L2_e15_medium_xe30_noMu',
'L2_e10_mu6',
# Event Filter
'EF_mu4_j10',
'EF_mu4_j20',
'EF_mu4_j10_matched',
'EF_mu4_j20_matched',
'EF_mu4_j40_matched',
'EF_mu4_j70_matched',
'EF_2mu6_MSonly_g10_loose',
'EF_e15_medium_xe30',
'EF_e10_mu6',
])
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from RecExConfig.RecFlags import rec
from AthenaCommon.SystemOfUnits import GeV
from AthenaPython.PyAthena import egammaPID
from MissingET.METRefGetter_plup import make_METRefAlg
from PhotonAnalysisUtils.PhotonNeuralNetworkTool import PhotonNeuralNetworkTool
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from AthenaCommon.AlgSequence import AlgSequence
from PhotonD3PDMaker.PhotonD3PDMakerFlags import PhotonD3PDMakerFlags
import D3PDMakerCoreComps
import PhotonD3PDMaker
import AthenaPython.PyAthena as PyAthena
PyAthena.load_library('egammaEnumsDict')
def PhotonCustomMET():
from AthenaCommon.AppMgr import ToolSvc
topSequence = AlgSequence()
photongetter = D3PDMakerCoreComps.SGDataVectorGetterTool('photonTight_Getter',
TypeName = 'PhotonContainer',
SGKey = D3PDMakerFlags.PhotonSGKey())
ToolSvc += photongetter
electrongetter = D3PDMakerCoreComps.SGDataVectorGetterTool('electronTight_Getter',
TypeName = 'ElectronContainer',
SGKey = D3PDMakerFlags.ElectronSGKey())
ToolSvc += electrongetter
# -------------------------------------------------------------------------------------------
# Filters for NN!!!
# add a filter to select NN tight photons
photonFilterNNTight = PhotonD3PDMaker.PhotonFilter(OutputCollectionName="SelectedPhotonsNNTight",
photonGetter = photongetter,
ptCut = 20000,
etaCut = 2.5,
IsEM = 0,
NNCut = True,
PhotonNNTool = PhotonNeuralNetworkTool())
topSequence += photonFilterNNTight
# add a filter to select normal electrons
electrongetter = D3PDMakerCoreComps.SGDataVectorGetterTool('electronNNTight_Getter',
TypeName = 'ElectronContainer',
SGKey = D3PDMakerFlags.ElectronSGKey())
ToolSvc += electrongetter
# add a filter that will create both photon and electron containers, with proper overlap removal (OR)
egammaORFilter_NN = PhotonD3PDMaker.EgammaFilter('egammaOR_Filter_NN',
OutputElectronCollectionName="SelectedORElectronsNNTight",
ElectronGetter = electrongetter,
ElectronPtCut = 10000,
ElectronEtaCut = 2.47,
ElectronIsEM = egammaPID.ElectronIDMediumPP,
OutputPhotonCollectionName="SelectedORPhotonsNNTight",
PhotonGetter = photongetter,
PhotonPtCut = 20000,
PhotonEtaCut = 2.37,
PhotonIsEM = 0,
PhotonNNCut = True,
PhotonNNTool = PhotonNeuralNetworkTool())
topSequence += egammaORFilter_NN
# add a filter that will create both photon and electron containers, with proper overlap removal (OR)
# but using standard Tight
egammaORFilter_tight = PhotonD3PDMaker.EgammaFilter('egamma_OR_Filter_tight',
OutputElectronCollectionName="SelectedORElectronsTight",
ElectronGetter = electrongetter,
ElectronPtCut = 10000,
ElectronEtaCut = 2.47,
ElectronIsEM = egammaPID.ElectronIDMediumPP,
OutputPhotonCollectionName="SelectedORPhotonsTight",
PhotonGetter = photongetter,
PhotonPtCut = 20000,
PhotonEtaCut = 2.37,
PhotonIsEM = egammaPID.PhotonIDTight,
PhotonNNCut = False,
PhotonNNTool = PhotonNeuralNetworkTool())
topSequence += egammaORFilter_tight
# add a filter that will create both photon and electron containers,
# with proper overlap removal (OR) but using standard Loose
egammaORFilter_loose = PhotonD3PDMaker.EgammaFilter('egamma_OR_Filter_loose',
OutputElectronCollectionName="SelectedORElectronsLoose",
ElectronGetter = electrongetter,
ElectronPtCut = 10000,
ElectronEtaCut = 2.47,
ElectronIsEM = egammaPID.ElectronIDMediumPP,
OutputPhotonCollectionName="SelectedORPhotonsLoose",
PhotonGetter = photongetter,
PhotonPtCut = 20000,
PhotonEtaCut = 2.37,
PhotonIsEM = egammaPID.PhotonIDLoose,
PhotonNNCut = False,
PhotonNNTool = PhotonNeuralNetworkTool())
topSequence += egammaORFilter_loose
# Toggle for setting some options that we used to enable for various STVF configurations,
# before the MET configuration changes in 17.2.7.4.1.
METcollections=[]
# Loose photons
suffix='_PhotonLoose_Calib_OR_stdvert'
MET_PhotonLoose_Calib_OR_stdvert = make_METRefAlg(_suffix=suffix)
MET_PhotonLoose_Calib_OR_stdvert.photon_doPhotonTool = True
MET_PhotonLoose_Calib_OR_stdvert.gamma_noCut = True
MET_PhotonLoose_Calib_OR_stdvert.gamma_EgammaInputCollectionKey = "SelectedORPhotonsLoose"
MET_PhotonLoose_Calib_OR_stdvert.gamma_EleInputCollectionKey = "SelectedORElectronsLoose"
MET_PhotonLoose_Calib_OR_stdvert.gamma_calibType = "RefCalib"
MET_PhotonLoose_Calib_OR_stdvert.ele_noCut = True
MET_PhotonLoose_Calib_OR_stdvert.ele_EgammaInputCollectionKey = "SelectedORElectronsLoose"
MET_PhotonLoose_Calib_OR_stdvert.ele_calibType = "RefCalib"
MET_PhotonLoose_Calib_OR_stdvert.jet_calibType = 'ExclRefCalib'
MET_PhotonLoose_Calib_OR_stdvert.jet_JetInputCollectionKey = "AntiKt4LCTopoNewJets"
MET_PhotonLoose_Calib_OR_stdvert.cellout_PUSuppression_JA = False
MET_PhotonLoose_Calib_OR_stdvert()
METcollections += [suffix]
# tight photons
suffix='_PhotonTight_Calib_OR_stdvert'
MET_PhotonTight_Calib_OR_stdvert = make_METRefAlg(_suffix=suffix)
MET_PhotonTight_Calib_OR_stdvert.photon_doPhotonTool = True
MET_PhotonTight_Calib_OR_stdvert.gamma_noCut = True
MET_PhotonTight_Calib_OR_stdvert.gamma_EgammaInputCollectionKey = "SelectedORPhotonsTight"
MET_PhotonTight_Calib_OR_stdvert.gamma_EleInputCollectionKey = "SelectedORElectronsTight"
MET_PhotonTight_Calib_OR_stdvert.gamma_calibType = "RefCalib"
MET_PhotonTight_Calib_OR_stdvert.ele_noCut = True
MET_PhotonTight_Calib_OR_stdvert.ele_EgammaInputCollectionKey = "SelectedORElectronsTight"
MET_PhotonTight_Calib_OR_stdvert.ele_calibType = "RefCalib"
MET_PhotonTight_Calib_OR_stdvert.jet_calibType = 'ExclRefCalib'
MET_PhotonTight_Calib_OR_stdvert.jet_JetInputCollectionKey = "AntiKt4LCTopoNewJets"
MET_PhotonTight_Calib_OR_stdvert.cellout_PUSuppression_JA = False
MET_PhotonTight_Calib_OR_stdvert()
METcollections += [suffix]
# NNTight photons
suffix = '_NNTight_Calib_OR_stdvert'
MET_NNTight_Calib_OR_stdvert = make_METRefAlg(_suffix=suffix)
MET_NNTight_Calib_OR_stdvert.photon_doPhotonTool = True
MET_NNTight_Calib_OR_stdvert.gamma_noCut = True
MET_NNTight_Calib_OR_stdvert.gamma_EgammaInputCollectionKey = "SelectedORPhotonsNNTight"
MET_NNTight_Calib_OR_stdvert.gamma_EleInputCollectionKey = "SelectedORElectronsNNTight"
MET_NNTight_Calib_OR_stdvert.gamma_calibType = "RefCalib"
MET_NNTight_Calib_OR_stdvert.ele_noCut = True
MET_NNTight_Calib_OR_stdvert.ele_EgammaInputCollectionKey = "SelectedORElectronsNNTight"
MET_NNTight_Calib_OR_stdvert.ele_calibType = "RefCalib"
MET_NNTight_Calib_OR_stdvert.jet_calibType = 'ExclRefCalib'
MET_NNTight_Calib_OR_stdvert.jet_JetInputCollectionKey = "AntiKt4LCTopoNewJets"
MET_NNTight_Calib_OR_stdvertcellout_PUSuppression_JA = False
MET_NNTight_Calib_OR_stdvert()
METcollections += [suffix]
#return METcollections
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
from MissingETD3PDMaker.MissingETD3PDMakerFlags import MissingETD3PDMakerFlags
from MissingETD3PDMaker.MissingETD3PDObject import MissingETD3PDObject
from MissingETD3PDMaker.MissingETD3PDObject import MissingETCompositionD3PDObject
from MissingETD3PDMaker.MissingETGoodnessD3PDObject import MissingETGoodnessD3PDObject
from SUSYD3PDMaker.SUSYD3PDFlags import SUSYD3PDFlags
#from MissingET.METRefGetter_new import *
from MissingET.METRefGetter_plup import *
from RecExConfig.RecFlags import rec
##############################################################################################################
##############################################################################################################
##############################################################################################################
def addSUSYCustomMissingET( topSequence ):
#--------------------------------------
# recalculate MET_RefFinal for studies
#--------------------------------------
#-- MET_RefFinal with no taus : PU suppressed MET also calculated.
newRefFinal_Egamma10NoTau_alg = make_METRefAlg(_suffix='_Egamma10NoTau')
newRefFinal_Egamma10NoTau_alg.tau_doTauTool = False
newRefFinal_Egamma10NoTau_alg.cellout_calibType = "Eflow"
newRefFinal_Egamma10NoTau_alg.jet_calibType = 'ExclRefCalib'
newRefFinal_Egamma10NoTau_alg.jet_JetInputCollectionKey = "AntiKt4LCTopoNewJets"
newRefFinal_Egamma10NoTau_alg.cellout_PUSuppression_JA = True
newRefFinal_Egamma10NoTau_alg()
# below not need anymore
#if(SUSYD3PDFlags.FixMCTruthBug()): jetSGKey_TopoEM = 'AntiKt4TopoEMJetsAOD'
#else: jetSGKey_TopoEM = 'AntiKt4TopoEMJets'
#if(SUSYD3PDFlags.do01LepFactoryNtuple() or SUSYD3PDFlags.do23Lep1TauFactoryNtuple() or SUSYD3PDFlags.doRazorFactoryNtuple()):
# simp20_alg = make_METRefAlg(_suffix='_Simplified20')
# simp20_alg.jet_JetInputCollectionKey = jetSGKey_TopoEM
# simp20_alg.jet_JetPtCut = 20.0*GeV
# simp20_alg.ele_EtCut = 20.0*GeV
# simp20_alg.jet_ApplyJetScale = "Yes"
# simp20_alg.jet_UseJetMomentForScale = True
# simp20_alg.jet_JetMomentForScale = "EMJES"
# simp20_alg.jet_RunSoftJetsTool = False
# simp20_alg.jet_SoftJetsPtCut = 7.0*GeV
# simp20_alg.jet_SoftJetsMaxPtCut = 20.0*GeV
# simp20_alg.photon_doPhotonTool = False
# simp20_alg.tau_doTauTool = False
# simp20_alg.jet_SoftJetsCalibType = "EmScale"
# simp20_alg.jet_ApplySoftJetsScale = "No"
# simp20_alg.jet_calibType ='EmScale'
# simp20_alg.ele_calibType ='RefCalib'
# simp20_alg.gamma_calibType ='EmScale'
# simp20_alg.cellout_calibType ='EmScale'
# simp20_alg.tau_calibType ='EmScale'
# simp20_alg.cryo_ApplyCorrection = "Off"
# simp20_alg.muon_container = "StacoMuonCollection"
# simp20_alg.muon_algorithm = "Staco"
# simp20_alg.muon_isolationAlg = "dRJet"
# simp20_alg()
# exactly the same as Simplified20, only the ele_EtCut is 10 GeV (below) vs 20 GeV (Simplified20)
# simp20Elec10_alg = make_METRefAlg(_suffix='_Simplified20Elec10')
# simp20Elec10_alg.jet_JetInputCollectionKey = jetSGKey_TopoEM
# simp20Elec10_alg.jet_JetPtCut = 20.0*GeV
# simp20Elec10_alg.ele_EtCut = 10.0*GeV # this is default, but writing here to be explicit
# simp20Elec10_alg.jet_ApplyJetScale = "Yes"
# simp20Elec10_alg.jet_UseJetMomentForScale = True
# simp20Elec10_alg.jet_JetMomentForScale = "EMJES"
# simp20Elec10_alg.jet_RunSoftJetsTool = False
# simp20Elec10_alg.jet_SoftJetsPtCut = 7.0*GeV
# simp20Elec10_alg.jet_SoftJetsMaxPtCut = 20.0*GeV
# simp20Elec10_alg.photon_doPhotonTool = False
# simp20Elec10_alg.tau_doTauTool = False
# simp20Elec10_alg.jet_SoftJetsCalibType = "EmScale"
# simp20Elec10_alg.jet_ApplySoftJetsScale = "No"
# simp20Elec10_alg.jet_calibType ='EmScale'
# simp20Elec10_alg.ele_calibType ='RefCalib'
# simp20Elec10_alg.gamma_calibType ='EmScale'
# simp20Elec10_alg.cellout_calibType ='EmScale'
# simp20Elec10_alg.tau_calibType ='EmScale'
# simp20Elec10_alg.cryo_ApplyCorrection = "Off"
# simp20Elec10_alg.muon_container = "StacoMuonCollection"
# simp20Elec10_alg.muon_algorithm = "Staco"
# simp20Elec10_alg.muon_isolationAlg = "dRJet"
# simp20Elec10_alg()
# exactly the same as Simplified20Elec10, only including Tau's
# simp20Elec10WithTaus_alg = make_METRefAlg(_suffix='_Simplified20Elec10WithTaus')
# simp20Elec10WithTaus_alg.jet_JetInputCollectionKey = jetSGKey_TopoEM
# simp20Elec10WithTaus_alg.jet_JetPtCut = 20.0*GeV
# simp20Elec10WithTaus_alg.ele_EtCut = 10.0*GeV # this is default, but writing here to be explicit
# simp20Elec10WithTaus_alg.jet_ApplyJetScale = "Yes"
# simp20Elec10WithTaus_alg.jet_UseJetMomentForScale = True
# simp20Elec10WithTaus_alg.jet_JetMomentForScale = "EMJES"
# simp20Elec10WithTaus_alg.jet_RunSoftJetsTool = False
# simp20Elec10WithTaus_alg.jet_SoftJetsPtCut = 7.0*GeV
# simp20Elec10WithTaus_alg.jet_SoftJetsMaxPtCut = 20.0*GeV
# simp20Elec10WithTaus_alg.photon_doPhotonTool = False
# simp20Elec10WithTaus_alg.tau_doTauTool = True
# simp20Elec10WithTaus_alg.jet_SoftJetsCalibType = "EmScale"
# simp20Elec10WithTaus_alg.jet_ApplySoftJetsScale = "No"
# simp20Elec10WithTaus_alg.jet_calibType ='EmScale'
# simp20Elec10WithTaus_alg.ele_calibType ='RefCalib'
# simp20Elec10WithTaus_alg.gamma_calibType ='EmScale'
# simp20Elec10WithTaus_alg.cellout_calibType ='EmScale'
# simp20Elec10WithTaus_alg.cryo_ApplyCorrection = "Off"
# simp20Elec10WithTaus_alg.muon_container = "StacoMuonCollection"
# simp20Elec10WithTaus_alg.muon_algorithm = "Staco"
# simp20Elec10WithTaus_alg.muon_isolationAlg = "dRJet"
# simp20Elec10WithTaus_alg()
#if SUSYD3PDFlags.doLArHoleFix() and False:
# metLArFix_alg = make_METRefAlg(_suffix='_LArFixSimp20')
# metLArFix_alg.jet_JetInputCollectionKey = "AntiKtTopoEMJetsLArFix"
# metLArFix_alg.jet_JetPtCut = 20.0*GeV
# metLArFix_alg.ele_EtCut = 20.0*GeV
# metLArFix_alg.jet_ApplyJetScale = "Yes"
# metLArFix_alg.jet_UseJetMomentForScale = True
# metLArFix_alg.jet_JetMomentForScale = "EMJES"
# metLArFix_alg.jet_RunSoftJetsTool = False
# metLArFix_alg.jet_SoftJetsPtCut = 7.0*GeV
# metLArFix_alg.jet_SoftJetsMaxPtCut = 20.0*GeV
# metLArFix_alg.photon_doPhotonTool = False
# metLArFix_alg.tau_doTauTool = False
# metLArFix_alg.jet_SoftJetsCalibType = "EmScale"
# metLArFix_alg.jet_ApplySoftJetsScale = "No"
# metLArFix_alg.jet_calibType ='EmScale'
# metLArFix_alg.ele_calibType ='RefCalib'
# metLArFix_alg.gamma_calibType ='EmScale'
# metLArFix_alg.cellout_calibType ='EmScale'
# metLArFix_alg.tau_calibType ='EmScale'
# metLArFix_alg.cryo_ApplyCorrection = "Off"
# metLArFix_alg.muon_container = "StacoMuonCollection"
# metLArFix_alg.muon_algorithm = "Staco"
# metLArFix_alg.muon_isolationAlg = "dRJet"
# metLArFix_alg()
# topSequence.METRefAlg_LArFixSimp20.METRefCluster_LArFixSimp20.ClusterInputCollectionKey = 'SUSYClusterCandidate'
return
This diff is collapsed.
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#
# @file egammaD3PDMaker/python/createTrackJets.py
# @author Mike Flowerdew
# @date Nov, 2010
# @brief Create track jet collection
#
from JetRec.JetGetters import *
def createTrackJets (seq):
from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
theEGammaTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(
name = "egammaTrackJetTrackSelectorTool",
pTMin = 300.,
etaMax = 9999.,
nHitBLayer = 0,
nHitPix = 0,
nHitBLayerPlusPix = 0,
nHitSct = 0,
nHitSi = 5,
nHitTrt = 0,
IPd0Max = 100., # d0 cut
IPz0Max = 100., # z0*sin(theta) cut
z0Max = 1000., # z0 cut
fitChi2OnNdfMax = 1000,
d0significanceMax = -1.,
z0significanceMax = -1.,
TrackSummaryTool = None,
OutputLevel = 3)
from AthenaCommon.AppMgr import ToolSvc
ToolSvc += theEGammaTrackSelectorTool
# JetFinder (Anti-Kt)
import JetRec.JetFinderConfig as thebtagJetFinder
theEGammaFastJetKt = thebtagJetFinder.getFastKt(jetalgname = "egammaTrackJetFinder",
radius = 0.5,
algorithm = 'anti-kt',
flipvalues = 2)
ToolSvc += theEGammaFastJetKt
# Setup clustering tool
from JetRecTools.JetRecToolsConf import JetTrackZClusterTool
egammaTrackZClusterTool = JetTrackZClusterTool(
name = "egammaTrackZClusterTool",
TrackJetMinMulti = 2,
TrackJetMinPt = 2000.,
UseVtxSeeding = True,
DeltaZRange = 10000.0,
TrackParticleContainerName = "TrackParticleCandidate",
VxContainerName = "VxPrimaryCandidate",
TrackSelector = theEGammaTrackSelectorTool,
JetFinder = theEGammaFastJetKt,
OutputLevel = 3)
egammaToolList = [ egammaTrackZClusterTool,
JetSorterTool (SortOrder = 'ByEtDown') ]
make_StandardJetGetter('AntiKt', 0.5, 'Track', seq,
outputCollectionName = 'AntiKtZ5TrackJets',
allTools = egammaToolList)
return
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# $Id$
# #
# @file D3PDMakerConfig/python/egammaD3PD.py # @file D3PDMakerConfig/python/egammaD3PD.py
# @author scott snyder <snyder@bnl.gov> # @author scott snyder <snyder@bnl.gov>
...@@ -9,7 +8,6 @@ ...@@ -9,7 +8,6 @@
# #
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
from D3PDMakerCoreComps.resolveSGKey import testSGKey
from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject
from egammaD3PDMaker.ElectronD3PDObject import ElectronD3PDObject from egammaD3PDMaker.ElectronD3PDObject import ElectronD3PDObject
from egammaD3PDMaker.PhotonD3PDObject import PhotonD3PDObject from egammaD3PDMaker.PhotonD3PDObject import PhotonD3PDObject
......
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