ATLAS Offline Software
Functions
python.JetAnalysisSequence Namespace Reference

Functions

def makeJetAnalysisSequence (dataType, jetCollection, postfix='', deepCopyOutput=False, shallowViewOutput=True, runGhostMuonAssociation=True, enableCutflow=False, enableKinematicHistograms=False, defineSystObjectLinks=False, **kwargs)
 
def makeSmallRJetAnalysisSequence (seq, dataType, jetCollection, jetInput, postfix='', runJvtUpdate=False, runNNJvtUpdate=False, runFJvtUpdate=False, runJvtSelection=True, runFJvtSelection=False, runJvtEfficiency=True, runFJvtEfficiency=False, reduction="Category", JEROption="Full")
 
def makeRScanJetAnalysisSequence (seq, dataType, jetCollection, jetInput, radius, postfix='')
 
def makeLargeRJetAnalysisSequence (seq, dataType, jetCollection, jetInput, postfix='', largeRMass="Comb")
 

Function Documentation

◆ makeJetAnalysisSequence()

def python.JetAnalysisSequence.makeJetAnalysisSequence (   dataType,
  jetCollection,
  postfix = '',
  deepCopyOutput = False,
  shallowViewOutput = True,
  runGhostMuonAssociation = True,
  enableCutflow = False,
  enableKinematicHistograms = False,
  defineSystObjectLinks = False,
**  kwargs 
)
Create a jet analysis algorithm sequence
  The jet collection is interpreted and selects the correct function to call,
  makeSmallRJetAnalysisSequence, makeRScanJetAnalysisSequence or
  makeLargeRJetAnalysisSequence

  Keyword arguments
    dataType -- The data type to run on ("data", "mc" or "afii")
    jetCollection -- The jet container to run on.
    postfix -- String to be added to the end of all public names.
    deepCopyOutput -- Whether or not to deep copy the output
    shallowViewOutput -- Whether or not to output a shallow view as the output
    enableCutflow -- Whether or not to dump the cutflow
    enableKinematicHistograms -- Whether or not to dump the kinematic histograms
    Other keyword arguments are forwarded to the other functions.

Definition at line 21 of file JetAnalysisSequence.py.

