Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-08 22:16:55

0001 #!/usr/bin/env python3
0002 """
0003 _AlCaNano_
0004 
0005 Scenario supporting proton collisions for AlCa needs when ALCANANO is produced
0006 
0007 """
0008 from __future__ import print_function
0009 
0010 import os
0011 import sys
0012 
0013 from Configuration.DataProcessing.Scenario import *
0014 from Configuration.DataProcessing.Utils import stepALCAPRODUCER,dqmIOSource,harvestingMode,dictIO,gtNameAndConnect,addMonitoring
0015 import FWCore.ParameterSet.Config as cms
0016 
0017 class AlCaNano(Scenario):
0018     def __init__(self):
0019         Scenario.__init__(self)
0020         self.recoSeq=''
0021         self.promptCustoms= [ 'Configuration/DataProcessing/RecoTLR.customisePrompt' ]
0022         self.promptModifiers = cms.ModifierChain()
0023 
0024     """
0025     _AlCaNano_
0026 
0027     Implement configuration building for data processing for proton
0028     collision data taking for AlCa needs when ALCANANO is produced
0029 
0030     """
0031 
0032     def skimsIfNotGiven(self,args,sl):
0033         if not 'skims' in args:
0034             args['skims']=sl
0035 
0036     def promptReco(self, globalTag, **args):
0037         if not 'skims' in args:
0038             args['skims']=self.skims
0039         if not 'customs' in args:
0040             args['customs']= [ ]
0041         for c in self.promptCustoms:
0042             args['customs'].append(c)
0043 
0044         options = Options()
0045         options.__dict__.update(defaultOptions.__dict__)
0046         options.scenario = "pp"
0047         dictIO(options,args)
0048         options.conditions = gtNameAndConnect(globalTag, args)
0049 
0050         if 'customs' in args:
0051             print(args['customs'])
0052             options.customisation_file=args['customs']
0053 
0054         options.step = 'RECO'
0055         options.step += self.recoSeq
0056         options.step += stepALCAPRODUCER(args['skims'])
0057 
0058         process = cms.Process('RECO', cms.ModifierChain(self.eras, self.promptModifiers) )
0059         cb = ConfigBuilder(options, process = process, with_output = True)
0060 
0061         # Input source
0062         process.source = cms.Source("PoolSource",
0063             fileNames = cms.untracked.vstring()
0064         )
0065         cb.prepare()
0066 
0067         return process