CMS 3D CMS Logo

autoAlca.py
Go to the documentation of this file.
1 AlCaRecoMatrix = {"AlCaLumiPixels" : "AlCaPCCZeroBias+AlCaPCCRandom",
2  "Charmonium" : "TkAlJpsiMuMu",
3  "Commissioning" : "HcalCalIsoTrk+HcalCalIsolatedBunchSelector+TkAlMinBias+SiStripCalMinBias",
4  "Cosmics" : "SiPixelCalCosmics+SiStripCalCosmics+TkAlCosmics0T+MuAlGlobalCosmics+DtCalibCosmics",
5  "DoubleEG" : "EcalCalZElectron+EcalUncalZElectron+HcalCalIterativePhiSym+HcalCalIsoTrkFilter",
6  "DoubleMuon" : "TkAlZMuMu+MuAlCalIsolatedMu+MuAlOverlaps+MuAlZMuMu+DtCalib+HcalCalLowPUHBHEMuonFilter",
7  # New PD in 2018 to replace SinglePhoton SingleElectron and DoubleEG in 2017
8  "EGamma" : "EcalESAlign+EcalUncalWElectron+EcalUncalZElectron+HcalCalIsoTrkFilter+HcalCalIterativePhiSym",
9  "HLTPhysics" : "TkAlMinBias",
10  "JetHT" : "HcalCalIsoTrkFilter+HcalCalIsolatedBunchFilter+TkAlMinBias",
11  "MinimumBias" : "SiStripCalZeroBias+SiStripCalMinBias+TkAlMinBias",
12  "MuOnia" : "TkAlUpsilonMuMu",
13  "NoBPTX" : "TkAlCosmicsInCollisions",
14  "SingleElectron" : "EcalUncalWElectron+EcalUncalZElectron+HcalCalIterativePhiSym+EcalESAlign",
15  "SingleMuon" : "SiPixelCalSingleMuon+TkAlMuonIsolated+DtCalib+MuAlCalIsolatedMu+MuAlOverlaps+MuAlZMuMu+HcalCalHO+HcalCalIterativePhiSym+HcalCalHBHEMuonFilter+HcalCalHEMuonFilter",
16  "SinglePhoton" : "HcalCalGammaJet",
17  "ZeroBias" : "SiStripCalZeroBias+TkAlMinBias+LumiPixelsMinBias+SiStripCalMinBias+AlCaPCCZeroBiasFromRECO",
18 
19  "Express" : "SiStripCalZeroBias+TkAlMinBias+SiStripPCLHistos+SiStripCalMinBias+SiStripCalMinBiasAAG+DtCalib+Hotline+LumiPixelsMinBias+SiPixelCalZeroBias",
20  "ExpressCosmics" : "SiStripPCLHistos+SiStripCalZeroBias+TkAlCosmics0T+DtCalibCosmics+SiPixelCalZeroBias",
21  "ExpressAlignment":"TkAlMinBias",
22  # Used for new PCC PCL introduced in 2018
23  "AlcaLumiPixelsExpress":"AlCaPCCRandom",
24  # These two cannot run on RAW, they are just meant to run on the dedicated AlcaRAW so they do not enter the allForPrompt list
25  "AlCaPhiSym" : "",
26  "AlCaP0" : "",
27  # ---------------------------------------------------------------------------------------------------------------------------
28  "HcalNZS" : "HcalCalMinBias",
29  # This is in the AlCaRecoMatrix, but no RelVals are produced
30  # 'TestEnablesTracker' : 'TkAlLAS'
31  # 'TestEnablesEcalHcal' : 'HcalCalPedestal'
32  "MET" : "HcalCalNoise",
33  "SingleMu" : "MuAlCalIsolatedMu+MuAlOverlaps+TkAlMuonIsolated+DtCalib+MuAlZMuMu+HcalCalHO",
34  "DoubleMu" : "MuAlCalIsolatedMu+MuAlOverlaps+DtCalib+TkAlZMuMu",
35  "DoubleMuParked" : "MuAlCalIsolatedMu+MuAlOverlaps+DtCalib+TkAlZMuMu",
36  "MuOniaParked" : "TkAlJpsiMuMu+TkAlUpsilonMuMu",
37  "DoubleElectron" : "EcalCalZElectron+EcalUncalZElectron+HcalCalIsoTrkFilter",
38  "StreamExpress" : "SiStripCalZeroBias+TkAlMinBias+SiStripPCLHistos+SiStripCalMinBias+SiStripCalMinBiasAAG+DtCalib+Hotline+LumiPixelsMinBias+SiPixelCalZeroBias",
39  "StreamExpressHI" : "SiStripCalZeroBias+TkAlMinBiasHI+SiStripPCLHistos+SiStripCalMinBias+SiStripCalMinBiasAAG+DtCalibHI+SiPixelCalZeroBias"
40  }
41 
42 # AlCaReco matrix used in CMSSW releases in 2017
43 AlCaRecoMatrix2017 = {"AlCaLumiPixels" : "AlCaPCCZeroBias+AlCaPCCRandom",
44  "Charmonium" : "TkAlJpsiMuMu",
45  "Commissioning" : "HcalCalIsoTrk+HcalCalIsolatedBunchSelector+TkAlMinBias+SiStripCalMinBias",
46  "Cosmics" : "TkAlCosmics0T+MuAlGlobalCosmics+DtCalibCosmics",
47  "DoubleEG" : "EcalCalZElectron+EcalUncalZElectron+HcalCalIterativePhiSym+HcalCalIsoTrkFilter",
48  "DoubleMuon" : "TkAlZMuMu+MuAlCalIsolatedMu+MuAlOverlaps+MuAlZMuMu+DtCalib",
49  "HLTPhysics" : "TkAlMinBias",
50  "JetHT" : "HcalCalIsoTrkFilter+HcalCalIsolatedBunchFilter",
51  "MinimumBias" : "SiStripCalZeroBias+SiStripCalMinBias+TkAlMinBias",
52  "MuOnia" : "TkAlUpsilonMuMu",
53  "NoBPTX" : "TkAlCosmicsInCollisions",
54  "SingleElectron" : "EcalUncalWElectron+EcalUncalZElectron+HcalCalIterativePhiSym+EcalESAlign",
55  "SingleMuon" : "TkAlMuonIsolated+DtCalib+MuAlCalIsolatedMu+MuAlOverlaps+MuAlZMuMu+HcalCalHO+HcalCalIterativePhiSym+HcalCalHBHEMuonFilter+HcalCalHEMuonFilter",
56  "SinglePhoton" : "HcalCalGammaJet",
57  "ZeroBias" : "SiStripCalZeroBias+TkAlMinBias+LumiPixelsMinBias+SiStripCalMinBias+AlCaPCCZeroBiasFromRECO",
58 
59  "Express" : "SiStripCalZeroBias+TkAlMinBias+SiStripPCLHistos+SiStripCalMinBias+SiStripCalMinBiasAAG+DtCalib+Hotline+LumiPixelsMinBias+SiPixelCalZeroBias",
60  "ExpressCosmics" : "SiStripPCLHistos+SiStripCalZeroBias+TkAlCosmics0T+DtCalibCosmics+SiPixelCalZeroBias",
61  "ExpressAlignment":"TkAlMinBias",
62  # These two cannot run on RAW, they are just meant to run on the dedicated AlcaRAW so they do not enter the allForPrompt list
63  "AlCaPhiSym" : "",
64  "AlCaP0" : "",
65  # ---------------------------------------------------------------------------------------------------------------------------
66  "HcalNZS" : "HcalCalMinBias",
67  # This is in the AlCaRecoMatrix, but no RelVals are produced
68  # 'TestEnablesTracker' : 'TkAlLAS'
69  # 'TestEnablesEcalHcal' : 'HcalCalPedestal'
70  "MET" : "HcalCalNoise",
71  "SingleMu" : "MuAlCalIsolatedMu+MuAlOverlaps+TkAlMuonIsolated+DtCalib+MuAlZMuMu+HcalCalHO",
72  "DoubleMu" : "MuAlCalIsolatedMu+MuAlOverlaps+DtCalib+TkAlZMuMu",
73  "DoubleMuParked" : "MuAlCalIsolatedMu+MuAlOverlaps+DtCalib+TkAlZMuMu",
74  "MuOniaParked" : "TkAlJpsiMuMu+TkAlUpsilonMuMu",
75  "DoubleElectron" : "EcalCalZElectron+EcalUncalZElectron+HcalCalIsoTrkFilter",
76  "StreamExpress" : "SiStripCalZeroBias+TkAlMinBias+SiStripPCLHistos+SiStripCalMinBias+SiStripCalMinBiasAAG+DtCalib+Hotline+LumiPixelsMinBias+SiPixelCalZeroBias",
77  "StreamExpressHI" : "SiStripCalZeroBias+TkAlMinBiasHI+SiStripPCLHistos+SiStripCalMinBias+SiStripCalMinBiasAAG+DtCalibHI+SiPixelCalZeroBias"
78 }
79 
80 # this matrix will be used for the legacy reprocessing of the 2016 2016B-H dataset;
81 # with the exception of ZeroBias, it was also used for the 23Sept16 reprocessing of 2016B-G
82 AlCaRecoMatrixRereco = {'AlCaLumiPixels' : 'LumiPixels',
83  'Charmonium' : 'TkAlJpsiMuMu',
84  'Commissioning' : 'TkAlMinBias+SiStripCalMinBias+HcalCalIsoTrk+HcalCalIsolatedBunchSelector',
85  'Cosmics' : 'SiPixelCalCosmics+TkAlCosmics0T+MuAlGlobalCosmics+HcalCalHOCosmics+DtCalibCosmics',
86  'DoubleEG' : 'EcalUncalZElectron+HcalCalIterativePhiSym+HcalCalIsoTrkFilter',
87  'DoubleElectron' : 'EcalUncalZElectron+HcalCalIsoTrkFilter',
88  'DoubleMu' : 'MuAlCalIsolatedMu+MuAlOverlaps+DtCalib+TkAlZMuMu+MuAlZMuMu+TkAlZMuMu+TkAlJpsiMuMu+TkAlUpsilonMuMu+HcalCalIsoTrkFilter',
89  'DoubleMuon' : 'TkAlZMuMu+MuAlCalIsolatedMu+MuAlOverlaps+MuAlZMuMu+DtCalib',
90  'DoubleMuParked' : 'MuAlCalIsolatedMu+MuAlOverlaps+DtCalib+TkAlZMuMu',
91  'HLTPhysics' : 'SiStripCalMinBias+TkAlMinBias+HcalCalIsoTrkFilter',
92  'JetHT' : 'HcalCalDijets+HcalCalIsoTrkFilter+HcalCalIsolatedBunchFilter',
93  'NoBPTX' : 'TkAlCosmicsInCollisions',
94  'MET' : 'HcalCalNoise',
95  'MinimumBias' : 'SiStripCalMinBias+TkAlMinBias',
96  'MuOnia' : 'TkAlUpsilonMuMu',
97  'SingleElectron' : 'EcalUncalWElectron+EcalUncalZElectron+EcalESAlign+HcalCalIterativePhiSym+HcalCalIsoTrkFilter',
98  'SingleMu' : 'MuAlCalIsolatedMu+MuAlOverlaps+TkAlMuonIsolated+DtCalib+MuAlZMuMu+HcalCalHO',
99  'SingleMuon' : 'SiPixelCalSingleMuon+TkAlMuonIsolated+DtCalib+MuAlCalIsolatedMu+MuAlOverlaps+MuAlZMuMu+HcalCalIterativePhiSym+HcalCalHO',
100  'SinglePhoton' : 'HcalCalGammaJet',
101  'ZeroBias' : 'SiStripCalZeroBias+TkAlMinBias+LumiPixelsMinBias+SiStripCalMinBias+SiStripCalMinBiasAfterAbortGap',
102  'HcalNZS' : 'HcalCalMinBias'
103  }
104 
105 def buildList(pdList, matrix):
106  """Takes a list of primary datasets (PDs) and the AlCaRecoMatrix (a dictinary) and returns a string with all the AlCaRecos for the selected PDs separated by the '+' character without duplicates."""
107  alCaRecoList = []
108  for pd in pdList:
109  alCaRecoList.extend(matrix[pd].split("+"))
110  # remove duplicates converting to a set
111  alCaRecoList = set(alCaRecoList)
112  stringList = ''
113  for alCaReco in alCaRecoList:
114  if stringList == '':
115  stringList += alCaReco
116  else:
117  stringList += '+'+alCaReco
118  return stringList
119 
120 # Update the lists anytime a new PD is added to the matrix
121 autoAlca = { 'allForPrompt' : buildList(['Charmonium', 'Commissioning', 'DoubleEG', 'DoubleElectron', 'DoubleMu', 'DoubleMuParked', 'DoubleMuon', 'HLTPhysics', 'HcalNZS', 'JetHT', 'MET', 'MinimumBias', 'MuOnia', 'MuOniaParked', 'NoBPTX' , 'SingleElectron', 'SingleMu', 'SingleMuon', 'SinglePhoton', 'ZeroBias'], AlCaRecoMatrix),
122  'allForExpress' : buildList(['StreamExpress'], AlCaRecoMatrix),
123  'allForExpressHI' : buildList(['StreamExpressHI'], AlCaRecoMatrix),
124  'allForPromptCosmics' : buildList(['Cosmics'], AlCaRecoMatrix),
125  'allForExpressCosmics' : buildList(['ExpressCosmics'], AlCaRecoMatrix) }
126 autoAlca.update(AlCaRecoMatrix)
def buildList(pdList, matrix)
Definition: autoAlca.py:105
double split
Definition: MVATrainer.cc:139