ATLAS Offline Software
JetHIConfig.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 from JetRecConfig import JetRecConfig
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
8 
9 from TrigEDMConfig.TriggerEDM import recordable
10 
11 from . import JetRecoCommon
12 from JetRecConfig.JetDefinition import JetModifier
13 from JetRecConfig.JetRecConfig import getJetCopyAlg
14 
15 from AthenaCommon.Logging import logging
16 logging.getLogger().info("JetHIConfig LOG: Importing %s",__name__)
17 log = logging.getLogger(__name__)
18 
19 
20 # For now all duplicated from jetHIRecoSequenceCA -- to be cleaned up by experts
21 def HeavyIonJetRecoDataDeps(flags, **jetRecoDict):
22  # The template unsubtracted jet definition
23  jetNamePrefix = JetRecoCommon.getHLTPrefix()
24  clustersKey = JetRecoCommon.getClustersKey(jetRecoDict)
25  jetDef_unsub = JetRecoCommon.defineHIJets(jetRecoDict,clustersKey=clustersKey,prefix=jetNamePrefix,suffix="_Unsubtracted")
26  jetDef_unsub._internalAtt['finalPJContainer'] = "PseudoJet"+clustersKey
27 
28  # Seed jets for subtraction
29  associationName = "%s_DR8Assoc" % (clustersKey)
30  jetDef_seed0 = jetDef_unsub.clone()
31  jetDef_seed0.suffix = jetDef_unsub.suffix.replace("Unsubtracted", "seed0")
32  jetDef_seed0.radius = 0.2
33  jetsFullName_seed0 = jetDef_seed0.fullname()
34  stdJetModifiers.update(
35  # we give a function as PtMin : it will be evaluated when instantiating the tool (modspec will come alias usage like "Filter:10000" --> PtMin=100000)
36  HLTHIJetAssoc = JetModifier("HIJetDRAssociationTool","HIJetDRAssociation", ContainerKey=clustersKey, DeltaR=0.8, AssociationName=associationName),
37  HLTHIJetMaxOverMean = JetModifier("HIJetMaxOverMeanTool","HIJetMaxOverMean", JetContainer = jetsFullName_seed0),
38  HLTHIJetDiscrim = JetModifier("HIJetDiscriminatorTool","HIJetDiscriminator", MaxOverMeanCut = 4, MinimumETMaxCut=3000),
39  )
40  jetDef_seed0.modifiers=["HLTHIJetAssoc", "HLTHIJetMaxOverMean", "HLTHIJetDiscrim", "Filter:5000"]
41 
42  JES_is_data=False
43  calib_seq='EtaJES' #only do in situ for R=0.4 jets in data
44  if jetRecoDict["jetCalib"].endswith("IS") and not flags.Input.isMC:
45  JES_is_data=True
46  calib_seq += "_Insitu"
47 
48  # Second seed
49  # Copy default jets: seed1
50  jetDef_seed1 = jetDef_unsub.clone()
51  jetDef_seed1.suffix = jetDef_seed0.suffix.replace("_seed0","_seed1")
52  jetDef_seed1.radius = 0.2
53  jetDef_seed1.modifiers=["HLTHIJetAssoc", "HLTHIJetConstSub_iter0:iter0", "HLTHIJetSeedCalib:{}___{}".format(calib_seq, JES_is_data), "Filter:25000"]
54 
55  # Final subracted jets
56  jetDef_final = jetDef_unsub.clone()
57  jetDef_final.suffix = jetDef_unsub.suffix.replace("_Unsubtracted","")
58  jetDef_final.modifiers=["HLTHIJetConstSub_iter1:iter1", "HLTHIJetJetConstMod_iter1", "HLTHIJetCalib:{}___{}".format(calib_seq, JES_is_data), "Sort", "Filter:20000"]
59 
60  jetDefDict = {
61  "unsub": (jetDef_unsub.fullname(), jetDef_unsub),
62  "seed0": (jetDef_seed0.fullname(), jetDef_seed0),
63  "seed1": (jetDef_seed1.fullname(), jetDef_seed1),
64  "final": (jetDef_final.fullname(), jetDef_final),
65  }
66  return jetDefDict
67 
68 def jetHIEventShapeSequenceCA(configFlags, clustersKey, towerKey):
69  acc = ComponentAccumulator()
70 
71  #Import the map tool - it will have to harvest configuration along the path
72  eventShapeMapToolKey="HLTHIEventShapeMapTool"
73  theMapTool=CompFactory.HIEventShapeMapTool(eventShapeMapToolKey)
74 
75  #Make new event shape at tower level
76  EventShapeKey='HLTHIEventShapeWeighted'
77  ESAlg_W=CompFactory.HIEventShapeMaker("ESAlg_W")
78  ESAlg_W.OutputContainerKey=EventShapeKey
79  ESAlg_W.InputTowerKey=clustersKey
80  ESAlg_W.NaviTowerKey=towerKey
81 
82  #Add filler tool
83  ESFiller=CompFactory.HIEventShapeFillerTool("WeightedFiller")
84  ESFiller.UseClusters=True
85 
86  #Add weight tool to filler tool
87  TWTool=CompFactory.HITowerWeightTool()
88  TWTool.ApplyCorrection=True
89  TWTool.ConfigDir='HIJetCorrection/'
90  from HIJetRec.HIJetRecUtilsCA import getHIClusterGeoWeightFile
91  TWTool.InputFile=getHIClusterGeoWeightFile(configFlags)
92 
93  ESFiller.TowerWeightTool=TWTool
94  ESFiller.EventShapeMapTool=theMapTool
95  #Add to top sequence
96  ESAlg_W.HIEventShapeFillerTool=ESFiller
97  acc.addEventAlgo(ESAlg_W)
98 
99  return acc, EventShapeKey, theMapTool
100 
101 
102 # JetModifier dictionary
103 from JetRecConfig.StandardJetMods import stdJetModifiers
104 stdJetModifiers.update(
105  HLTHIJetCalib = JetModifier("JetCalibrationTool",
106  "HLTHICalibTool_{modspec}",
107  JetCollection="AntiKt4HI",
108  PrimaryVerticesContainerName="",
109  ConfigFile='JES_MC16_HI_Jan2021_5TeV.config',
110  CalibSequence=lambda _, modspec: modspec.split('___')[0],
111  IsData=lambda _, modspec: modspec.split('___')[1] == 'True'),
112  )
113 
114 stdJetModifiers.update(
115  HLTHIJetSeedCalib = JetModifier("JetCalibrationTool",
116  "HLTHISeedCalibTool_{modspec}",
117  JetCollection="AntiKt2HI",
118  PrimaryVerticesContainerName="",
119  ConfigFile='JES_MC16_HI_Jan2021_5TeV.config',
120  CalibSequence=lambda _, modspec: modspec.split('___')[0],
121  IsData=lambda _, modspec: modspec.split('___')[1] == 'True'),
122  )
123 
124 def jetHIRecoSequenceCA(configFlags, clustersKey, towerKey, **jetRecoDict):
125  """This build the standard heavy ion style jet.
126 
127  This is similar to JetRecConfig.getJetDefAlgs(). However due to how the alg flow is organized in the
128  chain steps, we can't use this function directly.
129  Instead we
130  - construct a JetDefinition
131  - use lower-level function in JetRecConfig with this JetDefinition to get the necessary algs and build our sequence manually.
132 
133  """
134  acc = ComponentAccumulator()
135 
136  if jetRecoDict["ionopt"] == "noion":
137  raise ValueError("Jet reco for heavy ion called without a ion option!")
138 
139  dataSource = "mc" if configFlags.Input.isMC else "data"
140 
141  jetHIEvtShapeSequence, eventShapeKey, eventShapeMapTool = jetHIEventShapeSequenceCA(configFlags, clustersKey=clustersKey, towerKey=towerKey)
142  acc.merge(jetHIEvtShapeSequence)
143 
144  jetNamePrefix = JetRecoCommon.getHLTPrefix()
145  jetDef = JetRecoCommon.defineHIJets(jetRecoDict,clustersKey=clustersKey,prefix=jetNamePrefix,suffix="_Unsubtracted")
146  jetsFullName_Unsub = jetDef.fullname()
147 
148  # Add the PseudoJetGetter alg to the sequence
149  pjgalg = CompFactory.PseudoJetAlgorithm(
150  "pjgalg_HI",
151  InputContainer = clustersKey,
152  OutputContainer = "PseudoJet"+clustersKey,
153  Label = "pjgHLTHI",
154  SkipNegativeEnergy = False,
155  TreatNegativeEnergyAsGhost=True
156  )
157  acc.addEventAlgo(pjgalg)
158  finalpjs = str(pjgalg.OutputContainer)
159 
160  # Set the name of the final PseudoJetContainer to be used as input :
161  jetDef._internalAtt['finalPJContainer'] = finalpjs
162 
163 
164  from JetRec import JetOnlineMon
165  monTool = JetOnlineMon.getMonTool_TrigJetAlgorithm(configFlags, "HLTJets/AntiKt4HI/")
166 
167  # Reconstruction
168  jetRecAlg = getHIJetRecAlg(jetDef, jetsFullName_Unsub, monTool=monTool)
169  acc.addEventAlgo(jetRecAlg)
170 
171  associationName = "%s_DR8Assoc" % (clustersKey)
172 
173  jetsInUnsub = jetsFullName_Unsub
174 
175  JES_is_data=False
176  calib_seq='EtaJES' #only do in situ for R=0.4 jets in data
177  if jetRecoDict["jetCalib"].endswith("IS") and (dataSource=="data"):
178  JES_is_data=True
179  calib_seq += "_Insitu"
180 
181  # Copy unsubtracted jets: seed0
182  jetDef_seed0 = jetDef.clone()
183  jetDef_seed0.suffix = jetDef.suffix.replace("Unsubtracted", "seed0")
184  jetDef_seed0.radius = 0.2
185  jetsFullName_seed0 = jetDef_seed0.fullname()
186  stdJetModifiers.update(
187  # we give a function as PtMin : it will be evaluated when instantiating the tool (modspec will come alias usage like "Filter:10000" --> PtMin=100000)
188  HLTHIJetAssoc = JetModifier("HIJetDRAssociationTool","HIJetDRAssociation", ContainerKey=clustersKey, DeltaR=0.8, AssociationName=associationName),
189  HLTHIJetMaxOverMean = JetModifier("HIJetMaxOverMeanTool","HIJetMaxOverMean", JetContainer = jetsFullName_seed0),
190  HLTHIJetDiscrim = JetModifier("HIJetDiscriminatorTool","HIJetDiscriminator", MaxOverMeanCut = 4, MinimumETMaxCut=3000),
191  )
192  jetDef_seed0.modifiers=["HLTHIJetAssoc", "HLTHIJetMaxOverMean", "HLTHIJetDiscrim", "Filter:5000"]
193  copySeed0Alg = getJetCopyAlg(jetsin=jetsInUnsub,jetsoutdef=jetDef_seed0,decorations=[],shallowcopy=False,shallowIO=False,monTool=monTool)
194  acc.addEventAlgo(copySeed0Alg)
195 
196  # First iteration!
197  iter0=HLTAddIteration(configFlags, jetsFullName_seed0, eventShapeKey, clustersKey, map_tool=eventShapeMapTool, assoc_name=associationName, suffix="iter0") # subtract UE from jets
198  acc.addEventAlgo(HLTRunTools([iter0], "jetalgHI_iter0"))
199  modulator0=iter0.Modulator
200  subtractor0=iter0.Subtractor
201 
202  HLTMakeSubtractionTool(configFlags, iter0.OutputEventShapeKey, Modulator=modulator0, EventShapeMapTool=eventShapeMapTool, Subtractor=subtractor0, label="HLTHIJetConstSub_iter0")
203 
204  cluster_key_iter0_deep=clustersKey+"_iter0_temp"
205  happy_iter0_Tool = ApplySubtractionToClustersHLT(configFlags, EventShapeKey="HLTHIEventShapeWeighted_iter0", ClusterKey=clustersKey, OutClusterKey=cluster_key_iter0_deep, Modulator=modulator0, EventShapeMapTool=eventShapeMapTool, Subtractor=subtractor0, SetMoments=False, ApplyOriginCorrection=False)
206  acc.addEventAlgo(HLTRunTools([happy_iter0_Tool], "jetalgHI_clusterSub_iter0"))
207 
208  GetConstituentsModifierToolHLT(configFlags, name="HIJetConstituentModifierTool", ClusterKey=cluster_key_iter0_deep, ApplyOriginCorrection=False, label="HLTHIJetJetConstMod_iter0")
209 
210  # Copy default jets: seed1
211  jetDef_seed1 = jetDef.clone()
212  jetDef_seed1.suffix = jetDef_seed0.suffix.replace("_seed0","_seed1")
213  jetDef_seed1.radius = 0.2
214  jetDef_seed1.modifiers=["HLTHIJetAssoc", "HLTHIJetConstSub_iter0:iter0", "HLTHIJetSeedCalib:{}___{}".format(calib_seq, JES_is_data), "Filter:25000"]
215  jetsFullName_seed1 = jetDef_seed1.fullname()
216  copySeed1Alg = getJetCopyAlg(jetsin=jetsInUnsub,jetsoutdef=jetDef_seed1,decorations=[],shallowcopy=False,shallowIO=False,monTool=monTool)
217  acc.addEventAlgo(copySeed1Alg)
218 
219  iter1=HLTAddIteration(configFlags, jetsFullName_seed1, eventShapeKey, clustersKey, map_tool=eventShapeMapTool, assoc_name=associationName, sub_tool=subtractor0, suffix="iter1")
220  iter1.OutputEventShapeKey="HLTHIEventShape_iter1"
221  modulator1=iter1.Modulator
222  subtractor1=iter1.Subtractor
223 
224  HLTMakeSubtractionTool(configFlags, iter1.OutputEventShapeKey, Modulator=modulator1, EventShapeMapTool=eventShapeMapTool, label="HLTHIJetConstSub_iter1")
225 
226  acc.addEventAlgo(HLTRunTools([iter1], "jetalgHI_clusterSub_egamma"))
227 
228  #
229  cluster_key_final_deep=clustersKey+"_final"
230  subToClusterTool = ApplySubtractionToClustersHLT(configFlags, EventShapeKey="HLTHIEventShape_iter1", ClusterKey=clustersKey, OutClusterKey=cluster_key_final_deep, Modulator=modulator1, EventShapeMapTool=eventShapeMapTool, Subtractor=subtractor1, SetMoments=False, ApplyOriginCorrection=False)
231  acc.addEventAlgo(HLTRunTools([subToClusterTool], "jetalgHI_clusterSub"))
232 
233  GetConstituentsModifierToolHLT(configFlags, name="HIJetConstituentModifierTool", ClusterKey=cluster_key_final_deep, ApplyOriginCorrection=False, label="HLTHIJetJetConstMod_iter1")
234 
235  jetDef_final = jetDef.clone()
236  jetDef_final.suffix = jetDef.suffix.replace("_Unsubtracted","")
237  jetDef_final.modifiers=["HLTHIJetConstSub_iter1:iter1", "HLTHIJetJetConstMod_iter1", "HLTHIJetCalib:{}___{}".format(calib_seq, JES_is_data), "Sort", "Filter:20000"]
238  copyAlg_final= getJetCopyAlg(jetsin=jetsInUnsub,jetsoutdef=jetDef_final,decorations=[],shallowcopy=False,shallowIO=False,monTool=monTool)
239  acc.addEventAlgo(copyAlg_final)
240 
241  jetsFinal = recordable(jetDef_final.fullname())
242 
243  jetsOut = jetsFinal
244  return acc, jetsOut, jetDef_final
245 
246 def HLTRunTools(toollist, algoName):
247 
248  theAlg = CompFactory.JetAlgorithm(algoName)
249  theAlg.Tools = toollist
250 
251  return theAlg
252 
253 def getHIJetRecAlg( jetdef, jetsName, monTool = None):
254  """Returns the configured HIJetRecAlg instance corresponding to jetdef
255 
256  IMPORTANT : jetdef must have its dependencies solved (i.e. it must result from solveDependencies() )
257  """
258  pjContNames = jetdef._internalAtt['finalPJContainer']
259  jclust = CompFactory.JetClusterer(
260  "builder",
261  JetAlgorithm = jetdef.algorithm,
262  JetRadius = jetdef.radius,
263  PtMin = jetdef.ptmin,
264  InputPseudoJets = pjContNames,
265  GhostArea = 0.0,
266  JetInputType = int(jetdef.inputdef.jetinputtype),
267  RandomOption = 1,
268  )
269 
270  mods = JetRecConfig.getJetModifierTools(jetdef)
271 
272  jetname = jetsName
273  jra = CompFactory.JetRecAlg(
274  "jetrecalg_"+jetname,
275  Provider = jclust,
276  Modifiers = mods,
277  OutputContainer = jetname,
278  )
279  if monTool:
280  # this option can't be set in AnalysisBase -> set only if explicitly asked :
281  jra.MonTool = monTool
282 
283  return jra
284 
285 # Same as AddIteration in Reconstruction/HeavyIonRec/HIJetRec/HIJetRecUtils.py but without jtm
286 def HLTAddIteration(configFlags, seed_container,shape_name,clustersKey, **kwargs) :
287  out_shape_name=shape_name
288  if 'suffix' in kwargs.keys() : out_shape_name+='_' + kwargs['suffix']
289  mod_shape_key=out_shape_name+'_Modulate'
290  remodulate=True
291  if remodulate :
292  if 'modulator' in kwargs.keys() : mod_tool=kwargs['modulator']
293  else :
294  log.info( "In HLTAddIteration function, HIUEModulatorTool is created using HLTMakeModulatorTool with mod_shape_key = {}".format(mod_shape_key) )
295  mod_tool=HLTMakeModulatorTool(mod_shape_key,**kwargs)
296 
297  if 'map_tool' in kwargs.keys() : map_tool=kwargs['map_tool']
298  else :
299  map_tool=CompFactory.HIEventShapeMapTool()
300 
301  if 'sub_tool' in kwargs.keys() : sub_tool=kwargs['sub_tool']
302  else :
303  from HIJetRec.HIJetRecUtilsCA import getHIClusterGeoWeightFile
304  weightInputFile=getHIClusterGeoWeightFile(configFlags)
305 
306  HIJetClusterSubtractorTool=CompFactory.HIJetClusterSubtractorTool
307  sub_tool=HIJetClusterSubtractorTool("HLTHIJetClusterSubtractor", ConfigDir='HIJetCorrection/', InputFile=weightInputFile)
308  sub_tool.UseSamplings=False
309 
310  if 'assoc_name' in kwargs.keys() : assoc_name=kwargs['assoc_name']
311  else :
312  log.info( "In HLTAddIteration function, HIJetDRAssociationTool is created with clustersKey= {}".format(clustersKey) )
313  assoc=CompFactory.HIJetDRAssociationTool("HIJetDRAssociation")
314  assoc.ContainerKey=clustersKey
315  assoc.DeltaR=0.8
316  assoc.AssociationName="%s_DR8Assoc" % (clustersKey)
317  assoc_name=assoc.AssociationName
318 
319  HIEventShapeJetIteration=CompFactory.HIEventShapeJetIteration
320  iter_tool=HIEventShapeJetIteration('HLTHIJetIteration_%s' % out_shape_name )
321 
322  iter_tool.InputEventShapeKey=shape_name
323  iter_tool.OutputEventShapeKey=out_shape_name
324  iter_tool.AssociationKey=assoc_name
325  iter_tool.CaloJetSeedContainerKey=seed_container
326  iter_tool.Subtractor=sub_tool
327  iter_tool.ModulationScheme=1
328  iter_tool.RemodulateUE=True
329  iter_tool.Modulator=mod_tool
330  iter_tool.ShallowCopy=False
331  iter_tool.ModulationEventShapeKey=mod_shape_key
332  iter_tool.EventShapeMapTool=map_tool
333 
334  return iter_tool
335 
336 def HLTBuildHarmonicName(shape_key, **kwargs) :
337  tname=shape_key
338  if 'harmonics' in kwargs.keys() :
339  for n in kwargs['harmonics'] :
340  tname = str(tname) + str('_V%d' % n)
341  return tname
342 
344  tname='NullUEModulator'
345  HIUEModulatorTool=CompFactory.HIUEModulatorTool
346  mod=HIUEModulatorTool(tname)
347  mod.EventShapeKey=''
348  for n in [2,3,4] : setattr(mod,'DoV%d' % n,False)
349  return mod
350 
351 def HLTMakeModulatorTool(mod_key, **kwargs):
352  harmonics = kwargs.pop('harmonics', [2, 3, 4])
353  tname = kwargs.pop('mod_name', 'Modulator_{}'.format(HLTBuildHarmonicName(mod_key, harmonics=harmonics)))
354 
355  if 'suffix' in kwargs.keys():
356  tname += '_' + kwargs['suffix']
357 
358  if len(harmonics) == 0:
359  return HLTGetNullModulator()
360 
361  HIUEModulatorTool=CompFactory.HIUEModulatorTool
362  mod=HIUEModulatorTool(tname)
363  mod.EventShapeKey=mod_key
364 
365  for n in [2,3,4] :
366  val=(n in harmonics)
367  attr_name='DoV%d' % n
368  setattr(mod,attr_name,val)
369 
370  if 'label' in kwargs.keys():
371  label = kwargs['label']
372  stdJetModifiers[label] = JetModifier(
373  "HIUEModulatorTool",
374  tname,
375  DoV2 = mod.DoV2,
376  DoV3 = mod.DoV3,
377  DoV4 = mod.DoV4,
378  EventShapeKey=mod_key)
379 
380  return mod
381 
383  from HIJetRec.HIJetRecUtilsCA import getHIClusterGeoWeightFile
384  weightInputFile=getHIClusterGeoWeightFile(configFlags)
385 
386  HIJetClusterSubtractorTool = CompFactory.HIJetClusterSubtractorTool
387  sub_tool = HIJetClusterSubtractorTool("HLTHIJetClusterSubtractor", ConfigDir='HIJetCorrection/', InputFile=weightInputFile)
388  sub_tool.UseSamplings = False
389 
390  return sub_tool
391 
392 #same as MakeSubtractionTool in Reconstruction/HeavyIonRec/HIJetRec/HIJetRecUtils.py but without jtm
393 def HLTMakeSubtractionTool(configFlags, shapeKey, moment_name='', momentOnly=False, **kwargs) :
394 
395  alg_props = {
396  'EventShapeKey': shapeKey,
397  'Modulator': HLTGetNullModulator(),
398  'EventShapeMapTool': CompFactory.HIEventShapeMapTool(),
399  'Subtractor': HLTHIJetClusterSubtractorGetter(configFlags),
400  'MomentName': 'HLTJetSubtractedScale{}Momentum'.format(moment_name),
401  'SetMomentOnly': momentOnly,
402  'ApplyOriginCorrection': True,
403  }
404 
405  suffix = shapeKey.toStringProperty()
406  if momentOnly is True:
407  suffix += '_' + moment_name
408 
409  alg_props.update(kwargs)
410 
411  label = alg_props.pop('label', None)
412 
413  HIJetConstituentSubtractionTool = CompFactory.HIJetConstituentSubtractionTool
414  subtr = HIJetConstituentSubtractionTool("HLTHICS_" + suffix, **alg_props)
415 
416  stdJetModifiers[label] = JetModifier(
417  "HIJetConstituentSubtractionTool",
418  "HLTHICS_HLTHIEventShapeWeighted_{modspec}",
419  Modulator=subtr.Modulator,
420  EventShapeMapTool=subtr.EventShapeMapTool,
421  Subtractor=subtr.Subtractor,
422  EventShapeKey=subtr.EventShapeKey,
423  MomentName=subtr.MomentName,
424  SetMomentOnly=subtr.SetMomentOnly,
425  ApplyOriginCorrection=True)
426 
427  return subtr
428 
429 def HLTHIClusterGetter(dummyFlags, tower_key="CombinedTower", cell_key="AllCalo", cluster_key="HLT_HIClusters") :
430  """Function to equip HLT HI cluster builder from towers and cells, adds to output AOD stream"""
431 
432  HIClusterMaker=CompFactory.HIClusterMaker
433  theAlg=HIClusterMaker()
434  theAlg.InputTowerKey=tower_key
435  theAlg.CaloCellContainerKey=cell_key
436  theAlg.OutputContainerKey=cluster_key
437 
438  return theAlg
439 
440 
441 def ApplySubtractionToClustersHLT(configFlags, **kwargs) :
442 
443  alg_props = {
444  'EventShapeKey': "HLTHIEventShape_iter1",
445  'ClusterKey': "HLT_HIClusters",
446  'Modulator': HLTGetNullModulator(),
447  'EventShapeMapTool': CompFactory.HIEventShapeMapTool(),
448  'UpdateOnly': False,
449  'ApplyOriginCorrection': True,
450  'Subtractor': HLTHIJetClusterSubtractorGetter(configFlags),
451  'SetMoments': False,
452  }
453 
454  alg_props.update(kwargs)
455 
456  toolName = alg_props.pop('toolName', 'HIClusterSubtraction')
457 
458  HIClusterSubtraction = CompFactory.HIClusterSubtraction
459  theAlg = HIClusterSubtraction(toolName, **alg_props)
460 
461  return theAlg
462 
463 def GetConstituentsModifierToolHLT(configFlags, **kwargs) :
464  #For the cluster key, same exact logic as used for ApplySubtractionToClusters
465 
466  alg_props = {
467  'ClusterKey': "HLT_HIClusters",
468  'ApplyOriginCorrection': True,
469  'Subtractor': HLTHIJetClusterSubtractorGetter(configFlags),
470  }
471 
472  alg_props.update(kwargs)
473 
474  toolName = alg_props.pop('name', 'HIJetConstituentModifierTool')
475  label = alg_props.pop('label', None)
476 
477  HIJetConstituentModifierTool = CompFactory.HIJetConstituentModifierTool
478  cmod = HIJetConstituentModifierTool(toolName, **alg_props)
479 
480  stdJetModifiers[label] = JetModifier(
481  "HIJetConstituentModifierTool",
482  "HLTHIJetConstituentModifierTool_{modspec}",
483  ClusterKey=cmod.ClusterKey,
484  Subtractor=cmod.Subtractor,
485  ApplyOriginCorrection=cmod.ApplyOriginCorrection)
486 
487  return cmod
grepfile.info
info
Definition: grepfile.py:38
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
HIClusterMaker
Algorithm to build HI-style clusters, which are essentially towers. Cluster energy is sum of cell ene...
Definition: HIClusterMaker.h:37
HIJetRecUtilsCA.getHIClusterGeoWeightFile
def getHIClusterGeoWeightFile(flags)
Definition: HIJetRecUtilsCA.py:7
python.HLT.Jet.JetHIConfig.jetHIRecoSequenceCA
def jetHIRecoSequenceCA(configFlags, clustersKey, towerKey, **jetRecoDict)
Definition: JetHIConfig.py:124
python.HLT.Jet.JetHIConfig.HLTHIJetClusterSubtractorGetter
def HLTHIJetClusterSubtractorGetter(configFlags)
Definition: JetHIConfig.py:382
HIJetConstituentSubtractionTool
JetModifier that actual does the background subtraction. This tool is the most important one applied ...
Definition: HIJetConstituentSubtractionTool.h:44
python.HLT.Jet.JetHIConfig.ApplySubtractionToClustersHLT
def ApplySubtractionToClustersHLT(configFlags, **kwargs)
Definition: JetHIConfig.py:441
HIUEModulatorTool
Definition: HIUEModulatorTool.h:17
python.HLT.Jet.JetHIConfig.GetConstituentsModifierToolHLT
def GetConstituentsModifierToolHLT(configFlags, **kwargs)
Definition: JetHIConfig.py:463
python.HLT.Jet.JetHIConfig.HLTAddIteration
def HLTAddIteration(configFlags, seed_container, shape_name, clustersKey, **kwargs)
Definition: JetHIConfig.py:286
python.HLT.Jet.JetHIConfig.HLTGetNullModulator
def HLTGetNullModulator()
Definition: JetHIConfig.py:343
JetOnlineMon.getMonTool_TrigJetAlgorithm
def getMonTool_TrigJetAlgorithm(flags, path)
Definition: JetOnlineMon.py:4
python.HLT.Jet.JetHIConfig.getHIJetRecAlg
def getHIJetRecAlg(jetdef, jetsName, monTool=None)
Definition: JetHIConfig.py:253
python.HLT.Jet.JetHIConfig.jetHIEventShapeSequenceCA
def jetHIEventShapeSequenceCA(configFlags, clustersKey, towerKey)
Definition: JetHIConfig.py:68
HIJetClusterSubtractorTool
Concrete implementation of HIJetSubtractorToolBase. Class used by HIClusterSubtraction and HIJetConst...
Definition: HIJetClusterSubtractorTool.h:32
python.HLT.Jet.JetHIConfig.HLTMakeSubtractionTool
def HLTMakeSubtractionTool(configFlags, shapeKey, moment_name='', momentOnly=False, **kwargs)
Definition: JetHIConfig.py:393
HIEventShapeJetIteration
Definition: HIEventShapeJetIteration.h:25
python.HLT.Jet.JetHIConfig.HLTBuildHarmonicName
def HLTBuildHarmonicName(shape_key, **kwargs)
Definition: JetHIConfig.py:336
HIClusterSubtraction
Algorithm that applies background subtraction to clusters. The subtraction needs to be handled separa...
Definition: HIClusterSubtraction.h:40
python.JetRecConfig.getJetCopyAlg
def getJetCopyAlg(jetsin, jetsoutdef, decorations=[], shallowcopy=True, shallowIO=True, monTool=None)
Definition: JetRecConfig.py:495
python.HLT.Jet.JetHIConfig.HLTMakeModulatorTool
def HLTMakeModulatorTool(mod_key, **kwargs)
Definition: JetHIConfig.py:351
HIJetConstituentModifierTool
Definition: HIJetConstituentModifierTool.h:24
python.HLT.Jet.JetHIConfig.HLTRunTools
def HLTRunTools(toollist, algoName)
Definition: JetHIConfig.py:246
python.TriggerEDM.recordable
def recordable(arg, runVersion=3)
Definition: TriggerEDM.py:30
str
Definition: BTagTrackIpAccessor.cxx:11
python.HLT.Jet.JetHIConfig.HeavyIonJetRecoDataDeps
def HeavyIonJetRecoDataDeps(flags, **jetRecoDict)
Definition: JetHIConfig.py:21
python.HLT.Jet.JetHIConfig.HLTHIClusterGetter
def HLTHIClusterGetter(dummyFlags, tower_key="CombinedTower", cell_key="AllCalo", cluster_key="HLT_HIClusters")
Definition: JetHIConfig.py:429