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))
317 steps['QCD_FlatPt_15_3000_13']=gen2015('QCDForPF_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
318 steps['QCD_FlatPt_15_3000HS_13']=gen2015('QCDForPF_13TeV_TuneCUETP8M1_cfi',Kby(50,100))
319 
320 steps['ZpMM_2250_8TeV']=gen('ZpMM_2250_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
321 steps['ZpEE_2250_8TeV']=gen('ZpEE_2250_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
322 steps['ZpTT_1500_8TeV']=gen('ZpTT_1500_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
323 steps['ZpMM_2250_13TeV']=gen2015('ZpMM_2250_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
324 steps['ZpEE_2250_13TeV']=gen2015('ZpEE_2250_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
325 steps['ZpTT_1500_13TeV']=gen2015('ZpTT_1500_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
326 steps['HSCPstop_M_200_13TeV']=gen2015('HSCPstop_M_200_TuneCUETP8M1_13TeV_pythia8_cff',Kby(9,100))
327 steps['RSGravitonToGaGa_13TeV']=gen2015('RSGravitonToGammaGamma_kMpl01_M_3000_TuneCUETP8M1_13TeV_pythia8_cfi',Kby(9,100))
328 steps['WpToENu_M-2000_13TeV']=gen2015('WprimeToENu_M-2000_TuneCUETP8M1_13TeV-pythia8_cff',Kby(9,100))
329 
330 def identitySim(wf):
331  return merge([{'--restoreRND':'SIM','--process':'SIM2', '--inputCommands':'"keep *","drop *TagInfo*_*_*_*"' },wf])
332 
333 steps['SingleMuPt10_UP15_ID']=identitySim(steps['SingleMuPt10_UP15'])
334 steps['TTbar_13_ID']=identitySim(steps['TTbar_13'])
335 
336 baseDataSetRelease=[
337  'CMSSW_7_1_0_pre7-PRE_STA71_V3-v1', # 0 run1 samples; keep GEN-SIM fixed to 710_pre7, for samples not routinely produced
338  'CMSSW_7_4_0_pre7-MCHI2_74_V3-v1', # 1 Run1 HI GEN-SIM (only MB = wf 140)
339  'CMSSW_6_2_0_pre8-PRE_ST62_V8_FastSim-v1', # 2 for fastsim id test
340 # '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)
341  # THIS ABOVE IS NOT USED, AT THE MOMENT
342  '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
343  'CMSSW_7_3_0_pre1-PRE_LS172_V15_FastSim-v1', # 4 - fast sim GEN-SIM-DIGI-RAW-HLTDEBUG for id tests
344  'CMSSW_7_4_0_pre9_ROOT6-PU25ns_MCRUN2_74_V7-v1', # 6 - premix
345  'CMSSW_7_4_0_pre9_ROOT6-PU50ns_MCRUN2_74_V6-v1' # 7 - premix
346  ]
347 
348 # note: INPUT commands to be added once GEN-SIM w/ 13TeV+PostLS1Geo will be available
349 steps['MinBiasINPUT']={'INPUT':InputInfo(dataSet='/RelValMinBias/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')} #was [0]
350 steps['QCD_Pt_3000_3500INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_3000_3500/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
351 steps['QCD_Pt_600_800INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_600_800/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
352 steps['QCD_Pt_80_120INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_80_120/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
353 steps['SingleElectronPt10INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt10/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
354 steps['SingleElectronPt1000INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt1000/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
355 steps['SingleElectronPt35INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt35/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
356 steps['SingleGammaPt10INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleGammaPt10/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
357 steps['SingleGammaPt35INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleGammaPt35/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
358 steps['SingleMuPt1INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt1/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
359 steps['SingleMuPt10INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt10/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
360 steps['SingleMuPt10_UP15IDINPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt10_UP15/%s/GEN-SIM-DIGI-RAW-HLTDEBUG'%(baseDataSetRelease[3],),location='STD',split=1)}
361 steps['SingleMuPt10_UP15FSIDINPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt10/%s/GEN-SIM-DIGI-RECO'%(baseDataSetRelease[4],),location='STD',split=1)}
362 steps['SingleMuPt100INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt100/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
363 steps['SingleMuPt1000INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt1000/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
364 steps['TTbarINPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
365 steps['TTbar_13IDINPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar_13/%s/GEN-SIM-DIGI-RAW-HLTDEBUG'%(baseDataSetRelease[3],),location='STD',split=1)}
366 steps['TTbar_13FSIDINPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar_13/%s/GEN-SIM-DIGI-RECO'%(baseDataSetRelease[4],),location='STD',split=1)}
367 steps['TTbarLeptonINPUT']={'INPUT':InputInfo(dataSet='/RelValTTbarLepton/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
368 steps['OldTTbarINPUT']={'INPUT':InputInfo(dataSet='/RelValProdTTbar/CMSSW_5_0_0_pre6-START50_V5-v1/GEN-SIM-RECO',location='STD')}
369 steps['OldGenSimINPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar/CMSSW_4_4_2-START44_V7-v1/GEN-SIM-DIGI-RAW-HLTDEBUG',location='STD')}
370 steps['Wjet_Pt_80_120INPUT']={'INPUT':InputInfo(dataSet='/RelValWjet_Pt_80_120/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
371 steps['Wjet_Pt_3000_3500INPUT']={'INPUT':InputInfo(dataSet='/RelValWjet_Pt_3000_3500/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
372 steps['LM1_sftsINPUT']={'INPUT':InputInfo(dataSet='/RelValLM1_sfts/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
373 steps['QCD_FlatPt_15_3000INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_FlatPt_15_3000/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
374 
375 steps['QCD_FlatPt_15_3000HSINPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_FlatPt_15_3000HS/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
376 steps['TTbar__DIGIPU1INPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar/CMSSW_5_2_2-PU_START52_V4_special_120326-v1/GEN-SIM-DIGI-RAW-HLTDEBUG',location='STD')}
377 
378 # 13 TeV recycle GEN-SIM input
379 steps['MinBias_13INPUT']={'INPUT':InputInfo(dataSet='/RelValMinBias_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
380 steps['QCD_Pt_3000_3500_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_3000_3500_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
381 steps['QCD_Pt_600_800_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_600_800_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
382 steps['QCD_Pt_80_120_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_80_120_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
383 steps['QCD_Pt_80_120_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_80_120_13_HI/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD')}
384 steps['TTbar_13INPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
385 steps['TTbarLepton_13INPUT']={'INPUT':InputInfo(dataSet='/RelValTTbarLepton_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
386 steps['ZEE_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZEE_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
387 steps['Wjet_Pt_80_120_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWjet_Pt_80_120_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
388 steps['Wjet_Pt_3000_3500_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWjet_Pt_3000_3500_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
389 steps['LM1_sfts_13INPUT']={'INPUT':InputInfo(dataSet='/RelValLM1_sfts_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
390 steps['QCD_FlatPt_15_3000_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_FlatPt_15_3000_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
391 steps['QCD_FlatPt_15_3000HS_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_FlatPt_15_3000HS_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
392 steps['ZpMM_2250_13TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpMM_2250_13TeV/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
393 steps['ZpEE_2250_13TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpEE_2250_13TeV/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
394 steps['ZpTT_1500_13TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpTT_1500_13TeV/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
395 steps['MinBiasHS_13INPUT']={'INPUT':InputInfo(dataSet='/RelValMinBiasHS_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
396 steps['Higgs200ChargedTaus_13INPUT']={'INPUT':InputInfo(dataSet='/RelValHiggs200ChargedTaus_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
397 
398 # activate GEN-SIM recycling once we'll have the first set of gen-sim
399 steps['Upsilon1SToMuMu_13INPUT']={'INPUT':InputInfo(dataSet='/RelValUpsilon1SToMuMu_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
400 steps['BuToKstarMuMu_13INPUT']={'INPUT':InputInfo(dataSet='/RelValBuToKstarMuMu_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
401 steps['BsToMuMu_13INPUT']={'INPUT':InputInfo(dataSet='/RelValBsToMuMu_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
402 steps['JpsiMuMu_Pt-15INPUT']={'INPUT':InputInfo(dataSet='/RelValJpsiMuMu_Pt-15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
403 steps['BuToKstarPsi2S_13INPUT']={'INPUT':InputInfo(dataSet='/RelValBuToKstarPsi2S_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
404 steps['WE_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWE_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
405 steps['WM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWM_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
406 steps['WpM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWpM_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
407 steps['ZMM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZMM_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
408 steps['ZMM_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValZMM_13_HI/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD')}
409 steps['ZEEMM_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValZEEMM_13_HI/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD')}
410 steps['ZpMM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZpMM_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
411 steps['ZTT_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZTT_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
412 steps['H130GGgluonfusion_13INPUT']={'INPUT':InputInfo(dataSet='/RelValH130GGgluonfusion_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
413 steps['PhotonJets_Pt_10_13INPUT']={'INPUT':InputInfo(dataSet='/RelValPhotonJets_Pt_10_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
414 steps['PhotonJets_Pt_10_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValPhotonJets_Pt_10_13_HI/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD')}
415 steps['QQH1352T_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQQH1352T_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
416 steps['ADDMonoJet_d3MD3_13INPUT']={'INPUT':InputInfo(dataSet='/RelValADDMonoJet_d3MD3_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
417 steps['RSKKGluon_m3000GeV_13INPUT']={'INPUT':InputInfo(dataSet='/RelValRSKKGluon_m3000GeV_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
418 steps['BuJpsiK_13INPUT']={'INPUT':InputInfo(dataSet='/RelValBuJpsiK_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
419 steps['Cosmics_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValCosmics_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
420 steps['BeamHalo_13INPUT']={'INPUT':InputInfo(dataSet='/RelValBeamHalo_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
421 steps['HSCPstop_M_200_13INPUT']={'INPUT':InputInfo(dataSet='/RelValHSCPstop_M_200_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
422 steps['RSGravitonToGaGa_13INPUT']={'INPUT':InputInfo(dataSet='/RelValRSGravitonToGaGa_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
423 steps['WpToENu_M-2000_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWpToENu_M-2000_13/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
424 
425 # particle guns with postLS1 geometry recycle GEN-SIM input
426 steps['SingleElectronPt10_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt10_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
427 steps['SingleElectronPt35_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt35_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
428 steps['SingleElectronPt1000_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronPt1000_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
429 steps['SingleElectronFlatPt1To100_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleElectronFlatPt1To100_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
430 steps['SingleGammaPt10_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleGammaPt10_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
431 steps['SingleGammaPt35_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleGammaPt35_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
432 steps['SingleMuPt1_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt1_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
433 steps['SingleMuPt10_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt10_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
434 steps['SingleMuPt100_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt100_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
435 steps['SingleMuPt1000_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValSingleMuPt1000_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
436 steps['NuGun_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValNuGun_UP15/%s/GEN-SIM'%(baseDataSetRelease[3],),location='STD')}
437 
438 #input for fast sim workflows to be added - TODO
439 
440 
441 ## high stat step1
442 ecalHcal={
443  '-s':'GEN,SIM,DIGI,DIGI2RAW,RAW2DIGI,L1Reco,RECO,EI',
444  '--datatier':'GEN-SIM-DIGI-RAW-RECO',
445  #'--geometry':'ECALHCAL',
446  '--eventcontent':'FEVTDEBUG',
447  '--customise':'Validation/Configuration/ECALHCAL.customise,SimGeneral/MixingModule/fullMixCustomize_cff.setCrossingFrameOn',
448  '--beamspot':'NoSmear'}
449 
450 steps['SingleElectronE120EHCAL']=merge([{'cfg':'SingleElectronE120EHCAL_pythia8_cfi'},ecalHcal,Kby(25,250),step1Defaults])
451 steps['SinglePiE50HCAL']=merge([{'cfg':'SinglePiE50HCAL_pythia8_cfi'},ecalHcal,Kby(25,250),step1Defaults])
452 
453 steps['MinBiasHS']=gen('MinBias_8TeV_pythia8_TuneCUETP8M1_cff',Kby(25,300))
454 steps['InclusiveppMuX']=gen('InclusiveppMuX_8TeV_TuneCUETP8M1_cfi',Mby(11,45000))
455 steps['SingleElectronFlatPt5To100']=gen('SingleElectronFlatPt5To100_pythia8_cfi',Kby(25,250))
456 steps['SinglePiPt1']=gen('SinglePiPt1_pythia8_cfi',Kby(25,250))
457 steps['SingleMuPt1HS']=gen('SingleMuPt1_pythia8_cfi',Kby(25,1000))
458 steps['ZPrime5000Dijet']=gen('ZPrime5000JJ_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
459 steps['SinglePi0E10']=gen('SinglePi0E10_pythia8_cfi',Kby(25,100))
460 steps['SinglePiPt10']=gen('SinglePiPt10_pythia8_cfi',Kby(25,250))
461 steps['SingleGammaFlatPt10To100']=gen('SingleGammaFlatPt10To100_pythia8_cfi',Kby(25,250))
462 steps['SingleTauPt50Pythia']=gen('SingleTaupt_50_pythia8_cfi',Kby(25,100))
463 steps['SinglePiPt100']=gen('SinglePiPt100_pythia8_cfi',Kby(25,250))
464 
465 
466 def genS(fragment,howMuch):
467  global step1Defaults,stCond
468  return merge([{'cfg':fragment},stCond,howMuch,step1Defaults])
469 
470 steps['Higgs200ChargedTaus']=genS('H200ChargedTaus_Tauola_8TeV_cfi',Kby(9,100))
471 steps['JpsiMM']=genS('JpsiMM_8TeV_TuneCUETP8M1_cfi',Kby(66,1000))
472 steps['WE']=genS('WE_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
473 steps['WM']=genS('WM_8TeV_TuneCUETP8M1_cfi',Kby(9,200))
474 steps['WpM']=genS('WpM_8TeV_TuneCUETP8M1_cfi',Kby(9,200))
475 steps['ZMM']=genS('ZMM_8TeV_TuneCUETP8M1_cfi',Kby(18,300))
476 steps['ZpMM']=genS('ZpMM_8TeV_TuneCUETP8M1_cfi',Kby(9,200))
477 steps['Higgs200ChargedTaus_13']=gen2015('H200ChargedTaus_Tauola_13TeV_cfi',Kby(9,100))
478 steps['Upsilon1SToMuMu_13']=gen2015('Upsilon1SToMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi',Kby(17,190))
479 steps['BuToKstarMuMu_13']=gen2015('BuToKstarMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi',Kby(2250,25000))
480 steps['BsToMuMu_13']=gen2015('BsToMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi',Kby(30000,333333))
481 steps['JpsiMuMu_Pt-15']=gen2015('JpsiMuMu_Pt-15_forSTEAM_13TeV_cfi',Kby(11000,122000))
482 steps['BuToKstarPsi2S_13']=gen2015('BuToKstarPsi2S_forSTEAM_13TeV_TuneCUETP8M1_cfi',Kby(16000,176000))
483 steps['WE_13']=gen2015('WE_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
484 steps['WM_13']=gen2015('WM_13TeV_TuneCUETP8M1_cfi',Kby(9,200))
485 steps['WpM_13']=gen2015('WpM_13TeV_TuneCUETP8M1_cfi',Kby(9,200))
486 steps['ZMM_13']=gen2015('ZMM_13TeV_TuneCUETP8M1_cfi',Kby(18,300))
487 steps['ZEEMM_13']=gen2015('ZEEMM_13TeV_TuneCUETP8M1_cfi',Kby(18,300))
488 steps['ZpMM_13']=gen2015('ZpMM_13TeV_TuneCUETP8M1_cfi',Kby(9,200))
489 
490 steps['ZTT']=genS('ZTT_All_hadronic_8TeV_TuneCUETP8M1_cfi',Kby(9,150))
491 steps['H130GGgluonfusion']=genS('H130GGgluonfusion_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
492 steps['PhotonJets_Pt_10']=genS('PhotonJet_Pt_10_8TeV_TuneCUETP8M1_cfi',Kby(9,150))
493 steps['QQH1352T']=genS('QQH1352T_8TeV_TuneCUETP8M1_cfi',Kby(9,100))
494 steps['ZTT_13']=gen2015('ZTT_All_hadronic_13TeV_TuneCUETP8M1_cfi',Kby(9,150))
495 steps['H130GGgluonfusion_13']=gen2015('H130GGgluonfusion_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
496 steps['PhotonJets_Pt_10_13']=gen2015('PhotonJet_Pt_10_13TeV_TuneCUETP8M1_cfi',Kby(9,150))
497 steps['QQH1352T_13']=gen2015('QQH1352T_13TeV_TuneCUETP8M1_cfi',Kby(9,100))
498 #steps['ZmumuJets_Pt_20_300']=gen('ZmumuJets_Pt_20_300_GEN_8TeV_TuneCUETP8M1_cfg',Kby(25,100))
499 steps['ADDMonoJet_d3MD3']=genS('ADDMonoJet_8TeV_d3MD3_TuneCUETP8M1_cfi',Kby(9,100))
500 steps['ADDMonoJet_d3MD3_13']=gen2015('ADDMonoJet_13TeV_d3MD3_TuneCUETP8M1_cfi',Kby(9,100))
501 steps['RSKKGluon_m3000GeV_13']=gen2015('RSKKGluon_m3000GeV_13TeV_TuneCUETP8M1_cff',Kby(9,100))
502 steps['BuJpsiK_13']=gen2015('Pythia8_BuJpsiK_13TeV_TuneCUETP8M1_cfi',Kby(36000,400000))
503 
504 steps['MinBias2INPUT']={'INPUT':InputInfo(dataSet='/RelValMinBias/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
505 steps['Higgs200ChargedTausINPUT']={'INPUT':InputInfo(dataSet='/RelValHiggs200ChargedTaus/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
506 steps['QCD_Pt_3000_3500_2INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_3000_3500/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
507 steps['QCD_Pt_80_120_2INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_80_120/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
508 steps['JpsiMMINPUT']={'INPUT':InputInfo(dataSet='/RelValJpsiMM/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
509 steps['TTbar2INPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
510 steps['WEINPUT']={'INPUT':InputInfo(dataSet='/RelValWE/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
511 steps['WMINPUT']={'INPUT':InputInfo(dataSet='/RelValWM/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
512 steps['ZEEINPUT']={'INPUT':InputInfo(dataSet='/RelValZEE/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
513 steps['ZMMINPUT']={'INPUT':InputInfo(dataSet='/RelValZMM/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
514 steps['ZTTINPUT']={'INPUT':InputInfo(dataSet='/RelValZTT/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
515 steps['H130GGgluonfusionINPUT']={'INPUT':InputInfo(dataSet='/RelValH130GGgluonfusion/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
516 steps['PhotonJets_Pt_10INPUT']={'INPUT':InputInfo(dataSet='/RelValPhotonJets_Pt_10/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
517 steps['QQH1352TINPUT']={'INPUT':InputInfo(dataSet='/RelValQQH1352T_Tauola/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
518 steps['ADDMonoJet_d3MD3INPUT']={'INPUT':InputInfo(dataSet='/RelValADDMonoJet_d3MD3/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
519 steps['WpMINPUT']={'INPUT':InputInfo(dataSet='/RelValWpM/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
520 steps['ZpMMINPUT']={'INPUT':InputInfo(dataSet='/RelValZpMM/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
521 steps['ZpMM_2250_8TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpMM_2250_8TeV_Tauola/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
522 steps['ZpEE_2250_8TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpEE_2250_8TeV_Tauola/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
523 steps['ZpTT_1500_8TeVINPUT']={'INPUT':InputInfo(dataSet='/RelValZpTT_1500_8TeV_Tauola/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
524 
525 
526 steps['Cosmics']=merge([{'cfg':'UndergroundCosmicMu_cfi.py','--scenario':'cosmics'},Kby(666,100000),step1Defaults])
527 steps['Cosmics_UP15']=merge([{'cfg':'UndergroundCosmicMu_cfi.py','--scenario':'cosmics'},Kby(666,100000),step1Up2015Defaults])
528 steps['BeamHalo']=merge([{'cfg':'BeamHalo_cfi.py','--scenario':'cosmics'},Kby(9,100),step1Defaults])
529 steps['BeamHalo_13']=merge([{'cfg':'BeamHalo_13TeV_cfi.py','--scenario':'cosmics'},Kby(9,100),step1Up2015Defaults])
530 
531 # GF re-introduce INPUT command once GEN-SIM will be available
532 # steps['CosmicsINPUT']={'INPUT':InputInfo(dataSet='/RelValCosmics/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
533 steps['BeamHaloINPUT']={'INPUT':InputInfo(dataSet='/RelValBeamHalo/%s/GEN-SIM'%(baseDataSetRelease[0],),location='STD')}
534 
535 steps['QCD_Pt_50_80']=genS('QCD_Pt_50_80_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
536 steps['QCD_Pt_15_20']=genS('QCD_Pt_15_20_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
537 steps['ZTTHS']=merge([Kby(25,100),steps['ZTT']])
538 steps['QQH120Inv']=genS('QQH120Inv_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
539 steps['TTbar2HS']=merge([Kby(25,100),steps['TTbar']])
540 steps['JpsiMM_Pt_20_inf']=genS('JpsiMM_Pt_20_inf_8TeV_TuneCUETP8M1_cfi',Kby(70,280))
541 steps['QCD_Pt_120_170']=genS('QCD_Pt_120_170_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
542 steps['H165WW2L']=genS('H165WW2L_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
543 steps['UpsMM']=genS('UpsMM_8TeV_TuneCUETP8M1_cfi',Kby(56250,225))
544 steps['RSGrav']=genS('RS750_quarks_and_leptons_8TeV_TuneCUETP8M1_cff',Kby(25,100))
545 steps['QCD_Pt_80_120_2HS']=merge([Kby(25,100),steps['QCD_Pt_80_120']])
546 steps['bJpsiX']=genS('bJpsiX_8TeV_TuneCUETP8M1_cfi',Mby(325,1300000))
547 steps['QCD_Pt_30_50']=genS('QCD_Pt_30_50_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
548 steps['H200ZZ4L']=genS('H200ZZ4L_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
549 steps['LM9p']=genS('LM9p_8TeV_cff',Kby(25,100))
550 steps['QCD_Pt_20_30']=genS('QCD_Pt_20_30_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
551 steps['QCD_Pt_170_230']=genS('QCD_Pt_170_230_8TeV_TuneCUETP8M1_cfi',Kby(25,100))
552 
553 
554 
555 
556 ## pPb tests
557 step1PPbDefaults={'--beamspot':'Realistic8TeVCollision'}
558 steps['AMPT_PPb_5020GeV_MinimumBias']=merge([{'-n':10},step1PPbDefaults,genS('AMPT_PPb_5020GeV_MinimumBias_cfi',Kby(9,100))])
559 # GF to be uncommented when GEN-SIM becomes available
560 # steps['AMPT_PPb_5020GeV_MinimumBiasINPUT']={'INPUT':InputInfo(dataSet='/RelValAMPT_PPb_5020GeV_MinimumBias/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')}
561 
562 ## heavy ions tests
563 U2000by1={'--relval': '2000,1'}
564 U80by1={'--relval': '80,1'}
565 
566 hiAlca = {'--conditions':'auto:run2_mc_HIon', '--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_HI'}
567 hiDefaults=merge([hiAlca,{'--scenario':'HeavyIons','-n':2,'--beamspot':'RealisticHI2011Collision'}])
568 
569 steps['HydjetQ_MinBias_2760GeV']=merge([{'-n':1},hiDefaults,genS('Hydjet_Quenched_MinBias_2760GeV_cfi',U2000by1)])
570 steps['HydjetQ_MinBias_2760GeVINPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_MinBias_2760GeV/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD',split=5)}
571 steps['HydjetQ_MinBias_2760GeV_UP15']=merge([{'-n':1},hiDefaults,genS('Hydjet_Quenched_MinBias_2760GeV_cfi',U2000by1)])
572 steps['HydjetQ_MinBias_2760GeV_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_MinBias_2760GeV/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD',split=5)}
573 #steps['HydjetQ_B8_2760GeV']=merge([{'-n':1},hiDefaults,genS('Hydjet_Quenched_B8_2760GeV_cfi',U80by1)])
574 #steps['HydjetQ_B8_2760GeVINPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_B8_2760GeV/%s/GEN-SIM'%(baseDataSetRelease[x],),location='CAF')}
575 steps['QCD_Pt_80_120_13_HI']=merge([hiDefaults,steps['QCD_Pt_80_120_13']])
576 steps['PhotonJets_Pt_10_13_HI']=merge([hiDefaults,steps['PhotonJets_Pt_10_13']])
577 steps['ZMM_13_HI']=merge([hiDefaults,steps['ZMM_13']])
578 steps['ZEEMM_13_HI']=merge([hiDefaults,steps['ZEEMM_13']])
579 
580 
581 def changeRefRelease(steps,listOfPairs):
582  for s in steps:
583  if ('INPUT' in steps[s]):
584  oldD=steps[s]['INPUT'].dataSet
585  for (ref,newRef) in listOfPairs:
586  if ref in oldD:
587  steps[s]['INPUT'].dataSet=oldD.replace(ref,newRef)
588  if '--pileup_input' in steps[s]:
589  for (ref,newRef) in listOfPairs:
590  if ref in steps[s]['--pileup_input']:
591  steps[s]['--pileup_input']=steps[s]['--pileup_input'].replace(ref,newRef)
592 
593 def addForAll(steps,d):
594  for s in steps:
595  steps[s].update(d)
596 
597 
598 
599 #### fastsim section ####
600 ##no forseen to do things in two steps GEN-SIM then FASTIM->end: maybe later
601 step1FastDefaults =merge([{'-s':'GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,L1Reco,RECO,EI,HLT:@fake,VALIDATION',
602  '--fast':'',
603  '--beamspot' : 'Realistic8TeVCollision',
604  '--eventcontent':'FEVTDEBUGHLT,DQM',
605  '--datatier':'GEN-SIM-DIGI-RECO,DQMIO',
606  '--relval':'27000,3000'},
607  step1Defaults])
608 step1FastUpg2015Defaults =merge([{'-s':'GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,L1Reco,RECO,EI,HLT:@frozen25ns,VALIDATION',
609  '--fast':'',
610  '--conditions' :'auto:run2_mc',
611  '--beamspot' : 'NominalCollision2015',
612  '--magField' :'38T_PostLS1',
613  '--customise' :'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
614  '--eventcontent':'FEVTDEBUGHLT,DQM',
615  '--datatier':'GEN-SIM-DIGI-RECO,DQMIO',
616  '--relval':'27000,3000'},
617  step1Defaults])
618 step1FastPUNewMixing =merge([{'-s':'GEN,SIM,RECOBEFMIX',
619  '--eventcontent':'FASTPU',
620  '--datatier':'GEN-SIM-RECO'},
621  step1FastUpg2015Defaults])
622 
623 
624 #step1FastDefaults
625 steps['TTbarFS']=merge([{'cfg':'TTbar_8TeV_TuneCUETP8M1_cfi'},Kby(100,1000),step1FastDefaults])
626 steps['SingleMuPt1FS']=merge([{'cfg':'SingleMuPt1_pythia8_cfi'},step1FastDefaults])
627 steps['SingleMuPt10FS']=merge([{'cfg':'SingleMuPt10_pythia8_cfi'},step1FastDefaults])
628 steps['SingleMuPt100FS']=merge([{'cfg':'SingleMuPt100_pythia8_cfi'},step1FastDefaults])
629 steps['SinglePiPt1FS']=merge([{'cfg':'SinglePiPt1_pythia8_cfi'},step1FastDefaults])
630 steps['SinglePiPt10FS']=merge([{'cfg':'SinglePiPt10_pythia8_cfi'},step1FastDefaults])
631 steps['SinglePiPt100FS']=merge([{'cfg':'SinglePiPt100_pythia8_cfi'},step1FastDefaults])
632 steps['ZEEFS']=merge([{'cfg':'ZEE_8TeV_TuneCUETP8M1_cfi'},Kby(100,2000),step1FastDefaults])
633 steps['ZTTFS']=merge([{'cfg':'ZTT_Tauola_OneLepton_OtherHadrons_8TeV_TuneCUETP8M1_cfi'},Kby(100,2000),step1FastDefaults])
634 steps['QCDFlatPt153000FS']=merge([{'cfg':'QCDForPF_8TeV_TuneCUETP8M1_cfi'},Kby(27,2000),step1FastDefaults])
635 steps['QCD_Pt_80_120FS']=merge([{'cfg':'QCD_Pt_80_120_8TeV_TuneCUETP8M1_cfi'},Kby(100,500),stCond,step1FastDefaults])
636 steps['QCD_Pt_3000_3500FS']=merge([{'cfg':'QCD_Pt_3000_3500_8TeV_TuneCUETP8M1_cfi'},Kby(100,500),stCond,step1FastDefaults])
637 steps['H130GGgluonfusionFS']=merge([{'cfg':'H130GGgluonfusion_8TeV_TuneCUETP8M1_cfi'},step1FastDefaults])
638 steps['SingleGammaFlatPt10To10FS']=merge([{'cfg':'SingleGammaFlatPt10To100_pythia8_cfi'},Kby(100,500),step1FastDefaults])
639 
640 #step1FastUpg2015Defaults
641 steps['TTbarFS_13']=merge([{'cfg':'TTbar_13TeV_TuneCUETP8M1_cfi'},Kby(100,1000),step1FastUpg2015Defaults])
642 steps['NuGunFS_UP15']=merge([{'cfg':'SingleNuE10_cfi'},Kby(100,1000),step1FastUpg2015Defaults])
643 steps['ZEEFS_13']=merge([{'cfg':'ZEE_13TeV_TuneCUETP8M1_cfi'},Kby(100,2000),step1FastUpg2015Defaults])
644 steps['ZTTFS_13']=merge([{'cfg':'ZTT_All_hadronic_13TeV_TuneCUETP8M1_cfi'},Kby(100,2000),step1FastUpg2015Defaults])
645 steps['ZMMFS_13']=merge([{'cfg':'ZMM_13TeV_TuneCUETP8M1_cfi'},Kby(100,2000),step1FastUpg2015Defaults])
646 steps['QCDFlatPt153000FS_13']=merge([{'cfg':'QCDForPF_13TeV_TuneCUETP8M1_cfi'},Kby(27,2000),step1FastUpg2015Defaults])
647 steps['QCD_Pt_80_120FS_13']=merge([{'cfg':'QCD_Pt_80_120_13TeV_TuneCUETP8M1_cfi'},Kby(100,500),step1FastUpg2015Defaults])
648 steps['QCD_Pt_3000_3500FS_13']=merge([{'cfg':'QCD_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi'},Kby(100,500),step1FastUpg2015Defaults])
649 steps['H130GGgluonfusionFS_13']=merge([{'cfg':'H130GGgluonfusion_13TeV_TuneCUETP8M1_cfi'},step1FastUpg2015Defaults])
650 steps['SingleMuPt10FS_UP15']=merge([{'cfg':'SingleMuPt10_pythia8_cfi'},step1FastUpg2015Defaults])
651 steps['SingleMuPt100FS_UP15']=merge([{'cfg':'SingleMuPt100_pythia8_cfi'},step1FastUpg2015Defaults])
652 
653 #step1FastPU
654 steps['MinBiasFS_13_ForMixing']=merge([{'cfg':'MinBias_13TeV_pythia8_TuneCUETP8M1_cfi'},Kby(100,1000),step1FastPUNewMixing])
655 
656 steps['TTbarSFS']=merge([{'cfg':'TTbar_8TeV_TuneCUETP8M1_cfi'},
657  {'-s':'GEN,SIM',
658  '--eventcontent':'FEVTDEBUG',
659  '--datatier':'GEN-SIM',
660  '--fast':''},
661  step1Defaults])
662 
663 steps['TTbarSFSA']=merge([{'cfg':'TTbar_8TeV_TuneCUETP8M1_cfi',
664  '-s':'GEN,SIM,RECO,EI,HLT:@fake,VALIDATION',
665  '--fast':''},
666  step1FastDefaults])
667 
668 def identityFS(wf):
669  return merge([{'--restoreRND':'HLT','--process':'HLT2','--hltProcess':'HLT2', '--inputCommands':'"keep *","drop *TagInfo*_*_*_*"'},wf])
670 
671 steps['SingleMuPt10FS_UP15_ID']=identityFS(steps['SingleMuPt10FS_UP15'])
672 steps['TTbarFS_13_ID']=identityFS(steps['TTbarFS_13'])
673 
674 step1GenDefaults=merge([{'-s':'GEN,VALIDATION:genvalid',
675  '--relval':'250000,20000',
676  '--eventcontent':'RAWSIM,DQM',
677  '--datatier':'GEN,DQMIO',
678  '--conditions':'auto:run2_mc_FULL'
679  },
680  step1Defaults])
681 
682 step1HadronizerDefaults=merge([{'--datatier':'GEN-SIM,DQMIO'},step1GenDefaults])
683 
684 step1LHEDefaults=merge([{'-s':'LHE',
685  '--relval':'200000,5000',
686  '--eventcontent':'LHE',
687  '--datatier':'GEN',
688  '--conditions':'auto:run2_mc_FULL'
689  },
690  step1Defaults])
691 
692 
693 def genvalid(fragment,d,suffix='all',fi='',dataSet=''):
694  import copy
695  c=copy.copy(d)
696  if suffix:
697  c['-s']=c['-s'].replace('genvalid','genvalid_'+suffix)
698  if fi:
699  c['--filein']='lhe:%d'%(fi,)
700  if dataSet:
701  c['--filein']='das:%s'%(dataSet,)
702  c['cfg']=fragment
703  return c
704 
705 
706 
707 steps['DYToll01234Jets_5f_LO_MLM_Madgraph_LHE_13TeV']=genvalid('Configuration/Generator/python/DYToll01234Jets_5f_LO_MLM_Madgraph_LHE_13TeV_cff.py',step1LHEDefaults)
708 # all 6 workflows with root step 'DYToll01234Jets_5f_LO_MLM_Madgraph_LHE_13TeV' will recycle the same dataset, from wf [512] of generator set
709 # 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')}
710 
711 steps['MinBias_TuneZ2star_13TeV_pythia6']=genvalid('MinBias_TuneZ2star_13TeV_pythia6_cff',step1GenDefaults)
712 steps['QCD_Pt-30_TuneZ2star_13TeV_pythia6']=genvalid('QCD_Pt_30_TuneZ2star_13TeV_pythia6_cff',step1GenDefaults)
713 steps['MinBias_13TeV_pythia8']=genvalid('MinBias_13TeV_pythia8_cff',step1GenDefaults)
714 steps['QCD_Pt-30_13TeV_pythia8']=genvalid('QCD_Pt_30_13TeV_pythia8_cff',step1GenDefaults)
715 
716 steps['DYToLL_M-50_13TeV_pythia8']=genvalid('DYToLL_M-50_13TeV_pythia8_cff',step1GenDefaults)
717 steps['WToLNu_13TeV_pythia8']=genvalid('WToLNu_13TeV_pythia8_cff',step1GenDefaults)
718 
719 steps['SoftQCDDiffractive_13TeV_pythia8']=genvalid('SoftQCDDiffractive_13TeV_pythia8_cff',step1GenDefaults)
720 steps['SoftQCDnonDiffractive_13TeV_pythia8']=genvalid('SoftQCDnonDiffractive_13TeV_pythia8_cff',step1GenDefaults)
721 steps['SoftQCDelastic_13TeV_pythia8']=genvalid('SoftQCDelastic_13TeV_pythia8_cff',step1GenDefaults)
722 steps['SoftQCDinelastic_13TeV_pythia8']=genvalid('SoftQCDinelastic_13TeV_pythia8_cff',step1GenDefaults)
723 
724 steps['QCD_Pt-30_8TeV_herwigpp']=genvalid('QCD_Pt_30_8TeV_herwigpp_cff',step1GenDefaults)
725 
726 # Generator Hadronization (Hadronization of LHE)
727 steps['WJetsLNu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
728 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_cff',step1HadronizerDefaults)
729 steps['GGToH_13TeV_pythia8']=genvalid('GGToHtautau_13TeV_pythia8_cff',step1GenDefaults)
730 
731 steps['WJetsLNutaupinu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taupinu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
732 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_taupinu']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_taupinu_cff',step1HadronizerDefaults)
733 steps['GGToHtaupinu_13TeV_pythia8']=genvalid('GGToHtautau_13TeV_pythia8_taupinu_cff',step1GenDefaults)
734 
735 steps['WJetsLNutaurhonu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taurhonu_cff.py',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
736 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_taurhonu']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_taurhonu_cff.py',step1HadronizerDefaults)
737 steps['GGToHtaurhonu_13TeV_pythia8']=genvalid('GGToHtautau_13TeV_pythia8_taurhonu_cff',step1GenDefaults)
738 
739 # Generator External Decays
740 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')
741 
742 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola_cff',step1HadronizerDefaults)
743 steps['WToLNu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
744 steps['GGToH_13TeV_pythia8-tauola']=genvalid('GGToHtautau_13TeV_pythia8_Tauola_cff',step1GenDefaults)
745 
746 steps['WToLNutaupinu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taupinu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
747 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola_taupinu']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola_taupinu_cff',step1HadronizerDefaults)
748 steps['GGToHtaupinu_13TeV_pythia8-tauola']=genvalid('GGToHtautau_13TeV_pythia8_Tauola_taupinu_cff',step1GenDefaults)
749 
750 steps['WToLNutaurhonu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taurhonu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN')
751 steps['Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola_taurhonu']=genvalid('Hadronizer_TuneCUETP8M1_13TeV_MLM_5f_max4j_LHE_pythia8_Tauola_taurhonu_cff',step1HadronizerDefaults)
752 steps['GGToHtaurhonu_13TeV_pythia8-tauola']=genvalid('GGToHtautau_13TeV_pythia8_Tauola_taurhonu_cff',step1GenDefaults)
753 
754 # Heavy Ion
755 steps['ReggeGribovPartonMC_EposLHC_5TeV_pPb']=genvalid('GeneratorInterface/ReggeGribovPartonMCInterface/ReggeGribovPartonMC_EposLHC_5TeV_pPb_cfi',step1GenDefaults)
756 
757 
758 
759 
760 #PU for FullSim
761 PU={'-n':10,'--pileup':'default','--pileup_input':'das:/RelValMinBias/%s/GEN-SIM'%(baseDataSetRelease[0],)}
762 # pu2 can be removed
763 PU2={'-n':10,'--pileup':'default','--pileup_input':'das:/RelValMinBias/%s/GEN-SIM'%(baseDataSetRelease[0],)}
764 PU25={'-n':10,'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(baseDataSetRelease[3],)}
765 PU50={'-n':10,'--pileup':'AVE_35_BX_50ns','--pileup_input':'das:/RelValMinBias_13/%s/GEN-SIM'%(baseDataSetRelease[3],)}
766 
767 
768 
769 #PU for FastSim
770 # FS_PU_INPUT_13TEV = "file:/afs/cern.ch/work/l/lveldere/minbias.root" # placeholder for relval to be produced with wf 135.8
771 PUFS={'--pileup':'GEN_2012_Summer_50ns_PoissonOOTPU'}
772 # PUFS2={'--pileup':'2012_Startup_50ns_PoissonOOTPU'} # not used anywhere
773 PUFSAVE10={'--pileup':'GEN_AVE_10_BX_25ns'} # temporary: one or a few releases as back-up
774 PUFSAVE20={'--pileup':'GEN_AVE_20_BX_25ns'} # temporary: one or a few releases as back-up
775 PUFSAVE35={'--pileup':'GEN_AVE_35_BX_25ns'}
776 PUFSAVE10_DRMIX_ITO={'--pileup':'AVE_10_BX_25ns','--pileup_input':'das:/RelValMinBiasFS_13_ForMixing/CMSSW_7_4_0_pre9_ROOT6-MCRUN2_74_V7_FastSim-v1/GEN-SIM-RECO','--customise':'FastSimulation/Configuration/Customs.disableOOTPU,SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'}
777 PUFSAVE35_DRMIX_ITO={'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBiasFS_13_ForMixing/CMSSW_7_4_0_pre9_ROOT6-MCRUN2_74_V7_FastSim-v1/GEN-SIM-RECO','--customise':'FastSimulation/Configuration/Customs.disableOOTPU,SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'}
778 PUFS25={'--pileup':'AVE_35_BX_25ns','--pileup_input':'das:/RelValMinBiasFS_13_ForMixing/CMSSW_7_4_0_pre9_ROOT6-MCRUN2_74_V7_FastSim-v1/GEN-SIM-RECO'}
779 
780 #
781 steps['TTbarFSPU']=merge([PUFS,Kby(100,500),steps['TTbarFS']] )
782 
783 steps['FS_TTbar_13_PUAVE10']=merge([PUFSAVE10,Kby(100,500),steps['TTbarFS_13']] ) # temporary: one or a few releases as back-up
784 steps['FS_TTbar_13_PUAVE20']=merge([PUFSAVE20,Kby(100,500),steps['TTbarFS_13']] ) # temporary: one or a few releases as back-up
785 steps['FS_TTbar_13_PUAVE35']=merge([PUFSAVE35,Kby(100,500),steps['TTbarFS_13']] )
786 steps['FS_TTbar_13_PU25']=merge([PUFS25,Kby(100,500),steps['TTbarFS_13']] ) # needs the placeholder
787 steps['FS_NuGun_UP15_PU25']=merge([PUFS25,Kby(100,500),steps['NuGunFS_UP15']] ) # needs the placeholder
788 steps['FS_TTbar_13_PUAVE10_DRMIX_ITO']=merge([PUFSAVE10_DRMIX_ITO,Kby(100,500),steps['TTbarFS_13']] ) # needs the placeholder
789 steps['FS_TTbar_13_PUAVE35_DRMIX_ITO']=merge([PUFSAVE35_DRMIX_ITO,Kby(100,500),steps['TTbarFS_13']] ) # needs the placeholder
790 
791 # step2
792 step2Defaults = { '-s' : 'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:@fake,RAW2DIGI,L1Reco',
793  '--datatier' : 'GEN-SIM-DIGI-RAW-HLTDEBUG',
794  '--eventcontent': 'FEVTDEBUGHLT',
795  '--conditions' : 'auto:run1_mc',
796  }
797 #for 2015
798 step2Upg2015Defaults = {'-s' :'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:@frozen25ns,RAW2DIGI,L1Reco',
799  '--conditions' :'auto:run2_mc',
800  '--magField' :'38T_PostLS1',
801  '--datatier' :'GEN-SIM-DIGI-RAW-HLTDEBUG',
802  '--eventcontent':'FEVTDEBUGHLT',
803  '--customise' :'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
804  '-n' :'10'
805  }
806 step2Upg2015Defaults50ns = merge([{'-s':'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:@frozen50ns,RAW2DIGI,L1Reco','--conditions':'auto:run2_mc_50ns','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},step2Upg2015Defaults])
807 
808 steps['DIGIUP15']=merge([step2Upg2015Defaults])
809 steps['DIGIUP15PROD1']=merge([{'-s':'DIGI,L1,DIGI2RAW,HLT:@frozen25ns,RAW2DIGI,L1Reco','--eventcontent':'RAWSIM','--datatier':'GEN-SIM-RAW'},step2Upg2015Defaults])
810 steps['DIGIUP15_PU25']=merge([PU25,step2Upg2015Defaults])
811 steps['DIGIUP15_PU50']=merge([PU50,step2Upg2015Defaults50ns])
812 
813 steps['DIGIPROD1']=merge([{'-s':'DIGI,L1,DIGI2RAW,HLT:@fake,RAW2DIGI,L1Reco','--eventcontent':'RAWSIM','--datatier':'GEN-SIM-RAW'},step2Defaults])
814 steps['DIGI']=merge([step2Defaults])
815 #steps['DIGI2']=merge([stCond,step2Defaults])
816 steps['DIGICOS']=merge([{'--scenario':'cosmics','--eventcontent':'FEVTDEBUG','--datatier':'GEN-SIM-DIGI-RAW'},stCond,step2Defaults])
817 steps['DIGIHAL']=merge([{'--scenario':'cosmics','--eventcontent':'FEVTDEBUG','--datatier':'GEN-SIM-DIGI-RAW'},step2Upg2015Defaults])
818 
819 steps['DIGIPU1']=merge([PU,step2Defaults])
820 steps['DIGIPU2']=merge([PU2,step2Defaults])
821 steps['REDIGIPU']=merge([{'-s':'reGEN,reDIGI,L1,DIGI2RAW,HLT:@fake,RAW2DIGI,L1Reco'},steps['DIGIPU1']])
822 
823 steps['DIGIUP15_ID']=merge([{'--restoreRND':'HLT','--process':'HLT2'},steps['DIGIUP15']])
824 
825 steps['RESIM']=merge([{'-s':'reGEN,reSIM','-n':10},steps['DIGI']])
826 #steps['RESIMDIGI']=merge([{'-s':'reGEN,reSIM,DIGI,L1,DIGI2RAW,HLT:@fake,RAW2DIGI,L1Reco','-n':10,'--restoreRNDSeeds':'','--process':'HLT'},steps['DIGI']])
827 
828 
829 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])
830 
831 
832 
833 # PRE-MIXING : https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideSimulation#Pre_Mixing_Instructions
834 premixUp2015Defaults = {
835  '--evt_type' : 'SingleNuE10_cfi',
836  '-s' : 'GEN,SIM,DIGIPREMIX,L1,DIGI2RAW',
837  '-n' : '10',
838  '--conditions' : 'auto:run2_mc', # 25ns GT; dedicated dict for 50ns
839  '--datatier' : 'GEN-SIM-DIGI-RAW',
840  '--eventcontent': 'PREMIX',
841  '--magField' : '38T_PostLS1',
842  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1' # temporary replacement for premix; to be brought back to customisePostLS1
843 }
844 premixUp2015Defaults50ns = merge([{'--conditions':'auto:run2_mc_50ns'},
845  {'--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},
846  premixUp2015Defaults])
847 
848 steps['PREMIXUP15_PU25']=merge([PU25,Kby(100,100),premixUp2015Defaults])
849 steps['PREMIXUP15_PU50']=merge([PU50,Kby(100,100),premixUp2015Defaults50ns])
850 
851 digiPremixUp2015Defaults25ns = {
852  '--conditions' : 'auto:run2_mc',
853  '-s' : 'DIGIPREMIX_S2:pdigi_valid,DATAMIX,L1,DIGI2RAW,HLT:@frozen25ns,RAW2DIGI,L1Reco',
854  '--pileup_input' : 'das:/RelValPREMIXUP15_PU25/%s/GEN-SIM-DIGI-RAW'%baseDataSetRelease[5],
855  '--eventcontent' : 'FEVTDEBUGHLT',
856  '--datatier' : 'GEN-SIM-DIGI-RAW-HLTDEBUG',
857  '--datamix' : 'PreMix',
858  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1CustomsPreMixing.customisePostLS1', # temporary replacement for premix; to be brought back to customisePostLS1
859  '--magField' : '38T_PostLS1',
860  }
861 digiPremixUp2015Defaults50ns=merge([{'-s':'DIGIPREMIX_S2:pdigi_valid,DATAMIX,L1,DIGI2RAW,HLT:@frozen50ns,RAW2DIGI,L1Reco'},
862  {'--conditions':'auto:run2_mc_50ns'},
863  {'--pileup_input' : 'das:/RelValPREMIXUP15_PU50/%s/GEN-SIM-DIGI-RAW'%baseDataSetRelease[6]},
864  {'--customise': 'SLHCUpgradeSimulations/Configuration/postLS1CustomsPreMixing.customisePostLS1_50ns'},
865  digiPremixUp2015Defaults25ns])
866 steps['DIGIPRMXUP15_PU25']=merge([digiPremixUp2015Defaults25ns])
867 steps['DIGIPRMXUP15_PU50']=merge([digiPremixUp2015Defaults50ns])
868 premixProd25ns = {'-s' : 'DIGIPREMIX_S2,DATAMIX,L1,DIGI2RAW,HLT:@frozen25ns,RAW2DIGI,L1Reco',
869  '--eventcontent' : 'PREMIXRAW',
870  '--datatier' : 'PREMIXRAW'}
871 premixProd50ns = merge([{'-s':'DIGIPREMIX_S2,DATAMIX,L1,DIGI2RAW,HLT:@frozen50ns,RAW2DIGI,L1Reco'},premixProd25ns])
872 
873 steps['DIGIPRMXUP15_PROD_PU25']=merge([premixProd25ns,digiPremixUp2015Defaults25ns])
874 steps['DIGIPRMXUP15_PROD_PU50']=merge([premixProd50ns,digiPremixUp2015Defaults50ns])
875 
876 
877 dataReco={'--conditions':'auto:run1_data',
878  '-s':'RAW2DIGI,L1Reco,RECO,EI,ALCA:SiStripCalZeroBias+SiStripCalMinBias+TkAlMinBias,DQM',
879  '--datatier':'RECO,DQMIO',
880  '--eventcontent':'RECO,DQM',
881  '--data':'',
882  '--process':'reRECO',
883  '--scenario':'pp',
884  }
885 
886 hltKey='fake'
887 from Configuration.HLT.autoHLT import autoHLT
888 menu = autoHLT[hltKey]
889 steps['HLTD']=merge([{'--process':'reHLT',
890  '-s':'L1REPACK,HLT:@%s'%hltKey,
891  '--conditions':'auto:run1_hlt_%s'%menu,
892  '--data':'',
893  '--output':'\'[{"e":"RAW","t":"RAW","o":["drop FEDRawDataCollection_rawDataCollector__LHC"]}]\'',
894  },])
895 steps['HLTDSKIM']=merge([{'--inputCommands':'"keep *","drop *_*_*_RECO"'},steps['HLTD']])
896 
897 steps['RECOD']=merge([{'--scenario':'pp',},dataReco])
898 steps['RECODSplit']=steps['RECOD'] # finer job splitting
899 steps['RECOSKIMALCA']=merge([{'--inputCommands':'"keep *","drop *_*_*_RECO"'
900  },steps['RECOD']])
901 steps['RECOSKIM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,DQM',
902  },steps['RECOSKIMALCA']])
903 
904 steps['REPACKHID']=merge([{'--scenario':'HeavyIons',
905  '-s':'RAW2DIGI,REPACK',
906  '--datatier':'RAW',
907  '--eventcontent':'REPACKRAW'},
908  steps['RECOD']])
909 steps['RECOHID10']=merge([{'--scenario':'HeavyIons',
910  '-s':'RAW2DIGI,L1Reco,RECO,ALCA:SiStripCalZeroBias+SiStripCalMinBias+TkAlMinBiasHI+HcalCalMinBias,DQM',
911  '--datatier':'RECO,DQMIO',
912  '--eventcontent':'RECO,DQM','-n':30},
913  steps['RECOD']])
914 steps['RECOHID11']=merge([{'--repacked':''},
915  steps['RECOHID10']])
916 steps['RECOHID10']['-s']+=',REPACK'
917 steps['RECOHID10']['--datatier']+=',RAW'
918 steps['RECOHID10']['--eventcontent']+=',REPACKRAW'
919 
920 steps['TIER0']=merge([{'--customise':'Configuration/DataProcessing/RecoTLR.customisePrompt',
921  '-s':'RAW2DIGI,L1Reco,RECO,EI,ALCAPRODUCER:@allForPrompt,DQM,ENDJOB',
922  '--datatier':'RECO,AOD,ALCARECO,DQMIO',
923  '--eventcontent':'RECO,AOD,ALCARECO,DQM',
924  '--process':'RECO'
925  },dataReco])
926 steps['TIER0EXP']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,ALCAPRODUCER:@allForExpress,DQM,ENDJOB',
927  '--datatier':'ALCARECO,DQMIO',
928  '--eventcontent':'ALCARECO,DQM',
929  '--customise':'Configuration/DataProcessing/RecoTLR.customiseExpress',
930  },steps['TIER0']])
931 
932 steps['RECOCOSD']=merge([{'--scenario':'cosmics',
933  '-s':'RAW2DIGI,L1Reco,RECO,DQM,ALCA:MuAlCalIsolatedMu+DtCalib',
934  '--customise':'Configuration/DataProcessing/RecoTLR.customiseCosmicData'
935  },dataReco])
936 
937 step2HImixDefaults=merge([{'-n':'2', #too slow for 10 events/hour
938  '--himix':'',
939  '--filein':'file.root',
940  '--process':'HISIGNAL'
941  },hiDefaults,step1Up2015Defaults])
942 steps['Pyquen_GammaJet_pt20_2760GeV']=merge([{'cfg':'Pyquen_GammaJet_pt20_2760GeV_cfi'},step2HImixDefaults])
943 steps['Pyquen_DiJet_pt80to120_2760GeV']=merge([{'cfg':'Pyquen_DiJet_pt80to120_2760GeV_cfi'},step2HImixDefaults])
944 steps['Pyquen_ZeemumuJets_pt10_2760GeV']=merge([{'cfg':'Pyquen_ZeemumuJets_pt10_2760GeV_cfi'},step2HImixDefaults])
945 
946 # step3
947 step3Defaults = {
948  '-s' : 'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM',
949  '--conditions' : 'auto:run1_mc',
950  '--no_exec' : '',
951  '--datatier' : 'GEN-SIM-RECO,DQMIO',
952  '--eventcontent': 'RECOSIM,DQM'
953  }
954 
955 steps['DIGIPU']=merge([{'--process':'REDIGI'},steps['DIGIPU1']])
956 
957 #for 2015
958 step3Up2015Defaults = {'-s':'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM',
959  '--conditions':'auto:run2_mc',
960  '--magField' : '38T_PostLS1',
961  '-n':'10',
962  '--datatier':'GEN-SIM-RECO,DQMIO',
963  '--eventcontent':'RECOSIM,DQM',
964  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'
965  }
966 step3Up2015Defaults50ns = merge([{'--conditions':'auto:run2_mc_50ns','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},step3Up2015Defaults])
967 
968 step3Up2015Hal = {'-s' :'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM',
969  '--conditions' :'auto:run2_mc',
970  '--magField' :'38T_PostLS1',
971  '--datatier' :'GEN-SIM-RECO,DQMIO',
972  '--eventcontent':'RECOSIM,DQM',
973  '-n' :'10',
974  '--customise' :'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'
975  }
976 
977 unSchOverrides={'--runUnscheduled':'','-s':'RAW2DIGI,L1Reco,RECO,EI,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@miniAODDQM','--eventcontent':'RECOSIM,MINIAODSIM,DQM','--datatier':'GEN-SIM-RECO,MINIAODSIM,DQMIO'}
978 step3Up2015DefaultsUnsch = merge([unSchOverrides,step3Up2015Defaults])
979 step3DefaultsUnsch = merge([unSchOverrides,step3Defaults])
980 
981 
982 steps['RECOUP15']=merge([step3Up2015Defaults]) # todo: remove UP from label
983 #steps['RECOUP15PROD1']=merge([{ '-s' : 'RAW2DIGI,L1Reco,RECO,EI,DQM:DQMOfflinePOGMC', '--datatier' : 'AODSIM,DQMIO', '--eventcontent' : 'AODSIM,DQM'},step3Up2015Defaults])
984 
985 steps['RECODreHLT']=merge([{'--hltProcess':'reHLT','--conditions':'auto:run1_data_%s'%menu},steps['RECOD']])
986 
987 steps['RECO']=merge([step3Defaults])
988 steps['RECODBG']=merge([{'--eventcontent':'RECODEBUG,DQM'},steps['RECO']])
989 steps['RECOPROD1']=merge([{ '-s' : 'RAW2DIGI,L1Reco,RECO,EI', '--datatier' : 'GEN-SIM-RECO,AODSIM', '--eventcontent' : 'RECOSIM,AODSIM'},step3Defaults])
990 steps['RECOPRODUP15']=merge([{ '-s':'RAW2DIGI,L1Reco,RECO,EI,DQM:DQMOfflinePOGMC','--datatier':'AODSIM,DQMIO','--eventcontent':'AODSIM,DQM'},step3Up2015Defaults])
991 steps['RECOCOS']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,ALCA:MuAlCalIsolatedMu,DQM','--scenario':'cosmics'},stCond,step3Defaults])
992 steps['RECOHAL']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,ALCA:MuAlCalIsolatedMu,DQM','--scenario':'cosmics'},step3Up2015Hal])
993 steps['RECOMIN']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,ALCA:SiStripCalZeroBias+SiStripCalMinBias,VALIDATION,DQM'},stCond,step3Defaults])
994 steps['RECOMINUP15']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,ALCA:SiStripCalZeroBias+SiStripCalMinBias,VALIDATION,DQM'},step3Up2015Defaults])
995 
996 steps['RECODDQM']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,EI,DQM:@common+@muon+@hcal+@jetmet+@ecal'},steps['RECOD']])
997 
998 steps['RECOPU1']=merge([PU,steps['RECO']])
999 steps['RECOPU2']=merge([PU2,steps['RECO']])
1000 steps['RECOUP15_PU25']=merge([PU25,step3Up2015Defaults])
1001 steps['RECOUP15_PU50']=merge([PU50,step3Up2015Defaults50ns])
1002 
1003 #steps['RECOmAOD']=merge([step3DefaultsUnsch])
1004 steps['RECOmAODUP15']=merge([step3Up2015DefaultsUnsch])
1005 
1006 
1007 # for premixing: no --pileup_input for replay; GEN-SIM only available for in-time event, from FEVTDEBUGHLT previous step
1008 steps['RECOPRMXUP15_PU25']=merge([
1009  {'-s':'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM'},
1010  {'--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'}, # temporary replacement for premix; to be brought back to customisePostLS1
1011  step3Up2015Defaults])
1012 steps['RECOPRMXUP15_PU50']=merge([
1013  {'-s':'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM'},
1014  {'--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},
1015  step3Up2015Defaults50ns])
1016 
1017 recoPremixUp15prod = merge([
1018  {'-s':'RAW2DIGI,L1Reco,RECO,EI'},
1019  {'--datatier' : 'GEN-SIM-RECO,AODSIM'},
1020  {'--eventcontent' : 'RECOSIM,AODSIM'},
1021  {'--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1'}, # temporary replacement for premix; to be brought back to customisePostLS1
1022  step3Up2015Defaults])
1023 
1024 steps['RECOPRMXUP15PROD_PU25']=merge([
1025  recoPremixUp15prod])
1026 steps['RECOPRMXUP15PROD_PU50']=merge([
1027  {'--conditions':'auto:run2_mc_50ns'},
1028  {'--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},
1029  recoPremixUp15prod])
1030 
1031 
1032 steps['RECOPUDBG']=merge([{'--eventcontent':'RECODEBUG,DQM'},steps['RECOPU1']])
1033 steps['RERECOPU1']=merge([{'--hltProcess':'REDIGI'},steps['RECOPU1']])
1034 
1035 steps['RECOUP15_ID']=merge([{'--hltProcess':'HLT2'},steps['RECOUP15']])
1036 
1037 steps['RECOHI']=merge([hiDefaults,{'-s':'RAW2DIGI,L1Reco,RECO,VALIDATION,DQM'},step3Up2015Defaults])
1038 #wmsplit['RECOHI']=5
1039 
1040 steps['DIGIHISt3']=steps['DIGIHI']
1041 
1042 steps['RECOHID11St3']=merge([{
1043  '--process':'ZStoRECO'},
1044  steps['RECOHID11']])
1045 steps['RECOHIR10D11']=merge([{'--filein':'file:step2_inREPACKRAW.root',
1046  '--filtername':'reRECO'},
1047  steps['RECOHID11St3']])
1048 #steps['RECOFS']=merge([{'--fast':'',
1049 # '-s':'RECO,EI,HLT:@fake,VALIDATION'},
1050 # steps['RECO']])
1051 
1052 #add this line when testing from an input file that is not strictly GEN-SIM
1053 #addForAll(step3,{'--hltProcess':'DIGI'})
1054 
1055 steps['ALCACOSD']={'--conditions':'auto:run1_data',
1056  '--datatier':'ALCARECO',
1057  '--eventcontent':'ALCARECO',
1058  '--scenario':'cosmics',
1059  '-s':'ALCA:TkAlCosmics0T+MuAlGlobalCosmics+HcalCalHOCosmics+DQM'
1060  }
1061 steps['ALCAPROMPT']={'-s':'ALCA:PromptCalibProd',
1062  '--filein':'file:TkAlMinBias.root',
1063  '--conditions':'auto:run1_data',
1064  '--datatier':'ALCARECO',
1065  '--eventcontent':'ALCARECO'}
1066 steps['ALCAEXP']={'-s':'ALCA:PromptCalibProd',
1067  '--conditions':'auto:run1_data',
1068  '--datatier':'ALCARECO',
1069  '--eventcontent':'ALCARECO'}
1070 
1071 # step4
1072 step4Defaults = {
1073  '-s' : 'ALCA:TkAlMuonIsolated+TkAlMinBias+EcalCalElectron+HcalCalIsoTrk+MuAlOverlaps',
1074  '-n' : 1000,
1075  '--conditions' : 'auto:run1_mc',
1076  '--datatier' : 'ALCARECO',
1077  '--eventcontent': 'ALCARECO',
1078  }
1079 step4Up2015Defaults = {
1080  '-s' : 'ALCA:TkAlMuonIsolated+TkAlMinBias+EcalCalElectron+HcalCalIsoTrk+MuAlOverlaps',
1081  '-n' : 1000,
1082  '--conditions' : 'auto:run2_mc',
1083  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1084  '--datatier' : 'ALCARECO',
1085  '--eventcontent': 'ALCARECO',
1086  }
1087 
1088 steps['RERECOPU']=steps['RERECOPU1']
1089 
1090 steps['ALCATT']=merge([{'--filein':'file:step3.root'},step4Defaults])
1091 steps['ALCAMIN']=merge([{'-s':'ALCA:TkAlMinBias','--filein':'file:step3.root'},stCond,step4Defaults])
1092 steps['ALCACOS']=merge([{'-s':'ALCA:TkAlCosmics0T+MuAlGlobalCosmics+HcalCalHOCosmics'},stCond,step4Defaults])
1093 steps['ALCABH']=merge([{'-s':'ALCA:TkAlBeamHalo+MuAlBeamHaloOverlaps+MuAlBeamHalo'},stCond,step4Defaults])
1094 steps['ALCAHAL']=merge([{'-s':'ALCA:TkAlBeamHalo+MuAlBeamHaloOverlaps+MuAlBeamHalo'},step4Up2015Defaults])
1095 steps['ALCAELE']=merge([{'-s':'ALCA:EcalCalElectron','--filein':'file:step3.root'},stCond,step4Defaults])
1096 
1097 steps['ALCAHARVD']={'-s':'ALCAHARVEST:BeamSpotByRun+BeamSpotByLumi+SiStripQuality',
1098  '--conditions':'auto:run1_data',
1099  '--scenario':'pp',
1100  '--data':'',
1101  '--filein':'file:PromptCalibProd.root'}
1102 
1103 steps['RECOHISt4']=steps['RECOHI']
1104 
1105 steps['ALCANZS']=merge([{'-s':'ALCA:HcalCalMinBias','--mc':''},step4Defaults])
1106 steps['HARVESTGEN']={'-s':'HARVESTING:genHarvesting',
1107  '--harvesting':'AtJobEnd',
1108  '--conditions':'auto:run2_mc_FULL',
1109  '--mc':'',
1110  '--customise' :'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1111  '--filetype':'DQM',
1112  '--filein':'file:step1_inDQM.root'
1113  }
1114 
1115 steps['HARVESTGEN2']=merge([{'--filein':'file:step2_inDQM.root'},steps['HARVESTGEN']])
1116 
1117 
1118 #data
1119 steps['HARVESTD']={'-s':'HARVESTING:dqmHarvesting',
1120  '--conditions':'auto:run1_data',
1121  '--data':'',
1122  '--filetype':'DQM',
1123  '--scenario':'pp'}
1124 
1125 steps['HARVESTDreHLT'] = merge([ {'--conditions':'auto:run1_data_%s'%menu}, steps['HARVESTD'] ])
1126 
1127 steps['HARVESTDDQM']=merge([{'-s':'HARVESTING:@common+@muon+@hcal+@jetmet+@ecal'},steps['HARVESTD']])
1128 
1129 steps['HARVESTDfst2']=merge([{'--filein':'file:step2_inDQM.root'},steps['HARVESTD']])
1130 
1131 steps['HARVESTDC']={'-s':'HARVESTING:dqmHarvesting',
1132  '--conditions':'auto:run1_data',
1133  '--filetype':'DQM',
1134  '--data':'',
1135  '--filein':'file:step2_inDQM.root',
1136  '--scenario':'cosmics'}
1137 steps['HARVESTDHI']={'-s':'HARVESTING:dqmHarvesting',
1138  '--conditions':'auto:run1_data',
1139  '--filetype':'DQM',
1140  '--data':'',
1141  '--scenario':'HeavyIons'}
1142 
1143 #MC
1144 steps['HARVEST']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting',
1145  '--conditions':'auto:run1_mc',
1146  '--mc':'',
1147  '--filetype':'DQM',
1148  '--scenario':'pp'}
1149 steps['HARVESTCOS']={'-s':'HARVESTING:dqmHarvesting',
1150  '--conditions':'auto:run1_mc',
1151  '--mc':'',
1152  '--filein':'file:step3_inDQM.root',
1153  '--filetype':'DQM',
1154  '--scenario':'cosmics'}
1155 steps['HARVESTHAL']={'-s' :'HARVESTING:dqmHarvesting',
1156  '--conditions':'auto:run2_mc',
1157  '--magField' :'38T_PostLS1',
1158  '--mc' :'',
1159  '--filein' :'file:step3_inDQM.root',
1160  '--scenario' :'cosmics',
1161  '--filein':'file:step3_inDQM.root', # unnnecessary
1162  '--filetype':'DQM',
1163  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1164  }
1165 steps['HARVESTFS']={'-s':'HARVESTING:validationHarvestingFS',
1166  '--conditions':'auto:run1_mc',
1167  '--mc':'',
1168  '--filetype':'DQM',
1169  '--scenario':'pp'}
1170 steps['HARVESTHI']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting',
1171  '--conditions':'auto:run2_mc_HIon',
1172  '--magField' : '38T_PostLS1',
1173  '--mc':'',
1174  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_HI',
1175  '--filetype':'DQM',
1176  '--scenario':'HeavyIons'}
1177 steps['HARVESTUP15']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting', # todo: remove UP from label
1178  '--conditions':'auto:run2_mc',
1179  '--magField' : '38T_PostLS1',
1180  '--mc':'',
1181  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1182  '--filetype':'DQM',
1183  }
1184 
1185 
1186 steps['HARVESTUP15_PU25']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting', # todo: remove UP from label
1187  '--conditions':'auto:run2_mc',
1188  '--magField' : '38T_PostLS1',
1189  '--mc':'',
1190  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1191  '--filetype':'DQM',
1192  }
1193 
1194 steps['HARVESTUP15_PU50']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting', # todo: remove UP from label
1195  '--conditions':'auto:run2_mc_50ns',
1196  '--magField' : '38T_PostLS1',
1197  '--mc':'',
1198  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1199  '--filetype':'DQM',
1200  }
1201 
1202 unSchHarvestOverrides={'-s':'HARVESTING:@standardValidation+@standardDQM+@miniAODValidation+@miniAODDQM'}
1203 steps['HARVESTmAODUP15']=merge([unSchHarvestOverrides,steps['HARVESTUP15']])
1204 
1205 steps['HARVESTUP15FS']={'-s':'HARVESTING:validationHarvestingFS',
1206  '--conditions':'auto:run2_mc',
1207  '--mc':'',
1208  '--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1209  '--filetype':'DQM',
1210  '--scenario':'pp'}
1211 
1212 
1213 steps['ALCASPLIT']={'-s':'ALCAOUTPUT:@allForPrompt',
1214  '--conditions':'auto:run1_data',
1215  '--scenario':'pp',
1216  '--data':'',
1217  '--triggerResultsProcess':'RECO',
1218  '--filein':'file:step2_inALCARECO.root'}
1219 
1220 steps['SKIMD']={'-s':'SKIM:all',
1221  '--conditions':'auto:run1_data',
1222  '--data':'',
1223  '--scenario':'pp',
1224  '--filein':'file:step2.root',
1225  '--secondfilein':'filelist:step1_dasquery.log'}
1226 
1227 steps['SKIMDreHLT'] = merge([ {'--conditions':'auto:run1_data_%s'%menu,'--filein':'file:step3.root'}, steps['SKIMD'] ])
1228 
1229 steps['SKIMCOSD']={'-s':'SKIM:all',
1230  '--conditions':'auto:run1_data',
1231  '--data':'',
1232  '--scenario':'cosmics',
1233  '--filein':'file:step2.root',
1234  '--secondfilein':'filelist:step1_dasquery.log'}
1235 
1236 steps['RECOFROMRECO']=merge([{'-s':'RECO,EI',
1237  '--filtername':'RECOfromRECO',
1238  '--process':'reRECO',
1239  '--datatier':'AODSIM',
1240  '--eventcontent':'AODSIM',
1241  },
1242  stCond,step3Defaults])
1243 
1244 
1245 steps['RECOFROMRECOSt2']=steps['RECOFROMRECO']
1246 
1247 steps['RECODFROMRAWRECO']=merge([{'-s':'RAW2DIGI:RawToDigi_noTk,L1Reco,RECO:reconstruction_noTracking,EI',
1248  '--filtername':'RECOfromRAWRECO',
1249  '--process':'rereRECO',
1250  '--datatier':'AOD',
1251  '--eventcontent':'AOD',
1252  '--secondfilein':'filelist:step1_dasquery.log',
1253  },
1254  steps['RECOD']])
1255 
1256 
1257 steps['COPYPASTE']={'-s':'NONE',
1258  '--conditions':'auto:run1_mc',
1259  '--output':'\'[{"t":"RAW","e":"ALL"}]\'',
1260  '--customise_commands':'"process.ALLRAWoutput.fastCloning=cms.untracked.bool(False)"'}
1261 
1262 #miniaod
1263 stepMiniAODDefaults = { '-s' : 'PAT',
1264  '--runUnscheduled': '',
1265  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1266  '-n' : '100'
1267  }
1268 stepMiniAODDataUP15 = merge([{'--conditions' : 'auto:run1_data',
1269  '--data' : '',
1270  '--datatier' : 'MINIAOD',
1271  '--eventcontent' : 'MINIAOD',
1272  '--filein' :'file:step3.root'
1273  },stepMiniAODDefaults])
1274 
1275 stepMiniAODData = remove(stepMiniAODDataUP15,'--customise')
1276 
1277 stepMiniAODMC = merge([{'--conditions' : 'auto:run2_mc',
1278  '--mc' : '',
1279  '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1',
1280  '--datatier' : 'MINIAODSIM',
1281  '--eventcontent' : 'MINIAODSIM',
1282  '--filein' :'file:step3.root'
1283  },stepMiniAODDefaults])
1284 
1285 steps['MINIAODDATA'] =merge([stepMiniAODData])
1286 steps['MINIAODDreHLT'] =merge([{'--conditions':'auto:run1_data_%s'%menu},stepMiniAODData])
1287 steps['MINIAODDATAs2'] =merge([{'--filein':'file:step2.root'},stepMiniAODData])
1288 steps['MINIAODMCUP15'] =merge([stepMiniAODMC])
1289 steps['MINIAODMCUP1550'] =merge([{'--conditions':'auto:run2_mc_50ns','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},stepMiniAODMC])
1290 steps['MINIAODMCUP15HI'] =merge([{'--conditions':'auto:run2_mc_HIon','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_HI'},stepMiniAODMC])
1291 steps['MINIAODMCUP15FS'] =merge([{'--filein':'file:step1.root','--fast':''},stepMiniAODMC])
1292 steps['MINIAODMCUP15FS50'] =merge([{'--conditions':'auto:run2_mc_50ns','--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_50ns'},steps['MINIAODMCUP15FS']])
1293 
1294 
1295 #################################################################################
1296 ####From this line till the end of the file :
1297 ####UPGRADE WORKFLOWS IN PREPARATION - Gaelle's sandbox -
1298 #####Accessible only through the option --what upgrade
1299 #####therefore not run in IBs (at some they might be...)
1300 #####Transparent for any of the standard workflows
1301 #### list of worflows defined (not necessarly running though): runTheMatrix.py --what upgrade -n
1302 ####
1303 ###
1304 #################################################################################
1305 
1307 
1308 defaultDataSets={}
1309 defaultDataSets['Extended2023HGCalMuon']='CMSSW_6_2_0_SLHC20_patch1-DES23_62_V1_refHGCALV5-v'
1310 defaultDataSets['Extended2023SHCalNoTaper']='CMSSW_6_2_0_SLHC20_patch1-DES23_62_V1_refSHNoTaper-v'
1311 defaultDataSets['2019WithGEMAging']='CMSSW_6_2_0_SLHC20-DES19_62_V8_UPG2019withGEM-v'
1312 keys=defaultDataSets.keys()
1313 for key in keys:
1314  defaultDataSets[key+'PU']=defaultDataSets[key]
1315 
1316 # sometimes v1 won't be used - override it here - the dictionary key is gen fragment + '_' + geometry
1317 versionOverrides={}
1318 
1319 baseDataSetReleaseBetter={}
1320 for gen in upgradeFragments:
1321  for ds in defaultDataSets:
1322  key=gen[:-4]+'_'+ds
1323  version='1'
1324  if key in versionOverrides:
1325  version = versionOverrides[key]
1326  baseDataSetReleaseBetter[key]=defaultDataSets[ds]+version
1327 
1328 PUDataSets={}
1329 for ds in defaultDataSets:
1330  key='MinBias_TuneZ2star_14TeV_pythia6'+'_'+ds
1331  name=baseDataSetReleaseBetter[key]
1332  PUDataSets[ds]={'-n':10,'--pileup':'AVE_140_BX_25ns','--pileup_input':'das:/RelValMinBias_TuneZ2star_14TeV/%s/GEN-SIM'%(name,)}
1333 
1334 
1335 upgradeStepDict={}
1336 for step in upgradeSteps:
1337  upgradeStepDict[step]={}
1338 
1339 # just make all combinations - yes, some will be nonsense.. but then these are not used unless
1340 # specified above
1341 for k in upgradeKeys:
1342  k2=k
1343  if 'PU' in k[-2:]:
1344  k2=k[:-2]
1345  geom=upgradeGeoms[k2]
1346  gt=upgradeGTs[k2]
1347  cust=upgradeCustoms[k2]
1348  upgradeStepDict['GenSimFull'][k]= {'-s' : 'GEN,SIM',
1349  '-n' : 10,
1350  '--conditions' : gt,
1351  '--beamspot' : 'Gauss',
1352  '--magField' : '38T_PostLS1',
1353  '--datatier' : 'GEN-SIM',
1354  '--eventcontent': 'FEVTDEBUG',
1355  '--geometry' : geom
1356  }
1357  if cust!=None : upgradeStepDict['GenSimFull'][k]['--customise']=cust
1358 
1359  upgradeStepDict['GenSimHLBeamSpotFull'][k]= {'-s' : 'GEN,SIM',
1360  '-n' : 10,
1361  '--conditions' : gt,
1362  '--beamspot' : 'HLLHC',
1363  '--magField' : '38T_PostLS1',
1364  '--datatier' : 'GEN-SIM',
1365  '--eventcontent': 'FEVTDEBUG',
1366  '--geometry' : geom
1367  }
1368  if cust!=None : upgradeStepDict['GenSimHLBeamSpotFull'][k]['--customise']=cust
1369 
1370  upgradeStepDict['DigiFull'][k] = {'-s':'DIGI:pdigi_valid,L1,DIGI2RAW',
1371  '--conditions':gt,
1372  '--datatier':'GEN-SIM-DIGI-RAW',
1373  '-n':'10',
1374  '--magField' : '38T_PostLS1',
1375  '--eventcontent':'FEVTDEBUGHLT',
1376  '--geometry' : geom
1377  }
1378  if cust!=None : upgradeStepDict['DigiFull'][k]['--customise']=cust
1379 
1380  upgradeStepDict['DigiFullTrigger'][k] = {'-s':'DIGI:pdigi_valid,L1,L1TrackTrigger,DIGI2RAW',
1381  '--conditions':gt,
1382  '--datatier':'GEN-SIM-DIGI-RAW',
1383  '-n':'10',
1384  '--magField' : '38T_PostLS1',
1385  '--eventcontent':'FEVTDEBUGHLT',
1386  '--geometry' : geom
1387  }
1388  if cust!=None : upgradeStepDict['DigiFullTrigger'][k]['--customise']=cust
1389 
1390 
1391  if k2 in PUDataSets:
1392  upgradeStepDict['DigiFullPU'][k]=merge([PUDataSets[k2],upgradeStepDict['DigiFull'][k]])
1393  upgradeStepDict['DigiTrkTrigFull'][k] = {'-s':'DIGI:pdigi_valid,L1,L1TrackTrigger,DIGI2RAW,RECO:pixeltrackerlocalreco',
1394  '--conditions':gt,
1395  '--datatier':'GEN-SIM-DIGI-RAW',
1396  '-n':'10',
1397  '--magField' : '38T_PostLS1',
1398  '--eventcontent':'FEVTDEBUGHLT',
1399  '--geometry' : geom
1400  }
1401  if cust!=None : upgradeStepDict['DigiTrkTrigFull'][k]['--customise']=cust
1402 
1403  upgradeStepDict['RecoFull'][k] = {'-s':'RAW2DIGI,L1Reco,RECO,VALIDATION,DQM',
1404  '--conditions':gt,
1405  '--datatier':'GEN-SIM-RECO,DQMIO',
1406  '-n':'10',
1407  '--eventcontent':'FEVTDEBUGHLT,DQM',
1408  '--magField' : '38T_PostLS1',
1409  '--geometry' : geom
1410  }
1411  if cust!=None : upgradeStepDict['RecoFull'][k]['--customise']=cust
1412 
1413  if k2 in PUDataSets:
1414  upgradeStepDict['RecoFullPU'][k]=merge([PUDataSets[k2],{'-s':'RAW2DIGI,L1Reco,RECO,DQM'},upgradeStepDict['RecoFull'][k]])
1415 
1416  upgradeStepDict['RecoFullHGCAL'][k] = {'-s':'RAW2DIGI,L1Reco,RECO',
1417  '--conditions':gt,
1418  '--datatier':'GEN-SIM-RECO',
1419  '-n':'10',
1420  '--eventcontent':'RECOSIM',
1421  '--magField' : '38T_PostLS1',
1422  '--geometry' : geom
1423  }
1424  if cust!=None : upgradeStepDict['RecoFullHGCAL'][k]['--customise']=cust
1425 
1426  if k2 in PUDataSets:
1427  upgradeStepDict['RecoFullPUHGCAL'][k]=merge([PUDataSets[k2],{'-s':'RAW2DIGI,L1Reco,RECO'},upgradeStepDict['RecoFullHGCAL'][k]])
1428 
1429  upgradeStepDict['HARVESTFull'][k]={'-s':'HARVESTING:validationHarvesting+dqmHarvesting',
1430  '--conditions':gt,
1431  '--mc':'',
1432  '--magField' : '38T_PostLS1',
1433  '--geometry' : geom,
1434  '--scenario' : 'pp',
1435  '--filetype':'DQM'
1436  }
1437  if cust!=None : upgradeStepDict['HARVESTFull'][k]['--customise']=cust
1438 
1439  if k2 in PUDataSets:
1440  upgradeStepDict['HARVESTFullPU'][k]=merge([PUDataSets[k2],{'-s':'HARVESTING:dqmHarvesting'},upgradeStepDict['HARVESTFull'][k]])
1441 
1442  upgradeStepDict['FastSim'][k]={'-s':'GEN,SIM,RECO,VALIDATION',
1443  '--eventcontent':'FEVTDEBUGHLT,DQM',
1444  '--datatier':'GEN-SIM-DIGI-RECO,DQMIO',
1445  '--conditions':gt,
1446  '--fast':'',
1447  '--geometry' : geom,
1448  '--relval':'27000,3000'}
1449  if cust!=None : upgradeStepDict['FastSim'][k]['--customise']=cust
1450 
1451  upgradeStepDict['HARVESTFast'][k]={'-s':'HARVESTING:validationHarvestingFS',
1452  '--conditions':gt,
1453  '--mc':'',
1454  '--magField' : '38T_PostLS1',
1455  '--geometry' : geom,
1456  '--scenario' : 'pp'
1457  }
1458  if cust!=None : upgradeStepDict['HARVESTFast'][k]['--customise']=cust
1459 
1460 
1461 
1462 
1463 for step in upgradeSteps:
1464  # we need to do this for each fragment
1465  if 'Sim' in step:
1466  for frag in upgradeFragments:
1467  howMuch=howMuches[frag]
1468  for key in upgradeKeys:
1469  k=frag[:-4]+'_'+key+'_'+step
1470  steps[k]=merge([ {'cfg':frag},howMuch,upgradeStepDict[step][key]])
1471  #get inputs in case of -i...but no need to specify in great detail
1472  #however, there can be a conflict of beam spots but this is lost in the dataset name
1473  #so please be careful
1474  s=frag[:-4]+'_'+key
1475  if 'FastSim' not in k and s+'INPUT' not in steps and s in baseDataSetReleaseBetter:
1476  steps[k+'INPUT']={'INPUT':InputInfo(dataSet='/RelVal'+frag[:-4]+'/%s/GEN-SIM'%(baseDataSetReleaseBetter[s],),location='STD')}
1477  else:
1478  for key in upgradeKeys:
1479  k=step+'_'+key
1480  if step in upgradeStepDict and key in upgradeStepDict[step]:
1481  steps[k]=merge([upgradeStepDict[step][key]])
1482 
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