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, containerName='', jetCollection='')
 
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,
  containerName = '',
  jetCollection = '' 
)

Definition at line 19 of file JetAnalysisConfig.py.

19  def __init__ (self, containerName='', jetCollection='') :
20  super (PreJetAnalysisConfig, self).__init__ ()
21  self.addOption ('containerName', containerName, type=str,
22  noneAction='error',
23  info="the name of the output container after calibration.")
24  self.addOption ('jetCollection', 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  # TODO: add info string
29  self.addOption ('runOriginalObjectLink', False, type=bool,
30  info="")
31  self.addOption ('runGhostMuonAssociation', None, type=bool,
32  info="whether to set up the jet-ghost-muon association algorithm "
33  "CP::JetGhostMuonAssociationAlg. The default is False.")
34  self.addOption ('runTruthJetTagging', None, type=bool,
35  info="whether to set up the jet truth tagging algorithm "
36  "CP::JetTruthTagAlg. The default is True.")
37 
38 

Member Function Documentation

◆ makeAlgs()

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

Definition at line 39 of file JetAnalysisConfig.py.

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

Member Data Documentation

◆ jetCollection

python.JetAnalysisConfig.PreJetAnalysisConfig.jetCollection

Definition at line 42 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