CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
Reco.Reco Class Reference
Inheritance diagram for Reco.Reco:

Public Member Functions

def __init__
 
def alcaHarvesting
 
def alcaSkim
 
def dqmHarvesting
 
def expressProcessing
 
def promptReco
 
def skimming
 
def visualizationProcessing
 

Public Attributes

 cbSc
 
 recoSeq
 

Detailed Description

Definition at line 17 of file Reco.py.

Constructor & Destructor Documentation

def Reco.Reco.__init__ (   self)

Definition at line 18 of file Reco.py.

18 
19  def __init__(self):
20  self.recoSeq=''
self.cbSc=self.__class__.__name__
def __init__
Definition: Reco.py:18
recoSeq
Definition: Reco.py:19
cbSc
Definition: Reco.py:20

Member Function Documentation

def Reco.Reco.alcaHarvesting (   self,
  globalTag,
  datasetName,
  args 
)
_alcaHarvesting_

Proton collisions data taking AlCa Harvesting

Definition at line 258 of file Reco.py.

References Impl.cosmicsRun2.cosmicsRun2.cbSc, Impl.hcalnzs.hcalnzs.cbSc, Impl.hcalnzsRun2.hcalnzsRun2.cbSc, Impl.ppRun2.ppRun2.cbSc, Impl.ppRun2B0T.ppRun2B0T.cbSc, Reco.Reco.cbSc, Utils.gtNameAndConnect(), and join().

259  def alcaHarvesting(self, globalTag, datasetName, **args):
260  """
261  _alcaHarvesting_
262 
263  Proton collisions data taking AlCa Harvesting
264 
265  """
266  skims = []
267  if 'skims' in args:
268  skims = args['skims']
269 
270 
271  if 'alcapromptdataset' in args:
272  skims.append('@'+args['alcapromptdataset'])
273 
274  if len(skims) == 0: return None
275  options = defaultOptions
276  options.scenario = self.cbSc if hasattr(self,'cbSc') else self.__class__.__name__
277  options.step = "ALCAHARVEST:"+('+'.join(skims))
278  options.name = "ALCAHARVEST"
279  options.conditions = gtNameAndConnect(globalTag, args)
280 
281  process = cms.Process("ALCAHARVEST")
282  process.source = cms.Source("PoolSource")
283 
284  if 'customs' in args:
285  options.customisation_file=args['customs']
286 
287  configBuilder = ConfigBuilder(options, process = process)
288  configBuilder.prepare()
289 
290  #
291  # customise process for particular job
292  #
293  process.source.processingMode = cms.untracked.string('RunsAndLumis')
294  process.source.fileNames = cms.untracked(cms.vstring())
295  process.maxEvents.input = -1
296  process.dqmSaver.workflow = datasetName
297 
298  return process
def alcaHarvesting
Definition: Reco.py:258
def gtNameAndConnect
Definition: Utils.py:137
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
cbSc
Definition: Reco.py:20
def Reco.Reco.alcaSkim (   self,
  skims,
  args 
)
_alcaSkim_

AlcaReco processing & skims for proton collisions

Definition at line 179 of file Reco.py.

References Impl.cosmicsRun2.cosmicsRun2.cbSc, Impl.hcalnzs.hcalnzs.cbSc, Impl.hcalnzsRun2.hcalnzsRun2.cbSc, Impl.ppRun2B0T.ppRun2B0T.cbSc, Impl.ppRun2.ppRun2.cbSc, Reco.Reco.cbSc, alcazmumu_cfi.filter, and join().

