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 798 of file AsgAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.AsgAnalysisConfig.PerEventSFBlock.__init__ ( self)

Definition at line 801 of file AsgAnalysisConfig.py.

801 def __init__ (self):
802 super(PerEventSFBlock, self).__init__()
803 self.addOption('algoName', None, type=str,
804 info="unique name given to the underlying algorithm computing the "
805 "per-event scale factors.")
806 self.addOption('particles', '', type=str,
807 info="the input object container, with a possible selection, in the "
808 "format `container` or `container.selection`.")
809 self.addOption('objectSF', '', type=str,
810 info="the name of the per-object SF decoration to be used.")
811 self.addOption('eventSF', '', type=str,
812 info="the name of the per-event SF decoration.")
813

Member Function Documentation

◆ instanceName()

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

Definition at line 814 of file AsgAnalysisConfig.py.

814 def instanceName (self) :
815 """Return the instance name for this block"""
816 return self.particles + '_' + self.objectSF + '_' + self.eventSF
817

◆ makeAlgs()

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

Definition at line 818 of file AsgAnalysisConfig.py.

818 def makeAlgs(self, config):
819 if config.dataType() is DataType.Data:
820 return
821 particles, selection = config.readNameAndSelection(self.particles)
822 alg = config.createAlgorithm('CP::AsgEventScaleFactorAlg', self.algoName if self.algoName else 'AsgEventScaleFactorAlg')
823 alg.particles = particles
824 alg.preselection = selection
825 alg.scaleFactorInputDecoration = self.objectSF
826 alg.scaleFactorOutputDecoration = self.eventSF
827
828 config.addOutputVar('EventInfo', alg.scaleFactorOutputDecoration,
829 alg.scaleFactorOutputDecoration.split("_%SYS%")[0])
830
831

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