Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 import FWCore.ParameterSet.VarParsing as VarParsing
0004 
0005 process = cms.Process("Reader")
0006 
0007 options = VarParsing.VarParsing("analysis")
0008 
0009 options.register ('logDestination',
0010                   "",
0011                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0012                   VarParsing.VarParsing.varType.string,          # string, int, or float
0013                   "log file")
0014 options.register ('qualityLogDestination',
0015                   "",
0016                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0017                   VarParsing.VarParsing.varType.string,          # string, int, or float
0018                   "quality log file")
0019 options.register ('runInfoTag',
0020                   "",
0021                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0022                   VarParsing.VarParsing.varType.string,          # string, int, or float
0023                   "RunInfo tag name")
0024 options.register ('cablingTag',
0025                   "",
0026                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0027                   VarParsing.VarParsing.varType.string,          # string, int, or float
0028                   "cabling tag name")
0029 options.register ('cablingConnectionString',
0030                   "",
0031                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0032                   VarParsing.VarParsing.varType.string,          # string, int, or float
0033                   "Cabling connection string")
0034 options.register ('runinfoConnectionString',
0035                   "",
0036                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0037                   VarParsing.VarParsing.varType.string,          # string, int, or float
0038                   "RunInfo connection string")
0039 options.register ('MonitorCumulative',
0040                   False,
0041                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0042                   VarParsing.VarParsing.varType.bool,          # string, int, or float
0043                   "Cumulative Monitoring?")
0044 options.register ('outputRootFile',
0045                   "",
0046                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0047                   VarParsing.VarParsing.varType.string,          # string, int, or float
0048                   "output root file")
0049 options.register ('runNumber',
0050                   0,
0051                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0052                   VarParsing.VarParsing.varType.int,          # string, int, or float
0053                   "run number")
0054 
0055 options.parseArguments()
0056 
0057 process.MessageLogger = cms.Service("MessageLogger",
0058     debugModules = cms.untracked.vstring(''),
0059 #    insertLog = cms.untracked.PSet(
0060 #        threshold = cms.untracked.string('INFO')
0061 #    ),
0062                                     destinations = cms.untracked.vstring(options.logDestination,
0063                                                                          options.qualityLogDestination
0064 #                                                                         options.cablingLogDestination,
0065 #                                                                         options.condLogDestination
0066                                                                          ), #Reader, cout
0067                                     categories = cms.untracked.vstring('SiStripQualityStatistics'
0068 #                                                                       'SiStripQualityDQM',
0069 #                                                                       'SiStripFedCablingReader',
0070 #                                                                       'DummyCondObjContentPrinter',
0071                                                                        )
0072 )
0073 setattr(process.MessageLogger,options.logDestination,cms.untracked.PSet(threshold = cms.untracked.string('INFO')))
0074 setattr(process.MessageLogger,options.qualityLogDestination,cms.untracked.PSet(
0075     threshold = cms.untracked.string('INFO'),
0076     default = cms.untracked.PSet(limit=cms.untracked.int32(0)),
0077     SiStripQualityStatistics = cms.untracked.PSet(limit=cms.untracked.int32(100000))
0078 #    SiStripQualityDQM = cms.untracked.PSet(limit=cms.untracked.int32(100000))
0079     )
0080         )
0081 
0082 process.maxEvents = cms.untracked.PSet(
0083     input = cms.untracked.int32(-1)
0084 )
0085 
0086 process.source = cms.Source("EmptyIOVSource",
0087     firstValue = cms.uint64(options.runNumber),
0088     lastValue = cms.uint64(options.runNumber),
0089     timetype = cms.string('runnumber'),
0090     interval = cms.uint64(1)
0091 )
0092 
0093 # the DB Geometry is NOT used because in this cfg only one tag is taken from the DB and no GT is used. To be fixed if this is a problem
0094 process.load('Configuration.Geometry.GeometryExtended_cff')
0095 process.TrackerTopologyEP = cms.ESProducer("TrackerTopologyEP")
0096 process.load("Geometry.TrackerGeometryBuilder.trackerParameters_cfi")
0097 
0098 process.poolDBESSourceRunInfo = cms.ESSource("PoolDBESSource",
0099    BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0100    DBParameters = cms.PSet(
0101         messageLevel = cms.untracked.int32(1),  # it used to be 2
0102         authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0103     ),
0104     timetype = cms.untracked.string('runnumber'),
0105     connect = cms.string(options.runinfoConnectionString),
0106     toGet = cms.VPSet(cms.PSet(
0107         record = cms.string('RunInfoRcd'),
0108         tag = cms.string(options.runInfoTag)
0109         )               
0110                       )
0111 )
0112 
0113 process.poolDBESSourceFedCabling = cms.ESSource("PoolDBESSource",
0114    BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0115    DBParameters = cms.PSet(
0116         messageLevel = cms.untracked.int32(1),
0117         authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0118     ),
0119     timetype = cms.untracked.string('runnumber'),
0120     connect = cms.string(options.cablingConnectionString),
0121     toGet = cms.VPSet(cms.PSet(
0122         record = cms.string('SiStripFedCablingRcd'),
0123         tag = cms.string(options.cablingTag)
0124         )               
0125                       )
0126 )
0127 
0128 process.DQMStore = cms.Service("DQMStore",
0129     verbose = cms.untracked.int32(1)
0130 )
0131 
0132 process.load("DQM.SiStripMonitorSummary.SiStripMonitorCondData_cfi")
0133 
0134 process.CondDataMonitoring.OutputFileName = options.outputRootFile
0135 process.CondDataMonitoring.MonitorSiStripPedestal      = False
0136 process.CondDataMonitoring.MonitorSiStripNoise         = False
0137 process.CondDataMonitoring.MonitorSiStripQuality       = True
0138 process.CondDataMonitoring.MonitorSiStripCabling       = False
0139 process.CondDataMonitoring.MonitorSiStripApvGain       = False
0140 process.CondDataMonitoring.MonitorSiStripLorentzAngle  = False
0141 process.CondDataMonitoring.MonitorSiStripBackPlaneCorrection  = False
0142 process.CondDataMonitoring.MonitorSiStripLowThreshold  = False
0143 process.CondDataMonitoring.MonitorSiStripHighThreshold = False
0144 process.CondDataMonitoring.OutputMEsInRootFile         = True
0145 process.CondDataMonitoring.FillConditions_PSet.OutputSummaryAtLayerLevelAsImage           = True
0146 process.CondDataMonitoring.FillConditions_PSet.OutputSummaryProfileAtLayerLevelAsImage    = False # This should be saved only in case of LA (because for LA no SummaryAtLayerLevel is available)
0147 process.CondDataMonitoring.FillConditions_PSet.OutputCumulativeSummaryAtLayerLevelAsImage = options.MonitorCumulative
0148 process.CondDataMonitoring.FillConditions_PSet.HistoMaps_On     = False
0149 process.CondDataMonitoring.FillConditions_PSet.TkMap_On         = True # This is just for test until TkMap is included in all classes!!! Uncomment!!!!
0150 process.CondDataMonitoring.FillConditions_PSet.ActiveDetIds_On  = True # This should be set to False only for Lorentz Angle
0151 
0152 process.CondDataMonitoring.SiStripPedestalsDQM_PSet.FillSummaryAtLayerLevel     = True
0153 process.CondDataMonitoring.SiStripNoisesDQM_PSet.FillSummaryAtLayerLevel        = True
0154 process.CondDataMonitoring.SiStripQualityDQM_PSet.FillSummaryAtLayerLevel       = True
0155 process.CondDataMonitoring.SiStripApvGainsDQM_PSet.FillSummaryAtLayerLevel      = True
0156 process.CondDataMonitoring.SiStripLowThresholdDQM_PSet.FillSummaryAtLayerLevel  = True
0157 process.CondDataMonitoring.SiStripHighThresholdDQM_PSet.FillSummaryAtLayerLevel = True
0158 
0159 process.CondDataMonitoring.SiStripCablingDQM_PSet.CondObj_fillId       = 'ProfileAndCumul'
0160 process.CondDataMonitoring.SiStripPedestalsDQM_PSet.CondObj_fillId     = 'onlyProfile'
0161 process.CondDataMonitoring.SiStripNoisesDQM_PSet.CondObj_fillId        = 'onlyCumul'
0162 process.CondDataMonitoring.SiStripQualityDQM_PSet.CondObj_fillId       = 'onlyProfile'
0163 process.CondDataMonitoring.SiStripApvGainsDQM_PSet.CondObj_fillId      = 'ProfileAndCumul'
0164 process.CondDataMonitoring.SiStripLorentzAngleDQM_PSet.CondObj_fillId  = 'ProfileAndCumul'
0165 process.CondDataMonitoring.SiStripBackPlaneCorrectionDQM_PSet.CondObj_fillId  = 'ProfileAndCumul'
0166 process.CondDataMonitoring.SiStripLowThresholdDQM_PSet.CondObj_fillId  = 'onlyProfile'
0167 process.CondDataMonitoring.SiStripHighThresholdDQM_PSet.CondObj_fillId = 'onlyProfile'
0168 
0169 ## --- TkMap specific Configurable options:
0170 
0171 process.CondDataMonitoring.SiStripQualityDQM_PSet.TkMap_On     = True
0172 process.CondDataMonitoring.SiStripQualityDQM_PSet.TkMapName    = 'QualityTkMap.png'
0173 process.CondDataMonitoring.SiStripQualityDQM_PSet.minValue     = 0.
0174 process.CondDataMonitoring.SiStripQualityDQM_PSet.maxValue     = 100.
0175 
0176 process.CondDataMonitoring.SiStripCablingDQM_PSet.TkMap_On     = True
0177 process.CondDataMonitoring.SiStripCablingDQM_PSet.TkMapName    = 'CablingTkMap.png'
0178 process.CondDataMonitoring.SiStripCablingDQM_PSet.minValue     = 0.
0179 process.CondDataMonitoring.SiStripCablingDQM_PSet.maxValue     = 6.
0180 
0181 process.CondDataMonitoring.SiStripPedestalsDQM_PSet.TkMap_On     = True
0182 process.CondDataMonitoring.SiStripPedestalsDQM_PSet.TkMapName    = 'PedestalTkMap.png'
0183 process.CondDataMonitoring.SiStripPedestalsDQM_PSet.minValue     = 0.
0184 process.CondDataMonitoring.SiStripPedestalsDQM_PSet.maxValue     = 400.
0185 
0186 process.CondDataMonitoring.SiStripNoisesDQM_PSet.TkMap_On     = True
0187 process.CondDataMonitoring.SiStripNoisesDQM_PSet.TkMapName    = 'NoiseTkMap.png'
0188 process.CondDataMonitoring.SiStripNoisesDQM_PSet.minValue     = 3.
0189 process.CondDataMonitoring.SiStripNoisesDQM_PSet.maxValue     = 9.
0190 
0191 process.CondDataMonitoring.SiStripApvGainsDQM_PSet.TkMap_On     = True
0192 process.CondDataMonitoring.SiStripApvGainsDQM_PSet.TkMapName    = 'GainTkMap.png'
0193 process.CondDataMonitoring.SiStripApvGainsDQM_PSet.minValue     = 0.
0194 process.CondDataMonitoring.SiStripApvGainsDQM_PSet.maxValue     = 1.5
0195 
0196 process.CondDataMonitoring.SiStripLorentzAngleDQM_PSet.TkMap_On     = True
0197 process.CondDataMonitoring.SiStripLorentzAngleDQM_PSet.TkMapName    = 'LorentzAngleTkMap.png'
0198 process.CondDataMonitoring.SiStripLorentzAngleDQM_PSet.minValue     = 0.01
0199 process.CondDataMonitoring.SiStripLorentzAngleDQM_PSet.maxValue     = 0.03
0200 
0201 process.CondDataMonitoring.SiStripBackPlaneCorrectionDQM_PSet.TkMap_On     = True
0202 process.CondDataMonitoring.SiStripBackPlaneCorrectionDQM_PSet.TkMapName    = 'BackPlaneCorrectionTkMap.png'
0203 process.CondDataMonitoring.SiStripBackPlaneCorrectionDQM_PSet.minValue     = 0.00
0204 process.CondDataMonitoring.SiStripBackPlaneCorrectionDQM_PSet.maxValue     = 0.10
0205 
0206 process.CondDataMonitoring.SiStripLowThresholdDQM_PSet.TkMap_On     = True
0207 process.CondDataMonitoring.SiStripLowThresholdDQM_PSet.TkMapName     = 'LowThresholdTkMap.png'
0208 process.CondDataMonitoring.SiStripLowThresholdDQM_PSet.minValue     = 0.
0209 process.CondDataMonitoring.SiStripLowThresholdDQM_PSet.maxValue     = 10.
0210 
0211 process.CondDataMonitoring.SiStripHighThresholdDQM_PSet.TkMap_On     = True
0212 process.CondDataMonitoring.SiStripHighThresholdDQM_PSet.TkMapName     = 'HighThresholdTkMap.png'
0213 process.CondDataMonitoring.SiStripHighThresholdDQM_PSet.minValue     = 0.
0214 process.CondDataMonitoring.SiStripHighThresholdDQM_PSet.maxValue     = 10.
0215 
0216 
0217 process.p1 = cms.Path(process.CondDataMonitoring)
0218 
0219 process.SiStripQualityESProducer = cms.ESProducer("SiStripQualityESProducer",
0220    ReduceGranularity = cms.bool(False),
0221    PrintDebugOutput = cms.bool(False),
0222    UseEmptyRunInfo = cms.bool(True),
0223    ListOfRecordToMerge = cms.VPSet(
0224     cms.PSet(
0225     record = cms.string('RunInfoRcd'),
0226     tag = cms.string('')
0227     ),
0228     cms.PSet(
0229     record = cms.string('SiStripDetCablingRcd'),
0230     tag = cms.string('')
0231     )
0232                                    )
0233 )
0234 
0235 process.sistripconn = cms.ESProducer("SiStripConnectivity")
0236 
0237 from CalibTracker.SiStripQuality.siStripQualityStatistics_cfi import siStripQualityStatistics
0238 process.stat = siStripQualityStatistics.clone()
0239 
0240 process.e = cms.EndPath(process.stat)