ATLAS Offline Software
Loading...
Searching...
No Matches
python.AsgAnalysisConfig.PerEventSFBlock Class Reference
Inheritance diagram for python.AsgAnalysisConfig.PerEventSFBlock:
Collaboration diagram for python.AsgAnalysisConfig.PerEventSFBlock:

Public Member Functions

 __init__ (self)
 instanceName (self)
 makeAlgs (self, config)

Detailed Description

the ConfigBlock for the AsgEventScaleFactorAlg

Definition at line 977 of file AsgAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.AsgAnalysisConfig.PerEventSFBlock.__init__ ( self)

Definition at line 980 of file AsgAnalysisConfig.py.

980 def __init__ (self):
981 super().__init__()
982 self.addOption('algoName', None, type=str,
983 info="unique name given to the underlying algorithm computing the "
984 "per-event scale factors.")
985 self.addOption('particles', '', type=str,
986 info="the input object container, with a possible selection, in the "
987 "format `container` or `container.selection`.",
988 meta={'role':'containerRef'})
989 self.addOption('objectSF', '', type=str,
990 info="the name of the per-object SF decoration to be used.")
991 self.addOption('eventSF', '', type=str,
992 info="the name of the per-event SF decoration.")
993

Member Function Documentation

◆ instanceName()

python.AsgAnalysisConfig.PerEventSFBlock.instanceName ( self)
Return the instance name for this block

Definition at line 994 of file AsgAnalysisConfig.py.

994 def instanceName (self) :
995 """Return the instance name for this block"""
996 return self.particles + '_' + self.objectSF + '_' + self.eventSF
997

◆ makeAlgs()

python.AsgAnalysisConfig.PerEventSFBlock.makeAlgs ( self,
config )

Definition at line 998 of file AsgAnalysisConfig.py.

998 def makeAlgs(self, config):
999 if config.dataType() is DataType.Data:
1000 return
1001 particles, selection = config.readNameAndSelection(self.particles)
1002 alg = config.createAlgorithm('CP::AsgEventScaleFactorAlg', self.algoName if self.algoName else 'AsgEventScaleFactorAlg')
1003 alg.particles = particles
1004 alg.preselection = selection
1005 alg.scaleFactorInputDecoration = self.objectSF
1006 alg.scaleFactorOutputDecoration = self.eventSF
1007
1008 config.addOutputVar('EventInfo', alg.scaleFactorOutputDecoration,
1009 alg.scaleFactorOutputDecoration.split("_%SYS%")[0], auxType="float")
1010
1011

The documentation for this class was generated from the following file: