Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:58

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("ClusTest")
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('ERROR')
0044         threshold = cms.untracked.string('WARNING')
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/digis/digis1.root'
0054 #    'file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/digis/digis2_postls171.root'
0055     'file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/digis/digis2_mc71.root'
0056   )
0057 )
0058 
0059 # Choose the global tag here:
0060 #process.GlobalTag.globaltag = "MC_70_V1::All"
0061 #process.GlobalTag.globaltag = "START70_V1::All"
0062 #process.GlobalTag.globaltag = "START71_V1::All"
0063 process.GlobalTag.globaltag = "MC_71_V1::All"
0064 #process.GlobalTag.globaltag = "POSTLS171_V1::All"
0065 #process.GlobalTag.globaltag = "PRE_MC_71_V2::All"
0066 
0067 
0068 # DB stuff 
0069 useLocalDB = True
0070 if useLocalDB :
0071 # Frontier LA 
0072     process.DBReaderFrontier = cms.ESSource("PoolDBESSource",
0073      DBParameters = cms.PSet(
0074          messageLevel = cms.untracked.int32(0),
0075          authenticationPath = cms.untracked.string('')
0076      ),
0077      toGet = cms.VPSet(
0078      cms.PSet(
0079 # GenError
0080           record = cms.string('SiPixelGenErrorDBObjectRcd'),
0081 #          tag = cms.string('SiPixelGenErrorDBObject38Tv1')
0082 #          tag = cms.string('SiPixelGenErrorDBObject38TV10')
0083 #          tag = cms.string('SiPixelGenErrorDBObject38T_v0_mc1')
0084           tag = cms.string('SiPixelGenErrorDBObject_38T_v1_mc')
0085 # LA
0086 #           record = cms.string("SiPixelLorentzAngleRcd"),
0087 #           label = cms.untracked.string("fromAlignment"),
0088 #           label = cms.untracked.string("forWidth"),
0089 #           tag = cms.string("SiPixelLorentzAngle_v02_mc")
0090 #           tag = cms.string("SiPixelLorentzAngle_fromAlignment_v0_mc")
0091 #           tag = cms.string("SiPixelLorentzAngle_forWidth_v0_mc")
0092         ),
0093 #       cms.PSet(
0094 #           record = cms.string("SiPixelLorentzAngleSimRcd"),
0095 #           tag = cms.string("test_LorentzAngle_Sim")
0096 #       )
0097     ),
0098 #     connect = cms.string('frontier://FrontierProd/CMS_COND_31X_PIXEL')
0099      connect = cms.string('frontier://FrontierPrep/CMS_COND_PIXEL')
0100     ) # end process
0101 
0102 # SQ_LITE GenError
0103     process.DBReaderFrontier2 = cms.ESSource("PoolDBESSource",
0104      DBParameters = cms.PSet(
0105          messageLevel = cms.untracked.int32(0),
0106          authenticationPath = cms.untracked.string('')
0107      ),
0108      toGet = cms.VPSet(
0109         cms.PSet(
0110             record = cms.string("SiPixelGenErrorDBObjectRcd"),
0111 #           label = cms.untracked.string("fromAlignment"),
0112 #           tag = cms.string("SiPixelGenErrorDBObject38Tv1")
0113             tag = cms.string("SiPixelGenErrorDBObject38TV10")
0114         ),
0115     ),
0116 #     connect = cms.string('sqlite_file:siPixelGenErrors38T.db_old')
0117      connect = cms.string('sqlite_file:siPixelGenErrors38T.db')
0118    ) # end process
0119 # endif
0120  
0121 process.myprefer = cms.ESPrefer("PoolDBESSource","DBReaderFrontier")
0122 #process.myprefer2 = cms.ESPrefer("PoolDBESSource","DBReaderFrontier2")
0123 
0124 
0125 #process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0126 #    BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0127 #    DBParameters = cms.PSet(
0128 #        messageLevel = cms.untracked.int32(0),
0129 #        authenticationPath = cms.untracked.string('')
0130 #    ),
0131 #    timetype = cms.string('runnumber'),
0132 #    toGet = cms.VPSet(cms.PSet(
0133 #        record = cms.string('SiPixelQualityRcd'),
0134 #        tag = cms.string('SiPixelBadModule_test')
0135 #    )),
0136 #    connect = cms.string('sqlite_file:test.db')
0137 #)
0138 #
0139 # To use a test DB instead of the official pixel object DB tag: 
0140 #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'))))
0141 #process.es_prefer_customDead = cms.ESPrefer("PoolDBESSource","customDead")
0142 
0143 
0144 process.o1 = cms.OutputModule("PoolOutputModule",
0145                               outputCommands = cms.untracked.vstring('drop *','keep *_*_*_ClusTest'),
0146 #            fileName = cms.untracked.string('file:clus.root')
0147             fileName = cms.untracked.string('file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/rechits/rechits2_mc71.root')
0148 )
0149 
0150 #process.Timing = cms.Service("Timing")
0151 #process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck")
0152 
0153 # My 
0154 # modify clusterie parameters
0155 #process.siPixelClusters.ClusterThreshold = 4000.0
0156 
0157 # DIRECT
0158 # direct clusterization (no raw step)
0159 # label of digis 
0160 process.siPixelClusters.src = 'simSiPixelDigis'
0161 
0162 # plus pixel clusters  (OK)
0163 #process.p1 = cms.Path(process.siPixelClusters)
0164 # plus pixel rechits (OK)
0165 process.p1 = cms.Path(process.pixeltrackerlocalreco)
0166 
0167 # RAW
0168 # clusterize through raw (OK)
0169 # for Raw2digi for simulations 
0170 #process.siPixelRawData.InputLabel = 'mix'
0171 #process.siPixelDigis.InputLabel = 'siPixelRawData'
0172 # process.siStripDigis.ProductLabel = 'SiStripDigiToRaw'
0173 #process.siPixelClusters.src = 'siPixelDigis'
0174 
0175 #process.p1 = cms.Path(process.siPixelRawData)
0176 #process.p1 = cms.Path(process.siPixelRawData*process.siPixelDigis)
0177 #process.p1 = cms.Path(process.siPixelRawData*process.siPixelDigis*process.pixeltrackerlocalreco)
0178 
0179 process.outpath = cms.EndPath(process.o1)