From a09cc4d633e9c5751fda32dbae331eb3908973ae Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 7 Dec 2020 13:36:50 +0100
Subject: [PATCH] MuonCombinedRecExample: delete obsolete calibration modules

Delete obsolete `ScaleCalibrationInputSetup.py` and
`TagAndProbeInputSetup.py` modules and their corresponding
`MuonCombinedRecFlags`.
---
 .../python/MuonCombinedRecFlags.py            | 10 ---
 .../python/ScaleCalibrationInputSetup.py      | 27 --------
 .../python/TagAndProbeInputSetup.py           | 68 -------------------
 .../share/MuonCombinedRec_postprocessing.py   |  8 ---
 4 files changed, 113 deletions(-)
 delete mode 100644 Reconstruction/MuonIdentification/MuonCombinedRecExample/python/ScaleCalibrationInputSetup.py
 delete mode 100644 Reconstruction/MuonIdentification/MuonCombinedRecExample/python/TagAndProbeInputSetup.py

diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py
index 85e4a83d1b0..481b41b04e8 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py
@@ -144,16 +144,6 @@ class printSummary(JobProperty):
     allowedTypes=['bool']
     StoredValue=False
 
-class createTagAndProbeInput(JobProperty):
-    statusOn=True
-    allowedTypes=['bool']
-    StoredValue=False
-
-class createScaleCalibrationInput(JobProperty):
-    statusOn=True
-    allowedTypes=['bool']
-    StoredValue=False
-
 ## Decide whether to wrap the new configuration in the old.
 class useNewConfig(JobProperty):
     statusOn=True
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/ScaleCalibrationInputSetup.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/ScaleCalibrationInputSetup.py
deleted file mode 100644
index aaa2cea3695..00000000000
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/ScaleCalibrationInputSetup.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-from AthenaCommon.AlgSequence import AlgSequence
-from AthenaCommon.Constants import INFO
-from AthenaCommon import CfgMgr
-import os
-
-def setupScaleCalibrationInput():
-    from AthenaCommon.AppMgr import ServiceMgr, ToolSvc
-    print("Setting up setupScaleCalibrationInput")
-
-    topSequence = AlgSequence()
-    # THistSvc configuration
-    from GaudiSvc.GaudiSvcConf import THistSvc
-    ServiceMgr += THistSvc()
-    ServiceMgr.THistSvc.Output += [ "MCPCALIB DATAFILE='MCPCalibNtuple_xAOD.root' OPT='RECREATE'" ]
-    
-    # Setup GRL
-    GRL = os.path.expandvars( '$TestArea/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonPtCalibNtupleMaker/grl/data12_8TeV.periodAllYear_HEAD_DQDefects-00-01-02_PHYS_CombinedPerf_Muon_Muon_calo.xml' )
-    ToolSvc += CfgMgr.GoodRunsListSelectionTool( 'GRLTool' , GoodRunsListVec = [ GRL ] )
-
-    # Setup MST
-    ToolSvc += CfgMgr.CP__MuonSelectionTool( 'MuonSelectorTool', OutputLevel = INFO )
-    ToolSvc += CfgMgr.CalibMuonsSelectorTool( 'CalibMuonsSelectorTool', MuonSelectorTool = ToolSvc.MuonSelectorTool, OutputLevel = INFO )
-    
-    # Setup algorithm
-    topSequence += CfgMgr.CalibMuonsNtupleMaker( 'CalibMuonsNtupleMaker', OutputLevel = INFO, SelectorTool = SelectorTool, ExtendedVersion = False )
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/TagAndProbeInputSetup.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/TagAndProbeInputSetup.py
deleted file mode 100644
index e9d657bea79..00000000000
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/TagAndProbeInputSetup.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-from AthenaCommon.Include import include
-
-
-def setupTagAndProbeInput():
-    print("Setting up setupTagAndProbeInput")
-
-    #from MuonPerformanceAlgs.ZmumuTPAnalysis import *
-    #from MuonPerformanceAlgs.ZmumuTPIsolationAnalysis import *
-    #from MuonPerformanceAlgs.ZmumuTPTrigAnalysis import *
-    include('MuonPerformanceAlgs/ZmumuTPAnalysis.py')
-    include('MuonPerformanceAlgs/ZmumuTPIsolationAnalysis.py')
-    include('MuonPerformanceAlgs/ZmumuTPTrigAnalysis.py')
- 
-     # now we can add the TP analysis/es itself/themselves :)
- 
-    ############## Zmumu T&P Configuration ########################
-    do_Zmumu_RecoEff_TagProbe      = True # this is for Z->mumu, reco eff. You can add your own analysis in a similar way.
-    do_Zmumu_IsolationEff_TagProbe = True # this is for Z->mumu, isolation eff. You can add your own analysis in a similar way.
-    do_Zmumu_Trigger_TagProbe      = True  # this is for Z->mumu, Trigger eff.
-    
-    ##### General analysis options
-    writeNtuple = True                     # Write an ntuple on top of the histos - for detailed studies, but increases output file size
-    doEtaSlices = False
-    doClosure   = False
-    doDRSys     = False
-    doValid     = False
-    
-    
-    # Add utilities (tool, upstream algorithms) we need
-    AddIsolationTools()
-    AddTrigDecisionTool()
-    AddTrigMatchingTool()
-    AddMuonSelectionTool()
-    
-    
-    ##### Reco eff analysis options
-    if do_Zmumu_RecoEff_TagProbe:
-        writeNtuple = True                   
-        doEtaSlices = False
-        doClosure   = False
-        doDRSys     = True
-        doValid     = True
-        AddZmumuTPAnalysis(doEtaSlices,writeNtuple,doClosure,doDRSys,doValid)     
-    ###############################################################
-    
-    
-    ##### Isolation eff analysis options
-    if do_Zmumu_IsolationEff_TagProbe:
-        doEtaSlices = False
-        doClosure   = False
-        doDRSys     = True
-        doValid     = True
-        AddZmumuTPIsolationAnalysis(doEtaSlices,writeNtuple,doClosure,doDRSys)
-        pass
-    ###############################################################
-    
-    
-    ##### Trigger analysis options
-    if do_Zmumu_Trigger_TagProbe:
-        doTriggerL1  = True
-        doTriggerL2  = False
-        doTriggerEF  = False
-        doTriggerHLT = True
-        doEtaSlices  = True
-        doDRSys      = False
-        AddTriggerTPAnalysis(doEtaSlices,writeNtuple,doClosure,doDRSys,doL1=doTriggerL1,doL2=doTriggerL2,doEF=doTriggerEF,doHLT=doTriggerHLT)
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_postprocessing.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_postprocessing.py
index a662293fd21..4f735164d3a 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_postprocessing.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_postprocessing.py
@@ -52,14 +52,6 @@ if rec.doTruth() and muonCombinedRecFlags.doxAOD() and rec.doMuonCombined():
 if muonCombinedRecFlags.doTrackPerformance:
     include("MuonCombinedRecExample/MuonCombinedTrackPerformance_jobOptions.py")
 
-if( muonCombinedRecFlags.createTagAndProbeInput() ):
-    from MuonCombinedRecExample.TagAndProbeInputSetup import setupTagAndProbeInput
-    setupTagAndProbeInput()
-
-if( muonCombinedRecFlags.createScaleCalibrationInput() ):
-    from MuonCombinedRecExample.ScaleCalibrationInputSetup import setupScaleCalibrationInput
-    setupScaleCalibrationInput()
-    
 if rec.doMuonCombined() and rec.doJetMissingETTag() and muonCombinedRecFlags.doxAOD():
     muonTCLinkAlg = CfgMgr.ClusterMatching__CaloClusterMatchLinkAlg("MuonTCLinks",ClustersToDecorate="MuonClusterCollection")
     topSequence += muonTCLinkAlg
-- 
GitLab