CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
autoAlca.py
Go to the documentation of this file.
1 AlCaRecoMatrix = {'ExpressCosmics' : 'SiStripCalZeroBias+TkAlCosmics0T',
2  'StreamExpress' : 'SiStripCalZeroBias+TkAlMinBias+SiStripPCLHistos+SiStripCalMinBias+DtCalib+Hotline',
3  'MinimumBias' : 'SiStripCalMinBias+TkAlMinBias',
4  'Commissioning' : 'HcalCalIsoTrk',
5  'SingleMu' : 'MuAlCalIsolatedMu+MuAlOverlaps+TkAlMuonIsolated+DtCalib',
6  'DoubleMu' : 'MuAlCalIsolatedMu+MuAlOverlaps+DtCalib+TkAlZMuMu',
7  'MuOnia' : 'TkAlJpsiMuMu+TkAlUpsilonMuMu',
8  'SingleElectron' : 'EcalCalWElectron+EcalUncalWElectron',
9  'DoubleElectron' : 'EcalCalZElectron+EcalUncalZElectron',
10  'AlCaLumiPixels' : 'LumiPixels',
11  'DoubleMuParked' : 'MuAlCalIsolatedMu+MuAlOverlaps+DtCalib+TkAlZMuMu',
12  'MuOniaParked' : 'TkAlJpsiMuMu+TkAlUpsilonMuMu',
13  'Cosmics' : 'TkAlCosmics0T+MuAlGlobalCosmics+HcalCalHOCosmics+DtCalibCosmics',
14  # These two cannot run on RAW, they are just meant to run on the dedicated AlcaRAW so they do not enter the allForPrompt list
15  'AlCaP0' : '',
16  # ---------------------------------------------------------------------------------------------------------------------------
17  'HcalNZS' : 'HcalCalMinBias'
18  # This is in the AlCaRecoMatrix, but no RelVals are produced
19  # 'TestEnablesTracker' : 'TkAlLAS'
20  }
21 
22 def buildList(pdList, matrix):
23  """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."""
24  alCaRecoList = []
25  for pd in pdList:
26  alCaRecoList.extend(matrix[pd].split("+"))
27  # remove duplicates converting to a set
28  alCaRecoList = set(alCaRecoList)
29  stringList = ''
30  for alCaReco in alCaRecoList:
31  if stringList == '':
32  stringList += alCaReco
33  else:
34  stringList += '+'+alCaReco
35  return stringList
36 
37 # Update the lists anytime a new PD is added to the matrix
38 autoAlca = { 'allForPrompt' : buildList(['MinimumBias', 'Commissioning', 'SingleMu', 'DoubleMu', 'MuOnia', 'DoubleMuParked', 'MuOniaParked', 'SingleElectron', 'DoubleElectron', 'HcalNZS'], AlCaRecoMatrix),
39  'allForExpress' : buildList(['StreamExpress'], AlCaRecoMatrix),
40  'allForPromptCosmics' : buildList(['Cosmics'], AlCaRecoMatrix),
41  'allForExpressCosmics' : buildList(['ExpressCosmics'], AlCaRecoMatrix) }
42 autoAlca.update(AlCaRecoMatrix)
def buildList
Definition: autoAlca.py:22
double split
Definition: MVATrainer.cc:139