180  def alcaSkim(self, skims, **args):
181  """
182  _alcaSkim_
183 
184  AlcaReco processing & skims for proton collisions
185 
186  """
187 
188  step = ""
189  pclWflws = [x for x in skims if "PromptCalibProd" in x]
190  skims = filter(lambda x: x not in pclWflws, skims)
191 
192  if len(pclWflws):
193  step += 'ALCA:'+('+'.join(pclWflws))
194 
195  if len( skims ) > 0:
196  if step != "":
197  step += ","
198  step += "ALCAOUTPUT:"+('+'.join(skims))
199 
200  options = Options()
201  options.__dict__.update(defaultOptions.__dict__)
202  options.scenario = self.cbSc
203  options.step = step
204  options.conditions = args['globaltag'] if 'globaltag' in args else 'None'
205  if args.has_key('globalTagConnect') and args['globalTagConnect'] != '':
206  options.conditions += ','+args['globalTagConnect']
207 
208  options.triggerResultsProcess = 'RECO'
209 
210  if 'customs' in args:
211  options.customisation_file=args['customs']
212 
213  process = cms.Process('ALCA')
214  cb = ConfigBuilder(options, process = process)
215 
216  # Input source
217  process.source = cms.Source(
218  "PoolSource",
219  fileNames = cms.untracked.vstring()
220  )
221 
222  cb.prepare()
223 
224  # FIXME: dirty hack..any way around this?
225  # Tier0 needs the dataset used for ALCAHARVEST step to be a different data-tier
226  for wfl in pclWflws:
227  methodToCall = getattr(process, 'ALCARECOStream'+wfl)
228  methodToCall.dataset.dataTier = cms.untracked.string('ALCAPROMPT')
229 
230  return process
231 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def alcaSkim
Definition: Reco.py:179
cbSc
Definition: Reco.py:20
def Reco.Reco.dqmHarvesting (   self,
  datasetName,
  runNumber,
  globalTag,
  args 
)
_dqmHarvesting_

Proton collisions data taking DQM Harvesting

Definition at line 232 of file Reco.py.

References Impl.cosmicsRun2.cosmicsRun2.cbSc, Impl.hcalnzs.hcalnzs.cbSc, Impl.hcalnzsRun2.hcalnzsRun2.cbSc, Impl.ppRun2.ppRun2.cbSc, Impl.ppRun2B0T.ppRun2B0T.cbSc, Reco.Reco.cbSc, Utils.dqmIOSource(), Utils.dqmSeq(), Utils.gtNameAndConnect(), and Utils.harvestingMode().

233  def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
234  """
235  _dqmHarvesting_
236 
237  Proton collisions data taking DQM Harvesting
238 
239  """
240  options = defaultOptions
241  options.scenario = self.cbSc
242  options.step = "HARVESTING"+dqmSeq(args,':dqmHarvesting')
243  options.name = "EDMtoMEConvert"
244  options.conditions = gtNameAndConnect(globalTag, args)
245 
246  process = cms.Process("HARVESTING")
247  process.source = dqmIOSource(args)
248 
249  if 'customs' in args:
250  options.customisation_file=args['customs']
251 
252  configBuilder = ConfigBuilder(options, process = process)
253  configBuilder.prepare()
254 
255  harvestingMode(process,datasetName,args,rANDl=False)
256  return process
257 
def dqmSeq
Definition: Utils.py:131
def dqmHarvesting
Definition: Reco.py:232
def gtNameAndConnect
Definition: Utils.py:137
def dqmIOSource
Definition: Utils.py:103
def harvestingMode
Definition: Utils.py:114
cbSc
Definition: Reco.py:20
def Reco.Reco.expressProcessing (   self,
  globalTag,
  args 
)
_expressProcessing_

Proton collision data taking express processing

Definition at line 81 of file Reco.py.

References Utils.addMonitoring(), Impl.hcalnzsRun2.hcalnzsRun2.cbSc, Impl.cosmicsRun2.cosmicsRun2.cbSc, Impl.hcalnzs.hcalnzs.cbSc, Impl.ppRun2.ppRun2.cbSc, Impl.ppRun2B0T.ppRun2B0T.cbSc, Reco.Reco.cbSc, Utils.dictIO(), Utils.dqmSeq(), Utils.gtNameAndConnect(), and Utils.stepALCAPRODUCER().

