ATLAS Offline Software
Functions | Variables
TrigJetMonitorAlgorithm Namespace Reference

Functions

def getChains2Monitor (inputFlags, monMode)
 
def getEtaRange (chain)
 Helpful functions. More...
 
def getBinningFromThreshold (chain, varname)
 
def getHTBinning (chain, binwidth)
 
def addFlavourTagVariables (conf, network_prefix, flavs="cub")
 
def getJetCopyAlg (injets, outjets)
 
def getL1JetCopyAlg (injets, outjets)
 
def TrigJetMonConfig (inputFlags)
 
def basicJetMonAlgSpec (jetcoll, isOnline)
 
def jetMonitoringConfig (inputFlags, jetcoll, jetCollDict, monMode)
 
def l1JetMonitoringConfig (inputFlags, jetColl, jetDict, monMode, chain='', matched=False)
 
def jetChainMonitoringConfig (inputFlags, jetcoll, chain, onlyUsePassingJets=True)
 
def jetEfficiencyMonitoringConfig (inputFlags, onlinejetcoll, offlinejetcoll, chain, refChain)
 

Variables

 logger
 
 copySuffix
 constants More...
 
 OfflineJetCollections
 Offline jet collections to monitor. More...
 
 L1JetCollections
 L1 jet collections and chains to monitor. More...
 
 match_smallRL1_OfflineJets_List
 
 match_largeRL1_OfflineJets_List
 
 match_HIL1_OfflineJets_List
 
 items
 
 d_items
 
 errmsg
 
 l1Coll2MatcherKey
 
 Chain2L1JetCollDict
 
 Legacy2PhaseIjJThresholdDict
 
 Legacy2PhaseIgJThresholdDict
 
 Legacy2PhaseIgLJThresholdDict
 
 JetCollections
 HLT jet collections and chains to monitor. More...
 
 ExtraOfflineHists
 
 ExtraSmallROnlineHists
 
 title
 
 ExtraLargeROnlineHists
 
 ExtraOnlineNJetHists
 
 OfflineScaleMomenta
 
 OnlineScaleMomenta
 
 parser
 
 action
 
 dest
 
 default
 
 args
 
 RunTruth
 
 GenOfflineR10PF
 
 PrintDetailedConfig
 
 inputFile
 
 flags
 
 Files
 
 isMC
 
 HISTFileName
 
 monMode
 
 Chains2Monitor
 
 cfg
 
 outputlist
 
 comp
 
 key
 
 EMPFlowCSSK
 
 label
 
 AntiKt10EMPFlowCSSK
 
 ptmin
 
 modifiers
 
 AntiKt10EMPFlowCSSKSoftDrop
 
 substrmods
 
 ZCut
 
 Beta
 
 ItemList
 
 helper
 
 scalestring
 
 name
 
 alg
 
 JetContainerName1
 
 hltColl
 
 JetContainerName2
 
 JetCalibScale
 
 sequenceName
 
 offjetColl
 
 L1JetContainerName1
 
 l1jetColl
 
 matchjetcoll
 
 MatchL1
 
 l1jetconf
 
 l1chainconf
 
 offlineMonitorConf
 
 monitorConf
 
 jetcoll
 
 chainMonitorConfT
 
 chainMonitorConfF
 
 effMonitorConf
 
 withDetails
 

Function Documentation

◆ addFlavourTagVariables()

def TrigJetMonitorAlgorithm.addFlavourTagVariables (   conf,
  network_prefix,
  flavs = "cub" 
)

Definition at line 347 of file TrigJetMonitorAlgorithm.py.

347 def addFlavourTagVariables(conf, network_prefix, flavs="cub"):
348  cutname='pt20'
349  fillerTools = []
350  for f in flavs:
351  xvar = f"{network_prefix}_p{f}"
352  varname = f"ftag_p{f}"
353  fillerTools += [HistoSpec(varname, xvar=xvar, bins=(70, -0.2, 1.2), title=f"{varname};{varname};;Entries")]
354  fastDipsSelectSpec = SelectSpec(f"{network_prefix}_{cutname}", '20<pt:GeV&|eta|<3.2', path='NoTriggerSelection/'+cutname, FillerTools=fillerTools)
355  conf.appendHistos(fastDipsSelectSpec)
356 

◆ basicJetMonAlgSpec()

def TrigJetMonitorAlgorithm.basicJetMonAlgSpec (   jetcoll,
  isOnline 
)

Definition at line 604 of file TrigJetMonitorAlgorithm.py.

604 def basicJetMonAlgSpec(jetcoll,isOnline):
605  # we use a specialized dictionnary (JetMonAlgSpec) which will be translated into the final C++ tool
606  path = 'NoTriggerSelection' if isOnline else 'standardHistos/'
607  minNjetBin = 1 if isOnline else 0
608 
609  TopLevelDir = 'HLT/JetMon/'
610  TopLevelDir += 'Online/' if isOnline else 'Offline/'
611 
612  jetcollFolder = jetcoll
613  jetcollFolder=jetcoll.replace(f"_{copySuffix}","")
614  Conf = JetMonAlgSpec(jetcoll+"Mon",JetContainerName = jetcoll, defaultPath = path, topLevelDir=TopLevelDir, bottomLevelDir=jetcollFolder, failureOnMissingContainer=False)
615 
616  # Now start filling the histo spec list
617  knownHistos['phi_tight'] = HistoSpec('phi_tight',
618  (50,-math.pi,math.pi),
619  title='#phi;#phi;Entries',
620  xvar='phi')
621  Conf.appendHistos(
622  # See knownHistos in JetStandardHistoSpecs.py
623  # for the list of standard specification.
624  "pt",
625  "m",
626  "eta",
627  "phi",
628  "phi_tight",
629  "e",
630  "et",
631  # or we can directly add our custom histo specification in the form of a HistoSpec:
632  # the basic call is : HistoSpec( variable, histobins, title='histotile;xtitle,ytitle')
633 
634  # Say we want a 2nd 'pt' plot but with a different binning than in the standard spec.
635  # WARNING : we can not re-use the same spec name in a given JetMonitoringAlg !!!
636  # so we give a new name AND we specify the actual variable with the argument 'xvar'
637  # (the ':GeV' means the variable is to be set at GeV scale)
638  #HistoSpec( 'lowpt', (100,0,150) , title='p_{T};p_{T} [GeV];', xvar='pt:GeV'),
639  # An equivalent solution would have been to clone the existing spec like in :
640  # knownHistos.pt.clone('lowpt',bins= (100,0,200) ),
641 
642  # 2D histos are usually refered to by concatenating vars with a ';' as in 'varx;vary'
643  # if the 'vax;vary' alias doesn't exist in knownHistos but 'varx' and 'vary'
644  # do exist, then a spec fot 'vax;vary' will be automatically generated.
645  "pt;m", # mass vs pt
646  "eta;phi", # phi vs eta
647  "eta;e", # energy vs eta
648  "phi;e", # energy vs phi
649  "phi_tight;e", # energy vs phi
650 
651  SelectSpec( 'central', '|eta|<3.2', path, FillerTools = ["pt","et","m"] ),
652  SelectSpec( 'forward', '3.2<|eta|', path, FillerTools = ["pt","et","m"] ),
653  SelectSpec( 'lowmu', 'avgMu<30', path, isEventVariable=True, FillerTools = ["pt","et","m","phi","eta"]),
654  SelectSpec( 'highmu', '30<avgMu', path, isEventVariable=True, FillerTools = ["pt","et","m","phi","eta"]),
655  # To select on multiple variables simultaneously, simply combine the selection strings via &
656  # Example below to select on ET > 100 GeV and |eta| > 3.2:
657  # SelectSpec( 'ETeta', '100<et:GeV&|eta|<3.2', path, FillerTools = ["pt","et","m","eta"] )
658  EventHistoSpec('njets', (25,minNjetBin,25), title='NJets;NJets;Entries' ),
659  EventHistoSpec('njetsPt20', (25,minNjetBin,25), title='NJetsPt20;NJetsPt20;Entries' ),
660  EventHistoSpec('njetsPt50', (25,minNjetBin,25), title='NJetsPt50;NJetsPt50;Entries' ),
661  # Jet multiplicity histograms can be added by using an EventHistoSpec
662  # Their specifications (pT cut, ET cut, eta cuts) must be defined in the knownEventVar dictionary within JetStandardHistoSpecs.py
663  # The following line is an example for a jet multiplicity histogram with ET>40 GeV, 1.0<|eta|<2.0, and binning of (10,0,10):
664  # EventHistoSpec('njetsEt40Eta1_2', (10,0,10), title='NJetsEt40Eta1_2;NJetsEt40Eta1_2;Entries' ),
665 
666  # TProfile2D : just use 3 variables. For now the sytem will automatically
667  # interpret it as a TProfile2D (the 3rd variable being profiled)
668  #"phi;eta;e", # --> Average Energy vs pt and eta
669 
670  # another possible selections : only sub-leading jets and highJVF
671  #SelectSpec( 'subleading',
672  # '', # no selection on variables
673  # SelectedIndex=1, # force 2nd (sub-leading) jet (we would set 0 for leading jets)
674  # path='standardHistos', # force the path where the histos are saved in the final ROOT file
675  # FillerTools = [
676  # "pt",
677  # "m",
678  # ] ),
679  #SelectSpec( 'highJVF',
680  # '0.3<JVF[0]', # JVF is a vector<float> for each jets. Here we cut on the 0th entry of this vector
681  # FillerTools = [
682  # "pt",
683  # ] ),
684  )
685 
686  return Conf
687 

