CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
hcalnzs.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 """
3 _hcalnzs_
4 
5 Scenario supporting proton collisions
6 
7 """
8 
9 import os
10 import sys
11 
12 from Configuration.DataProcessing.Scenario import Scenario
13 from Configuration.DataProcessing.Utils import stepALCAPRODUCER
14 import FWCore.ParameterSet.Config as cms
15 from Configuration.PyReleaseValidation.ConfigBuilder import ConfigBuilder
16 from Configuration.PyReleaseValidation.ConfigBuilder import Options
17 from Configuration.PyReleaseValidation.ConfigBuilder import defaultOptions
18 from Configuration.PyReleaseValidation.ConfigBuilder import installFilteredStream
19 from Configuration.DataProcessing.RecoTLR import customisePrompt
20 
22  """
23  _hcalnzs_
24 
25  Implement configuration building for data processing for proton
26  collision data taking
27 
28  """
29 
30 
31  def promptReco(self, globalTag, writeTiers = ['RECO'], **args):
32  """
33  _promptReco_
34 
35  Proton collision data taking prompt reco
36 
37  """
38 
39  skims = ['HcalCalMinBias']
40  step = stepALCAPRODUCER(skims)
41  options = Options()
42  options.__dict__.update(defaultOptions.__dict__)
43  options.scenario = "pp"
44  options.step = 'RAW2DIGI,L1Reco,RECO:reconstruction_HcalNZS'+step+',DQM,ENDJOB'
45  options.isMC = False
46  options.isData = True
47  options.beamspot = None
48  options.eventcontent = ','.join(writeTiers)
49  options.datatier = ','.join(writeTiers)
50  options.magField = 'AutoFromDBCurrent'
51  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
52  options.relval = False
53 
54  process = cms.Process('RECO')
55  cb = ConfigBuilder(options, process = process, with_output = True)
56 
57  # Input source
58  process.source = cms.Source("PoolSource",
59  fileNames = cms.untracked.vstring()
60  )
61  cb.prepare()
62 
63 
64  #add the former top level patches here
65  customisePrompt(process)
66 
67  return process
68 
69 
70  def alcaSkim(self, skims, **args):
71  """
72  _alcaSkim_
73 
74  AlcaReco processing & skims for proton collisions
75 
76  """
77 
78  globalTag = None
79  if 'globaltag' in args:
80  globalTag = args['globaltag']
81 
82  step = "ALCAOUTPUT:"
83  for skim in skims:
84  step += (skim+"+")
85  options = Options()
86  options.__dict__.update(defaultOptions.__dict__)
87  options.scenario = "pp"
88  options.step = step.rstrip('+')
89  options.isMC = False
90  options.isData = True
91  options.beamspot = None
92  options.eventcontent = None
93  options.relval = None
94  if globalTag != None :
95  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
96  options.triggerResultsProcess = 'RECO'
97 
98  process = cms.Process('ALCA')
99  cb = ConfigBuilder(options, process = process)
100 
101  # Input source
102  process.source = cms.Source(
103  "PoolSource",
104  fileNames = cms.untracked.vstring()
105  )
106 
107  cb.prepare()
108 
109  return process
110 
111 
112  def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
113  """
114  _dqmHarvesting_
115 
116  Proton collisions data taking DQM Harvesting
117 
118  """
119  options = defaultOptions
120  options.scenario = "pp"
121  options.step = "HARVESTING:dqmHarvesting"
122  options.isMC = False
123  options.isData = True
124  options.beamspot = None
125  options.eventcontent = None
126  options.name = "EDMtoMEConvert"
127  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
128  options.arguments = ""
129  options.evt_type = ""
130  options.filein = []
131 
132  process = cms.Process("HARVESTING")
133  process.source = cms.Source("PoolSource")
134  configBuilder = ConfigBuilder(options, process = process)
135  configBuilder.prepare()
136 
137  #
138  # customise process for particular job
139  #
140  process.source.processingMode = cms.untracked.string('RunsAndLumis')
141  process.source.fileNames = cms.untracked(cms.vstring())
142  process.maxEvents.input = -1
143  process.dqmSaver.workflow = datasetName
144  if args.has_key('referenceFile') and args.get('referenceFile', ''):
145  process.DQMStore.referenceFileName = \
146  cms.untracked.string(args['referenceFile'])
147 
148  return process
def stepALCAPRODUCER
Definition: Utils.py:9
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def customisePrompt
Definition: RecoTLR.py:74