ATLAS Offline Software
Loading...
Searching...
No Matches
PhotonExtraVariablesConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3from AnalysisAlgorithmsConfig.ConfigBlock import ConfigBlock
4
5class PhotonExtraVariablesBlock(ConfigBlock):
6 """a ConfigBlock for additional photon output variables"""
7 """Decorates the output photons with the conversion type and calorimeter eta"""
8 """and writes them to the output. Useful e.g. for photon-fake studies."""
9
10 def __init__(self):
11 super(PhotonExtraVariablesBlock, self).__init__()
12 self.addOption('containerName', None, type=str, info='the input photon container')
13
14 def instanceName (self) :
15 """Return the instance name for this block"""
16 return self.containerName
17
18 def makeAlgs(self, config):
19
20 alg = config.createAlgorithm('CP::PhotonExtraVariablesAlg', 'PhotonExtraVariables')
21 alg.photons = config.readName(self.containerName)
22 alg.affectingSystematicsFilter = '.*'
23
24 config.addOutputVar(self.containerName, 'conversionType_%SYS%', 'conversionType', noSys=True)
25 config.addOutputVar(self.containerName, 'caloEta2_%SYS%', 'caloEta2', noSys=True)