Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:03

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("CluToTrack")
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 # for data?
0020 #process.load('Configuration.StandardSequences.Reconstruction_Data_cff')
0021 
0022 
0023 # clusterizer 
0024 process.load("RecoLocalTracker.Configuration.RecoLocalTracker_cff")
0025 
0026 # for raw
0027 #process.load("EventFilter.SiPixelRawToDigi.SiPixelDigiToRaw_cfi")
0028 #process.load("EventFilter.SiPixelRawToDigi.SiPixelRawToDigi_cfi")
0029 process.load('Configuration.StandardSequences.DigiToRaw_cff')
0030 process.load('Configuration.StandardSequences.RawToDigi_cff')
0031 
0032 # needed for pixel RecHits (templates?)
0033 process.load("Configuration.StandardSequences.Reconstruction_cff")
0034 #process.load("RecoTracker.Configuration.RecoTracker_cff")
0035 
0036 process.load('Configuration.EventContent.EventContent_cff')
0037 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0038 
0039 process.maxEvents = cms.untracked.PSet(
0040     input = cms.untracked.int32(1000)
0041 )
0042 
0043 process.MessageLogger = cms.Service("MessageLogger",
0044 #    debugModules = cms.untracked.vstring('SiPixelClusterizer'),
0045     debugModules = cms.untracked.vstring('SiPixelRecHits'),
0046     destinations = cms.untracked.vstring('cout'),
0047 #    destinations = cms.untracked.vstring("log","cout"),
0048     cout = cms.untracked.PSet(
0049 #       threshold = cms.untracked.string('INFO')
0050        threshold = cms.untracked.string('ERROR')
0051 #        threshold = cms.untracked.string('WARNING')
0052 #        threshold = cms.untracked.string('DEBUG')
0053     )
0054 #    log = cms.untracked.PSet(
0055 #        threshold = cms.untracked.string('DEBUG')
0056 #    )
0057 )
0058 # get the files from DBS:
0059 process.source = cms.Source("PoolSource",
0060     fileNames = cms.untracked.vstring(
0061 #    'file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/tracks/tracks2_mc71.root'
0062 #    'file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/tracks/tracks2_postls171.root'
0063 
0064  "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/F60495B3-1E41-E211-BB7C-003048D3756A.root",
0065 
0066     )
0067 )
0068 
0069 process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange('208686:73-208686:463')
0070 # Choose the global tag here:
0071 # process.GlobalTag.globaltag = 'MC_71_V1::All'
0072 # process.GlobalTag.globaltag = 'POSTLS171_V1::All'
0073 # process.GlobalTag.globaltag = 'PRE_MC_71_V2::All'
0074 # data 
0075 #process.GlobalTag.globaltag = "GR_R_71_V1::All"
0076 process.GlobalTag.globaltag = "PRE_R_71_V3::All"
0077 
0078 #process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0079 #    BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0080 #    DBParameters = cms.PSet(
0081 #        messageLevel = cms.untracked.int32(0),
0082 #        authenticationPath = cms.untracked.string('')
0083 #    ),
0084 #    timetype = cms.string('runnumber'),
0085 #    toGet = cms.VPSet(cms.PSet(
0086 #        record = cms.string('SiPixelQualityRcd'),
0087 #        tag = cms.string('SiPixelBadModule_test')
0088 #    )),
0089 #    connect = cms.string('sqlite_file:test.db')
0090 #)
0091 #
0092 # To use a test DB instead of the official pixel object DB tag: 
0093 #process.customDead = cms.ESSource("PoolDBESSource", process.CondDBSetup, connect = cms.string('sqlite_file:/afs/cern.ch/user/v/vesna/Digitizer/dead_20100901.db'), toGet = cms.VPSet(cms.PSet(record = cms.string('SiPixelQualityRcd'), tag = cms.string('dead_20100901'))))
0094 #process.es_prefer_customDead = cms.ESPrefer("PoolDBESSource","customDead")
0095 
0096 
0097 process.o1 = cms.OutputModule("PoolOutputModule",
0098 #        outputCommands = cms.untracked.vstring('drop *','keep *_*_*_CluToTrack'),
0099         fileName = cms.untracked.string('file:tracks.root'),
0100 #       fileName = cms.untracked.string('file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/tracks/tracks2_postls171.root'),
0101 #    splitLevel = cms.untracked.int32(0),
0102 #    eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0103     outputCommands = process.RECOSIMEventContent.outputCommands,
0104     dataset = cms.untracked.PSet(
0105         filterName = cms.untracked.string(''),
0106         dataTier = cms.untracked.string('RECO')
0107     )
0108 
0109 )
0110 
0111 # DB stuff 
0112 useLocalDB = False
0113 if useLocalDB :
0114 # Frontier LA 
0115     process.DBReaderFrontier = cms.ESSource("PoolDBESSource",
0116      DBParameters = cms.PSet(
0117          messageLevel = cms.untracked.int32(0),
0118          authenticationPath = cms.untracked.string('')
0119      ),
0120      toGet = cms.VPSet(
0121      cms.PSet(
0122 # GenError
0123           record = cms.string('SiPixelGenErrorDBObjectRcd'),
0124 #          tag = cms.string('SiPixelGenErrorDBObject38Tv1')
0125 #          tag = cms.string('SiPixelGenErrorDBObject38TV10')
0126 #          tag = cms.string('SiPixelGenErrorDBObject38T_v0_mc1')
0127           tag = cms.string('SiPixelGenErrorDBObject_38T_v1_mc')
0128 # LA
0129 #           record = cms.string("SiPixelLorentzAngleRcd"),
0130 #           label = cms.untracked.string("fromAlignment"),
0131 #           label = cms.untracked.string("forWidth"),
0132 #           tag = cms.string("SiPixelLorentzAngle_v02_mc")
0133 #           tag = cms.string("SiPixelLorentzAngle_fromAlignment_v0_mc")
0134 #           tag = cms.string("SiPixelLorentzAngle_forWidth_v0_mc")
0135         ),
0136 #       cms.PSet(
0137 #           record = cms.string("SiPixelLorentzAngleSimRcd"),
0138 #           tag = cms.string("test_LorentzAngle_Sim")
0139 #       )
0140     ),
0141 #     connect = cms.string('frontier://FrontierProd/CMS_COND_31X_PIXEL')
0142      connect = cms.string('frontier://FrontierPrep/CMS_COND_PIXEL')
0143     ) # end process
0144 
0145 # SQ_LITE GenError
0146     process.DBReaderFrontier2 = cms.ESSource("PoolDBESSource",
0147      DBParameters = cms.PSet(
0148          messageLevel = cms.untracked.int32(0),
0149          authenticationPath = cms.untracked.string('')
0150      ),
0151      toGet = cms.VPSet(
0152         cms.PSet(
0153             record = cms.string("SiPixelGenErrorDBObjectRcd"),
0154 #           label = cms.untracked.string("fromAlignment"),
0155 #           tag = cms.string("SiPixelGenErrorDBObject38Tv1")
0156             tag = cms.string("SiPixelGenErrorDBObject38TV10")
0157         ),
0158     ),
0159 #     connect = cms.string('sqlite_file:siPixelGenErrors38T.db_old')
0160      connect = cms.string('sqlite_file:siPixelGenErrors38T.db')
0161    ) # end process
0162 # endif
0163  
0164 #process.myprefer = cms.ESPrefer("PoolDBESSource","DBReaderFrontier")
0165 #process.myprefer2 = cms.ESPrefer("PoolDBESSource","DBReaderFrontier2")
0166 
0167 
0168 #process.Timing = cms.Service("Timing")
0169 #process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck")
0170 
0171 # My 
0172 # modify clusterie parameters
0173 #process.siPixelClusters.ClusterThreshold = 4000.0
0174 
0175 # direct clusterization (no raw step)
0176 # label of digis 
0177 #process.siPixelClusters.src = 'mix'
0178 
0179 # plus pixel clusters  (OK)
0180 #process.p1 = cms.Path(process.siPixelClusters)
0181 
0182 # plus pixel rechits (OK)
0183 #process.p1 = cms.Path(process.pixeltrackerlocalreco)
0184 
0185 # clusterize through raw (OK)
0186 # for digi to raw
0187 process.siPixelRawData.InputLabel = 'simSiPixelDigis'
0188 process.SiStripDigiToRaw.InputDigis = cms.InputTag('simSiPixelDigis', "ZeroSuppressed")
0189 # for Raw2digi for simulations 
0190 process.siPixelDigis.InputLabel = 'siPixelRawData'
0191 process.siStripDigis.ProductLabel = 'SiStripDigiToRaw'
0192 # for digi to clu
0193 process.siPixelClusters.src = 'siPixelDigis'
0194 
0195 # pixel only 
0196 #process.p1 = cms.Path(process.siPixelRawData)
0197 #process.p1 = cms.Path(process.siPixelRawData*process.siPixelDigis)
0198 #process.p1 = cms.Path(process.siPixelRawData*process.siPixelDigis*process.pixeltrackerlocalreco)
0199 
0200 # with strips ok
0201 #process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw)
0202 #process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw*process.siPixelDigis*process.siStripDigis)
0203 
0204 # runs ok
0205 #process.p1 = cms.Path(process.trackerlocalreco)
0206 
0207 # runs ok
0208 #process.p1 = cms.Path(process.offlineBeamSpot)
0209 
0210 # runs ok
0211 #process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw*process.siPixelDigis*process.siStripDigis*process.trackerlocalreco*process.offlineBeamSpot*process.MeasurementTrackerEvent)
0212 
0213 # runs ok
0214 #process.p1 = cms.Path(process.siPixelRawData*process.SiStripDigiToRaw*process.siPixelDigis*process.siStripDigis*process.trackerlocalreco*process.offlineBeamSpot*process.MeasurementTrackerEvent*process.siPixelClusterShapeCache*process.recopixelvertexing)
0215 
0216 process.d = cms.EDAnalyzer("TestWithTracks",
0217     Verbosity = cms.untracked.bool(False),
0218     src = cms.InputTag("generalTracks"),
0219 #     PrimaryVertexLabel = cms.untracked.InputTag("offlinePrimaryVertices"),                             
0220 #     trajectoryInput = cms.string("TrackRefitterP5")
0221 #     trajectoryInput = cms.string('cosmictrackfinderP5')
0222 )
0223 
0224 process.TFileService = cms.Service("TFileService",
0225     fileName = cms.string('histo_tracks.root')
0226 )
0227 
0228 
0229 process.load("RecoTracker.IterativeTracking.iterativeTk_cff")
0230 
0231 # copy the sequence below from  
0232 # RecoTracker/IterativeTracking/python/iterativeTk_cff.py  - 71_pre7
0233 process.myTracking = cms.Sequence(process.InitialStep*
0234                             process.DetachedTripletStep*
0235                             process.LowPtTripletStep*
0236                             process.PixelPairStep*
0237                             process.MixedTripletStep*
0238                             process.PixelLessStep*
0239                             process.TobTecStep*
0240                             process.earlyGeneralTracks*
0241                             # muonSeededStep*
0242                             process.preDuplicateMergingGeneralTracks*
0243                             process.generalTracksSequence*
0244                             process.ConvStep*
0245                             process.conversionStepTracks
0246                             )
0247 
0248 # run full tracking
0249 # trackingGlobalReco does not work, needs EarlyMuons for muon seeding.
0250 # ckftracks & iterTracking does not work as well  (same problem).
0251 process.p1 = cms.Path(process.siPixelRecHits*process.siStripMatchedRecHits*process.offlineBeamSpot*process.siPixelClusterShapeCache*process.recopixelvertexing*process.MeasurementTrackerEvent*process.myTracking*process.vertexreco*process.d)
0252 
0253 #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)
0254 
0255 #process.outpath = cms.EndPath(process.o1)