Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-30 04:13:21

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("CALIB")
0004 
0005 process.MessageLogger = cms.Service("MessageLogger",
0006     cerr = cms.untracked.PSet(
0007         enable = cms.untracked.bool(False)
0008     ),
0009     cout = cms.untracked.PSet(
0010         enable = cms.untracked.bool(True),
0011         threshold = cms.untracked.string('INFO')
0012     ),
0013     debugModules = cms.untracked.vstring('')
0014 )
0015 
0016 process.source = cms.Source("EmptyIOVSource",
0017     timetype = cms.string('runnumber'),
0018     firstValue = cms.uint64(1), # Specify the first run number for which the masking should be done
0019     lastValue = cms.uint64(1),  # Specify the first run number for which the masking should be done
0020     interval = cms.uint64(1)
0021 )
0022 
0023 process.maxEvents = cms.untracked.PSet(
0024     input = cms.untracked.int32(1)
0025 )
0026 
0027 #Populate ES
0028 process.load("CalibTracker.SiStripESProducers.fake.SiStripBadModuleConfigurableFakeESSource_cfi")
0029 from CalibTracker.SiStripESProducers.fake.SiStripBadModuleConfigurableFakeESSource_cfi import siStripBadModuleConfigurableFakeESSource
0030 siStripBadModuleConfigurableFakeESSource.BadComponentList = cms.untracked.VPSet(   cms.PSet(
0031 ### To mask TOB:
0032 ##     SubDet = cms.string('TOB'),
0033 ##     layer = cms.uint32(3),    ## SELECTION: layer = 1..6, 0(ALL)        
0034 ##     bkw_frw = cms.uint32(0),  ## bkw_frw = 1(TOB-) 2(TOB+) 0(everything)     
0035 ##     rod = cms.uint32(0),      ## rod = 1..N, 0(ALL)                 
0036 ##     detid = cms.uint32(0),    ## detid number = 0 (ALL),  specific number 
0037 ##     ster = cms.uint32(0)      ## ster = 1(stereo), 2 (nonstereo), 0(ALL)
0038 
0039 ### To mask TIB:
0040 ##     SubDet = cms.string('TIB'),  
0041 ##     layer = cms.uint32(2),      ## SELECTION: layer = 1..4, 0(ALL)           
0042 ##     bkw_frw = cms.uint32(0),    ## bkw_frw = 1(TIB-), 2(TIB+) 0(ALL)     
0043 ##     int_ext = cms.uint32(0),    ## int_ext = 1 (internal), 2(external), 0(ALL)  
0044 ##     ster = cms.uint32(0),       ## ster = 1(stereo), 2 (nonstereo), 0(ALL)       
0045 ##     string_ = cms.uint32(0),    ## string = 1..N, 0(ALL)             
0046 ##     detid = cms.uint32(0)       ## detid number = 0 (ALL),  specific number 
0047 
0048 ### To mask TID:
0049 ##     SubDet = cms.string('TID'), 
0050 ##     side = cms.uint32(0),       ## SELECTION: side = 1(back, Z-), 2(front, Z+), 0(ALL)    
0051 ##     wheel = cms.uint32(2),      ## wheel = 1..3, 0(ALL)                   
0052 ##     ring = cms.uint32(0),       ## ring  = 1..3, 0(ALL)                   
0053 ##     ster = cms.uint32(0),       ## ster = 1(stereo), 2 (nonstereo), 0(ALL)        
0054 ##     detid = cms.uint32(0)       ## detid number = 0 (ALL),  specific number
0055 
0056 ### To mask TEC:
0057     SubDet = cms.string('TEC'), 
0058     side = cms.uint32(1),          ## SELECTION: side = 1(back, Z-), 2(front, Z+), 0(ALL)    
0059     wheel = cms.uint32(0),         ## wheel = 1..9, 0(ALL)                   
0060     ring = cms.uint32(0),          ## ring  = 1..7, 0(ALL)
0061     petal_bkw_frw = cms.uint32(0), ## petal_bkw_frw = 1(backward) 2(forward) 0(all)
0062     petal = cms.uint32(7),         ## petal = 1..8, 0(ALL)
0063     ster = cms.uint32(0),          ## ster = 1(stereo), 2 (nonstereo), 0(ALL)        
0064     detid = cms.uint32(0),         ## detid number = 0 (ALL),  specific number
0065 
0066     # This list is independent on all the rest. Any module appearing here will be masked.
0067     detidList = cms.untracked.vuint32(402666125,
0068                             402666126,
0069                             402666129,
0070                             402666130,
0071                             402666133,
0072                             402666134,
0073                             402666137,
0074                             402666138,
0075                             402666141,
0076                             402666142,
0077                             402666145,
0078                             402666146,
0079                             402666257,
0080                             402666258,
0081                             402666261,
0082                             402666262,
0083                             402666265,
0084                             402666266,
0085                             402666269,
0086                             402666270,
0087                             402666273,
0088                             402666274,
0089                             402666277,
0090                             402666278,
0091                             402666629,
0092                             402666630,
0093                             402666633,
0094                             402666634,
0095                             402666637,
0096                             402666638,
0097                             402666641,
0098                             402666642,
0099                             402666669,
0100                             402666670,
0101                             402666673,
0102                             402666674,
0103                             402666777,
0104                             402666778,
0105                             402666781,
0106                             402666782,
0107                             402666785,
0108                             402666786,
0109                             402666789,
0110                             402666790,
0111                             402666793,
0112                             402666794,
0113                             402666797,
0114                             402666798
0115                             )
0116     )
0117 )
0118 #Write on DB
0119 process.load("CalibTracker.SiStripESProducers.DBWriter.SiStripBadModuleDummyDBWriter_cfi")
0120 process.siStripBadModuleDummyDBWriter.OpenIovAt = cms.untracked.string("currentTime")
0121 
0122 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0123     BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0124     DBParameters = cms.PSet(
0125         messageLevel = cms.untracked.int32(2),
0126         authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0127     ),
0128     timetype = cms.untracked.string('runnumber'),
0129     connect = cms.string('sqlite_file:dbfile.db'),
0130     toPut = cms.VPSet(cms.PSet(
0131         record = cms.string('SiStripBadStrip'),
0132         tag = cms.string('SiStripBadComponents_TECminus')
0133         ))
0134 )
0135 
0136 
0137 ###### Quality ESProducer                                                                       
0138 process.load("CalibTracker.SiStripESProducers.SiStripQualityESProducer_cfi")
0139 process.siStripQualityESProducer.ListOfRecordToMerge = cms.VPSet(
0140      cms.PSet( record = cms.string("SiStripBadModuleRcd"),  tag    = cms.string("") )
0141      )
0142 
0143 #### Add these lines to produce a tracker map
0144 # load TrackerTopology (needed for TkDetMap and TkHistoMap)
0145 process.load("Configuration.Geometry.GeometryExtended2017_cff")
0146 process.load("Geometry.TrackerGeometryBuilder.trackerParameters_cfi")
0147 process.TrackerTopologyEP = cms.ESProducer("TrackerTopologyEP")
0148 process.load("DQM.SiStripCommon.TkHistoMap_cff")
0149 ####
0150 
0151 from CalibTracker.SiStripQuality.siStripQualityStatistics_cfi import siStripQualityStatistics
0152 process.reader = siStripQualityStatistics.clone(
0153         TkMapFileName = cms.untracked.string("TkMapBadComponents_byHand.png")
0154         )
0155 
0156 process.siStripBadModuleDummyDBWriter.record=process.PoolDBOutputService.toPut[0].record
0157 process.p = cms.Path(process.reader*process.siStripBadModuleDummyDBWriter)
0158 
0159