Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-07 22:32:55

0001 #!/usr/bin/env python3
0002 """
0003 _HeavyIons_
0004 
0005 Scenario supporting heavy ions collisions
0006 
0007 """
0008 
0009 import os
0010 import sys
0011 
0012 from Configuration.DataProcessing.Reco import Reco
0013 import FWCore.ParameterSet.Config as cms
0014 from Configuration.DataProcessing.Modifiers import modifyExpressHI
0015 
0016 class HeavyIons(Reco):
0017     def __init__(self):
0018         Reco.__init__(self)
0019         self.recoSeq=''
0020         self.cbSc='HeavyIons'
0021         self.promptCustoms= [ 'Configuration/DataProcessing/RecoTLR.customisePromptHI' ]
0022         self.expressCustoms= [ ]
0023         self.expressModifiers = modifyExpressHI
0024         self.visCustoms= [ ]
0025         self.visModifiers = modifyExpressHI
0026     """
0027     _HeavyIons_
0028 
0029     Implement configuration building for data processing for Heavy Ions
0030     collision data taking
0031 
0032     """
0033 
0034     def _checkMINIAOD(self,**args):
0035         if 'outputs' in args:
0036             for a in args['outputs']:
0037                 if a['dataTier'] == 'MINIAOD':
0038                     raise RuntimeError("MINIAOD is not supported in HeavyIons")
0039 
0040                 
0041     def _setRepackedFlag(self,args):
0042         if not 'repacked' in args:
0043             args['repacked']= True
0044 
0045     def promptReco(self, globalTag, **args):
0046         """
0047         _promptReco_
0048 
0049         Heavy ions collision data taking prompt reco
0050 
0051         """
0052         self._checkMINIAOD(**args)
0053         self._setRepackedFlag(args)
0054 
0055         if not 'skims' in args:
0056             args['skims']=['@allForPrompt']
0057 
0058         if not 'customs' in args:
0059             args['customs']=[ ]
0060 
0061         for c in self.promptCustoms:
0062             args['customs'].append(c)
0063 
0064         process = Reco.promptReco(self,globalTag, **args)
0065 
0066         return process
0067 
0068 
0069     def expressProcessing(self, globalTag, **args):
0070         """
0071         _expressProcessing_
0072 
0073         Heavy ions collision data taking express processing
0074 
0075         """
0076         self._checkMINIAOD(**args)
0077         self._setRepackedFlag(args)
0078 
0079         if not 'skims' in args:
0080             args['skims']=['@allForExpress']
0081 
0082         if not 'customs' in args:
0083             args['customs']=[ ]
0084 
0085         for c in self.expressCustoms:
0086             args['customs'].append(c)
0087 
0088         process = Reco.expressProcessing(self,globalTag, **args)
0089         
0090         return process
0091 
0092     def visualizationProcessing(self, globalTag, **args):
0093         """
0094         _visualizationProcessing_
0095 
0096         Heavy ions collision data taking visualization processing
0097 
0098         """
0099         self._checkMINIAOD(**args)
0100         self._setRepackedFlag(args)
0101 
0102         if not 'customs' in args:
0103             args['customs']=[ ]
0104 
0105         for c in self.visCustoms:
0106             args['customs'].append(c)
0107 
0108         process = Reco.visualizationProcessing(self,globalTag, **args)
0109         
0110         return process
0111 
0112     def alcaHarvesting(self, globalTag, datasetName, **args):
0113         """
0114         _alcaHarvesting_
0115 
0116         Heavy ions collisions data taking AlCa Harvesting
0117 
0118         """
0119         self._checkMINIAOD(**args)
0120 
0121         if not 'skims' in args and not 'alcapromptdataset' in args:
0122             args['skims']=['BeamSpotByRun',
0123                            'BeamSpotByLumi',
0124                            'SiStripQuality']
0125             
0126         return Reco.alcaHarvesting(self, globalTag, datasetName, **args)
0127