Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:08

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("splitter")
0004 
0005 # CMSSW.2.2.3
0006 
0007 # message logger
0008 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0009 MessageLogger = cms.Service("MessageLogger",
0010     destinations = cms.untracked.vstring('LOGFILE_Offline_IdealGeom', 
0011         'cout')
0012 )
0013 ## report only every 100th record
0014 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0015 
0016 # needed for geometry
0017 #process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
0018 #process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi")
0019 #process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi")
0020 
0021 # magnetic field
0022 process.load("Configuration.StandardSequences.MagneticField_38T_cff")
0023 process.load('Configuration.StandardSequences.Services_cff')
0024 process.load("Configuration.Geometry.GeometryDB_cff")
0025 
0026 # including global tag
0027 #process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_noesprefer_cff")
0028 process.load("Alignment.OfflineValidation.GlobalTag_cff")
0029 # setting global tag
0030 process.GlobalTag.connect = "frontier://FrontierProd/CMS_COND_21X_GLOBALTAG"
0031 process.GlobalTag.globaltag = "CRAFT_ALL_V4::All"
0032 #process.GlobalTag.globaltag = "IDEAL_V9::All"
0033 #process.GlobalTag.globaltag = "STARTUP_V8::All"
0034 
0035 # track selectors and refitting
0036 process.load("Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi")
0037 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cff")
0038 process.load("RecoTracker.TrackProducer.TrackRefitters_cff")
0039 
0040 process.source = cms.Source("PoolSource",
0041     fileNames = cms.untracked.vstring('file:blah.root')
0042 )
0043 
0044 # including data...include your favorite data here
0045 process.load("Alignment.OfflineValidation.CraftRepro_SkimAB_cff")
0046 
0047 process.maxEvents = cms.untracked.PSet(
0048     input = cms.untracked.int32(250000)
0049 )
0050 
0051 
0052 # adding geometries
0053 from CondCore.DBCommon.CondDBSetup_cfi import *
0054 
0055 # for craft
0056 
0057 # CRAFT REPRO geom
0058 process.trackerAlignment = cms.ESSource("PoolDBESSource",
0059     process.CondDBSetup,
0060     toGet = cms.VPSet(cms.PSet(
0061         record = cms.string('TrackerAlignmentRcd'),
0062         tag = cms.string('Alignments')
0063     )),
0064     connect = cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/HIP/ntran/craftRepro/CRAFTrepro_HIP.db')
0065     )
0066 
0067 # APEs from sqlite
0068 process.ZeroAPE = cms.ESSource("PoolDBESSource",
0069     process.CondDBSetup,
0070     toGet = cms.VPSet(cms.PSet(
0071         record = cms.string('TrackerAlignmentErrorExtendedRcd'),
0072         tag = cms.string('TrackerSurveyLASOnlyErrors_def_210_mc')
0073         #tag = cms.string('TrackerCRAFTReRecoErrors_v1.10a_offline')
0074     )),
0075     connect = cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/HIP/zguo/APEtest/Alignments_APE_def.db')
0076 )
0077 
0078 
0079 # set prefer
0080 process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource", "trackerAlignment")
0081 process.es_prefer_ZeroAPE = cms.ESPrefer("PoolDBESSource", "ZeroAPE")
0082 
0083 #process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource", "trackerAlignment")
0084 
0085 # hit filter
0086 process.load("Alignment.TrackHitFilter.TrackHitFilter_cfi")
0087 # parameters for TrackHitFilter
0088 #process.TrackHitFilter.src = "cosmictrackfinderP5"
0089 #process.TrackHitFilter.src = 'ALCARECOTkAlCosmicsCTF'
0090 process.TrackHitFilter.src = 'ALCARECOTkAlCosmicsCTF0T'
0091 
0092 process.TrackHitFilter.hitSelection = "All"        
0093 #process.TrackHitFilter.rejectBadStoNHits = True
0094 #process.TrackHitFilter.theStoNthreshold = 14
0095 #process.TrackHitFilter.minHitsForRefit = 6
0096 #process.TrackHitFilter.rejectBadMods = True
0097 
0098 
0099 
0100 # refit tracks first
0101 process.TrackRefitterP5.src = 'TrackHitFilter'
0102 #process.TrackRefitterP5.src = "ALCARECOTkAlCosmicsCosmicTF0T"
0103 process.TrackRefitterP5.TrajectoryInEvent = True
0104 process.TrackRefitterP5.TTRHBuilder = "WithTrackAngle"
0105 process.FittingSmootherRKP5.EstimateCut = -1
0106 
0107 # module configuration
0108 # alignment track selector
0109 #process.AlignmentTrackSelector.src = "ALCARECOTkAlCosmicsCTF0T"
0110 process.AlignmentTrackSelector.src = "TrackRefitterP5"
0111 #process.AlignmentTrackSelector.src = "TrackHitFilter"
0112 process.AlignmentTrackSelector.filter = True
0113 process.AlignmentTrackSelector.applyBasicCuts = True
0114 process.AlignmentTrackSelector.ptMin   = 0.
0115 process.AlignmentTrackSelector.pMin   = 4.  
0116 process.AlignmentTrackSelector.ptMax   = 9999.  
0117 process.AlignmentTrackSelector.pMax   = 9999.   
0118 process.AlignmentTrackSelector.etaMin  = -9999.
0119 process.AlignmentTrackSelector.etaMax  = 9999.
0120 process.AlignmentTrackSelector.nHitMin = 10
0121 process.AlignmentTrackSelector.nHitMin2D = 2
0122 process.AlignmentTrackSelector.chi2nMax = 9999.
0123 process.AlignmentTrackSelector.applyMultiplicityFilter = True
0124 process.AlignmentTrackSelector.maxMultiplicity = 1
0125 process.AlignmentTrackSelector.applyNHighestPt = False
0126 process.AlignmentTrackSelector.nHighestPt = 1
0127 process.AlignmentTrackSelector.seedOnlyFrom = 0 
0128 process.AlignmentTrackSelector.applyIsolationCut = False
0129 process.AlignmentTrackSelector.minHitIsolation = 0.8
0130 process.AlignmentTrackSelector.applyChargeCheck = False
0131 process.AlignmentTrackSelector.minHitChargeStrip = 50.
0132 process.AlignmentTrackSelector.minHitsPerSubDet.inBPIX = 2
0133 process.KFFittingSmootherWithOutliersRejectionAndRK.EstimateCut=30.0
0134 process.KFFittingSmootherWithOutliersRejectionAndRK.MinNumberOfHits=4
0135 
0136 
0137 
0138 # configuration of the track spitting module
0139 # new cuts allow for cutting on the impact parameter of the original track
0140 process.load("RecoTracker.FinalTrackSelectors.cosmicTrackSplitter_cfi")
0141 process.cosmicTrackSplitter.tracks='AlignmentTrackSelector'
0142 process.cosmicTrackSplitter.tjTkAssociationMapTag='TrackRefitterP5'
0143 
0144 #---------------------------------------------------------------------
0145 # the output of the track hit filter are track candidates
0146 # give them to the TrackProducer
0147 process.ctfWithMaterialTracksP5.src = 'cosmicTrackSplitter'
0148 process.ctfWithMaterialTracksP5.TrajectoryInEvent = True
0149 process.ctfWithMaterialTracksP5.TTRHBuilder = "WithTrackAngle"
0150 
0151 # second refit
0152 import RecoTracker.TrackProducer.TrackRefitters_cff
0153 process.TrackRefitter2 = RecoTracker.TrackProducer.TrackRefitterP5_cfi.TrackRefitterP5.clone()
0154 process.TrackRefitter2.src = 'ctfWithMaterialTracksP5'
0155 process.TrackRefitter2.TrajectoryInEvent = True
0156 process.TrackRefitter2.TTRHBuilder = "WithTrackAngle"
0157 
0158 process.cosmicValidation = cms.EDAnalyzer("CosmicSplitterValidation",
0159                                         ifSplitMuons = cms.bool(False),
0160                                         checkIfGolden = cms.bool(False),
0161                                         splitTracks = cms.InputTag("TrackRefitter2","","splitter"),
0162                                         splitGlobalMuons = cms.InputTag("muons","","splitter"),
0163                                         originalTracks = cms.InputTag("TrackRefitterP5"),
0164                                         originalGlobalMuons = cms.InputTag("muons","","Rec")
0165 )
0166 
0167 process.TFileService = cms.Service("TFileService",
0168     fileName = cms.string('output.root')
0169 )
0170 
0171 process.p = cms.Path(process.offlineBeamSpot*process.TrackHitFilter*process.TrackRefitterP5*process.AlignmentTrackSelector*process.cosmicTrackSplitter*process.ctfWithMaterialTracksP5*process.TrackRefitter2*process.cosmicValidation)
0172 
0173