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

Public Member Functions

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

Public Attributes

 containerName

Detailed Description

the ConfigBlock for the Xbb tagging config

Definition at line 6 of file XbbAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.XbbAnalysisConfig.XbbConfig.__init__ ( self)

Definition at line 8 of file XbbAnalysisConfig.py.

8 def __init__ (self):
9 super (XbbConfig, self).__init__ ()
10 self.setBlockName('Xbb')
11 self.addOption ('containerName', '', type=str,
12 noneAction='error',
13 info="the name of the input container.",
14 meta={'role':'containerRef'})
15 self.addOption('XbbWP', 'FlatMassQCDEff_0p25', type=str,
16 info="the Xbb tagging WP." )
17 self.addOption('Xbbtagger', 'GN2Xv01', type=str,
18 info="the output name of the Xbb tagger - should match the first level key of the calibration json file." )
19 self.addOption('calibFile', None, type=str,
20 info="path to a Xbb JSON calibration file.")
21 self.addOption('noEffSF', False, type=bool,
22 info="do not compute the efficiency SF.")
23

Member Function Documentation

◆ instanceName()

python.XbbAnalysisConfig.XbbConfig.instanceName ( self)
Return the instance name for this block

Definition at line 24 of file XbbAnalysisConfig.py.

24 def instanceName (self) :
25 """Return the instance name for this block"""
26 return self.containerName + '_' + self.Xbbtagger + '_' + self.XbbWP
27

◆ makeAlgs()

python.XbbAnalysisConfig.XbbConfig.makeAlgs ( self,
config )

Definition at line 28 of file XbbAnalysisConfig.py.

28 def makeAlgs(self, config):
29
30 jetContainer = config.originalName(self.containerName)
31 selectionName = f'{self.Xbbtagger}_{self.XbbWP}'
32
33 alg = config.createAlgorithm( 'CP::XbbInformationDecoratorAlg', 'XbbInfoAlg' )
34 config.addPrivateTool('selectionTool', 'BTaggingSelectionJsonTool' )
35 alg.selectionTool.MaxEta = 4.5
36 alg.selectionTool.MinPt = 0.
37 alg.selectionTool.OutputName = self.Xbbtagger
38 alg.selectionTool.JetAuthor = jetContainer
39 alg.selectionTool.OperatingPoint = self.XbbWP
40 alg.selectionTool.JsonConfigFile = self.calibFile
41 alg.preselection = config.getPreselection (self.containerName, '')
42
43 alg.taggerDecisionDecoration = 'xbb_select_' + selectionName
44 alg.jets = config.readName (self.containerName)
45 config.addOutputVar (self.containerName, 'xbb_select_' + selectionName, selectionName + '_select', noSys=True)
46
47 if not self.noEffSF and config.dataType() != DataType.Data:
48 alg = config.createAlgorithm( 'CP::XbbEfficiencyAlg',
49 'XbbSFAlg' )
50 config.addPrivateTool('efficiencyTool', 'BTaggingEfficiencyJsonTool' )
51 alg.efficiencyTool.MaxEta = 4.5
52 alg.efficiencyTool.MinPt = 0.
53 alg.efficiencyTool.OutputName = self.Xbbtagger
54 alg.efficiencyTool.JetAuthor = jetContainer
55 alg.efficiencyTool.OperatingPoint = self.XbbWP
56 alg.efficiencyTool.JsonConfigFile = self.calibFile
57 alg.preselection = config.getPreselection (self.containerName, '')
58
59 alg.scaleFactorDecoration = 'xbb_effSF_' + selectionName + '_%SYS%'
60 alg.jets = config.readName (self.containerName)
61 config.addOutputVar (self.containerName, alg.scaleFactorDecoration, selectionName + '_effSF')

Member Data Documentation

◆ containerName

python.XbbAnalysisConfig.XbbConfig.containerName

Definition at line 45 of file XbbAnalysisConfig.py.


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