CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HeavyIonsRun2.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 """
3 _HeavyIonsRun2_
4 
5 Scenario supporting heavy ions collisions
6 
7 """
8 
9 import os
10 import sys
11 
12 from Configuration.DataProcessing.Reco import Reco
13 import FWCore.ParameterSet.Config as cms
14 
16  def __init__(self):
17  self.recoSeq=''
18  self.cbSc='HeavyIons'
19  self.promptCustoms='Configuration/DataProcessing/RecoTLR.customiseRun2PromptHI'
20  self.expressCustoms='Configuration/DataProcessing/RecoTLR.customiseRun2ExpressHI'
21  self.visCustoms='Configuration/DataProcessing/RecoTLR.customiseRun2ExpressHI'
22  """
23  _HeavyIonsRun2_
24 
25  Implement configuration building for data processing for Heavy Ions
26  collision data taking for Run2
27 
28  """
29 
30  def _checkMINIAOD(self,**args):
31  if 'outputs' in args:
32  for a in args['outputs']:
33  if a['dataTier'] == 'MINIAOD':
34  raise RuntimeError("MINIAOD is not supported in HeavyIonsRun2")
35 
36 
37  def _setRepackedFlag(self,args):
38  if not 'repacked' in args:
39  args['repacked']= True
40 
41  def promptReco(self, globalTag, **args):
42  """
43  _promptReco_
44 
45  Heavy ions collision data taking prompt reco
46 
47  """
48  self._checkMINIAOD(**args)
49  self._setRepackedFlag(args)
50 
51  if not 'skims' in args:
52  args['skims']=['@allForPrompt']
53 
54  customsFunction = self.promptCustoms
55  if not 'customs' in args:
56  args['customs']=[ customsFunction ]
57  else:
58  args['customs'].append(customsFunction)
59 
60  process = Reco.promptReco(self,globalTag, **args)
61 
62  return process
63 
64 
65  def expressProcessing(self, globalTag, **args):
66  """
67  _expressProcessing_
68 
69  Heavy ions collision data taking express processing
70 
71  """
72  self._checkMINIAOD(**args)
73  self._setRepackedFlag(args)
74 
75  if not 'skims' in args:
76  args['skims']=['@allForExpress']
77 
78  customsFunction = self.expressCustoms
79  if not 'customs' in args:
80  args['customs']=[ customsFunction ]
81  else:
82  args['customs'].append( customsFunction )
83 
84  process = Reco.expressProcessing(self,globalTag, **args)
85 
86  return process
87 
88  def visualizationProcessing(self, globalTag, **args):
89  """
90  _visualizationProcessing_
91 
92  Heavy ions collision data taking visualization processing
93 
94  """
95  self._checkMINIAOD(**args)
96 
97  customsFunction = self.visCustoms
98  if not 'customs' in args:
99  args['customs']=[ customsFunction ]
100  else:
101  args['customs'].append( customsFunction )
102 
103  process = Reco.visualizationProcessing(self,globalTag, **args)
104 
105  return process
106 
107  def alcaHarvesting(self, globalTag, datasetName, **args):
108  """
109  _alcaHarvesting_
110 
111  Heavy ions collisions data taking AlCa Harvesting
112 
113  """
114  self._checkMINIAOD(**args)
115 
116  if not 'skims' in args and not 'alcapromptdataset' in args:
117  args['skims']=['BeamSpotByRun',
118  'BeamSpotByLumi',
119  'SiStripQuality']
120 
121  return Reco.alcaHarvesting(self, globalTag, datasetName, **args)
122 
Definition: Reco.py:1