◆ getBinningFromThreshold()

def TrigJetMonitorAlgorithm.getBinningFromThreshold (   chain,
  varname 
)

Definition at line 302 of file TrigJetMonitorAlgorithm.py.

302 def getBinningFromThreshold(chain,varname):
303  #default binning if nothing below applies
304  xbins, xmin, xmax = 160,0.,800000.
305  #pt and et binning based on threshold
306  if varname == "pt" or varname == "et":
307  if 'noalg' in chain:
308  if 'jJ500' in chain or 'J400' in chain: return 160,xmin,800000
309  else: return 100,xmin,500000 # good enough for L1 jJ40 & jJ100
310  else:
311  #threshold = int(chain.split("_")[1].split('j')[1])
312  threshold = int(re.search(r'\d+',chain.split("_")[1].split('j')[1]).group())
313  if threshold < 50:
314  return 40, 0., 100000.
315  if threshold < 120:
316  return 36, 20000., 200000.
317 
318  xbins = 40
319  xmin = 50000.+100000.*(int(threshold/100)-1) #example: threshold = 330 -> 250 to 450; threshold = 420 -> 350 to 550
320  if threshold % 100 == 0: #gives enough low bins if threshold is an exact divider of 100 GeV such as 3j200
321  xmin = 1000.*(threshold - 100.)
322  xmax = xmin + 200000.
323  if "a10" in chain: # efficiency curve broader for large-R jets
324  xmin = xmin - 50000.
325  xmax = xmax + 50000.
326  if "pf" in chain:
327  xmax = xmax + 50000. # needed to include efficiency plateau for large-R PFlow chains
328  if "smc" in chain:
329  xmax = xmax + 50000. # efficiency plateau even higher for a10 pdf smc chains due to imperfect calibration
330  #mass binning for large-R smc chains
331  elif varname == "m":
332  xbins, xmin, xmax = 35, 30000., 100000.
333  return xbins, xmin, xmax
334 

◆ getChains2Monitor()

def TrigJetMonitorAlgorithm.getChains2Monitor (   inputFlags,
  monMode 
)

Definition at line 227 of file TrigJetMonitorAlgorithm.py.

227 def getChains2Monitor(inputFlags, monMode):
228 
229  Chains2Monitor = dict()
230  from TrigConfigSvc.TriggerConfigAccess import getHLTMonitoringAccess
231  monAccess = getHLTMonitoringAccess(inputFlags)
232 
233  # set HLT jet collection, reference chain and offline jet collection
234  # for turn-on curves
235  ListOfMonChains = monAccess.monitoredChains(signatures="jetMon", monLevels = ["shifter","t0"])
236 
237  default_dict = {"HLTColl": "NONE", "RefChain": "NONE" ,"OfflineColl": "NONE"}
238  Chains2Monitor[monMode] = dict((chain, default_dict.copy()) for chain in ListOfMonChains)
239 
240  if monMode == 'HI':
241  for chainName in Chains2Monitor['HI']:
242  if '_ion_' in chainName:
243  Chains2Monitor['HI'][chainName]["HLTColl"] = "HLT_AntiKt4HIJets"
244  Chains2Monitor['HI'][chainName]["OfflineColl"] = "AntiKt4HIJets"
245  else:
246  Chains2Monitor['HI'][chainName]["HLTColl"] = "HLT_AntiKt4EMTopoJets_subjesIS"
247  Chains2Monitor['HI'][chainName]["OfflineColl"] = "AntiKt4EMPFlowJets"
248  elif monMode == "pp":
249  # logic to define HLTColl, RefChain, OfflineColl
250  for chainName in Chains2Monitor['pp']:
251  Chains2Monitor['pp'][chainName]["HLTColl"] = "HLT_AntiKt4EMTopoJets_subjesIS"
252  if '_pf_' in chainName and 'a10' not in chainName:
253  Chains2Monitor['pp'][chainName]["HLTColl"] = "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf"
254  Chains2Monitor['pp'][chainName]["OfflineColl"] = "AntiKt4EMPFlowJets"
255  elif 'a10' in chainName:
256  if 'a10t' in chainName: Chains2Monitor['pp'][chainName]["HLTColl"] = "HLT_AntiKt10LCTopoTrimmedPtFrac4SmallR20Jets_jes"
257  elif 'sd_cssk_pf' in chainName: Chains2Monitor['pp'][chainName]["HLTColl"] = "HLT_AntiKt10EMPFlowCSSKSoftDropBeta100Zcut10Jets_jes_ftf"
258  elif 'a10r' in chainName: Chains2Monitor['pp'][chainName]["HLTColl"] = "HLT_AntiKt10EMTopoRCJets_subjesIS"
259  else: Chains2Monitor['pp'][chainName]["HLTColl"] = "HLT_AntiKt10LCTopoJets_subjes"
260  elif '_noalg_' in chainName:
261  Chains2Monitor['pp'][chainName]["RefChain"] = "HLT_j45_pf_ftf_preselj20_L1jJ40" # temporarily modify to using small-R jet in turn-on for both small and large-R jets to fix tier0 jet mon crash ATR-25800!!
262  Chains2Monitor['pp'][chainName]["OfflineColl"] = "AntiKt4EMPFlowJets"
263  if 'gLJ' in chainName: Chains2Monitor['pp'][chainName]["HLTColl"] = "HLT_AntiKt10EMPFlowCSSKSoftDropBeta100Zcut10Jets_jes_ftf"
264  else: continue
265 
266  # only HLT_noalg get efficiency curves by default, so...
267  # these are additional hard-coded chains for efficiency monitoring
268  if Chains2Monitor['pp'].get('HLT_j420_L1J100'): Chains2Monitor['pp']['HLT_j420_L1J100'].update({"RefChain": "HLT_j85_L1J20", "OfflineColl": "AntiKt4EMPFlowJets"})
269  if Chains2Monitor['pp'].get('HLT_3j200_L1J100'): Chains2Monitor['pp']['HLT_3j200_L1J100'].update({"RefChain": "HLT_j85_L1J20", "OfflineColl": "AntiKt4EMPFlowJets"})
270  if Chains2Monitor['pp'].get('HLT_4j120_L13J50'): Chains2Monitor['pp']['HLT_4j120_L13J50'].update({"RefChain": "HLT_j85_L1J20", "OfflineColl": "AntiKt4EMPFlowJets"})
271  if Chains2Monitor['pp'].get('HLT_5j80_pf_ftf_presel5j50_L14J15'): Chains2Monitor['pp']['HLT_5j80_pf_ftf_presel5j50_L14J15'].update({"RefChain": "HLT_j45_pf_ftf_preselj20_L1J15", "OfflineColl": "AntiKt4EMPFlowJets"})
272  if Chains2Monitor['pp'].get('HLT_j400_pf_ftf_L1J100'): Chains2Monitor['pp']['HLT_j400_pf_ftf_L1J100'].update({"RefChain": "HLT_j85_pf_ftf_preselj50_L1J20", "OfflineColl": "AntiKt4EMPFlowJets"})
273  if Chains2Monitor['pp'].get('HLT_j400_pf_ftf_preselj225_L1J100'): Chains2Monitor['pp']['HLT_j400_pf_ftf_preselj225_L1J100'].update({"RefChain": "HLT_j85_pf_ftf_preselj50_L1J20", "OfflineColl": "AntiKt4EMPFlowJets"})
274 
275  if Chains2Monitor['pp'].get('HLT_j420_L1jJ160'): Chains2Monitor['pp']['HLT_j420_L1jJ160'].update({"RefChain": "HLT_j85_L1jJ50", "OfflineColl": "AntiKt4EMPFlowJets"})
276  if Chains2Monitor['pp'].get('HLT_3j200_L1jJ160'): Chains2Monitor['pp']['HLT_3j200_L1jJ160'].update({"RefChain": "HLT_j85_L1jJ50", "OfflineColl": "AntiKt4EMPFlowJets"})
277  if Chains2Monitor['pp'].get('HLT_4j120_L13jJ90'): Chains2Monitor['pp']['HLT_4j120_L13jJ90'].update({"RefChain": "HLT_j85_L1jJ50", "OfflineColl": "AntiKt4EMPFlowJets"})
278  if Chains2Monitor['pp'].get('HLT_5j80_pf_ftf_presel5j50_L14jJ40'): Chains2Monitor['pp']['HLT_5j80_pf_ftf_presel5j50_L14jJ40'].update({"RefChain": "HLT_j45_pf_ftf_preselj20_L1jJ40", "OfflineColl": "AntiKt4EMPFlowJets"})
279  if Chains2Monitor['pp'].get('HLT_j400_pf_ftf_L1jJ160'): Chains2Monitor['pp']['HLT_j400_pf_ftf_L1jJ160'].update({"RefChain": "HLT_j85_pf_ftf_preselj50_L1jJ50", "OfflineColl": "AntiKt4EMPFlowJets"})
280  if Chains2Monitor['pp'].get('HLT_j400_pf_ftf_preselj225_L1jJ160'): Chains2Monitor['pp']['HLT_j400_pf_ftf_preselj225_L1jJ160'].update({"RefChain": "HLT_j85_pf_ftf_preselj50_L1jJ50", "OfflineColl": "AntiKt4EMPFlowJets"})
281 
282  else:
283  errmsg = 'Returned empty Chains2Monitor due to invalid monMode'
284  raise RuntimeError(errmsg)
285  return Chains2Monitor
286 

