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

Public Member Functions

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

Public Attributes

 doPtCorr

Detailed Description

the ConfigBlock for the b-jet calibration sequence

Definition at line 8 of file BJetCalibAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.BJetCalibAnalysisConfig.BJetCalibAnalysisConfig.__init__ ( self)

Definition at line 11 of file BJetCalibAnalysisConfig.py.

11 def __init__ (self) :
12 super (BJetCalibAnalysisConfig, self).__init__ ()
13 self.setBlockName('BJetCalib')
14 self.addDependency('FTag', required=False)
15 self.addDependency('Muons', required=True)
16 self.addDependency('MuonsWorkingPoint', required=False)
17 self.addOption ('containerName', '', type=str,
18 noneAction='error',
19 info="the name of the input jet container.")
20 self.addOption ('muonContainerName', '', type=str,
21 noneAction='error',
22 info="the name of the input muon container.")
23 self.addOption ('jetPreselection', "", type=str,
24 info="the jet preselection")
25 self.addOption ('muonPreselection', "", type=str,
26 info="the muon preselection")
27 self.addOption ('doPtCorr', True, type=bool,
28 info="whether to run the b-jet pT correction on top of the muon-in-jet one")
29

Member Function Documentation

◆ instanceName()

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

Definition at line 30 of file BJetCalibAnalysisConfig.py.

30 def instanceName (self) :
31 """Return the instance name for this block"""
32 return self.containerName
33

◆ makeAlgs()

python.BJetCalibAnalysisConfig.BJetCalibAnalysisConfig.makeAlgs ( self,
config )

Definition at line 34 of file BJetCalibAnalysisConfig.py.

34 def makeAlgs(self, config):
35
36 # Set up kinematic selection for which ftag selection should be used downstream
37 jetPreselection = config.getFullSelection(self.containerName, self.jetPreselection)
38 if jetPreselection:
39 alg = config.createAlgorithm('CP::AsgSelectionAlg',
40 'FtagPTEtaCutAlg')
41 alg.selectionDecoration = 'selectPtEtaFtag'
42 config.addPrivateTool('selectionTool', 'CP::AsgPtEtaSelectionTool')
43 alg.selectionTool.maxEta = 2.5
44 alg.selectionTool.minPt = 20. * Units.GeV
45 alg.particles = config.readName(self.containerName)
46 alg.preselection = config.getPreselection(self.containerName, '')
47 jetPreselection = "selectPtEtaFtag&&"+jetPreselection
48
49 alg = config.createAlgorithm('CP::BJetCalibrationAlg',
50 'BJetCalibAlg')
51 alg.muons = config.readName(self.muonContainerName)
52 alg.muonPreselection = config.getPreselection(self.muonContainerName,
53 self.muonPreselection)
54 alg.jets = config.readName(self.containerName)
55 alg.jetPreselection = jetPreselection
56 alg.jetsOut = config.copyName(self.containerName)
57
58 config.addPrivateTool('muonInJetTool', 'MuonInJetCorrectionTool')
59 # Adjust dR matching for large-R jets
60 if "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets" in alg.jets:
61 alg.muonInJetTool.doLargeR = True
62
63 if self.doPtCorr:
64 config.addPrivateTool('bJetTool', 'BJetCorrectionTool')
65
66 # (re-)decorate jets with the updated energy
67 alg = config.createAlgorithm( 'CP::AsgEnergyDecoratorAlg', 'EnergyDecoratorBJetCalib' )
68 alg.particles = config.readName (self.containerName)

Member Data Documentation

◆ doPtCorr

python.BJetCalibAnalysisConfig.BJetCalibAnalysisConfig.doPtCorr

Definition at line 63 of file BJetCalibAnalysisConfig.py.


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