diff --git a/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/python/MuonAnalysisConfig.py b/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/python/MuonAnalysisConfig.py index 27b209e36b73d12285fe44c4e192e23c58bac354..dc15c8dcaa05f58910a1f7a52516c06842e893e5 100644 --- a/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/python/MuonAnalysisConfig.py +++ b/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/python/MuonAnalysisConfig.py @@ -16,6 +16,7 @@ class MuonCalibrationConfig (ConfigBlock): self.addOption ('ptSelectionOutput', False, type=bool) self.addOption ('trackSelection', True, type=bool) self.addOption ('recalibratePhyslite', True, type=bool) + self.addOption ('maxEta', 2.7, type=float) def makeAlgs (self, config) : @@ -34,7 +35,7 @@ class MuonCalibrationConfig (ConfigBlock): alg = config.createAlgorithm( 'CP::AsgSelectionAlg', 'MuonEtaCutAlg' + self.postfix ) config.addPrivateTool( 'selectionTool', 'CP::AsgPtEtaSelectionTool' ) - alg.selectionTool.maxEta = 2.7 + alg.selectionTool.maxEta = self.maxEta alg.selectionDecoration = 'selectEta' + self.postfix + ',as_bits' alg.particles = config.readName (self.containerName) alg.preselection = config.getPreselection (self.containerName, '') diff --git a/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/python/MuonAnalysisSequence.py b/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/python/MuonAnalysisSequence.py index 0e17600a9ea61ac335ec4ff3ec6392ca9265dc8d..73b9726e34896e5e14216202c292b886602e0cff 100644 --- a/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/python/MuonAnalysisSequence.py +++ b/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/python/MuonAnalysisSequence.py @@ -11,6 +11,7 @@ def makeMuonAnalysisSequence( dataType, workingPoint, postfix = '', ptSelectionOutput = False, trackSelection = True, + maxEta = 2.7, qualitySelectionOutput = True, enableCutflow = False, enableKinematicHistograms = False, @@ -54,7 +55,8 @@ def makeMuonAnalysisSequence( dataType, workingPoint, makeMuonCalibrationSequence (seq, dataType, postfix=postfix, ptSelectionOutput = ptSelectionOutput, - trackSelection = trackSelection) + trackSelection = trackSelection, + maxEta = maxEta) makeMuonWorkingPointSequence (seq, dataType, workingPoint, postfix=postfix, qualitySelectionOutput = qualitySelectionOutput, isRun3Geo = isRun3Geo) makeSharedObjectSequence (seq, deepCopyOutput = deepCopyOutput, @@ -72,7 +74,7 @@ def makeMuonAnalysisSequence( dataType, workingPoint, def makeMuonCalibrationSequence( seq, dataType, - postfix = '', ptSelectionOutput = False, trackSelection = False): + postfix = '', ptSelectionOutput = False, trackSelection = False, maxEta = 2.7): """Create muon calibration analysis algorithms This makes all the algorithms that need to be run first befor @@ -102,7 +104,7 @@ def makeMuonCalibrationSequence( seq, dataType, alg = createAlgorithm( 'CP::AsgSelectionAlg', 'MuonEtaCutAlg' + postfix ) addPrivateTool( alg, 'selectionTool', 'CP::AsgPtEtaSelectionTool' ) - alg.selectionTool.maxEta = 2.7 + alg.selectionTool.maxEta = maxEta alg.selectionDecoration = 'selectEta' + postfix + ',as_bits' seq.append( alg, inputPropName = 'particles', stageName = 'selection',