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 1029 of file JetAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.JetAnalysisConfig._JvtWorkingPointEventEfficiencyBase.__init__ ( self)

Definition at line 1032 of file JetAnalysisConfig.py.

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

Member Function Documentation

◆ instanceName()

python.JetAnalysisConfig._JvtWorkingPointBase.instanceName ( self)
inherited

Definition at line 958 of file JetAnalysisConfig.py.

958 def instanceName (self) :
959 return self.containerName + '_' + self.selectionName
960

◆ makeAlgs()

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

Definition at line 1045 of file JetAnalysisConfig.py.

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

◆ suffix()

python.JetAnalysisConfig._JvtWorkingPointBase.suffix ( self)
inherited

Definition at line 964 of file JetAnalysisConfig.py.

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

◆ workingPoint()

python.JetAnalysisConfig._JvtWorkingPointBase.workingPoint ( self)
inherited

Definition at line 961 of file JetAnalysisConfig.py.

961 def workingPoint (self) :
962 return getattr(self, self._wpOption)
963

Member Data Documentation

◆ _wpOption

python.JetAnalysisConfig._JvtWorkingPointBase._wpOption
protectedinherited

Definition at line 950 of file JetAnalysisConfig.py.


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