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

Member Function Documentation

◆ makeAlgs()

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

Definition at line 56 of file MetAnalysisConfig.py.

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

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