CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
relval_steps.py
Go to the documentation of this file.
1 class Matrix(dict):
2  def __setitem__(self,key,value):
3  if key in self:
4  print "ERROR in Matrix"
5  print "overwritting",key,"not allowed"
6  else:
7  self.update({float(key):WF(float(key),value)})
8 
9  def addOverride(self,key,override):
10  self[key].addOverride(override)
11 
12 #the class to collect all possible steps
13 class Steps(dict):
14  def __setitem__(self,key,value):
15  if key in self:
16  print "ERROR in Step"
17  print "overwritting",key,"not allowed"
18  import sys
19  sys.exit(-9)
20  else:
21  self.update({key:value})
22  # make the python file named <step>.py
23  #if not '--python' in value: self[key].update({'--python':'%s.py'%(key,)})
24 
25  def overwrite(self,keypair):
26  value=self[keypair[1]]
27  self.update({keypair[0]:value})
28 
29 class WF(list):
30  def __init__(self,n,l):
31  self.extend(l)
32  self.num=n
33  #the actual steps of this WF
34  self.steps=[]
35  self.overrides={}
36  def addOverride(self,overrides):
37  self.overrides=overrides
38 
39  def interpret(self,stepsDict):
40  for s in self:
41  print 'steps',s,stepsDict[s]
42  steps.append(stepsDict[s])
43 
44 
45 InputInfoNDefault=2000000
47  def __init__(self,dataSet,label='',run=[],files=1000,events=InputInfoNDefault,split=10,location='CAF',ib_blacklist=None,ib_block=None) :
48  self.run = run
49  self.files = files
50  self.events = events
51  self.location = location
52  self.label = label
53  self.dataSet = dataSet
54  self.split = split
55  self.ib_blacklist = ib_blacklist
56  self.ib_block = ib_block
57 
58  def das(self, das_options):
59  if len(self.run) is not 0:
60  command = ";".join(["das_client.py %s --query '%s'" % (das_options, query) for query in self.queries()])
61  command = "({0})".format(command)
62  else:
63  command = "das_client.py %s --query '%s'" % (das_options, self.queries()[0])
64 
65  # Run filter on DAS output
66  if self.ib_blacklist:
67  command += " | grep -E -v "
68  command += " ".join(["-e '{0}'".format(pattern) for pattern in self.ib_blacklist])
69  command += " | sort -u"
70  return command
71 
72  def lumiRanges(self):
73  if len(self.run) != 0:
74  return "echo '{\n"+",".join(('"%d":[[1,268435455]]\n'%(x,) for x in self.run))+"}'"
75  return None
76 
77  def queries(self):
78  query_by = "block" if self.ib_block else "dataset"
79  query_source = "{0}#{1}".format(self.dataSet, self.ib_block) if self.ib_block else self.dataSet
80  if len(self.run) is not 0:
81  return ["file {0}={1} run={2} site=T2_CH_CERN".format(query_by, query_source, query_run) for query_run in self.run]
82  else:
83  return ["file {0}={1} site=T2_CH_CERN".format(query_by, query_source)]
84 
85  def __str__(self):
86  if self.ib_block:
87  return "input from: {0} with run {1}#{2}".format(self.dataSet, self.ib_block, self.run)
88  return "input from: {0} with run {1}".format(self.dataSet, self.run)
89 
90 # merge dictionaries, with prioty on the [0] index
91 def merge(dictlist,TELL=False):
92  import copy
93  last=len(dictlist)-1
94  if TELL: print last,dictlist
95  if last==0:
96  # ONLY ONE ITEM LEFT
97  return copy.copy(dictlist[0])
98  else:
99  reducedlist=dictlist[0:max(0,last-1)]
100  if TELL: print reducedlist
101  # make a copy of the last item
102  d=copy.copy(dictlist[last])
103  # update with the last but one item
104  d.update(dictlist[last-1])
105  # and recursively do the rest
106  reducedlist.append(d)
107  return merge(reducedlist,TELL)
108 
109 def remove(d,key,TELL=False):
110  import copy
111  e = copy.deepcopy(d)
112  if TELL: print "original dict, BEF: %s"%d
113  del e[key]
114  if TELL: print "copy-removed dict, AFT: %s"%e
115  return e
116 
117 # step1 gensim: for run1
118 step1Defaults = {'--relval' : None, # need to be explicitly set
119  '-s' : 'GEN,SIM',
120  '-n' : 10,
121  '--conditions' : 'auto:run1_mc',
122  '--beamspot' : 'Realistic8TeVCollision',
123  '--datatier' : 'GEN-SIM',
124  '--eventcontent': 'RAWSIM',
125  }
126 # step1 gensim: for postLS1
127 step1Up2015Defaults = {'-s' : 'GEN,SIM',
128  '-n' : 10,
129  '--conditions' : 'auto:run2_mc',
130  '--beamspot' : 'NominalCollision2015',
131  '--datatier' : 'GEN-SIM',
132  '--eventcontent': 'FEVTDEBUG',
133  '--magField' : '38T_PostLS1',
134  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'
135  }
136 
137 steps = Steps()
138 #wmsplit = {}
139 
140 #### Production test section ####
141 steps['ProdMinBias']=merge([{'cfg':'MinBias_8TeV_pythia8_TuneCUETP8M1_cff','--relval':'9000,300'},step1Defaults])
142 steps['ProdTTbar']=merge([{'cfg':'TTbar_8TeV_TuneCUETP8M1_cfi','--relval':'9000,100'},step1Defaults])
143 steps['ProdQCD_Pt_3000_3500']=merge([{'cfg':'QCD_Pt_3000_3500_8TeV_TuneCUETP8M1_cfi','--relval':'9000,50'},step1Defaults])
144 
145 #### data ####
146 #list of run to harvest for 2010A: 144086,144085,144084,144083,144011,139790,139789,139788,139787,138937,138934,138924,138923
147 #list of run to harvest for 2010B: 149442,149291,149181,149011,148822,147929,147115,146644
148 Run2010ASk=[138937,138934,138924,138923,139790,139789,139788,139787,144086,144085,144084,144083,144011]
149 Run2010BSk=[146644,147115,147929,148822,149011,149181,149182,149291,149294,149442]
150 steps['MinimumBias2010A']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2010A-valskim-v6/RAW-RECO',label='run2010A',location='STD',run=Run2010ASk)}
151 steps['MinimumBias2010B']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2010B-valskim-v2/RAW-RECO',label='run2010B',run=Run2010BSk)}
152 steps['WZMuSkim2010A']={'INPUT':InputInfo(dataSet='/Mu/Run2010A-WZMu-Nov4Skim_v1/RAW-RECO',label='wzMu2010A',run=Run2010ASk)}
153 steps['WZMuSkim2010B']={'INPUT':InputInfo(dataSet='/Mu/Run2010B-WZMu-Nov4Skim_v1/RAW-RECO',label='wzMu2010B',run=Run2010BSk)}
154 steps['WZEGSkim2010A']={'INPUT':InputInfo(dataSet='/EG/Run2010A-WZEG-Nov4Skim_v1/RAW-RECO',label='wzEG2010A',run=Run2010ASk)}
155 steps['WZEGSkim2010B']={'INPUT':InputInfo(dataSet='/Electron/Run2010B-WZEG-Nov4Skim_v1/RAW-RECO',label='wzEG2010B',run=Run2010BSk)}
156 
157 steps['RunCosmicsA']={'INPUT':InputInfo(dataSet='/Cosmics/Run2010A-v1/RAW',label='cos2010A',run=[142089],events=100000)}
158 Run2010B=[149011]
159 steps['RunMinBias2010B']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2010B-RelValRawSkim-v1/RAW',label='mb2010B',run=Run2010B,events=100000)}
160 steps['RunMu2010B']={'INPUT':InputInfo(dataSet='/Mu/Run2010B-RelValRawSkim-v1/RAW',label='mu2010B',run=Run2010B,events=100000)}
161 steps['RunElectron2010B']={'INPUT':InputInfo(dataSet='/Electron/Run2010B-RelValRawSkim-v1/RAW',label='electron2010B',run=Run2010B,events=100000)}
162 steps['RunPhoton2010B']={'INPUT':InputInfo(dataSet='/Photon/Run2010B-RelValRawSkim-v1/RAW',label='photon2010B',run=Run2010B,events=100000)}
163 steps['RunJet2010B']={'INPUT':InputInfo(dataSet='/Jet/Run2010B-RelValRawSkim-v1/RAW',label='jet2010B',run=Run2010B,events=100000)}
164 
165 #list of run to harvest 2011A: 165121, 172802,
166 Run2011ASk=[165121,172802]
167 steps['ValSkim2011A']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2011A-ValSkim-08Nov2011-v1/RAW-RECO',ib_block='239c497e-0fae-11e1-a8b1-00221959e72f',label='run2011A',location='STD',run=Run2011ASk)}
168 steps['WMuSkim2011A']={'INPUT':InputInfo(dataSet='/SingleMu/Run2011A-WMu-08Nov2011-v1/RAW-RECO',ib_block='388c2990-0de6-11e1-bb7e-00221959e72f',label='wMu2011A',location='STD',run=Run2011ASk)}
169 steps['WElSkim2011A']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2011A-WElectron-08Nov2011-v1/RAW-RECO',ib_block='9c48c4ea-0db2-11e1-b62c-00221959e69e',label='wEl2011A',location='STD',run=Run2011ASk)}
170 steps['ZMuSkim2011A']={'INPUT':InputInfo(dataSet='/DoubleMu/Run2011A-ZMu-08Nov2011-v1/RAW-RECO',label='zMu2011A',location='STD',run=Run2011ASk)}
171 steps['ZElSkim2011A']={'INPUT':InputInfo(dataSet='/DoubleElectron/Run2011A-ZElectron-08Nov2011-v1/RAW-RECO',label='zEl2011A',location='STD',run=Run2011ASk)}
172 steps['HighMet2011A']={'INPUT':InputInfo(dataSet='/Jet/Run2011A-HighMET-08Nov2011-v1/RAW-RECO',ib_block='3c764584-0b59-11e1-b62c-00221959e69e',label='hMet2011A',location='STD',run=Run2011ASk)}
173 
174 steps['RunCosmics2011A']={'INPUT':InputInfo(dataSet='/Cosmics/Run2011A-v1/RAW',label='cos2011A',run=[160960],events=100000,location='STD')}
175 Run2011A=[165121]
176 steps['RunMinBias2011A']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2011A-v1/RAW',label='mb2011A',run=Run2011A,events=100000,location='STD')}
177 steps['RunMu2011A']={'INPUT':InputInfo(dataSet='/SingleMu/Run2011A-v1/RAW',label='mu2011A',run=Run2011A,events=100000)}
178 steps['RunElectron2011A']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2011A-v1/RAW',label='electron2011A',run=Run2011A,events=100000)}
179 steps['RunPhoton2011A']={'INPUT':InputInfo(dataSet='/Photon/Run2011A-v1/RAW',label='photon2011A',run=Run2011A,events=100000)}
180 steps['RunJet2011A']={'INPUT':InputInfo(dataSet='/Jet/Run2011A-v1/RAW',label='jet2011A',run=Run2011A,events=100000)}
181 
182 Run2011B=[177719]
183 Run2011BSk=[177719,177790,177096,175874]
184 steps['RunMinBias2011B']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2011B-v1/RAW',label='mb2011B',run=Run2011B,events=100000,location='STD')}
185 steps['RunMu2011B']={'INPUT':InputInfo(dataSet='/SingleMu/Run2011B-v1/RAW',label='mu2011B',run=Run2011B,events=100000)}
186 steps['RunElectron2011B']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2011B-v1/RAW',label='electron2011B',run=Run2011B,events=100000)}
187 steps['RunPhoton2011B']={'INPUT':InputInfo(dataSet='/Photon/Run2011B-v1/RAW',label='photon2011B',run=Run2011B,events=100000)}
188 steps['RunJet2011B']={'INPUT':InputInfo(dataSet='/Jet/Run2011B-v1/RAW',label='jet2011B',run=Run2011B,events=100000)}
189 
190 steps['ValSkim2011B']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2011B-ValSkim-19Nov2011-v1/RAW-RECO',label='run2011B',location='STD',run=Run2011BSk)}
191 steps['WMuSkim2011B']={'INPUT':InputInfo(dataSet='/SingleMu/Run2011B-WMu-19Nov2011-v1/RAW-RECO',ib_block='19110c74-1b66-11e1-a98b-003048f02c8a',label='wMu2011B',location='STD',run=Run2011BSk)}
192 steps['WElSkim2011B']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2011B-WElectron-19Nov2011-v1/RAW-RECO',ib_block='d75771a4-1b3f-11e1-aef4-003048f02c8a',label='wEl2011B',location='STD',run=Run2011BSk)}
193 steps['ZMuSkim2011B']={'INPUT':InputInfo(dataSet='/DoubleMu/Run2011B-ZMu-19Nov2011-v1/RAW-RECO',label='zMu2011B',location='STD',run=Run2011BSk)}
194 steps['ZElSkim2011B']={'INPUT':InputInfo(dataSet='/DoubleElectron/Run2011B-ZElectron-19Nov2011-v1/RAW-RECO',label='zEl2011B',run=Run2011BSk)}
195 steps['HighMet2011B']={'INPUT':InputInfo(dataSet='/Jet/Run2011B-HighMET-19Nov2011-v1/RAW-RECO',label='hMet2011B',run=Run2011BSk)}
196 
197 steps['RunHI2010']={'INPUT':InputInfo(dataSet='/HIAllPhysics/HIRun2010-v1/RAW',label='hi2010',run=[152698],events=10000,location='STD')}
198 steps['RunHI2011']={'INPUT':InputInfo(dataSet='/HIMinBiasUPC/HIRun2011-v1/RAW',label='hi2011',run=[182124],events=10000,location='STD')}
199 
200 
201 Run2012A=[191226]
202 Run2012ASk=Run2012A+[]
203 steps['RunMinBias2012A']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2012A-v1/RAW',label='mb2012A',run=Run2012A, events=100000,location='STD')}
204 steps['RunTau2012A']={'INPUT':InputInfo(dataSet='/Tau/Run2012A-v1/RAW',label='tau2012A', run=Run2012A, events=100000,location='STD')}
205 steps['RunMET2012A']={'INPUT':InputInfo(dataSet='/MET/Run2012A-v1/RAW',label='met2012A', run=Run2012A, events=100000,location='STD')}
206 steps['RunMu2012A']={'INPUT':InputInfo(dataSet='/SingleMu/Run2012A-v1/RAW',label='mu2012A', run=Run2012A, events=100000,location='STD')}
207 steps['RunElectron2012A']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2012A-v1/RAW',label='electron2012A', run=Run2012A, events=100000,location='STD')}
208 steps['RunJet2012A']={'INPUT':InputInfo(dataSet='/Jet/Run2012A-v1/RAW',label='jet2012A', run=Run2012A, events=100000,location='STD')}
209 
210 steps['WElSkim2012A']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2012A-WElectron-13Jul2012-v1/USER',label='wEl2012A',location='STD',run=Run2012ASk)}
211 steps['ZMuSkim2012A']={'INPUT':InputInfo(dataSet='/SingleMu/Run2012A-ZMu-13Jul2012-v1/RAW-RECO',label='zMu2012A',location='STD',run=Run2012ASk)}
212 steps['ZElSkim2012A']={'INPUT':InputInfo(dataSet='/DoubleElectron/Run2012A-ZElectron-13Jul2012-v1/RAW-RECO',label='zEl2012A',run=Run2012ASk)}
213 steps['HighMet2012A']={'INPUT':InputInfo(dataSet='/HT/Run2012A-HighMET-13Jul2012-v1/RAW-RECO',label='hMet2012A',run=Run2012ASk)}
214 
215 
216 Run2012B=[194533]
217 Run2012Bsk=Run2012B+[194912,195016]
218 steps['RunMinBias2012B']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2012B-v1/RAW',label='mb2012B',run=Run2012B, events=100000,location='STD')}
219 steps['RunMu2012B']={'INPUT':InputInfo(dataSet='/SingleMu/Run2012B-v1/RAW',label='mu2012B',location='STD',run=Run2012B)}
220 steps['RunPhoton2012B']={'INPUT':InputInfo(dataSet='/SinglePhoton/Run2012B-v1/RAW',ib_block='28d7fcc8-a2a0-11e1-86c7-003048caaace',label='photon2012B',location='STD',run=Run2012B)}
221 steps['RunEl2012B']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2012B-v1/RAW',label='electron2012B',location='STD',run=Run2012B)}
222 steps['RunJet2012B']={'INPUT':InputInfo(dataSet='/JetHT/Run2012B-v1/RAW',label='jet2012B',location='STD',run=Run2012B)}
223 steps['ZMuSkim2012B']={'INPUT':InputInfo(dataSet='/SingleMu/Run2012B-ZMu-13Jul2012-v1/RAW-RECO',label='zMu2012B',location='CAF',run=Run2012Bsk)}
224 steps['WElSkim2012B']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2012B-WElectron-13Jul2012-v1/USER',label='wEl2012B',location='STD',run=Run2012Bsk)}
225 steps['ZElSkim2012B']={'INPUT':InputInfo(dataSet='/DoubleElectron/Run2012B-ZElectron-13Jul2012-v1/RAW-RECO',ib_block='0c5092cc-d554-11e1-bb62-00221959e69e',label='zEl2012B',location='STD',run=Run2012Bsk)}
226 
227 Run2012C=[199812]
228 Run2012Csk=Run2012C+[203002]
229 steps['RunMinBias2012C']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2012C-v1/RAW',label='mb2012C',run=Run2012C, events=100000,location='STD')}
230 steps['RunMu2012C']={'INPUT':InputInfo(dataSet='/SingleMu/Run2012C-v1/RAW',label='mu2012C',location='STD',run=Run2012C)}
231 steps['RunPhoton2012C']={'INPUT':InputInfo(dataSet='/SinglePhoton/Run2012C-v1/RAW',label='photon2012C',location='STD',run=Run2012C)}
232 steps['RunEl2012C']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2012C-v1/RAW',label='electron2012C',location='STD',run=Run2012C)}
233 steps['RunJet2012C']={'INPUT':InputInfo(dataSet='/JetHT/Run2012C-v1/RAW',label='jet2012C',location='STD',run=Run2012C)}
234 steps['ZMuSkim2012C']={'INPUT':InputInfo(dataSet='/SingleMu/Run2012C-ZMu-PromptSkim-v3/RAW-RECO',label='zMu2012C',location='CAF',run=Run2012Csk)}
235 steps['WElSkim2012C']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2012C-WElectron-PromptSkim-v3/USER',label='wEl2012C',location='STD',run=Run2012Csk)}
236 steps['ZElSkim2012C']={'INPUT':InputInfo(dataSet='/DoubleElectron/Run2012C-ZElectron-PromptSkim-v3/RAW-RECO',label='zEl2012C',location='STD',run=Run2012Csk)}
237 
238 Run2012D=[208307]
239 Run2012Dsk=Run2012D+[207454]
240 steps['RunMinBias2012D']={'INPUT':InputInfo(dataSet='/MinimumBias/Run2012D-v1/RAW',label='mb2012D',run=Run2012D, events=100000,location='STD')}
241 steps['RunMu2012D']={'INPUT':InputInfo(dataSet='/SingleMu/Run2012D-v1/RAW',label='mu2012D',location='STD',run=Run2012D)}
242 steps['RunPhoton2012D']={'INPUT':InputInfo(dataSet='/SinglePhoton/Run2012D-v1/RAW',label='photon2012D',location='STD',run=Run2012D)}
243 steps['RunEl2012D']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2012D-v1/RAW',label='electron2012D',location='STD',run=Run2012D)}
244 steps['RunJet2012D']={'INPUT':InputInfo(dataSet='/JetHT/Run2012D-v1/RAW',label='jet2012D',location='STD',run=Run2012D)}
245 steps['ZMuSkim2012D']={'INPUT':InputInfo(dataSet='/SingleMu/Run2012D-ZMu-PromptSkim-v1/RAW-RECO',label='zMu2012D',location='STD',run=Run2012Dsk)}
246 steps['WElSkim2012D']={'INPUT':InputInfo(dataSet='/SingleElectron/Run2012D-WElectron-PromptSkim-v1/USER',label='wEl2012D',location='STD',run=Run2012Dsk)}
247 steps['ZElSkim2012D']={'INPUT':InputInfo(dataSet='/DoubleElectron/Run2012D-ZElectron-PromptSkim-v1/RAW-RECO',label='zEl2012D',location='STD',run=Run2012Dsk)}
248 
249 #### Standard release validation samples ####
250 
251 stCond={'--conditions':'auto:run1_mc'}
252 def Kby(N,s):
253  return {'--relval':'%s000,%s'%(N,s)}
254 def Mby(N,s):
255  return {'--relval':'%s000000,%s'%(N,s)}
256 
257 def gen(fragment,howMuch):
258  global step1Defaults
259  return merge([{'cfg':fragment},howMuch,step1Defaults])
260 
261 def gen2015(fragment,howMuch):
262  global step1Up2015Defaults
263  return merge([{'cfg':fragment},howMuch,step1Up2015Defaults])
264 
265 ### Production test: 13 TeV equivalents
266 steps['ProdMinBias_13']=gen2015('MinBias_13TeV_pythia8_TuneCUETP8M1_cfi',Kby(9,100))
267 steps['ProdTTbar_13']=gen2015('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
268 steps['ProdZEE_13']=gen2015('ZEE_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
269 steps['ProdQCD_Pt_3000_3500_13']=gen2015('QCD_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
270 
271 steps['MinBias']=gen('MinBias_8TeV_pythia8_TuneCUETP8M1_cff',Kby(9,300))
272 steps['QCD_Pt_3000_3500']=gen('QCD_Pt_3000_3500_8TeV_TuneCUETP8M1_cfi',Kby(9,25))
273 steps['QCD_Pt_600_800']=gen('QCD_Pt_600_800_8TeV_TuneCUETP8M1_cfi',Kby(9,50))
274 steps['QCD_Pt_80_120']=gen('QCD_Pt_80_120_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
275 steps['MinBias_13']=gen2015('MinBias_13TeV_pythia8_TuneCUETP8M1_cfi',Kby(100,300)) # set HS to provide adequate pool for PU
276 steps['QCD_Pt_3000_3500_13']=gen2015('QCD_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi',Kby(9,25))
277 steps['QCD_Pt_600_800_13']=gen2015('QCD_Pt_600_800_13TeV_TuneCUETP8M1_cfi',Kby(9,50))
278 steps['QCD_Pt_80_120_13']=gen2015('QCD_Pt_80_120_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
279 
280 steps['QCD_Pt_30_80_BCtoE_8TeV']=gen('QCD_Pt_30_80_BCtoE_8TeV_TuneCUETP8M1_cfi',Kby(9000,100))
281 steps['QCD_Pt_80_170_BCtoE_8TeV']=gen('QCD_Pt_80_170_BCtoE_8TeV_TuneCUETP8M1_cfi',Kby(9000,100))
282 steps['SingleElectronPt10']=gen('SingleElectronPt10_pythia8_cfi',Kby(9,3000))
283 steps['SingleElectronPt35']=gen('SingleElectronPt35_pythia8_cfi',Kby(9,500))
284 steps['SingleElectronPt1000']=gen('SingleElectronPt1000_pythia8_cfi',Kby(9,50))
285 steps['SingleElectronFlatPt1To100']=gen('SingleElectronFlatPt1To100_pythia8_cfi',Mby(2,100))
286 steps['SingleGammaPt10']=gen('SingleGammaPt10_pythia8_cfi',Kby(9,3000))
287 steps['SingleGammaPt35']=gen('SingleGammaPt35_pythia8_cfi',Kby(9,500))
288 steps['SingleMuPt1']=gen('SingleMuPt1_pythia8_cfi',Kby(25,1000))
289 steps['SingleMuPt10']=gen('SingleMuPt10_pythia8_cfi',Kby(25,500))
290 steps['SingleMuPt100']=gen('SingleMuPt100_pythia8_cfi',Kby(9,500))
291 steps['SingleMuPt1000']=gen('SingleMuPt1000_pythia8_cfi',Kby(9,500))
292 steps['SingleElectronPt10_UP15']=gen2015('SingleElectronPt10_pythia8_cfi',Kby(9,3000))
293 steps['SingleElectronPt35_UP15']=gen2015('SingleElectronPt35_pythia8_cfi',Kby(9,500))
294 steps['SingleElectronPt1000_UP15']=gen2015('SingleElectronPt1000_pythia8_cfi',Kby(9,50))
295 steps['SingleElectronFlatPt1To100_UP15']=gen2015('SingleElectronFlatPt1To100_pythia8_cfi',Mby(2,100))
296 steps['SingleGammaPt10_UP15']=gen2015('SingleGammaPt10_pythia8_cfi',Kby(9,3000))
297 steps['SingleGammaPt35_UP15']=gen2015('SingleGammaPt35_pythia8_cfi',Kby(9,500))
298 steps['SingleMuPt1_UP15']=gen2015('SingleMuPt1_pythia8_cfi',Kby(25,1000))
299 steps['SingleMuPt10_UP15']=gen2015('SingleMuPt10_pythia8_cfi',Kby(25,500))
300 steps['SingleMuPt100_UP15']=gen2015('SingleMuPt100_pythia8_cfi',Kby(9,500))
301 steps['SingleMuPt1000_UP15']=gen2015('SingleMuPt1000_pythia8_cfi',Kby(9,500))
302 steps['NuGun_UP15']=gen2015('SingleNuE10_cfi.py',Kby(9,100))
303 steps['TTbar']=gen('TTbar_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
304 steps['TTbarLepton']=gen('TTbarLepton_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
305 steps['ZEE']=gen('ZEE_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
306 steps['Wjet_Pt_80_120']=gen('Wjet_Pt_80_120_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
307 steps['Wjet_Pt_3000_3500']=gen('Wjet_Pt_3000_3500_8TeV_TuneCUETP8M1_cfi',Kby(9,50))
308 steps['LM1_sfts']=gen('LM1_sfts_8TeV_cfi',Kby(9,100))
309 steps['QCD_FlatPt_15_3000']=gen('QCDForPF_8TeV_TuneCUETP8M1_cfi',Kby(5,100))
310 steps['QCD_FlatPt_15_3000HS']=gen('QCDForPF_8TeV_TuneCUETP8M1_cfi',Kby(50,100))
311 steps['TTbar_13']=gen2015('TTbar_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
312 steps['TTbarLepton_13']=gen2015('TTbarLepton_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
313 steps['ZEE_13']=gen2015('ZEE_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
314 steps['Wjet_Pt_80_120_13']=gen2015('Wjet_Pt_80_120_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
315 steps['Wjet_Pt_3000_3500_13']=gen2015('Wjet_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi',Kby(9,50))
316 steps['LM1_sfts_13']=gen2015('LM1_sfts_13TeV_cfi',Kby(9,100)) # this is to be removed once the next line is tested.
317 steps['SMS-T1tttt_mGl-1500_mLSP-100_13']=gen2015('SMS-T1tttt_mGl-1500_mLSP-100_13TeV-pythia8_cfi',Kby(9,50))
318 steps['QCD_FlatPt_15_3000_13']=gen2015('QCDForPF_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
319 steps['QCD_FlatPt_15_3000HS_13']=gen2015('QCDForPF_13TeV_TuneCUETP8M1_cfi',Kby(50,100))
320 
321 steps['ZpMM_2250_8TeV']=gen('ZpMM_2250_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
322 steps['ZpEE_2250_8TeV']=gen('ZpEE_2250_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
323 steps['ZpTT_1500_8TeV']=gen('ZpTT_1500_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
324 steps['ZpMM_2250_13TeV']=gen2015('ZpMM_2250_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
325 steps['ZpEE_2250_13TeV']=gen2015('ZpEE_2250_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
326 steps['ZpTT_1500_13TeV']=gen2015('ZpTT_1500_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
327 steps['HSCPstop_M_200_13TeV']=gen2015('HSCPstop_M_200_TuneCUETP8M1_13TeV_pythia8_cff',Kby(9,100))
328 steps['RSGravitonToGaGa_13TeV']=gen2015('RSGravitonToGammaGamma_kMpl01_M_3000_TuneCUETP8M1_13TeV_pythia8_cfi',Kby(9,100))
329 steps['WpToENu_M-2000_13TeV']=gen2015('WprimeToENu_M-2000_TuneCUETP8M1_13TeV-pythia8_cff',Kby(9,100))
330 
331 def identitySim(wf):
332  return merge([{'--restoreRND':'SIM','--process':'SIM2', '--inputCommands':'"keep *","drop *TagInfo*_*_*_*"' },wf])
333 
334 steps['SingleMuPt10_UP15_ID']=identitySim(steps['SingleMuPt10_UP15'])
335 steps['TTbar_13_ID']=identitySim(steps['TTbar_13'])
336 
337 baseDataSetRelease=[
338  'CMSSW_7_1_0_pre7-PRE_STA71_V3-v1', # 0 run1 samples; keep GEN-SIM fixed to 710_pre7, for samples not routinely produced
339  'CMSSW_7_4_0_pre7-MCHI2_74_V3-v1', # 1 Run1 HI GEN-SIM (only MB = wf 140)
340  'CMSSW_6_2_0_pre8-PRE_ST62_V8_FastSim-v1', # 2 for fastsim id test
341 # 'CMSSW_7_1_0_pre5-START71_V1-v2', # 3 8 TeV , for the one sample which is part of the routine relval production (RelValZmumuJets_Pt_20_300, because of -v2)
342  # THIS ABOVE IS NOT USED, AT THE MOMENT
343  'CMSSW_7_4_0_pre7-MCRUN2_74_V7-v1', # 3 - 13 TeV samples with GEN-SIM from 740_p6; also GEN-SIM-DIGI-RAW-HLTDEBUG for id tests
344  'CMSSW_7_3_0_pre1-PRE_LS172_V15_FastSim-v1', # 4 - fast sim GEN-SIM-DIGI-RAW-HLTDEBUG for id tests
345  'CMSSW_7_4_6_patch1-PU25ns_MCRUN2_74_V9-v1', # 5 - fullSim premix 25ns
346  'CMSSW_7_4_6_patch1-PU50ns_MCRUN2_74_V8-v1', # 6 - fullSim premix 50ns
347  'CMSSW_7_4_6_patch1-MCRUN2_74_V9_FastSim-v1' # 7 - fastSim minibias for mixing
348  ]
349 
350 # note: INPUT commands to be added once GEN-SIM w/ 13TeV+PostLS1Geo will be available
351 steps['MinBiasINPUT']={'INPUT':InputInfo(dataSet='/RelValMinBias/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')} #was [0]
352 steps['QCD_Pt_3000_3500INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_3000_3500/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
353 steps['QCD_Pt_600_800INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_600_800/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
354 steps['QCD_Pt_80_120INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_80_120/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
355 steps['SingleElectronPt10INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt10/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
356 steps['SingleElectronPt1000INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt1000/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
357 steps['SingleElectronPt35INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt35/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
358 steps['SingleGammaPt10INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleGammaPt10/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
359 steps['SingleGammaPt35INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleGammaPt35/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
360 steps['SingleMuPt1INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt1/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
361 steps['SingleMuPt10INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt10/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
362 steps['SingleMuPt10_UP15IDINPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt10_UP15/%s/GEN-SIM-DIGI-RAW-HLTDEBUG'%(baseDataSetRelease[3],),location='STD',split=1)}
363 steps['SingleMuPt10_UP15FSIDINPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt10/%s/GEN-SIM-DIGI-RECO'%(baseDataSetRelease[4],),location='STD',split=1)}
364 steps['SingleMuPt100INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt100/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
365 steps['SingleMuPt1000INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt1000/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
366 steps['TTbarINPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
367 steps['TTbar_13IDINPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar_13/%s/GEN-SIM-DIGI-RAW-HLTDEBUG'%(baseDataSetRelease[3],),location='STD',split=1)}
368 steps['TTbar_13FSIDINPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar_13/%s/GEN-SIM-DIGI-RECO'%(baseDataSetRelease[4],),location='STD',split=1)}
369 steps['TTbarLeptonINPUT']={'INPUT':InputInfo(dataSet='/RelValTTbarLepton/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
370 steps['OldTTbarINPUT']={'INPUT':InputInfo(dataSet='/RelValProdTTbar/CMSSW_5_0_0_pre6-START50_V5-v1/GEN-SIM-RECO',location='STD')}
371 steps['OldGenSimINPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar/CMSSW_4_4_2-START44_V7-v1/GEN-SIM-DIGI-RAW-HLTDEBUG',location='STD')}
372 steps['Wjet_Pt_80_120INPUT']={'INPUT':InputInfo(dataSet='/RelValWjet_Pt_80_120/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
373 steps['Wjet_Pt_3000_3500INPUT']={'INPUT':InputInfo(dataSet='/RelValWjet_Pt_3000_3500/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
374 steps['LM1_sftsINPUT']={'INPUT':InputInfo(dataSet='/RelValLM1_sfts/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
375 steps['QCD_FlatPt_15_3000INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_FlatPt_15_3000/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
376 
377 steps['QCD_FlatPt_15_3000HSINPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_FlatPt_15_3000HS/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
378 steps['TTbar__DIGIPU1INPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar/CMSSW_5_2_2-PU_START52_V4_special_120326-v1/GEN-SIM-DIGI-RAW-HLTDEBUG',location='STD')}
379 
380 # 13 TeV recycle GEN-SIM input
381 steps['MinBias_13INPUT']={'INPUT':InputInfo(dataSet='/RelValMinBias_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
382 steps['QCD_Pt_3000_3500_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_3000_3500_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
383 steps['QCD_Pt_600_800_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_600_800_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
384 steps['QCD_Pt_80_120_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_80_120_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
385 steps['QCD_Pt_80_120_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_80_120_13_HI/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD')}
386 steps['TTbar_13INPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
387 steps['TTbarLepton_13INPUT']={'INPUT':InputInfo(dataSet='/RelValTTbarLepton_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
388 steps['ZEE_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZEE_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
389 steps['Wjet_Pt_80_120_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWjet_Pt_80_120_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
390 steps['Wjet_Pt_3000_3500_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWjet_Pt_3000_3500_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
391 steps['LM1_sfts_13INPUT']={'INPUT':InputInfo(dataSet='/RelValLM1_sfts_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}#to be removed once the following line is tested.
392 steps['SMS-T1tttt_mGl-1500_mLSP-100_13INPUT']={'INPUT':InputInfo(dataSet='/RelValSMS-T1tttt_mGl-1500_mLSP-100_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
393 steps['QCD_FlatPt_15_3000_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_FlatPt_15_3000_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
394 steps['QCD_FlatPt_15_3000HS_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_FlatPt_15_3000HS_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
395 steps['ZpMM_2250_13TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpMM_2250_13TeV/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
396 steps['ZpEE_2250_13TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpEE_2250_13TeV/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
397 steps['ZpTT_1500_13TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpTT_1500_13TeV/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
398 steps['MinBiasHS_13INPUT']={'INPUT':InputInfo(dataSet='/RelValMinBiasHS_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
399 steps['Higgs200ChargedTaus_13INPUT']={'INPUT':InputInfo(dataSet='/RelValHiggs200ChargedTaus_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
400 
401 # activate GEN-SIM recycling once we'll have the first set of gen-sim
402 steps['Upsilon1SToMuMu_13INPUT']={'INPUT':InputInfo(dataSet='/RelValUpsilon1SToMuMu_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
403 steps['BuToKstarMuMu_13INPUT']={'INPUT':InputInfo(dataSet='/RelValBuToKstarMuMu_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
404 steps['BsToMuMu_13INPUT']={'INPUT':InputInfo(dataSet='/RelValBsToMuMu_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
405 steps['JpsiMuMu_Pt-15INPUT']={'INPUT':InputInfo(dataSet='/RelValJpsiMuMu_Pt-15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
406 steps['BuToKstarPsi2S_13INPUT']={'INPUT':InputInfo(dataSet='/RelValBuToKstarPsi2S_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
407 steps['WE_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWE_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
408 steps['WM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWM_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
409 steps['WpM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWpM_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
410 steps['ZMM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZMM_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
411 steps['ZMM_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValZMM_13_HI/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD')}
412 steps['ZEEMM_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValZEEMM_13_HI/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD')}
413 steps['ZpMM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZpMM_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
414 steps['ZTT_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZTT_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
415 steps['H130GGgluonfusion_13INPUT']={'INPUT':InputInfo(dataSet='/RelValH130GGgluonfusion_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
416 steps['PhotonJets_Pt_10_13INPUT']={'INPUT':InputInfo(dataSet='/RelValPhotonJets_Pt_10_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
417 steps['PhotonJets_Pt_10_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValPhotonJets_Pt_10_13_HI/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD')}
418 steps['QQH1352T_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQQH1352T_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
419 steps['ADDMonoJet_d3MD3_13INPUT']={'INPUT':InputInfo(dataSet='/RelValADDMonoJet_d3MD3_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
420 steps['RSKKGluon_m3000GeV_13INPUT']={'INPUT':InputInfo(dataSet='/RelValRSKKGluon_m3000GeV_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
421 steps['BuJpsiK_13INPUT']={'INPUT':InputInfo(dataSet='/RelValBuJpsiK_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
422 steps['Cosmics_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValCosmics_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
423 steps['BeamHalo_13INPUT']={'INPUT':InputInfo(dataSet='/RelValBeamHalo_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
424 steps['HSCPstop_M_200_13TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValHSCPstop_M_200_13TeV/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
425 steps['RSGravitonToGaGa_13TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValRSGravitonToGaGa_13TeV/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
426 steps['WpToENu_M-2000_13TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValWpToENu_M-2000_13TeV/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
427 
428 # particle guns with postLS1 geometry recycle GEN-SIM input
429 steps['SingleElectronPt10_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt10_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
430 steps['SingleElectronPt35_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt35_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
431 steps['SingleElectronPt1000_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt1000_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
432 steps['SingleElectronFlatPt1To100_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronFlatPt1To100_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
433 steps['SingleGammaPt10_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleGammaPt10_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
434 steps['SingleGammaPt35_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleGammaPt35_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
435 steps['SingleMuPt1_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt1_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
436 steps['SingleMuPt10_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt10_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
437 steps['SingleMuPt100_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt100_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
438 steps['SingleMuPt1000_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt1000_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
439 steps['NuGun_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValNuGun_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
440 
441 #input for fast sim workflows to be added - TODO
442 
443 
444 ## high stat step1
445 ecalHcal={
446  '-s':'GEN,SIM,DIGI,DIGI2RAW,RAW2DIGI,L1Reco,RECO,EI',
447  '--datatier':'GEN-SIM-DIGI-RAW-RECO',
448  #'--geometry':'ECALHCAL',
449  '--eventcontent':'FEVTDEBUG',
450  '--customise':'Validation/Configuration/ECALHCAL.customise,SimGeneral/MixingModule/fullMixCustomize_cff.setCrossingFrameOn',
451  '--beamspot':'NoSmear'}
452 
453 steps['SingleElectronE120EHCAL']=merge([{'cfg':'SingleElectronE120EHCAL_pythia8_cfi'},ecalHcal,Kby(25,250),step1Defaults])
454 steps['SinglePiE50HCAL']=merge([{'cfg':'SinglePiE50HCAL_pythia8_cfi'},ecalHcal,Kby(25,250),step1Defaults])
455 
456 steps['MinBiasHS']=gen('MinBias_8TeV_pythia8_TuneCUETP8M1_cff',Kby(25,300))
457 steps['InclusiveppMuX']=gen('InclusiveppMuX_8TeV_TuneCUETP8M1_cfi',Mby(11,45000))
458 steps['SingleElectronFlatPt5To100']=gen('SingleElectronFlatPt5To100_pythia8_cfi',Kby(25,250))
459 steps['SinglePiPt1']=gen('SinglePiPt1_pythia8_cfi',Kby(25,250))
460 steps['SingleMuPt1HS']=gen('SingleMuPt1_pythia8_cfi',Kby(25,1000))
461 steps['ZPrime5000Dijet']=gen('ZPrime5000JJ_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
462 steps['SinglePi0E10']=gen('SinglePi0E10_pythia8_cfi',Kby(25,100))
463 steps['SinglePiPt10']=gen('SinglePiPt10_pythia8_cfi',Kby(25,250))
464 steps['SingleGammaFlatPt10To100']=gen('SingleGammaFlatPt10To100_pythia8_cfi',Kby(25,250))
465 steps['SingleTauPt50Pythia']=gen('SingleTaupt_50_pythia8_cfi',Kby(25,100))
466 steps['SinglePiPt100']=gen('SinglePiPt100_pythia8_cfi',Kby(25,250))
467 
468 
469 def genS(fragment,howMuch):
470  global step1Defaults,stCond
471  return merge([{'cfg':fragment},stCond,howMuch,step1Defaults])
472 
473 steps['Higgs200ChargedTaus']=genS('H200ChargedTaus_Tauola_8TeV_cfi',Kby(9,100))
474 steps['JpsiMM']=genS('JpsiMM_8TeV_TuneCUETP8M1_cfi',Kby(66,1000))
475 steps['WE']=genS('WE_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
476 steps['WM']=genS('WM_8TeV_TuneCUETP8M1_cfi',Kby(9,200))
477 steps['WpM']=genS('WpM_8TeV_TuneCUETP8M1_cfi',Kby(9,200))
478 steps['ZMM']=genS('ZMM_8TeV_TuneCUETP8M1_cfi',Kby(18,300))
479 steps['ZpMM']=genS('ZpMM_8TeV_TuneCUETP8M1_cfi',Kby(9,200))
480 steps['Higgs200ChargedTaus_13']=gen2015('H200ChargedTaus_Tauola_13TeV_cfi',Kby(9,100))
481 steps['Upsilon1SToMuMu_13']=gen2015('Upsilon1SToMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi',Kby(17,190))
482 steps['BuToKstarMuMu_13']=gen2015('BuToKstarMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi',Kby(2250,25000))
483 steps['BsToMuMu_13']=gen2015('BsToMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi',Kby(30000,333333))
484 steps['JpsiMuMu_Pt-15']=gen2015('JpsiMuMu_Pt-15_forSTEAM_13TeV_cfi',Kby(11000,122000))
485 steps['BuToKstarPsi2S_13']=gen2015('BuToKstarPsi2S_forSTEAM_13TeV_TuneCUETP8M1_cfi',Kby(16000,176000))
486 steps['WE_13']=gen2015('WE_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
487 steps['WM_13']=gen2015('WM_13TeV_TuneCUETP8M1_cfi',Kby(9,200))
488 steps['WpM_13']=gen2015('WpM_13TeV_TuneCUETP8M1_cfi',Kby(9,200))
489 steps['ZMM_13']=gen2015('ZMM_13TeV_TuneCUETP8M1_cfi',Kby(18,300))
490 steps['ZEEMM_13']=gen2015('ZEEMM_13TeV_TuneCUETP8M1_cfi',Kby(18,300))
491 steps['ZpMM_13']=gen2015('ZpMM_13TeV_TuneCUETP8M1_cfi',Kby(9,200))
492 
493 steps['ZTT']=genS('ZTT_All_hadronic_8TeV_TuneCUETP8M1_cfi',Kby(9,150))
494 steps['H130GGgluonfusion']=genS('H130GGgluonfusion_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
495 steps['PhotonJets_Pt_10']=genS('PhotonJet_Pt_10_8TeV_TuneCUETP8M1_cfi',Kby(9,150))
496 steps['QQH1352T']=genS('QQH1352T_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
497 steps['ZTT_13']=gen2015('ZTT_All_hadronic_13TeV_TuneCUETP8M1_cfi',Kby(9,150))
498 steps['H130GGgluonfusion_13']=gen2015('H130GGgluonfusion_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
499 steps['PhotonJets_Pt_10_13']=gen2015('PhotonJet_Pt_10_13TeV_TuneCUETP8M1_cfi',Kby(9,150))
500 steps['QQH1352T_13']=gen2015('QQH1352T_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
501 #steps['ZmumuJets_Pt_20_300']=gen('ZmumuJets_Pt_20_300_GEN_8TeV_TuneCUETP8M1_cfg',Kby(25,100))
502 steps['ADDMonoJet_d3MD3']=genS('ADDMonoJet_8TeV_d3MD3_TuneCUETP8M1_cfi',Kby(9,100))
503 steps['ADDMonoJet_d3MD3_13']=gen2015('ADDMonoJet_13TeV_d3MD3_TuneCUETP8M1_cfi',Kby(9,100))
504 steps['RSKKGluon_m3000GeV_13']=gen2015('RSKKGluon_m3000GeV_13TeV_TuneCUETP8M1_cff',Kby(9,100))
505 steps['BuJpsiK_13']=gen2015('Pythia8_BuJpsiK_13TeV_TuneCUETP8M1_cfi',Kby(36000,400000))
506 
507 steps['MinBias2INPUT']={'INPUT':InputInfo(dataSet='/RelValMinBias/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
508 steps['Higgs200ChargedTausINPUT']={'INPUT':InputInfo(dataSet='/RelValHiggs200ChargedTaus/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
509 steps['QCD_Pt_3000_3500_2INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_3000_3500/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
510 steps['QCD_Pt_80_120_2INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_80_120/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
511 steps['JpsiMMINPUT']={'INPUT':InputInfo(dataSet='/RelValJpsiMM/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
512 steps['TTbar2INPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
513 steps['WEINPUT']={'INPUT':InputInfo(dataSet='/RelValWE/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
514 steps['WMINPUT']={'INPUT':InputInfo(dataSet='/RelValWM/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
515 steps['ZEEINPUT']={'INPUT':InputInfo(dataSet='/RelValZEE/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
516 steps['ZMMINPUT']={'INPUT':InputInfo(dataSet='/RelValZMM/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
517 steps['ZTTINPUT']={'INPUT':InputInfo(dataSet='/RelValZTT/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
518 steps['H130GGgluonfusionINPUT']={'INPUT':InputInfo(dataSet='/RelValH130GGgluonfusion/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
519 steps['PhotonJets_Pt_10INPUT']={'INPUT':InputInfo(dataSet='/RelValPhotonJets_Pt_10/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
520 steps['QQH1352TINPUT']={'INPUT':InputInfo(dataSet='/RelValQQH1352T_Tauola/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
521 steps['ADDMonoJet_d3MD3INPUT']={'INPUT':InputInfo(dataSet='/RelValADDMonoJet_d3MD3/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
522 steps['WpMINPUT']={'INPUT':InputInfo(dataSet='/RelValWpM/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
523 steps['ZpMMINPUT']={'INPUT':InputInfo(dataSet='/RelValZpMM/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
524 steps['ZpMM_2250_8TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpMM_2250_8TeV_Tauola/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
525 steps['ZpEE_2250_8TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpEE_2250_8TeV_Tauola/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
526 steps['ZpTT_1500_8TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpTT_1500_8TeV_Tauola/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
527 
528 
529 steps['Cosmics']=merge([{'cfg':'UndergroundCosmicMu_cfi.py','--scenario':'cosmics'},Kby(666,100000),step1Defaults])
530 steps['Cosmics_UP15']=merge([{'cfg':'UndergroundCosmicMu_cfi.py','--scenario':'cosmics'},Kby(666,100000),step1Up2015Defaults])
531 steps['BeamHalo']=merge([{'cfg':'BeamHalo_cfi.py','--scenario':'cosmics'},Kby(9,100),step1Defaults])
532 steps['BeamHalo_13']=merge([{'cfg':'BeamHalo_13TeV_cfi.py','--scenario':'cosmics'},Kby(9,100),step1Up2015Defaults])
533 
534 # GF re-introduce INPUT command once GEN-SIM will be available
535 # steps['CosmicsINPUT']={'INPUT':InputInfo(dataSet='/RelValCosmics/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
536 steps['BeamHaloINPUT']={'INPUT':InputInfo(dataSet='/RelValBeamHalo/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
537 
538 steps['QCD_Pt_50_80']=genS('QCD_Pt_50_80_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
539 steps['QCD_Pt_15_20']=genS('QCD_Pt_15_20_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
540 steps['ZTTHS']=merge([Kby(25,100),steps['ZTT']])
541 steps['QQH120Inv']=genS('QQH120Inv_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
542 steps['TTbar2HS']=merge([Kby(25,100),steps['TTbar']])
543 steps['JpsiMM_Pt_20_inf']=genS('JpsiMM_Pt_20_inf_8TeV_TuneCUETP8M1_cfi',Kby(70,280))
544 steps['QCD_Pt_120_170']=genS('QCD_Pt_120_170_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
545 steps['H165WW2L']=genS('H165WW2L_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
546 steps['UpsMM']=genS('UpsMM_8TeV_TuneCUETP8M1_cfi',Kby(56250,225))
547 steps['RSGrav']=genS('RS750_quarks_and_leptons_8TeV_TuneCUETP8M1_cff',Kby(25,100))
548 steps['QCD_Pt_80_120_2HS']=merge([Kby(25,100),steps['QCD_Pt_80_120']])
549 steps['bJpsiX']=genS('bJpsiX_8TeV_TuneCUETP8M1_cfi',Mby(325,1300000))
550 steps['QCD_Pt_30_50']=genS('QCD_Pt_30_50_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
551 steps['H200ZZ4L']=genS('H200ZZ4L_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
552 steps['LM9p']=genS('LM9p_8TeV_cff',Kby(25,100))
553 steps['QCD_Pt_20_30']=genS('QCD_Pt_20_30_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
554 steps['QCD_Pt_170_230']=genS('QCD_Pt_170_230_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
555 
556 
557 
558 
559 ## pPb tests
560 step1PPbDefaults={'--beamspot':'Realistic8TeVCollision'}
561 steps['AMPT_PPb_5020GeV_MinimumBias']=merge([{'-n':10},step1PPbDefaults,genS('AMPT_PPb_5020GeV_MinimumBias_cfi',Kby(9,100))])
562 # GF to be uncommented when GEN-SIM becomes available
563 # steps['AMPT_PPb_5020GeV_MinimumBiasINPUT']={'INPUT':InputInfo(dataSet='/RelValAMPT_PPb_5020GeV_MinimumBias/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')}
564 
565 ## heavy ions tests
566 U2000by1={'--relval': '2000,1'}
567 U80by1={'--relval': '80,1'}
568 
569 hiAlca = {'--conditions':'auto:run2_mc_HIon', '--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_HI'}
570 hiDefaults=merge([hiAlca,{'--scenario':'HeavyIons','-n':2,'--beamspot':'RealisticHI2011Collision'}])
571 
572 steps['HydjetQ_MinBias_2760GeV']=merge([{'-n':1},hiDefaults,genS('Hydjet_Quenched_MinBias_2760GeV_cfi',U2000by1)])
573 steps['HydjetQ_MinBias_2760GeVINPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_MinBias_2760GeV/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD',split=5)}
574 steps['HydjetQ_MinBias_2760GeV_UP15']=merge([{'-n':1},hiDefaults,genS('Hydjet_Quenched_MinBias_2760GeV_cfi',U2000by1)])
575 steps['HydjetQ_MinBias_2760GeV_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_MinBias_2760GeV/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD',split=5)}
576 #steps['HydjetQ_B8_2760GeV']=merge([{'-n':1},hiDefaults,genS('Hydjet_Quenched_B8_2760GeV_cfi',U80by1)])
577 #steps['HydjetQ_B8_2760GeVINPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_B8_2760GeV/%s/GEN-SIM'%(baseDataSetRelease[x],),location='CAF')}
578 steps['QCD_Pt_80_120_13_HI']=merge([hiDefaults,steps['QCD_Pt_80_120_13']])
579 steps['PhotonJets_Pt_10_13_HI']=merge([hiDefaults,steps['PhotonJets_Pt_10_13']])
580 steps['ZMM_13_HI']=merge([hiDefaults,steps['ZMM_13']])
581 steps['ZEEMM_13_HI']=merge([hiDefaults,steps['ZEEMM_13']])
582 
583 
584 def changeRefRelease(steps,listOfPairs):
585  for s in steps:
586  if ('INPUT' in steps[s]):
587  oldD=steps[s]['INPUT'].dataSet
588  for (ref,newRef) in listOfPairs:
589  if ref in oldD:
590  steps[s]['INPUT'].dataSet=oldD.replace(ref,newRef)
591  if '--pileup_input' in steps[s]:
592  for (ref,newRef) in listOfPairs:
593  if ref in steps[s]['--pileup_input']:
594  steps[s]['--pileup_input']=steps[s]['--pileup_input'].replace(ref,newRef)
595 
596 def addForAll(steps,d):
597  for s in steps:
598  steps[s].update(d)
599 
600 
601 
602 #### fastsim section ####
603 ##no forseen to do things in two steps GEN-SIM then FASTIM->end: maybe later
604 step1FastDefaults =merge([{'-s':'GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,L1Reco,RECO,EI,HLT:@fake,VALIDATION',
605  '--fast':'',
606  '--beamspot' : 'Realistic8TeVCollision',
607  '--eventcontent':'FEVTDEBUGHLT,DQM',
608  '--datatier':'GEN-SIM-DIGI-RECO,DQMIO',
609  '--relval':'27000,3000'},
610  step1Defaults])
611 step1FastUpg2015Defaults =merge([{'-s':'GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,L1Reco,RECO,EI,HLT:@frozen25ns,VALIDATION',
612  '--fast':'',
613  '--conditions' :'auto:run2_mc',
614  '--beamspot' : 'NominalCollision2015',
615  '--magField' :'38T_PostLS1',
616  '--customise' :'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
617  '--eventcontent':'FEVTDEBUGHLT,DQM',
618  '--datatier':'GEN-SIM-DIGI-RECO,DQMIO',
619  '--relval':'27000,3000'},
620  step1Defaults])
621 step1FastPUNewMixing =merge([{'-s':'GEN,SIM,RECOBEFMIX',
622  '--eventcontent':'FASTPU',
623  '--datatier':'GEN-SIM-RECO'},
624  step1FastUpg2015Defaults])
625 
626 
627 #step1FastDefaults
628 steps['TTbarFS']=merge([{'cfg':'TTbar_8TeV_TuneCUETP8M1_cfi'},Kby(100,1000),step1FastDefaults])
629 steps['SingleMuPt1FS']=merge([{'cfg':'SingleMuPt1_pythia8_cfi'},step1FastDefaults])
630 steps['SingleMuPt10FS']=merge([{'cfg':'SingleMuPt10_pythia8_cfi'},step1FastDefaults])
631 steps['SingleMuPt100FS']=merge([{'cfg':'SingleMuPt100_pythia8_cfi'},step1FastDefaults])
632 steps['SinglePiPt1FS']=merge([{'cfg':'SinglePiPt1_pythia8_cfi'},step1FastDefaults])
633 steps['SinglePiPt10FS']=merge([{'cfg':'SinglePiPt10_pythia8_cfi'},step1FastDefaults])
634 steps['SinglePiPt100FS']=merge([{'cfg':'SinglePiPt100_pythia8_cfi'},step1FastDefaults])
635 steps['ZEEFS']=merge([{'cfg':'ZEE_8TeV_TuneCUETP8M1_cfi'},Kby(100,2000),step1FastDefaults])
636 steps['ZTTFS']=merge([{'cfg':'ZTT_Tauola_OneLepton_OtherHadrons_8TeV_TuneCUETP8M1_cfi'},Kby(100,2000),step1FastDefaults])
637 steps['QCDFlatPt153000FS']=merge([{'cfg':'QCDForPF_8TeV_TuneCUETP8M1_cfi'},Kby(27,2000),step1FastDefaults])
638 steps['QCD_Pt_80_120FS']=merge([{'cfg':'QCD_Pt_80_120_8TeV_TuneCUETP8M1_cfi'},Kby(100,500),stCond,step1FastDefaults])
639 steps['QCD_Pt_3000_3500FS']=merge([{'cfg':'QCD_Pt_3000_3500_8TeV_TuneCUETP8M1_cfi'},Kby(100,500),stCond,step1FastDefaults])
640 steps['H130GGgluonfusionFS']=merge([{'cfg':'H130GGgluonfusion_8TeV_TuneCUETP8M1_cfi'},step1FastDefaults])
641 steps['SingleGammaFlatPt10To10FS']=merge([{'cfg':'SingleGammaFlatPt10To100_pythia8_cfi'},Kby(100,500),step1FastDefaults])
642 
643 #step1FastUpg2015Defaults
644 steps['TTbarFS_13']=merge([{'cfg':'TTbar_13TeV_TuneCUETP8M1_cfi'},Kby(100,1000),step1FastUpg2015Defaults])
645 steps['SMS-T1tttt_mGl-1500_mLSP-100FS_13']=merge([{'cfg':'SMS-T1tttt_mGl-1500_mLSP-100_13TeV-pythia8_cfi'},Kby(100,1000),step1FastUpg2015Defaults])
646 steps['NuGunFS_UP15']=merge([{'cfg':'SingleNuE10_cfi'},Kby(100,1000),step1FastUpg2015Defaults])
647 steps['ZEEFS_13']=merge([{'cfg':'ZEE_13TeV_TuneCUETP8M1_cfi'},Kby(100,2000),step1FastUpg2015Defaults])
648 steps['ZTTFS_13']=merge([{'cfg':'ZTT_All_hadronic_13TeV_TuneCUETP8M1_cfi'},Kby(100,2000),step1FastUpg2015Defaults])
649 steps['ZMMFS_13']=merge([{'cfg':'ZMM_13TeV_TuneCUETP8M1_cfi'},Kby(100,2000),step1FastUpg2015Defaults])
650 steps['QCDFlatPt153000FS_13']=merge([{'cfg':'QCDForPF_13TeV_TuneCUETP8M1_cfi'},Kby(27,2000),step1FastUpg2015Defaults])
651 steps['QCD_Pt_80_120FS_13']=merge([{'cfg':'QCD_Pt_80_120_13TeV_TuneCUETP8M1_cfi'},Kby(100,500),step1FastUpg2015Defaults])
652 steps['QCD_Pt_3000_3500FS_13']=merge([{'cfg':'QCD_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi'},Kby(100,500),step1FastUpg2015Defaults])
653 steps['H130GGgluonfusionFS_13']=merge([{'cfg':'H130GGgluonfusion_13TeV_TuneCUETP8M1_cfi'},step1FastUpg2015Defaults])
654 steps['SingleMuPt10FS_UP15']=merge([{'cfg':'SingleMuPt10_pythia8_cfi'},step1FastUpg2015Defaults])
655 steps['SingleMuPt100FS_UP15']=merge([{'cfg':'SingleMuPt100_pythia8_cfi'},step1FastUpg2015Defaults])
656 
657 #step1FastPU
658 steps['MinBiasFS_13_ForMixing']=merge([{'cfg':'MinBias_13TeV_pythia8_TuneCUETP8M1_cfi'},Kby(100,1000),step1FastPUNewMixing])
659 
660 steps['TTbarSFS']=merge([{'cfg':'TTbar_8TeV_TuneCUETP8M1_cfi'},
661  {'-s':'GEN,SIM',
662  '--eventcontent':'FEVTDEBUG',
663  '--datatier':'GEN-SIM',
664  '--fast':''},
665  step1Defaults])
666 
667 steps['TTbarSFSA']=merge([{'cfg':'TTbar_8TeV_TuneCUETP8M1_cfi',
668  '-s':'GEN,SIM,RECO,EI,HLT:@fake,VALIDATION',
669  '--fast':''},
670  step1FastDefaults])
671 
672 def identityFS(wf):
673  return merge([{'--restoreRND':'HLT','--process':'HLT2','--hltProcess':'HLT2', '--inputCommands':'"keep *","drop *TagInfo*_*_*_*"'},wf])
674 
675 steps['SingleMuPt10FS_UP15_ID']=identityFS(steps['SingleMuPt10FS_UP15'])
676 steps['TTbarFS_13_ID']=identityFS(steps['TTbarFS_13'])
677 
678 step1GenDefaults=merge([{'-s':'GEN,VALIDATION:genvalid',
679  '--relval':'250000,20000',
680  '--eventcontent':'RAWSIM,DQM',
681  '--datatier':'GEN,DQMIO',
682  '--conditions':'auto:run2_mc_FULL'
683  },
684  step1Defaults])
685 
686 step1HadronizerDefaults=merge([{'--datatier':'GEN-SIM,DQMIO'},step1GenDefaults])
687 
688 step1LHEDefaults=merge([{'-s':'LHE',
689  '--relval':'200000,5000',
690  '--eventcontent':'LHE',
691  '--datatier':'GEN',
692  '--conditions':'auto:run2_mc_FULL'
693  },
694  step1Defaults])
695 
696 
697 def genvalid(fragment,d,suffix='all',fi='',dataSet=''):
698  import copy
699  c=copy.copy(d)
700  if suffix:
701  c['-s']=c['-s'].replace('genvalid','genvalid_'+suffix)
702  if fi:
703  c['--filein']='lhe:%d'%(fi,)
704  if dataSet:
705  c['--filein']='das:%s'%(dataSet,)
706  c['cfg']=fragment
707  return c
708 
709 
710 
711 steps['DYToll01234Jets_5f_LO_MLM_Madgraph_LHE_13TeV']=genvalid('Configuration/Generator/python/DYToll01234Jets_5f_LO_MLM_Madgraph_LHE_13TeV_cff.py',step1LHEDefaults)
712 # all 6 workflows with root step 'DYToll01234Jets_5f_LO_MLM_Madgraph_LHE_13TeV' will recycle the same dataset, from wf [512] of generator set
713 # steps['DYToll01234Jets_5f_LO_MLM_Madgraph_LHE_13TeVINPUT']={'INPUT':InputInfo(dataSet='/DYToll01234Jets_5f_LO_MLM_Madgraph_LHE_13TeV_py8/CMSSW_7_4_0_pre0-MCRUN2_73_V5-v1/GEN',location='STD')}
714 
715 steps['MinBias_TuneZ2star_13TeV_pythia6']=genvalid('MinBias_TuneZ2star_13TeV_pythia6_cff',step1GenDefaults)
716 steps['QCD_Pt-30_TuneZ2star_13TeV_pythia6']=genvalid('QCD_Pt_30_TuneZ2star_13TeV_pythia6_cff',step1GenDefaults)
717 steps['MinBias_13TeV_pythia8']=genvalid('MinBias_13TeV_pythia8_cff',step1GenDefaults)
718 steps['QCD_Pt-30_13TeV_pythia8']=genvalid('QCD_Pt_30_13TeV_pythia8_cff',step1GenDefaults)
719 
720 steps['DYToLL_M-50_13TeV_pythia8']=genvalid('DYToLL_M-50_13TeV_pythia8_cff',step1GenDefaults)
721 steps['WToLNu_13TeV_pythia8']=genvalid('WToLNu_13TeV_pythia8_cff',step1GenDefaults)
722 
723 steps['SoftQCDDiffractive_13TeV_pythia8']=genvalid('SoftQCDDiffractive_13TeV_pythia8_cff',step1GenDefaults)
724 steps['SoftQCDnonDiffractive_13TeV_pythia8']=genvalid('SoftQCDnonDiffractive_13TeV_pythia8_cff',step1GenDefaults)
725 steps['SoftQCDelastic_13TeV_pythia8']=genvalid('SoftQCDelastic_13TeV_pythia8_cff',step1GenDefaults)
726 steps['SoftQCDinelastic_13TeV_pythia8']=genvalid('SoftQCDinelastic_13TeV_pythia8_cff',step1GenDefaults)
727 
728 steps['QCD_Pt-30_8TeV_herwigpp']=genvalid('QCD_Pt_30_8TeV_herwigpp_cff',step1GenDefaults)
729 
730 # Generator Hadronization (Hadronization of LHE)
731 steps['WJetsLNu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
732 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_cff',step1HadronizerDefaults)
733 steps['GGToH_13TeV_pythia8']=genvalid('GGToHtautau_13TeV_pythia8_cff',step1GenDefaults)
734 
735 steps['WJetsLNutaupinu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taupinu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
736 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_taupinu']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_taupinu_cff',step1HadronizerDefaults)
737 steps['GGToHtaupinu_13TeV_pythia8']=genvalid('GGToHtautau_13TeV_pythia8_taupinu_cff',step1GenDefaults)
738 
739 steps['WJetsLNutaurhonu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taurhonu_cff.py',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
740 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_taurhonu']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_taurhonu_cff.py',step1HadronizerDefaults)
741 steps['GGToHtaurhonu_13TeV_pythia8']=genvalid('GGToHtautau_13TeV_pythia8_taurhonu_cff',step1GenDefaults)
742 
743 # Generator External Decays
744 steps['TT_13TeV_pythia8-evtgen']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_EvtGen_cff',step1GenDefaults,dataSet='/TTJets_MSDecaysCKM_central_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
745 
746 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola_cff',step1HadronizerDefaults)
747 steps['WToLNu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
748 steps['GGToH_13TeV_pythia8-tauola']=genvalid('GGToHtautau_13TeV_pythia8_Tauola_cff',step1GenDefaults)
749 
750 steps['WToLNutaupinu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taupinu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
751 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola_taupinu']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola_taupinu_cff',step1HadronizerDefaults)
752 steps['GGToHtaupinu_13TeV_pythia8-tauola']=genvalid('GGToHtautau_13TeV_pythia8_Tauola_taupinu_cff',step1GenDefaults)
753 
754 steps['WToLNutaurhonu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taurhonu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
755 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola_taurhonu']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola_taurhonu_cff',step1HadronizerDefaults)
756 steps['GGToHtaurhonu_13TeV_pythia8-tauola']=genvalid('GGToHtautau_13TeV_pythia8_Tauola_taurhonu_cff',step1GenDefaults)
757 
758 # Heavy Ion
759 steps['ReggeGribovPartonMC_EposLHC_5TeV_pPb']=genvalid('GeneratorInterface/ReggeGribovPartonMCInterface/ReggeGribovPartonMC_EposLHC_5TeV_pPb_cfi',step1GenDefaults)
760 
761 
762 
763 
764 #PU for FullSim
765 PU={'-n':10,'--pileup':'default','--pileup_input':'das:/RelValMinBias/%s/GEN-SIM'%(baseDataSetRelease[0],)}
766 # pu2 can be removed
767 PU2={'-n':10,'--pileup':'default','--pileup_input':'das:/RelValMinBias/%s/GEN-SIM'%(baseDataSetRelease[0],)}
768 PU25={'-n':10,'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(baseDataSetRelease[3],)}
769 PU50={'-n':10,'--pileup':'AVE_35_BX_50ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(baseDataSetRelease[3],)}
770 
771 
772 
773 #PU for FastSim
774 # FS_PU_INPUT_13TEV = "file:/afs/cern.ch/work/l/lveldere/minbias.root" # placeholder for relval to be produced with wf 135.8
775 PUFS={'--pileup':'GEN_2012_Summer_50ns_PoissonOOTPU'}
776 # PUFS2={'--pileup':'2012_Startup_50ns_PoissonOOTPU'} # not used anywhere
777 PUFSAVE10={'--pileup':'GEN_AVE_10_BX_25ns'} # temporary: one or a few releases as back-up
778 PUFSAVE20={'--pileup':'GEN_AVE_20_BX_25ns'} # temporary: one or a few releases as back-up
779 PUFSAVE35={'--pileup':'GEN_AVE_35_BX_25ns'}
780 PUFSAVE10_DRMIX_ITO={'--pileup':'AVE_10_BX_25ns','--pileup_input':'das:/RelValMinBiasFS_13_ForMixing/%s/GEN-SIM-RECO'%(baseDataSetRelease[7],),'--customise':'FastSimulation/Configuration/Customs.disableOOTPU,SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'}
781 PUFSAVE35_DRMIX_ITO={'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBiasFS_13_ForMixing/%s/GEN-SIM-RECO'%(baseDataSetRelease[7],),'--customise':'FastSimulation/Configuration/Customs.disableOOTPU,SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'}
782 PUFS25={'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBiasFS_13_ForMixing/%s/GEN-SIM-RECO'%(baseDataSetRelease[7],)}
783 
784 
785 #
786 steps['TTbarFSPU']=merge([PUFS,Kby(100,500),steps['TTbarFS']] )
787 
788 steps['FS_TTbar_13_PUAVE10']=merge([PUFSAVE10,Kby(100,500),steps['TTbarFS_13']] ) # temporary: one or a few releases as back-up
789 steps['FS_TTbar_13_PUAVE20']=merge([PUFSAVE20,Kby(100,500),steps['TTbarFS_13']] ) # temporary: one or a few releases as back-up
790 steps['FS_TTbar_13_PUAVE35']=merge([PUFSAVE35,Kby(100,500),steps['TTbarFS_13']] )
791 steps['FS_TTbar_13_PU25']=merge([PUFS25,Kby(100,500),steps['TTbarFS_13']] ) # needs the placeholder
792 steps['FS_NuGun_UP15_PU25']=merge([PUFS25,Kby(100,500),steps['NuGunFS_UP15']] ) # needs the placeholder
793 steps['FS_SMS-T1tttt_mGl-1500_mLSP-100_13_PU25']=merge([PUFS25,Kby(100,500),steps['SMS-T1tttt_mGl-1500_mLSP-100FS_13']] )
794 steps['FS_TTbar_13_PUAVE10_DRMIX_ITO']=merge([PUFSAVE10_DRMIX_ITO,Kby(100,500),steps['TTbarFS_13']] ) # needs the placeholder
795 steps['FS_TTbar_13_PUAVE35_DRMIX_ITO']=merge([PUFSAVE35_DRMIX_ITO,Kby(100,500),steps['TTbarFS_13']] ) # needs the placeholder
796 
797 # step2
798 step2Defaults = { '-s' : 'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:@fake,RAW2DIGI,L1Reco',
799  '--datatier' : 'GEN-SIM-DIGI-RAW-HLTDEBUG',
800  '--eventcontent': 'FEVTDEBUGHLT',
801  '--conditions' : 'auto:run1_mc',
802  }
803 #for 2015
804 step2Upg2015Defaults = {'-s' :'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:@frozen25ns,RAW2DIGI,L1Reco',
805  '--conditions' :'auto:run2_mc',
806  '--magField' :'38T_PostLS1',
807  '--datatier' :'GEN-SIM-DIGI-RAW-HLTDEBUG',
808  '--eventcontent':'FEVTDEBUGHLT',
809  '--customise' :'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
810  '-n' :'10'
811  }
812 step2Upg2015Defaults50ns = merge([{'-s':'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:@frozen50ns,RAW2DIGI,L1Reco','--conditions':'auto:run2_mc_50ns','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},step2Upg2015Defaults])
813 
814 steps['DIGIUP15']=merge([step2Upg2015Defaults])
815 steps['DIGIUP15PROD1']=merge([{'-s':'DIGI,L1,DIGI2RAW,HLT:@frozen25ns,RAW2DIGI,L1Reco','--eventcontent':'RAWSIM','--datatier':'GEN-SIM-RAW'},step2Upg2015Defaults])
816 steps['DIGIUP15_PU25']=merge([PU25,step2Upg2015Defaults])
817 steps['DIGIUP15_PU50']=merge([PU50,step2Upg2015Defaults50ns])
818 
819 steps['DIGIPROD1']=merge([{'-s':'DIGI,L1,DIGI2RAW,HLT:@fake,RAW2DIGI,L1Reco','--eventcontent':'RAWSIM','--datatier':'GEN-SIM-RAW'},step2Defaults])
820 steps['DIGI']=merge([step2Defaults])
821 #steps['DIGI2']=merge([stCond,step2Defaults])
822 steps['DIGICOS']=merge([{'--scenario':'cosmics','--eventcontent':'FEVTDEBUG','--datatier':'GEN-SIM-DIGI-RAW'},stCond,step2Defaults])
823 steps['DIGIHAL']=merge([{'--scenario':'cosmics','--eventcontent':'FEVTDEBUG','--datatier':'GEN-SIM-DIGI-RAW'},step2Upg2015Defaults])
824 
825 steps['DIGIPU1']=merge([PU,step2Defaults])
826 steps['DIGIPU2']=merge([PU2,step2Defaults])
827 steps['REDIGIPU']=merge([{'-s':'reGEN,reDIGI,L1,DIGI2RAW,HLT:@fake,RAW2DIGI,L1Reco'},steps['DIGIPU1']])
828 
829 steps['DIGIUP15_ID']=merge([{'--restoreRND':'HLT','--process':'HLT2'},steps['DIGIUP15']])
830 
831 steps['RESIM']=merge([{'-s':'reGEN,reSIM','-n':10},steps['DIGI']])
832 #steps['RESIMDIGI']=merge([{'-s':'reGEN,reSIM,DIGI,L1,DIGI2RAW,HLT:@fake,RAW2DIGI,L1Reco','-n':10,'--restoreRNDSeeds':'','--process':'HLT'},steps['DIGI']])
833 
834 
835 steps['DIGIHI']=merge([{'--conditions':'auto:run2_mc_HIon', '-s':'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:HIon,RAW2DIGI,L1Reco', '--inputCommands':'"keep *","drop *_simEcalPreshowerDigis_*_*"', '-n':2}, hiDefaults, step2Upg2015Defaults])
836 
837 
838 
839 # PRE-MIXING : https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideSimulation#Pre_Mixing_Instructions
840 premixUp2015Defaults = {
841  '--evt_type' : 'SingleNuE10_cfi',
842  '-s' : 'GEN,SIM,DIGIPREMIX,L1,DIGI2RAW',
843  '-n' : '10',
844  '--conditions' : 'auto:run2_mc', # 25ns GT; dedicated dict for 50ns
845  '--datatier' : 'GEN-SIM-DIGI-RAW',
846  '--eventcontent': 'PREMIX',
847  '--magField' : '38T_PostLS1',
848  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1' # temporary replacement for premix; to be brought back to customisePostLS1
849 }
850 premixUp2015Defaults50ns = merge([{'--conditions':'auto:run2_mc_50ns'},
851  {'--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},
852  premixUp2015Defaults])
853 
854 steps['PREMIXUP15_PU25']=merge([PU25,Kby(100,100),premixUp2015Defaults])
855 steps['PREMIXUP15_PU50']=merge([PU50,Kby(100,100),premixUp2015Defaults50ns])
856 
857 digiPremixUp2015Defaults25ns = {
858  '--conditions' : 'auto:run2_mc',
859  '-s' : 'DIGIPREMIX_S2:pdigi_valid,DATAMIX,L1,DIGI2RAW,HLT:@frozen25ns,RAW2DIGI,L1Reco',
860  '--pileup_input' : 'das:/RelValPREMIXUP15_PU25/%s/GEN-SIM-DIGI-RAW'%baseDataSetRelease[5],
861  '--eventcontent' : 'FEVTDEBUGHLT',
862  '--datatier' : 'GEN-SIM-DIGI-RAW-HLTDEBUG',
863  '--datamix' : 'PreMix',
864  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1CustomsPreMixing.customisePostLS1', # temporary replacement for premix; to be brought back to customisePostLS1
865  '--magField' : '38T_PostLS1',
866  }
867 digiPremixUp2015Defaults50ns=merge([{'-s':'DIGIPREMIX_S2:pdigi_valid,DATAMIX,L1,DIGI2RAW,HLT:@frozen50ns,RAW2DIGI,L1Reco'},
868  {'--conditions':'auto:run2_mc_50ns'},
869  {'--pileup_input' : 'das:/RelValPREMIXUP15_PU50/%s/GEN-SIM-DIGI-RAW'%baseDataSetRelease[6]},
870  {'--customise': 'SLHCUpgradeSimulations/Configuration/postLS1CustomsPreMixing.customisePostLS1_50ns'},
871  digiPremixUp2015Defaults25ns])
872 steps['DIGIPRMXUP15_PU25']=merge([digiPremixUp2015Defaults25ns])
873 steps['DIGIPRMXUP15_PU50']=merge([digiPremixUp2015Defaults50ns])
874 premixProd25ns = {'-s' : 'DIGIPREMIX_S2,DATAMIX,L1,DIGI2RAW,HLT:@frozen25ns,RAW2DIGI,L1Reco',
875  '--eventcontent' : 'PREMIXRAW',
876  '--datatier' : 'PREMIXRAW'}
877 premixProd50ns = merge([{'-s':'DIGIPREMIX_S2,DATAMIX,L1,DIGI2RAW,HLT:@frozen50ns,RAW2DIGI,L1Reco'},premixProd25ns])
878 
879 steps['DIGIPRMXUP15_PROD_PU25']=merge([premixProd25ns,digiPremixUp2015Defaults25ns])
880 steps['DIGIPRMXUP15_PROD_PU50']=merge([premixProd50ns,digiPremixUp2015Defaults50ns])
881 
882 dataReco={'--runUnscheduled':'',
883  '--conditions':'auto:run1_data',
884  '-s':'RAW2DIGI,L1Reco,RECO,EI,PAT,ALCA:SiStripCalZeroBias+SiStripCalMinBias+TkAlMinBias,DQM:@standardDQM+@miniAODDQM',
885  '--datatier':'RECO,MINIAOD,DQMIO',
886  '--eventcontent':'RECO,MINIAOD,DQM',
887  '--data':'',
888  '--process':'reRECO',
889  '--scenario':'pp',
890  }
891 
892 dataRecoAlCaEle=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,ALCA:SiStripCalZeroBias+SiStripCalMinBias+TkAlMinBias+EcalCalZElectron+EcalCalWElectron+EcalUncalZElectron+EcalUncalWElectron,DQM'}, dataReco])
893 
894 
895 hltKey='fake'
896 from Configuration.HLT.autoHLT import autoHLT
897 menu = autoHLT[hltKey]
898 steps['HLTD']=merge([{'--process':'reHLT',
899  '-s':'L1REPACK,HLT:@%s'%hltKey,
900  '--conditions':'auto:run1_hlt_%s'%menu,
901  '--data':'',
902  '--output':'\'[{"e":"RAW","t":"RAW","o":["drop FEDRawDataCollection_rawDataCollector__LHC"]}]\'',
903  },])
904 steps['HLTDSKIM']=merge([{'--inputCommands':'"keep *","drop *_*_*_RECO"'},steps['HLTD']])
905 
906 steps['RECOD']=merge([{'--scenario':'pp',},dataReco])
907 steps['RECODAlCaEle']=merge([{'--scenario':'pp',},dataRecoAlCaEle])
908 
909 steps['RECODSplit']=steps['RECOD'] # finer job splitting
910 steps['RECOSKIMALCA']=merge([{'--inputCommands':'"keep *","drop *_*_*_RECO"'
911  },steps['RECOD']])
912 steps['RECOSKIM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,DQM',
913  },steps['RECOSKIMALCA']])
914 
915 steps['REPACKHID']=merge([{'--scenario':'HeavyIons',
916  '-s':'RAW2DIGI,REPACK',
917  '--datatier':'RAW',
918  '--eventcontent':'REPACKRAW'},
919  steps['RECOD']])
920 steps['RECOHID10']=merge([{'--scenario':'HeavyIons',
921  '-s':'RAW2DIGI,L1Reco,RECO,ALCA:SiStripCalZeroBias+SiStripCalMinBias+TkAlMinBiasHI+HcalCalMinBias,DQM',
922  '--datatier':'RECO,DQMIO',
923  '--eventcontent':'RECO,DQM','-n':30},
924  steps['RECOD']])
925 steps['RECOHID11']=merge([{'--repacked':''},
926  steps['RECOHID10']])
927 steps['RECOHID10']['-s']+=',REPACK'
928 steps['RECOHID10']['--datatier']+=',RAW'
929 steps['RECOHID10']['--eventcontent']+=',REPACKRAW'
930 
931 steps['TIER0']=merge([{'--customise':'Configuration/DataProcessing/RecoTLR.customisePrompt',
932  '-s':'RAW2DIGI,L1Reco,RECO,EI,ALCAPRODUCER:@allForPrompt,DQM,ENDJOB',
933  '--datatier':'RECO,AOD,ALCARECO,DQMIO',
934  '--eventcontent':'RECO,AOD,ALCARECO,DQM',
935  '--process':'RECO'
936  },dataReco])
937 steps['TIER0EXP']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,ALCAPRODUCER:@allForExpress,DQM,ENDJOB',
938  '--datatier':'ALCARECO,DQMIO',
939  '--eventcontent':'ALCARECO,DQM',
940  '--customise':'Configuration/DataProcessing/RecoTLR.customiseExpress',
941  },steps['TIER0']])
942 
943 steps['RECOCOSD']=merge([{'--scenario':'cosmics',
944  '-s':'RAW2DIGI,L1Reco,RECO,DQM,ALCA:MuAlCalIsolatedMu+DtCalib',
945  '--datatier':'RECO,DQMIO', # no miniAOD for cosmics
946  '--eventcontent':'RECO,DQM',
947  '--customise':'Configuration/DataProcessing/RecoTLR.customiseCosmicData'
948  },dataReco])
949 
950 step2HImixDefaults=merge([{'-n':'2', #too slow for 10 events/hour
951  '--himix':'',
952  '--filein':'file.root',
953  '--process':'HISIGNAL'
954  },hiDefaults,step1Up2015Defaults])
955 steps['Pyquen_GammaJet_pt20_2760GeV']=merge([{'cfg':'Pyquen_GammaJet_pt20_2760GeV_cfi'},step2HImixDefaults])
956 steps['Pyquen_DiJet_pt80to120_2760GeV']=merge([{'cfg':'Pyquen_DiJet_pt80to120_2760GeV_cfi'},step2HImixDefaults])
957 steps['Pyquen_ZeemumuJets_pt10_2760GeV']=merge([{'cfg':'Pyquen_ZeemumuJets_pt10_2760GeV_cfi'},step2HImixDefaults])
958 
959 # step3
960 step3Defaults = {
961  '-s' : 'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM',
962  '--conditions' : 'auto:run1_mc',
963  '--no_exec' : '',
964  '--datatier' : 'GEN-SIM-RECO,DQMIO',
965  '--eventcontent': 'RECOSIM,DQM'
966  }
967 step3DefaultsAlCaEle=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,ALCA:EcalCalZElectron+EcalCalWElectron+EcalUncalZElectron+EcalUncalWElectron,VALIDATION,DQM'}, step3Defaults])
968 
969 steps['DIGIPU']=merge([{'--process':'REDIGI'},steps['DIGIPU1']])
970 
971 #for 2015
972 step3Up2015Defaults = {
973  #'-s':'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM',
974  '-s':'RAW2DIGI,L1Reco,RECO,EI,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@miniAODDQM',
975  '--runUnscheduled':'',
976  '--conditions':'auto:run2_mc',
977  '--magField' : '38T_PostLS1',
978  '-n':'10',
979  '--datatier':'GEN-SIM-RECO,MINIAODSIM,DQMIO',
980  '--eventcontent':'RECOSIM,MINIAODSIM,DQM',
981  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'
982  }
983 step3Up2015Defaults50ns = merge([{'--conditions':'auto:run2_mc_50ns','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},step3Up2015Defaults])
984 
985 step3Up2015DefaultsAlCaEle = merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,ALCA:EcalCalZElectron+EcalCalWElectron+EcalUncalZElectron+EcalUncalWElectron,VALIDATION,DQM'},step3Up2015Defaults])
986 step3Up2015DefaultsAlCaEle50ns = merge([{'--conditions':'auto:run2_mc_50ns','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},step3Up2015DefaultsAlCaEle])
987 
988 step3Up2015Hal = {'-s' :'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM',
989  '--conditions' :'auto:run2_mc',
990  '--magField' :'38T_PostLS1',
991  '--datatier' :'GEN-SIM-RECO,DQMIO',
992  '--eventcontent':'RECOSIM,DQM',
993  '-n' :'10',
994  '--customise' :'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'
995  }
996 
997 # mask away - to be removed once we'll migrate the matrix to be fully unscheduled for RECO step
998 #unSchOverrides={'--runUnscheduled':'','-s':'RAW2DIGI,L1Reco,RECO,EI,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@miniAODDQM','--eventcontent':'RECOSIM,MINIAODSIM,DQM','--datatier':'GEN-SIM-RECO,MINIAODSIM,DQMIO'}
999 #step3Up2015DefaultsUnsch = merge([unSchOverrides,step3Up2015Defaults])
1000 #step3DefaultsUnsch = merge([unSchOverrides,step3Defaults])
1001 
1002 steps['RECOUP15']=merge([step3Up2015Defaults]) # todo: remove UP from label
1003 steps['RECOUP15AlCaEle']=merge([step3Up2015DefaultsAlCaEle]) # todo: remove UP from label
1004 
1005 #steps['RECOUP15PROD1']=merge([{ '-s' : 'RAW2DIGI,L1Reco,RECO,EI,DQM:DQMOfflinePOGMC', '--datatier' : 'AODSIM,DQMIO', '--eventcontent' : 'AODSIM,DQM'},step3Up2015Defaults])
1006 
1007 steps['RECODreHLT']=merge([{'--hltProcess':'reHLT','--conditions':'auto:run1_data_%s'%menu},steps['RECOD']])
1008 steps['RECODreHLTAlCaEle']=merge([{'--hltProcess':'reHLT','--conditions':'auto:run1_data_%s'%menu},steps['RECODAlCaEle']])
1009 
1010 steps['RECO']=merge([step3Defaults])
1011 steps['RECOAlCaEle']=merge([step3DefaultsAlCaEle])
1012 steps['RECODBG']=merge([{'--eventcontent':'RECODEBUG,DQM'},steps['RECO']])
1013 steps['RECOPROD1']=merge([{ '-s' : 'RAW2DIGI,L1Reco,RECO,EI', '--datatier' : 'GEN-SIM-RECO,AODSIM', '--eventcontent' : 'RECOSIM,AODSIM'},step3Defaults])
1014 #steps['RECOPRODUP15']=merge([{ '-s':'RAW2DIGI,L1Reco,RECO,EI,DQM:DQMOfflinePOGMC','--datatier':'AODSIM,DQMIO','--eventcontent':'AODSIM,DQM'},step3Up2015Defaults])
1015 steps['RECOPRODUP15']=merge([{ '-s':'RAW2DIGI,L1Reco,RECO,EI,PAT,DQM:DQMOfflinePOGMC','--datatier':'AODSIM,MINIAODSIM,DQMIO','--eventcontent':'AODSIM,MINIAODSIM,DQM'},step3Up2015Defaults])
1016 steps['RECOCOS']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,ALCA:MuAlCalIsolatedMu,DQM','--scenario':'cosmics'},stCond,step3Defaults])
1017 steps['RECOHAL']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,ALCA:MuAlCalIsolatedMu,DQM','--scenario':'cosmics'},step3Up2015Hal])
1018 steps['RECOMIN']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,ALCA:SiStripCalZeroBias+SiStripCalMinBias,VALIDATION,DQM'},stCond,step3Defaults])
1019 steps['RECOMINUP15']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,ALCA:SiStripCalZeroBias+SiStripCalMinBias,VALIDATION,DQM'},step3Up2015Defaults])
1020 
1021 steps['RECODDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,DQM:@common+@muon+@hcal+@jetmet+@ecal'},steps['RECOD']])
1022 
1023 steps['RECOPU1']=merge([PU,steps['RECO']])
1024 steps['RECOPU2']=merge([PU2,steps['RECO']])
1025 steps['RECOUP15_PU25']=merge([PU25,step3Up2015Defaults])
1026 steps['RECOUP15_PU50']=merge([PU50,step3Up2015Defaults50ns])
1027 
1028 # mask away - to be removed once we'll migrate the matrix to be fully unscheduled for RECO step
1029 #steps['RECOmAOD']=merge([step3DefaultsUnsch])
1030 #steps['RECOmAODUP15']=merge([step3Up2015DefaultsUnsch])
1031 
1032 
1033 # for premixing: no --pileup_input for replay; GEN-SIM only available for in-time event, from FEVTDEBUGHLT previous step
1034 steps['RECOPRMXUP15_PU25']=merge([
1035  {'-s':'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM'},
1036  {'--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'}, # temporary replacement for premix; to be brought back to customisePostLS1
1037  step3Up2015Defaults])
1038 steps['RECOPRMXUP15_PU50']=merge([
1039  {'-s':'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM'},
1040  {'--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},
1041  step3Up2015Defaults50ns])
1042 
1043 recoPremixUp15prod = merge([
1044  #{'-s':'RAW2DIGI,L1Reco,RECO,EI'}, # tmp
1045  {'-s':'RAW2DIGI,L1Reco,RECO,EI,PAT,DQM:DQMOfflinePOGMC'},
1046  {'--datatier' : 'AODSIM,MINIAODSIM,DQMIO'},
1047  {'--eventcontent' : 'AODSIM,MINIAODSIM,DQMIO'},
1048  {'--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'}, # temporary replacement for premix; to be brought back to customisePostLS1
1049  step3Up2015Defaults])
1050 
1051 steps['RECOPRMXUP15PROD_PU25']=merge([
1052  recoPremixUp15prod])
1053 steps['RECOPRMXUP15PROD_PU50']=merge([
1054  {'--conditions':'auto:run2_mc_50ns'},
1055  {'--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},
1056  recoPremixUp15prod])
1057 
1058 
1059 steps['RECOPUDBG']=merge([{'--eventcontent':'RECODEBUG,DQM'},steps['RECOPU1']])
1060 steps['RERECOPU1']=merge([{'--hltProcess':'REDIGI'},steps['RECOPU1']])
1061 
1062 steps['RECOUP15_ID']=merge([{'--hltProcess':'HLT2'},steps['RECOUP15']])
1063 
1064 steps['RECOHI']=merge([hiDefaults,{'-s':'RAW2DIGI,L1Reco,RECO,VALIDATION,DQM'},step3Up2015Defaults])
1065 #wmsplit['RECOHI']=5
1066 
1067 steps['DIGIHISt3']=steps['DIGIHI']
1068 
1069 steps['RECOHID11St3']=merge([{
1070  '--process':'ZStoRECO'},
1071  steps['RECOHID11']])
1072 steps['RECOHIR10D11']=merge([{'--filein':'file:step2_inREPACKRAW.root',
1073  '--filtername':'reRECO'},
1074  steps['RECOHID11St3']])
1075 #steps['RECOFS']=merge([{'--fast':'',
1076 # '-s':'RECO,EI,HLT:@fake,VALIDATION'},
1077 # steps['RECO']])
1078 
1079 #add this line when testing from an input file that is not strictly GEN-SIM
1080 #addForAll(step3,{'--hltProcess':'DIGI'})
1081 
1082 steps['ALCACOSD']={'--conditions':'auto:run1_data',
1083  '--datatier':'ALCARECO',
1084  '--eventcontent':'ALCARECO',
1085  '--scenario':'cosmics',
1086  '-s':'ALCA:TkAlCosmics0T+MuAlGlobalCosmics+HcalCalHOCosmics+DQM'
1087  }
1088 steps['ALCAPROMPT']={'-s':'ALCA:PromptCalibProd',
1089  '--filein':'file:TkAlMinBias.root',
1090  '--conditions':'auto:run1_data',
1091  '--datatier':'ALCARECO',
1092  '--eventcontent':'ALCARECO'}
1093 steps['ALCAEXP']={'-s':'ALCA:PromptCalibProd+PromptCalibProdSiStrip+PromptCalibProdSiStripGains',
1094  '--conditions':'auto:run1_data',
1095  '--datatier':'ALCARECO',
1096  '--eventcontent':'ALCARECO'}
1097 
1098 # step4
1099 step4Defaults = {
1100  '-s' : 'ALCA:TkAlMuonIsolated+TkAlMinBias+HcalCalIsoTrk+MuAlOverlaps',
1101  '-n' : 1000,
1102  '--conditions' : 'auto:run1_mc',
1103  '--datatier' : 'ALCARECO',
1104  '--eventcontent': 'ALCARECO',
1105  }
1106 step4Up2015Defaults = {
1107  '-s' : 'ALCA:TkAlMuonIsolated+TkAlMinBias+HcalCalIsoTrk+MuAlOverlaps',
1108  '-n' : 1000,
1109  '--conditions' : 'auto:run2_mc',
1110  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1111  '--datatier' : 'ALCARECO',
1112  '--eventcontent': 'ALCARECO',
1113  }
1114 
1115 steps['RERECOPU']=steps['RERECOPU1']
1116 
1117 steps['ALCATT']=merge([{'--filein':'file:step3.root'},step4Defaults])
1118 steps['ALCATTUp15']=merge([{'--filein':'file:step3.root'},step4Up2015Defaults])
1119 steps['ALCAMIN']=merge([{'-s':'ALCA:TkAlMinBias','--filein':'file:step3.root'},stCond,step4Defaults])
1120 steps['ALCACOS']=merge([{'-s':'ALCA:TkAlCosmics0T+MuAlGlobalCosmics+HcalCalHOCosmics'},stCond,step4Defaults])
1121 steps['ALCABH']=merge([{'-s':'ALCA:TkAlBeamHalo+MuAlBeamHaloOverlaps+MuAlBeamHalo'},stCond,step4Defaults])
1122 steps['ALCAHAL']=merge([{'-s':'ALCA:TkAlBeamHalo+MuAlBeamHaloOverlaps+MuAlBeamHalo'},step4Up2015Defaults])
1123 
1124 steps['ALCAHARVD']={'-s':'ALCAHARVEST:BeamSpotByRun+BeamSpotByLumi+SiStripQuality',
1125  '--conditions':'auto:run1_data',
1126  '--scenario':'pp',
1127  '--data':'',
1128  '--filein':'file:PromptCalibProd.root'}
1129 
1130 
1131 steps['ALCAHARVD1']={'-s':'ALCAHARVEST:BeamSpotByRun+BeamSpotByLumi+SiStripQuality',
1132  '--conditions':'auto:run1_data',
1133  '--scenario':'pp',
1134  '--data':'',
1135  '--filein':'file:PromptCalibProd.root'}
1136 
1137 steps['ALCAHARVD2']={'-s':'ALCAHARVEST:SiStripQuality',
1138  '--conditions':'auto:run1_data',
1139  '--scenario':'pp',
1140  '--data':'',
1141  '--filein':'file:PromptCalibProdSiStrip.root'}
1142 
1143 steps['ALCAHARVD3']={'-s':'ALCAHARVEST:SiStripGains',
1144  '--conditions':'auto:run1_data',
1145  '--scenario':'pp',
1146  '--data':'',
1147  '--filein':'file:PromptCalibProdSiStripGains.root'}
1148 
1149 
1150 steps['RECOHISt4']=steps['RECOHI']
1151 
1152 steps['ALCANZS']=merge([{'-s':'ALCA:HcalCalMinBias','--mc':''},step4Defaults])
1153 steps['HARVESTGEN']={'-s':'HARVESTING:genHarvesting',
1154  '--harvesting':'AtJobEnd',
1155  '--conditions':'auto:run2_mc_FULL',
1156  '--mc':'',
1157  '--customise' :'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1158  '--filetype':'DQM',
1159  '--filein':'file:step1_inDQM.root'
1160  }
1161 
1162 steps['HARVESTGEN2']=merge([{'--filein':'file:step2_inDQM.root'},steps['HARVESTGEN']])
1163 
1164 
1165 #data
1166 steps['HARVESTD']={'-s':'HARVESTING:dqmHarvesting',
1167  '--conditions':'auto:run1_data',
1168  '--data':'',
1169  '--filetype':'DQM',
1170  '--scenario':'pp'}
1171 
1172 steps['HARVESTDreHLT'] = merge([ {'--conditions':'auto:run1_data_%s'%menu}, steps['HARVESTD'] ])
1173 
1174 steps['HARVESTDDQM']=merge([{'-s':'HARVESTING:@common+@muon+@hcal+@jetmet+@ecal'},steps['HARVESTD']])
1175 
1176 steps['HARVESTDfst2']=merge([{'--filein':'file:step2_inDQM.root'},steps['HARVESTD']])
1177 
1178 steps['HARVESTDC']={'-s':'HARVESTING:dqmHarvesting',
1179  '--conditions':'auto:run1_data',
1180  '--filetype':'DQM',
1181  '--data':'',
1182  '--filein':'file:step2_inDQM.root',
1183  '--scenario':'cosmics'}
1184 steps['HARVESTDHI']={'-s':'HARVESTING:dqmHarvesting',
1185  '--conditions':'auto:run1_data',
1186  '--filetype':'DQM',
1187  '--data':'',
1188  '--scenario':'HeavyIons'}
1189 
1190 #MC
1191 steps['HARVEST']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting',
1192  '--conditions':'auto:run1_mc',
1193  '--mc':'',
1194  '--filetype':'DQM',
1195  '--scenario':'pp'}
1196 steps['HARVESTCOS']={'-s':'HARVESTING:dqmHarvesting',
1197  '--conditions':'auto:run1_mc',
1198  '--mc':'',
1199  '--filein':'file:step3_inDQM.root',
1200  '--filetype':'DQM',
1201  '--scenario':'cosmics'}
1202 steps['HARVESTHAL']={'-s' :'HARVESTING:dqmHarvesting',
1203  '--conditions':'auto:run2_mc',
1204  '--magField' :'38T_PostLS1',
1205  '--mc' :'',
1206  '--filein' :'file:step3_inDQM.root',
1207  '--scenario' :'cosmics',
1208  '--filein':'file:step3_inDQM.root', # unnnecessary
1209  '--filetype':'DQM',
1210  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1211  }
1212 steps['HARVESTFS']={'-s':'HARVESTING:validationHarvestingFS',
1213  '--conditions':'auto:run1_mc',
1214  '--mc':'',
1215  '--filetype':'DQM',
1216  '--scenario':'pp'}
1217 steps['HARVESTHI']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting',
1218  '--conditions':'auto:run2_mc_HIon',
1219  '--magField' : '38T_PostLS1',
1220  '--mc':'',
1221  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_HI',
1222  '--filetype':'DQM',
1223  '--scenario':'HeavyIons'}
1224 steps['HARVESTUP15']={
1225  # '-s':'HARVESTING:validationHarvesting+dqmHarvesting', # todo: remove UP from label
1226  '-s':'HARVESTING:@standardValidation+@standardDQM+@miniAODValidation+@miniAODDQM', # todo: remove UP from label
1227  '--conditions':'auto:run2_mc',
1228  '--magField' : '38T_PostLS1',
1229  '--mc':'',
1230  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1231  '--filetype':'DQM',
1232  }
1233 
1234 
1235 steps['HARVESTUP15_PU25']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting', # todo: remove UP from label
1236  '--conditions':'auto:run2_mc',
1237  '--magField' : '38T_PostLS1',
1238  '--mc':'',
1239  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1240  '--filetype':'DQM',
1241  }
1242 
1243 steps['HARVESTUP15_PU50']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting', # todo: remove UP from label
1244  '--conditions':'auto:run2_mc_50ns',
1245  '--magField' : '38T_PostLS1',
1246  '--mc':'',
1247  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1248  '--filetype':'DQM',
1249  }
1250 
1251 # unSchHarvestOverrides={'-s':'HARVESTING:@standardValidation+@standardDQM+@miniAODValidation+@miniAODDQM'}
1252 # steps['HARVESTmAODUP15']=merge([unSchHarvestOverrides,steps['HARVESTUP15']])
1253 
1254 steps['HARVESTUP15FS']={'-s':'HARVESTING:validationHarvestingFS',
1255  '--conditions':'auto:run2_mc',
1256  '--mc':'',
1257  '--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1258  '--filetype':'DQM',
1259  '--scenario':'pp'}
1260 
1261 
1262 steps['ALCASPLIT']={'-s':'ALCAOUTPUT:@allForPrompt',
1263  '--conditions':'auto:run1_data',
1264  '--scenario':'pp',
1265  '--data':'',
1266  '--triggerResultsProcess':'RECO',
1267  '--filein':'file:step2_inALCARECO.root'}
1268 
1269 steps['SKIMD']={'-s':'SKIM:all',
1270  '--conditions':'auto:run1_data',
1271  '--data':'',
1272  '--scenario':'pp',
1273  '--filein':'file:step2.root',
1274  '--secondfilein':'filelist:step1_dasquery.log'}
1275 
1276 steps['SKIMDreHLT'] = merge([ {'--conditions':'auto:run1_data_%s'%menu,'--filein':'file:step3.root'}, steps['SKIMD'] ])
1277 
1278 steps['SKIMCOSD']={'-s':'SKIM:all',
1279  '--conditions':'auto:run1_data',
1280  '--data':'',
1281  '--scenario':'cosmics',
1282  '--filein':'file:step2.root',
1283  '--secondfilein':'filelist:step1_dasquery.log'}
1284 
1285 steps['RECOFROMRECO']=merge([{'-s':'RECO,EI',
1286  '--filtername':'RECOfromRECO',
1287  '--process':'reRECO',
1288  '--datatier':'AODSIM',
1289  '--eventcontent':'AODSIM',
1290  },
1291  stCond,step3Defaults])
1292 
1293 
1294 steps['RECOFROMRECOSt2']=steps['RECOFROMRECO']
1295 
1296 steps['RECODFROMRAWRECO']=merge([{'-s':'RAW2DIGI:RawToDigi_noTk,L1Reco,RECO:reconstruction_noTracking,EI',
1297  '--filtername':'RECOfromRAWRECO',
1298  '--process':'rereRECO',
1299  '--datatier':'AOD',
1300  '--eventcontent':'AOD',
1301  '--secondfilein':'filelist:step1_dasquery.log',
1302  },
1303  steps['RECOD']])
1304 
1305 
1306 steps['COPYPASTE']={'-s':'NONE',
1307  '--conditions':'auto:run1_mc',
1308  '--output':'\'[{"t":"RAW","e":"ALL"}]\'',
1309  '--customise_commands':'"process.ALLRAWoutput.fastCloning=cms.untracked.bool(False)"'}
1310 
1311 #miniaod
1312 stepMiniAODDefaults = { '-s' : 'PAT',
1313  '--runUnscheduled': '',
1314  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1315  '-n' : '100'
1316  }
1317 stepMiniAODDataUP15 = merge([{'--conditions' : 'auto:run1_data',
1318  '--data' : '',
1319  '--datatier' : 'MINIAOD',
1320  '--eventcontent' : 'MINIAOD',
1321  '--filein' :'file:step3.root'
1322  },stepMiniAODDefaults])
1323 
1324 stepMiniAODData = remove(stepMiniAODDataUP15,'--customise')
1325 
1326 stepMiniAODMC = merge([{'--conditions' : 'auto:run2_mc',
1327  '--mc' : '',
1328  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1329  '--datatier' : 'MINIAODSIM',
1330  '--eventcontent' : 'MINIAODSIM',
1331  '--filein' :'file:step3.root'
1332  },stepMiniAODDefaults])
1333 
1334 #steps['MINIAODDATA'] =merge([stepMiniAODData])
1335 #steps['MINIAODDreHLT'] =merge([{'--conditions':'auto:run1_data_%s'%menu},stepMiniAODData])
1336 #steps['MINIAODDATAs2'] =merge([{'--filein':'file:step2.root'},stepMiniAODData])
1337 #steps['MINIAODMCUP15'] =merge([stepMiniAODMC])
1338 #steps['MINIAODMCUP1550'] =merge([{'--conditions':'auto:run2_mc_50ns','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},stepMiniAODMC])
1339 #steps['MINIAODMCUP15HI'] =merge([{'--conditions':'auto:run2_mc_HIon','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_HI'},stepMiniAODMC])
1340 steps['MINIAODMCUP15FS'] =merge([{'--filein':'file:step1.root','--fast':''},stepMiniAODMC])
1341 steps['MINIAODMCUP15FS50'] =merge([{'--conditions':'auto:run2_mc_50ns','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},steps['MINIAODMCUP15FS']])
1342 
1343 
1344 #################################################################################
1345 ####From this line till the end of the file :
1346 ####UPGRADE WORKFLOWS IN PREPARATION - Gaelle's sandbox -
1347 #####Accessible only through the option --what upgrade
1348 #####therefore not run in IBs (at some they might be...)
1349 #####Transparent for any of the standard workflows
1350 #### list of worflows defined (not necessarly running though): runTheMatrix.py --what upgrade -n
1351 ####
1352 ###
1353 #################################################################################
1354 
1356 
1357 defaultDataSets={}
1358 defaultDataSets['Extended2023HGCalMuon']='CMSSW_6_2_0_SLHC20_patch1-DES23_62_V1_refHGCALV5-v'
1359 defaultDataSets['Extended2023SHCalNoTaper']='CMSSW_6_2_0_SLHC20_patch1-DES23_62_V1_refSHNoTaper-v'
1360 defaultDataSets['2019WithGEMAging']='CMSSW_6_2_0_SLHC20-DES19_62_V8_UPG2019withGEM-v'
1361 keys=defaultDataSets.keys()
1362 for key in keys:
1363  defaultDataSets[key+'PU']=defaultDataSets[key]
1364 
1365 # sometimes v1 won't be used - override it here - the dictionary key is gen fragment + '_' + geometry
1366 versionOverrides={}
1367 
1368 baseDataSetReleaseBetter={}
1369 for gen in upgradeFragments:
1370  for ds in defaultDataSets:
1371  key=gen[:-4]+'_'+ds
1372  version='1'
1373  if key in versionOverrides:
1374  version = versionOverrides[key]
1375  baseDataSetReleaseBetter[key]=defaultDataSets[ds]+version
1376 
1377 PUDataSets={}
1378 for ds in defaultDataSets:
1379  key='MinBias_TuneZ2star_14TeV_pythia6'+'_'+ds
1380  name=baseDataSetReleaseBetter[key]
1381  PUDataSets[ds]={'-n':10,'--pileup':'AVE_140_BX_25ns','--pileup_input':'das:/RelValMinBias_TuneZ2star_14TeV/%s/GEN-SIM'%(name,)}
1382 
1383 
1384 upgradeStepDict={}
1385 for step in upgradeSteps:
1386  upgradeStepDict[step]={}
1387 
1388 # just make all combinations - yes, some will be nonsense.. but then these are not used unless
1389 # specified above
1390 for k in upgradeKeys:
1391  k2=k
1392  if 'PU' in k[-2:]:
1393  k2=k[:-2]
1394  geom=upgradeGeoms[k2]
1395  gt=upgradeGTs[k2]
1396  cust=upgradeCustoms[k2]
1397  upgradeStepDict['GenSimFull'][k]= {'-s' : 'GEN,SIM',
1398  '-n' : 10,
1399  '--conditions' : gt,
1400  '--beamspot' : 'Gauss',
1401  '--magField' : '38T_PostLS1',
1402  '--datatier' : 'GEN-SIM',
1403  '--eventcontent': 'FEVTDEBUG',
1404  '--geometry' : geom
1405  }
1406  if cust!=None : upgradeStepDict['GenSimFull'][k]['--customise']=cust
1407 
1408  upgradeStepDict['GenSimHLBeamSpotFull'][k]= {'-s' : 'GEN,SIM',
1409  '-n' : 10,
1410  '--conditions' : gt,
1411  '--beamspot' : 'HLLHC',
1412  '--magField' : '38T_PostLS1',
1413  '--datatier' : 'GEN-SIM',
1414  '--eventcontent': 'FEVTDEBUG',
1415  '--geometry' : geom
1416  }
1417  if cust!=None : upgradeStepDict['GenSimHLBeamSpotFull'][k]['--customise']=cust
1418 
1419  upgradeStepDict['DigiFull'][k] = {'-s':'DIGI:pdigi_valid,L1,DIGI2RAW',
1420  '--conditions':gt,
1421  '--datatier':'GEN-SIM-DIGI-RAW',
1422  '-n':'10',
1423  '--magField' : '38T_PostLS1',
1424  '--eventcontent':'FEVTDEBUGHLT',
1425  '--geometry' : geom
1426  }
1427  if cust!=None : upgradeStepDict['DigiFull'][k]['--customise']=cust
1428 
1429  upgradeStepDict['DigiFullTrigger'][k] = {'-s':'DIGI:pdigi_valid,L1,L1TrackTrigger,DIGI2RAW',
1430  '--conditions':gt,
1431  '--datatier':'GEN-SIM-DIGI-RAW',
1432  '-n':'10',
1433  '--magField' : '38T_PostLS1',
1434  '--eventcontent':'FEVTDEBUGHLT',
1435  '--geometry' : geom
1436  }
1437  if cust!=None : upgradeStepDict['DigiFullTrigger'][k]['--customise']=cust
1438 
1439 
1440  if k2 in PUDataSets:
1441  upgradeStepDict['DigiFullPU'][k]=merge([PUDataSets[k2],upgradeStepDict['DigiFull'][k]])
1442  upgradeStepDict['DigiTrkTrigFull'][k] = {'-s':'DIGI:pdigi_valid,L1,L1TrackTrigger,DIGI2RAW,RECO:pixeltrackerlocalreco',
1443  '--conditions':gt,
1444  '--datatier':'GEN-SIM-DIGI-RAW',
1445  '-n':'10',
1446  '--magField' : '38T_PostLS1',
1447  '--eventcontent':'FEVTDEBUGHLT',
1448  '--geometry' : geom
1449  }
1450  if cust!=None : upgradeStepDict['DigiTrkTrigFull'][k]['--customise']=cust
1451 
1452  upgradeStepDict['RecoFull'][k] = {'-s':'RAW2DIGI,L1Reco,RECO,VALIDATION,DQM',
1453  '--conditions':gt,
1454  '--datatier':'GEN-SIM-RECO,DQMIO',
1455  '-n':'10',
1456  '--eventcontent':'FEVTDEBUGHLT,DQM',
1457  '--magField' : '38T_PostLS1',
1458  '--geometry' : geom
1459  }
1460  if cust!=None : upgradeStepDict['RecoFull'][k]['--customise']=cust
1461 
1462  if k2 in PUDataSets:
1463  upgradeStepDict['RecoFullPU'][k]=merge([PUDataSets[k2],{'-s':'RAW2DIGI,L1Reco,RECO,DQM'},upgradeStepDict['RecoFull'][k]])
1464 
1465  upgradeStepDict['RecoFullHGCAL'][k] = {'-s':'RAW2DIGI,L1Reco,RECO',
1466  '--conditions':gt,
1467  '--datatier':'GEN-SIM-RECO',
1468  '-n':'10',
1469  '--eventcontent':'RECOSIM',
1470  '--magField' : '38T_PostLS1',
1471  '--geometry' : geom
1472  }
1473  if cust!=None : upgradeStepDict['RecoFullHGCAL'][k]['--customise']=cust
1474 
1475  if k2 in PUDataSets:
1476  upgradeStepDict['RecoFullPUHGCAL'][k]=merge([PUDataSets[k2],{'-s':'RAW2DIGI,L1Reco,RECO'},upgradeStepDict['RecoFullHGCAL'][k]])
1477 
1478  upgradeStepDict['HARVESTFull'][k]={'-s':'HARVESTING:validationHarvesting+dqmHarvesting',
1479  '--conditions':gt,
1480  '--mc':'',
1481  '--magField' : '38T_PostLS1',
1482  '--geometry' : geom,
1483  '--scenario' : 'pp',
1484  '--filetype':'DQM'
1485  }
1486  if cust!=None : upgradeStepDict['HARVESTFull'][k]['--customise']=cust
1487 
1488  if k2 in PUDataSets:
1489  upgradeStepDict['HARVESTFullPU'][k]=merge([PUDataSets[k2],{'-s':'HARVESTING:dqmHarvesting'},upgradeStepDict['HARVESTFull'][k]])
1490 
1491  upgradeStepDict['FastSim'][k]={'-s':'GEN,SIM,RECO,VALIDATION',
1492  '--eventcontent':'FEVTDEBUGHLT,DQM',
1493  '--datatier':'GEN-SIM-DIGI-RECO,DQMIO',
1494  '--conditions':gt,
1495  '--fast':'',
1496  '--geometry' : geom,
1497  '--relval':'27000,3000'}
1498  if cust!=None : upgradeStepDict['FastSim'][k]['--customise']=cust
1499 
1500  upgradeStepDict['HARVESTFast'][k]={'-s':'HARVESTING:validationHarvestingFS',
1501  '--conditions':gt,
1502  '--mc':'',
1503  '--magField' : '38T_PostLS1',
1504  '--geometry' : geom,
1505  '--scenario' : 'pp'
1506  }
1507  if cust!=None : upgradeStepDict['HARVESTFast'][k]['--customise']=cust
1508 
1509 
1510 
1511 
1512 for step in upgradeSteps:
1513  # we need to do this for each fragment
1514  if 'Sim' in step:
1515  for frag in upgradeFragments:
1516  howMuch=howMuches[frag]
1517  for key in upgradeKeys:
1518  k=frag[:-4]+'_'+key+'_'+step
1519  steps[k]=merge([ {'cfg':frag},howMuch,upgradeStepDict[step][key]])
1520  #get inputs in case of -i...but no need to specify in great detail
1521  #however, there can be a conflict of beam spots but this is lost in the dataset name
1522  #so please be careful
1523  s=frag[:-4]+'_'+key
1524  if 'FastSim' not in k and s+'INPUT' not in steps and s in baseDataSetReleaseBetter:
1525  steps[k+'INPUT']={'INPUT':InputInfo(dataSet='/RelVal'+frag[:-4]+'/%s/GEN-SIM'%(baseDataSetReleaseBetter[s],),location='STD')}
1526  else:
1527  for key in upgradeKeys:
1528  k=step+'_'+key
1529  if step in upgradeStepDict and key in upgradeStepDict[step]:
1530  steps[k]=merge([upgradeStepDict[step][key]])
1531 
Definition: merge.py:1
def changeRefRelease
def identitySim
Production test: 13 TeV equivalents.
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
From this line till the end of the file : UPGRADE WORKFLOWS IN PREPARATION - Gaelle&#39;s sandbox - Acces...
list object
Definition: dbtoconf.py:77
#define update(a, b)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run