◆ getEtaRange()

def TrigJetMonitorAlgorithm.getEtaRange (   chain)

Helpful functions.

Definition at line 291 of file TrigJetMonitorAlgorithm.py.

291 def getEtaRange(chain):
292  etaMin,etaMax = 0,2.5 # central jets by default
293  if 'eta' in chain:
294  etaParts = chain.split('eta')
295  etaMinTemp = etaParts[0].split('_')
296  etaMin = etaMinTemp[len(etaMinTemp)-1]
297  etaMin = int(etaMin)/10
298  etaMax = etaParts[1].split('_')[0]
299  etaMax = int(etaMax)/10
300  return etaMin,etaMax
301 

◆ getHTBinning()

def TrigJetMonitorAlgorithm.getHTBinning (   chain,
  binwidth 
)

Definition at line 335 of file TrigJetMonitorAlgorithm.py.

335 def getHTBinning(chain,binwidth):
336  parts = chain.split('HT')
337  threshold = parts[1].split('_')[0]
338  if 'XX' in threshold:
339  threshold = threshold.split('XX')[0]
340  xmin = int(0.9 * int(threshold)) # xmin to make the threshold visible
341  xmax = xmin + 500
342  xbins = int((xmax-xmin)/binwidth)-1
343  return xbins, xmin, xmax
344 
345 # Add fast flavour-tag monitoring.
346 # Adds a 20 GeV jet pT cut to avoid FPE WARNINGS from jets below min jet pT for RoI track association

◆ getJetCopyAlg()

def TrigJetMonitorAlgorithm.getJetCopyAlg (   injets,
  outjets 
)
  Schedules JetCopier tool to make a shallow copy of
  the original offline/HLT jet container, for the JetMatcherAlg to decorate.
  This prevents our jet monitoring from decorating
  the original jet containers, which may end up being
  persistified in AOD/ESD (ATLASRECTS-7168,ATR-27980,ATR-26076)

Definition at line 416 of file TrigJetMonitorAlgorithm.py.

416 def getJetCopyAlg(injets,outjets):
417  '''
418  Schedules JetCopier tool to make a shallow copy of
419  the original offline/HLT jet container, for the JetMatcherAlg to decorate.
420  This prevents our jet monitoring from decorating
421  the original jet containers, which may end up being
422  persistified in AOD/ESD (ATLASRECTS-7168,ATR-27980,ATR-26076)
423  '''
424  jcopy = CompFactory.JetCopier(
425  "copier",
426  InputJets = injets,
427  DecorDeps=[],
428  ShallowCopy=True,
429  ShallowIO=True)
430 
431  jprovider = CompFactory.JetRecAlg(
432  "jetalg_copy_"+outjets,
433  Provider = jcopy,
434  Modifiers = [],
435  OutputContainer = outjets,
436  MonTool = None)
437 
438  return jprovider
439 

◆ getL1JetCopyAlg()

def TrigJetMonitorAlgorithm.getL1JetCopyAlg (   injets,
  outjets 
)
  Schedules L1JetCopyAlgorithm to make a shallow copy of
  the original L1 jet container, for the JetMatcherAlg to decorate.
  This prevents our jet monitoring from decorating
  the original jet containers, which may end up being
  persistified in AOD/ESD (ATLASRECTS-7168,ATR-27980,ATR-26076).
  The L1JetCopyAlgorithm is a templated class (e.g. L1JetCopyAlgorithm<JTM_JetRoIContainer>).
  The python class name is what is generated by Athena during build time.
  The template types are defined in JTMContainers.h.

Definition at line 440 of file TrigJetMonitorAlgorithm.py.

440 def getL1JetCopyAlg(injets,outjets):
441  '''
442  Schedules L1JetCopyAlgorithm to make a shallow copy of
443  the original L1 jet container, for the JetMatcherAlg to decorate.
444  This prevents our jet monitoring from decorating
445  the original jet containers, which may end up being
446  persistified in AOD/ESD (ATLASRECTS-7168,ATR-27980,ATR-26076).
447  The L1JetCopyAlgorithm is a templated class (e.g. L1JetCopyAlgorithm<JTM_JetRoIContainer>).
448  The python class name is what is generated by Athena during build time.
449  The template types are defined in JTMContainers.h.
450  '''
451  jcopy_alg = None
452  jcopy_alg_name = "l1jetcopy_alg_"+injets
453  if injets == "LVL1JetRoIs":
454  jcopy_alg = CompFactory.L1JetCopyAlgorithm_JTM_JetRoIContainer_(jcopy_alg_name)
455  elif injets == "L1_jFexSRJetRoI":
456  jcopy_alg = CompFactory.L1JetCopyAlgorithm_JTM_jFexSRJetRoIContainer_(jcopy_alg_name)
457  elif injets in ["L1_gFexSRJetRoI", "L1_gFexLRJetRoI"]:
458  jcopy_alg = CompFactory.L1JetCopyAlgorithm_JTM_gFexJetRoIContainer_(jcopy_alg_name)
459  else:
460  raise ValueError(f"L1 jet container {injets} not recognised")
461  jcopy_alg.JetInContainerName = injets
462  jcopy_alg.JetOutContainerName = outjets
463 
464  return jcopy_alg
465 

◆ jetChainMonitoringConfig()

def TrigJetMonitorAlgorithm.jetChainMonitoringConfig (   inputFlags,
  jetcoll,
  chain,
  onlyUsePassingJets = True 
)
Function to configures some algorithms in the monitoring system.

Definition at line 848 of file TrigJetMonitorAlgorithm.py.

