ATLAS Offline Software
JetAnalysisConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 
4 from __future__ import print_function
5 
6 # AnaAlgorithm import(s):
7 from AnalysisAlgorithmsConfig.ConfigBlock import ConfigBlock
8 from AnalysisAlgorithmsConfig.ConfigSequence import groupBlocks
9 from AnalysisAlgorithmsConfig.ConfigAccumulator import DataType
10 from AthenaCommon.SystemOfUnits import GeV
11 from AthenaConfiguration.Enums import LHCPeriod
12 from AthenaCommon.Logging import logging
13 import re
14 
15 
16 class PreJetAnalysisConfig (ConfigBlock) :
17  """the ConfigBlock for the common preprocessing of jet sequences"""
18 
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 
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 
97 class SmallRJetAnalysisConfig (ConfigBlock) :
98  """the ConfigBlock for the small-r jet sequence"""
99 
100  def __init__ (self, containerName='', jetCollection='', jetInput='') :
101  super (SmallRJetAnalysisConfig, self).__init__ ()
102  self.addOption ('containerName', containerName, type=str,
103  noneAction='error',
104  info="the name of the output container after calibration.")
105  self.addOption ('jetCollection', jetCollection, type=str,
106  noneAction='error',
107  info="the jet container to run on. It is interpreted to determine "
108  "the correct config blocks to call for small- or large-R jets.")
109  # TODO: add info string
110  self.addOption ('jetInput', jetInput, type=str,
111  noneAction='error',
112  info="")
113  self.addOption ('runJvtUpdate', False, type=bool,
114  info="whether to update the JVT. The default is False.")
115  self.addOption ('runNNJvtUpdate', False, type=bool,
116  info="whether to update the NN-JVT. The default is False.")
117  self.addOption ('runFJvtUpdate', False, type=bool,
118  info="whether to update the forward JVT. The default is False.")
119  self.addOption ('runJvtSelection', True, type=bool,
120  info="whether to run JVT selection. The default is True.")
121  self.addOption ('runFJvtSelection', False, type=bool,
122  info="whether to run forward JVT selection. The default is False.")
123  self.addOption ('jvtWP', "FixedEffPt", type=str,
124  info="which Jvt WP to apply. The default is FixedEffPt.")
125  self.addOption ('fJvtWP', "Loose", type=str,
126  info="which fJvt WP to apply. The default is Loose.")
127  self.addOption ('runJvtEfficiency', True, type=bool,
128  info="whether to calculate the JVT efficiency. The default is True.")
129  self.addOption ('runFJvtEfficiency', False, type=bool,
130  info="whether to calculate the forward JVT efficiency. The default is False.")
131  self.addOption ('systematicsModelJES', "Category", type=str,
132  info="the NP reduction scheme to use for JES: All, Global, Category, "
133  "Scenario. The default is Category.")
134  self.addOption ('systematicsModelJER', "Full", type=str,
135  info="the NP reduction scheme to use for JER: All, Full, Simple. The "
136  "default is Full.")
137  self.addOption ('runJERsystematicsOnData', False, type=bool,
138  info="whether to run the All/Full JER model variations also on data samples. Expert option!")
139  self.addOption ('recalibratePhyslite', True, type=bool,
140  info="whether to run the CP::JetCalibrationAlg on PHYSLITE derivations. "
141  "The default is True.")
142  # Calibration tool options
143  self.addOption ('calibToolConfigFile', None, type=str,
144  info="name (str) of the config file to use for the jet calibration "
145  "tool. Expert option to override JetETmiss recommendations. The "
146  "default is None.")
147  self.addOption ('calibToolCalibArea', None, type=str,
148  info="name (str) of the CVMFS area to use for the jet calibration "
149  "tool. Expert option to override JetETmiss recommendations. The "
150  "default is None.")
151  self.addOption ('calibToolCalibSeq', None, type=str,
152  info="name (str) of the sequence to use for the jet calibration "
153  "tool (e.g. 'JetArea_Residual_EtaJES_GSC'). Expert option to override "
154  "JetETmiss recommendations. The default is None.")
155  # Uncertainties tool options
156  self.addOption ('uncertToolConfigPath', None, type=str,
157  info="name (str) of the config file to use for the jet uncertainty "
158  "tool. Expert option to override JetETmiss recommendations. The "
159  "default is None.")
160  self.addOption ('uncertToolCalibArea', None, type=str,
161  info="name (str) of the CVMFS area to use for the jet uncertainty "
162  "tool. Expert option to override JetETmiss recommendations. The "
163  "default is None.")
164  self.addOption ('uncertToolMCType', None, type=str,
165  info="data type (str) to use for the jet uncertainty tool (e.g. "
166  "'AF3' or 'MC16'). Expert option to override JetETmiss "
167  "recommendations. The default is None.")
168 
169 
170  def getUncertaintyToolSettings(self, config):
171 
172  # Retrieve appropriate JES/JER recommendations for the JetUncertaintiesTool.
173  # We do this separately from the tool declaration, as we may need to set uo
174  # two such tools, but they have to be private.
175 
176  # Config file:
177  config_file = None
178  if self.systematicsModelJES == "All" and self.systematicsModelJER == "All":
179  config_file = "R4_AllNuisanceParameters_AllJERNP.config"
180  elif "Scenario" in self.systematicsModelJES:
181  if self.systematicsModelJER != "Simple":
182  raise ValueError(
183  "Invalid uncertainty configuration - Scenario* systematicsModelJESs can "
184  "only be used together with the Simple systematicsModelJER")
185  config_file = "R4_{0}_SimpleJER.config".format(self.systematicsModelJES)
186  elif self.systematicsModelJES in ["Global", "Category"] and self.systematicsModelJER in ["Simple", "Full"]:
187  config_file = "R4_{0}Reduction_{1}JER.config".format(self.systematicsModelJES, self.systematicsModelJER)
188  else:
189  raise ValueError(
190  "Invalid combination of systematicsModelJES and systematicsModelJER settings: "
191  "systematicsModelJES: {0}, systematicsModelJER: {1}".format(self.systematicsModelJES, self.systematicsModelJER) )
192 
193  # Calibration area:
194  calib_area = None
195  if self.uncertToolCalibArea is not None:
196  calib_area = self.uncertToolCalibArea
197 
198  # Expert override for config path:
199  if self.uncertToolConfigPath is not None:
200  config_file = self.uncertToolConfigPath
201  else:
202  if config.geometry() is LHCPeriod.Run2:
203  config_file = "rel22/Summer2023_PreRec/" + config_file
204  else:
205  config_file = "rel22/Summer2024_PreRec/" + config_file
206 
207  # MC type:
208  mc_type = None
209  if self.uncertToolMCType is not None:
210  mc_type = self.uncertToolMCType
211  else:
212  if config.dataType() is DataType.FastSim and config.geometry() is LHCPeriod.Run2:
213  # not supported for Run 3 yet!
214  mc_type = "AF3"
215  else:
216  if config.geometry() is LHCPeriod.Run2:
217  mc_type = "MC20"
218  else:
219  mc_type = "MC23"
220 
221  return config_file, calib_area, mc_type
222 
223 
224  def createUncertaintyTool(self, jetUncertaintiesAlg, config, jetCollectionName, doPseudoData=False):
225 
226  # Create an instance of JetUncertaintiesTool, following JetETmiss recommendations.
227  # To run Jet Energy Resolution (JER) uncertainties in the "Full" or "All" schemes,
228  # we need two sets of tools: one configured as normal (MC), the other with the
229  # exact same settings but pretending to run on data (pseudo-data).
230  # This is achieved by passing "isPseudoData=True" to the arguments.
231 
232  # Retrieve the common configuration settings
233  configFile, calibArea, mcType = self.getUncertaintyToolSettings(config)
234 
235  # The main tool for all JES+JER combinations
236  config.addPrivateTool( 'uncertaintiesTool', 'JetUncertaintiesTool' )
237  jetUncertaintiesAlg.uncertaintiesTool.JetDefinition = jetCollectionName[:-4]
238  jetUncertaintiesAlg.uncertaintiesTool.ConfigFile = configFile
239  if calibArea is not None:
240  jetUncertaintiesAlg.uncertaintiesTool.CalibArea = calibArea
241  jetUncertaintiesAlg.uncertaintiesTool.MCType = mcType
242  jetUncertaintiesAlg.uncertaintiesTool.IsData = (config.dataType() is DataType.Data)
243  jetUncertaintiesAlg.uncertaintiesTool.PseudoDataJERsmearingMode = False
244 
245  if config.dataType() is DataType.Data and not (doPseudoData and self.runJERsystematicsOnData):
246  # we don't want any systematics on data if we're not using the right JER model!
247  jetUncertaintiesAlg.affectingSystematicsFilter = '.*'
248  if config.dataType() is not DataType.Data and doPseudoData and not self.runJERsystematicsOnData:
249  # The secondary tool for pseudo-data JER smearing
250  config.addPrivateTool( 'uncertaintiesToolPD', 'JetUncertaintiesTool' )
251  jetUncertaintiesAlg.uncertaintiesToolPD.JetDefinition = jetCollectionName[:-4]
252  jetUncertaintiesAlg.uncertaintiesToolPD.ConfigFile = configFile
253  if calibArea is not None:
254  jetUncertaintiesAlg.uncertaintiesToolPD.CalibArea = calibArea
255  jetUncertaintiesAlg.uncertaintiesToolPD.MCType = mcType
256 
257  # This is the part that is different!
258  jetUncertaintiesAlg.uncertaintiesToolPD.IsData = True
259  jetUncertaintiesAlg.uncertaintiesToolPD.PseudoDataJERsmearingMode = True
260 
261 
262  def makeAlgs (self, config) :
263 
264  jetCollectionName=self.jetCollection
265  if(self.jetCollection=="AnalysisJets") :
266  jetCollectionName="AntiKt4EMPFlowJets"
267  if(self.jetCollection=="AnalysisLargeRJets") :
268  jetCollectionName="AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"
269 
270  if self.jetInput not in ["EMTopo", "EMPFlow"]:
271  raise ValueError(
272  "Unsupported input type '{0}' for R=0.4 jets!".format(self.jetInput) )
273 
274  if self.jvtWP not in ["FixedEffPt"]:
275  raise ValueError(
276  "Unsupported NNJvt WP '{0}'".format(self.jvtWP) )
277 
278  if self.fJvtWP not in ["Loose", "Tight", "Tighter"]:
279  raise ValueError(
280  "Unsupported fJvt WP '{0}'".format(self.fJvtWP) )
281 
282  if not config.isPhyslite() or self.recalibratePhyslite:
283  # Prepare the jet calibration algorithm
284  alg = config.createAlgorithm( 'CP::JetCalibrationAlg', 'JetCalibrationAlg'+self.containerName )
285  config.addPrivateTool( 'calibrationTool', 'JetCalibrationTool' )
286  alg.calibrationTool.JetCollection = jetCollectionName[:-4]
287  # Get the correct string to use in the config file name
288  if self.jetInput == "EMPFlow":
289  if config.geometry() is LHCPeriod.Run2:
290  configFile = "PreRec_R22_PFlow_ResPU_EtaJES_GSC_February23_230215.config"
291  alg.calibrationTool.CalibArea = "00-04-82"
292  elif config.geometry() >= LHCPeriod.Run3:
293  configFile = "AntiKt4EMPFlow_MC23a_PreRecR22_Phase2_CalibConfig_ResPU_EtaJES_GSC_240306_InSitu.config"
294  alg.calibrationTool.CalibArea = "00-04-83"
295  else:
296  if config.dataType() is DataType.FastSim:
297  configFile = "JES_MC16Recommendation_AFII_{0}_Apr2019_Rel21.config"
298  else:
299  configFile = "JES_MC16Recommendation_Consolidated_{0}_Apr2019_Rel21.config"
300  configFile = configFile.format(self.jetInput)
301  if self.calibToolCalibArea is not None:
302  alg.calibrationTool.CalibArea = self.calibToolCalibArea
303  if self.calibToolConfigFile is not None:
304  configFile = self.calibToolConfigFile
305  alg.calibrationTool.ConfigFile = configFile
306  if config.dataType() is DataType.Data:
307  alg.calibrationTool.CalibSequence = 'JetArea_Residual_EtaJES_GSC_Insitu'
308  else:
309  if self.jetInput == "EMPFlow":
310  alg.calibrationTool.CalibSequence = 'JetArea_Residual_EtaJES_GSC'
311  else:
312  alg.calibrationTool.CalibSequence = 'JetArea_Residual_EtaJES_GSC_Smear'
313  if self.calibToolCalibSeq is not None:
314  alg.calibrationTool.CalibSequence = self.calibToolCalibSeq
315  alg.calibrationTool.IsData = (config.dataType() is DataType.Data)
316  alg.jets = config.readName (self.containerName)
317  alg.jetsOut = config.copyName (self.containerName)
318 
319  # Jet uncertainties
320  alg = config.createAlgorithm( 'CP::JetUncertaintiesAlg', 'JetUncertaintiesAlg'+self.containerName )
321  self.createUncertaintyTool(alg, config, jetCollectionName, doPseudoData=( self.systematicsModelJER in ["Full","All"] ))
322  alg.jets = config.readName (self.containerName)
323  alg.jetsOut = config.copyName (self.containerName)
324  alg.preselection = config.getPreselection (self.containerName, '')
325 
326  # Set up the JVT update algorithm:
327  if self.runJvtUpdate :
328  alg = config.createAlgorithm( 'CP::JvtUpdateAlg', 'JvtUpdateAlg'+self.containerName )
329  config.addPrivateTool( 'jvtTool', 'JetVertexTaggerTool' )
330  alg.jvtTool.JetContainer = self.jetCollection
331  alg.jvtTool.SuppressInputDependence=True
332  alg.jets = config.readName (self.containerName)
333  alg.jetsOut = config.copyName (self.containerName)
334  alg.preselection = config.getPreselection (self.containerName, '')
335 
336  if self.runNNJvtUpdate:
337  assert self.jetInput=="EMPFlow", "NN JVT only defined for PFlow jets"
338  alg = config.createAlgorithm( 'CP::JetDecoratorAlg', 'NNJvtUpdateAlg'+self.containerName )
339  config.addPrivateTool( 'decorator', 'JetPileupTag::JetVertexNNTagger' )
340  # Set this actually to the *output* collection
341  alg.jets = config.readName (self.containerName)
342  alg.jetsOut = config.copyName (self.containerName)
343  alg.decorator.JetContainer = alg.jetsOut.replace ('%SYS%', 'NOSYS')
344  alg.decorator.SuppressInputDependence=True
345  alg.decorator.SuppressOutputDependence=True
346 
347  if self.runFJvtUpdate :
348  alg = config.createAlgorithm( 'CP::JetModifierAlg', 'JetModifierAlg'+self.containerName )
349  config.addPrivateTool( 'modifierTool', 'JetForwardJvtTool')
350  alg.modifierTool.OutputDec = "passFJVT_internal" #Output decoration
351  alg.modifierTool.FJVTName = "fJVT"
352  # fJVT WPs depend on the MET WP
353  # see https://twiki.cern.ch/twiki/bin/view/AtlasProtected/EtmissRecommendationsRel21p2#fJVT_and_MET
354  alg.modifierTool.EtaThresh = 2.5 # Eta dividing central from forward jets
355  alg.modifierTool.ForwardMaxPt = 120*GeV #Max Pt to define fwdJets for JVT
356  alg.modifierTool.RenounceOutputs = True
357  alg.jets = config.readName (self.containerName)
358  alg.jetsOut = config.copyName (self.containerName)
359 
360  # Set up the jet efficiency scale factor calculation algorithm
361  # Change the truthJetCollection property to AntiKt4TruthWZJets if preferred
362  if self.runJvtSelection :
363  assert self.jetInput=="EMPFlow", "NNJvt WPs and SFs only valid for PFlow jets"
364  alg = config.createAlgorithm('CP::AsgSelectionAlg', f'JvtSelectionAlg{self.containerName}')
365  config.addPrivateTool('selectionTool', 'CP::NNJvtSelectionTool')
366  alg.selectionTool.JetContainer = config.readName(self.containerName)
367  alg.selectionTool.WorkingPoint = self.jvtWP
368  alg.selectionTool.MaxPtForJvt = 60*GeV
369  alg.selectionDecoration = "jvt_selection,as_char"
370  alg.particles = config.readName(self.containerName)
371 
372  if self.runJvtEfficiency and config.dataType() is not DataType.Data:
373  alg = config.createAlgorithm( 'CP::JvtEfficiencyAlg', 'JvtEfficiencyAlg'+self.containerName )
374  config.addPrivateTool( 'efficiencyTool', 'CP::NNJvtEfficiencyTool' )
375  alg.efficiencyTool.JetContainer = config.readName(self.containerName)
376  alg.efficiencyTool.MaxPtForJvt = 60*GeV
377  alg.efficiencyTool.WorkingPoint = self.jvtWP
378  if config.geometry() is LHCPeriod.Run2:
379  alg.efficiencyTool.SFFile = "JetJvtEfficiency/May2024/NNJvtSFFile_Run2_EMPFlow.root"
380  else:
381  alg.efficiencyTool.SFFile = "JetJvtEfficiency/May2024/NNJvtSFFile_Run3_EMPFlow.root"
382  alg.selection = 'jvt_selection,as_char'
383  alg.scaleFactorDecoration = 'jvt_effSF_%SYS%'
384  alg.outOfValidity = 2
385  alg.outOfValidityDeco = 'no_jvt'
386  alg.skipBadEfficiency = False
387  alg.jets = config.readName (self.containerName)
388  alg.preselection = config.getPreselection (self.containerName, '')
389  config.addOutputVar (self.containerName, alg.scaleFactorDecoration, 'jvtEfficiency')
390  config.addSelection (self.containerName, 'baselineJvt', 'jvt_selection,as_char', preselection=False)
391 
392  if self.runFJvtSelection :
393  assert self.jetInput=="EMPFlow", "fJvt WPs and SFs only valid for PFlow jets"
394  alg = config.createAlgorithm('CP::AsgSelectionAlg', f'FJvtSelectionAlg{self.containerName}')
395  config.addPrivateTool('selectionTool', 'CP::FJvtSelectionTool')
396  alg.selectionTool.JetContainer = config.readName(self.containerName)
397  alg.selectionTool.WorkingPoint = self.fJvtWP
398  alg.selectionDecoration = "fjvt_selection,as_char"
399  alg.particles = config.readName(self.containerName)
400 
401  if self.runFJvtEfficiency and config.dataType() is not DataType.Data:
402  alg = config.createAlgorithm( 'CP::JvtEfficiencyAlg', 'FJvtEfficiencyAlg'+self.containerName )
403  config.addPrivateTool( 'efficiencyTool', 'CP::FJvtEfficiencyTool' )
404  alg.efficiencyTool.JetContainer = config.readName(self.containerName)
405  alg.efficiencyTool.WorkingPoint = self.fJvtWP
406  if config.geometry() is LHCPeriod.Run2:
407  alg.efficiencyTool.SFFile = "JetJvtEfficiency/May2024/fJvtSFFile_Run2_EMPFlow.root"
408  else:
409  alg.efficiencyTool.SFFile = "JetJvtEfficiency/May2024/fJvtSFFile_Run3_EMPFlow.root"
410  alg.selection = 'fjvt_selection,as_char'
411  alg.scaleFactorDecoration = 'fjvt_effSF_%SYS%'
412  alg.outOfValidity = 2
413  alg.outOfValidityDeco = 'no_fjvt'
414  alg.skipBadEfficiency = False
415  alg.jets = config.readName (self.containerName)
416  alg.preselection = config.getPreselection (self.containerName, '')
417  config.addOutputVar (self.containerName, alg.scaleFactorDecoration, 'fjvtEfficiency')
418  config.addSelection (self.containerName, 'baselineFJvt', 'fjvt_selection,as_char', preselection=False)
419 
420  # Additional decorations
421  alg = config.createAlgorithm( 'CP::AsgEnergyDecoratorAlg', 'EnergyDecorator' + self.containerName )
422  alg.particles = config.readName (self.containerName)
423 
424  config.addOutputVar (self.containerName, 'e_%SYS%', 'e')
425 
426 
427 class RScanJetAnalysisConfig (ConfigBlock) :
428  """the ConfigBlock for the r-scan jet sequence"""
429 
430  def __init__ (self, containerName='', jetCollection='', jetInput='', radius=None) :
431  super (RScanJetAnalysisConfig, self).__init__ ()
432  self.addOption ('containerName', containerName, type=str,
433  noneAction='error',
434  info="the name of the output container after calibration.")
435  self.addOption ('jetCollection', jetCollection, type=str,
436  noneAction='error',
437  info="the jet container to run on. It is interpreted to determine "
438  "the correct config blocks to call for small- or large-R jets.")
439  # TODO: add info string
440  self.addOption ('jetInput', jetInput, type=str,
441  noneAction='error',
442  info="")
443  # TODO: add info string
444  self.addOption (radius, radius, type=int,
445  noneAction='error',
446  info="")
447  self.addOption ('recalibratePhyslite', True, type=bool,
448  info="whether to run the CP::JetCalibrationAlg on PHYSLITE "
449  "derivations. The default is True.")
450 
451 
452  def makeAlgs (self, config) :
453 
454  log = logging.getLogger('RScanJetAnalysisConfig')
455 
456  jetCollectionName=self.jetCollection
457  if(self.jetCollection=="AnalysisJets") :
458  jetCollectionName="AntiKt4EMPFlowJets"
459  if(self.jetCollection=="AnalysisLargeRJets") :
460  jetCollectionName="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets"
461 
462  if not config.isPhyslite() or self.recalibratePhyslite:
463  if self.jetInput != "LCTopo":
464  raise ValueError(
465  "Unsupported input type '{0}' for R-scan jets!".format(self.jetInput) )
466  # Prepare the jet calibration algorithm
467  alg = config.createAlgorithm( 'CP::JetCalibrationAlg', 'JetCalibrationAlg'+self.containerName )
468  config.addPrivateTool( 'calibrationTool', 'JetCalibrationTool' )
469  alg.calibrationTool.JetCollection = jetCollectionName[:-4]
470  alg.calibrationTool.ConfigFile = \
471  "JES_MC16Recommendation_Rscan{0}LC_Feb2022_R21.config".format(self.radius)
472  if config.dataType() is DataType.Data:
473  alg.calibrationTool.CalibSequence = "JetArea_Residual_EtaJES_GSC_Insitu"
474  else:
475  alg.calibrationTool.CalibSequence = "JetArea_Residual_EtaJES_GSC_Smear"
476  alg.calibrationTool.IsData = (config.dataType() is DataType.Data)
477  alg.jets = config.readName (self.containerName)
478  # Logging would be good
479  log.warning("Uncertainties for R-Scan jets are not yet released!")
480 
481 
482 def _largeLCTopoConfigFile(config, self):
483  is_sim = config.dataType() in {DataType.FullSim}
484  if self.largeRMass == "Comb":
485  if config.dataType() is DataType.Data:
486  return "JES_MC16recommendation_FatJet_Trimmed_JMS_comb_March2021.config"
487  if is_sim:
488  return "JES_MC16recommendation_FatJet_Trimmed_JMS_comb_17Oct2018.config"
489  elif self.largeRMass == "Calo":
490  if config.dataType() is DataType.Data:
491  return "JES_MC16recommendation_FatJet_Trimmed_JMS_comb_March2021.config"
492  if is_sim:
493  return "JES_MC16recommendation_FatJet_Trimmed_JMS_calo_12Oct2018.config "
494  elif self.largeRMass == "TA":
495  if config.dataType() is DataType.Data:
496  return "JES_MC16recommendation_FatJet_Trimmed_JMS_comb_March2021.config"
497  if is_sim:
498  return "JES_MC16recommendation_FatJet_Trimmed_JMS_TA_12Oct2018.config"
499  return None
500 
501 
502 class LargeRJetAnalysisConfig (ConfigBlock) :
503  """the ConfigBlock for the large-r jet sequence"""
504 
505  def __init__ (self, containerName='', jetCollection='', jetInput='') :
506  super (LargeRJetAnalysisConfig, self).__init__ ()
507  self.addOption ('containerName', containerName, type=str,
508  noneAction='error',
509  info="the name of the output container after calibration.")
510  self.addOption ('jetCollection', jetCollection, type=str,
511  noneAction='error',
512  info="the jet container to run on. It is interpreted to determine "
513  "the correct config blocks to call for small- or large-R jets.")
514  # TODO: add info string
515  self.addOption ('jetInput', jetInput, type=str,
516  noneAction='error',
517  info="")
518  # TODO: add info string
519  self.addOption ('largeRMass', "Comb", type=str,
520  info="")
521  self.addOption ('recalibratePhyslite', True, type=bool,
522  info="whether to run the CP::JetCalibrationAlg on PHYSLITE "
523  "derivations. The default is True.")
524  # TODO: add info string
525  self.addOption ('configFileOverride', None, type=str,
526  info="")
527  self.addOption ('systematicsModelJER', "Full", type=str) # this is the test for JER
528  self.addOption ('runJERsystematicsOnData', False, type=bool,
529  info="whether to run the All/Full JER model variations also on data samples. Expert option!")
530  # Adding these options to override the jet uncertainty config file when we have new recommendations
531  # Calibration tool options
532  self.addOption ('calibToolConfigFile', None, type=str,
533  info="name (str) of the config file to use for the jet calibration "
534  "tool. Expert option to override JetETmiss recommendations. The "
535  "default is None.")
536  self.addOption ('calibToolCalibArea', None, type=str,
537  info="name (str) of the CVMFS area to use for the jet calibration "
538  "tool. Expert option to override JetETmiss recommendations. The "
539  "default is None.")
540  self.addOption ('calibToolCalibSeq', None, type=str,
541  info="name (str) of the sequence to use for the jet calibration "
542  "tool (e.g. 'JetArea_Residual_EtaJES_GSC'). Expert option to override "
543  "JetETmiss recommendations. The default is None.")
544  # Uncertainties tool options
545  self.addOption ('uncertToolConfigPath', None, type=str,
546  info="name (str) of the config file to use for the jet uncertainty "
547  "tool. Expert option to override JetETmiss recommendations. The "
548  "default is None.")
549  self.addOption ('uncertToolCalibArea', None, type=str,
550  info="name (str) of the CVMFS area to use for the jet uncertainty "
551  "tool. Expert option to override JetETmiss recommendations. The "
552  "default is None.")
553  self.addOption ('uncertToolMCType', None, type=str,
554  info="data type (str) to use for the jet uncertainty tool (e.g. "
555  "'AF3' or 'MC16'). Expert option to override JetETmiss "
556  "recommendations. The default is None.")
557 
558  def getUncertaintyToolSettings(self, config):
559  # Retrieve appropriate JES/JER recommendations for the JetUncertaintiesTool.
560  # We do this separately from the tool declaration, as we may need to set uo
561  # two such tools, but they have to be private.
562 
563  # Config file:
564  config_file = None
565  if self.systematicsModelJER in ["Simple", "Full"]:
566  config_file = "R10_CategoryJES_{0}JER_FullJMS.config".format(self.systematicsModelJER)
567  else:
568  raise ValueError(
569  "Invalid request for systematicsModelJER settings: "
570  "systematicsModelJER: {0}".format(self.systematicsModelJER) )
571 
572  # Calibration area:
573  calib_area = None
574  if self.uncertToolCalibArea is not None:
575  calib_area = self.uncertToolCalibArea
576 
577  # Expert override for config path:
578  if self.uncertToolConfigPath is not None:
579  config_file = self.uncertToolConfigPath
580  else:
581  if config.geometry() in [LHCPeriod.Run2, LHCPeriod.Run3]:
582  config_file = "rel22/Winter2024_PreRec/" + config_file
583  else:
584  log = logging.getLogger('LargeRJetAnalysisConfig')
585  log.warning("Uncertainties for UFO jets are not for Run 4!")
586 
587  # MC type:
588  if self.uncertToolMCType is not None:
589  mc_type = self.uncertToolMCType
590  else:
591  if config.dataType() is DataType.FastSim and config.geometry() is LHCPeriod.Run2:
592  # not supported for Run 3 yet!
593  mc_type = "AF3"
594  else:
595  if config.geometry() is LHCPeriod.Run2:
596  mc_type = "MC20"
597  else:
598  mc_type = "MC23"
599 
600  return config_file, calib_area, mc_type
601 
602  def createUncertaintyTool(self, jetUncertaintiesAlg, config, jetCollectionName, doPseudoData=False):
603 
604  # Create an instance of JetUncertaintiesTool, following JetETmiss recommendations.
605  # To run Jet Energy Resolution (JER) uncertainties in the "Full" or "All" schemes,
606  # we need two sets of tools: one configured as normal (MC), the other with the
607  # exact same settings but pretending to run on data (pseudo-data).
608  # This is achieved by passing "isPseudoData=True" to the arguments.
609 
610  # Retrieve the common configuration settings
611  configFile, calibArea, mcType = self.getUncertaintyToolSettings(config)
612 
613  # The main tool for all JER combinations
614  config.addPrivateTool( 'uncertaintiesTool', 'JetUncertaintiesTool' )
615  jetUncertaintiesAlg.uncertaintiesTool.JetDefinition = jetCollectionName[:-4]
616  jetUncertaintiesAlg.uncertaintiesTool.ConfigFile = configFile
617  if calibArea is not None:
618  jetUncertaintiesAlg.uncertaintiesTool.CalibArea = calibArea
619  jetUncertaintiesAlg.uncertaintiesTool.MCType = mcType
620  jetUncertaintiesAlg.uncertaintiesTool.IsData = (config.dataType() is DataType.Data)
621  jetUncertaintiesAlg.uncertaintiesTool.PseudoDataJERsmearingMode = False
622 
623  # JER smearing on data
624  if config.dataType() is DataType.Data and not (config.isPhyslite() and doPseudoData and self.runJERsystematicsOnData):
625  # we don't want any systematics on data if we're not using the right JER model!
626  jetUncertaintiesAlg.affectingSystematicsFilter = '.*'
627 
628  if config.dataType() is not (DataType.Data and config.isPhyslite()) and doPseudoData and not self.runJERsystematicsOnData:
629  # The secondary tool for pseudo-data JER smearing
630  config.addPrivateTool( 'uncertaintiesToolPD', 'JetUncertaintiesTool' )
631  jetUncertaintiesAlg.uncertaintiesToolPD.JetDefinition = jetCollectionName[:-4]
632  jetUncertaintiesAlg.uncertaintiesToolPD.ConfigFile = configFile
633  if calibArea is not None:
634  jetUncertaintiesAlg.uncertaintiesToolPD.CalibArea = calibArea
635  jetUncertaintiesAlg.uncertaintiesToolPD.MCType = mcType
636  jetUncertaintiesAlg.uncertaintiesToolPD.IsData = True
637  jetUncertaintiesAlg.uncertaintiesToolPD.PseudoDataJERsmearingMode = True
638 
639  def makeAlgs (self, config) :
640 
641  log = logging.getLogger('LargeRJetAnalysisConfig')
642 
643  configFile = None
644 
645  jetCollectionName=self.jetCollection
646  if(self.jetCollection=="AnalysisJets") :
647  jetCollectionName="AntiKt4EMPFlowJets"
648  if(self.jetCollection=="AnalysisLargeRJets") :
649  jetCollectionName="AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"
650 
651  if self.largeRMass not in ["Comb", "Calo", "TA"]:
652  raise ValueError ("Invalid large-R mass defintion {0}!".format(self.largeRMass) )
653 
654  if self.jetInput not in ["LCTopo", "TrackCaloCluster", "UFO"]:
655  raise ValueError (
656  "Unsupported input type '{0}' for large-R jets!".format(self.jetInput) )
657 
658  if self.jetInput == "TrackCaloCluster":
659  # Only one mass defintion supported
660  if self.largeRMass != "Calo":
661  raise ValueError(
662  "Unsupported large-R TCC jet mass '{0}'!".format(self.largeRMass) )
663  configFile = "JES_MC16recommendation_FatJet_TCC_JMS_calo_30Oct2018.config"
664 
665  if self.jetInput == "LCTopo":
666  configFile = _largeLCTopoConfigFile(config, self)
667 
668  if self.jetInput == "UFO":
669  configFile = "JES_MC20PreRecommendation_R10_UFO_CSSK_SoftDrop_JMS_R21Insitu_02Aug2024.config"
670 
671  if not config.isPhyslite() or self.recalibratePhyslite:
672  # Prepare the jet calibration algorithm
673  alg = config.createAlgorithm( 'CP::JetCalibrationAlg', 'JetCalibrationAlg'+self.containerName )
674  config.addPrivateTool( 'calibrationTool', 'JetCalibrationTool' )
675  alg.calibrationTool.JetCollection = jetCollectionName[:-4]
676  if self.configFileOverride is not None:
677  configFile = self.configFileOverride
678  if configFile is None:
679  raise ValueError(
680  f'Unsupported: {self.jetInput=}, {config.dataType()=}')
681  alg.calibrationTool.ConfigFile = configFile
682  if self.jetInput == "TrackCaloCluster" or self.jetInput == "UFO" or config.dataType() is DataType.FullSim:
683  alg.calibrationTool.CalibSequence = "EtaJES_JMS"
684  elif config.dataType() is DataType.Data:
685  alg.calibrationTool.CalibSequence = "EtaJES_JMS_Insitu"
686  alg.calibrationTool.IsData = (config.dataType() is DataType.Data)
687  alg.jets = config.readName (self.containerName)
688 
689  # Jet uncertainties
690  if self.jetInput == "UFO" and config.dataType() is (DataType.FullSim or DataType.FastSim):
691  alg = config.createAlgorithm( 'CP::JetUncertaintiesAlg', 'JetUncertaintiesAlg'+self.containerName )
692  self.createUncertaintyTool(alg, config, jetCollectionName, doPseudoData=( self.systematicsModelJER in ["Full","All"] ))
693  # R=1.0 jets have a validity range
694  alg.outOfValidity = 2 # SILENT
695  alg.outOfValidityDeco = 'outOfValidity'
696  alg.uncertaintiesTool.JetDefinition = jetCollectionName[:-4]
697  alg.uncertaintiesTool.ConfigFile = (
698  "rel22/Winter2024_PreRec/R10_CategoryJES_FullJER_FullJMS.config"
699  )
700 
701  log.warning("Uncertainties for UFO jets are test only! This {0} is not for physics analysis! ".format(alg.uncertaintiesTool.ConfigFile))
702  if config.dataType() is DataType.FastSim:
703  log.warning("You are applying UFO FS uncertainty on AF3! This {0} is only for test purpose and not for physics analysis! ".format(alg.uncertaintiesTool.ConfigFile))
704 
705  alg.uncertaintiesTool.MCType = "MC20"
706  alg.uncertaintiesTool.IsData = config.dataType() is DataType.Data
707 
708  alg.jets = config.readName (self.containerName)
709  alg.jetsOut = config.copyName (self.containerName)
710  alg.preselection = config.getPreselection (self.containerName, '')
711 
712  if self.jetInput != "UFO":
713  alg = config.createAlgorithm( 'CP::JetUncertaintiesAlg', 'JetUncertaintiesAlg'+self.containerName )
714  # R=1.0 jets have a validity range
715  alg.outOfValidity = 2 # SILENT
716  alg.outOfValidityDeco = 'outOfValidity'
717  config.addPrivateTool( 'uncertaintiesTool', 'JetUncertaintiesTool' )
718 
719  alg.uncertaintiesTool.JetDefinition = jetCollectionName[:-4]
720  alg.uncertaintiesTool.ConfigFile = \
721  "rel21/Moriond2018/R10_{0}Mass_all.config".format(self.largeRMass)
722  alg.uncertaintiesTool.MCType = "MC16a"
723  alg.uncertaintiesTool.IsData = (config.dataType() is DataType.Data)
724 
725  alg.jets = config.readName (self.containerName)
726  alg.jetsOut = config.copyName (self.containerName)
727  alg.preselection = config.getPreselection (self.containerName, '')
728  config.addSelection (self.containerName, '', 'outOfValidity')
729 
730  config.addOutputVar (self.containerName, 'm', 'm')
731 
732 # These algorithms set up the jet recommendations as-of 04/02/2019.
733 # Jet calibration recommendations
734 # https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/ApplyJetCalibrationR21
735 # Jet uncertainties recommendations
736 # Small-R
737 # https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JetUncertaintiesRel21Summer2018SmallR
738 # Large-R
739 # https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/JetUncertaintiesRel21Moriond2018LargeR
740 # JVT recommendations
741 # https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JVTCalibrationRel21
742 
743 @groupBlocks
744 def makeJetAnalysisConfig( seq, containerName, jetCollection,
745  runGhostMuonAssociation = None):
746  """Create a jet analysis algorithm sequence
747  The jet collection is interpreted and selects the correct function to call,
748  makeSmallRJetAnalysisConfig, makeRScanJetAnalysisConfig or
749  makeLargeRJetAnalysisConfig
750 
751  Keyword arguments
752  jetCollection -- The jet container to run on.
753  """
754 
755  # Remove b-tagging calibration from the container name
756  btIndex = jetCollection.find('_BTagging')
757  if btIndex != -1:
758  jetCollection = jetCollection[:btIndex]
759 
760  jetCollectionName=jetCollection
761  if(jetCollection=="AnalysisJets") :
762  jetCollectionName="AntiKt4EMPFlowJets"
763  if(jetCollection=="AnalysisLargeRJets") :
764  jetCollectionName="AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"
765 
766  #AntiKt10UFO CSSKSoftDropBeta100Zcut10Jets
767 
768  if jetCollectionName == 'AntiKtVR30Rmax4Rmin02PV0TrackJets' :
769  # don't to anything on track jets
770  config = PreJetAnalysisConfig (containerName, jetCollection)
771  config.setOptionValue ('runOriginalObjectLink', False)
772  config.setOptionValue ('runGhostMuonAssociation', False)
773  seq.append (config)
774  return
775 
776  # interpret the jet collection
777  collection_pattern = re.compile(
778  r"AntiKt(\d+)(EMTopo|EMPFlow|LCTopo|TrackCaloCluster|UFO|Track)(TrimmedPtFrac5SmallR20|CSSKSoftDropBeta100Zcut10)?Jets")
779  match = collection_pattern.match(jetCollectionName)
780  if not match:
781  raise ValueError(
782  "Jet collection {0} does not match expected pattern!".format(jetCollectionName) )
783  radius = int(match.group(1) )
784  if radius not in [2, 4, 6, 10]:
785  raise ValueError("Jet collection has an unsupported radius '{0}'!".format(radius) )
786  jetInput = match.group(2)
787 
788 
789  config = PreJetAnalysisConfig (containerName, jetCollection)
790  config.runOriginalObjectLink = (btIndex != -1)
791  config.setOptionValue ('runGhostMuonAssociation', runGhostMuonAssociation)
792  seq.append (config)
793 
794  if radius == 4:
795  makeSmallRJetAnalysisConfig(seq, containerName,
796  jetCollection, jetInput=jetInput)
797  elif radius in [2, 6]:
798  makeRScanJetAnalysisConfig(seq, containerName,
799  jetCollection, jetInput=jetInput, radius=radius)
800  else:
801  trim = match.group(3)
802  if trim == "":
803  raise ValueError("Untrimmed large-R jets are not supported!")
804  makeLargeRJetAnalysisConfig(seq, containerName,
805  jetCollection, jetInput=jetInput)
806 
807 
808 
809 def makeSmallRJetAnalysisConfig( seq, containerName, jetCollection, jetInput,
810  runJvtUpdate = None, runNNJvtUpdate = None, runFJvtUpdate = None,
811  runJvtSelection = None, runFJvtSelection = None,
812  jvtWP = None, fJvtWP = None,
813  runJvtEfficiency = None, runFJvtEfficiency = None,
814  systematicsModelJES = None, systematicsModelJER = None):
815  """Add algorithms for the R=0.4 jets.
816 
817  Keyword arguments
818  seq -- The sequence to add the algorithms to
819  jetCollection -- The jet container to run on.
820  jetInput -- The type of input used, read from the collection name.
821  runJvtUpdate -- Determines whether or not to update JVT on the jets
822  runNNJvtUpdate -- Determines whether or not to update NN JVT on the jets
823  runFJvtUpdate -- Determines whether or not to update forward JVT on the jets
824  runJvtSelection -- Determines whether or not to run JVT selection on the jets
825  runFJvtSelection -- Determines whether or not to run forward JVT selection on the jets
826  jvtWP -- Defines the NNJvt WP to apply on the jets
827  fJvtWP -- Defines the fJvt WP to apply on the jets
828  runJvtEfficiency -- Determines whether or not to calculate the JVT efficiency
829  runFJvtEfficiency -- Determines whether or not to calculate the forward JVT efficiency
830  systematicsModelJES -- Which NP systematicsModelJES scheme should be used (All, Global, Category, Scenario)
831  systematicsModelJER -- Which variant of the systematicsModelJES should be used (All, Full, Simple). Note that not all combinations of systematicsModelJES and systematicsModelJER are valid!
832  """
833 
834  if jetInput not in ["EMTopo", "EMPFlow"]:
835  raise ValueError(
836  "Unsupported input type '{0}' for R=0.4 jets!".format(jetInput) )
837 
838  config = SmallRJetAnalysisConfig (containerName, jetCollection, jetInput)
839  config.setOptionValue ('runJvtUpdate', runJvtUpdate)
840  config.setOptionValue ('runNNJvtUpdate', runNNJvtUpdate)
841  config.setOptionValue ('runFJvtUpdate', runFJvtUpdate)
842  config.setOptionValue ('runJvtSelection', runJvtSelection)
843  config.setOptionValue ('runFJvtSelection', runFJvtSelection)
844  config.setOptionValue ('jvtWP', jvtWP)
845  config.setOptionValue ('fJvtWP', fJvtWP)
846  config.setOptionValue ('runJvtEfficiency', runJvtEfficiency)
847  config.setOptionValue ('runFJvtEfficiency', runFJvtEfficiency)
848  config.setOptionValue ('systematicsModelJES', systematicsModelJES)
849  config.setOptionValue ('systematicsModelJER', systematicsModelJER)
850  seq.append (config)
851 
852 
853 def makeRScanJetAnalysisConfig( seq, containerName, jetCollection,
854  jetInput, radius ):
855  """Add algorithms for the R-scan jets.
856 
857  Keyword arguments
858  seq -- The sequence to add the algorithms to
859  jetCollection -- The jet container to run on.
860  jetInput -- The type of input used, read from the collection name.
861  radius -- The radius of the r-scan jets.
862  """
863 
864  config = SmallRJetAnalysisConfig (containerName, jetCollection, jetInput, radius)
865  seq.append (config)
866 
867 
868 
869 
870 def makeLargeRJetAnalysisConfig( seq, containerName, jetCollection,
871  jetInput, largeRMass = None):
872  """Add algorithms for the R=1.0 jets.
873 
874  Keyword arguments
875  seq -- The sequence to add the algorithms to
876  jetCollection -- The jet container to run on.
877  jetInput -- The type of input used, read from the collection name.
878  largeRMass -- Which large-R mass definition to use. Ignored if not running on large-R jets ("Comb", "Calo", "TA")
879  """
880  config = LargeRJetAnalysisConfig (containerName, jetCollection, jetInput)
881  config.setOptionValue ('largeRMass', largeRMass)
882  seq.append (config)
883 
python.JetAnalysisConfig.LargeRJetAnalysisConfig.__init__
def __init__(self, containerName='', jetCollection='', jetInput='')
Definition: JetAnalysisConfig.py:505
python.JetAnalysisConfig._largeLCTopoConfigFile
def _largeLCTopoConfigFile(config, self)
Definition: JetAnalysisConfig.py:482
SystemOfUnits
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.JetAnalysisConfig.SmallRJetAnalysisConfig.systematicsModelJES
systematicsModelJES
Definition: JetAnalysisConfig.py:178
python.JetAnalysisConfig.PreJetAnalysisConfig.__init__
def __init__(self, containerName='', jetCollection='')
Definition: JetAnalysisConfig.py:19
python.JetAnalysisConfig.SmallRJetAnalysisConfig.getUncertaintyToolSettings
def getUncertaintyToolSettings(self, config)
Definition: JetAnalysisConfig.py:170
python.JetAnalysisConfig.PreJetAnalysisConfig.jetCollection
jetCollection
Definition: JetAnalysisConfig.py:42
python.JetAnalysisConfig.PreJetAnalysisConfig.makeAlgs
def makeAlgs(self, config)
Definition: JetAnalysisConfig.py:39
python.JetAnalysisConfig.PreJetAnalysisConfig
Definition: JetAnalysisConfig.py:16
python.JetAnalysisConfig.SmallRJetAnalysisConfig.jetInput
jetInput
Definition: JetAnalysisConfig.py:288
python.JetAnalysisConfig.LargeRJetAnalysisConfig
Definition: JetAnalysisConfig.py:502
python.JetAnalysisConfig.RScanJetAnalysisConfig
Definition: JetAnalysisConfig.py:427
python.JetAnalysisConfig.RScanJetAnalysisConfig.makeAlgs
def makeAlgs(self, config)
Definition: JetAnalysisConfig.py:452
python.JetAnalysisConfig.RScanJetAnalysisConfig.jetCollection
jetCollection
Definition: JetAnalysisConfig.py:457
python.JetAnalysisConfig.RScanJetAnalysisConfig.__init__
def __init__(self, containerName='', jetCollection='', jetInput='', radius=None)
Definition: JetAnalysisConfig.py:430
python.JetAnalysisConfig.makeLargeRJetAnalysisConfig
def makeLargeRJetAnalysisConfig(seq, containerName, jetCollection, jetInput, largeRMass=None)
Definition: JetAnalysisConfig.py:870
python.JetAnalysisConfig.LargeRJetAnalysisConfig.getUncertaintyToolSettings
def getUncertaintyToolSettings(self, config)
Definition: JetAnalysisConfig.py:558
python.JetAnalysisConfig.SmallRJetAnalysisConfig.__init__
def __init__(self, containerName='', jetCollection='', jetInput='')
Definition: JetAnalysisConfig.py:100
python.JetAnalysisConfig.SmallRJetAnalysisConfig.systematicsModelJER
systematicsModelJER
Definition: JetAnalysisConfig.py:178
python.JetAnalysisConfig.LargeRJetAnalysisConfig.createUncertaintyTool
def createUncertaintyTool(self, jetUncertaintiesAlg, config, jetCollectionName, doPseudoData=False)
Definition: JetAnalysisConfig.py:602
python.JetAnalysisConfig.SmallRJetAnalysisConfig.makeAlgs
def makeAlgs(self, config)
Definition: JetAnalysisConfig.py:262
python.JetAnalysisConfig.makeSmallRJetAnalysisConfig
def makeSmallRJetAnalysisConfig(seq, containerName, jetCollection, jetInput, runJvtUpdate=None, runNNJvtUpdate=None, runFJvtUpdate=None, runJvtSelection=None, runFJvtSelection=None, jvtWP=None, fJvtWP=None, runJvtEfficiency=None, runFJvtEfficiency=None, systematicsModelJES=None, systematicsModelJER=None)
Definition: JetAnalysisConfig.py:809
python.JetAnalysisConfig.makeRScanJetAnalysisConfig
def makeRScanJetAnalysisConfig(seq, containerName, jetCollection, jetInput, radius)
Definition: JetAnalysisConfig.py:853
python.JetAnalysisConfig.SmallRJetAnalysisConfig.jetCollection
jetCollection
Definition: JetAnalysisConfig.py:265
python.JetAnalysisConfig.SmallRJetAnalysisConfig
Definition: JetAnalysisConfig.py:97
python.JetAnalysisConfig.makeJetAnalysisConfig
def makeJetAnalysisConfig(seq, containerName, jetCollection, runGhostMuonAssociation=None)
Definition: JetAnalysisConfig.py:744
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
python.JetAnalysisConfig.LargeRJetAnalysisConfig.jetCollection
jetCollection
Definition: JetAnalysisConfig.py:646
python.JetAnalysisConfig.SmallRJetAnalysisConfig.createUncertaintyTool
def createUncertaintyTool(self, jetUncertaintiesAlg, config, jetCollectionName, doPseudoData=False)
Definition: JetAnalysisConfig.py:224
python.JetAnalysisConfig.LargeRJetAnalysisConfig.jetInput
jetInput
Definition: JetAnalysisConfig.py:658
python.JetAnalysisConfig.LargeRJetAnalysisConfig.makeAlgs
def makeAlgs(self, config)
Definition: JetAnalysisConfig.py:639