21 def makeJetAnalysisSequence( dataType, jetCollection, postfix = '',
22  deepCopyOutput = False,
23  shallowViewOutput = True,
24  runGhostMuonAssociation = True,
25  enableCutflow = False,
26  enableKinematicHistograms = False,
27  defineSystObjectLinks=False,
28  **kwargs):
29  """Create a jet analysis algorithm sequence
30  The jet collection is interpreted and selects the correct function to call,
31  makeSmallRJetAnalysisSequence, makeRScanJetAnalysisSequence or
32  makeLargeRJetAnalysisSequence
33 
34  Keyword arguments
35  dataType -- The data type to run on ("data", "mc" or "afii")
36  jetCollection -- The jet container to run on.
37  postfix -- String to be added to the end of all public names.
38  deepCopyOutput -- Whether or not to deep copy the output
39  shallowViewOutput -- Whether or not to output a shallow view as the output
40  enableCutflow -- Whether or not to dump the cutflow
41  enableKinematicHistograms -- Whether or not to dump the kinematic histograms
42  Other keyword arguments are forwarded to the other functions.
43  """
44 
45  if dataType not in ["data", "mc", "afii"]:
46  raise ValueError ("invalid data type: " + dataType )
47 
48  # Setup the postfix
49  if postfix != '':
50  postfix = "_" + postfix
51 
52  # Make sure selection options make sense
53  if deepCopyOutput and shallowViewOutput:
54  raise ValueError ("deepCopyOutput and shallowViewOutput can't both be true!")
55 
56  # Remove b-tagging calibration from the container name
57  btIndex = jetCollection.find('_BTagging')
58  if btIndex != -1:
59  jetCollection = jetCollection[:btIndex]
60 
61  jetCollectionName=jetCollection
62  if(jetCollection=="AnalysisJets") :
63  jetCollectionName="AntiKt4EMPFlowJets"
64  if(jetCollection=="AnalysisLargeRJets") :
65  jetCollectionName="AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"
66 
67  #AntiKt10UFO CSSKSoftDropBeta100Zcut10Jets
68 
69  # interpret the jet collection
70  collection_pattern = re.compile(
71  r"AntiKt(\d+)(EMTopo|EMPFlow|LCTopo|TrackCaloCluster|UFO)(TrimmedPtFrac5SmallR20|CSSKSoftDropBeta100Zcut10)?Jets")
72  match = collection_pattern.match(jetCollectionName)
73  if not match:
74  raise ValueError(
75  "Jet collection {0} does not match expected pattern!".format(jetCollectionName) )
76  radius = int(match.group(1) )
77  if radius not in [2, 4, 6, 10]:
78  raise ValueError("Jet collection has an unsupported radius '{0}'!".format(radius) )
79  jetInput = match.group(2)
80 
81  # Create the analysis algorithm sequence object.
82  seq = AnaAlgSequence( "JetAnalysisSequence"+postfix )
83  # Relink original jets in case of b-tagging calibration
84  if btIndex != -1:
85  alg = createAlgorithm( 'CP::AsgOriginalObjectLinkAlg',
86  'JetOriginalObjectLinkAlg'+postfix )
87  alg.baseContainerName = jetCollection
88  seq.append( alg, inputPropName = 'particles', outputPropName = 'particlesOut', stageName = 'calibration' )
89 
90  # Set up the jet ghost muon association algorithm:
91  if runGhostMuonAssociation:
92  alg = createAlgorithm( 'CP::JetGhostMuonAssociationAlg',
93  'JetGhostMuonAssociationAlg'+postfix )
94  seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'calibration' )
95 
96  # record all the selections each subfunction makes
97  seq.addMetaConfigDefault ("selectionDecorNames", [])
98  seq.addMetaConfigDefault ("selectionDecorCount", [])
99 
100  if radius == 4:
102  dataType, jetCollection, jetInput=jetInput, postfix=postfix, **kwargs)
103  elif radius in [2, 6]:
105  dataType, jetCollection, jetInput=jetInput, radius=radius,
106  postfix=postfix, **kwargs)
107  else:
108  trim = match.group(3)
109  if trim == "":
110  raise ValueError("Untrimmed large-R jets are not supported!")
112  dataType, jetCollection, jetInput=jetInput, postfix=postfix, **kwargs)
113 
114  # Build links between nominal and systematic objects
115  # This is useful downstream for constructing the union of all selected objects
116  if defineSystObjectLinks:
117  if deepCopyOutput:
118  raise ValueError ("Systematic object links may not work correctly on deep copy output")
119  alg = createAlgorithm('CP::SystObjectLinkerAlg', 'SystObjLinker'+postfix)
120  #alg.OutputLevel=1
121  seq.append( alg, inputPropName = 'input', stageName = 'selection' )
122 
123  # Set up an algorithm used to create jet selection cutflow:
124  if enableCutflow:
125  alg = createAlgorithm( 'CP::ObjectCutFlowHistAlg', 'JetCutFlowDumperAlg'+postfix )
126  alg.histPattern = 'jet_cflow_%SYS%'+postfix
127  seq.append( alg, inputPropName = 'input', stageName = 'selection',
128  dynConfig = {'selections' : lambda meta : meta["selectionDecorNames"][:]} )
129 
130  # Set up an algorithm dumping the kinematic properties of the jets:
131  if enableKinematicHistograms:
132  alg = createAlgorithm( 'CP::KinematicHistAlg', 'JetKinematicDumperAlg'+postfix )
133  alg.histPattern = 'jet_%VAR%_%SYS%'+postfix
134  seq.append( alg, inputPropName = 'input', stageName = 'selection',
135  dynConfig = {'preselection' : lambda meta : "&&".join (meta["selectionDecorNames"])} )
136 
137  if shallowViewOutput:
138  # Set up an algorithm that makes a view container using the selections
139  # performed previously:
140  alg = createAlgorithm( 'CP::AsgViewFromSelectionAlg', 'JetViewFromSelectionAlg'+postfix )
141  seq.append( alg, inputPropName = 'input', outputPropName = 'output',
142  stageName = 'selection',
143  dynConfig = {'selection' : lambda meta : meta["selectionDecorNames"][:]} )
144 
145  # Set up a final deep copy making algorithm if requested:
146  if deepCopyOutput:
147  alg = createAlgorithm( 'CP::AsgViewFromSelectionAlg', 'JetDeepCopyMaker'+postfix )
148  alg.deepCopy = True
149  seq.append( alg, inputPropName = 'input', outputPropName = 'output',
150  stageName = 'selection' )
151 
152  return seq
153 