848 def jetChainMonitoringConfig(inputFlags,jetcoll,chain,onlyUsePassingJets=True):
849  '''Function to configures some algorithms in the monitoring system.'''
850 
851  jetcollFolder = jetcoll
852  chainFolder = chain
853 
854  #if not athenaMT:
855  # onlyUsePassingJets = False #does not work for legacy samples yet
856  jetMonAlgSpecName = chain+"TrigMon"
857  if not onlyUsePassingJets:
858  chainFolder = chainFolder + "/ExpertHistos"
859  jetMonAlgSpecName = jetMonAlgSpecName + "_ExpertHistos"
860 
861  # Define helper functions to automatize ET & eta selection strings for NJet histograms of chains
862  def getThreshold(parts):
863  return parts[1].split('_')[0]
864 
865  def getEtaRangeString(chain):
866  etaMin, etaMax = 0, 32
867  if 'eta' in chain:
868  etaParts = chain.split('eta')
869  etaMinTemp = etaParts[0].split('_')
870  etaMin = etaMinTemp[len(etaMinTemp)-1]
871  etaMax = etaParts[1].split('_')[0]
872  if int(etaMin) > 0 : etaMin = str(int(int(etaMin)/10))
873  if int(etaMax) > 0 : etaMax = str(int(int(etaMax)/10))
874  return 'Eta{}_{}'.format(etaMin,etaMax)
875 
876  def getNjetHistName(chain):
877  NjetHistName = 'NONE'
878  parts = chain.split('j')
879  # check if it is a multi-threshold multijet chain or a single-threshold multijet chain
880  multiplicity = parts[0].split('_')[1] # for single-threshold multijet chains
881  if (chain.count('_j')-chain.count('_jes')) > 1 or multiplicity != '':
882  NjetHistName = 'njetsEt{}{}'.format(getThreshold(parts),getEtaRangeString(chain))
883  return NjetHistName
884 
885 
886  trigConf = JetMonAlgSpec( # the usual JetMonAlgSpec
887  jetMonAlgSpecName,
888  JetContainerName = jetcoll,
889  TriggerChain = chain,
890  defaultPath = chainFolder,
891  topLevelDir="HLT/JetMon/Online/",
892  bottomLevelDir=jetcollFolder,
893  failureOnMissingContainer=True,
894  onlyPassingJets=onlyUsePassingJets,
895  isExpressStreamJob=inputFlags.Common.doExpressProcessing,
896  )
897 
898  trigConf.appendHistos(
899  "pt",
900  "m",
901  "eta",
902  "et",
903  "phi",
904  "phi_tight",
905 
906  )
907  for hist in ExtraOnlineNJetHists: trigConf.appendHistos(EventHistoSpec(hist, (20,0,25), title=hist+';'+hist+';Entries'))
908  # Add NjetEt and NjetPt histograms for simple scenarios
909  if 'ht' not in chain and 'HT' not in chain and 'dijet' not in chain and 'DIJET' not in chain and 'fbdj' not in chain and 'noalg' not in chain:
910  NjetHistName = getNjetHistName(chain)
911  from JetMonitoring.JetStandardHistoSpecs import knownEventVar
912  if knownEventVar.get(NjetHistName,None) is not None and NjetHistName not in ExtraOnlineNJetHists: #avoids duplication warnings for some chains
913  trigConf.appendHistos(
914  EventHistoSpec(NjetHistName, (25,0,25), title=NjetHistName+';'+NjetHistName+';Entries' ),
915  )
916  NjetHistName = NjetHistName.replace('Et','Pt')
917  if knownEventVar.get(NjetHistName,None) is not None and NjetHistName not in ExtraOnlineNJetHists:
918  trigConf.appendHistos(
919  EventHistoSpec(NjetHistName, (25,0,25), title=NjetHistName+';'+NjetHistName+';Entries' ),
920  )
921  if 'ftf' in chain and 'a10' not in chain: # track-based JVT variables for FTF chains
922  trigConf.appendHistos("Jvt")
923  trigConf.appendHistos("JVFCorr")
924  trigConf.appendHistos("JvtRpt")
925 
926  if 'ht' in chain or 'HT' in chain:
927  def defineHistoForHTChain(conf, parentAlg, monhelper , path):
928  # create a monitoring group with the histo path starting from the parentAlg
929  group = monhelper.addGroup(parentAlg, conf.Group, conf.topLevelDir+jetcollFolder+'/')
930  # define the histograms
931  xbins, xmin, xmax = getHTBinning(chain,25) # bin width in GeV
932  group.defineHistogram("jetHT;HT",title="Jet HT;H_{T} [GeV];Entries", type="TH1F", path=chainFolder, xbins=xbins , xmin=xmin, xmax=xmax ,)
933  trigConf.appendHistos(ToolSpec('JetHistoHTFiller','JetHistoHTFiller_'+chain,MinPt=30.,MaxEta=3.2,FailureOnMissingContainer=False,
934  defineHistoFunc=defineHistoForHTChain,Group='jetHT_'+jetcoll))
935 
936  return trigConf
937 

◆ jetEfficiencyMonitoringConfig()

def TrigJetMonitorAlgorithm.jetEfficiencyMonitoringConfig (   inputFlags,
  onlinejetcoll,
  offlinejetcoll,
  chain,
  refChain 
)
Function to configures some algorithms in the monitoring system.

Definition at line 938 of file TrigJetMonitorAlgorithm.py.

938 def jetEfficiencyMonitoringConfig(inputFlags,onlinejetcoll,offlinejetcoll,chain,refChain):
939  '''Function to configures some algorithms in the monitoring system.'''
940 
941  jetcollFolder = onlinejetcoll
942  chainFolder = chain
943 
944  # We schedule a new JetAlg which will be acting only when a TriggerChain fired (using the TriggerChain from the base classes).
945  # We'll plot 1 histo build by a dedicated JetHistoTriggEfficiency tool.
946  # So we'll have to explicitely give a specification via the generic dicionnary 'ToolSpec'
947  # This implies defining a little function which declares to the monitoring framework which variables to histogram and how.
948  # this is done here.
949  def defineHistoForJetTrigg(conf, parentAlg, monhelper , path):
950  # create a monitoring group with the histo path starting from the parentAlg
951  group = monhelper.addGroup(parentAlg, conf.Group, conf.topLevelDir+jetcollFolder+'/')
952  # define the histogram, give them individual names so they don't overwrite each other
953  append = "offlineCut_"+conf.name.split("_")[-1] if "offlineCut" in conf.name else "noOfflineCut"
954  histname = "trigEff_vs_"+conf.Var.Name+"_"+append
955  xbins, xmin, xmax = getBinningFromThreshold(chain,conf.Var.Name)
956  group.defineHistogram('trigPassed,jetVar;'+histname, title=histname, type="TEfficiency",
957  path=chainFolder,
958  xbins=xbins , xmin=xmin, xmax=xmax,)
959 
960  # Get jet index and eta selection for offline jets
961  validchain = chain.replace('noalg','j0')
962  parts = validchain.split('j')
963  multiplicity = parts[0].split('_')[1]
964  if multiplicity != '': index = int(multiplicity) - 1 # single-threhold multijet chains
965  else: index = 0 # single-jet chain
966  etaMin,etaMax = getEtaRange(chain)
967 
968  from JetMonitoring.JetMonitoringConfig import retrieveVarToolConf
969  trigConf = JetMonAlgSpec( # the usual JetMonAlgSpec
970  chain+"TrigEffMon",
971  JetContainerName = offlinejetcoll,
972  TriggerChain = refChain, # reference chain
973  defaultPath = chainFolder,
974  topLevelDir = "HLT/JetMon/Online/",
975  bottomLevelDir = jetcollFolder,
976  failureOnMissingContainer = True,
977  onlyPassingJets = False,
978  )
979  trigConf.appendHistos(
980  SelectSpec( 'eff', '{}<|eta|<{}'.format(etaMin,etaMax), chainFolder, SelectedIndex=index, FillerTools = [
981  # we pass directly the ToolSpec
982  ToolSpec('JetHistoTriggEfficiency', chain,
983  # below we pass the Properties of this JetHistoTriggEfficiency tool :
984  Group='jetTrigGroup_'+chain,
985  Var=retrieveVarToolConf("pt"), # In this context we can not just pass a str alias to describe a histo variable
986  # so we use retrieveVarToolConf("pt") which returns a full specification for the "pt" histo variable.
987  ProbeTrigChain=chain,defineHistoFunc=defineHistoForJetTrigg),
988  ] ),
989  )
990 
991  if 'smc' in chain:
992  trigConf.appendHistos(
993  SelectSpec( 'm50', '50<m:GeV&{}<|eta|<{}'.format(etaMin,etaMax), chainFolder, SelectedIndex=index, FillerTools = [
994  ToolSpec('JetHistoTriggEfficiency', chain+'_offlineCut_m50',
995  Group='jetTrigGroup_'+chain+'_m50',
996  Var=retrieveVarToolConf("pt"), # In this context we can not just pass a str alias to describe a histo variable
997  ProbeTrigChain=chain,defineHistoFunc=defineHistoForJetTrigg
998  ),
999  ] ),
1000  SelectSpec( 'et500', '500<et:GeV&{}<|eta|<{}'.format(etaMin,etaMax), chainFolder, SelectedIndex=index, FillerTools = [
1001  ToolSpec('JetHistoTriggEfficiency', chain+'_offlineCut_et500',
1002  Group='jetTrigGroup_'+chain+'_et500',
1003  Var=retrieveVarToolConf("m"), # In this context we can not just pass a str alias to describe a histo variable
1004  SortJets=True,
1005  ProbeTrigChain=chain,defineHistoFunc=defineHistoForJetTrigg
1006  ),
1007  ] ),
1008  )
1009 
1010  return trigConf
1011 

◆ jetMonitoringConfig()

def TrigJetMonitorAlgorithm.jetMonitoringConfig (   inputFlags,
  jetcoll,
  jetCollDict,
  monMode 
)
Function to configures some algorithms in the monitoring system.

Definition at line 688 of file TrigJetMonitorAlgorithm.py.

