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 | Private Member Functions
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
 

Private Member Functions

def _checkRepackedFlag
 

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._checkRepackedFlag (   self,
  options,
  args 
)
private

Definition at line 30 of file Reco.py.

Referenced by Reco.Reco.expressProcessing(), and Reco.Reco.promptReco().

30 
31  def _checkRepackedFlag(self, options, **args):
32  if 'repacked' in args:
33  if args['repacked'] == True:
34  options.isRepacked = True
35  else:
36  options.isRepacked = False
37 
38 
def _checkRepackedFlag
Definition: Reco.py:30
def Reco.Reco.alcaHarvesting (   self,
  globalTag,
  datasetName,
  args 
)
_alcaHarvesting_

Proton collisions data taking AlCa Harvesting

Definition at line 275 of file Reco.py.

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

276  def alcaHarvesting(self, globalTag, datasetName, **args):
277  """
278  _alcaHarvesting_
279 
280  Proton collisions data taking AlCa Harvesting
281 
282  """
283  skims = []
284  if 'skims' in args:
285  skims = args['skims']
286 
287 
288  if 'alcapromptdataset' in args:
289  skims.append('@'+args['alcapromptdataset'])
290 
291  if len(skims) == 0: return None
292  options = defaultOptions
293  options.scenario = self.cbSc if hasattr(self,'cbSc') else self.__class__.__name__
294  options.step = "ALCAHARVEST:"+('+'.join(skims))
295  options.name = "ALCAHARVEST"
296  options.conditions = gtNameAndConnect(globalTag, args)
297 
298  process = cms.Process("ALCAHARVEST")
299  process.source = cms.Source("PoolSource")
300 
301  if 'customs' in args:
302  options.customisation_file=args['customs']
303 
304  configBuilder = ConfigBuilder(options, process = process)
305  configBuilder.prepare()
306 
307  #
308  # customise process for particular job
309  #
310  process.source.processingMode = cms.untracked.string('RunsAndLumis')
311  process.source.fileNames = cms.untracked(cms.vstring())
312  process.maxEvents.input = -1
313  process.dqmSaver.workflow = datasetName
314 
315  return process
def alcaHarvesting
Definition: Reco.py:275
def gtNameAndConnect
Definition: Utils.py:136
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 196 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, Impl.ppRun2at50ns.ppRun2at50ns.cbSc, Impl.HeavyIonsRun2.HeavyIonsRun2.cbSc, Reco.Reco.cbSc, alcazmumu_cfi.filter, and join().

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

Proton collisions data taking DQM Harvesting

Definition at line 249 of file Reco.py.

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

250  def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
251  """
252  _dqmHarvesting_
253 
254  Proton collisions data taking DQM Harvesting
255 
256  """
257  options = defaultOptions
258  options.scenario = self.cbSc
259  options.step = "HARVESTING"+dqmSeq(args,':dqmHarvesting')
260  options.name = "EDMtoMEConvert"
261  options.conditions = gtNameAndConnect(globalTag, args)
262 
263  process = cms.Process("HARVESTING")
264  process.source = dqmIOSource(args)
265 
266  if 'customs' in args:
267  options.customisation_file=args['customs']
268 
269  configBuilder = ConfigBuilder(options, process = process)
270  configBuilder.prepare()
271 
272  harvestingMode(process,datasetName,args,rANDl=False)
273  return process
274 
def dqmSeq
Definition: Utils.py:130
def dqmHarvesting
Definition: Reco.py:249
def gtNameAndConnect
Definition: Utils.py:136
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 96 of file Reco.py.

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

96 
97  def expressProcessing(self, globalTag, **args):
98  """
99  _expressProcessing_
100 
101  Proton collision data taking express processing
102 
103  """
104  skims = args['skims']
105  # 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
106  pclWkflws = [x for x in skims if "PromptCalibProd" in x]
107  for wfl in pclWkflws:
108  skims.remove(wfl)
109 
110  step = stepALCAPRODUCER(skims)
111  dqmStep= dqmSeq(args,'')
112  options = Options()
113  options.__dict__.update(defaultOptions.__dict__)
114  options.scenario = self.cbSc
115 
116  eiStep=''
117  if self.cbSc == 'pp':
118  eiStep=',EI'
119 
120  options.step = 'RAW2DIGI,L1Reco,RECO'+eiStep+step+',DQM'+dqmStep+',ENDJOB'
121  dictIO(options,args)
122  options.conditions = gtNameAndConnect(globalTag, args)
123  options.filein = 'tobeoverwritten.xyz'
124  if 'inputSource' in args:
125  options.filetype = args['inputSource']
126  process = cms.Process('RECO')
127 
128  if 'customs' in args:
129  options.customisation_file=args['customs']
130 
131  self._checkRepackedFlag(options,**args)
132 
133  cb = ConfigBuilder(options, process = process, with_output = True, with_input = True)
134 
135  cb.prepare()
136 
137  addMonitoring(process)
138 
139  return process
140 
def dqmSeq
Definition: Utils.py:130
def stepALCAPRODUCER
Definition: Utils.py:9
def addMonitoring
Definition: Utils.py:38
def gtNameAndConnect
Definition: Utils.py:136
def dictIO
Definition: Utils.py:122
def _checkRepackedFlag
Definition: Reco.py:30
cbSc
Definition: Reco.py:20
def expressProcessing
Definition: Reco.py:96
def Reco.Reco.promptReco (   self,
  globalTag,
  args 
)
_promptReco_