◆ makeLargeRJetAnalysisSequence()

def python.JetAnalysisSequence.makeLargeRJetAnalysisSequence (   seq,
  dataType,
  jetCollection,
  jetInput,
  postfix = '',
  largeRMass = "Comb" 
)
Add algorithms for the R=1.0 jets.

  Keyword arguments
    seq -- The sequence to add the algorithms to
    dataType -- The data type to run on ("data", "mc" or "afii")
    jetCollection -- The jet container to run on.
    jetInput -- The type of input used, read from the collection name.
    postfix -- String to be added to the end of all public names.
    largeRMass -- Which large-R mass definition to use. Ignored if not running on large-R jets ("Comb", "Calo", "TA")

Definition at line 370 of file JetAnalysisSequence.py.

370 def makeLargeRJetAnalysisSequence( seq, dataType, jetCollection,
371  jetInput, postfix = '', largeRMass = "Comb"):
372  """Add algorithms for the R=1.0 jets.
373 
374  Keyword arguments
375  seq -- The sequence to add the algorithms to
376  dataType -- The data type to run on ("data", "mc" or "afii")
377  jetCollection -- The jet container to run on.
378  jetInput -- The type of input used, read from the collection name.
379  postfix -- String to be added to the end of all public names.
380  largeRMass -- Which large-R mass definition to use. Ignored if not running on large-R jets ("Comb", "Calo", "TA")
381  """
382 
383  jetCollectionName=jetCollection
384  if(jetCollection=="AnalysisJets") :
385  jetCollectionName="AntiKt4EMPFlowJets"
386  if(jetCollection=="AnalysisLargeRJets") :
387  jetCollectionName="AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"
388 
389  if largeRMass not in ["Comb", "Calo", "TA"]:
390  raise ValueError ("Invalid large-R mass defintion {0}!".format(largeRMass) )
391 
392  if jetInput not in ["LCTopo", "TrackCaloCluster", "UFO"]:
393  raise ValueError (
394  "Unsupported input type '{0}' for large-R jets!".format(jetInput) )
395 
396  if jetInput == "TrackCaloCluster":
397  # Only one mass defintion supported
398  if largeRMass != "Calo":
399  raise ValueError(
400  "Unsupported large-R TCC jet mass '{0}'!".format(largeRMass) )
401  configFile = "JES_MC16recommendation_FatJet_TCC_JMS_calo_30Oct2018.config"
402 
403  if jetInput == "LCTopo":
404  if largeRMass == "Comb":
405  if dataType == "data":
406  configFile = "JES_MC16recommendation_FatJet_Trimmed_JMS_comb_March2021.config"
407  if dataType == "mc":
408  configFile = "JES_MC16recommendation_FatJet_Trimmed_JMS_comb_17Oct2018.config"
409  elif largeRMass == "Calo":
410  if dataType == "data":
411  configFile = "JES_MC16recommendation_FatJet_Trimmed_JMS_comb_March2021.config"
412  if dataType == "mc":
413  configFile = "JES_MC16recommendation_FatJet_Trimmed_JMS_calo_12Oct2018.config "
414  elif largeRMass == "TA":
415  if dataType == "data":
416  configFile = "JES_MC16recommendation_FatJet_Trimmed_JMS_comb_March2021.config"
417  if dataType == "mc":
418  configFile = "JES_MC16recommendation_FatJet_Trimmed_JMS_TA_12Oct2018.config"
419 
420  if jetInput == "UFO":
421  # R22 pre-recs
422  # More info: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/ApplyJetCalibrationR22#R_1_0_unified_flow_object_UFO_je
423  configFile = "JES_MC20PreRecommendation_R10_UFO_CSSK_SoftDrop_JMS_R21Insitu_10Mar2023.config"
424 
425  # Prepare the jet calibration algorithm
426  alg = createAlgorithm( 'CP::JetCalibrationAlg', 'JetCalibrationAlg'+postfix )
427  addPrivateTool( alg, 'calibrationTool', 'JetCalibrationTool' )
428  alg.calibrationTool.JetCollection = jetCollectionName[:-4]
429  alg.calibrationTool.ConfigFile = configFile
430  if jetInput == "TrackCaloCluster" or jetInput == "UFO" or dataType == "mc":
431  alg.calibrationTool.CalibSequence = "EtaJES_JMS"
432  elif dataType == "data":
433  alg.calibrationTool.CalibSequence = "EtaJES_JMS_Insitu_InsituCombinedMass"
434  alg.calibrationTool.IsData = (dataType == "data")
435  seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'calibration' )
436 
437  # Jet uncertainties
438 
439  if jetInput == "UFO":
440  print("WARNING: uncertainties for UFO jets are not yet released!")
441 
442  if jetInput != "UFO":
443  alg = createAlgorithm( 'CP::JetUncertaintiesAlg', 'JetUncertaintiesAlg'+postfix )
444  # R=1.0 jets have a validity range
445  alg.outOfValidity = 2 # SILENT
446  alg.outOfValidityDeco = 'outOfValidity'
447  addPrivateTool( alg, 'uncertaintiesTool', 'JetUncertaintiesTool' )
448 
449  alg.uncertaintiesTool.JetDefinition = jetCollectionName[:-4]
450  alg.uncertaintiesTool.ConfigFile = \
451  "rel21/Moriond2018/R10_{0}Mass_all.config".format(largeRMass)
452  alg.uncertaintiesTool.MCType = "MC16a"
453  alg.uncertaintiesTool.IsData = (dataType == "data")
454 
455  seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut',
456  stageName = 'calibration',
457  metaConfig = {'selectionDecorNames' : ['outOfValidity'], 'selectionDecorCount' : [1]} )

