Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:30:36

0001 ## Process real data  events with CSC rechit & segment builders - Tim Cox - 19.02.2015                      
0002 ## This version runs in 75X IBs on a 73X relval real data (run1) sample
0003 ##     -- USING DEFAULT ALGO "ST" 
0004 ## Run on  100  events of a SingleMu dataset
0005 
0006 import FWCore.ParameterSet.Config as cms
0007 from Configuration.AlCa.autoCond import autoCond
0008 
0009 process = cms.Process("TEST")
0010 
0011 ## Accesses both Reco & Sim geometries from database
0012 process.load("Configuration.StandardSequences.GeometryDB_cff")
0013 
0014 ## Use the magic of autoCond instead of an explicit global tag
0015 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0016 process.GlobalTag.globaltag = autoCond["run1_data"]
0017 
0018 process.load("Configuration/StandardSequences/MagneticField_cff")
0019 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
0020 process.load("Configuration.StandardSequences.Reconstruction_cff")
0021 process.load("Configuration.StandardSequences.EndOfProcess_cff")
0022 
0023 # --- NUMBER OF EVENTS --- 
0024 
0025 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )
0026 
0027 process.options   = cms.untracked.PSet( SkipEvent = cms.untracked.vstring("ProductNotFound") )
0028 process.options   = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0029 process.source    = cms.Source("PoolSource",
0030     fileNames = cms.untracked.vstring(
0031   "/store/relval/CMSSW_7_3_0/SingleMu/RAW/GR_H_V43A_RelVal_zMu2012D-v1/00000/1ED9BE30-8481-E411-8AE9-002618943874.root"
0032     )
0033 )
0034 
0035 # -- ACCESSING 'DEEP' PARAMETERS OF THE ALGO IS TRICKY
0036 # THE FOLLOWING FOUND BY EXPLORING CONFIG WITH python -i
0037 # '3' is 4th algo CSCSegAlgoST; '0' and '1' are for ST_ME1234 and ST_ME1A configs
0038 process.cscSegments.algo_psets[3].algo_psets[0].CSCDebug = cms.untracked.bool(True)
0039 process.cscSegments.algo_psets[3].algo_psets[1].CSCDebug = cms.untracked.bool(True)
0040 
0041 
0042 # --- Activate LogVerbatim IN CSCSegment
0043 process.MessageLogger.cerr.enable = False
0044 process.MessageLogger.cout = cms.untracked.PSet(
0045     enable    = cms.untracked.bool(True),
0046     threshold = cms.untracked.string("INFO"),
0047     default   = cms.untracked.PSet( limit = cms.untracked.int32(0)  ),
0048     FwkReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0049     CSCSegment = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0050 )    
0051 
0052 ### --- ACTIVATE LogTrace IN VARIOUS MODULES - NEED TO COMPILE *EACH MODULE* WITH 
0053 ### scram b -j8 USER_CXXFLAGS="-DEDM_ML_DEBUG"
0054 ### LogTrace output goes to cout; all other output to "junk.log"
0055 
0056 #process.load("FWCore.MessageLogger.MessageLogger_cfi")
0057 #process.MessageLogger.CSCRecHit=dict()
0058 #process.MessageLogger.CSCSegment=dict()
0059 #process.MessageLogger.CSCSegAlgoST=dict()
0060 
0061 ###  module label is something like "muonCSCDigis"...
0062 #process.MessageLogger.debugModules = cms.untracked.vstring("*")
0063 #process.MessageLogger.destinations = cms.untracked.vstring("cout","junk")
0064 #process.MessageLogger.cout = cms.untracked.PSet(
0065 #    threshold = cms.untracked.string("DEBUG"),
0066 #    default   = cms.untracked.PSet( limit = cms.untracked.int32(0)  ),
0067 #    FwkReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0068 #    CSCRecHit = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0069 #    CSCSegment = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0070 #  , CSCSegAlgoST = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0071 #)
0072 
0073 # Path and EndPath def
0074 process.unpack = cms.Path(process.muonCSCDigis)
0075 process.reco = cms.Path(process.csc2DRecHits * process.cscSegments)
0076 process.endjob = cms.EndPath(process.endOfProcess)
0077 
0078 # Schedule definition
0079 process.schedule = cms.Schedule(process.unpack, process.reco, process.endjob)