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

Public Member Functions

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

Protected Attributes

 _wpOption

Detailed Description

common base for the Jvt and fJvt event working point efficiency blocks

Definition at line 1031 of file JetAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.JetAnalysisConfig._JvtWorkingPointEventEfficiencyBase.__init__ ( self)

Definition at line 1034 of file JetAnalysisConfig.py.

1034 def __init__ (self) :
1035 super().__init__()
1036 self.addDependency(f'{self._algPrefix}WorkingPointEfficiencyConfig', required=True)
1037 self.addDependency('OverlapRemoval', required=False)
1038 self.addDependency('EventSelection', required=False)
1039 self.addDependency('EventSelectionMerger', required=False)
1040 self.addOption ('noEffSF', False, type=bool,
1041 info="disables the calculation of efficiencies and scale factors. "
1042 "Only useful to test a new WP for which scale factors are not available.",
1043 expertMode=True)
1044 self.addOption ('eventSF', True, type=bool,
1045 info="add calculation of event-level efficiency SF.")
1046

Member Function Documentation

◆ instanceName()

python.JetAnalysisConfig._JvtWorkingPointBase.instanceName ( self)
inherited

Definition at line 960 of file JetAnalysisConfig.py.

960 def instanceName (self) :
961 return self.containerName + '_' + self.selectionName
962

◆ makeAlgs()

python.JetAnalysisConfig._JvtWorkingPointEventEfficiencyBase.makeAlgs ( self,
config )

Definition at line 1047 of file JetAnalysisConfig.py.

1047 def makeAlgs (self, config) :
1048
1049 if (not self.noEffSF and self.eventSF and
1050 config.dataType() is not DataType.Data):
1051 suffix = self.suffix()
1052 alg = config.createAlgorithm( 'CP::AsgEventScaleFactorAlg', f'{self._eventSFAlgPrefix}_{self.workingPoint()}' )
1053 preselection = config.getFullSelection (self.containerName, '')
1054 alg.preselection = preselection + f'&&no_{self._prefix}{suffix}' if preselection else f'no_{self._prefix}{suffix}'
1055 alg.scaleFactorInputDecoration = f'{self._prefix}_effSF{suffix}_%SYS%'
1056 alg.scaleFactorOutputDecoration = f'{self._prefix}_effSF{suffix}_%SYS%'
1057 alg.particles = config.readName (self.containerName)
1058
1059 config.addOutputVar('EventInfo', alg.scaleFactorOutputDecoration, f'weight_{self._prefix}_effSF{suffix}', auxType="float")
1060
1061

◆ suffix()

python.JetAnalysisConfig._JvtWorkingPointBase.suffix ( self)
inherited

Definition at line 966 of file JetAnalysisConfig.py.

966 def suffix (self) :
967 return f"_{self.workingPoint()}" if self.useSuffix else ""
968
969

◆ workingPoint()

python.JetAnalysisConfig._JvtWorkingPointBase.workingPoint ( self)
inherited

Definition at line 963 of file JetAnalysisConfig.py.

963 def workingPoint (self) :
964 return getattr(self, self._wpOption)
965

Member Data Documentation

◆ _wpOption

python.JetAnalysisConfig._JvtWorkingPointBase._wpOption
protectedinherited

Definition at line 952 of file JetAnalysisConfig.py.


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