◆ makeRScanJetAnalysisSequence()

def python.JetAnalysisSequence.makeRScanJetAnalysisSequence (   seq,
  dataType,
  jetCollection,
  jetInput,
  radius,
  postfix = '' 
)
Add algorithms for the R-scan jets.

  Keyword arguments
    seq -- The sequence to add the algorithms to
    dataType -- The data type to run on ("data", "mc" or "afii")
    jetCollection -- The jet container to run on.
    jetInput -- The type of input used, read from the collection name.
    radius -- The radius of the r-scan jets.
    postfix -- String to be added to the end of all public names.

Definition at line 332 of file JetAnalysisSequence.py.

332 def makeRScanJetAnalysisSequence( seq, dataType, jetCollection,
333  jetInput, radius, postfix = '' ):
334  """Add algorithms for the R-scan jets.
335 
336  Keyword arguments
337  seq -- The sequence to add the algorithms to
338  dataType -- The data type to run on ("data", "mc" or "afii")
339  jetCollection -- The jet container to run on.
340  jetInput -- The type of input used, read from the collection name.
341  radius -- The radius of the r-scan jets.
342  postfix -- String to be added to the end of all public names.
343  """
344 
345  jetCollectionName=jetCollection
346  if(jetCollection=="AnalysisJets") :
347  jetCollectionName="AntiKt4EMPFlowJets"
348  if(jetCollection=="AnalysisLargeRJets") :
349  jetCollectionName="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets"
350 
351 
352  if jetInput != "LCTopo":
353  raise ValueError(
354  "Unsupported input type '{0}' for R-scan jets!".format(jetInput) )
355  # Prepare the jet calibration algorithm
356  alg = createAlgorithm( 'CP::JetCalibrationAlg', 'JetCalibrationAlg'+postfix )
357  addPrivateTool( alg, 'calibrationTool', 'JetCalibrationTool' )
358  alg.calibrationTool.JetCollection = jetCollectionName[:-4]
359  alg.calibrationTool.ConfigFile = \
360  "JES_MC16Recommendation_Rscan{0}LC_Feb2022_R21.config".format(radius)
361  if dataType == 'data':
362  alg.calibrationTool.CalibSequence = "JetArea_Residual_EtaJES_GSC_Insitu"
363  else:
364  alg.calibrationTool.CalibSequence = "JetArea_Residual_EtaJES_GSC_Smear"
365  alg.calibrationTool.IsData = (dataType == 'data')
366  seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'calibration' )
367  # Logging would be good
368  print("WARNING: uncertainties for R-Scan jets are not yet released!")
369 

