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

Public Member Functions

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

Public Attributes

str jetCollection = 'AntiKt4EMPFlowJets' :
 containerName
 runOriginalObjectLink

Detailed Description

the ConfigBlock for the common preprocessing of jet sequences

Definition at line 15 of file JetAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.JetAnalysisConfig.PreJetAnalysisConfig.__init__ ( self)

Definition at line 18 of file JetAnalysisConfig.py.

18 def __init__ (self) :
19 super (PreJetAnalysisConfig, self).__init__ ()
20 self.addOption ('containerName', '', type=str,
21 noneAction='error',
22 info="the name of the output container after calibration.")
23 self.addOption ('jetCollection', '', type=str,
24 noneAction='error',
25 info="the jet container to run on. It is interpreted to determine "
26 "the correct config blocks to call for small- or large-R jets.")
27 self.addOption('outputTruthLabelIDs', False, type=bool,
28 info='Enable or disable HadronConeExclTruthLabelID and PartonTruthLabelID decorations')
29 # TODO: add info string
30 self.addOption ('runOriginalObjectLink', False, type=bool,
31 info="")
32 self.addOption ('runGhostMuonAssociation', None, type=bool,
33 info="whether to set up the jet-ghost-muon association algorithm "
34 "CP::JetGhostMuonAssociationAlg. The default is True for non-PHYSLITE and False for PHYSLITE.")
35 self.addOption ('runTruthJetTagging', None, type=bool,
36 info="whether to set up the jet truth tagging algorithm "
37 "CP::JetTruthTagAlg. The default is True.")
38

Member Function Documentation

◆ instanceName()

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

Definition at line 39 of file JetAnalysisConfig.py.

39 def instanceName (self) :
40 """Return the instance name for this block"""
41 return self.containerName
42

◆ makeAlgs()

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

Definition at line 43 of file JetAnalysisConfig.py.

43 def makeAlgs (self, config) :
44
45
46 if config.isPhyslite() and self.jetCollection == 'AntiKt4EMPFlowJets' :
47 config.setSourceName (self.containerName, "AnalysisJets", originalName = self.jetCollection)
48 elif config.isPhyslite() and self.jetCollection == 'AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets' :
49 config.setSourceName (self.containerName, "AnalysisLargeRJets", originalName = self.jetCollection)
50 else :
51 config.setSourceName (self.containerName, self.jetCollection, originalName = self.jetCollection)
52
53 # Relink original jets in case of b-tagging calibration
54 if self.runOriginalObjectLink :
55 alg = config.createAlgorithm( 'CP::AsgOriginalObjectLinkAlg',
56 'JetOriginalObjectLinkAlg',
57 reentrant=True )
58 alg.baseContainerName = self.jetCollection
59 alg.particles = config.readName (self.containerName)
60 if config.wantCopy (self.containerName) :
61 alg.particlesOut = config.copyName (self.containerName)
62 alg.preselection = config.getPreselection (self.containerName, '')
63
64 # Set up the jet ghost muon association algorithm:
65 if (self.runGhostMuonAssociation is None and not config.isPhyslite()) or \
66 (self.runGhostMuonAssociation is True):
67 alg = config.createAlgorithm( 'CP::JetGhostMuonAssociationAlg',
68 'JetGhostMuonAssociationAlg' )
69 alg.jets = config.readName (self.containerName)
70 if config.isPhyslite():
71 alg.muons = "AnalysisMuons"
72 if config.wantCopy (self.containerName) :
73 alg.jetsOut = config.copyName (self.containerName)
74
75 # NB: I'm assuming that the truth tagging is done in PHYSLITE, if not this will
76 # need to change
77 if (self.runTruthJetTagging or (self.runTruthJetTagging is None)
78 ) and config.dataType() is not DataType.Data:
79 # Decorate jets with isHS labels (required to retrieve Jvt SFs)
80 alg = config.createAlgorithm( 'CP::JetDecoratorAlg', 'JetPileupLabelAlg' )
81 config.addPrivateTool( 'decorator', 'JetPileupLabelingTool' )
82 alg.jets = config.readName (self.containerName)
83 alg.jetsOut = config.copyName (self.containerName)
84 alg.decorator.RecoJetContainer = alg.jetsOut.replace ('%SYS%', 'NOSYS')
85 alg.decorator.SuppressOutputDependence=True
86
87 # Set up shallow copy if needed and not yet done
88 if config.wantCopy (self.containerName) :
89 alg = config.createAlgorithm( 'CP::AsgShallowCopyAlg', 'JetShallowCopyAlg' )
90 alg.input = config.readName (self.containerName)
91 alg.output = config.copyName (self.containerName)
92
93 config.addOutputVar (self.containerName, 'pt', 'pt')
94 config.addOutputVar (self.containerName, 'eta', 'eta', noSys=True)
95 config.addOutputVar (self.containerName, 'phi', 'phi', noSys=True)
96 config.addOutputVar (self.containerName, 'charge', 'charge', noSys=True, enabled=False)
97
98 if self.outputTruthLabelIDs and config.dataType() is not DataType.Data:
99 config.addOutputVar (self.containerName, 'HadronConeExclTruthLabelID', 'HadronConeExclTruthLabelID', noSys=True)
100 config.addOutputVar (self.containerName, 'PartonTruthLabelID', 'PartonTruthLabelID', noSys=True)
101
102
103

Member Data Documentation

◆ containerName

python.JetAnalysisConfig.PreJetAnalysisConfig.containerName

Definition at line 47 of file JetAnalysisConfig.py.

◆ jetCollection

python.JetAnalysisConfig.PreJetAnalysisConfig.jetCollection = 'AntiKt4EMPFlowJets' :

Definition at line 46 of file JetAnalysisConfig.py.

◆ runOriginalObjectLink

python.JetAnalysisConfig.PreJetAnalysisConfig.runOriginalObjectLink

Definition at line 54 of file JetAnalysisConfig.py.


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