Skip to content
Snippets Groups Projects
Commit 7c24549b authored by Baptiste Ravina's avatar Baptiste Ravina Committed by Frank Winklmeier
Browse files

CPAlgorithms: make initial pt cut part of the selection for electrons/muons/photons

CPAlgorithms: make initial pt cut part of the selection for electrons/muons/photons
parent 1a1fb870
No related branches found
No related tags found
28 merge requests!78241Draft: FPGATrackSim: GenScan code refactor,!78236Draft: Switching Streams https://its.cern.ch/jira/browse/ATR-27417,!78056AFP monitoring: new synchronization and cleaning,!78041AFP monitoring: new synchronization and cleaning,!77990Updating TRT chip masks for L1TRT trigger simulation - ATR-28372,!77733Draft: add new HLT NN JVT, augmented with additional tracking information,!77731Draft: Updates to ZDC reconstruction,!77728Draft: updates to ZDC reconstruction,!77522Draft: sTGC Pad Trigger Emulator,!76725ZdcNtuple: Fix cppcheck warning.,!76611L1CaloFEXByteStream: Fix out-of-bounds array accesses.,!76475Punchthrough AF3 implementation in FastG4,!76474Punchthrough AF3 implementation in FastG4,!75729New implementation of ZDC nonlinear FADC correction.,!75703Draft: Update to HI han config for HLT jets,!75184Draft: Update file heavyions_run.config,!74430Draft: Fixing upper bound for Delayed Jet Triggers,!73963Changing the path of the histograms to "Expert" area,!73875updating ID ART reference plots,!73874AtlasCLHEP_RandomGenerators: Fix cppcheck warnings.,!73449Add muon detectors to DarkJetPEBTLA partial event building,!73343Draft: [TrigEgamma] Add photon ringer chains on bootstrap mechanism,!72336Fixed TRT calibration crash,!72176Draft: Improving L1TopoOnline chain that now gets no-empty plots. Activating it by default,!72012Draft: Separate JiveXMLConfig.py into Config files,!71876Fix MET trigger name in MissingETMonitoring,!71820Draft: Adding new TLA End-Of-Fill (EOF) chains and removing obsolete DIPZ chains,!71724CPAlgorithms: make initial pt cut part of the selection for electrons/muons/photons
......@@ -26,9 +26,6 @@ class ElectronCalibrationConfig (ConfigBlock) :
info="whether to perform LAr crack veto based on the cluster eta, "
"i.e. remove electrons within 1.37<|eta|<1.52. The default "
"is False.")
self.addOption ('ptSelectionOutput', False, type=bool,
info="whether or not to apply a minimum pT cut to "
"calibrated electrons. The default is False.")
self.addOption ('isolationCorrection', False, type=bool,
info="whether or not to perform isolation corrections (leakage "
"corrections), i.e. set up an instance of "
......@@ -157,7 +154,7 @@ class ElectronCalibrationConfig (ConfigBlock) :
alg.particles = config.readName (self.containerName)
alg.preselection = config.getPreselection (self.containerName, '')
config.addSelection (self.containerName, '', alg.selectionDecoration,
preselection=self.ptSelectionOutput)
preselection=True)
# Set up the isolation correction algorithm:
if self.isolationCorrection:
......@@ -464,7 +461,6 @@ class ElectronWorkingPointConfig (ConfigBlock) :
def makeElectronCalibrationConfig( seq, containerName, postfix = None,
crackVeto = None,
ptSelectionOutput = None,
isolationCorrection = None,
forceFullSimConfig = None):
"""Create electron calibration configuration blocks
......@@ -479,14 +475,11 @@ def makeElectronCalibrationConfig( seq, containerName, postfix = None,
sequence with multiple working points to ensure all
names are unique.
isolationCorrection -- Whether or not to perform isolation correction
ptSelectionOutput -- Whether or not to apply pt selection when creating
output containers.
forceFullSimConfig -- imposes full-sim config for FastSim for testing
"""
config = ElectronCalibrationConfig (containerName)
config.setOptionValue ('crackVeto', crackVeto)
config.setOptionValue ('ptSelectionOutput', ptSelectionOutput)
config.setOptionValue ('isolationCorrection', isolationCorrection)
config.setOptionValue ('forceFullSimConfig', forceFullSimConfig)
seq.append (config)
......
......@@ -38,9 +38,6 @@ class PhotonCalibrationConfig (ConfigBlock) :
info="whether to recompute the photon shower shape fudge "
"corrections (sets up an instance of CP::PhotonShowerShapeFudgeAlg). "
"The default is False, i.e. to use derivation variables.")
self.addOption ('ptSelectionOutput', False, type=bool,
info="whether or not to apply a minimum pT cut to "
"calibrated photons. The default is False.")
self.addOption ('recalibratePhyslite', True, type=bool,
info="whether to run the CP::EgammaCalibrationAndSmearingAlg on "
"PHYSLITE derivations. The default is True.")
......@@ -200,7 +197,7 @@ class PhotonCalibrationConfig (ConfigBlock) :
alg.particles = config.readName (self.containerName)
alg.preselection = config.getPreselection (self.containerName, '')
config.addSelection (self.containerName, '', alg.selectionDecoration,
preselection=self.ptSelectionOutput)
preselection=True)
# Set up the isolation correction algorithm.
alg = config.createAlgorithm( 'CP::EgammaIsolationCorrectionAlg',
......@@ -381,7 +378,6 @@ def makePhotonCalibrationConfig( seq, containerName,
enableCleaning = None,
cleaningAllowLate = None,
recomputeIsEM = None,
ptSelectionOutput = None,
forceFullSimConfig = None):
"""Create photon calibration analysis algorithms
......@@ -398,8 +394,6 @@ def makePhotonCalibrationConfig( seq, containerName,
enableCleaning -- Enable photon cleaning
cleaningAllowLate -- Whether to ignore timing information in cleaning.
recomputeIsEM -- Whether to rerun the cut-based selection. If not, use derivation flags
ptSelectionOutput -- Whether or not to apply pt selection when creating
output containers.
forceFullSimConfig -- imposes full-sim config for FastSim for testing
"""
......@@ -409,7 +403,6 @@ def makePhotonCalibrationConfig( seq, containerName,
config.setOptionValue ('enableCleaning', enableCleaning)
config.setOptionValue ('cleaningAllowLate', cleaningAllowLate)
config.setOptionValue ('recomputeIsEM', recomputeIsEM)
config.setOptionValue ('ptSelectionOutput', ptSelectionOutput)
config.setOptionValue ('forceFullSimConfig', forceFullSimConfig)
seq.append (config)
......
......@@ -18,9 +18,6 @@ class MuonCalibrationConfig (ConfigBlock):
info="a postfix to apply to decorations and algorithm names. "
"Typically not needed here since the calibration is common to "
"all muons.")
self.addOption ('ptSelectionOutput', False, type=bool,
info="whether or not to apply a minimum pT cut to "
"calibrated muons. The default is False.")
self.addOption ('minPt', 3.0e3, type=float,
info="pT cut to apply to calibrated muons, in MeV. "
"The default is 3.0 GeV.")
......@@ -96,7 +93,7 @@ class MuonCalibrationConfig (ConfigBlock):
alg.selectionTool.minPt = self.minPt
alg.preselection = config.getPreselection (self.containerName, '')
config.addSelection (self.containerName, '', alg.selectionDecoration,
preselection = self.ptSelectionOutput)
preselection = True)
# Additional decorations
alg = config.createAlgorithm( 'CP::AsgEnergyDecoratorAlg', 'EnergyDecorator' + self.containerName + self.postfix )
......@@ -296,7 +293,7 @@ class MuonWorkingPointConfig (ConfigBlock) :
def makeMuonCalibrationConfig( seq, containerName,
postfix = None, ptSelectionOutput = None):
postfix = None):
"""Create muon calibration analysis algorithms
This makes all the algorithms that need to be run first befor
......@@ -309,13 +306,10 @@ def makeMuonCalibrationConfig( seq, containerName,
names. this is mostly used/needed when using this
sequence with multiple working points to ensure all
names are unique.
ptSelectionOutput -- Whether or not to apply pt selection when creating
output containers.
"""
config = MuonCalibrationConfig (containerName)
config.setOptionValue ('postfix', postfix)
config.setOptionValue ('ptSelectionOutput', ptSelectionOutput)
seq.append (config)
......
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