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("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 #  '/store/relval/CMSSW_7_1_0_pre8/RelValTTbar/GEN-SIM-DIGI-RAW-HLTDEBUG/PU_PRE_STA71_V4-v1/00000/06397C95-91E2-E311-963D-02163E00B776.root',
0058 
0059  '/store/relval/CMSSW_7_1_0_pre8/RelValSingleMuPt100_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_LS171_V9-v1/00000/5AAEC7CC-D7E1-E311-83DD-0025905A6094.root',
0060 
0061 # 25ns flat pu=20-50
0062 #   /store/mc/Spring14dr/TT_Tune4C_13TeV-pythia8-tauola/GEN-SIM-RAW/Flat20to50_POSTLS170_V5-v1/00000/006EBBE4-98DC-E311-B64F-0025905A611E.root
0063 
0064 # 50ns poisson pu=50
0065 #   '/store/mc/Fall13dr/TT_Tune4C_13TeV-pythia8-tauola/GEN-SIM-RAW/tsg_PU40bx50_POSTLS162_V2-v1/00000/00E707E5-0D75-E311-B109-003048678BAE.root',
0066 
0067 # 25ns poisson pu=50
0068 #   /store/mc/Fall13dr/TT_Tune4C_13TeV-pythia8-tauola/GEN-SIM-RAW/tsg_PU40bx25_POSTLS162_V2-v1/00000/00309507-AB75-E311-AB10-0025905A60B2.root
0069 
0070 # 25ns poisson pu=20
0071 #   /store/mc/Fall13dr/TT_Tune4C_13TeV-pythia8-tauola/GEN-SIM-RAW/tsg_PU20bx25_POSTLS162_V2-v1/00000/001E7210-126D-E311-8D68-003048679182.root
0072 
0073 
0074   )
0075 )
0076 
0077 # Choose the global tag here:
0078 #process.GlobalTag.globaltag = "POSTLS162_V2::All"
0079 #process.GlobalTag.globaltag = "MC_70_V1::All"
0080 #process.GlobalTag.globaltag = "START70_V1::All"
0081 process.GlobalTag.globaltag = "START71_V1::All"
0082 #process.GlobalTag.globaltag = "MC_71_V1::All"
0083 #process.GlobalTag.globaltag = "POSTLS171_V1::All"
0084 #process.GlobalTag.globaltag = "PRE_MC_71_V2::All"
0085 
0086 
0087 # DB stuff 
0088 useLocalDB = False
0089 if useLocalDB :
0090 # Frontier LA 
0091     process.DBReaderFrontier = cms.ESSource("PoolDBESSource",
0092      DBParameters = cms.PSet(
0093          messageLevel = cms.untracked.int32(0),
0094          authenticationPath = cms.untracked.string('')
0095      ),
0096      toGet = cms.VPSet(
0097      cms.PSet(
0098 # GenError
0099           record = cms.string('SiPixelGenErrorDBObjectRcd'),
0100 #          tag = cms.string('SiPixelGenErrorDBObject38Tv1')
0101 #          tag = cms.string('SiPixelGenErrorDBObject38TV10')
0102 #          tag = cms.string('SiPixelGenErrorDBObject38T_v0_mc1')
0103           tag = cms.string('SiPixelGenErrorDBObject_38T_v1_mc')
0104 # LA
0105 #           record = cms.string("SiPixelLorentzAngleRcd"),
0106 #           label = cms.untracked.string("fromAlignment"),
0107 #           label = cms.untracked.string("forWidth"),
0108 #           tag = cms.string("SiPixelLorentzAngle_v02_mc")
0109 #           tag = cms.string("SiPixelLorentzAngle_fromAlignment_v0_mc")
0110 #           tag = cms.string("SiPixelLorentzAngle_forWidth_v0_mc")
0111         ),
0112 #       cms.PSet(
0113 #           record = cms.string("SiPixelLorentzAngleSimRcd"),
0114 #           tag = cms.string("test_LorentzAngle_Sim")
0115 #       )
0116     ),
0117 #     connect = cms.string('frontier://FrontierProd/CMS_COND_31X_PIXEL')
0118      connect = cms.string('frontier://FrontierPrep/CMS_COND_PIXEL')
0119     ) # end process
0120 
0121 # SQ_LITE GenError
0122     process.DBReaderFrontier2 = cms.ESSource("PoolDBESSource",
0123      DBParameters = cms.PSet(
0124          messageLevel = cms.untracked.int32(0),
0125          authenticationPath = cms.untracked.string('')
0126      ),
0127      toGet = cms.VPSet(
0128         cms.PSet(
0129             record = cms.string("SiPixelGenErrorDBObjectRcd"),
0130 #           label = cms.untracked.string("fromAlignment"),
0131 #           tag = cms.string("SiPixelGenErrorDBObject38Tv1")
0132             tag = cms.string("SiPixelGenErrorDBObject38TV10")
0133         ),
0134     ),
0135 #     connect = cms.string('sqlite_file:siPixelGenErrors38T.db_old')
0136      connect = cms.string('sqlite_file:siPixelGenErrors38T.db')
0137    ) # end process
0138 # endif
0139  
0140 #process.myprefer = cms.ESPrefer("PoolDBESSource","DBReaderFrontier")
0141 #process.myprefer2 = cms.ESPrefer("PoolDBESSource","DBReaderFrontier2")
0142 
0143 
0144 #process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0145 #    BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0146 #    DBParameters = cms.PSet(
0147 #        messageLevel = cms.untracked.int32(0),
0148 #        authenticationPath = cms.untracked.string('')
0149 #    ),
0150 #    timetype = cms.string('runnumber'),
0151 #    toGet = cms.VPSet(cms.PSet(
0152 #        record = cms.string('SiPixelQualityRcd'),
0153 #        tag = cms.string('SiPixelBadModule_test')
0154 #    )),
0155 #    connect = cms.string('sqlite_file:test.db')
0156 #)
0157 #
0158 # To use a test DB instead of the official pixel object DB tag: 
0159 #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'))))
0160 #process.es_prefer_customDead = cms.ESPrefer("PoolDBESSource","customDead")
0161 
0162 
0163 process.o1 = cms.OutputModule("PoolOutputModule",
0164             outputCommands = cms.untracked.vstring('drop *','keep *_*_*_ClusTest'),
0165             fileName = cms.untracked.string('file:clus.root')
0166 #            fileName = cms.untracked.string('file:/afs/cern.ch/work/d/dkotlins/public/MC/mu/pt100_71_pre7/rechits/rechits2_mc71.root')
0167 
0168 )
0169 
0170 process.analysis = cms.EDAnalyzer("ReadPixClusters",
0171     Verbosity = cms.untracked.bool(False),
0172     src = cms.InputTag("siPixelClusters"),
0173 )
0174 
0175 process.d = cms.EDAnalyzer("TestClusters",
0176     Verbosity = cms.untracked.bool(False),
0177     src = cms.InputTag("siPixelClusters"),
0178     Select1 = cms.untracked.int32(1),  # cut on the num of dets <4 skip, 0 means 4 default 
0179     Select2 = cms.untracked.int32(0),  # 6 no bptx, 0 no selection                               
0180 )
0181 
0182 
0183 process.TFileService = cms.Service("TFileService",
0184     fileName = cms.string('histo.root')
0185 )
0186 
0187 #process.Timing = cms.Service("Timing")
0188 #process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck")
0189 
0190 # My 
0191 # modify clusterie parameters
0192 #process.siPixelClusters.ClusterThreshold = 4000.0
0193 
0194 # RAW
0195 # clusterize through raw (OK)
0196 # for Raw2digi for simulations 
0197 #process.siPixelDigis.InputLabel = 'siPixelRawData'
0198 process.siPixelDigis.InputLabel = 'rawDataCollector'
0199 #process.siPixelDigis.InputLabel = 'source'
0200 
0201 process.siPixelClusters.src = 'siPixelDigis'
0202 
0203 #process.p1 = cms.Path(process.siPixelDigis*process.pixeltrackerlocalreco)
0204 process.p1 = cms.Path(process.siPixelDigis*process.pixeltrackerlocalreco*process.d)
0205 
0206 #process.outpath = cms.EndPath(process.o1)