◆ makeSmallRJetAnalysisSequence()

def python.JetAnalysisSequence.makeSmallRJetAnalysisSequence (   seq,
  dataType,
  jetCollection,
  jetInput,
  postfix = '',
  runJvtUpdate = False,
  runNNJvtUpdate = False,
  runFJvtUpdate = False,
  runJvtSelection = True,
  runFJvtSelection = False,
  runJvtEfficiency = True,
  runFJvtEfficiency = False,
  reduction = "Category",
  JEROption = "Full" 
)
Add algorithms for the R=0.4 jets.

  Keyword arguments
    seq -- The sequence to add the algorithms to
    dataType -- The data type to run on ("data", "mc" or "afii")
    jetCollection -- The jet container to run on.
    jetInput -- The type of input used, read from the collection name.
    postfix -- String to be added to the end of all public names.
    runJvtUpdate -- Determines whether or not to update JVT on the jets
    runNNJvtUpdate -- Determines whether or not to update NN JVT on the jets
    runFJvtUpdate -- Determines whether or not to update forward JVT on the jets
    runJvtSelection -- Determines whether or not to run JVT selection on the jets
    runFJvtSelection -- Determines whether or not to run forward JVT selection on the jets
    runJvtEfficiency -- Determines whether or not to calculate the JVT efficiency
    runFJvtEfficiency -- Determines whether or not to calculate the forward JVT efficiency
    reduction -- Which NP reduction scheme should be used (All, Global, Category, Scenario)
    JEROption -- Which variant of the reduction should be used (All, Full, Simple). Note that not all combinations of reduction and JEROption are valid!

Definition at line 154 of file JetAnalysisSequence.py.

