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

Public Member Functions

def __init__ (self, containerName='')
 
def makeAlgs (self, config)
 

Detailed Description

the ConfigBlock for the MET configuration

Definition at line 8 of file MetAnalysisConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def python.MetAnalysisConfig.MetAnalysisConfig.__init__ (   self,
  containerName = '' 
)

Definition at line 11 of file MetAnalysisConfig.py.

11  def __init__ (self, containerName='') :
12  super (MetAnalysisConfig, self).__init__ ()
13  self.addOption('containerName', containerName, type=str,
14  noneAction='error',
15  info="the name of the input container")
16  self.addOption ('useJVT', True, type=bool,
17  info="whether to use the JVT decision in the calculation")
18  self.addOption ('useFJVT', False, type=bool,
19  info="whether to use the forward JVT decision in the calculation")
20  self.addOption ('treatPUJets', False, type=bool,
21  info="whether to treat pile-up jets in the MET significance calculation")
22  self.addOption ('setMuonJetEMScale', True, type=bool,
23  info="enables the handling of muons in jets for the MET calculation. "
24  "Should be turned off for analyses where muons are not reconstructed "
25  "at all.")
26  self.addOption ('jets', "", type=str,
27  info="the input jet container")
28  self.addOption ('electrons', "", type=str,
29  info="the input electron container, with a possible selection, in "
30  "the format `container` or `container.selection`")
31  self.addOption ('muons', "", type=str,
32  info="the input muon container, with a possible selection, in the "
33  "format `container` or `container.selection`")
34  self.addOption ('photons', "", type=str,
35  info="the input photon container, with a possible selection, in "
36  "the format `container` or `container.selection`")
37  self.addOption ('taus', "", type=str,
38  info="the input tau-jet container, with a possible selection, in "
39  "the format `container` or `container.selection`")
40  self.addOption ('invisible', "", type=str,
41  info="any input container to be treated as invisible particles, "
42  "in the format `container` (no selection)")
43  self.addOption ('metWP', "Tight", type=str,
44  info="the MET working point to use: Loose, Tight, Tighter, "
45  "Tenacious")
46  self.addOption ('skipSystematicJetSelection', False, type=bool,
47  info="EXPERIMENTAL: whether to use simplified OR based on nominal jets "
48  "and for jet-related systematics only. "
49  "WARNING: this option is strictly for doing physics studies of the feasibility "
50  "of this OR scheme, it should not be used in a regular analysis")
51  self.addOption ('saveSignificance', True, type=bool,
52  info="whether to save the MET significance (default=True)")
53 
54 

Member Function Documentation

◆ makeAlgs()

def python.MetAnalysisConfig.MetAnalysisConfig.makeAlgs (   self,
  config 
)

Definition at line 55 of file MetAnalysisConfig.py.

55  def makeAlgs (self, config) :
56 
57  if config.isPhyslite() :
58  metSuffix = 'AnalysisMET'
59  else :
60  jetContainer = config.originalName (self.jets)
61  metSuffix = jetContainer[:-4]
62 
63  if not self.useFJVT and self.treatPUJets:
64  raise ValueError ("MET significance pile-up treatment requires fJVT")
65 
66  # Remove b-tagging calibration from the MET suffix name
67  btIndex = metSuffix.find('_BTagging')
68  if btIndex != -1:
69  metSuffix = metSuffix[:btIndex]
70 
71  # Set up the met maker algorithm:
72  alg = config.createAlgorithm( 'CP::MetMakerAlg', 'MetMakerAlg' + self.containerName )
73  config.addPrivateTool( 'makerTool', 'met::METMaker' )
74  alg.makerTool.skipSystematicJetSelection = self.skipSystematicJetSelection
75 
76  alg.doJetJVT = self.useJVT
77  if self.useJVT:
78  config.addPrivateTool( 'makerTool.JvtSelTool', 'CP::NNJvtSelectionTool' )
79  alg.makerTool.JvtSelTool.JetContainer = config.readName (self.jets)
80  if self.useFJVT:
81  alg.makerTool.JetRejectionDec = 'passFJVT_internal'
82 
83  alg.makerTool.JetSelection = self.metWP
84  alg.makerTool.DoPFlow = 'PFlow' in metSuffix or metSuffix=="AnalysisMET"
85  alg.makerTool.DoSetMuonJetEMScale = self.setMuonJetEMScale
86 
87  if config.dataType() is not DataType.Data :
88  config.addPrivateTool( 'systematicsTool', 'met::METSystematicsTool' )
89 
90  alg.metCore = 'MET_Core_' + metSuffix
91  alg.metAssociation = 'METAssoc_' + metSuffix
92  alg.jets = config.readName (self.jets)
93  if self.muons != "" :
94  alg.muons, alg.muonsSelection = config.readNameAndSelection (self.muons, excludeFrom={'or'})
95  if self.electrons != "" :
96  alg.electrons, alg.electronsSelection = config.readNameAndSelection (self.electrons, excludeFrom={'or'})
97  if self.photons != "" :
98  alg.photons, alg.photonsSelection = config.readNameAndSelection (self.photons, excludeFrom={'or'})
99  if self.taus != "" :
100  alg.taus, alg.tausSelection = config.readNameAndSelection (self.taus, excludeFrom={'or'})
101  if self.invisible != "" :
102  alg.invisible = config.readName (self.invisible)
103  alg.met = config.writeName (self.containerName, isMet = True)
104 
105 
106  # Set up the met builder algorithm:
107  alg = config.createAlgorithm( 'CP::MetBuilderAlg', 'MetBuilderAlg' + self.containerName )
108  alg.met = config.readName (self.containerName)
109 
110 
111  # Set up the met significance algorithm:
112  if self.saveSignificance:
113  alg = config.createAlgorithm( 'CP::MetSignificanceAlg', 'MetSignificanceAlg' + self.containerName )
114  config.addPrivateTool( 'significanceTool', 'met::METSignificance' )
115  if self.muons != "" :
116  config.addPrivateTool( 'significanceTool.MuonCalibTool', 'CP::MuonCalibTool' )
117  alg.significanceTool.MuonCalibTool.calibMode = config._muonCalibMode
118 
119  alg.significanceTool.SoftTermParam = 0
120  alg.significanceTool.TreatPUJets = self.treatPUJets
121  alg.significanceTool.IsAFII = config.dataType() is DataType.FastSim
122  alg.met = config.readName (self.containerName)
123  config.addOutputVar (self.containerName, 'significance', 'significance')
124 
125  config.addOutputVar (self.containerName, 'met', 'met')
126  config.addOutputVar (self.containerName, 'phi', 'phi')
127  config.addOutputVar (self.containerName, 'sumet', 'sumet')
128 
129 

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