688 def jetMonitoringConfig(inputFlags,jetcoll,jetCollDict,monMode):
689  '''Function to configures some algorithms in the monitoring system.'''
690 
691  isOnline = True if 'HLT' in jetcoll else False
692  conf = basicJetMonAlgSpec(jetcoll,isOnline)
693 
694  jetCollMonDetails = jetCollDict[monMode][jetcoll]
695 
696  # Declare a configuration dictionnary for a JetContainer
697  if isOnline:
698  if 'AntiKt4' in jetcoll or 'a4tcem' in jetcoll:
699  for hist in ExtraSmallROnlineHists: conf.appendHistos(hist)
700  if 'ftf' in jetcoll: # dedicated histograms for FTF chains
701  conf.appendHistos("Jvt")
702  conf.appendHistos("JVFCorr")
703  conf.appendHistos("JvtRpt")
704  conf.appendHistos("SumPtTrkPt500[0]")
705  conf.appendHistos("NumTrkPt1000[0]")
706  conf.appendHistos("TrackWidthPt1000[0]")
707  if 'PF' in jetcoll: # dedicated histograms for online PFlow jets
708  conf.appendHistos("SumPtChargedPFOPt500[0]")
709  conf.appendHistos("fCharged")
710  if "subresjesgscIS" in jetcoll:
711  addFlavourTagVariables(conf,"fastDIPS20211215")
712  addFlavourTagVariables(conf,"GN120230331")
713  addFlavourTagVariables(conf,"tlaGN220240122")
714  if 'fastftag' in jetcoll:
715  addFlavourTagVariables(conf,"fastDips")
716  addFlavourTagVariables(conf, "fastGN120230327")
717  addFlavourTagVariables(conf,"fastGN220240122")
718  addFlavourTagVariables(conf,"fastGNTau20240216", flavs=["tau", "u"])
719  if 'EMTopo' in jetcoll: #dedicated histograms for online EMTopo jets
720  conf.appendHistos("Timing")
721  else:
722  for hist in ExtraLargeROnlineHists: conf.appendHistos(hist)
723  # Add matched jets plots
724  if jetCollMonDetails['MatchTo'] != 'NONE':
725  def defineHistoForHLTJetMatch(conf, parentAlg, monhelper , path):
726  # create a monitoring group with the histo path starting from the parentAlg
727  group = monhelper.addGroup(parentAlg, conf.Group, conf.topLevelDir+'/'+conf.bottomLevelDir+'/NoTriggerSelection/')
728  # define the histograms
729  for histname in [ 'ptdiff', 'energydiff', 'massdiff' ]: #defines which variable difference will be plotted
730  group.defineHistogram(histname,title=histname, type="TH1F",
731  path='MatchedJets_{}'.format(jetCollMonDetails['MatchTo']),
732  xbins=100 , xmin=-100000., xmax=100000. ,)
733 
734  for histname in [ 'ptresp', 'energyresp', 'massresp' ]:
735  group.defineHistogram(histname,title=histname, type="TH1F",
736  path='MatchedJets_{}'.format(jetCollMonDetails['MatchTo']),
737  xbins=100 , xmin=-2., xmax=2. ,)
738 
739  group.defineHistogram('ptresp,ptref;ptresp_vs_ptRef',title='ptresponse vs ptRef', type="TH2F",
740  path='MatchedJets_{}'.format(jetCollMonDetails['MatchTo']),
741  xbins=10 , xmin=-2., xmax=2., ybins=10, ymin=0., ymax=500000.,)
742 
743  group.defineHistogram('ptresp,etaref;ptresp_vs_etaRef',title='ptresponse vs etaRef', type="TH2F",
744  path='MatchedJets_{}'.format(jetCollMonDetails['MatchTo']),
745  xbins=10 , xmin=-2., xmax=2., ybins=10, ymin=-5., ymax=5.,)
746 
747  matchedJetColl = jetCollMonDetails['MatchTo']
748 
749  # we can get specific calibration scales by adding e.g. '_EtaJESScale' to the strings
750  jetmatchKey = '{}.matched_{}'.format(jetcoll,matchedJetColl)
751  jetptdiffKey = '{}.ptdiff_{}'.format(jetcoll,matchedJetColl)
752  jetenergydiffKey = '{}.energydiff_{}'.format(jetcoll,matchedJetColl)
753  jetmassdiffKey = '{}.massdiff_{}'.format(jetcoll,matchedJetColl)
754  jetptrespKey = '{}.ptresp_{}'.format(jetcoll,matchedJetColl)
755  jetenergyrespKey = '{}.energyresp_{}'.format(jetcoll,matchedJetColl)
756  jetmassrespKey = '{}.massresp_{}'.format(jetcoll,matchedJetColl)
757  jetptrefKey = '{}.ptRef_{}'.format(jetcoll,matchedJetColl)
758  jetetarefKey = '{}.etaRef_{}'.format(jetcoll,matchedJetColl)
759  name = 'jetMatched_{}_{}'.format(jetcoll,matchedJetColl)
760  conf.appendHistos(ToolSpec('JetHistoMatchedFiller', name,
761  JetMatchedKey=jetmatchKey, JetPtDiffKey=jetptdiffKey,
762  JetEnergyDiffKey=jetenergydiffKey,
763  JetMassDiffKey=jetmassdiffKey, JetPtRespKey=jetptrespKey,
764  JetEnergyRespKey=jetenergyrespKey, JetMassRespKey=jetmassrespKey,
765  JetPtRefKey=jetptrefKey,JetEtaRefKey=jetetarefKey,
766  defineHistoFunc=defineHistoForHLTJetMatch,Group='matchedJets_'+jetcoll)
767  )
768  else: # offline
769  for hist in ExtraOfflineHists: conf.appendHistos(hist)
770  if 'AntiKt4' in jetcoll and monMode=="pp":
771  conf.appendHistos(SelectSpec('LooseBadFailedJets', 'LooseBad',
772  InverseJetSel=True,
773  FillerTools = ["pt",
774  "phi",
775  "phi_tight",
776  "eta"])) #cleaning variables not applicable for large-R collections
777 
778  if 'PF' in jetcoll: # dedicated histograms for offline PFlow jets
779  conf.appendHistos("SumPtChargedPFOPt500[0]")
780  conf.appendHistos("fCharged")
781  elif 'EMTopo' in jetcoll:
782  conf.appendHistos("Timing")
783  if jetCollMonDetails['MatchTo'] != 'NONE':
784  def defineHistoForOfflineJetMatch(conf, parentAlg, monhelper , path):
785  # create a monitoring group with the histo path starting from the parentAlg
786  group = monhelper.addGroup(parentAlg, conf.Group, conf.topLevelDir+'/'+conf.bottomLevelDir+'/standardHistos/')
787  # define the histograms
788  for histname in [ 'ptdiff', 'energydiff', 'massdiff' ]: #defines which variable difference will be plotted
789  group.defineHistogram(histname,title=histname, type="TH1F",
790  path='MatchedJets_{}'.format(jetCollMonDetails['MatchTo']),
791  xbins=100 , xmin=-100000., xmax=100000. ,)
792 
793  for histname in [ 'ptresp', 'energyresp', 'massresp' ]:
794  group.defineHistogram(histname,title=histname, type="TH1F",
795  path='MatchedJets_{}'.format(jetCollMonDetails['MatchTo']),
796  xbins=100 , xmin=-2., xmax=2. ,)
797 
798  group.defineHistogram('ptresp,ptref;ptresp_vs_ptRef',title='ptresp vs ptRef', type="TH2F",
799  path='MatchedJets_{}'.format(jetCollMonDetails['MatchTo']),
800  xbins=10 , xmin=-2., xmax=2., ybins=10, ymin=0., ymax=500000.,)
801 
802  group.defineHistogram('ptresp,etaref;ptresp_vs_etaRef',title='ptresp vs etaRef', type="TH2F",
803  path='MatchedJets_{}'.format(jetCollMonDetails['MatchTo']),
804  xbins=10 , xmin=-2., xmax=2., ybins=10, ymin=-5., ymax=5.,)
805 
806  matchedJetColl = jetCollMonDetails['MatchTo']
807  jetmatchKey = '{}.matched_{}'.format(jetcoll,matchedJetColl)
808  jetptdiffKey = '{}.ptdiff_{}'.format(jetcoll,matchedJetColl)
809  jetenergydiffKey = '{}.energydiff_{}'.format(jetcoll,matchedJetColl)
810  jetmassdiffKey = '{}.massdiff_{}'.format(jetcoll,matchedJetColl)
811  jetptrespKey = '{}.ptresp_{}'.format(jetcoll,matchedJetColl)
812  jetenergyrespKey = '{}.energyresp_{}'.format(jetcoll,matchedJetColl)
813  jetmassrespKey = '{}.massresp_{}'.format(jetcoll,matchedJetColl)
814  jetptrefKey = '{}.ptRef_{}'.format(jetcoll,matchedJetColl)
815  jetetarefKey = '{}.etaRef_{}'.format(jetcoll,matchedJetColl)
816  name = 'jetMatched_{}_{}'.format(jetcoll,matchedJetColl)
817  conf.appendHistos(ToolSpec('JetHistoMatchedFiller',name,
818  JetMatchedKey=jetmatchKey, JetPtDiffKey=jetptdiffKey,
819  JetEnergyDiffKey=jetenergydiffKey,
820  JetMassDiffKey=jetmassdiffKey, JetPtRespKey=jetptrespKey,
821  JetEnergyRespKey=jetenergyrespKey,
822  JetMassRespKey=jetmassrespKey,
823  JetPtRefKey=jetptrefKey, JetEtaRefKey=jetetarefKey,
824  defineHistoFunc=defineHistoForOfflineJetMatch,Group='matchedJets_'+jetcoll)
825  )
826 
827  return conf
828 

◆ l1JetMonitoringConfig()

def TrigJetMonitorAlgorithm.l1JetMonitoringConfig (   inputFlags,
  jetColl,
  jetDict,
  monMode,
  chain = '',
  matched = False 
)

Definition at line 829 of file TrigJetMonitorAlgorithm.py.

829 def l1JetMonitoringConfig(inputFlags,jetColl, jetDict, monMode,chain='',matched=False):
830 
831  from TrigJetMonitoring.L1JetMonitoringConfig import L1JetMonAlg
832  name = jetColl if chain=='' else jetColl+'_'+chain
833 
834  jetCollKey = jetColl
835  jetColl = jetColl.replace(f"_{copySuffix}","")
836 
837  if not jetDict[monMode][jetCollKey]['MatchTo']:
838  conf = L1JetMonAlg(name,jetColl,jetCollKey,chain)
839  else:
840  assert len(jetDict[monMode][jetCollKey]['MatchTo']) == 2
841 
842  conf = L1JetMonAlg(name,jetColl,jetCollKey,chain,
843  matched,jetDict[monMode][jetCollKey]['MatchTo'][0],
844  jetDict[monMode][jetCollKey]['MatchTo'][1])
845 
846  return conf
847 

◆ TrigJetMonConfig()

def TrigJetMonitorAlgorithm.TrigJetMonConfig (   inputFlags)

Definition at line 466 of file TrigJetMonitorAlgorithm.py.

466 def TrigJetMonConfig(inputFlags):
467 
468  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
469  cfg = ComponentAccumulator()
470 
471  monMode = 'pp'
472  if inputFlags.Reco.EnableHI: monMode = 'HI'
473 
474  Chains2Monitor = getChains2Monitor(inputFlags, monMode)
475 
476  # Protections
477  # Add missing jet collections to JetCollections dict
478  # (this can happen if a given chain uses a jet collection that is not listed in JetCollections)
479  # TODO: make more general
480  for chain,chaindict in Chains2Monitor[monMode].items():
481  if chaindict['HLTColl'] not in JetCollections[case]: # chain will not be monitored unless HLT collection is present in JetCollections
482  JetCollections[case][chaindict['HLTColl']] = {'MatchTo': 'NONE'}
483 
484  # Match HLT jets to offline jets
485  CopiedJetCollections = copy.deepcopy(JetCollections)
486  for hltColl,collDict in JetCollections[monMode].items():
487  if collDict['MatchTo'] != 'NONE':
488  copiedhltColl = f'{hltColl}_{copySuffix}'
489  CopiedJetCollections[monMode][copiedhltColl] = CopiedJetCollections[monMode].pop(hltColl)
490  jetcopyalg = getJetCopyAlg(hltColl,copiedhltColl)
491  jetcopyalg.ExtraInputs.add(('xAOD::TrigCompositeContainer',
492  'StoreGateSvc+%s' % getRun3NavigationContainerFromInput(inputFlags)))
493  cfg.addEventAlgo(jetcopyalg)
494  for jetcalibscale in OnlineScaleMomenta:
495  scalestring = "_"+jetcalibscale if jetcalibscale != "" else ""
496  name = 'Matching_{}{}_{}'.format(hltColl,scalestring,collDict['MatchTo'])
497  alg = CompFactory.JetMatcherAlg(name,
498  JetContainerName1=copiedhltColl,
499  JetContainerName2=collDict['MatchTo'],
500  JetCalibScale=jetcalibscale)
501 
502  alg.ExtraInputs.add(('xAOD::TrigCompositeContainer',
503  'StoreGateSvc+%s' % getRun3NavigationContainerFromInput(inputFlags)))
504  cfg.addEventAlgo(alg)
505 
506  # Match offline to offline jets
507  CopiedOfflineJetCollections = copy.deepcopy(OfflineJetCollections)
508  for offjetColl,collDict in OfflineJetCollections[monMode].items():
509  if collDict['MatchTo'] != 'NONE':
510  copiedjetcoll = f'{offjetColl}_{copySuffix}'
511  CopiedOfflineJetCollections[monMode][copiedjetcoll] = CopiedOfflineJetCollections[monMode].pop(offjetColl)
512  jetcopyalg = getJetCopyAlg(offjetColl,copiedjetcoll)
513  cfg.addEventAlgo(jetcopyalg)
514  for jetcalibscale in OfflineScaleMomenta:
515  scalestring = "_"+jetcalibscale if jetcalibscale != "" else ""
516  name = 'Matching_{}{}_{}'.format(offjetColl,scalestring,collDict['MatchTo'])
517  alg = CompFactory.JetMatcherAlg(name,
518  JetContainerName1=copiedjetcoll,
519  JetContainerName2=collDict['MatchTo'],
520  JetCalibScale=jetcalibscale)
521 
522  alg.ExtraInputs.add(('xAOD::TrigCompositeContainer',
523  'StoreGateSvc+%s' % getRun3NavigationContainerFromInput(inputFlags)))
524  cfg.addEventAlgo(alg)
525 
526  # Make copy of every L1 jet collection
527  # Then match L1 to offline as well as HLT jets
528  CopiedL1JetCollections = copy.deepcopy(L1JetCollections)
529  for l1jetColl,collDict in L1JetCollections[monMode].items():
530  copiedl1jetColl = f'{l1jetColl}_{copySuffix}'
531  CopiedL1JetCollections[monMode][copiedl1jetColl] = CopiedL1JetCollections[monMode].pop(l1jetColl)
532  l1jetcopyalg = getL1JetCopyAlg(l1jetColl,copiedl1jetColl)
533  l1jetcopyalg.ExtraInputs.add(('xAOD::TrigCompositeContainer',
534  'StoreGateSvc+%s' % getRun3NavigationContainerFromInput(inputFlags)))
535  cfg.addEventAlgo(l1jetcopyalg)
536  for matchjetcoll in collDict['MatchTo']:
537 
538  kwds = {'name': 'Matching_{}_{}'.format(l1jetColl,matchjetcoll),
539  l1Coll2MatcherKey[l1jetColl]: copiedl1jetColl,
540  'JetContainerName2': matchjetcoll,
541  'MatchL1': True
542  }
543 
544  alg = CompFactory.JetMatcherAlg(**kwds)
545  alg.ExtraInputs.add(('xAOD::TrigCompositeContainer',
546  'StoreGateSvc+%s' % getRun3NavigationContainerFromInput(inputFlags)))
547  cfg.addEventAlgo(alg)
548 
549  # The following class will make a sequence, configure algorithms, and link
550  # them to GenericMonitoringTools
551  from AthenaMonitoring import AthMonitorCfgHelper
552  helper = AthMonitorCfgHelper(inputFlags,'TrigJetMonitorAlgorithm')
553  # Configure filter tools
554  from AthenaMonitoring.EventFlagFilterToolConfig import EventFlagFilterToolCfg
555  from AthenaMonitoring.BadLBFilterToolConfig import LArBadLBFilterToolCfg
556  # Loop over L1 jet collections
557  for jetcoll in CopiedL1JetCollections[monMode]:
558  l1jetconf = l1JetMonitoringConfig(inputFlags,jetcoll,CopiedL1JetCollections,monMode,'',True)
559  alg=l1jetconf.toAlg(helper)
560  alg.FilterTools = [ EventFlagFilterToolCfg(inputFlags),helper.resobj.popToolsAndMerge(LArBadLBFilterToolCfg(inputFlags))]
561 
562  # Loop over L1 jet chains
563  for chain,jetcolls in Chain2L1JetCollDict[monMode].items():
564  for jetcoll in jetcolls:
565  l1chainconf = l1JetMonitoringConfig(inputFlags,jetcoll,L1JetCollections,monMode,chain)
566  alg=l1chainconf.toAlg(helper)
567  alg.FilterTools = [ EventFlagFilterToolCfg(inputFlags),helper.resobj.popToolsAndMerge(LArBadLBFilterToolCfg(inputFlags))]
568 
569  # Loop over offline jet collections
570  for jetcoll in CopiedOfflineJetCollections[monMode]:
571  offlineMonitorConf = jetMonitoringConfig(inputFlags,jetcoll,CopiedOfflineJetCollections,monMode)
572  alg=offlineMonitorConf.toAlg(helper)
573  alg.FilterTools = [ EventFlagFilterToolCfg(inputFlags),helper.resobj.popToolsAndMerge(LArBadLBFilterToolCfg(inputFlags))]
574 
575  # Loop over HLT jet collections
576  for jetcoll in CopiedJetCollections[monMode]:
577  monitorConf = jetMonitoringConfig(inputFlags,jetcoll,CopiedJetCollections,monMode)
578  # then we turn the full specification into properly configured algorithm and tools.
579  # we use the method 'toAlg()' defined for the specialized dictionnary 'JetMonAlgSpec'
580  monitorConf.toAlg(helper)
581 
582  # Loop over HLT jet chains
583  for chain,chainDict in Chains2Monitor[monMode].items():
584  jetcoll = chainDict['HLTColl']
585  # kinematic plots
586  # only use passing jets
587  chainMonitorConfT = jetChainMonitoringConfig(inputFlags,jetcoll,chain,True)
588  alg=chainMonitorConfT.toAlg(helper)
589  alg.FilterTools = [ EventFlagFilterToolCfg(inputFlags),helper.resobj.popToolsAndMerge(LArBadLBFilterToolCfg(inputFlags))]
590  # all jets
591  chainMonitorConfF = jetChainMonitoringConfig(inputFlags,jetcoll,chain,False)
592  alg=chainMonitorConfF.toAlg(helper)
593  alg.FilterTools = [ EventFlagFilterToolCfg(inputFlags),helper.resobj.popToolsAndMerge(LArBadLBFilterToolCfg(inputFlags))]
594  # efficiency plots
595  if chainDict['RefChain'] != 'NONE' and chainDict['OfflineColl'] != 'NONE':
596  effMonitorConf = jetEfficiencyMonitoringConfig(inputFlags,jetcoll,chainDict['OfflineColl'],chain,chainDict['RefChain'])
597  effMonitorConf.toAlg(helper)
598 
599  cfg.merge(helper.result())
600  return cfg
601 
602 
603 # Basic selection of histograms common for online and offline jets

