ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.JetAnalysisConfig.PreJetAnalysisConfig Class Reference
Inheritance diagram for python.JetAnalysisConfig.PreJetAnalysisConfig:
Collaboration diagram for python.JetAnalysisConfig.PreJetAnalysisConfig:

Public Member Functions

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

Public Attributes

 jetCollection
 

Detailed Description

the ConfigBlock for the common preprocessing of jet sequences

Definition at line 16 of file JetAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def python.JetAnalysisConfig.PreJetAnalysisConfig.__init__ (   self)

Definition at line 19 of file JetAnalysisConfig.py.

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

Member Function Documentation

◆ instanceName()

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

Definition at line 40 of file JetAnalysisConfig.py.

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

◆ makeAlgs()

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

Definition at line 44 of file JetAnalysisConfig.py.

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

Member Data Documentation

◆ jetCollection

python.JetAnalysisConfig.PreJetAnalysisConfig.jetCollection

Definition at line 47 of file JetAnalysisConfig.py.


The documentation for this class was generated from the following file:
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18