81 
82  def expressProcessing(self, globalTag, **args):
83  """
84  _expressProcessing_
85 
86  Proton collision data taking express processing
87 
88  """
89  skims = args['skims']
90  # the AlCaReco skims for PCL should only run during AlCaSkimming step which uses the same configuration on the Tier0 side, for this reason we drop them here
91  pclWkflws = [x for x in skims if "PromptCalibProd" in x]
92  for wfl in pclWkflws:
93  skims.remove(wfl)
94 
95  step = stepALCAPRODUCER(skims)
96  dqmStep= dqmSeq(args,'')
97  options = Options()
98  options.__dict__.update(defaultOptions.__dict__)
99  options.scenario = self.cbSc
100 
101  eiStep=''
102  if self.cbSc == 'pp':
103  eiStep=',EI'
104 
105  options.step = 'RAW2DIGI,L1Reco,RECO'+eiStep+step+',DQM'+dqmStep+',ENDJOB'
106  dictIO(options,args)
107  options.conditions = gtNameAndConnect(globalTag, args)
108  options.filein = 'tobeoverwritten.xyz'
109  if 'inputSource' in args:
110  options.filetype = args['inputSource']
111  process = cms.Process('RECO')
112 
113  if 'customs' in args:
114  options.customisation_file=args['customs']
115 
116  cb = ConfigBuilder(options, process = process, with_output = True, with_input = True)
117 
118  cb.prepare()
119 
120  addMonitoring(process)
121 
122  return process
123 
def dqmSeq
Definition: Utils.py:131
def stepALCAPRODUCER
Definition: Utils.py:9
def addMonitoring
Definition: Utils.py:38
def gtNameAndConnect
Definition: Utils.py:137
def dictIO
Definition: Utils.py:123
cbSc
Definition: Reco.py:20
def expressProcessing
Definition: Reco.py:81
def Reco.Reco.promptReco (   self,
  globalTag,
  args 
)
_promptReco_

Proton collision data taking prompt reco

Definition at line 29 of file Reco.py.

References Utils.addMonitoring(), Impl.cosmicsRun2.cosmicsRun2.cbSc, Impl.hcalnzs.hcalnzs.cbSc, Impl.hcalnzsRun2.hcalnzsRun2.cbSc, Impl.ppRun2B0T.ppRun2B0T.cbSc, Impl.ppRun2.ppRun2.cbSc, Reco.Reco.cbSc, Utils.dictIO(), Utils.dqmSeq(), Utils.gtNameAndConnect(), Impl.hcalnzs.hcalnzs.recoSeq, Impl.cosmicsRun2.cosmicsRun2.recoSeq, Impl.hcalnzsRun2.hcalnzsRun2.recoSeq, Impl.ppRun2.ppRun2.recoSeq, Impl.ppRun2B0T.ppRun2B0T.recoSeq, Reco.Reco.recoSeq, Utils.stepALCAPRODUCER(), and Utils.stepSKIMPRODUCER().

29 
30  def promptReco(self, globalTag, **args):
31  """
32  _promptReco_
33 
34  Proton collision data taking prompt reco
35 
36  """
37  step = stepALCAPRODUCER(args['skims'])
38  PhysicsSkimStep = ''
39  if (args.has_key("PhysicsSkims")) :
40  PhysicsSkimStep = stepSKIMPRODUCER(args['PhysicsSkims'])
41  dqmStep= dqmSeq(args,'')
42  options = Options()
43  options.__dict__.update(defaultOptions.__dict__)
44  options.scenario = self.cbSc
45 
46  miniAODStep=''
47 
48 # if miniAOD is asked for - then retrieve the miniaod config
49  if 'outputs' in args:
50  for a in args['outputs']:
51  if a['dataTier'] == 'MINIAOD':
52  miniAODStep=',PAT'
53  options.runUnscheduled=True
54 
55 
56  if 'customs' in args:
57  options.customisation_file=args['customs']
58 
59  eiStep=''
60  if self.cbSc == 'pp':
61  eiStep=',EI'
62 
63  options.step = 'RAW2DIGI,L1Reco,RECO'+self.recoSeq+eiStep+step+PhysicsSkimStep+miniAODStep+',DQM'+dqmStep+',ENDJOB'
64 
65  dictIO(options,args)
66  options.conditions = gtNameAndConnect(globalTag, args)
67 
68  process = cms.Process('RECO')
69  cb = ConfigBuilder(options, process = process, with_output = True)
70 
71  # Input source
72  process.source = cms.Source("PoolSource",
73  fileNames = cms.untracked.vstring()
74  )
75  cb.prepare()
76 
77  addMonitoring(process)
78 
79  return process
80 
def dqmSeq
Definition: Utils.py:131
def stepALCAPRODUCER
Definition: Utils.py:9
def addMonitoring
Definition: Utils.py:38
def stepSKIMPRODUCER
Definition: Utils.py:24
def promptReco
Definition: Reco.py:29
def gtNameAndConnect
Definition: Utils.py:137
def dictIO
Definition: Utils.py:123
recoSeq
Definition: Reco.py:19
cbSc
Definition: Reco.py:20
def Reco.Reco.skimming (   self,
  skims,
  globalTag,
  options 
)
_skimming_

