Commit 993209e6 authored by Johannes Junggeburth's avatar Johannes Junggeburth
Browse files

Merge branch '21.2' of ssh://gitlab.cern.ch:7999/atlas/athena into anatool_fix

parents 6ac0bb4a b34eb95b
......@@ -13,7 +13,7 @@
void EventTypeCnv_p3::transToPers(const EventType* trans, EventType_p3* pers, MsgStream &) {
pers->m_bit_mask = trans->m_bit_mask;
pers->m_user_type = trans->m_user_type;
pers->m_mc_event_weights = trans->m_mc_event_weights;
pers->m_mc_event_weights = std::vector<float>(0); // Wipe event weights, as they've been set in the xAOD::EventInfo
pers->m_mc_channel_number = trans->m_mc_channel_number;
pers->m_mc_event_number = trans->m_mc_event_number;
}
......
......@@ -58,6 +58,10 @@ namespace CP
private:
std::vector<std::string> m_systematicsList;
/// \brief the regular expression for filterinf systematics
private:
std::string m_systematicsRegex {"(.*)"};
/// \brief load all recommended systematics at the given number of
/// sigmas
///
......
......@@ -91,6 +91,10 @@ else()
SCRIPT athena.py
AsgAnalysisAlgorithms/EventAlgorithmsTest_jobOptions.py - --data-type afii
PROPERTIES TIMEOUT 600 )
atlas_add_test( GeneratorAlgsTestJob
SCRIPT athena.py
AsgAnalysisAlgorithms/GeneratorAlgorithmsTest_jobOptions.py - --data-type mc
PROPERTIES TIMEOUT 600 )
if( NOT "${CMAKE_PROJECT_NAME}" STREQUAL "AthDerivation" )
atlas_add_test( OverlapRemovalTestJobData
......@@ -105,9 +109,5 @@ else()
SCRIPT athena.py
AsgAnalysisAlgorithms/OverlapAlgorithmsTest_jobOptions.py - --data-type afii
PROPERTIES TIMEOUT 600 )
atlas_add_test( GeneratorAlgsTestJob
SCRIPT athena.py
AsgAnalysisAlgorithms/GeneratorAlgorithmsTest_jobOptions.py - --data-type mc
PROPERTIES TIMEOUT 600 )
endif()
endif()
......@@ -9,6 +9,8 @@
// includes
//
#include <regex>
#include <AsgAnalysisAlgorithms/SysListLoaderAlg.h>
#include <AsgTools/MessageCheck.h>
......@@ -28,6 +30,7 @@ namespace CP
{
declareProperty ("systematicsName", m_systematicsName, "the name of the systematics in the event store");
declareProperty ("systematicsList", m_systematicsList, "the list of systematics to run");
declareProperty ("systematicsRegex", m_systematicsRegex, "systematics filter regex");
declareProperty ("sigmaRecommended", m_sigmaRecommended, "the sigma with which to run recommended systematics");
}
......@@ -112,10 +115,17 @@ namespace CP
CP::MakeSystematicsVector sys;
sys.setSigma (m_sigmaRecommended);
sys.calc (recommended);
std::regex expr (m_systematicsRegex);
for (const CP::SystematicSet& mysys : sys.result(""))
{
ANA_MSG_INFO ("configuring systematic: " << mysys.name());
m_systematicsVector.push_back (mysys);
if (!regex_match (mysys.name(), expr))
{
ANA_MSG_INFO ("skipping systematic: " << mysys.name());
} else {
ANA_MSG_INFO ("configuring systematic: " << mysys.name());
m_systematicsVector.push_back (mysys);
}
}
}
}
......
......@@ -51,7 +51,7 @@ def makeOverlapSequence (dataType) :
algSeq += muonSequence
# Include, and then set up the jet analysis algorithm sequence:
jetContainer = 'AntiKt4EMTopoJets'
jetContainer = 'AntiKt4EMPFlowJets'
from JetAnalysisAlgorithms.JetAnalysisSequence import makeJetAnalysisSequence
jetSequence = makeJetAnalysisSequence( dataType, jetContainer )
jetSequence.configure( inputName = jetContainer,
......@@ -68,7 +68,7 @@ def makeOverlapSequence (dataType) :
# Include, and then set up the overlap analysis algorithm sequence:
from AsgAnalysisAlgorithms.OverlapAnalysisSequence import \
makeOverlapAnalysisSequence
overlapSequence = makeOverlapAnalysisSequence( dataType )
overlapSequence = makeOverlapAnalysisSequence( dataType, doMuPFJetOR=True )
overlapSequence.configure(
inputName = {
'electrons' : 'AnalysisElectrons_%SYS%',
......
......@@ -5,10 +5,7 @@
from AnaAlgorithm.AlgSequence import AlgSequence
from AnaAlgorithm.DualUseConfig import createAlgorithm
def makeSequence (dataType) :
# config parameters
jetContainer = "AntiKt4EMTopoJets"
def makeSequence (dataType, jetContainer="AntiKt4EMPFlowJets") :
algSeq = AlgSequence()
......
......@@ -42,26 +42,47 @@ atlas_install_joboptions( share/*_jobOptions.py )
atlas_install_scripts( share/*_eljob.py )
if( XAOD_STANDALONE )
atlas_add_test( testJobData
SCRIPT JetAnalysisAlgorithmsTest_eljob.py --data-type data --unit-test
atlas_add_test( testJobDataEMTopo
SCRIPT JetAnalysisAlgorithmsTest_EMTopo_eljob.py --data-type data --unit-test
PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobFullSim
SCRIPT JetAnalysisAlgorithmsTest_eljob.py --data-type mc --unit-test
atlas_add_test( testJobDataPFlow
SCRIPT JetAnalysisAlgorithmsTest_PFlow_eljob.py --data-type data --unit-test
PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobFastSim
SCRIPT JetAnalysisAlgorithmsTest_eljob.py --data-type afii --unit-test
atlas_add_test( testJobFullSimEMTopo
SCRIPT JetAnalysisAlgorithmsTest_EMTopo_eljob.py --data-type mc --unit-test
PROPERTIES TIMEOUT 600 )
elseif( NOT "${CMAKE_PROJECT_NAME}" STREQUAL "AthDerivation" )
atlas_add_test( testJobData
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( testJobFullSimPFlow
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_jobOptions.py - --data-type data
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_PFlow_jobOptions.py - --data-type mc
PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobFullSim
atlas_add_test( testJobFastSimEMTopo
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_jobOptions.py - --data-type mc
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py - --data-type afii
PROPERTIES TIMEOUT 600 )
atlas_add_test( testJobFastSim
atlas_add_test( testJobFastSimPFlow
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_jobOptions.py - --data-type afii
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_PFlow_jobOptions.py - --data-type afii
PROPERTIES TIMEOUT 600 )
endif()
......@@ -5,10 +5,10 @@
from AnaAlgorithm.AlgSequence import AlgSequence
from AnaAlgorithm.DualUseConfig import createAlgorithm
def makeSequence (dataType) :
def makeSequence (dataType, jetContainer="AntiKt4EMPFlowJets") :
# config
jetContainer = "AntiKt4EMTopoJets"
algSeq = AlgSequence()
......@@ -60,7 +60,7 @@ def makeSequence (dataType) :
# 'EventInfo.jvt_effSF_%SYS% -> jvtSF_%SYS%',
# 'EventInfo.fjvt_effSF_%SYS% -> fjvtSF_%SYS%',
'AnalysisJets_%SYS%.jvt_effSF_NOSYS -> jet_%SYS%_jvtEfficiency',
'AnalysisJets_%SYS%.fjvt_effSF_NOSYS -> jet_%SYS%_fjvtEfficiency',
# 'AnalysisJets_%SYS%.fjvt_effSF_NOSYS -> jet_%SYS%_fjvtEfficiency',
]
ntupleMaker.systematicsRegex = '(^$)|(^JET_.*)'
algSeq += ntupleMaker
......
......@@ -149,8 +149,10 @@ def makeJetAnalysisSequence( dataType, jetCollection, postfix = '', deepCopyOutp
return seq
def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollection,
jetInput, postfix = '', runJvtUpdate = True,
runJvtEfficiency = True,
jetInput, postfix = '',
runJvtUpdate = True, runFJvtUpdate = True,
runJvtSelection = True, runFJvtSelection = True,
runJvtEfficiency = True, runFJvtEfficiency = True,
reduction = "Global", JEROption = "Simple"):
"""Add algorithms for the R=0.4 jets.
......@@ -163,8 +165,11 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
jetInput -- The type of input used, read from the collection name.
postfix -- String to be added to the end of all public names.
runJvtUpdate -- Determines whether or not to update JVT on the jets
runJvtEfficiency -- Determines whether or not to recalculate the JVT
efficiency
runFJvtUpdate -- Determines whether or not to update forward JVT on the jets
runJvtSelection -- Determines whether or not to run JVT selection on the jets
runFJvtSelection -- Determines whether or not to run forward JVT selection on the jets
runJvtEfficiency -- Determines whether or not to calculate the JVT efficiency
runFJvtEfficiency -- Determines whether or not to calculate the forward JVT efficiency
reduction -- Which NP reduction scheme should be used (All, Global, Category, Scenario)
JEROption -- Which variant of the reduction should be used (All, Full, Simple). Note that not all combinations of reduction and JEROption are valid!
"""
......@@ -226,6 +231,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
addPrivateTool( alg, 'jvtTool', 'JetVertexTaggerTool' )
seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'selection' )
if runFJvtUpdate :
alg = createAlgorithm( 'CP::JetModifierAlg', 'JetModifierAlg'+postfix )
addPrivateTool( alg, 'modifierTool', 'JetForwardJvtTool')
alg.modifierTool.OutputDec = "passFJVT" #Output decoration
......@@ -239,17 +245,22 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
# Set up the jet efficiency scale factor calculation algorithm
# Change the truthJetCollection property to AntiKt4TruthWZJets if preferred
if runJvtEfficiency:
if runJvtSelection :
alg = createAlgorithm( 'CP::JvtEfficiencyAlg', 'JvtEfficiencyAlg'+postfix )
addPrivateTool( alg, 'efficiencyTool', 'CP::JetJvtEfficiency' )
alg.efficiencyTool.SFFile = 'JetJvtEfficiency/Moriond2018/JvtSFFile_EMTopoJets.root'
alg.efficiencyTool.WorkingPoint = 'Medium'
if jetInput == 'EMPFlow':
alg.efficiencyTool.SFFile = 'JetJvtEfficiency/Moriond2018/JvtSFFile_EMPFlow.root'
alg.efficiencyTool.MaxPtForJvt = 60e3
else:
alg.efficiencyTool.SFFile = 'JetJvtEfficiency/Moriond2018/JvtSFFile_EMTopoJets.root'
alg.efficiencyTool.MaxPtForJvt = 120e3
alg.efficiencyTool.WorkingPoint = 'Tight' if jetInput == 'EMPFlow' else 'Medium'
alg.selection = 'jvt_selection'
alg.scaleFactorDecoration = 'jvt_effSF_%SYS%'
alg.scaleFactorDecorationRegex = jvtSysts
# Disable scale factor decorations if running on data
# We still want to run the JVT selection
if dataType == 'data':
if not runJvtEfficiency or dataType == 'data':
alg.scaleFactorDecoration = ''
alg.truthJetCollection = ''
alg.outOfValidity = 2
......@@ -257,7 +268,8 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
alg.skipBadEfficiency = 0
seq.append( alg, inputPropName = 'jets',
affectingSystematics = jvtSysts, stageName = 'selection' )
if runFJvtSelection :
alg = createAlgorithm( 'CP::JvtEfficiencyAlg', 'ForwardJvtEfficiencyAlg' )
addPrivateTool( alg, 'efficiencyTool', 'CP::JetJvtEfficiency' )
alg.efficiencyTool.SFFile = 'JetJvtEfficiency/Moriond2018/fJvtSFFile.root'
......@@ -269,7 +281,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
alg.scaleFactorDecorationRegex = fjvtSysts
# Disable scale factor decorations if running on data
# We still want to run the JVT selection
if dataType == 'data':
if not runFJvtEfficiency or dataType == 'data':
alg.scaleFactorDecoration = ''
alg.truthJetCollection = ''
alg.outOfValidity = 2
......@@ -277,7 +289,6 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
alg.skipBadEfficiency = 0
seq.append( alg, inputPropName = 'jets',
affectingSystematics = fjvtSysts, stageName = 'selection')
pass
# Return the sequence:
return seq, cutlist, cutlength
......
......@@ -6,6 +6,7 @@ from AnaAlgorithm.DualUseConfig import createAlgorithm, addPrivateTool
def makeJetJvtAnalysisSequence( dataType, jetCollection,
preselection = '',
disableFJvt = False,
globalSF = True,
runSelection = True ):
"""Create a jet JVT analysis algorithm sequence
......@@ -13,6 +14,7 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
Keyword arguments:
dataType -- The data type to run on ("data", "mc" or "afii")
jetCollection -- The jet container to run on
disableFJvt -- Wether to disable forward JVT calculations
globalSF -- Wether to calculate per event scale factors
runSelection -- Wether to run selection
"""
......@@ -46,24 +48,25 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
inputPropName = { 'jets' : 'particles',
'eventInfo' : 'eventInfo' } )
alg = createAlgorithm( 'CP::AsgEventScaleFactorAlg', 'ForwardJvtEventScaleFactorAlg' )
alg.preselection = preselection + '&&no_fjvt' if preselection else 'no_fjvt'
alg.scaleFactorInputDecoration = 'fjvt_effSF_%SYS%'
alg.scaleFactorInputDecorationRegex = fjvtSysts
alg.scaleFactorOutputDecoration = 'fjvt_effSF_%SYS%'
seq.append( alg,
affectingSystematics = fjvtSysts,
inputPropName = { 'jets' : 'particles',
'eventInfo' : 'eventInfo' } )
if not disableFJvt:
alg = createAlgorithm( 'CP::AsgEventScaleFactorAlg', 'ForwardJvtEventScaleFactorAlg' )
alg.preselection = preselection + '&&no_fjvt' if preselection else 'no_fjvt'
alg.scaleFactorInputDecoration = 'fjvt_effSF_%SYS%'
alg.scaleFactorInputDecorationRegex = fjvtSysts
alg.scaleFactorOutputDecoration = 'fjvt_effSF_%SYS%'
seq.append( alg,
affectingSystematics = fjvtSysts,
inputPropName = { 'jets' : 'particles',
'eventInfo' : 'eventInfo' } )
if runSelection:
cutlist.append('jvt_selection')
cutlength.append(1)
cutlist.append('fjvt_selection')
cutlength.append(1)
if not disableFJvt:
cutlist.append('fjvt_selection')
cutlength.append(1)
# Set up an algorithm used for debugging the jet selection:
alg = createAlgorithm( 'CP::ObjectCutFlowHistAlg', 'JetJvtCutFlowDumperAlg' )
......
#!/usr/bin/env python
#
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
#
# @author Nils Krumnack
# Read the submission directory as a command line argument. You can
# extend the list of arguments with your private ones later on.
import optparse
parser = optparse.OptionParser()
parser.add_option( '-d', '--data-type', dest = 'data_type',
action = 'store', type = 'string', default = 'data',
help = 'Type of data to run over. Valid options are data, mc, afii' )
parser.add_option( '-s', '--submission-dir', dest = 'submission_dir',
action = 'store', type = 'string', default = 'submitDir',
help = 'Submission directory for EventLoop' )
parser.add_option( '-u', '--unit-test', dest='unit_test',
action = 'store_true', default = False,
help = 'Run the job in "unit test mode"' )
( options, args ) = parser.parse_args()
# Set up (Py)ROOT.
import ROOT
import os
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
dataType = options.data_type
inputfile = {"data": 'ASG_TEST_FILE_DATA',
"mc": 'ASG_TEST_FILE_MC',
"afii": 'ASG_TEST_FILE_MC_AFII'}
jetContainer = "AntiKt4EMTopoJets"
if not dataType in ["data", "mc", "afii"] :
raise ValueError ("invalid data type: " + dataType)
# Set up the sample handler object. See comments from the C++ macro
# for the details about these lines.
import os
sh = ROOT.SH.SampleHandler()
sh.setMetaString( 'nc_tree', 'CollectionTree' )
sample = ROOT.SH.SampleLocal (dataType)
sample.add (os.getenv (inputfile[dataType]))
sh.add (sample)
sh.printContent()
# Create an EventLoop job.
job = ROOT.EL.Job()
job.sampleHandler( sh )
job.options().setDouble( ROOT.EL.Job.optMaxEvents, 500 )
from JetAnalysisAlgorithms.JetAnalysisAlgorithmsTest import makeSequence
algSeq = makeSequence (dataType, jetContainer)
print algSeq # For debugging
for alg in algSeq:
job.algsAdd( alg )
pass
# Set up an output file for the job:
job.outputAdd( ROOT.EL.OutputStream( 'ANALYSIS' ) )
# Find the right output directory:
submitDir = options.submission_dir
if options.unit_test:
import os
import tempfile
submitDir = tempfile.mkdtemp( prefix = 'jetTest_'+dataType+'_EMTopo_', dir = os.getcwd() )
os.rmdir( submitDir )
pass
# Run the job using the direct driver.
driver = ROOT.EL.DirectDriver()
driver.submit( job, submitDir )
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
#
# @author Nils Krumnack
# User options, which can be set from command line after a "-" character
# athena EgammaAlgorithmsTest_jobOptions.py - --myOption ...
from AthenaCommon.AthArgumentParser import AthArgumentParser
athArgsParser = AthArgumentParser()
athArgsParser.add_argument("--data-type", action = "store", dest = "data_type",
default = "data",
help = "Type of input to run over. Valid options are 'data', 'mc', 'afii'")
athArgs = athArgsParser.parse_args()
dataType = athArgs.data_type
if not dataType in ["data", "mc", "afii"] :
raise Exception ("invalid data type: " + dataType)
print("Running on data type: " + dataType)
inputfile = {"data": 'ASG_TEST_FILE_DATA',
"mc": 'ASG_TEST_FILE_MC',
"afii": 'ASG_TEST_FILE_MC_AFII'}
jetContainer = "AntiKt4EMTopoJets"
# Set up the reading of the input file:
import AthenaRootComps.ReadAthenaxAODHybrid
theApp.EvtMax = 500
testFile = os.getenv ( inputfile[dataType] )
svcMgr.EventSelector.InputCollections = [testFile]
from JetAnalysisAlgorithms.JetAnalysisAlgorithmsTest import makeSequence
algSeq = makeSequence (dataType, jetContainer)
print algSeq # For debugging
# Add all algorithms from the sequence to the job.
athAlgSeq += algSeq
# Set up a histogram output file for the job:
ServiceMgr += CfgMgr.THistSvc()
ServiceMgr.THistSvc.Output += [
"ANALYSIS DATAFILE='JetAnalysisAlgorithmsTestEMTopo." + dataType + ".hist.root' OPT='RECREATE'"
]
# Reduce the printout from Athena:
include( "AthAnalysisBaseComps/SuppressLogging.py" )
......@@ -60,7 +60,7 @@ job.sampleHandler( sh )
job.options().setDouble( ROOT.EL.Job.optMaxEvents, 500 )
from JetAnalysisAlgorithms.JetAnalysisAlgorithmsTest import makeSequence
algSeq = makeSequence (dataType)
algSeq = makeSequence (dataType, jetContainer)
print algSeq # For debugging
for alg in algSeq:
job.algsAdd( alg )
......@@ -74,7 +74,7 @@ submitDir = options.submission_dir
if options.unit_test:
import os
import tempfile
submitDir = tempfile.mkdtemp( prefix = 'jetTest_'+dataType+'_', dir = os.getcwd() )
submitDir = tempfile.mkdtemp( prefix = 'jetTest_'+dataType+'_PFlow_', dir = os.getcwd() )
os.rmdir( submitDir )
pass
......
......@@ -21,6 +21,8 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
"mc": 'ASG_TEST_FILE_MC',
"afii": 'ASG_TEST_FILE_MC_AFII'}
jetContainer = "AntiKt4EMTopoJets"
# Set up the reading of the input file:
import AthenaRootComps.ReadAthenaxAODHybrid
theApp.EvtMax = 500
......@@ -28,7 +30,7 @@ testFile = os.getenv ( inputfile[dataType] )
svcMgr.EventSelector.InputCollections = [testFile]
from JetAnalysisAlgorithms.JetAnalysisAlgorithmsTest import makeSequence
algSeq = makeSequence (dataType)
algSeq = makeSequence (dataType, jetContainer)
print algSeq # For debugging
# Add all algorithms from the sequence to the job.
......@@ -37,7 +39,7 @@ athAlgSeq += algSeq
# Set up a histogram output file for the job:
ServiceMgr += CfgMgr.THistSvc()
ServiceMgr.THistSvc.Output += [
"ANALYSIS DATAFILE='JetAnalysisAlgorithmsTest." + dataType + ".hist.root' OPT='RECREATE'"
"ANALYSIS DATAFILE='JetAnalysisAlgorithmsTestPFlow." + dataType + ".hist.root' OPT='RECREATE'"
]
# Reduce the printout from Athena:
......
......@@ -15,7 +15,7 @@ def makeSequence (dataType) :
# Include, and then set up the jet analysis algorithm sequence:
from JetAnalysisAlgorithms.JetAnalysisSequence import makeJetAnalysisSequence
jetContainer = 'AntiKt4EMTopoJets'
jetContainer = 'AntiKt4EMPFlowJets'
jetSequence = makeJetAnalysisSequence( dataType, jetContainer )
jetSequence.configure( inputName = jetContainer, outputName = 'AnalysisJets' )
......
......@@ -11,7 +11,7 @@ def makeMetAnalysisSequence( dataType, metSuffix, useFJVT = True, postfix = '' )
like:
metSequence.configure( inputName = {
'jets' : 'AntiKt4EMTopoJets_%SYS%',
'jets' : 'AntiKt4EMPFlowJets_%SYS%',
'electrons' : 'AnalysisElectrons_%SYS%',
'photons' : 'AnalysisPhotons_%SYS%',
'muons' : 'AnalysisMuons_%SYS%',
......@@ -77,12 +77,13 @@ def makeMetAnalysisSequence( dataType, metSuffix, useFJVT = True, postfix = '' )
seq.append( alg, inputPropName = 'met' )
# Set up the met significance algorithm:
alg = createAlgorithm( 'CP::MetSignificanceAlg', 'MetSignificanceAlg' + postfix )
addPrivateTool( alg, 'significanceTool', 'met::METSignificance' )
alg.significanceTool.SoftTermParam = 0
alg.significanceTool.TreatPUJets = True
alg.significanceTool.IsAFII = dataType == "afii"
seq.append( alg, inputPropName = 'met' )
if useFJVT:
alg = createAlgorithm( 'CP::MetSignificanceAlg', 'MetSignificanceAlg' + postfix )
addPrivateTool( alg, 'significanceTool', 'met::METSignificance' )
alg.significanceTool.SoftTermParam = 0
alg.significanceTool.TreatPUJets = True
alg.significanceTool.IsAFII = dataType == "afii"
seq.append( alg, inputPropName = 'met' )
# Return the sequence:
return seq
......@@ -25,7 +25,6 @@ namespace CP
, m_efficiencyCorrectionsTool ("TauAnalysisTools::TauEfficiencyCorrectionsTool", this)
{
declareProperty ("efficiencyCorrectionsTool", m_efficiencyCorrectionsTool, "the calibration and smearing tool we apply");
declareProperty ("scaleFactorDecoration", m_scaleFactorDecoration, "the decoration for the tau scale factor");
}
......@@ -38,7 +37,6 @@ namespace CP
ANA_MSG_ERROR ("no scale factor decoration name set");
return StatusCode::FAILURE;
}
m_scaleFactorAccessor = std::make_unique<SG::AuxElement::Accessor<float> > (m_scaleFactorDecoration);
ANA_CHECK (m_efficiencyCorrectionsTool.retrieve());
m_systematicsList.addHandle (m_tauHandle);
......@@ -54,6 +52,8 @@ namespace CP
StatusCode TauEfficiencyCorrectionsAlg ::
execute ()
{
ANA_CHECK (m_scaleFactorDecoration.preExecute (m_systematicsList));
return m_systematicsList.foreach ([&] (const CP::SystematicSet& sys) -> StatusCode {