Skip to content
Snippets Groups Projects
Verified Commit f3f56299 authored by Tadej Novak's avatar Tadej Novak
Browse files

CP algs: Jet updates for DAOD_PHYS in master

parent 2bcd1f6a
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ from AnaAlgorithm.DualUseConfig import createAlgorithm, addPrivateTool
def makeFTagAnalysisSequence( seq, dataType, jetCollection,
btagWP = "FixedCutBEff_77",
btagger = "MV2c10",
btagger = "DL1r",
postfix = "",
preselection=None,
kinematicSelection = False,
......@@ -46,14 +46,12 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection,
if legacyRecommendations:
# Remove b-tagging calibration from the container name
btIndex = jetCollection.find('_BTagging')
if btIndex != -1:
jetCollection = jetCollection[:btIndex]
if btIndex == -1:
jetCollection += '_BTagging201903'
# CDI file
# https://twiki.cern.ch/twiki/bin/view/AtlasProtected/BTagCalibrationRecommendationsRelease21
bTagCalibFile = "xAODBTaggingEfficiency/13TeV/2017-21-13TeV-MC16-CDI-2019-07-30_v1.root"
else:
bTagCalibFile = "xAODBTaggingEfficiency/13TeV/2020-21-13TeV-MC16-CDI-2020-03-11_Sh228_v3.root"
# CDI file
# https://twiki.cern.ch/twiki/bin/view/AtlasProtected/BTagCalibrationRecommendationsRelease21
bTagCalibFile = "xAODBTaggingEfficiency/13TeV/2020-21-13TeV-MC16-CDI-2020-03-11_Sh228_v3.root"
# # Create the analysis algorithm sequence object:
# seq = AnaAlgSequence( "FTagAnalysisSequence" )
......
......@@ -161,9 +161,9 @@ def makeJetAnalysisSequence( dataType, jetCollection, postfix = '',
def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollection,
jetInput, postfix = '',
runJvtUpdate = True, runFJvtUpdate = True,
runJvtSelection = True, runFJvtSelection = True,
runJvtEfficiency = True, runFJvtEfficiency = True,
runJvtUpdate = False, runFJvtUpdate = False,
runJvtSelection = True, runFJvtSelection = False,
runJvtEfficiency = True, runFJvtEfficiency = False,
reduction = "Global", JEROption = "Simple"):
"""Add algorithms for the R=0.4 jets.
......@@ -240,6 +240,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
if runJvtUpdate :
alg = createAlgorithm( 'CP::JvtUpdateAlg', 'JvtUpdateAlg'+postfix )
addPrivateTool( alg, 'jvtTool', 'JetVertexTaggerTool' )
alg.jvtTool.JetContainer = jetCollection
seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'selection' )
if runFJvtUpdate :
......@@ -266,6 +267,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
alg.efficiencyTool.SFFile = 'JetJvtEfficiency/Moriond2018/JvtSFFile_EMTopoJets.root'
alg.efficiencyTool.MaxPtForJvt = 120e3
alg.efficiencyTool.WorkingPoint = 'Tight' if jetInput == 'EMPFlow' else 'Medium'
alg.truthJetCollection = 'AntiKt4TruthDressedWZJets'
alg.selection = 'jvt_selection'
alg.scaleFactorDecoration = 'jvt_effSF_%SYS%'
alg.scaleFactorDecorationRegex = jvtSysts
......@@ -285,6 +287,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
addPrivateTool( alg, 'efficiencyTool', 'CP::JetJvtEfficiency' )
alg.efficiencyTool.SFFile = 'JetJvtEfficiency/Moriond2018/fJvtSFFile.root'
alg.efficiencyTool.WorkingPoint = 'Tight'
alg.truthJetCollection = 'AntiKt4TruthDressedWZJets'
alg.dofJVT = True
alg.fJVTStatus = 'passFJVT,as_char'
alg.selection = 'fjvt_selection'
......
......@@ -6,7 +6,7 @@ from AnaAlgorithm.DualUseConfig import createAlgorithm
def makeJetJvtAnalysisSequence( dataType, jetCollection,
preselection = '',
disableFJvt = False,
enableFJvt = False,
globalSF = True,
runSelection = True,
enableCutflow = False ):
......@@ -15,7 +15,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 -- Whether to disable forward JVT calculations
enableFJvt -- Whether to enable forward JVT calculations
globalSF -- Whether to calculate per event scale factors
runSelection -- Whether to run selection
enableCutflow -- Whether or not to dump the cutflow
......@@ -37,7 +37,7 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
# Set up the per-event jet efficiency scale factor calculation algorithm
if dataType != 'data' and globalSF:
from JetAnalysisSequence import jvtSysts, fjvtSysts
from .JetAnalysisSequence import jvtSysts, fjvtSysts
alg = createAlgorithm( 'CP::AsgEventScaleFactorAlg', 'JvtEventScaleFactorAlg' )
alg.preselection = preselection + '&&no_jvt' if preselection else 'no_jvt'
......@@ -50,7 +50,7 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
inputPropName = { 'jets' : 'particles',
'eventInfo' : 'eventInfo' } )
if not disableFJvt:
if enableFJvt:
alg = createAlgorithm( 'CP::AsgEventScaleFactorAlg', 'ForwardJvtEventScaleFactorAlg' )
alg.preselection = preselection + '&&no_fjvt' if preselection else 'no_fjvt'
alg.scaleFactorInputDecoration = 'fjvt_effSF_%SYS%'
......@@ -66,7 +66,7 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
cutlist.append('jvt_selection')
cutlength.append(1)
if not disableFJvt:
if enableFJvt:
cutlist.append('fjvt_selection')
cutlength.append(1)
......
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