Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
#!/usr/bin/env python3
"""
_HeavyIons_

Scenario supporting heavy ions collisions

"""

import os
import sys

from Configuration.DataProcessing.Reco import Reco
import FWCore.ParameterSet.Config as cms
from Configuration.DataProcessing.Modifiers import modifyExpressHI

class HeavyIons(Reco):
    def __init__(self):
        Reco.__init__(self)
        self.recoSeq=''
        self.cbSc='HeavyIons'
        self.promptCustoms= [ 'Configuration/DataProcessing/RecoTLR.customisePromptHI' ]
        self.expressCustoms= [ ]
        self.expressModifiers = modifyExpressHI
        self.visCustoms= [ ]
        self.visModifiers = modifyExpressHI
    """
    _HeavyIons_

    Implement configuration building for data processing for Heavy Ions
    collision data taking

    """

    def _checkMINIAOD(self,**args):
        if 'outputs' in args:
            for a in args['outputs']:
                if a['dataTier'] == 'MINIAOD':
                    raise RuntimeError("MINIAOD is not supported in HeavyIons")

                
    def _setRepackedFlag(self,args):
        if not 'repacked' in args:
            args['repacked']= True

    def promptReco(self, globalTag, **args):
        """
        _promptReco_

        Heavy ions collision data taking prompt reco

        """
        self._checkMINIAOD(**args)
        self._setRepackedFlag(args)

        if not 'skims' in args:
            args['skims']=['@allForPrompt']

        if not 'customs' in args:
            args['customs']=[ ]

        for c in self.promptCustoms:
            args['customs'].append(c)

        process = Reco.promptReco(self,globalTag, **args)

        return process


    def expressProcessing(self, globalTag, **args):
        """
        _expressProcessing_

        Heavy ions collision data taking express processing

        """
        self._checkMINIAOD(**args)
        self._setRepackedFlag(args)

        if not 'skims' in args:
            args['skims']=['@allForExpress']

        if not 'customs' in args:
            args['customs']=[ ]

        for c in self.expressCustoms:
            args['customs'].append(c)

        process = Reco.expressProcessing(self,globalTag, **args)
        
        return process

    def visualizationProcessing(self, globalTag, **args):
        """
        _visualizationProcessing_

        Heavy ions collision data taking visualization processing

        """
        self._checkMINIAOD(**args)
        self._setRepackedFlag(args)

        if not 'customs' in args:
            args['customs']=[ ]

        for c in self.visCustoms:
            args['customs'].append(c)

        process = Reco.visualizationProcessing(self,globalTag, **args)
        
        return process

    def alcaHarvesting(self, globalTag, datasetName, **args):
        """
        _alcaHarvesting_

        Heavy ions collisions data taking AlCa Harvesting

        """
        self._checkMINIAOD(**args)

        if not 'skims' in args and not 'alcapromptdataset' in args:
            args['skims']=['BeamSpotByRun',
                           'BeamSpotByLumi',
                           'SiStripQuality']
            
        return Reco.alcaHarvesting(self, globalTag, datasetName, **args)