diff --git a/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py b/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py index d37732da0a3a7f206e6e85cda3704960e4cf1886..bcde16d17fe49ced497ba64e697ea8822fe23c53 100644 --- a/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py +++ b/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py @@ -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" ) diff --git a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetAnalysisSequence.py b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetAnalysisSequence.py index 5dae4f300888839fc01a6e0268a3b097dfb5ceca..067fbc6631489b4827c56c9a3068f72c48abac1c 100644 --- a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetAnalysisSequence.py +++ b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetAnalysisSequence.py @@ -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' diff --git a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetJvtAnalysisSequence.py b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetJvtAnalysisSequence.py index 8ebee22a2ab30f3bd48b25d641f3792a9ca7dcc7..17f5dda46dcfa955326924f86ef360be85d8d5b2 100644 --- a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetJvtAnalysisSequence.py +++ b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetJvtAnalysisSequence.py @@ -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)