Verified Commit e551aedf authored by Tadej Novak's avatar Tadej Novak
Browse files

JetAnalysisAlgorithms WIP

parent e95b7580
......@@ -41,48 +41,45 @@ atlas_install_joboptions( share/*_jobOptions.py )
atlas_install_scripts( share/*_eljob.py )
if( XAOD_STANDALONE )
#TODO: These tests are temporarily disabled AnalysisBase for migration from R21 to R22.
# They need to be updated to Python 3 to be re-ennabled.
#
# atlas_add_test( testJobDataEMTopo
# SCRIPT JetAnalysisAlgorithmsTest_EMTopo_eljob.py --data-type data --unit-test
# PROPERTIES TIMEOUT 600 )
# atlas_add_test( testJobDataPFlow
# SCRIPT JetAnalysisAlgorithmsTest_PFlow_eljob.py --data-type data --unit-test
# PROPERTIES TIMEOUT 600 )
# atlas_add_test( testJobFullSimEMTopo
# SCRIPT JetAnalysisAlgorithmsTest_EMTopo_eljob.py --data-type mc --unit-test
# PROPERTIES TIMEOUT 600 )
# atlas_add_test( testJobFullSimPFlow
# SCRIPT JetAnalysisAlgorithmsTest_PFlow_eljob.py --data-type mc --unit-test
# PROPERTIES TIMEOUT 600 )
# atlas_add_test( testJobFastSimEMTopo
# SCRIPT JetAnalysisAlgorithmsTest_EMTopo_eljob.py --data-type afii --unit-test
# PROPERTIES TIMEOUT 600 )
# atlas_add_test( testJobFastSimPFlow
# SCRIPT JetAnalysisAlgorithmsTest_PFlow_eljob.py --data-type afii --unit-test
# PROPERTIES TIMEOUT 600 )
else()
atlas_add_test( testJobDataEMTopo
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py - --data-type data
# atlas_add_test( testJobDataEMTopo
# SCRIPT JetAnalysisAlgorithmsTest_EMTopo_eljob.py --data-type data --unit-test
# PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobDataPFlow
SCRIPT JetAnalysisAlgorithmsTest_PFlow_eljob.py --data-type data --unit-test
PROPERTIES TIMEOUT 600 )
# atlas_add_test( testJobFullSimEMTopo
# SCRIPT JetAnalysisAlgorithmsTest_EMTopo_eljob.py --data-type mc --unit-test
# PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobFullSimPFlow
SCRIPT JetAnalysisAlgorithmsTest_PFlow_eljob.py --data-type mc --unit-test
PROPERTIES TIMEOUT 600 )
# atlas_add_test( testJobFastSimEMTopo
# SCRIPT JetAnalysisAlgorithmsTest_EMTopo_eljob.py --data-type afii --unit-test
# PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobFastSimPFlow
SCRIPT JetAnalysisAlgorithmsTest_PFlow_eljob.py --data-type afii --unit-test
PROPERTIES TIMEOUT 600 )
else()
# atlas_add_test( testJobDataEMTopo
# SCRIPT athena.py
# JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py - --data-type data
# PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobDataPFlow
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_PFlow_jobOptions.py - --data-type data
PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobFullSimEMTopo
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py - --data-type mc
PROPERTIES TIMEOUT 600 )
# atlas_add_test( testJobFullSimEMTopo
# SCRIPT athena.py
# JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py - --data-type mc
# PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobFullSimPFlow
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_PFlow_jobOptions.py - --data-type mc
PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobFastSimEMTopo
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py - --data-type afii
PROPERTIES TIMEOUT 600 )
# atlas_add_test( testJobFastSimEMTopo
# SCRIPT athena.py
# JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py - --data-type afii
# PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobFastSimPFlow
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_PFlow_jobOptions.py - --data-type afii
......
......@@ -18,11 +18,11 @@ def makeSequence (dataType, jetContainer="AntiKt4EMPFlowJets") :
algSeq += sysLoader
# Include, and then set up the pileup analysis sequence:
from AsgAnalysisAlgorithms.PileupAnalysisSequence import \
makePileupAnalysisSequence
pileupSequence = makePileupAnalysisSequence( dataType )
pileupSequence.configure( inputName = 'EventInfo', outputName = 'EventInfo_%SYS%' )
print( pileupSequence ) # For debugging
# from AsgAnalysisAlgorithms.PileupAnalysisSequence import \
# makePileupAnalysisSequence
# pileupSequence = makePileupAnalysisSequence( dataType )
# pileupSequence.configure( inputName = 'EventInfo', outputName = 'EventInfo_%SYS%' )
# print( pileupSequence ) # For debugging
# Include, and then set up the jet analysis algorithm sequence:
from JetAnalysisAlgorithms.JetAnalysisSequence import makeJetAnalysisSequence
......@@ -31,18 +31,18 @@ def makeSequence (dataType, jetContainer="AntiKt4EMPFlowJets") :
print( jetSequence ) # For debugging
# Include, and then set up the jet analysis algorithm sequence:
from JetAnalysisAlgorithms.JetJvtAnalysisSequence import makeJetJvtAnalysisSequence
jvtSequence = makeJetJvtAnalysisSequence( dataType, jetContainer, enableCutflow=True )
jvtSequence.configure( inputName = { 'eventInfo' : 'EventInfo_%SYS%',
'jets' : 'AnalysisJetsBase_%SYS%' },
outputName = { 'jets' : 'AnalysisJets_%SYS%' },
affectingSystematics = { 'jets' : jetSequence.affectingSystematics() } )
print( jvtSequence ) # For debugging
# from JetAnalysisAlgorithms.JetJvtAnalysisSequence import makeJetJvtAnalysisSequence
# jvtSequence = makeJetJvtAnalysisSequence( dataType, jetContainer, enableCutflow=True )
# jvtSequence.configure( inputName = { 'eventInfo' : 'EventInfo_%SYS%',
# 'jets' : 'AnalysisJetsBase_%SYS%' },
# outputName = { 'jets' : 'AnalysisJets_%SYS%' },
# affectingSystematics = { 'jets' : jetSequence.affectingSystematics() } )
# print( jvtSequence ) # For debugging
# Add the sequences to the job:
algSeq += pileupSequence
# algSeq += pileupSequence
algSeq += jetSequence
algSeq += jvtSequence
# algSeq += jvtSequence
# Set up an ntuple to check the job with:
treeMaker = createAlgorithm( 'CP::TreeMakerAlg', 'TreeMaker' )
......
......@@ -161,8 +161,8 @@ def makeJetAnalysisSequence( dataType, jetCollection, postfix = '',
def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollection,
jetInput, postfix = '',
runJvtUpdate = True, runFJvtUpdate = True,
runJvtSelection = True, runFJvtSelection = True,
runJvtUpdate = False, runFJvtUpdate = False,
runJvtSelection = True, runFJvtSelection = False,
runJvtEfficiency = True, runFJvtEfficiency = True,
reduction = "Global", JEROption = "Simple"):
"""Add algorithms for the R=0.4 jets.
......@@ -207,6 +207,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
else:
alg.calibrationTool.CalibSequence = 'JetArea_Residual_EtaJES_GSC_Smear'
alg.calibrationTool.IsData = (dataType == 'data')
# alg.calibrationTool.AveIntPerXKey = 'EventInfo.averageInteractionsPerCrossing'
seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'calibration')
# Jet uncertainties
......@@ -325,6 +326,7 @@ def makeRScanJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollecti
alg = createAlgorithm( 'CP::JetCalibrationAlg', 'JetCalibrationAlg'+postfix )
addPrivateTool( alg, 'calibrationTool', 'JetCalibrationTool' )
alg.calibrationTool.JetCollection = jetCollection[:-4]
alg.calibrationTool.AveIntPerXKey = 'EventInfo.averageInteractionsPerCrossing'
alg.calibrationTool.ConfigFile = \
"JES_MC16Recommendation_Rscan{0}LC_18Dec2018_R21.config".format(radius)
if dataType == 'data':
......@@ -379,6 +381,7 @@ def makeLargeRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
alg.calibrationTool.ConfigFile = configFile
alg.calibrationTool.CalibSequence = "EtaJES_JMS"
alg.calibrationTool.IsData = 0
alg.calibrationTool.AveIntPerXKey = 'EventInfo.averageInteractionsPerCrossing'
seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'calibration' )
# Jet uncertainties
......
......@@ -24,11 +24,6 @@ parser.add_option( '-u', '--unit-test', dest='unit_test',
import ROOT
ROOT.xAOD.Init().ignore()
# this forces the jet algorithms dictionary to be loaded before
# anything else, which works around some strange dictionary issues I
# don't understand.
ROOT.CP.JetCalibrationAlg ("dummy", None)
# ideally we'd run over all of them, but we don't have a mechanism to
# configure per-sample right now
......
......@@ -24,11 +24,6 @@ parser.add_option( '-u', '--unit-test', dest='unit_test',
import ROOT
ROOT.xAOD.Init().ignore()
# this forces the jet algorithms dictionary to be loaded before
# anything else, which works around some strange dictionary issues I
# don't understand.
ROOT.CP.JetCalibrationAlg ("dummy", None)
# ideally we'd run over all of them, but we don't have a mechanism to
# configure per-sample right now
......
......@@ -32,7 +32,6 @@
+ PhysicsAnalysis/Algorithms/SelectionHelpers
+ PhysicsAnalysis/Algorithms/SystematicsHandles
- PhysicsAnalysis/Algorithms/.*
- PhysicsAnalysis/AnalysisCommon/PMGTools
- PhysicsAnalysis/D3PDTools/EventLoop.*
- PhysicsAnalysis/D3PDTools/MultiDraw
- PhysicsAnalysis/D3PDTools/SampleHandler
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment