ATLAS Offline Software
SignatureDicts.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 from AthenaCommon.Logging import logging
3 log = logging.getLogger( __name__ )
4 log.debug("Importing %s",__name__)
5 
6 from copy import deepcopy
7 import itertools
8 
9 #==========================================================
10 # This is stored in chainDict['Signature']
11 #==========================================================
12 
13 # this dictionary contains all the informations about the signatures, needed to create the Chaindicitonary. It has the shape of:
14 # 'signature': ('substring', 'group')
15 # if the substring is '', the signature is not mapped to the chain name
16 # if the group is '', the signature is not mapped to any group
17 SignatureDict = {
18  'Electron': ('e','AllTag'),
19  'Photon' : ('g','AllTag'),
20  'Muon' : ('mu','AllTag'),
21  'Bphysics': ('', 'AllTag'),
22  'Tau' : ('tau','JetMET'),
23  'Jet' : ('j', 'JetMET'),
24  'Bjet' : ('', 'JetMET'),
25  'MET' : ('xe', 'JetMET'),
26  'XS' : ('xs', 'JetMET'),
27  'TE' : ('te', 'JetMET'),
28  'MinBias' : ('mb', 'MinBias'),
29  'HeavyIon' : ('hi', 'MinBias'),
30  'Cosmic' : ('cosmic', ''),
31  'Calib' : ('calib', ''),
32  'Streaming' : ('streamer', ''),
33  'Monitor' : ('mon', ''),
34  'Beamspot' : ('beamspot','Beamspot'),
35  'MuonnoL1' : ( '', 'MuonnoL1'),
36  'EnhancedBias' : ('eb', ''),
37  'UnconventionalTracking' : (['isotrk', 'fslrt', 'dedxtrk', 'hitdvjet', 'fsvsi', 'distrk', 'dispjet', 'dispvtx'], 'JetMET'),
38  'Test' : ('TestChain', ''),
39  'Electronprobe': ('', 'AllProbe'),
40  'Photonprobe' : ('', 'AllProbe'),
41  'Tauprobe' : ('', 'AllProbe'),
42  'Muonprobe' : ('', 'AllProbe')
43 }
44 
45 
47  # removes the grouping from the dict and creates a new one signature : string
48  new_dict = {key: value[0] for key, value in SignatureDict.items() if value[0] != ''}
49  return new_dict
50 
51 SliceIDDict = getSignatureDict()
52 
54  # removes the substring from the dict and creates a new one signature : group
55  new_dict = {key: value[1] for key, value in SignatureDict.items() if value[1] != ''}
56  return new_dict
57 
59  ''' returns the list of substrings representing the signautres in the chain name'''
60 
61  list_of_strings = list(SliceIDDict.values()) # this is a list of lists
62  flattened_list = list(itertools.chain.from_iterable((item if isinstance(item, list) else [item]) for item in list_of_strings))
63  return flattened_list
64 
66  ''' returns the list of substrings representing the signautres in the chain name'''
67  return SliceIDDict.keys()
68 
69 
70 
71 class ChainStore(dict):
72  """Class to hold list of chains for each signature (dictionary with fixed set of keys)"""
73  _allowedSignatures = ['Egamma', 'Muon', 'Jet', 'Bjet', 'Bphysics', 'MET', 'Tau',
74  'HeavyIon', 'Beamspot', 'Cosmic', 'EnhancedBias',
75  'Monitor', 'Calib', 'Streaming', 'Combined', 'MinBias',
76  'UnconventionalTracking', 'Test']
77 
78  def __init__(self):
79  # Create dicionary with fixed set of keys in the orignal order
80  super().__init__({s : [] for s in self._allowedSignatures})
81 
82  def __setitem__(self, key, value):
83  if key not in self:
84  raise RuntimeError(f"'{key}' is not in the list of allowed signatures: {self._allowedSignatures}")
85  else:
86  dict.__setitem__(self, key, value)
87 
88 
89 #==========================================================
90 # ---- Generic Template for all chains ----
91 # ---- chainParts specific information given in ----
92 # ---- signature specific dictionaries below ----
93 #==========================================================
94 ChainDictTemplate = {
95  'chainName' : '',
96  'L1item' : '',
97  'topo' : '',
98  'signatures' : [],
99  'alignmentGroups' : [],
100  'stream' : '',
101  'groups' : [],
102  'EBstep' : '',
103  'chainParts' : [],
104  'sigDicts' : {},
105  'sigFolder' : [],
106  'subSigs' : [],
107  'extraComboHypos' : []
108 }
109 
110 #==========================================================
111 # Test chains
112 #==========================================================
113 # ---- Test Dictionary of all allowed Values ----
114 TestChainParts = {
115  'L1threshold' : '',
116  'signature' : ['Test'],
117  'alignmentGroup' : ['Test'],
118  'chainPartName' : '',
119  'multiplicity' : '',
120  'extra' : ['mv1', 'mv1step', 'mv2', 'ev1', 'ev2', 'ev3', 'gv1', 'mEmpty1', 'mEmpty2', 'mEmpty3', 'ev1dr', 'mv1dr','merge'],
121  'trigType' : ['TestChain'],
122  'threshold' : '',
123  'addInfo' : [''],
124  'sigFolder' : ['Test'],
125  'subSigs' : ['Test'],
126  'chainPartIndex': list(range(0,10))
127 }
128 
129 # ---- Test Dictionary of default Values ----
130 TestChainParts_Default = {
131  'signature' : ['Test'],
132  'alignmentGroup' : ['Test'],
133  'L1threshold' : '',
134  'multiplicity' : '',
135  'trigType' : '',
136  'threshold' : '',
137  'addInfo' : [],
138  'sigFolder' : ['Test'],
139  'subSigs' : ['Test'],
140  'chainPartIndex': 0
141 }
142 
143 #==========================================================
144 # Jet
145 #==========================================================
146 AllowedTopos_jet = []
147 # List of keys that pertain to jet reconstruction
148 # as opposed to the hypo configuration
149 JetRecoKeys = ['recoAlg','constitType','clusterCalib','constitMod','jetCalib','trkopt','ionopt']
150 # ---- Jet Dictionary of all allowed Values ----
151 JetChainParts = {
152  # Information common to all signatures
153  'signature' : ['Jet'],
154  'alignmentGroup': ['Jet','JetMET'],
155  'L1threshold' : '',
156  'chainPartName' : '',
157  'threshold' : '',
158  'multiplicity' : '',
159  'trigType' : ['j'],
160  'topo' : AllowedTopos_jet,
161  'extra' : [],
162  'addInfo' : ['perf'],
163  'sigFolder' : ['Jet'],
164  'subSigs' : ['Jet'],
165  'chainPartIndex': list(range(0,10)),
166  # Information unique to the jet slice
167  # Reco information
168  'recoAlg' : # Jet clustering algorithm
169  ['a2', 'a4', 'a10', 'a10r', 'a10t', 'a10sd'],
170  'constitType' : # Jet input type
171  ['tc','pf'], # 'ufo' might be added at some point
172  'clusterCalib' : # Topocluster calibration
173  ['em', 'lcw'],
174  'constitMod' : # Constituent modifiers
175  ['sk', 'cssk'],
176  'jetCalib' : # Jet calibration
177  ['jes', 'subjes', 'subjesIS', 'subjesgscIS', 'subresjesgscIS', 'subjesgsc', 'subresjesgsc', 'nojcalib'],
178  'scan' : # No longer used?
179  ['FS',],
180  'ionopt' : # Heavy ion configuration
181  ['noion','ion','ionp'],
182  'trkopt' : # Tracking configuration
183  ['notrk','ftf','roiftf'],
184  'trkpresel' : # Tracking preselection
185  ['nopresel',
186  # Single jet
187  'preselj50emf72',
188  'preselj30emf72',
189  'preselj20emf72',
190  'preselj20emf60',
191  'preselj20emf48',
192  'preselj20emf24',
193  'preselj20emf18',
194  'preselj20emf12',
195  'preselj20emf6',
196  'preselj20',
197  'preselj50',
198  'preselj80',
199  'preselj120',
200  'preselj140',
201  'preselj180',
202  'preselj190',
203  'preselj160',
204  'preselj200',
205  'preselj225',
206  # Multijets
207  'presel2j180',
208  'presel2j225',
209  'presel3c30',
210  'presel3c40',
211  'presel3c45',
212  'presel3j45',
213  'presel3j150',
214  'presel4j20',
215  'presel4c20',
216  'presel4c25',
217  'presel4c30',
218  'presel4c35',
219  'presel4c45',
220  'presel4j25',
221  'presel4c25',
222  'presel4j40',
223  'presel4c40',
224  'presel4j45',
225  'presel4j50',
226  'presel4j85',
227  'presel5c20',
228  'presel5j25',
229  'presel5j50',
230  'presel5j55',
231  'presel5c50',
232  'presel6j40',
233  'presel6j45',
234  'presel7j30',
235  # Multiple threshold
236  'preselj60XXj40',
237  'preselj140XXj45',
238  'preselj140XX2j45',
239  'preselj100XX2j45',
240  'preselj120XX2j45',
241  'preselj80XX2j45',
242  'presel2j180XXj80',
243  # Nonstandard eta regions
244  'presel5c55',
245  'presel6c20',
246  'presel6c25',
247  'presel6c45',
248  'preselj45XX2f40',
249  'preselc60XXc45XXc25XXc20', # L1J45p0ETA21_3J15p0ETA25
250  'preselc60XXj45XXf40',
251  'preselj60XXj45XXf40',
252  'presela60XXa40XX2a25',
253  'preseljHT400',
254  'preselcHT400',
255  'preseljHT450',
256  'preselcHT450',
257  'preseljHT500',
258  'preselcHT500',
259  'preseljHT600',
260  'preselcHT600',
261  'preselcHT650',
262  'preselcHT850',
263  #b-jet preselections
264  'presel1c100XX2c20bgtwo85',
265  'presel1c120XX2c20bgtwo90',
266  'presel1c120CXX1c20XX1c20bgtwo85',
267  'presel1c160XX1c20bgtwo90',
268  'presel1c160XX1c20bgtwo85',
269  'presel2c20XX2c20b85',
270  'presel2c20XX2c20b82',
271  'presel2c20XX2c20b80',
272  'presel2c20XX2c20bgtwo85',
273  'presel2c20XX2c20bg85',
274  'presel2c20XX2c20bg82',
275  'presel2c20XX2c20bg80',
276  'presel2c20XX2c20b90',
277  'presel3c20XX1c20b85',
278  'presel3c20XX1c20bg85',
279  # (b+)tau preselections
280  'presel4c20',
281  'presel3c20XX1c20bgtwo85',
282  'presel2c20XX1c20bgtwo85XX1c20gntau90',
283  'presel2c20XX1c20bgtwo85XX1c20gntau85',
284  'presel2c20XX1c20bgtwo82XX1c20gntau85',
285  'presel2c20XX1c20bgtwo82XX1c20gntau80',
286  'presel2c20XX1c20bgtwo80XX1c20gntau80',
287  'presel2c20XX1c20bgtwo85XX1c20uht1tau90',
288  'presel2c20XX1c20bgtwo85XX1c20uht1tau85',
289  'presel2c20XX1c20bgtwo82XX1c20uht1tau82',
290  'presel2c20XX1c20bgtwo80XX1c20uht1tau80',
291  'presel5c25XXc25bgtwo85',
292  'presel3j45bgtwo95',
293  'presel4j25bgtwo95',
294  'presel2j25XX2j25bgtwo85',
295  'presel3j25XX2j25bgtwo85',
296  'preselj50bgtwo85XX3j50',
297  'preselj80XX2j45bgtwo90',
298  'preselj140bgtwo85XXj45bgtwo85',
299  'presel2a20bgtwo90XX2a20',
300  'presela20bgtwo85XX3a20',
301  'presel3c20XX1c20gntau90',
302  'presel3c20XX1c20gntau85',
303  'preselj20b95',
304  'preselj2b77',
305  'preselj20b77',
306  'presel3j45b95',
307  'presel4j25b95',
308  'presel2j25XX2j25b85',
309  'presel3j25XX2j25b85',
310  'preselj50b85XX3j50',
311  'preselj80XX2j45b90',
312  'preselj140b85XXj45b85',
313  'presel5c25XXc25b85',
314  'presel2a20b90XX2a20',
315  'presela20b85XX3a20',
316  #beamspot preselction option
317  'presel2c20b85',
318  #DIPZ preselection
319  'preselZ128XX4c20',
320  'preselZ120XX4c20',
321  'preselZ116XX4c20',
322  'preselZ167MAXMULT5cXX4c20',
323  'preselZ138MAXMULT5cXX4c20',
324  'preselZ126MAXMULT5cXX4c20',
325  'preselZ120MAXMULT20cXX4c85',
326  'preselZ87XX3c20',
327  'preselZ84XX3c20',
328  'preselZ82XX3c20',
329  'preselZ120XX2c20XX2c20b85',
330  'preselZ138MAXMULT5cXX2c20XX2c20b85',
331  'preselZ84XX1c20XX2c20b85',
332  'preselZ120XX4c85',
333  'preselZ116XX4c20',
334  'preselZ138XX4c20',
335  'preselZ120MAXMULT20cXX4c20',
336  'preselZ84MAXMULT20cXX3c20',
337  'preselZ116MAXMULT5cXX4c20',
338  'preselZ116MAXMULT20cXX4c20',
339  'preselZ84XX1c20XX2c20b85',
340  'preselZ128XX2c20XX2c20b85',
341  'preselZ128MAXMULT20cXX4c85',
342  'preselZ128XX4c20XX1j20',
343  'preselZ128XX3c20XX1c20bg85',
344  'preselZ116XX3c20XX1c20bg85',
345  'preselZ128XX4c85',
346  'preselZ219XX6c20',
347  'preselZ197XX6c20',
348  'preselZ182XX6c20',
349  'preselZ142XX5c20',
350  'preselZ134XX5c20',
351  'preselZ124XX5c20',
352  'preselVETOMULT11a10',
353  'preselVETOMULT11a15'
354  ],
355  # Hypo information
356  # If hypoScenario is 'simple', then hypo configuration is handled based on the
357  # other dict contents. If it is not 'simple', then the configuration is 100%
358  # from the hypoScenario specification, and all other hypo entries are ignored.
359  # Complete scenario names for aliases can be found in Trigger/TrigHypothesis/TrigHLTJetHypo/python/hypoConfigBuilder.py
360  'hypoScenario' : ['simple', # Independent selections on individual jets, multiplicity+threshold cuts
361  # 'fbdj' (forward-backward + dijet) scenario:
362  # default eta selection for dijet mass cut is 0eta490
363  'FBDJSHARED', # Forward backward jets + dijet, default parameters, fb and dj can share
364  'FBDJNOSHARED10etXX20etXX34massXX50fbet', # f/b jets + dijet, expl. parameters, fb and dj do not share
365  # 'dijet' scenario applies always a mass cut (deta and dphi cuts are optional)
366  # 0eta490 is the default eta selections for j1/j2
367  # j12et sets the same et cuts for j1et and j2et
368  # j12eta sets the same eta cuts for j1eta and j2eta
369  # order:
370  # et cuts (mandatory)
371  # eta cuts (optional, if missing will use default)
372  # djmass sel (mandatory)
373  # djdphi sel (optional)
374  # djdeta sel (optional)
375  #
376  # pt threshold cuts
377  'DJMASS300j35', # alias
378  'DJMASS500j35', # alias
379  'DJMASS700j35', # alias
380  'DJMASS1000j35', # alias
381  'DJMASS900j50', # alias
382  'DJMASS1000j50', # alias
383  'DJMASS1000j50dphi240', # alias
384  'DJMASS1000j50dphi200x400deta', # alias
385  'DJMASS900j50dphi200x400deta', # alias
386  'DJMASS1000j50dphi260x200deta', # alias
387  'DJMASS900j50dphi260x200deta' , # alias
388  'DJMASS1000j50dphi260', # alias
389  'DJMASS900j50dphi260', # alias
390  'DJMASS1000j50x200deta', # alias
391  'DJMASS900j50x200deta', # alias
392  'DJMASS1000j30dphi260x200deta', # alias
393  'DJMASS900j30dphi260x200deta', # alias
394  'DIJET70j12etXX1000djmassXXdjdphi200XX400djdeta', # needed for hypoToolTests.py
395  'DIJET80j12etXX0j12eta240XX700djmass', # needed for hypoToolTests.py
396 
397  # 'ht' category applies a cut on HT (HT>value) computed by aggregation over single jets (default filtering: 30et and 0eta320)
398  'HT0',
399  'HT1000',
400  'HT290',
401  'HT300',
402  'HT500',
403  'HT940',
404  'HT50',
405  'HT300XX10ptXX0eta490',
406  'HT300XX10ptXX0eta490XXveto',
407  'HT300XX15ptXX0eta490',
408  'HT300XX15ptXX0eta490XXveto',
409  'HT400XX15ptXX0eta490',
410  'HT400XX15ptXX0eta490XXveto',
411  'HT500XX0eta240',
412  'HT650XX0eta240',
413  'HT850XX0eta240',
414  'HT940XX0eta240',
415  'HT940XX020jvt',
416  'HT940XX0eta240XX020jvt',
417  'HT1000XX0eta240',
418  'HT1000XX020jvt',
419  'HT1000XX0eta240XX020jvt',
420  'HT50XX10etXX0eta320', # needed for hypoToolTests.py
421  # DIPZ for testing only
422  'Z120XX4c20',
423  'Z120XX4c120',
424  'Z128XX4c20',
425  'Z120XX5c70',
426  'Z120XX6c55',
427  'Z120XX10c40',
428  'Z219XX6c20',
429  'Z197XX6c20',
430  'Z182XX6c20',
431  'Z142XX5c20',
432  'Z134XX5c20',
433  'Z124XX5c20',
434  # 'MULT' hypoScenario applies a cut on the number of jets
435  # in the input container after filtering on pt, eta.
436  'MULT0mult11XX10ptXX0eta490', # Heavy Ions
437  'MULT0mult11XX15ptXX0eta490', # Heavy Ions
438  ],
439  'exotHypo' : ['emergingPTF0p2dR1p2', 'emergingPTF0p1dR1p2', 'emergingPTF0p09dR1p2', 'emergingPTF0p08dR1p2', 'emergingPTF0p075dR1p2', 'emergingPTF0p07dR1p2', 'emergingPTF0p0dR1p2',
440  'emergingPTF0p2dR0p4', 'emergingPTF0p1dR0p4', 'emergingPTF0p09dR0p4', 'emergingPTF0p08dR0p4', 'emergingPTF0p075dR0p4', 'emergingPTF0p07dR0p4', 'emergingPTF0p0dR0p4',
441  'tracklessdR1p2', 'tracklessdR0p4',
442  'calratio','calratiormbib','calratiovar','calratiovarrmbib', # Exotics CalRatio jets (trackless and low-EMF, with option to clean out BIB)
443  'calratiovar103','calratiovar82','calratiovar59', 'calratiovar186', 'calratiovar150', 'calratiovar165' # Exotics CalRatio Jets ( requested by DPJ Team for alternative cut on ratio )
444  ],
445 
446  # Simple hypo configuration. Single property cuts defined as MINvarMAX
447  'etaRange' :
448  # These atypical explicit values are allowed to be in chain names.
449  # Otherwise use ['','a','c','f'] ==> [0eta320, 0eta490, 0eta240, 320eta490]
450  # suffix after threshold e.g. j420 == j420_0eta320, 6j55c == 6j55_0eta240
451  ['0eta290', '0eta200', '0eta180', '0eta160', '0eta140']
452  +['320eta490'], # TODO: Kept temporarily for validation
453  'jvt' : # Jet Vertex Tagger pileup discriminant
454  ['010jvt', '011jvt', '015jvt', '020jvt', '050jvt', '059jvt'],
455  'nnJvt' : # NN Jet Vertex Tagger pileup discriminant
456  ['nnJvtv1'], # No range cuts, boolean pass/fail
457  'momCuts' : # Generic moment cut on single jets
458  ['050momemfrac100','momemfrac006','momemfrac024','momemfrac012', 'momhecfrac010', '050momemfrac100XXmomhecfrac010', 'momemfrac072', 'momemfrac048' ],
459  'timing' : # delayed jets, with absolute delay requirement [ns]
460  ['2timing','2timing15'],
461  'timeSig' : # delayed jets, based on pT-dependent significance of delay [sigma]
462  ['1timeSig', '1p5timeSig', '2timeSig', '3timeSig','2timeSig15','3timeSig15'],
463  'prefilters' : # Pre-hypo jet selectors (including cleaning)
464  ['CLEANlb', 'CLEANllp', 'MASK300ceta210XX300nphi10',
465  # ptrangeXrY (X, Y matches regex \d+) triggers a prehypo selection of
466  # jets by ordering by pt, and selecting those with indices in [X,Y]
467  'PTRANGE0r1',
468  'PTRANGE2r3',
469  'MAXMULT20c',
470  'MAXMULT6c',],
471  'bsel': [ '95bdips','90bdips','85bdips','80bdips','77bdips'
472  , '95bgnone','90bgnone','85bgnone','80bgnone','77bgnone'
473  , '60bgntwoxt', '65bgntwoxt', '70bgntwoxt', '75bgntwoxt'
474  , '80bgntwoxt', '85bgntwoxt', '90bgntwoxt', '95bgntwoxt'
475  , '79bgntwox', '86bgntwox', '91bgntwox', '96bgntwox'
476  , '95bgntwo','90bgntwo','85bgntwo','80bgntwo','82bgntwo','77bgntwo','75bgntwo','60bgntwo'
477  ],
478  'tausel':
479  [ '75gntau' , '80gntau', '85gntau' , '90gntau'
480  , '75uht1tau' , '80uht1tau', '85uht1tau' , '90uht1tau'
481  ],
482  'smc' : # "Single mass condition" -- rename?
483  ['30smcINF', '35smcINF', '40smcINF', '50smcINF', '60smcINF', 'nosmc'],
484  # Setup for alternative data stream readout
485  # B-tagging information
486  'bTag' : ['boffperf' ,
487  # GN1 series
488  'bgn160', 'bgn165', 'bgn170', 'bgn172',
489  'bgn175', 'bgn177', 'bgn180', 'bgn182',
490  'bgn185',
491  'bgn182bb96', 'bgn177bb96', 'bgn175bb90',
492  # GN2 series
493  'bgn260', 'bgn265', 'bgn270', 'bgn272',
494  'bgn275', 'bgn277', 'bgn280', 'bgn282',
495  'bgn285', ],
496  'ditauTag' : ['ditauOmni0Trk3', 'ditauOmni0Trk4', 'ditauOmni0Trk5', 'ditauOmni0Trk9',
497  'ditauOmni1Trk3', 'ditauOmni1Trk4', 'ditauOmni1Trk5', 'ditauOmni1Trk9',
498  'ditauOmni2Trk3', 'ditauOmni2Trk4', 'ditauOmni2Trk5', 'ditauOmni2Trk9',
499  'ditauOmni3Trk3', 'ditauOmni3Trk4', 'ditauOmni3Trk5', 'ditauOmni3Trk9',
500  'ditauOmni4Trk3', 'ditauOmni4Trk4', 'ditauOmni4Trk5', 'ditauOmni4Trk9',
501  'ditauOmni5Trk3', 'ditauOmni5Trk4', 'ditauOmni5Trk5', 'ditauOmni5Trk9',
502  'ditauOmni6Trk3', 'ditauOmni6Trk4', 'ditauOmni6Trk5', 'ditauOmni6Trk9',
503  'ditauOmni7Trk3', 'ditauOmni7Trk4', 'ditauOmni7Trk5', 'ditauOmni7Trk9',
504  'ditauOmni8Trk3', 'ditauOmni8Trk4', 'ditauOmni8Trk5', 'ditauOmni8Trk9',
505  'ditauOmni9Trk3', 'ditauOmni9Trk4', 'ditauOmni9Trk5', 'ditauOmni9Trk9',
506  'ditauOmni01Trk3', 'ditauOmni01Trk4', 'ditauOmni01Trk5', 'ditauOmni01Trk9',
507  'ditauOmni02Trk3', 'ditauOmni02Trk4', 'ditauOmni02Trk5', 'ditauOmni02Trk9',
508  'ditauOmni03Trk3', 'ditauOmni03Trk4', 'ditauOmni03Trk5', 'ditauOmni03Trk9',
509  'ditauOmni04Trk3', 'ditauOmni04Trk4', 'ditauOmni04Trk5', 'ditauOmni04Trk9',
510  'ditauOmni05Trk3', 'ditauOmni05Trk4', 'ditauOmni05Trk5', 'ditauOmni05Trk9',
511  'ditauOmni06Trk3', 'ditauOmni06Trk4', 'ditauOmni06Trk5', 'ditauOmni06Trk9',
512  'ditauOmni07Trk3', 'ditauOmni07Trk4', 'ditauOmni07Trk5', 'ditauOmni07Trk9',
513  'ditauOmni08Trk3', 'ditauOmni08Trk4', 'ditauOmni08Trk5', 'ditauOmni08Trk9',
514  'ditauOmni09Trk3', 'ditauOmni09Trk4', 'ditauOmni09Trk5', 'ditauOmni09Trk9',
515  ],
516  'bTracking' : [],
517  'bConfig' : ['split',],
518  'bMatching' : ['antimatchdr05mu'],
519  'tboundary' : ['SHARED'], # simple scenario tree boundary marker
520 
521  # beamspot
522  'beamspotChain' : ['beamspotVtx'],
523  'pileuprm' : # scedule pileup removal algo for single jet, the m_min LogR value is minimul criteria to for jet LogR to start removal algorithm, the m_max LogR is the desired logR cut to pass for jetschedule pileup removal algo for single jet, the m_min LogR value is minimal criteria for jet LogR to start the removal algorithm, the n_max LogR is the desired logR cut to pass for jet
524  ['n041pileuprmn015' ],# left value is min LogR,right is max LogR, n stands for negative (for example n041 means -0.41 )
525 }
526 
527 # ---- Jet Dictionary of default Values ----
528 JetChainParts_Default = {
529  'signature' : ['Jet'],
530  'alignmentGroup': ['Jet'],
531  'L1threshold' : '',
532  'threshold' : '',
533  'multiplicity' : '',
534  'trigType' : '',
535  'topo' : [],
536  'extra' : '',
537  'addInfo' : [],
538  'sigFolder' : ['Jet'],
539  'subSigs' : ['Jet'],
540  'chainPartIndex': 0,
541  #
542  'recoAlg' :'a4',
543  'constitType' :'tc',
544  'clusterCalib' :'em',
545  'constitMod' :'',
546  'jetCalib' :'default',
547  'scan' :'FS',
548  'ionopt' : 'noion',
549  'trkopt' : 'notrk',
550  'trkpresel' : 'nopresel',
551  #
552  'etaRange' : '0eta320',
553  'jvt' : '',
554  'nnJvt' : '',
555  'momCuts' : '',
556  'timing' : '',
557  'timeSig' : '',
558  'prefilters' : [],
559  'bsel' : '',
560  'tausel' : '',
561  'hypoScenario' : 'simple',
562  'exotHypo' : [],
563  'smc' : 'nosmc',
564  #
565  'bTag' : '',
566  'ditauTag' : '',
567  'bTracking' : '',
568  'bConfig' : [],
569  'bMatching' : [],
570  #
571  'tboundary' : '',
572 
573  'beamspotChain' : '',
574  'pileuprm' : '',
575  }
576 
577 # ---- bJet Dictionary of default Values that are different to the ones for normal jet chains ----
578 bJetChainParts_Default = {
579  'etaRange' : '0eta290',
580  'sigFolder' : ['Bjet'],
581  'subSigs' : ['Bjet'],
582 }
583 
584 ditauJetChainParts_Default = {
585  'sigFolder' : ['Tau'],
586  'subSigs' : ['Ditau'],
587 }
588 # ---- Beamspot Dictionary for chains confiugred through jets
589 BeamspotJetChainParts_Default = {
590  'signature' : 'Beamspot',
591  'alignmentGroup' : ['Beamspot'],
592  'sigFolder' : ['CalibCosmicMon'],
593  'subSigs' : ['Beamspot'],
594  'beamspotChain' : '',
595  'chainPartIndex': 0
596  }
597 
598 #==========================================================
599 # Muon
600 #==========================================================
601 AllowedTopos_mu = [
602  'b7invmAB9vtx20', 'b11invmAB60vtx20', 'b11invmAB24vtx20', 'b24invmAB60vtx20',
603  '50invmAB130' # Zmumu
604  ]
605 
606 # ---- Muon Dictionary of all allowed Values ----
607 MuonChainParts = {
608  'signature' : ['Muon'],
609  'alignmentGroup' : ['Muon','MuonnoL1'],
610  'L1threshold' : '',
611  'chainPartName' : [],
612  'multiplicity' : '',
613  'trigType' : ['mu'],
614  'etaRange' : ['0eta105'],
615  'threshold' : '',
616  'tnpInfo' : ['probe'],
617  'extra' : ['noL1', 'lateMu', "muoncalib" ,'noL2Comb','vtx','mucombTag'],
618  'IDinfo' : [],
619  'isoInfo' : ['ivarloose', 'ivarmedium', 'ivarperf','iloosems'],
620  'l2AlgInfo' : ['l2io','l2mt'],
621  'lrtInfo' : ['d0loose','d0medium','d0tight'],
622  'invMassInfo' : ['invmJPsiOS','invmDimu'],
623  'msonlyInfo' : ['msonly'],
624  'addInfo' : ['idperf','LRT','3layersEC','cosmic',"muonqual","nscan","nscan10","nscan20","nscan30","nscan40",'idtp','idReuse','fT'],
625  'topo' : AllowedTopos_mu,
626  'flavour' : [],
627  'sigFolder' : ['Muon'],
628  'subSigs' : ['Muon'],
629  'chainPartIndex': list(range(0,10))
630 }
631 # ---- MuonDictionary of default Values ----
632 MuonChainParts_Default = {
633  'signature' : ['Muon'],
634  'alignmentGroup' : ['Muon'],
635  'L1threshold' : '',
636  'multiplicity' : '',
637  'trigType' : '',
638  'etaRange' : '0eta250',
639  'threshold' : '',
640  'tnpInfo' : '',
641  'extra' : '',
642  'IDinfo' : '',
643  'isoInfo' : '',
644  'l2AlgInfo' : [],
645  'lrtInfo' : [],
646  'addInfo' : [],
647  'invMassInfo' : '',
648  'msonlyInfo' : [],
649  'topo' : [],
650  'flavour' : '',
651  'sigFolder' : ['Muon'],
652  'subSigs' : ['Muon'],
653  'chainPartIndex': 0
654 }
655 
656 #==========================================================
657 # Bphysics
658 #==========================================================
659 AllowedTopos_Bphysics = [
660  'bJpsimumu','bJpsi','bJpsimutrk','bUpsimumu','bUpsi','bBmumu','bDimu','bDimu2700','bDimu6000','bPhi','bTau','b3mu',
661  'bBmumux', 'bBmux', 'b0dRAB12vtx20', 'b0dRAB127invmAB22vtx20', 'b0dRAB207invmAB22vtx20', 'b7invmAB22vtx20',
662 
663 
665  'Bidperf','BsmumuPhi','BpmumuKp','BcmumuPi','BdmumuKst','LbPqKm','BcmumuDsloose','BcmumuDploose','BcmumuD0Xloose','BcmumuDstarloose',
666  'BpmuD0X','BdmuDpX','BdmuDstarX','BsmuDsX','LbmuLcX',
667  # topoExtras
668  'Lxy0','sigmaLxy3','noos','nocut','lowpt'
669 
670 
671 ]
672 AllowedTopos_Bphysics_topoVariant = [
673  'Bidperf','BsmumuPhi','BpmumuKp','BcmumuPi','BdmumuKst','LbPqKm','BcmumuDsloose','BcmumuDploose','BcmumuD0Xloose','BcmumuDstarloose',
674  'BpmuD0X','BdmuDpX','BdmuDstarX','BsmuDsX','LbmuLcX'
675 ]
676 AllowedTopos_Bphysics_topoExtra = ['Lxy0','noos','nocut','lowpt']
677 AllAllowedTopos_Bphysics = AllowedTopos_Bphysics_topoVariant+AllowedTopos_Bphysics_topoExtra+AllowedTopos_Bphysics
678 
679 # ---- Bphysics Dictionary of all allowed Values ----
680 BphysicsChainParts = deepcopy(MuonChainParts)
681 BphysicsChainParts['signature'] = ['Bphysics']
682 BphysicsChainParts['sigFolder'] = ['Bphysics']
683 BphysicsChainParts['subSigs'] = ['Bphysics']
684 BphysicsChainParts['topo'] = AllowedTopos_Bphysics
685 
686 # ---- Bphysics Dictionary of default Values ----
687 BphysicsChainParts_Default = deepcopy(MuonChainParts_Default)
688 BphysicsChainParts_Default['signature'] = ['Bphysics']
689 BphysicsChainParts_Default['sigFolder'] = ['Bphysics']
690 BphysicsChainParts_Default['subSigs'] = ['Bphysics']
691 BphysicsChainParts_Default['topo'] = []
692 
693 
694 #==========================================================
695 # Taus
696 #==========================================================
697 AllowedTopos_tau = []
698 
699 # ---- Tau Dictionary of all allowed Values ----
700 TauChainParts = {
701  'signature' : ['Tau'],
702  'alignmentGroup': ['Tau', 'JetMET'],
703  'extra' : [],
704  'L1threshold' : '',
705  'chainPartName' : '',
706  'threshold' : '',
707  'reconstruction': [
708  # BRT calibration (no-tracking)
709  'ptonly',
710 
711  # Standard reconstruction triggers
712  # 2-step FTF (Core + Iso) + PT
713  # Split in different sequences to avoid running unnecesary TauIDs
714  'tracktwoMVA', # GNTau, DeepSet and MesonCuts triggers
715  'tracktwoLLP', # RNNLLP triggers
716 
717  # LRT reconstruction triggers
718  # 1-step FTF (LRT) + PT
719  'trackLRT', # RNNLLP triggers
720  ],
721  'jet' : ['lc', 'pf'], # Only use LCTopo jets for now
722  'preselection' : [],
723  'selection' : [
724  'idperf', # No selection
725  'perf', # NTrk selection
726 
727  # GNTau ID WPs:
728  'verylooseGNTau', 'looseGNTau', 'mediumGNTau', 'tightGNTau',
729 
730  # RNN/DeepSet ID WPs (for tracktwoMVA/LLP/LRT reco with DeepSet/RNNLLP TauIDs):
731  'looseRNN', 'mediumRNN', 'tightRNN',
732 
733  # Meson b-phys triggers (used with tracktwoMVA reco without cutting on the RNN/DeepSet score):
734  'kaonpi1', 'kaonpi2', 'dipion1', 'dipion2', 'dipion3', 'dipion4', 'dikaonmass', 'singlepion',
735  ],
736  'multiplicity' : '',
737  'trigType' : ['tau'],
738  'tnpInfo' : ['probe'],
739  'topo' : AllowedTopos_tau,
740  'sigFolder' : ['Tau'],
741  'subSigs' : ['Tau'],
742  'chainPartIndex': list(range(0,10))
743 }
744 TauChainParts_Default = {
745  'signature' : ['Tau'],
746  'alignmentGroup': ['Tau'],
747  'extra' : '',
748  'L1threshold' : '',
749  'chainPartName' : '',
750  'threshold' : '',
751  'reconstruction': 'tracktwoMVA',
752  'jet' : 'lc',
753  'preselection' : '',
754  'selection' : '',
755  'multiplicity' : '',
756  'trigType' : '',
757  'tnpInfo' : '',
758  'topo' : [],
759  'sigFolder' : ['Tau'],
760  'subSigs' : ['Tau'],
761  'chainPartIndex': 0
762 }
763 
764 
765 #==========================================================
766 # MET
767 #==========================================================
768 AllowedTopos_xe = []
769 # ---- Met Dictionary of all allowed Values ----
770 METChainParts = {
771  'signature' : ['MET'],
772  'alignmentGroup' : ['MET','JetMET'],
773  'L1threshold' : '',
774  'chainPartName' : '',
775  'threshold' : '',
776  'multiplicity' : '',
777  'topo' : AllowedTopos_xe,
778  'trigType' : ['xe'],
779  'extra' : ['noL1'],
780  'calib' : ['lcw','em'],
781  'jetCalib' : JetChainParts['jetCalib'],
782  'L2recoAlg' : [],
783  'EFrecoAlg' : ['cell', 'tc', 'tcpufit', 'mht', 'trkmht', 'pfsum', 'cvfpufit', 'pfopufit', 'mhtpufit', 'nn'],
784  'constitType' : JetChainParts['constitType'],
785  'nSigma' : ["default", "sig30", "sig35", "sig40", "sig45", "sig50", "sig55", "sig60"],
786  'L2muonCorr' : [],
787  'EFmuonCorr' : [],
788  'addInfo' : ['FStracks'],
789  'sigFolder' : ['MET'],
790  'subSigs' : ['MET'],
791  'constitmod' : ['cssk', 'vssk'],
792  'chainPartIndex': list(range(0,10))
793 }
794 # ---- MetDictionary of default Values ----
795 METChainParts_Default = {
796  'signature' : ['MET'],
797  'alignmentGroup' : ['MET'],
798  'L1threshold' : '',
799  'trigType' : '',
800  'threshold' : '',
801  'extra' : '',
802  'calib' : 'lcw',
803  'jetCalib' : JetChainParts_Default['jetCalib'],
804  'nSigma' : "default",
805  'L2recoAlg' : '',
806  'EFrecoAlg' : '',
807  'L2muonCorr' : '',
808  'EFmuonCorr' : '',
809  'addInfo' : '',
810  'constitType' : 'tc',
811  'constitmod' : '',
812  'sigFolder' : ['MET'],
813  'subSigs' : ['MET'],
814  'chainPartIndex': 0
815 }
816 
817 #==========================================================
818 # XS
819 #==========================================================
820 # ---- xs Dictionary of all allowed Values ----
821 XSChainParts = METChainParts
822 XSChainParts['signature'] = ['XS']
823 XSChainParts['trigType'] = ['xs']
824 
825 # ---- xs Dictionary of default Values ----
826 XSChainParts_Default = METChainParts_Default
827 XSChainParts_Default['signature'] = ['XS']
828 XSChainParts_Default['trigType'] = ''
829 
830 #==========================================================
831 # TE
832 #==========================================================
833 # ---- te Dictionary of all allowed Values ----
834 TEChainParts = METChainParts
835 TEChainParts['signature'] = ['TE']
836 TEChainParts['trigType'] = ['te']
837 
838 # ---- te Dictionary of default Values ----
839 TEChainParts_Default = METChainParts_Default
840 TEChainParts_Default['signature'] = ['TE']
841 TEChainParts_Default['trigType'] = ''
842 
843 #==========================================================
844 # Electron Chains
845 #==========================================================
846 AllowedTopos_e = ['Jpsiee','Zeg','Zee','Heg','bBeeM6000']
847 # ---- Electron Dictionary of all allowed Values ----
848 ElectronChainParts = {
849  'signature' : ['Electron'],
850  'alignmentGroup' : ['Electron','Egamma'],
851  'chainPartName' : '',
852  'L1threshold' : '',
853  'tnpInfo' : ['probe'],
854  'extra' : ['ion'],
855  'multiplicity' : '',
856  'trigType' : ['e'],
857  'threshold' : '',
858  'etaRange' : [],
859  'IDinfo' : ['dnnloose','dnnmedium','dnntight','lhvloose','lhloose','lhmedium','lhtight','vloose','loose','medium','tight', 'mergedtight'],
860  'isoInfo' : ['ivarloose','ivarmedium','ivartight'],
861  'idperfInfo' : ['idperf'],
862  'gsfInfo' : ['nogsf'],
863  'lrtInfo' : ['lrtloose','lrtmedium','lrttight','lrtxtight','lrtvxtight'],
864  'caloInfo' : [],
865  'lhInfo' : ['nod0', 'nopix'],
866  'L2IDAlg' : ['noringer'],
867  'addInfo' : [ 'etcut', 'etcut1step',"fwd",'nopid'],
868  'sigFolder' : ['Egamma'],
869  'subSigs' : ['Electron'],
870  'topo' : AllowedTopos_e,
871  'chainPartIndex': list(range(0,10))
872 }
873 
874 # ---- Egamma Dictionary of default Values ----
875 ElectronChainParts_Default = {
876  'signature' : ['Electron'],
877  'alignmentGroup' : ['Electron'],
878  'multiplicity' : '',
879  'L1threshold' : '',
880  'trigType' : '',
881  'threshold' : '',
882  'etaRange' : '0eta250',
883  'tnpInfo' : '',
884  'extra' : '',
885  'IDinfoType' : '',
886  'IDinfo' : '',
887  'isoInfo' : '',
888  'reccalibInfo' : '',
889  'idperfInfo' : '',
890  'gsfInfo' : '',
891  'lrtInfo' : '',
892  'caloInfo' : '',
893  'lhInfo' : '',
894  'L2IDAlg' : '',
895  'hypoInfo' : '',
896  'recoAlg' : '',
897  'FSinfo' : '',
898  'addInfo' : [],
899  'sigFolder' : ['Egamma'],
900  'subSigs' : ['Electron'],
901  'topo' : [],
902  'chainPartIndex': 0
903 }
904 
905 #==========================================================
906 # Photon chains
907 #==========================================================
908 # ---- Photon Dictionary of all allowed Values ----
909 AllowedTopos_g = ['dPhi25', 'm80']
910 PhotonChainParts = {
911  'L1threshold' : '',
912  'signature' : ['Photon'],
913  'alignmentGroup' : ['Photon','Egamma'],
914  'chainPartName' : '',
915  'multiplicity' : '',
916  'trigType' : ['g'],
917  'threshold' : '',
918  'tnpInfo' : ['probe'],
919  'extra' : ['hiptrt', 'ion'],
920  'IDinfo' : ['etcut','loose','medium','tight'],
921  'isoInfo' : ['noiso', 'icaloloose','icalomedium','icalotight'],
922  'reccalibInfo' : [],
923  'trkInfo' : [],
924  'caloInfo' : [],
925  'L2IDAlg' : ['noringer','ringer'],
926  'hypoInfo' : '',
927  'recoAlg' : [],
928  'FSinfo' : [],
929  'addInfo' : ['etcut','nopid'],
930  'sigFolder' : ['Egamma'],
931  'subSigs' : ['Photon'],
932  'topo' : AllowedTopos_g,
933  'chainPartIndex': list(range(0,10)),
934  }
935 
936 # ---- Photon Dictionary of default Values ----
937 PhotonChainParts_Default = {
938  'signature' : ['Photon'],
939  'alignmentGroup' : ['Photon'],
940  'L1threshold' : '',
941  'multiplicity' : '',
942  'trigType' : '',
943  'threshold' : '',
944  'tnpInfo' : '',
945  'extra' : '',
946  'IDinfo' : '',
947  'isoInfo' : '',
948  'reccalibInfo' : '',
949  'trkInfo' : '',
950  'caloInfo' : '',
951  'L2IDAlg' : '',
952  'hypoInfo' : '',
953  'recoAlg' : '',
954  'FSinfo' : '',
955  'addInfo' : [],
956  'sigFolder' : ['Egamma'],
957  'subSigs' : ['Photon'],
958  'topo' : [],
959  'chainPartIndex': 0
960  }
961 
962 #==========================================================
963 # MinBias chains
964 #==========================================================
965 # ---- MinBias Dictionary of all allowed Values ----
966 MinBiasChainParts = {
967  'signature' : ['MinBias'],
968  'alignmentGroup' : ['MinBias'],
969  'L1threshold' : '',
970  'chainPartName' : '',
971  'multiplicity' : '',
972  'trigType' : ['mb'],
973  'threshold' : '',
974  'extra' : ['noisesup', 'vetombts2in', 'vetombts1side2in', 'vetospmbts2in', "vetosp" ,'ion', 'ncb', 'blayer', 'dijet', 'all', 'q2'], #ncb = non collision background, blayer = only sum innermost pix layer
975  'IDinfo' : [],
976  'ZDCinfo' : ['lg', 'hg'],
977  'trkInfo' : ['hlttr', 'ftk', 'costr'],
978  'hypoSPInfo' : ['sp2', 'sp3', 'sp5', 'sp10', 'sp15', 'sp50', 'sp100', 'sp300', 'sp400', 'sp500', 'sp600', 'sp700', 'sp800', 'sp900',
979  'sp1000', 'sp1100', 'sp1200', 'sp1300', 'sp1400', 'sp1500', 'sp1600', 'sp1700', 'sp1800',
980  'sp2000', 'sp2100', 'sp2200', 'sp2300', 'sp2400', 'sp2500', 'sp2700', 'sp2800', 'sp2900', 'sp3000',
981  'sp3100', 'sp3500', 'sp4100', 'sp4500', 'sp4800', 'sp5000', 'sp5200',
982  'vpix15', 'vpix30', 'vpix35', 'vpix40', 'vpix45', 'vpix50', 'vpix55', 'vpix60',
983  'pix20','pix50','pix100', 'pix200', 'pix500', 'pix1000',
984  'nototpix20', 'nototpix30','nototpix50', 'nototpix70', 'nototpix100', 'nototpix200', 'nototpix500'],
985  'pileupInfo' : ['pusup0', 'pusup7', 'pusup10', 'pusup15', 'pusup20', 'pusup30', 'pusup40','pusup50','pusup60', 'pusup70', 'pusup80', 'pusup90', 'pusup100', 'pusup110', 'pusup120', 'pusup130', 'pusup150', 'pusup180', 'pusup190',
986  'pusup200', 'pusup220', 'pusup240', 'pusup250', 'pusup260', 'pusup270', 'pusup280', 'pusup290', 'pusup300'],
987  'hypoTrkInfo' : ['trk2', 'trk3','trk5','trk10','trk15', 'trk20', 'trk25', 'trk30', 'trk35', 'trk40', 'trk45', 'trk50', 'trk55', 'trk60', 'trk65', 'trk70', 'trk75', 'trk80', 'trk90',
988  'trk100', 'trk110', 'trk120', 'trk130', 'trk140', 'trk150', 'trk160', 'trk180', 'trk200', 'trk220', 'trk240', 'trk260', 'trk280', 'trk290',
989  '2trk6', '1trk4', '1trk5', '1trk2', '0trk2'], #ranges for exclusive tracks
990  'hypoPtInfo' : [ 'pt0p2', 'pt0p5', 'pt0p8', 'pt1', 'pt2', 'pt4', 'pt6', 'pt8', 'pt10' ],
991  'recoAlg' : ['mbts', 'sptrk', 'sp', 'noalg', 'perf', 'hmt', 'hmtperf', 'idperf', 'zdcperf', 'afprec', 'afptof', 'afpdz5', 'afpdz10', 'excl', 'pixsptrk'],
992  'addInfo' : ['peb', 'pc'],
993  'sigFolder' : ['MinBias'],
994  'subSigs' : ['MinBias'],
995  'chainPartIndex': list(range(0,10))
996  }
997 # ---- MinBiasDictionary of default Values ----
998 MinBiasChainParts_Default = {
999  'signature' : ['MinBias'],
1000  'alignmentGroup' : ['MinBias'],
1001  'L1threshold' : '',
1002  'chainPartName' : '',
1003  'multiplicity' : '',
1004  'trigType' : '',
1005  'threshold' : '',
1006  'extra' : '',
1007  'IDinfo' : '',
1008  'ZDCinfo' : '',
1009  'trkInfo' : '',
1010  'hypoSPInfo' : '',
1011  'pileupInfo' : '',
1012  'hypoTrkInfo' : '',
1013  'hypoPtInfo' : '',
1014  'hypoSumEtInfo': '',
1015  'recoAlg' : [],
1016  'addInfo' : [],
1017  'sigFolder' : ['MinBias'],
1018  'subSigs' : ['MinBias'],
1019  'chainPartIndex': 0
1020  }
1021 
1022 #==========================================================
1023 # HeavyIon chains
1024 #==========================================================
1025 # ---- HeavyIon Dictionary of all allowed Values ----
1026 HeavyIonChainParts = {
1027  'signature' : ['HeavyIon'],
1028  'alignmentGroup' : ['HeavyIon'],
1029  'L1threshold' : '',
1030  'chainPartName' : '',
1031  'multiplicity' : '',
1032  'trigType' : ['hi'],
1033  'threshold' : '',
1034  'extra' : [],
1035  'IDinfo' : [],
1036  'trkInfo' : [],
1037  'eventShape' : [],
1038  'eventShapeVeto' : [],
1039  'hypoL2Info' : [],
1040  'pileupInfo' : [],
1041  'hypoEFInfo' : [],
1042  'hypoEFsumEtInfo': [],
1043  'hypoFgapInfo' : ['FgapAC3', 'FgapAC5', 'FgapAC10', 'FgapA3', 'FgapA5', 'FgapA10', 'FgapC3', 'FgapC5', 'FgapC10'],
1044  'hypoUCCInfo' : ['uccTh1','uccTh2','uccTh3'],
1045  'recoAlg' : [],
1046  'addInfo' : [],
1047  'sigFolder' : ['HeavyIon'],
1048  'subSigs' : ['HeavyIon'],
1049  'chainPartIndex': list(range(0,10))
1050  }
1051 
1052 # ---- HeavyIonDictionary of default Values ----
1053 HeavyIonChainParts_Default = {
1054  'signature' : ['HeavyIon'],
1055  'alignmentGroup' : ['HeavyIon'],
1056  'L1threshold' : '',
1057  'chainPartName' : '',
1058  'multiplicity' : '',
1059  'trigType' : '',
1060  'threshold' : '',
1061  'extra' : '',
1062  'IDinfo' : '',
1063  'trkInfo' : '',
1064  'eventShape' : '',
1065  'eventShapeVeto' : '',
1066  'hypoL2Info' : '',
1067  'pileupInfo' : '',
1068  'hypoEFInfo' : '',
1069  'hypoEFsumEtInfo': '',
1070  'hypoFgapInfo' : [],
1071  'hypoUCCInfo' : [],
1072  'recoAlg' : [],
1073  'addInfo' : [],
1074  'sigFolder' : ['HeavyIon'],
1075  'subSigs' : ['HeavyIon'],
1076  'chainPartIndex': 0
1077  }
1078 
1079 #==========================================================
1080 # ---- CosmicDef chains -----
1081 #==========================================================
1082 AllowedCosmicChainIdentifiers = ['larps','larhec',
1083  'sct', 'id',]
1084 
1085 # ---- Cosmic Chain Dictionary of all allowed Values ----
1086 CosmicChainParts = {
1087  'signature' : ['Cosmic'],
1088  'alignmentGroup' : ['Cosmic'],
1089  'chainPartName' : '',
1090  'L1threshold' : '',
1091  'purpose' : AllowedCosmicChainIdentifiers,
1092  'addInfo' : ['cosmicid','noise', 'beam', 'laser', 'AllTE', 'central', 'ds','CIS'], #'trtd0cut'
1093  'trackingAlg' : ['idscan', 'sitrack', 'trtxk'],
1094  'hits' : ['4hits'],
1095  'threshold' : '',
1096  'multiplicity' : '',
1097  'trigType' : 'cosmic',
1098  'extra' : '',
1099  'sigFolder' : ['CalibCosmicMon'],
1100  'subSigs' : ['Cosmic'],
1101  'chainPartIndex': list(range(0,10))
1102  }
1103 
1104 # ---- Cosmic Chain Default Dictionary of all allowed Values ----
1105 CosmicChainParts_Default = {
1106  'signature' : ['Cosmic'],
1107  'alignmentGroup' : ['Cosmic'],
1108  'chainPartName' : '',
1109  'L1threshold' : '',
1110  'purpose' : [],
1111  'addInfo' : [],
1112  'trackingAlg' : [],
1113  'hits' : [],
1114  'threshold' : '',
1115  'multiplicity' : '',
1116  'trigType' : '',
1117  'extra' : '',
1118  'sigFolder' : ['CalibCosmicMon'],
1119  'subSigs' : ['Cosmic'],
1120  'chainPartIndex': 0
1121  }
1122 
1123 #==========================================================
1124 # ---- StreamingDef chains -----
1125 #==========================================================
1126 AllowedStreamingChainIdentifiers = ['noalg']
1127 
1128 # ---- Streaming Chain Dictionary of all allowed Values ----
1129 StreamingChainParts = {
1130  'signature' : ['Streaming'],
1131  'alignmentGroup' : ['Streaming'],
1132  'chainPartName' : '',
1133  'L1threshold' : '',
1134  'threshold' : '',
1135  'multiplicity' : '',
1136  # No effect on configuration, used in special cases for
1137  # disambiguation or to allow events from the same L1 seed
1138  # to be written to different streams
1139  # New cases should be discussed with Menu Coordinators
1140  'streamingInfo' : ['laser', 'CIS','idmon','mb','l1calo', 'cosmicmuons', 'bkg','vdm', 'zb', 'eb'],
1141  'trigType' : 'streamer',
1142  'extra' : '',
1143  'streamType' : AllowedStreamingChainIdentifiers,
1144  'algo' : ['NoAlg'],
1145  'sigFolder' : ['CalibCosmicMon'],
1146  'subSigs' : ['Streaming'],
1147  'chainPartIndex': list(range(0,10))
1148  }
1149 
1150 # ---- Cosmic Chain Default Dictionary of all allowed Values ----
1151 StreamingChainParts_Default = {
1152  'signature' : ['Streaming'],
1153  'alignmentGroup' : ['Streaming'],
1154  'chainPartName' : '',
1155  'L1threshold' : '',
1156  'threshold' : '',
1157  'multiplicity' : '',
1158  'streamingInfo' : '',
1159  'trigType' : '',
1160  'extra' : '',
1161  'streamType' : '',
1162  'algo' : [],
1163  'sigFolder' : ['CalibCosmicMon'],
1164  'subSigs' : ['Streaming'],
1165  'chainPartIndex': 0
1166  }
1167 
1168 #==========================================================
1169 # ---- CalibDef chains -----
1170 #==========================================================
1171 AllowedCalibChainIdentifiers = ['csccalib', 'larcalib',
1172  'idcalib', 'l1calocalib',
1173  'tilelarcalib',
1174  'larnoiseburst','ibllumi',
1175  'l1satmon', 'zdcpeb',
1176  'calibAFP', 'larpsallem', 'larpsall',
1177  'acceptedevts', 'metcalo', 'mettrk',
1178  ]
1179 
1180 # ---- Calib Chain Dictionary of all allowed Values ----
1181 
1182 
1183 CalibChainParts = {
1184  'signature' : ['Calib'],
1185  'alignmentGroup' : ['Calib'],
1186  'chainPartName' : '',
1187  'L1threshold' : '',
1188  'purpose' : AllowedCalibChainIdentifiers,
1189  'location' : ['central', 'fwd'],
1190  'addInfo' : ['loose','noise','beam'],
1191  'hypo' : ['trk4','trk9', 'trk16', 'trk29', 'conej40', 'conej165', 'conej75_320eta490', 'conej140_320eta490','satu20em'],
1192  'streamingInfo' : ['vdm',],
1193  'threshold' : '',
1194  'multiplicity' : '',
1195  'trigType' : ['trk'],
1196  'extra' : ['bs',''],
1197  'sigFolder' : ['CalibCosmicMon'],
1198  'subSigs' : ['Calib'],
1199  'chainPartIndex': list(range(0,10))
1200  }
1201 
1202 
1203 # ---- Calib Chain Default Dictionary of all allowed Values ----
1204 CalibChainParts_Default = {
1205  'signature' : ['Calib'],
1206  'alignmentGroup' : ['Calib'],
1207  'chainPartName' : '',
1208  'L1threshold' : '',
1209  'purpose' : [],
1210  'addInfo' : [],
1211  'hypo' : '',
1212  # 'hits' : [],
1213  'streamingInfo' : [],
1214  'threshold' : '',
1215  'multiplicity' : '',
1216  'location' : '',
1217  'trigType' : '',
1218  'extra' : '',
1219  'sigFolder' : ['CalibCosmicMon'],
1220  'subSigs' : ['Calib'],
1221  'chainPartIndex': 0
1222  }
1223 
1224 #==========================================================
1225 # ---- MonitorDef chains -----
1226 #==========================================================
1227 AllowedMonitorChainIdentifiers = ['robrequest', 'timeburner',
1228  'idmon','larsupercellmon',
1229  'l1calooverflow', 'l1topoPh1debug',
1230  'mistimemonl1bccorr','mistimemonl1bccorrnomu',
1231  'mistimemoncaltimenomu','mistimemoncaltime',
1232  'mistimemonj400', 'caloclustermon']
1233 
1234 # ---- Monitor Chain Dictionary of all allowed Values ----
1235 MonitorChainParts = {
1236  'signature' : ['Monitor'],
1237  'alignmentGroup' : ['Monitor'],
1238  'chainPartName' : '',
1239  'L1threshold' : '',
1240  'monType' : AllowedMonitorChainIdentifiers,
1241  'hypo' : ['trkFS',],
1242  'threshold' : '',
1243  'multiplicity' : '',
1244  'isLegacyL1' : ['legacy'],
1245  'trigType' : 'mon',
1246  'extra' : '',
1247  'sigFolder' : ['CalibCosmicMon'],
1248  'subSigs' : ['Monitor'],
1249  'chainPartIndex': list(range(0,10))
1250  }
1251 
1252 # ---- Monitor Chain Default Dictionary of all allowed Values ----
1253 MonitorChainParts_Default = {
1254  'signature' : ['Monitor'],
1255  'alignmentGroup' : ['Monitor'],
1256  'chainPartName' : '',
1257  'L1threshold' : '',
1258  'monType' : [],
1259  'hypo' : '',
1260  'threshold' : '',
1261  'multiplicity' : '',
1262  'isLegacyL1' : [],
1263  'trigType' : '',
1264  'extra' : '',
1265  'sigFolder' : ['CalibCosmicMon'],
1266  'subSigs' : ['Monitor'],
1267  'chainPartIndex': 0
1268  }
1269 
1270 #==========================================================
1271 # ---- EB chains -----
1272 #==========================================================
1273 AllowedEBChainIdentifiers = ['eb']
1274 
1275 # ---- Enhanced Bias Chain Dictionary of all allowed Values ----
1276 EnhancedBiasChainParts = {
1277  'signature' : ['EnhancedBias'],
1278  'alignmentGroup' : ['EnhancedBias'],
1279  'chainPartName' : '',
1280  'L1threshold' : '',
1281  'algType' : ['medium','firstempty','empty','unpairediso','unpairednoniso', 'low'],
1282  'threshold' : '',
1283  'multiplicity' : '',
1284  'trigType' : '',
1285  'extra' : '',
1286  'sigFolder' : ['CalibCosmicMon'],
1287  'subSigs' : ['EnhancedBias'],
1288  'chainPartIndex': list(range(0,10))
1289  }
1290 
1291 # ---- EnhancedBias Chain Default Dictionary of all allowed Values ----
1292 EnhancedBiasChainParts_Default = {
1293  'signature' : ['EnhancedBias'],
1294  'alignmentGroup' : ['EnhancedBias'],
1295  'chainPartName' : '',
1296  'L1threshold' : '',
1297  'algType' : 'physics',
1298  'threshold' : '',
1299  'multiplicity' : '',
1300  'trigType' : '',
1301  'extra' : '',
1302  'sigFolder' : ['CalibCosmicMon'],
1303  'subSigs' : ['EnhancedBias'],
1304  'chainPartIndex': 0
1305  }
1306 
1307 #==========================================================
1308 # ---- BeamspotDef chains -----
1309 #==========================================================
1310 AllowedBeamspotChainIdentifiers = ['beamspot',]
1311 BeamspotChainParts = {
1312  'signature' : ['Beamspot'],
1313  'alignmentGroup' : ['Beamspot'],
1314  'chainPartName' : '',
1315  'L1threshold' : '',
1316  'monType' : AllowedBeamspotChainIdentifiers,
1317  'location' : ['vtx'],
1318  'addInfo' : ['trkFS', 'allTE', 'activeTE','idperf'],
1319  'hypo' : [],
1320  'l2IDAlg' : ['trkfast'],
1321  'threshold' : '',
1322  'multiplicity' : '',
1323  'trigType' : 'beamspot',
1324  'extra' : '',
1325  'sigFolder' : ['CalibCosmicMon'],
1326  'subSigs' : ['Beamspot'],
1327  'chainPartIndex': list(range(0,10)),
1328  'beamspotChain' : [],
1329  }
1330 
1331 # ---- Beamspot Chain Default Dictionary of all allowed Values ----
1332 BeamspotChainParts_Default = {
1333  'signature' : ['Beamspot'],
1334  'alignmentGroup' : ['Beamspot'],
1335  'chainPartName' : '',
1336  'L1threshold' : '',
1337  'monType' : [],
1338  'addInfo' : [],
1339  'hypo' : [],
1340  'l2IDAlg' : [],
1341  'threshold' : '',
1342  'multiplicity' : '',
1343  'location' : 'vtx',
1344  'trigType' : '',
1345  'extra' : '',
1346  'sigFolder' : ['CalibCosmicMon'],
1347  'subSigs' : ['Beamspot'],
1348  'chainPartIndex' : 0,
1349  'beamspotChain' : '',
1350  }
1351 
1352 #==========================================================
1353 # Unconventional Tracking
1354 #==========================================================
1355 # ---- Unconventional Tracking Dictionary of all allowed Values ----
1356 UnconventionalTrackingChainParts = {
1357  'signature' : ['UnconventionalTracking'],
1358  'alignmentGroup' : ['UnconventionalTracking'],
1359  'L1threshold' : '',
1360  'chainPartName' : [],
1361  'multiplicity' : '',
1362  'trigType' : ['isotrk', 'fslrt', 'dedxtrk', 'hitdvjet', 'fsvsi', 'distrk', 'dispjet', 'dispvtx'],
1363  'threshold' : '',
1364  'IDinfo' : ['loose','medium','tight','vloose'],
1365  'isoInfo' : ['iaggrmedium','iaggrloose','imedium','iloose'],
1366  'extra' : '',
1367  'addInfo' : ['perf'],
1368  'dispjetConfig' : ['3d2p', '1p', 'x3d1p', '2p'],
1369  'sigFolder' : ['UnconventionalTracking'],
1370  'subSigs' : ['UnconventionalTracking'],
1371  'chainPartIndex': list(range(0,10))
1372 }
1373 # ---- Unconventional Tracking Dictionary of default Values ----
1374 UnconventionalTrackingChainParts_Default = {
1375  'signature' : ['UnconventionalTracking'],
1376  'alignmentGroup' : ['UnconventionalTracking'],
1377  'L1threshold' : '',
1378  'chainPartName' : [],
1379  'multiplicity' : '',
1380  'IDinfo' : '',
1381  'trigType' : '',
1382  'threshold' : '',
1383  'isoInfo' : '',
1384  'extra' : '',
1385  'addInfo' : '',
1386  'dispjetConfig' : '',
1387  'sigFolder' : ['UnconventionalTracking'],
1388  'subSigs' : ['UnconventionalTracking'],
1389  'chainPartIndex': 0
1390 }
1391 
1392 #==========================================================
1393 # Combined Chains
1394 #==========================================================
1395 AllowedTopos_comb = [
1396  'idZmumu','idJpsimumu',
1397  'dRAA12', 'dRAB15', '03dRAB','02dRAB10','03dRAB10','03dRAB30','03dRAB35','dRAD04', 'dRAF04','dRAB03','dRAB04', 'dRAB05', '02dRAB','02dRAC','03dRAC30','03dRAC35','02dRBC','15dRBC45','50invmAB','60invmAB','afpdijet','18dphiAB','18dphiAC','80mTAC','80mTAD',
1398  'anomdet','anomdetL','anomdetM','anomdetT',
1399  '29dphiAA', '29dphiAB', '30dphiAA', '30dphiAB', # g-2 tau triggers
1400  '90invmAB',# TEST
1401  '1invmAB5','50invmAB130','50invmBC130', # Jpsiee, Zee/Zeg
1402  '25dphiAA','25dphiBB','25dphiCC','invmAA80', # Low-mass diphoton
1403  '10invmAA70', # Low-mass dimuon
1404  'invmAB10', '10invmAB70',
1405  '7invmAB9', '11invmAB60', '11invmAB24', '24invmAB60', '7invmAA9', '11invmAA60', '11invmAA24', '24invmAA60',
1406  '20detaAA' # Low mass Drell-Yan
1407  ]
1408 
1409 # ---- Combined Dictionary of all allowed Values ----
1410 CombinedChainParts = deepcopy(PhotonChainParts)
1411 CombinedChainParts['signature'] = ['Photon','Muon']
1412 CombinedChainParts['chainParts'] = ['g','mu'],
1413 CombinedChainParts['topo'] = AllowedTopos_comb
1414 # ---- Combined Dictionary of default Values ----
1415 CombinedChainParts_Default = deepcopy(PhotonChainParts_Default)
1416 CombinedChainParts_Default['signature'] = ['Photon','Muon']
1417 CombinedChainParts_Default['chainParts'] = ['g','mu'],
1418 CombinedChainParts_Default['trigType'] = ''
1419 CombinedChainParts_Default['topo'] = []
1420 
1421 #==========================================================
1422 # ----- Allowed HLT Topo Keywords (also: generic topos like DR, DETA, DPHI...)
1423 #==========================================================
1424 #NOTE: removed jets from list, special case for VBF triggers
1425 AllowedTopos = AllowedTopos_e + AllowedTopos_g + AllowedTopos_mu + AllowedTopos_Bphysics + AllowedTopos_xe + AllowedTopos_tau + AllowedTopos_comb
1426 
1427 #==========================================================
1428 # Obtain signature type
1429 #==========================================================
1431  import re
1432  theMatchingTokens = []
1433  reverseSliceIDDict = { subvalue: key for key, value in SliceIDDict.items() for subvalue in ([value] if not isinstance(value, list) else value) } #reversed SliceIDDict
1434  for sig,token in SliceIDDict.items():
1435  token = token if isinstance(token, list) else [token]
1436  for subtoken in token:
1437  if re.match(r'^\d*'+subtoken+r'\d*\w*$', chainpart):
1438  theMatchingTokens += [subtoken]
1439  if len(theMatchingTokens) > 0:
1440  return reverseSliceIDDict[sorted(theMatchingTokens, key=lambda x: len(x), reverse=True)[0]]
1441  else:
1442  log.error('No signature matching chain part %s was found.', chainpart)
1443 
1444  raise Exception('[getSignatureNameFromToken] Cannot find signature from chain name, exiting.')
1445 
1446  return False
1447 
1448 
1449 #==========================================================
1450 # Signature dictionaries to use
1451 #==========================================================
1453  if signature == 'Electron':
1454  return [ElectronChainParts_Default, ElectronChainParts]
1455  if signature == 'Photon':
1456  return [PhotonChainParts_Default, PhotonChainParts]
1457  if signature == "Jet":
1458  return [JetChainParts_Default, JetChainParts]
1459  if signature == "Bjet":
1460  return [bJetChainParts_Default, JetChainParts]
1461  if signature == "Beamspot_Jet":
1462  return [BeamspotJetChainParts_Default, JetChainParts]
1463  if signature == "Tau":
1464  return [TauChainParts_Default, TauChainParts]
1465  if signature == "Ditau":
1466  return [ditauJetChainParts_Default, JetChainParts]
1467  if (signature == "Muon"):
1468  return [MuonChainParts_Default, MuonChainParts]
1469  if (signature == "Bphysics"):
1470  return [BphysicsChainParts_Default, BphysicsChainParts]
1471  if (signature == "Combined"):
1472  return [CombinedChainParts_Default, CombinedChainParts]
1473  if signature == "MET":
1474  return [METChainParts_Default, METChainParts]
1475  if signature == "XS":
1476  return [XSChainParts_Default, XSChainParts]
1477  if signature == "TE":
1478  return [TEChainParts_Default, TEChainParts]
1479  if signature == "MinBias":
1480  return [MinBiasChainParts_Default, MinBiasChainParts]
1481  if signature == "HeavyIon":
1482  return [HeavyIonChainParts_Default, HeavyIonChainParts]
1483  if signature == "Cosmic":
1484  return [CosmicChainParts_Default, CosmicChainParts]
1485  if signature == "Calib":
1486  return [CalibChainParts_Default, CalibChainParts]
1487  if signature == "Streaming":
1488  return [StreamingChainParts_Default, StreamingChainParts]
1489  if signature == "Monitor":
1490  return [MonitorChainParts_Default, MonitorChainParts]
1491  if signature == "Beamspot":
1492  return [BeamspotChainParts_Default, BeamspotChainParts]
1493  if signature == "EnhancedBias":
1494  return [EnhancedBiasChainParts_Default, EnhancedBiasChainParts]
1495  if signature == "UnconventionalTracking":
1496  return [UnconventionalTrackingChainParts_Default, UnconventionalTrackingChainParts]
1497  if signature == "Test":
1498  return [TestChainParts_Default, TestChainParts]
1499  else:
1500  raise RuntimeError("ERROR Cannot find corresponding dictionary for signature", signature)
1501 
1502 #==========================================================
1503 # Analysis the base pattern: <mult><signatureType><threshold><extraInfo>
1504 #==========================================================
1506  import re
1507  allTrigTypes = []
1508  for v in SliceIDDict.values():
1509  if isinstance(v, list):
1510  allTrigTypes += v
1511  else:
1512  allTrigTypes.append(v)
1513 
1514  possibleTT = '|'.join(allTrigTypes)
1515  pattern = re.compile(r"(?P<multiplicity>\d*)(?P<trigType>(%s))(?P<threshold>\d+)(?P<extra>\w*)" % (possibleTT))
1516  return pattern
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename R::value_type > sorted(const R &r, PROJ proj={})
Helper function to create a sorted vector from an unsorted range.
python.HLT.Menu.SignatureDicts.getSignatureDict
def getSignatureDict()
Definition: SignatureDicts.py:46
python.HLT.Menu.SignatureDicts.getListOfSignatures
def getListOfSignatures()
Definition: SignatureDicts.py:65
python.HLT.Menu.SignatureDicts.ChainStore.__init__
def __init__(self)
Definition: SignatureDicts.py:78
python.HLT.Menu.SignatureDicts.getBasePattern
def getBasePattern()
Definition: SignatureDicts.py:1505
python.HLT.Menu.SignatureDicts.ChainStore._allowedSignatures
_allowedSignatures
Definition: SignatureDicts.py:73
python.HLT.Menu.SignatureDicts.ChainStore
Definition: SignatureDicts.py:71
python.HLT.Menu.SignatureDicts.getListOfSignatureStrings
def getListOfSignatureStrings()
Definition: SignatureDicts.py:58
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.HLT.Menu.SignatureDicts.getSignatureGroupingDict
def getSignatureGroupingDict()
Definition: SignatureDicts.py:53
python.HLT.Menu.SignatureDicts.getSignatureNameFromToken
def getSignatureNameFromToken(chainpart)
Definition: SignatureDicts.py:1430
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.HLT.Menu.SignatureDicts.getSignatureInformation
def getSignatureInformation(signature)
Definition: SignatureDicts.py:1452
python.HLT.Menu.SignatureDicts.ChainStore.__setitem__
def __setitem__(self, key, value)
Definition: SignatureDicts.py:82