skimming method overload for the prompt skiming

Definition at line 299 of file Reco.py.

References Impl.cosmicsRun2.cosmicsRun2.cbSc, Impl.hcalnzs.hcalnzs.cbSc, Impl.hcalnzsRun2.hcalnzsRun2.cbSc, Impl.ppRun2.ppRun2.cbSc, Impl.ppRun2B0T.ppRun2B0T.cbSc, Reco.Reco.cbSc, Utils.gtNameAndConnect(), and join().

300  def skimming(self, skims, globalTag,**options):
301  """
302  _skimming_
303 
304  skimming method overload for the prompt skiming
305 
306  """
307  options = defaultOptions
308  options.scenario = self.cbSc if hasattr(self,'cbSc') else self.__class__.__name__
309  options.step = "SKIM:"+('+'.join(skims))
310  options.name = "SKIM"
311  options.conditions = gtNameAndConnect(globalTag, args)
312  process = cms.Process("SKIM")
313  process.source = cms.Source("PoolSource")
314 
315  if 'customs' in args:
316  options.customisation_file=args['customs']
317 
318  configBuilder = ConfigBuilder(options, process = process)
319  configBuilder.prepare()
320 
321  return process
def skimming
Definition: Reco.py:299
def gtNameAndConnect
Definition: Utils.py:137
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
cbSc
Definition: Reco.py:20
def Reco.Reco.visualizationProcessing (   self,
  globalTag,
  args 
)
_visualizationProcessing_

Definition at line 124 of file Reco.py.

References Impl.cosmicsRun2.cosmicsRun2.cbSc, Impl.hcalnzs.hcalnzs.cbSc, Impl.hcalnzsRun2.hcalnzsRun2.cbSc, Impl.ppRun2.ppRun2.cbSc, Impl.ppRun2B0T.ppRun2B0T.cbSc, Reco.Reco.cbSc, Utils.dictIO(), and Utils.gtNameAndConnect().

125  def visualizationProcessing(self, globalTag, **args):
126  """
127  _visualizationProcessing_
128 
129  """
130 
131  options = Options()
132  options.__dict__.update(defaultOptions.__dict__)
133  options.scenario = self.cbSc
134  # FIXME: do we need L1Reco here?
135  options.step =''
136  if 'preFilter' in args:
137  options.step +='FILTER:'+args['preFilter']+','
138 
139  eiStep=''
140  if self.cbSc == 'pp':
141  eiStep=',EI'
142 
143  options.step += 'RAW2DIGI,L1Reco,RECO'+eiStep+',ENDJOB'
144 
145 
146  dictIO(options,args)
147  options.conditions = gtNameAndConnect(globalTag, args)
148  options.timeoutOutput = True
149  # FIXME: maybe can go...maybe not
150  options.filein = 'tobeoverwritten.xyz'
151 
152  if 'inputSource' in args:
153  options.filetype = args['inputSource']
154  else:
155  # this is the default as this is what is needed on the OnlineCluster
156  options.filetype = 'DQMDAQ'
157 
158  print "Using %s source"%options.filetype
159 
160  process = cms.Process('RECO')
161 
162  if 'customs' in args:
163  options.customisation_file=args['customs']
164 
165  cb = ConfigBuilder(options, process = process, with_output = True, with_input = True)
166 
167  cb.prepare()
168 
169 
170 
171 
172  # FIXME: not sure abou this one...drop for the moment
173  # addMonitoring(process)
174 
175  return process
176 
177 
178 
def gtNameAndConnect
Definition: Utils.py:137
def visualizationProcessing
Definition: Reco.py:124
def dictIO
Definition: Utils.py:123
cbSc
Definition: Reco.py:20

Member Data Documentation

Reco.Reco.cbSc

Definition at line 20 of file Reco.py.

Referenced by Reco.Reco.alcaHarvesting(), Reco.Reco.alcaSkim(), Reco.Reco.dqmHarvesting(), Reco.Reco.expressProcessing(), Reco.Reco.promptReco(), Reco.Reco.skimming(), and Reco.Reco.visualizationProcessing().

Reco.Reco.recoSeq

Definition at line 19 of file Reco.py.

Referenced by Reco.Reco.promptReco().