Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:08:46

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 import FWCore.ParameterSet.VarParsing as VarParsing
0004 
0005 process = cms.Process("SiStrpDQMQTestTuning")
0006 
0007 #prepare options
0008 
0009 options = VarParsing.VarParsing("analysis")
0010 
0011 options.register ('globalTag',
0012                                     "DONOTEXIST",
0013                                     VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0014                                     VarParsing.VarParsing.varType.string,          # string, int, or float
0015                                     "GlobalTag")
0016 options.register ('dqmFile',
0017                                     "",
0018                                     VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0019                                     VarParsing.VarParsing.varType.string,          # string, int, or float
0020                                     "DQM root file")
0021 options.register ('runNumber',
0022                                     0,
0023                                     VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0024                                     VarParsing.VarParsing.varType.int,          # string, int, or float
0025                                     "run number")
0026 options.register ('detIdInfoFile',
0027                                     "",
0028                                     VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0029                                     VarParsing.VarParsing.varType.string,          # string, int, or float
0030                                     "File to store information by det_id")
0031 
0032 options.parseArguments()
0033 
0034 process.MessageLogger = cms.Service("MessageLogger",
0035     destinations = cms.untracked.vstring('cout','cerr','PCLBadComponents','QTBadModules','TopModulesList'), #Reader, cout
0036     categories = cms.untracked.vstring('SiStripQualityStatistics',
0037                                        'BadModuleList',
0038                                        'TkMapParameters',
0039                                        'TkMapToBeSaved',
0040                                        'PSUMapToBeSaved',
0041                        'TopModules'), #Reader, cout
0042     debugModules = cms.untracked.vstring('siStripDigis', 
0043                                          'siStripClusters', 
0044                                          'siStripZeroSuppression', 
0045                                          'SiStripClusterizer',
0046                                          'siStripOfflineAnalyser'),
0047     cerr = cms.untracked.PSet(threshold = cms.untracked.string('ERROR')
0048                               ),
0049     cout = cms.untracked.PSet(threshold = cms.untracked.string('INFO'),
0050                                 default = cms.untracked.PSet(limit=cms.untracked.int32(0)),
0051                                 TkMapParameters = cms.untracked.PSet(limit=cms.untracked.int32(100000)),
0052                                 TkMapToBeSaved = cms.untracked.PSet(limit=cms.untracked.int32(100000)),
0053                                 PSUMapToBeSaved = cms.untracked.PSet(limit=cms.untracked.int32(100000))
0054                               ),
0055     PCLBadComponents = cms.untracked.PSet(threshold = cms.untracked.string('INFO'),
0056                                 default = cms.untracked.PSet(limit=cms.untracked.int32(0)),
0057                                 SiStripQualityStatistics = cms.untracked.PSet(limit=cms.untracked.int32(100000))
0058                                 ),
0059     QTBadModules = cms.untracked.PSet(threshold = cms.untracked.string('INFO'),
0060                                 default = cms.untracked.PSet(limit=cms.untracked.int32(0)),
0061                                 BadModuleList = cms.untracked.PSet(limit=cms.untracked.int32(100000))
0062                                 ),
0063     TopModulesList = cms.untracked.PSet(threshold = cms.untracked.string('INFO'),
0064                 default = cms.untracked.PSet(limit=cms.untracked.int32(0)),
0065                 TopModules = cms.untracked.PSet(limit=cms.untracked.int32(100000))
0066                 )
0067                                     
0068 )
0069 
0070 
0071 ## Empty Event Source
0072 process.source = cms.Source("EmptyIOVSource",
0073                               timetype = cms.string('runnumber'),
0074                               firstValue= cms.uint64(options.runNumber),
0075                               lastValue= cms.uint64(options.runNumber),
0076                               interval = cms.uint64(1)
0077                             )
0078 
0079 process.maxEvents = cms.untracked.PSet(
0080     input = cms.untracked.int32(1)
0081 )
0082 
0083 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0084 from Configuration.AlCa.GlobalTag import GlobalTag
0085 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0086 # loading TrackerTopologyEP via GeometryDB (since 62x)
0087 process.load('Configuration.StandardSequences.GeometryDB_cff')
0088     
0089 # DQM Environment
0090 process.load("DQMServices.Core.DQMStore_cfg")
0091 
0092 # SiStrip Offline DQM Client
0093 process.siStripOfflineAnalyser = cms.EDProducer("SiStripOfflineDQM",
0094        GlobalStatusFilling      = cms.untracked.int32(-1),
0095 #        GlobalStatusFilling      = cms.untracked.int32(2),
0096         SummaryCreationFrequency  = cms.untracked.int32(-1),                                              
0097 #       CreateSummary            = cms.untracked.bool(False),
0098        SummaryConfigPath        = cms.untracked.string("DQM/SiStripMonitorClient/data/sistrip_monitorelement_config.xml"),
0099        UsedWithEDMtoMEConverter = cms.untracked.bool(False),
0100        PrintFaultyModuleList    = cms.untracked.bool(False),
0101 
0102       InputFileName            = cms.untracked.string(options.dqmFile),
0103        OutputFileName           = cms.untracked.string("/tmp/testRunNum.root"), 
0104        CreateTkMap              = cms.untracked.bool(True),
0105        CreateTkInfoFile         = cms.untracked.bool(True),
0106        TkmapParameters          = cms.untracked.PSet(
0107           loadFedCabling    = cms.untracked.bool(True),
0108           trackerdatPath    = cms.untracked.string('CommonTools/TrackerMap/data/'),
0109           trackermaptxtPath = cms.untracked.string('CommonTools/TrackerMap/data/'),
0110           mapMin            = cms.untracked.double(0.),
0111           meanToMaxFact     = cms.untracked.double(2.5)
0112        ),
0113        TkMapOptions             = cms.untracked.VPSet(
0114     cms.PSet(mapName=cms.untracked.string('QTestAlarm'),fedMap=cms.untracked.bool(True),useSSQuality=cms.untracked.bool(True),ssqLabel=cms.untracked.string(""),psuMap=cms.untracked.bool(True),loadLVCabling=cms.untracked.bool(True),mapMax=cms.untracked.double(1.),RunNumber=cms.untracked.uint32(options.runNumber)),
0115     cms.PSet(mapName=cms.untracked.string('FractionOfBadChannels'),mapMax=cms.untracked.double(-1.),logScale=cms.untracked.bool(True),RunNumber=cms.untracked.uint32(options.runNumber)),
0116     cms.PSet(mapName=cms.untracked.string('NumberOfCluster'),TopModules=cms.untracked.bool(True),numberTopModules=cms.untracked.uint32(20),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(8.)),
0117     cms.PSet(mapName=cms.untracked.string('NumberOfDigi'),TopModules=cms.untracked.bool(True),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(30.)),
0118     cms.PSet(mapName=cms.untracked.string('NumberOfOfffTrackCluster'),TopModules=cms.untracked.bool(True),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(-1)),
0119     cms.PSet(mapName=cms.untracked.string('NumberOfOfffTrackCluster'),TopModules=cms.untracked.bool(True),mapSuffix=cms.untracked.string("_autoscale"),mapMax=cms.untracked.double(-1.),RunNumber=cms.untracked.uint32(options.runNumber)),
0120     cms.PSet(mapName=cms.untracked.string('NumberOfOnTrackCluster'),TopModules=cms.untracked.bool(True),mapMax=cms.untracked.double(-1.),RunNumber=cms.untracked.uint32(options.runNumber)),
0121     cms.PSet(mapName=cms.untracked.string('StoNCorrOnTrack'),TopModules=cms.untracked.bool(True),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(40.), mapMin=cms.untracked.double(10.)), #to be tuned properly
0122     cms.PSet(mapName=cms.untracked.string('NApvShots'),TopModules=cms.untracked.bool(True),mapMax=cms.untracked.double(-1.),logScale=cms.untracked.bool(True),RunNumber=cms.untracked.uint32(options.runNumber)),
0123     cms.PSet(mapName=cms.untracked.string('NApvShots'),mapMax=cms.untracked.double(-1.),logScale=cms.untracked.bool(True),psuMap=cms.untracked.bool(True),loadLVCabling=cms.untracked.bool(True),TopModules=cms.untracked.bool(True),RunNumber=cms.untracked.uint32(options.runNumber)),
0124 #    cms.PSet(mapName=cms.untracked.string('MedianChargeApvShots'),mapMax=cms.untracked.double(-1.)),
0125 #    cms.PSet(mapName=cms.untracked.string('ClusterCharge'),mapMax=cms.untracked.double(-1.)),
0126 #    cms.PSet(mapName=cms.untracked.string('ChargePerCMfromOrigin')),
0127     cms.PSet(mapName=cms.untracked.string('ChargePerCMfromTrack'),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(6000.),TopModules=cms.untracked.bool(True),mapMin=cms.untracked.double(2000.)),
0128     cms.PSet(mapName=cms.untracked.string('NumberMissingHits'),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(-1),TopModules=cms.untracked.bool(True)),
0129     cms.PSet(mapName=cms.untracked.string('NumberValidHits'),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(-1),TopModules=cms.untracked.bool(True)),
0130     cms.PSet(mapName=cms.untracked.string('NumberInactiveHits'),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(-1),TopModules=cms.untracked.bool(True)),
0131     cms.PSet(mapName=cms.untracked.string('ResidualsMean'),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(.01),TopModules=cms.untracked.bool(True)),######range has been set in SiStripMonitorClient/src/SiStripTrackerMapCreator.cc file##
0132     cms.PSet(mapName=cms.untracked.string('ClusterWidthOnTrack'),TopModules=cms.untracked.bool(True),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(7.),mapMin=cms.untracked.double(0.5)),
0133     cms.PSet(mapName=cms.untracked.string('ClusterWidthOffTrack'),TopModules=cms.untracked.bool(True),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(7.),mapMin=cms.untracked.double(0.5)),
0134     cms.PSet(mapName=cms.untracked.string('NoiseOnTrack'),TopModules=cms.untracked.bool(True),RunNumber=cms.untracked.uint32(options.runNumber),mapMax=cms.untracked.double(7.),mapMin=cms.untracked.double(3.)),
0135     cms.PSet(mapName=cms.untracked.string('NoiseOffTrack'),mapMax=cms.untracked.double(7.),RunNumber=cms.untracked.uint32(options.runNumber),mapMin=cms.untracked.double(3.))
0136     )
0137 )
0138 
0139 # Services needed for TkHistoMap / DetIdInfoFile
0140 process.load("CalibTracker.SiStripCommon.TkDetMapESProducer_cfi")
0141 process.TFileService = cms.Service('TFileService',
0142   fileName = cms.string(options.detIdInfoFile)
0143 )
0144 
0145 # Configuration of the SiStripQuality object for the map of bad channels
0146 
0147 #process.siStripQualityESProducer.appendToDataLabel = cms.string("test")
0148 process.siStripQualityESProducer.ListOfRecordToMerge=cms.VPSet(
0149 #        cms.PSet( record = cms.string("SiStripDetVOffRcd"),    tag    = cms.string("") ),
0150 #        cms.PSet( record = cms.string("SiStripDetCablingRcd"), tag    = cms.string("") ),
0151 #        cms.PSet( record = cms.string("RunInfoRcd"),           tag    = cms.string("") ),
0152 #        cms.PSet( record = cms.string("SiStripBadChannelRcd"), tag    = cms.string("") ),
0153         cms.PSet( record = cms.string("SiStripBadFiberRcd"),   tag    = cms.string("") )
0154 #        cms.PSet( record = cms.string("SiStripBadModuleRcd"),  tag    = cms.string("") )
0155         )
0156 
0157 from CalibTracker.SiStripQuality.siStripQualityStatistics_cfi import siStripQualityStatistics
0158 process.ssqualitystat = siStripQualityStatistics.clone(
0159         TkMapFileName=cms.untracked.string("PCLBadComponents.png"),  #available filetypes: .pdf .png .jpg .svg
0160         SaveTkHistoMap=cms.untracked.bool(False)
0161         )
0162 
0163 
0164 process.p1 = cms.Path(process.siStripOfflineAnalyser + process.ssqualitystat)