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