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