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+MuAlCalIsolatedMu+DtCalib',
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' : 'EcalCalElectron',
9  'DoubleElectron' : 'EcalCalElectron',
10  'Cosmics' : 'TkAlCosmics0T+MuAlGlobalCosmics+HcalCalHOCosmics+DtCalibCosmics',
11  # These two cannot run on RAW, they are just meant to run on the dedicated AlcaRAW so they do not enter the allForPrompt list
12  'AlCaP0' : 'EcalCalPi0Calib+EcalCalEtaCalib',
13  # ---------------------------------------------------------------------------------------------------------------------------
14  'HcalNZS' : 'HcalCalMinBias'
15  # This is in the AlCaRecoMatrix, but no RelVals are produced
16  # 'TestEnablesTracker' : 'TkAlLAS'
17  }
18 
19 def buildList(pdList, matrix):
20  """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."""
21  alCaRecoList = []
22  for pd in pdList:
23  alCaRecoList.extend(matrix[pd].split("+"))
24  # remove duplicates converting to a set
25  alCaRecoList = set(alCaRecoList)
26  stringList = ''
27  for alCaReco in alCaRecoList:
28  if stringList == '':
29  stringList += alCaReco
30  else:
31  stringList += '+'+alCaReco
32  return stringList
33 
34 # Update the lists anytime a new PD is added to the matrix
35 autoAlca = { 'allForPrompt' : buildList(['MinimumBias', 'Commissioning', 'SingleMu', 'DoubleMu', 'MuOnia', 'SingleElectron', 'DoubleElectron', 'HcalNZS'], AlCaRecoMatrix),
36  'allForExpress' : buildList(['StreamExpress'], AlCaRecoMatrix),
37  'allForPromptCosmics' : buildList(['Cosmics'], AlCaRecoMatrix),
38  'allForExpressCosmics' : buildList(['ExpressCosmics'], AlCaRecoMatrix) }
39 autoAlca.update(AlCaRecoMatrix)
def buildList
Definition: autoAlca.py:19
double split
Definition: MVATrainer.cc:139
void set(const std::string &name, int value)
set the flag, with a run-time name