Proton collision data taking prompt reco

Definition at line 39 of file Reco.py.

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

39 
40  def promptReco(self, globalTag, **args):
41  """
42  _promptReco_
43 
44  Proton collision data taking prompt reco
45 
46  """
47  step = stepALCAPRODUCER(args['skims'])
48  PhysicsSkimStep = ''
49  if (args.has_key("PhysicsSkims")) :
50  PhysicsSkimStep = stepSKIMPRODUCER(args['PhysicsSkims'])
51  dqmStep= dqmSeq(args,'')
52  options = Options()
53  options.__dict__.update(defaultOptions.__dict__)
54  options.scenario = self.cbSc
55 
56  miniAODStep=''
57 
58 # if miniAOD is asked for - then retrieve the miniaod config
59  if 'outputs' in args:
60  for a in args['outputs']:
61  if a['dataTier'] == 'MINIAOD':
62  miniAODStep=',PAT'
63 
64  """
65  Unscheduled for all
66  """
67  options.runUnscheduled=True
68 
69  self._checkRepackedFlag(options, **args)
70 
71  if 'customs' in args:
72  options.customisation_file=args['customs']
73 
74  eiStep=''
75  if self.cbSc == 'pp':
76  eiStep=',EI'
77 
78  options.step = 'RAW2DIGI,L1Reco,RECO'+self.recoSeq+eiStep+step+PhysicsSkimStep+miniAODStep+',DQM'+dqmStep+',ENDJOB'
79 
80  dictIO(options,args)
81  options.conditions = gtNameAndConnect(globalTag, args)
82 
83  process = cms.Process('RECO')
84  cb = ConfigBuilder(options, process = process, with_output = True)
85 
86  # Input source
87  process.source = cms.Source("PoolSource",
88  fileNames = cms.untracked.vstring()
89  )
90  cb.prepare()
91 
92  addMonitoring(process)
93 
94  return process
95 
def dqmSeq
Definition: Utils.py:130
def stepALCAPRODUCER
Definition: Utils.py:9
def addMonitoring
Definition: Utils.py:38
def stepSKIMPRODUCER
Definition: Utils.py:24
def promptReco
Definition: Reco.py:39
def gtNameAndConnect
Definition: Utils.py:136
def dictIO
Definition: Utils.py:122
def _checkRepackedFlag
Definition: Reco.py:30
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 316 of file Reco.py.

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

317  def skimming(self, skims, globalTag,**options):
318  """
319  _skimming_
320 
321  skimming method overload for the prompt skiming
322 
323  """
324  options = defaultOptions
325  options.scenario = self.cbSc if hasattr(self,'cbSc') else self.__class__.__name__
326  options.step = "SKIM:"+('+'.join(skims))
327  options.name = "SKIM"
328  options.conditions = gtNameAndConnect(globalTag, args)
329  process = cms.Process("SKIM")
330  process.source = cms.Source("PoolSource")
331 
332  if 'customs' in args:
333  options.customisation_file=args['customs']
334 
335  configBuilder = ConfigBuilder(options, process = process)
336  configBuilder.prepare()
337 
338  return process
def skimming
Definition: Reco.py:316
def gtNameAndConnect
Definition: Utils.py:136
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 141 of file Reco.py.

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

142  def visualizationProcessing(self, globalTag, **args):
143  """
144  _visualizationProcessing_
145 
146  """
147 
148  options = Options()
149  options.__dict__.update(defaultOptions.__dict__)
150  options.scenario = self.cbSc
151  # FIXME: do we need L1Reco here?
152  options.step =''
153  if 'preFilter' in args:
154  options.step +='FILTER:'+args['preFilter']+','
155 
156  eiStep=''
157  if self.cbSc == 'pp':
158  eiStep=',EI'
159 
160  options.step += 'RAW2DIGI,L1Reco,RECO'+eiStep+',ENDJOB'
161 
162 
163  dictIO(options,args)
164  options.conditions = gtNameAndConnect(globalTag, args)
165  options.timeoutOutput = True
166  # FIXME: maybe can go...maybe not
167  options.filein = 'tobeoverwritten.xyz'
168 
169  if 'inputSource' in args:
170  options.filetype = args['inputSource']
171  else:
172  # this is the default as this is what is needed on the OnlineCluster
173  options.filetype = 'DQMDAQ'
174 
175  print "Using %s source"%options.filetype
176 
177  process = cms.Process('RECO')
178 
179  if 'customs' in args:
180  options.customisation_file=args['customs']
181 
182  cb = ConfigBuilder(options, process = process, with_output = True, with_input = True)
183 
184  cb.prepare()
185 
186 
187 
188 
189  # FIXME: not sure abou this one...drop for the moment
190  # addMonitoring(process)
191 
192  return process
193 
194 
195 
def gtNameAndConnect
Definition: Utils.py:136
def visualizationProcessing
Definition: Reco.py:141
def dictIO
Definition: Utils.py:122
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().