Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:01

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 from Configuration.Eras.Era_Run2_2016_cff import Run2_2016
0005 process = cms.Process('RECO2',Run2_2016)
0006 
0007 options = VarParsing.VarParsing('analysis')
0008 options.register('globalTag',
0009                  "auto:run2_mc", # default value
0010                  VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0011                  VarParsing.VarParsing.varType.string, # string, int, or float
0012                  "input file name")
0013 options.parseArguments()
0014 
0015 # import of standard configurations
0016 process.load('Configuration.StandardSequences.Services_cff')
0017 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0018 process.load('FWCore.MessageService.MessageLogger_cfi')
0019 process.load('Configuration.EventContent.EventContent_cff')
0020 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0021 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0022 process.load('Configuration.StandardSequences.MagneticField_cff')
0023 process.load('Configuration.StandardSequences.Reconstruction_cff')
0024 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0025 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0026     
0027 process.source = cms.Source("PoolSource",
0028                             fileNames = cms.untracked.vstring(options.inputFiles),
0029                             secondaryFileNames = cms.untracked.vstring()
0030                             )
0031 
0032 process.maxEvents = cms.untracked.PSet(
0033     input = cms.untracked.int32(options.maxEvents)
0034 )
0035 
0036 process.options = cms.untracked.PSet()
0037 
0038 # Production Info
0039 process.configurationMetadata = cms.untracked.PSet(
0040     annotation = cms.untracked.string('step1 nevts:1'),
0041     name = cms.untracked.string('Applications'),
0042     version = cms.untracked.string('$Revision: 1.19 $')
0043 )
0044 
0045 # Output definition
0046 
0047 process.RECOSIMoutput = cms.OutputModule("PoolOutputModule",
0048     dataset = cms.untracked.PSet(
0049         dataTier = cms.untracked.string(''),
0050         filterName = cms.untracked.string('')
0051     ),
0052     fileName = cms.untracked.string('step1_RECO.root'),
0053     outputCommands = process.RECOSIMEventContent.outputCommands,
0054     splitLevel = cms.untracked.int32(0)
0055 )
0056 
0057 # Additional output definition
0058 process.RECOSIMoutput.outputCommands = cms.untracked.vstring("keep *_myRefittedTracks_*_*")
0059 
0060 # Other statements
0061 from Configuration.AlCa.GlobalTag import GlobalTag
0062 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0063 
0064 import RecoTracker.TrackProducer.trackProducerFromPatMuons_cfi
0065 process.tracksFromMuons  = RecoTracker.TrackProducer.trackProducerFromPatMuons_cfi.trackProducerFromPatMuons.clone(
0066     src = "slimmedMuons",
0067     innerTrackOnly = True
0068 )
0069 
0070 import RecoTracker.TrackProducer.TrackRefitter_cfi
0071 process.myRefittedTracks = RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitter.clone(
0072     src = 'tracksFromMuons',
0073     NavigationSchool = '',
0074     Fitter = 'FlexibleKFFittingSmoother'
0075 )
0076                                          
0077 # Path and EndPath definitions
0078 process.reconstruction_step = cms.Path(process.tracksFromMuons*process.myRefittedTracks, 
0079     cms.Task(process.TTRHBuilderAngleAndTemplate, process.templates, process.SiPixelTemplateStoreESProducer))
0080 process.endjob_step = cms.EndPath(process.endOfProcess)
0081 process.RECOSIMoutput_step = cms.EndPath(process.RECOSIMoutput)
0082 
0083 # Schedule definition
0084 process.schedule = cms.Schedule(process.reconstruction_step,process.endjob_step,process.RECOSIMoutput_step)