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

Constructor & Destructor Documentation

◆ __init__()

def 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()

def 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()

def 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 (
78  self.runTruthJetTagging is None
79  and config.dataType() is not DataType.Data
80  ):
81  # Decorate jets with isHS labels (required to retrieve Jvt SFs)
82  alg = config.createAlgorithm( 'CP::JetDecoratorAlg', 'JetPileupLabelAlg' )
83  config.addPrivateTool( 'decorator', 'JetPileupLabelingTool' )
84  alg.jets = config.readName (self.containerName)
85  alg.jetsOut = config.copyName (self.containerName)
86  alg.decorator.RecoJetContainer = alg.jetsOut.replace ('%SYS%', 'NOSYS')
87  alg.decorator.SuppressOutputDependence=True
88 
89  # Set up shallow copy if needed and not yet done
90  if config.wantCopy (self.containerName) :
91  alg = config.createAlgorithm( 'CP::AsgShallowCopyAlg', 'JetShallowCopyAlg' )
92  alg.input = config.readName (self.containerName)
93  alg.output = config.copyName (self.containerName)
94 
95  config.addOutputVar (self.containerName, 'pt', 'pt')
96  config.addOutputVar (self.containerName, 'eta', 'eta', noSys=True)
97  config.addOutputVar (self.containerName, 'phi', 'phi', noSys=True)
98  config.addOutputVar (self.containerName, 'charge', 'charge', noSys=True, enabled=False)
99 
100  if self.outputTruthLabelIDs and config.dataType() is not DataType.Data:
101  config.addOutputVar (self.containerName, 'HadronConeExclTruthLabelID', 'HadronConeExclTruthLabelID', noSys=True)
102  config.addOutputVar (self.containerName, 'PartonTruthLabelID', 'PartonTruthLabelID', noSys=True)
103 
104 
105 

Member Data Documentation

◆ jetCollection

python.JetAnalysisConfig.PreJetAnalysisConfig.jetCollection

Definition at line 46 of file JetAnalysisConfig.py.


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