Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:30:35

0001 # produce pixel cluster & rechits from digia
0002 # works directly or through raw
0003 # 
0004 #
0005 ##############################################################################
0006 
0007 import FWCore.ParameterSet.Config as cms
0008 
0009 process = cms.Process("TrackTest")
0010 
0011 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0012 process.load("Configuration.Geometry.GeometryIdeal_cff")
0013 process.load("Configuration.StandardSequences.MagneticField_38T_cff")
0014 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0015 process.load("Configuration.StandardSequences.Services_cff")
0016 process.load('Configuration.EventContent.EventContent_cff')
0017 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0018 
0019 # clusterizer 
0020 process.load("RecoLocalTracker.Configuration.RecoLocalTracker_cff")
0021 
0022 # for raw
0023 #process.load("EventFilter.SiPixelRawToDigi.SiPixelDigiToRaw_cfi")
0024 #process.load("EventFilter.SiPixelRawToDigi.SiPixelRawToDigi_cfi")
0025 process.load('Configuration.StandardSequences.DigiToRaw_cff')
0026 process.load('Configuration.StandardSequences.RawToDigi_cff')
0027 
0028 # needed for pixel RecHits (templates?)
0029 process.load("Configuration.StandardSequences.Reconstruction_cff")
0030 #process.load("RecoTracker.Configuration.RecoTracker_cff")
0031 
0032 process.maxEvents = cms.untracked.PSet(
0033     input = cms.untracked.int32(10)
0034 )
0035 
0036 process.MessageLogger = cms.Service("MessageLogger",
0037 #    debugModules = cms.untracked.vstring('SiPixelClusterizer'),
0038     debugModules = cms.untracked.vstring('SiPixelRecHits'),
0039     destinations = cms.untracked.vstring('cout'),
0040 #    destinations = cms.untracked.vstring("log","cout"),
0041     cout = cms.untracked.PSet(
0042 #       threshold = cms.untracked.string('INFO')
0043 #       threshold = cms.untracked.string('ERROR')
0044         threshold = cms.untracked.string('WARNING')
0045 #        threshold = cms.untracked.string('DEBUG')
0046     )
0047 #    log = cms.untracked.PSet(
0048 #        threshold = cms.untracked.string('DEBUG')
0049 #    )
0050 )
0051 # get the files from DBS:
0052 process.source = cms.Source("PoolSource",
0053     fileNames = cms.untracked.vstring(
0054     'file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/digis_trk/digis2_mc71.root'
0055 #    'file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100/digis_trk/digis1.root'
0056     )
0057 )
0058 
0059 # Choose the global tag here:
0060 process.GlobalTag.globaltag = 'PRE_STA71_V4::All'
0061 #process.GlobalTag.globaltag = 'MC_71_V1::All'
0062 # process.GlobalTag.globaltag = 'POSTLS171_V1::All'
0063 # process.GlobalTag.globaltag = 'PRE_MC_71_V2::All'
0064 
0065 
0066 process.o1 = cms.OutputModule("PoolOutputModule",
0067 #        outputCommands = cms.untracked.vstring('drop *','keep *_*_*_TrackTest'),
0068         fileName = cms.untracked.string('file:tracks.root'),
0069 #       fileName = cms.untracked.string('file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/tracks/tracks_test.root'),
0070 #    splitLevel = cms.untracked.int32(0),
0071 #    eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0072     outputCommands = process.RECOSIMEventContent.outputCommands,
0073     dataset = cms.untracked.PSet(
0074         filterName = cms.untracked.string(''),
0075         dataTier = cms.untracked.string('RECO')
0076     )
0077 
0078 )
0079 
0080 # pixel local reco (RecHits) needs the GenError object,
0081 # not yet in GT, add here:
0082 # DB stuff 
0083 useLocalDBError = True
0084 if useLocalDBError :
0085     process.DBReaderFrontier = cms.ESSource("PoolDBESSource",
0086      DBParameters = cms.PSet(
0087          messageLevel = cms.untracked.int32(0),
0088          authenticationPath = cms.untracked.string('')
0089      ),
0090      toGet = cms.VPSet(
0091        cms.PSet(
0092          record = cms.string('SiPixelGenErrorDBObjectRcd'),
0093 #    tag = cms.string("SiPixelGenErrorDBObject38Tv1")
0094 #        tag = cms.string('SiPixelGenErrorDBObject_38T_2012_IOV7_v1')
0095          tag = cms.string('SiPixelGenErrorDBObject_38T_v1_offline')
0096      ),
0097        ),
0098 #     connect = cms.string('sqlite_file:siPixelGenErrors38T_2012_IOV7_v1.db')
0099 #     connect = cms.string('frontier://FrontierProd/CMS_COND_31X_PIXEL')
0100 #     connect = cms.string('frontier://FrontierPrep/CMS_COND_PIXEL')
0101      connect = cms.string('frontier://FrontierProd/CMS_COND_PIXEL_000')
0102     ) # end process
0103 process.myprefer = cms.ESPrefer("PoolDBESSource","DBReaderFrontier")
0104 
0105 
0106 #process.Timing = cms.Service("Timing")
0107 #process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck")
0108 
0109 # My 
0110 # modify clusterie parameters
0111 #process.siPixelClusters.ClusterThreshold = 4000.0
0112 
0113 # direct clusterization (no raw step)
0114 # label of digis 
0115 #process.siPixelClusters.src = 'mix'
0116 
0117 # plus pixel clusters  (OK)
0118 #process.p1 = cms.Path(process.siPixelClusters)
0119 
0120 # plus pixel rechits (OK)
0121 #process.p1 = cms.Path(process.pixeltrackerlocalreco)
0122 
0123 # clusterize through raw (OK)
0124 # for digi to raw 
0125 # my old
0126 #process.siPixelRawData.InputLabel = 'mix'
0127 #process.SiStripDigiToRaw.InputModuleLabel = 'mix'
0128 # my new 
0129 process.siPixelRawData.InputLabel = 'simSiPixelDigis'
0130 process.SiStripDigiToRaw.InputDigis = cms.InputTag('simSiPixelDigis', "ZeroSuppressed")
0131 # for Raw2digi for simulations 
0132 process.siPixelDigis.InputLabel = 'siPixelRawData'
0133 process.siStripDigis.ProductLabel = 'SiStripDigiToRaw'
0134 # for digi to clu
0135 process.siPixelClusters.src = 'siPixelDigis'
0136 
0137 # pixel only 
0138 #process.p1 = cms.Path(process.siPixelRawData)
0139 #process.p1 = cms.Path(process.siPixelRawData*process.siPixelDigis)
0140 #process.p1 = cms.Path(process.siPixelRawData*process.siPixelDigis*process.pixeltrackerlocalreco)
0141 
0142 # with strips ok
0143 #process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw)
0144 #process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw*process.siPixelDigis*process.siStripDigis)
0145 
0146 # runs ok
0147 #process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw*process.siPixelDigis*process.siStripDigis*process.trackerlocalreco)
0148 
0149 # runs ok
0150 #process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw*process.siPixelDigis*process.siStripDigis*process.trackerlocalreco*process.offlineBeamSpot)
0151 
0152 # runs ok
0153 #process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw*process.siPixelDigis*process.siStripDigis*process.trackerlocalreco*process.offlineBeamSpot*process.MeasurementTrackerEvent)
0154 
0155 # runs ok
0156 #process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw*process.siPixelDigis*process.siStripDigis*process.trackerlocalreco*process.offlineBeamSpot*process.MeasurementTrackerEvent*process.siPixelClusterShapeCache*process.recopixelvertexing)
0157 
0158 process.load("RecoTracker.IterativeTracking.iterativeTk_cff")
0159 
0160 # copy the sequence below from  
0161 # RecoTracker/IterativeTracking/python/iterativeTk_cff.py  - 71_pre7
0162 process.myTracking = cms.Sequence(process.InitialStep*
0163                             process.DetachedTripletStep*
0164                             process.LowPtTripletStep*
0165                             process.PixelPairStep*
0166                             process.MixedTripletStep*
0167                             process.PixelLessStep*
0168                             process.TobTecStep*
0169                             process.earlyGeneralTracks*
0170                             # muonSeededStep*
0171                             process.preDuplicateMergingGeneralTracks*
0172                             process.generalTracksSequence*
0173                             process.ConvStep*
0174                             process.conversionStepTracks
0175                             )
0176 
0177 # run full tracking
0178 # trackingGlobalReco does not work, needs EarlyMuons for muon seeding.
0179 # ckftracks & iterTracking does not work as well  (same problem).
0180 process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw*process.siPixelDigis*process.siStripDigis*process.trackerlocalreco*process.offlineBeamSpot*process.siPixelClusterShapeCache*process.recopixelvertexing*process.MeasurementTrackerEvent*process.myTracking*process.vertexreco)
0181 
0182 # unused 
0183 # Path and EndPath definitions
0184 #process.raw2digi_step = cms.Path(process.RawToDigi)
0185 #process.reconstruction_step = cms.Path(process.reconstruction)
0186 #process.endjob_step = cms.EndPath(process.endOfProcess)
0187 #process.RECOSIMoutput_step = cms.EndPath(process.RECOSIMoutput)
0188 # Schedule definition
0189 #process.schedule = cms.Schedule(process.raw2digi_step,process.reconstruction_step,process.endjob_step,process.RECOSIMoutput_step)
0190 
0191 process.outpath = cms.EndPath(process.o1)