Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:33:36

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # example of redoing the Primary vertex reconstruction before analyzing
0004 
0005 process = cms.Process("redoPV")
0006 
0007 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100))
0008 process.source = cms.Source("PoolSource",
0009     fileNames = cms.untracked.vstring('/store/mc/Spring10/MinBias/GEN-SIM-RECO/START3X_V25B_356ReReco-v1/0004/0E72CE54-F43B-DF11-A06F-0026189438BD.root')
0010 )
0011 
0012 
0013 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0014 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0015 process.load("Configuration.StandardSequences.MagneticField_38T_cff")
0016 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0017 process.GlobalTag.globaltag= "START3X_V25B::All"
0018 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0019 
0020 #process.load("Configuration.EventContent.EventContent_cff")
0021 
0022 
0023 process.load("RecoVertex.Configuration.RecoVertex_cff")
0024 
0025 
0026 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import *
0027 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVerticesWithBS_cfi import *
0028 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVerticesDA_cfi import *
0029 process.load("RecoVertex.PrimaryVertexProducer.OfflinePrimaryVerticesDA_cfi")  # not in the standard configuration
0030 
0031 # new squence (if needed)
0032 #process.vertexreco = cms.Sequence(offlinePrimaryVertices)
0033 process.vertexreco = cms.Sequence(offlinePrimaryVertices*offlinePrimaryVerticesWithBS*offlinePrimaryVerticesDA)
0034 
0035 
0036 # new parameters (if needed)
0037 
0038 
0039 # track selection, common for all producers here (doesn't have to be)
0040 TkFilterParameters=cms.PSet(
0041     minPt = cms.double(0.0),                   # direct pt cut
0042     maxD0Significance = cms.double(5.0),       # impact parameter significance
0043     maxNormalizedChi2 = cms.double(5.0),       # loose cut on track chi**2
0044     minPixelLayersWithHits = cms.int32(2),     # two or more pixel layers
0045     minSiliconLayersWithHits = cms.int32(5),   # five or more tracker layers (includes pixels)
0046     trackQuality = cms.string("any")           # track quality not used
0047     )
0048 
0049 
0050 # offlinePrimaryVertices   gap clustering with unconstrained fit
0051 process.offlinePrimaryVertices.verbose = cms.untracked.bool(False)            
0052 process.offlinePrimaryVertices.TkFilterParameters=TkFilterParameters
0053 process.offlinePrimaryVertices.TrackLabel = cms.InputTag("generalTracks")
0054 process.offlinePrimaryVertices.minNdof  = cms.double(0.0)     # ndof = 2 * sum(weights) - 3, ndof >0 means 
0055 process.offlinePrimaryVertices.PVSelParameters=cms.PSet(  maxDistanceToBeam = cms.double(0.1)   )  
0056 process.offlinePrimaryVertices.TkClusParameters=cms.PSet(algorithm=cms.string('gap'),                        # clustering algorithm
0057                                                          TkGapClusParameters=cms.PSet(zSeparation = cms.double(0.2))) # 2 mm separation
0058 
0059 
0060 # offlinePrimaryVertices   gap clustering with beam-constrained fit
0061 process.offlinePrimaryVerticesWithBS.verbose = cms.untracked.bool(False)
0062 process.offlinePrimaryVerticesWithBS.TkFilterParameters=TkFilterParameters
0063 process.offlinePrimaryVerticesWithBS.TrackLabel = cms.InputTag("generalTracks")
0064 process.offlinePrimaryVerticesWithBS.minNdof  = cms.double(2.0)   # ndof = 2 * sum(weights), ndof>2 means more than one track
0065 process.offlinePrimaryVerticesWithBS.PVSelParameters=cms.PSet(   maxDistanceToBeam = cms.double(1.0)   )  # irrelevant with constraint
0066 process.offlinePrimaryVerticesWithBS.TkClusParameters=cms.PSet(algorithm=cms.string('gap'),                 # clustering algorithm
0067                                                              TkGapClusParameters=cms.PSet(zSeparation = cms.double(0.2))) # 2 mm separation
0068 
0069 
0070 # offlinePrimaryVerticesDA   deterministic annealing clustering + fit with beam constraint
0071 process.offlinePrimaryVerticesDA.verbose = cms.untracked.bool(False)
0072 process.offlinePrimaryVerticesDA.TkFilterParameters=TkFilterParameters
0073 process.offlinePrimaryVerticesDA.TrackLabel = cms.InputTag("generalTracks")
0074 process.offlinePrimaryVerticesDA.minNdof  = cms.double(2.0)
0075 process.offlinePrimaryVerticesDA.PVSelParameters=cms.PSet(   maxDistanceToBeam = cms.double(1.0)   )
0076 process.offlinePrimaryVerticesDA.TkClusParameters=cms.PSet(
0077     algorithm=cms.string('DA'),
0078     TkDAClusParameters = cms.PSet(
0079       coolingFactor = cms.double(0.8),  #  slow annealing
0080       Tmin = cms.double(4.0),           #  freezeout temperature
0081       vertexSize = cms.double(0.05)     #  ~ resolution / sqrt(Tmin)
0082     )
0083 )
0084 
0085 
0086 
0087 
0088 # the analyzer 
0089 process.load("SimTracker.TrackAssociatiorProducer.trackAssociatorByHits_cfi")
0090 process.load("Validation.RecoVertex.VertexValidation_cff")
0091 
0092 
0093 
0094 process.p = cms.Path(process.vertexreco*process.vertexValidation)
0095