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