Variable Documentation

◆ action

TrigJetMonitorAlgorithm.action

Definition at line 1018 of file TrigJetMonitorAlgorithm.py.

◆ alg

TrigJetMonitorAlgorithm.alg

Definition at line 1114 of file TrigJetMonitorAlgorithm.py.

◆ AntiKt10EMPFlowCSSK

TrigJetMonitorAlgorithm.AntiKt10EMPFlowCSSK

Definition at line 1081 of file TrigJetMonitorAlgorithm.py.

◆ AntiKt10EMPFlowCSSKSoftDrop

TrigJetMonitorAlgorithm.AntiKt10EMPFlowCSSKSoftDrop

Definition at line 1085 of file TrigJetMonitorAlgorithm.py.

◆ args

TrigJetMonitorAlgorithm.args

Definition at line 1022 of file TrigJetMonitorAlgorithm.py.

◆ Beta

TrigJetMonitorAlgorithm.Beta

Definition at line 1085 of file TrigJetMonitorAlgorithm.py.

◆ cfg

TrigJetMonitorAlgorithm.cfg

Definition at line 1062 of file TrigJetMonitorAlgorithm.py.

◆ Chain2L1JetCollDict

TrigJetMonitorAlgorithm.Chain2L1JetCollDict

Definition at line 120 of file TrigJetMonitorAlgorithm.py.

◆ chainMonitorConfF

TrigJetMonitorAlgorithm.chainMonitorConfF

Definition at line 1167 of file TrigJetMonitorAlgorithm.py.

◆ chainMonitorConfT

TrigJetMonitorAlgorithm.chainMonitorConfT

Definition at line 1164 of file TrigJetMonitorAlgorithm.py.

◆ Chains2Monitor

TrigJetMonitorAlgorithm.Chains2Monitor

Definition at line 1049 of file TrigJetMonitorAlgorithm.py.

◆ comp

TrigJetMonitorAlgorithm.comp

Definition at line 1071 of file TrigJetMonitorAlgorithm.py.

◆ copySuffix

TrigJetMonitorAlgorithm.copySuffix

constants

Definition at line 26 of file TrigJetMonitorAlgorithm.py.

◆ d_items

TrigJetMonitorAlgorithm.d_items

Definition at line 85 of file TrigJetMonitorAlgorithm.py.

◆ default

TrigJetMonitorAlgorithm.default

Definition at line 1018 of file TrigJetMonitorAlgorithm.py.

◆ dest

TrigJetMonitorAlgorithm.dest

Definition at line 1018 of file TrigJetMonitorAlgorithm.py.

◆ effMonitorConf

TrigJetMonitorAlgorithm.effMonitorConf

Definition at line 1171 of file TrigJetMonitorAlgorithm.py.

◆ EMPFlowCSSK

TrigJetMonitorAlgorithm.EMPFlowCSSK

Definition at line 1080 of file TrigJetMonitorAlgorithm.py.

◆ errmsg

TrigJetMonitorAlgorithm.errmsg

Definition at line 90 of file TrigJetMonitorAlgorithm.py.

◆ ExtraLargeROnlineHists

TrigJetMonitorAlgorithm.ExtraLargeROnlineHists

Definition at line 388 of file TrigJetMonitorAlgorithm.py.

◆ ExtraOfflineHists

TrigJetMonitorAlgorithm.ExtraOfflineHists

Definition at line 364 of file TrigJetMonitorAlgorithm.py.

◆ ExtraOnlineNJetHists

TrigJetMonitorAlgorithm.ExtraOnlineNJetHists

Definition at line 391 of file TrigJetMonitorAlgorithm.py.

◆ ExtraSmallROnlineHists

TrigJetMonitorAlgorithm.ExtraSmallROnlineHists

Definition at line 376 of file TrigJetMonitorAlgorithm.py.

◆ Files

TrigJetMonitorAlgorithm.Files

Definition at line 1041 of file TrigJetMonitorAlgorithm.py.

◆ flags

TrigJetMonitorAlgorithm.flags

Definition at line 1040 of file TrigJetMonitorAlgorithm.py.

◆ GenOfflineR10PF

TrigJetMonitorAlgorithm.GenOfflineR10PF

Definition at line 1024 of file TrigJetMonitorAlgorithm.py.

◆ helper

TrigJetMonitorAlgorithm.helper

Definition at line 1105 of file TrigJetMonitorAlgorithm.py.

◆ HISTFileName

TrigJetMonitorAlgorithm.HISTFileName

Definition at line 1043 of file TrigJetMonitorAlgorithm.py.

◆ hltColl

TrigJetMonitorAlgorithm.hltColl

Definition at line 1114 of file TrigJetMonitorAlgorithm.py.

◆ inputFile

TrigJetMonitorAlgorithm.inputFile

Definition at line 1028 of file TrigJetMonitorAlgorithm.py.

◆ isMC

TrigJetMonitorAlgorithm.isMC

Definition at line 1042 of file TrigJetMonitorAlgorithm.py.

◆ ItemList

TrigJetMonitorAlgorithm.ItemList

Definition at line 1098 of file TrigJetMonitorAlgorithm.py.

◆ items

TrigJetMonitorAlgorithm.items

Definition at line 79 of file TrigJetMonitorAlgorithm.py.

◆ JetCalibScale

TrigJetMonitorAlgorithm.JetCalibScale

Definition at line 1114 of file TrigJetMonitorAlgorithm.py.

◆ jetcoll

TrigJetMonitorAlgorithm.jetcoll

Definition at line 1161 of file TrigJetMonitorAlgorithm.py.

◆ JetCollections

TrigJetMonitorAlgorithm.JetCollections

HLT jet collections and chains to monitor.

Definition at line 203 of file TrigJetMonitorAlgorithm.py.

◆ JetContainerName1

TrigJetMonitorAlgorithm.JetContainerName1

Definition at line 1114 of file TrigJetMonitorAlgorithm.py.

◆ JetContainerName2

TrigJetMonitorAlgorithm.JetContainerName2

Definition at line 1114 of file TrigJetMonitorAlgorithm.py.

◆ key

TrigJetMonitorAlgorithm.key

Definition at line 1074 of file TrigJetMonitorAlgorithm.py.

◆ l1chainconf

TrigJetMonitorAlgorithm.l1chainconf

Definition at line 1144 of file TrigJetMonitorAlgorithm.py.

◆ l1Coll2MatcherKey

TrigJetMonitorAlgorithm.l1Coll2MatcherKey

Definition at line 101 of file TrigJetMonitorAlgorithm.py.

◆ l1jetColl

TrigJetMonitorAlgorithm.l1jetColl

Definition at line 1133 of file TrigJetMonitorAlgorithm.py.

◆ L1JetCollections

TrigJetMonitorAlgorithm.L1JetCollections

L1 jet collections and chains to monitor.

Definition at line 52 of file TrigJetMonitorAlgorithm.py.

◆ l1jetconf

TrigJetMonitorAlgorithm.l1jetconf

Definition at line 1139 of file TrigJetMonitorAlgorithm.py.

◆ L1JetContainerName1

TrigJetMonitorAlgorithm.L1JetContainerName1

Definition at line 1133 of file TrigJetMonitorAlgorithm.py.

◆ label

TrigJetMonitorAlgorithm.label

