Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("BSworkflow")
0004 
0005 process.source = cms.Source("PoolSource",
0006     fileNames = cms.untracked.vstring(
0007       "/store/express/Run2015A/StreamExpress/ALCARECO/TkAlMinBias-Express-v1/000/246/959/00000/14174DF2-490A-E511-9862-02163E0143E9.root",
0008     )
0009 )
0010 
0011 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0012 process.MessageLogger.cerr.FwkReport  = cms.untracked.PSet(
0013     reportEvery = cms.untracked.int32(10000),
0014 )
0015 process.MessageLogger.debugModules = ['BeamSpotAnalyzer']
0016 
0017 process.maxEvents = cms.untracked.PSet(
0018     input = cms.untracked.int32(-1) 
0019 )
0020 
0021 process.options = cms.untracked.PSet(
0022     wantSummary = cms.untracked.bool(True)
0023 )
0024 
0025 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi")
0026 process.load("Configuration.StandardSequences.MagneticField_cff") 
0027 process.load('Configuration.Geometry.GeometryRecoDB_cff')
0028 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") 
0029 # this GT is for the Express, to be consistent with the file above
0030 # in general this GT should be for the ReReco
0031 process.GlobalTag.globaltag = 'GR_E_V48'
0032 
0033 ## Track refit
0034 process.load("RecoTracker.TrackProducer.TrackRefitters_cff")
0035 
0036 # remove the following lines if you run on RECO files
0037 process.TrackRefitter.src = 'ALCARECOTkAlMinBias'
0038 process.TrackRefitter.NavigationSchool = ''
0039 
0040 
0041 ## PV refit
0042 process.load("TrackingTools.TransientTrack.TransientTrackBuilder_cfi")
0043 
0044 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices 
0045 process.offlinePrimaryVerticesFromRefittedTrks  = offlinePrimaryVertices.clone()
0046 process.offlinePrimaryVerticesFromRefittedTrks.TrackLabel                                       = cms.InputTag("TrackRefitter") 
0047 process.offlinePrimaryVerticesFromRefittedTrks.vertexCollections.maxDistanceToBeam              = 1
0048 process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.maxNormalizedChi2             = 20
0049 process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.minSiliconLayersWithHits      = 5
0050 process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.maxD0Significance             = 5.0 
0051 process.offlinePrimaryVerticesFromRefittedTrks.TkFilterParameters.minPixelLayersWithHits        = 2   
0052 
0053 
0054                      
0055 ## BeamSpot fit
0056 process.load("RecoVertex.BeamSpotProducer.d0_phi_analyzer_cff")
0057 
0058 process.d0_phi_analyzer.BeamFitter.WriteAscii                = True
0059 process.d0_phi_analyzer.BeamFitter.AsciiFileName             = 'BeamFit_LumiBased_NewAlignWorkflow_alcareco.txt'
0060 process.d0_phi_analyzer.BeamFitter.AppendRunToFileName       = False
0061 process.d0_phi_analyzer.BeamFitter.InputBeamWidth            = -1
0062 process.d0_phi_analyzer.BeamFitter.MaximumImpactParameter    = 1.0
0063 process.d0_phi_analyzer.BeamFitter.MaximumNormChi2           = 10
0064 process.d0_phi_analyzer.BeamFitter.MinimumInputTracks        = 50
0065 process.d0_phi_analyzer.BeamFitter.MinimumPixelLayers        = -1
0066 process.d0_phi_analyzer.BeamFitter.MinimumPt                 = 1.0
0067 process.d0_phi_analyzer.BeamFitter.MinimumTotalLayers        = 6
0068 process.d0_phi_analyzer.BeamFitter.OutputFileName            = 'BeamFit_LumiBased_Workflow_alcareco.root' 
0069 process.d0_phi_analyzer.BeamFitter.TrackAlgorithm            = cms.untracked.vstring()
0070 process.d0_phi_analyzer.BeamFitter.TrackCollection           = 'TrackRefitter'
0071 process.d0_phi_analyzer.BeamFitter.SaveFitResults            = True
0072 process.d0_phi_analyzer.BeamFitter.SaveNtuple                = False
0073 process.d0_phi_analyzer.BeamFitter.SavePVVertices            = True
0074    
0075 process.d0_phi_analyzer.PVFitter.Apply3DFit                  = True
0076 process.d0_phi_analyzer.PVFitter.minNrVerticesForFit         = 10 
0077 process.d0_phi_analyzer.PVFitter.nSigmaCut                   = 50.0
0078 process.d0_phi_analyzer.PVFitter.VertexCollection            = 'offlinePrimaryVerticesFromRefittedTrks' 
0079    
0080 process.d0_phi_analyzer.BSAnalyzerParameters.fitEveryNLumi   = 1
0081 process.d0_phi_analyzer.BSAnalyzerParameters.resetEveryNLumi = 1
0082 
0083 
0084 process.p = cms.Path(process.offlineBeamSpot                        + 
0085                      process.TrackRefitter                          + 
0086                      process.offlinePrimaryVerticesFromRefittedTrks +
0087                      process.d0_phi_analyzer)