Skip to content
Snippets Groups Projects
Commit daebf75b authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'tstreble-main-patch-65a8' into 'main'

Make maxEta configurable in muon analysis configs

See merge request !68059
parents 43f20212 3d3992e5
No related branches found
No related tags found
1 merge request!68059Make maxEta configurable in muon analysis configs
...@@ -16,6 +16,7 @@ class MuonCalibrationConfig (ConfigBlock): ...@@ -16,6 +16,7 @@ class MuonCalibrationConfig (ConfigBlock):
self.addOption ('ptSelectionOutput', False, type=bool) self.addOption ('ptSelectionOutput', False, type=bool)
self.addOption ('trackSelection', True, type=bool) self.addOption ('trackSelection', True, type=bool)
self.addOption ('recalibratePhyslite', True, type=bool) self.addOption ('recalibratePhyslite', True, type=bool)
self.addOption ('maxEta', 2.7, type=float)
def makeAlgs (self, config) : def makeAlgs (self, config) :
...@@ -34,7 +35,7 @@ class MuonCalibrationConfig (ConfigBlock): ...@@ -34,7 +35,7 @@ class MuonCalibrationConfig (ConfigBlock):
alg = config.createAlgorithm( 'CP::AsgSelectionAlg', alg = config.createAlgorithm( 'CP::AsgSelectionAlg',
'MuonEtaCutAlg' + self.postfix ) 'MuonEtaCutAlg' + self.postfix )
config.addPrivateTool( 'selectionTool', 'CP::AsgPtEtaSelectionTool' ) config.addPrivateTool( 'selectionTool', 'CP::AsgPtEtaSelectionTool' )
alg.selectionTool.maxEta = 2.7 alg.selectionTool.maxEta = self.maxEta
alg.selectionDecoration = 'selectEta' + self.postfix + ',as_bits' alg.selectionDecoration = 'selectEta' + self.postfix + ',as_bits'
alg.particles = config.readName (self.containerName) alg.particles = config.readName (self.containerName)
alg.preselection = config.getPreselection (self.containerName, '') alg.preselection = config.getPreselection (self.containerName, '')
......
...@@ -11,6 +11,7 @@ def makeMuonAnalysisSequence( dataType, workingPoint, ...@@ -11,6 +11,7 @@ def makeMuonAnalysisSequence( dataType, workingPoint,
postfix = '', postfix = '',
ptSelectionOutput = False, ptSelectionOutput = False,
trackSelection = True, trackSelection = True,
maxEta = 2.7,
qualitySelectionOutput = True, qualitySelectionOutput = True,
enableCutflow = False, enableCutflow = False,
enableKinematicHistograms = False, enableKinematicHistograms = False,
...@@ -54,7 +55,8 @@ def makeMuonAnalysisSequence( dataType, workingPoint, ...@@ -54,7 +55,8 @@ def makeMuonAnalysisSequence( dataType, workingPoint,
makeMuonCalibrationSequence (seq, dataType, postfix=postfix, makeMuonCalibrationSequence (seq, dataType, postfix=postfix,
ptSelectionOutput = ptSelectionOutput, ptSelectionOutput = ptSelectionOutput,
trackSelection = trackSelection) trackSelection = trackSelection,
maxEta = maxEta)
makeMuonWorkingPointSequence (seq, dataType, workingPoint, postfix=postfix, makeMuonWorkingPointSequence (seq, dataType, workingPoint, postfix=postfix,
qualitySelectionOutput = qualitySelectionOutput, isRun3Geo = isRun3Geo) qualitySelectionOutput = qualitySelectionOutput, isRun3Geo = isRun3Geo)
makeSharedObjectSequence (seq, deepCopyOutput = deepCopyOutput, makeSharedObjectSequence (seq, deepCopyOutput = deepCopyOutput,
...@@ -72,7 +74,7 @@ def makeMuonAnalysisSequence( dataType, workingPoint, ...@@ -72,7 +74,7 @@ def makeMuonAnalysisSequence( dataType, workingPoint,
def makeMuonCalibrationSequence( seq, dataType, def makeMuonCalibrationSequence( seq, dataType,
postfix = '', ptSelectionOutput = False, trackSelection = False): postfix = '', ptSelectionOutput = False, trackSelection = False, maxEta = 2.7):
"""Create muon calibration analysis algorithms """Create muon calibration analysis algorithms
This makes all the algorithms that need to be run first befor This makes all the algorithms that need to be run first befor
...@@ -102,7 +104,7 @@ def makeMuonCalibrationSequence( seq, dataType, ...@@ -102,7 +104,7 @@ def makeMuonCalibrationSequence( seq, dataType,
alg = createAlgorithm( 'CP::AsgSelectionAlg', alg = createAlgorithm( 'CP::AsgSelectionAlg',
'MuonEtaCutAlg' + postfix ) 'MuonEtaCutAlg' + postfix )
addPrivateTool( alg, 'selectionTool', 'CP::AsgPtEtaSelectionTool' ) addPrivateTool( alg, 'selectionTool', 'CP::AsgPtEtaSelectionTool' )
alg.selectionTool.maxEta = 2.7 alg.selectionTool.maxEta = maxEta
alg.selectionDecoration = 'selectEta' + postfix + ',as_bits' alg.selectionDecoration = 'selectEta' + postfix + ',as_bits'
seq.append( alg, inputPropName = 'particles', seq.append( alg, inputPropName = 'particles',
stageName = 'selection', stageName = 'selection',
......
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