Definition at line 1080 of file TrigJetMonitorAlgorithm.py.

◆ Legacy2PhaseIgJThresholdDict

TrigJetMonitorAlgorithm.Legacy2PhaseIgJThresholdDict

Definition at line 173 of file TrigJetMonitorAlgorithm.py.

◆ Legacy2PhaseIgLJThresholdDict

TrigJetMonitorAlgorithm.Legacy2PhaseIgLJThresholdDict

Definition at line 192 of file TrigJetMonitorAlgorithm.py.

◆ Legacy2PhaseIjJThresholdDict

TrigJetMonitorAlgorithm.Legacy2PhaseIjJThresholdDict

Definition at line 155 of file TrigJetMonitorAlgorithm.py.

◆ logger

TrigJetMonitorAlgorithm.logger

Definition at line 12 of file TrigJetMonitorAlgorithm.py.

◆ match_HIL1_OfflineJets_List

TrigJetMonitorAlgorithm.match_HIL1_OfflineJets_List

Definition at line 57 of file TrigJetMonitorAlgorithm.py.

◆ match_largeRL1_OfflineJets_List

TrigJetMonitorAlgorithm.match_largeRL1_OfflineJets_List

Definition at line 56 of file TrigJetMonitorAlgorithm.py.

◆ match_smallRL1_OfflineJets_List

TrigJetMonitorAlgorithm.match_smallRL1_OfflineJets_List

Definition at line 54 of file TrigJetMonitorAlgorithm.py.

◆ matchjetcoll

TrigJetMonitorAlgorithm.matchjetcoll

Definition at line 1133 of file TrigJetMonitorAlgorithm.py.

◆ MatchL1

TrigJetMonitorAlgorithm.MatchL1

Definition at line 1133 of file TrigJetMonitorAlgorithm.py.

◆ modifiers

TrigJetMonitorAlgorithm.modifiers

Definition at line 1082 of file TrigJetMonitorAlgorithm.py.

◆ monitorConf

TrigJetMonitorAlgorithm.monitorConf

Definition at line 1154 of file TrigJetMonitorAlgorithm.py.

◆ monMode

TrigJetMonitorAlgorithm.monMode

Definition at line 1046 of file TrigJetMonitorAlgorithm.py.

◆ name

TrigJetMonitorAlgorithm.name

Definition at line 1113 of file TrigJetMonitorAlgorithm.py.

◆ offjetColl

TrigJetMonitorAlgorithm.offjetColl

Definition at line 1124 of file TrigJetMonitorAlgorithm.py.

◆ OfflineJetCollections

TrigJetMonitorAlgorithm.OfflineJetCollections

Offline jet collections to monitor.

Definition at line 32 of file TrigJetMonitorAlgorithm.py.

◆ offlineMonitorConf

TrigJetMonitorAlgorithm.offlineMonitorConf

Definition at line 1149 of file TrigJetMonitorAlgorithm.py.

◆ OfflineScaleMomenta

TrigJetMonitorAlgorithm.OfflineScaleMomenta

Definition at line 404 of file TrigJetMonitorAlgorithm.py.

◆ OnlineScaleMomenta

TrigJetMonitorAlgorithm.OnlineScaleMomenta

Definition at line 405 of file TrigJetMonitorAlgorithm.py.

◆ outputlist

TrigJetMonitorAlgorithm.outputlist

Definition at line 1065 of file TrigJetMonitorAlgorithm.py.

◆ parser

TrigJetMonitorAlgorithm.parser

Definition at line 1017 of file TrigJetMonitorAlgorithm.py.

◆ PrintDetailedConfig

TrigJetMonitorAlgorithm.PrintDetailedConfig

Definition at line 1025 of file TrigJetMonitorAlgorithm.py.

◆ ptmin

TrigJetMonitorAlgorithm.ptmin

Definition at line 1081 of file TrigJetMonitorAlgorithm.py.

◆ RunTruth

TrigJetMonitorAlgorithm.RunTruth

Definition at line 1023 of file TrigJetMonitorAlgorithm.py.

◆ scalestring

TrigJetMonitorAlgorithm.scalestring

Definition at line 1112 of file TrigJetMonitorAlgorithm.py.

◆ sequenceName

TrigJetMonitorAlgorithm.sequenceName

Definition at line 1116 of file TrigJetMonitorAlgorithm.py.

◆ substrmods

TrigJetMonitorAlgorithm.substrmods

Definition at line 1085 of file TrigJetMonitorAlgorithm.py.

◆ title

TrigJetMonitorAlgorithm.title

Definition at line 377 of file TrigJetMonitorAlgorithm.py.

◆ withDetails

TrigJetMonitorAlgorithm.withDetails

Definition at line 1179 of file TrigJetMonitorAlgorithm.py.

◆ ZCut

TrigJetMonitorAlgorithm.ZCut

Definition at line 1085 of file TrigJetMonitorAlgorithm.py.

TrigJetMonitorAlgorithm.getEtaRange
def getEtaRange(chain)
Helpful functions.
Definition: TrigJetMonitorAlgorithm.py:291
TrigJetMonitorAlgorithm.getJetCopyAlg
def getJetCopyAlg(injets, outjets)
Definition: TrigJetMonitorAlgorithm.py:416
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.TriggerConfigAccess.getHLTMonitoringAccess
HLTMonitoringAccess getHLTMonitoringAccess(flags=None)
Definition: TriggerConfigAccess.py:256
TrigJetMonitorAlgorithm.getHTBinning
def getHTBinning(chain, binwidth)
Definition: TrigJetMonitorAlgorithm.py:335
TrigJetMonitorAlgorithm.jetChainMonitoringConfig
def jetChainMonitoringConfig(inputFlags, jetcoll, chain, onlyUsePassingJets=True)
Definition: TrigJetMonitorAlgorithm.py:848
TrigJetMonitorAlgorithm.getChains2Monitor
def getChains2Monitor(inputFlags, monMode)
Definition: TrigJetMonitorAlgorithm.py:227
TrigJetMonitorAlgorithm.l1JetMonitoringConfig
def l1JetMonitoringConfig(inputFlags, jetColl, jetDict, monMode, chain='', matched=False)
Definition: TrigJetMonitorAlgorithm.py:829
TrigJetMonitorAlgorithm.TrigJetMonConfig
def TrigJetMonConfig(inputFlags)
Definition: TrigJetMonitorAlgorithm.py:466
TrigJetMonitorAlgorithm.jetMonitoringConfig
def jetMonitoringConfig(inputFlags, jetcoll, jetCollDict, monMode)
Definition: TrigJetMonitorAlgorithm.py:688
TrigJetMonitorAlgorithm.getBinningFromThreshold
def getBinningFromThreshold(chain, varname)
Definition: TrigJetMonitorAlgorithm.py:302
TrigJetMonitorAlgorithm.addFlavourTagVariables
def addFlavourTagVariables(conf, network_prefix, flavs="cub")
Definition: TrigJetMonitorAlgorithm.py:347
JetMonitoringConfig.retrieveVarToolConf
def retrieveVarToolConf(alias)
Definition: JetMonitoringConfig.py:584
python.BadLBFilterToolConfig.LArBadLBFilterToolCfg
def LArBadLBFilterToolCfg(inputFlags, origDbTag=None)
Definition: BadLBFilterToolConfig.py:100
python.TrigDecisionToolConfig.getRun3NavigationContainerFromInput
def getRun3NavigationContainerFromInput(flags)
Definition: TrigDecisionToolConfig.py:75
python.KeyStore.dict
def dict(self)
Definition: KeyStore.py:321
TrigJetMonitorAlgorithm.jetEfficiencyMonitoringConfig
def jetEfficiencyMonitoringConfig(inputFlags, onlinejetcoll, offlinejetcoll, chain, refChain)
Definition: TrigJetMonitorAlgorithm.py:938
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
TrigJetMonitorAlgorithm.basicJetMonAlgSpec
def basicJetMonAlgSpec(jetcoll, isOnline)
Definition: TrigJetMonitorAlgorithm.py:604
dqt_zlumi_pandas.update
update
Definition: dqt_zlumi_pandas.py:42
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
python.EventFlagFilterToolConfig.EventFlagFilterToolCfg
def EventFlagFilterToolCfg(flags, name="EventFlagFilter", doLAr=True, doTile=True, doSCT=True, doCore=True, alwaysReturnTrue=False)
Definition: EventFlagFilterToolConfig.py:5
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
getThreshold
CP::CorrectionCode getThreshold(Int_t &threshold, const std::string &trigger)
Definition: MuonTriggerSFRootCoreTest.cxx:48
str
Definition: BTagTrackIpAccessor.cxx:11
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
TrigJetMonitorAlgorithm.getL1JetCopyAlg
def getL1JetCopyAlg(injets, outjets)
Definition: TrigJetMonitorAlgorithm.py:440