Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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("RecHitTest")
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 
0017 # clusterizer 
0018 process.load("RecoLocalTracker.Configuration.RecoLocalTracker_cff")
0019 
0020 # for raw
0021 #process.load("EventFilter.SiPixelRawToDigi.SiPixelDigiToRaw_cfi")
0022 #process.load("EventFilter.SiPixelRawToDigi.SiPixelRawToDigi_cfi")
0023 process.load('Configuration.StandardSequences.DigiToRaw_cff')
0024 process.load('Configuration.StandardSequences.RawToDigi_cff')
0025 
0026 
0027 # needed for pixel RecHits (templates?)
0028 process.load("Configuration.StandardSequences.Reconstruction_cff")
0029 
0030 process.load('Configuration.EventContent.EventContent_cff')
0031 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0032 
0033 process.maxEvents = cms.untracked.PSet(
0034     input = cms.untracked.int32(-1)
0035 )
0036 
0037 process.MessageLogger = cms.Service("MessageLogger",
0038     debugModules = cms.untracked.vstring('SiPixelClusterizer'),
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('WARNING')
0044 #       threshold = cms.untracked.string('ERROR')
0045     )
0046 #    log = cms.untracked.PSet(
0047 #        threshold = cms.untracked.string('DEBUG')
0048 #    )
0049 )
0050 # get the files from DBS:
0051 process.source = cms.Source("PoolSource",
0052   fileNames = cms.untracked.vstring(
0053 #    'file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100/clus/clus1.root'
0054     'file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/rechits/rechits2_mc71.root'
0055 #    '/store/relval/CMSSW_7_1_0_pre7/RelValProdMinBias/GEN-SIM-RECO/PRE_STA71_V3-v1/00000/9E55469D-B2D1-E311-BEA8-02163E00B4B7.root'
0056 
0057 #"/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/F60495B3-1E41-E211-BB7C-003048D3756A.root",
0058 
0059 ##"/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/F2BA6B22-2C41-E211-9D7A-003048D2BED6.root",
0060 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/E4E6B318-2041-E211-B351-001D09F29114.root",
0061 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/B27AC385-3241-E211-AD10-0019B9F4A1D7.root",
0062 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/AC6EF0B7-4941-E211-9EFB-003048D374F2.root",
0063 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/AA4018D3-2C41-E211-8279-00215AEDFD98.root",
0064 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/A8CF653C-4D41-E211-811E-003048673374.root",
0065 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/98EEEB5E-4A41-E211-A591-001D09F25460.root",
0066 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/96BE2949-2241-E211-9993-001D09F23F2A.root",
0067 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/90F6F479-2641-E211-99E5-001D09F29524.root",
0068 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/8AAFC294-2141-E211-89E8-003048F1182E.root",
0069 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/82B885ED-2241-E211-9877-001D09F252E9.root",
0070 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/6440884D-2941-E211-BBA9-0025901D6288.root",
0071 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/604E8D2C-2741-E211-B542-003048F11C28.root",
0072 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/4EB6D745-2241-E211-9738-001D09F24D8A.root",
0073 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/3E863C44-2241-E211-9255-001D09F25041.root",
0074 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/3E76F7E8-2741-E211-8249-003048D37666.root",
0075 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/3C1D83B8-3641-E211-8C66-0025B32035A2.root",
0076 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/2A12A045-2241-E211-8BF5-001D09F2915A.root",
0077 ## "/store/data/Run2012D/MinimumBias/RECO/PromptReco-v1/000/208/686/1661335F-3041-E211-9B96-00237DDBE0E2.root",
0078 
0079   )
0080 )
0081 
0082 #process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange('208686:73-208686:463')
0083 
0084 # a service to use root histos
0085 process.TFileService = cms.Service("TFileService",
0086     fileName = cms.string('histo.root')
0087 )
0088 
0089 # Choose the global tag here:
0090 #process.GlobalTag.globaltag = "MC_70_V1::All"
0091 #process.GlobalTag.globaltag = "START70_V1::All"
0092 #process.GlobalTag.globaltag = "POSTLS170_V5::All"
0093 process.GlobalTag.globaltag = "START71_V1::All"
0094 #process.GlobalTag.globaltag = "MC_71_V1::All"
0095 #process.GlobalTag.globaltag = "POSTLS171_V1::All"
0096 #process.GlobalTag.globaltag = "PRE_MC_71_V2::All"
0097 # for data
0098 #process.GlobalTag.globaltag = "GR_R_71_V1::All"
0099 
0100 # DB stuff 
0101 # GenError
0102 useLocalDB = True
0103 if useLocalDB :
0104     process.DBReaderFrontier = cms.ESSource("PoolDBESSource",
0105      DBParameters = cms.PSet(
0106          messageLevel = cms.untracked.int32(0),
0107          authenticationPath = cms.untracked.string('')
0108      ),
0109      toGet = cms.VPSet(
0110      cms.PSet(
0111           record = cms.string('SiPixelGenErrorDBObjectRcd'),
0112 #          tag = cms.string('SiPixelGenErrorDBObject38TV10')
0113           tag = cms.string('SiPixelGenErrorDBObject_38T_v1_mc')
0114      ),
0115     ),
0116 #     connect = cms.string('sqlite_file:siPixelGenErrors38T.db')
0117 #     connect = cms.string('frontier://FrontierProd/CMS_COND_PIXEL_000')
0118      connect = cms.string('frontier://FrontierPrep/CMS_COND_PIXEL')
0119     ) # end process
0120 # endif
0121 
0122 useLocalDB2 = False
0123 if useLocalDB2 :
0124     process.DBReaderFrontier2 = cms.ESSource("PoolDBESSource",
0125      DBParameters = cms.PSet(
0126          messageLevel = cms.untracked.int32(0),
0127          authenticationPath = cms.untracked.string('')
0128      ),
0129      toGet = cms.VPSet(
0130         cms.PSet(
0131             record = cms.string("SiPixelTemplateDBObjectRcd"),
0132             tag = cms.string("SiPixelTemplateDBObject38TV10")
0133 #           tag = cms.string("SiPixelTemplateDBObject38Tv21")
0134         ),
0135     ),
0136      connect = cms.string('sqlite_file:siPixelTemplates38T.db')
0137 #     connect = cms.string('frontier://FrontierPrep/CMS_COND_PIXEL')
0138 #     connect = cms.string('frontier://FrontierProd/CMS_COND_31X_PIXEL')
0139    ) # end process
0140 # endif
0141  
0142 process.myprefer = cms.ESPrefer("PoolDBESSource","DBReaderFrontier")
0143 #process.myprefer2 = cms.ESPrefer("PoolDBESSource","DBReaderFrontier2")
0144 
0145 
0146 #process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0147 #    BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0148 #    DBParameters = cms.PSet(
0149 #        messageLevel = cms.untracked.int32(0),
0150 #        authenticationPath = cms.untracked.string('')
0151 #    ),
0152 #    timetype = cms.string('runnumber'),
0153 #    toGet = cms.VPSet(cms.PSet(
0154 #        record = cms.string('SiPixelQualityRcd'),
0155 #        tag = cms.string('SiPixelBadModule_test')
0156 #    )),
0157 #    connect = cms.string('sqlite_file:test.db')
0158 #)
0159 #
0160 # To use a test DB instead of the official pixel object DB tag: 
0161 #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'))))
0162 #process.es_prefer_customDead = cms.ESPrefer("PoolDBESSource","customDead")
0163 
0164 
0165 process.o1 = cms.OutputModule("PoolOutputModule",
0166                               outputCommands = cms.untracked.vstring('drop *','keep *_*_*_RecHitTest'),
0167             fileName = cms.untracked.string('file:clus.root')
0168 #            fileName = cms.untracked.string('file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/rechits/rechits2_mc71.root')
0169 )
0170 
0171 #process.Timing = cms.Service("Timing")
0172 #process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck")
0173 
0174 # My 
0175 # modify clusterie parameters
0176 #process.siPixelClusters.ClusterThreshold = 4000.0
0177 
0178 # DIRECT
0179 # direct clusterization (no raw step)
0180 # label of digis 
0181 process.siPixelClusters.src = 'simSiPixelDigis'
0182 
0183 # read rechits
0184 process.analysis = cms.EDAnalyzer("ReadPixelRecHit",
0185     Verbosity = cms.untracked.bool(False),
0186     src = cms.InputTag("siPixelRecHits"),
0187 )
0188 
0189 # plus pixel clusters  (OK)
0190 #process.p1 = cms.Path(process.siPixelClusters)
0191 # plus pixel rechits (OK)
0192 #process.p1 = cms.Path(process.pixeltrackerlocalreco*process.analysis)
0193 # only rechits
0194 process.p1 = cms.Path(process.siPixelRecHits*process.analysis)
0195 
0196 # RAW
0197 # clusterize through raw (OK)
0198 # for Raw2digi for simulations 
0199 #process.siPixelRawData.InputLabel = 'mix'
0200 #process.siPixelDigis.InputLabel = 'siPixelRawData'
0201 # process.siStripDigis.ProductLabel = 'SiStripDigiToRaw'
0202 #process.siPixelClusters.src = 'siPixelDigis'
0203 
0204 #process.p1 = cms.Path(process.siPixelRawData)
0205 #process.p1 = cms.Path(process.siPixelRawData*process.siPixelDigis)
0206 #process.p1 = cms.Path(process.siPixelRawData*process.siPixelDigis*process.pixeltrackerlocalreco)
0207 
0208 # save output 
0209 #process.outpath = cms.EndPath(process.o1)