154 def makeSmallRJetAnalysisSequence( seq, dataType, jetCollection,
155  jetInput, postfix = '',
156  runJvtUpdate = False, runNNJvtUpdate = False, runFJvtUpdate = False,
157  runJvtSelection = True, runFJvtSelection = False,
158  runJvtEfficiency = True, runFJvtEfficiency = False,
159  reduction = "Category", JEROption = "Full"):
160  """Add algorithms for the R=0.4 jets.
161 
162  Keyword arguments
163  seq -- The sequence to add the algorithms to
164  dataType -- The data type to run on ("data", "mc" or "afii")
165  jetCollection -- The jet container to run on.
166  jetInput -- The type of input used, read from the collection name.
167  postfix -- String to be added to the end of all public names.
168  runJvtUpdate -- Determines whether or not to update JVT on the jets
169  runNNJvtUpdate -- Determines whether or not to update NN JVT on the jets
170  runFJvtUpdate -- Determines whether or not to update forward JVT on the jets
171  runJvtSelection -- Determines whether or not to run JVT selection on the jets
172  runFJvtSelection -- Determines whether or not to run forward JVT selection on the jets
173  runJvtEfficiency -- Determines whether or not to calculate the JVT efficiency
174  runFJvtEfficiency -- Determines whether or not to calculate the forward JVT efficiency
175  reduction -- Which NP reduction scheme should be used (All, Global, Category, Scenario)
176  JEROption -- Which variant of the reduction should be used (All, Full, Simple). Note that not all combinations of reduction and JEROption are valid!
177  """
178 
179  jetCollectionName=jetCollection
180  if(jetCollection=="AnalysisJets") :
181  jetCollectionName="AntiKt4EMPFlowJets"
182  if(jetCollection=="AnalysisLargeRJets") :
183  jetCollectionName="AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"
184 
185  if jetInput not in ["EMTopo", "EMPFlow"]:
186  raise ValueError(
187  "Unsupported input type '{0}' for R=0.4 jets!".format(jetInput) )
188 
189  if runNNJvtUpdate:
190  assert jetInput=="EMPFlow", "NN JVT only defined for PFlow jets"
191 
192  if (runJvtEfficiency or runFJvtEfficiency) and dataType != "data":
193  # Decorate jets with isHS labels (required to retrieve Jvt SFs)
194  alg = createAlgorithm( 'CP::JetDecoratorAlg', 'JetPileupLabelAlg'+postfix )
195  addPrivateTool( alg, 'decorator', 'JetPileupLabelingTool' )
196  alg.decorator.RecoJetContainer = jetCollection
197  alg.decorator.SuppressOutputDependence=True
198 
199  seq.append(alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'selection')
200  seq.addDecorAwareTool(tool=alg.decorator,parent=alg,outputPropName='RecoJetContainer')
201 
202  # Prepare the jet calibration algorithm
203  alg = createAlgorithm( 'CP::JetCalibrationAlg', 'JetCalibrationAlg'+postfix )
204  addPrivateTool( alg, 'calibrationTool', 'JetCalibrationTool' )
205  alg.calibrationTool.JetCollection = jetCollectionName[:-4]
206  # Get the correct string to use in the config file name
207  if jetInput == "EMPFlow":
208  configFile = "PreRec_R22_PFlow_ResPU_EtaJES_GSC_February23_230215.config"
209  else:
210  if dataType == 'afii':
211  configFile = "JES_MC16Recommendation_AFII_{0}_Apr2019_Rel21.config"
212  else:
213  configFile = "JES_MC16Recommendation_Consolidated_{0}_Apr2019_Rel21.config"
214  configFile = configFile.format(jetInput)
215  alg.calibrationTool.ConfigFile = configFile
216  if dataType == 'data':
217  alg.calibrationTool.CalibSequence = 'JetArea_Residual_EtaJES_GSC_Insitu'
218  else:
219  if jetInput == "EMPFlow":
220  alg.calibrationTool.CalibSequence = 'JetArea_Residual_EtaJES_GSC'
221  else:
222  alg.calibrationTool.CalibSequence = 'JetArea_Residual_EtaJES_GSC_Smear'
223  alg.calibrationTool.IsData = (dataType == 'data')
224  seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'calibration')
225 
226  # Jet uncertainties
227  # Prepare the config file
228  if reduction == "All" and JEROption == "All":
229  alg.uncertaintiesTool.ConfigFile = "R4_AllNuisanceParameters_AllJERNP.config"
230  elif "Scenario" in reduction:
231  if JEROption != "Simple":
232  raise ValueError(
233  "Invalid uncertainty configuration - Scenario* reductions can "
234  "only be used together with the Simple JEROption")
235  configFile = "R4_{0}_SimpleJER.config".format(reduction)
236  elif reduction in ["Global", "Category"] and JEROption in ["Simple", "Full"]:
237  configFile = "R4_{0}Reduction_{1}JER.config".format(reduction, JEROption)
238  else:
239  raise ValueError(
240  "Invalid combination of reduction and JEROption settings: "
241  "reduction: {0}, JEROption: {1}".format(reduction, JEROption) )
242 
243  alg = createAlgorithm( 'CP::JetUncertaintiesAlg', 'JetUncertaintiesAlg'+postfix )
244  addPrivateTool( alg, 'uncertaintiesTool', 'JetUncertaintiesTool' )
245  alg.uncertaintiesTool.JetDefinition = jetCollectionName[:-4]
246  # Add the correct directory on the front
247  alg.uncertaintiesTool.ConfigFile = "rel22/Summer2023_PreRec/"+configFile
248  alg.uncertaintiesTool.MCType = "MC20"
249  alg.uncertaintiesTool.IsData = (dataType == 'data')
250  seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut',
251  stageName = 'calibration' )
252 
253  # Set up the JVT update algorithm:
254  if runJvtUpdate :
255  alg = createAlgorithm( 'CP::JvtUpdateAlg', 'JvtUpdateAlg'+postfix )
256  addPrivateTool( alg, 'jvtTool', 'JetVertexTaggerTool' )
257  alg.jvtTool.JetContainer = jetCollection
258  alg.jvtTool.SuppressInputDependence=True
259 
260  seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'selection' )
261 
262  if runNNJvtUpdate :
263  alg = createAlgorithm( 'CP::JetDecoratorAlg', 'NNJvtUpdateAlg'+postfix )
264  addPrivateTool( alg, 'decorator', 'JetPileupTag::JetVertexNNTagger' )
265  # Set this actually to the *output* collection
266  alg.decorator.JetContainer = jetCollection
267  alg.decorator.SuppressInputDependence=True
268  alg.decorator.SuppressOutputDependence=True
269 
270  seq.append(alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'selection')
271  seq.addDecorAwareTool(tool=alg.decorator,parent=alg,outputPropName='JetContainer')
272 
273  if runFJvtUpdate :
274  alg = createAlgorithm( 'CP::JetModifierAlg', 'JetModifierAlg'+postfix )
275  addPrivateTool( alg, 'modifierTool', 'JetForwardJvtTool')
276  alg.modifierTool.OutputDec = "passFJVT_internal" #Output decoration
277  alg.modifierTool.FJVTName = "fJVT"
278  # fJVT WPs depend on the MET WP
279  # see https://twiki.cern.ch/twiki/bin/view/AtlasProtected/EtmissRecommendationsRel21p2#fJVT_and_MET
280  alg.modifierTool.EtaThresh = 2.5 # Eta dividing central from forward jets
281  alg.modifierTool.ForwardMaxPt = 120.0e3 #Max Pt to define fwdJets for JVT
282  alg.modifierTool.RenounceOutputs = True
283  seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'selection' )
284  pass
285 
286  if runJvtSelection:
287  alg = createAlgorithm("CP::AsgSelectionAlg", "JvtSelectionAlg"+postfix)
288  addPrivateTool(alg, "selectionTool", "CP::NNJvtSelectionTool")
289  alg.selectionTool.MaxPtForJvt = 60e3 if jetInput == "EMPFlow" else 120e3
290  alg.selectionTool.WorkingPoint = "FixedEffPt"
291  alg.selectionDecoration = 'jvt_selection'
292  seq.append( alg, inputPropName = 'particles', stageName = 'selection' )
293  # TODO: How to set the JetContainer in this version?
294 
295  if runJvtEfficiency and dataType != "data":
296  alg = createAlgorithm( 'CP::JvtEfficiencyAlg', 'JvtEfficiencyAlg'+postfix )
297  addPrivateTool( alg, 'efficiencyTool', 'CP::NNJvtEfficiencyTool' )
298  alg.efficiencyTool.MaxPtForJvt = 60e3 if jetInput == "EMPFlow" else 120e3
299  alg.efficiencyTool.WorkingPoint = "FixedEffPt"
300  alg.selection = 'jvt_selection'
301  alg.scaleFactorDecoration = 'jvt_effSF_%SYS%'
302  alg.outOfValidity = 2
303  alg.outOfValidityDeco = 'no_jvt'
304  alg.skipBadEfficiency = 0
305  seq.append( alg, inputPropName = 'jets', stageName = 'efficiency' )
306 
307  if runFJvtSelection:
308  alg = createAlgorithm("CP::AsgSelectionAlg", "FJvtSelectionAlg"+postfix)
309  addPrivateTool(alg, "selectionTool", "CP::FJvtSelectionTool")
310  alg.selectionTool.JvtMomentName = "fJVT" if runFJvtUpdate else "DFCommonJets_fJvt"
311  alg.selectionTool.WorkingPoint = "Loose"
312  alg.selectionDecoration = 'fjvt_selection'
313  seq.append( alg, inputPropName = 'particles', stageName = 'selection' )
314  # TODO: How to set the JetContainer in this version?
315 
316  if runFJvtEfficiency and dataType != "data":
317  alg = createAlgorithm( 'CP::JvtEfficiencyAlg', 'JvtEfficiencyAlg'+postfix )
318  addPrivateTool( alg, 'efficiencyTool', 'CP::FJvtEfficiencyTool' )
319  alg.efficiencyTool.WorkingPoint = "Loose"
320  alg.efficiencyTool.SFFile = f"JetJvtEfficiency/May2020/fJvtSFFile.{jetInput}.root"
321  alg.selection = 'fjvt_selection'
322  alg.scaleFactorDecoration = 'fjvt_effSF_%SYS%'
323  alg.outOfValidity = 2
324  alg.outOfValidityDeco = 'no_fjvt'
325  alg.skipBadEfficiency = 0
326  seq.append( alg, inputPropName = 'jets', stageName = 'efficiency' )
327 
328 
329  # Return the sequence:
330  return seq
331 
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.DualUseConfig.addPrivateTool
def addPrivateTool(alg, toolName, typeName)
Definition: DualUseConfig.py:180
python.JetAnalysisSequence.makeJetAnalysisSequence
def makeJetAnalysisSequence(dataType, jetCollection, postfix='', deepCopyOutput=False, shallowViewOutput=True, runGhostMuonAssociation=True, enableCutflow=False, enableKinematicHistograms=False, defineSystObjectLinks=False, **kwargs)
Definition: JetAnalysisSequence.py:21
python.JetAnalysisSequence.makeRScanJetAnalysisSequence
def makeRScanJetAnalysisSequence(seq, dataType, jetCollection, jetInput, radius, postfix='')
Definition: JetAnalysisSequence.py:332
python.JetAnalysisSequence.makeLargeRJetAnalysisSequence
def makeLargeRJetAnalysisSequence(seq, dataType, jetCollection, jetInput, postfix='', largeRMass="Comb")
Definition: JetAnalysisSequence.py:370
python.DualUseConfig.createAlgorithm
def createAlgorithm(typeName, instanceName)
Definition: DualUseConfig.py:56
python.JetAnalysisSequence.makeSmallRJetAnalysisSequence
def makeSmallRJetAnalysisSequence(seq, dataType, jetCollection, jetInput, postfix='', runJvtUpdate=False, runNNJvtUpdate=False, runFJvtUpdate=False, runJvtSelection=True, runFJvtSelection=False, runJvtEfficiency=True, runFJvtEfficiency=False, reduction="Category", JEROption="Full")
Definition: JetAnalysisSequence.py:154
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569