Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:53:53

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("DQM")
0004 
0005 #----------------------------
0006 # Common for PP and HI running
0007 #-----------------------------
0008 
0009 process.load("DQMServices.Core.DQM_cfg")
0010 
0011 process.load("DQMServices.Components.DQMEnvironment_cfi")
0012 
0013 
0014 #----------------------------
0015 ### @@@@@@ Comment when running locally @@@@@@ ###
0016 process.load("DQM.Integration.test.inputsource_cfi")
0017 process.EventStreamHttpReader.consumerName = "Beam Pixel DQM Consumer"
0018 
0019 
0020 #----------------------------
0021 # HLT Filter
0022 process.load("HLTrigger.special.HLTTriggerTypeFilter_cfi")
0023 # 0=random, 1=physics, 2=calibration, 3=technical
0024 process.hltTriggerTypeFilter.SelectedTriggerType = 1
0025 process.physicsBitSelector = cms.EDFilter("PhysDecl",
0026                                           applyfilter = cms.untracked.bool(True),
0027                                           debugOn     = cms.untracked.bool(False))
0028 # L1 Filter
0029 process.load("L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff")
0030 process.load("HLTrigger.HLTfilters.hltLevel1GTSeed_cfi")
0031 process.hltLevel1GTSeed.L1TechTriggerSeeding = cms.bool(True)
0032 process.hltLevel1GTSeed.L1SeedsLogicalExpression = cms.string("0 AND (40 OR 41) AND NOT (36 OR 37 OR 38 OR 39) AND (NOT 42 OR 43) AND (42 OR NOT 43)")
0033 
0034 
0035 #----------------------------
0036 # DQM Environment
0037 #----------------------------
0038 process.load("DQM.Integration.test.environment_cfi")
0039 ### @@@@@@ Un-comment when running locally @@@@@@ ###
0040 #process.DQM.collectorHost = ''
0041 ### @@@@@@ Un-comment when running locally @@@@@@ ###
0042 process.dqmEnv.subSystemFolder = "BeamPixel"
0043 
0044 
0045 #----------------------------
0046 # Sub-system Configuration
0047 #----------------------------
0048 ### @@@@@@ Comment when running locally @@@@@@ ###
0049 #process.load("DQM.Integration.test.FrontierCondition_GT_cfi")
0050 ### @@@@@@ Comment when running locally @@@@@@ ###
0051 process.load("FWCore.MessageService.MessageLogger_cfi")
0052 process.load("Configuration.StandardSequences.Services_cff")
0053 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0054 process.load("Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff")
0055 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
0056 process.load("Configuration.StandardSequences.EndOfProcess_cff")
0057 process.load("Configuration.EventContent.EventContent_cff")
0058 process.load("RecoTracker.TkTrackingRegions.GlobalTrackingRegion_cfi")
0059 process.load("RecoVertex.PrimaryVertexProducer.OfflinePixel3DPrimaryVertices_cfi")
0060 
0061 
0062 
0063 
0064 #----------------------------
0065 # Define Sequence
0066 #----------------------------
0067 process.dqmmodules = cms.Sequence(process.dqmEnv 
0068                                 + process.dqmSaver)
0069 
0070 
0071 process.phystrigger = cms.Sequence(
0072                                     process.hltTriggerTypeFilter
0073                               )
0074 
0075 # Setup DQM store parameters.
0076 #process.DQMStore.verbose = 1
0077 process.DQM.collectorHost   = 'lxplus414.cern.ch'
0078 process.DQM.collectorPort   = 9190
0079 process.dqmSaver.dirName    = '.'
0080 process.dqmSaver.producer   = 'Playback'
0081 process.dqmSaver.convention = 'Online'
0082 process.dqmEnv.subSystemFolder = 'BeamPixel'
0083 process.dqmSaver.saveByRun     = 1
0084 process.dqmSaver.saveAtJobEnd  = True
0085 
0086 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0087 process.GlobalTag.globaltag = 'GR_R_52_V2::All'
0088 
0089 
0090 process.options = cms.untracked.PSet(
0091     wantSummary = cms.untracked.bool(True)
0092 )
0093 
0094 
0095 # reduce verbosity
0096 process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1)
0097 
0098 
0099 
0100 
0101 #----------------------------
0102 # Proton-Proton Running Stuff
0103 #----------------------------
0104 
0105 if (process.runType.getRunType() == process.runType.pp_run):
0106     print "Running pp "
0107 
0108     process.EventStreamHttpReader.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('HLT_L1*',
0109                                                                                            'HLT_Jet*',
0110                                                                                      #      'HLT_*Cosmic*',
0111                                                                                      #      'HLT_HT*',
0112                                                                                      #      'HLT_MinBias_*',
0113                                                                                      #      'HLT_Physics*',
0114                                                                                            'HLT_ZeroBias*'))
0115 
0116     process.load("Configuration.StandardSequences.Reconstruction_cff")
0117 
0118     #----------------------------
0119     # pixelVertexDQM Configuration
0120     #----------------------------
0121 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0122     process.pixelVertexDQM = DQMEDAnalyzer('Vx3DHLTAnalyzer',
0123                                             vertexCollection = cms.InputTag("pixelVertices"),
0124                                             debugMode        = cms.bool(True),
0125                                             nLumiReset       = cms.uint32(1),
0126                                             dataFromFit      = cms.bool(True),
0127                                             minNentries      = cms.uint32(20),
0128                                             # If the histogram has at least "minNentries" then extract Mean and RMS,
0129                                             # or, if we are performing the fit, the number of vertices must be greater
0130                                             # than minNentries otherwise it waits for other nLumiReset
0131                                             xRange           = cms.double(2.0),
0132                                             xStep            = cms.double(0.001),
0133                                             yRange           = cms.double(2.0),
0134                                             yStep            = cms.double(0.001),
0135                                             zRange           = cms.double(30.0),
0136                                             zStep            = cms.double(0.05),
0137                                             VxErrCorr        = cms.double(1.24),
0138                                             fileName         = cms.string("BeamPixelResults.txt"))
0139     if process.dqmSaver.producer.value() is "Playback":
0140        process.pixelVertexDQM.fileName = cms.string("BeamPixelResults.txt")
0141     else:
0142        process.pixelVertexDQM.fileName = cms.string("BeamPixelResults.txt")
0143 
0144     process.pixelVertices.TkFilterParameters.minPt = process.pixelTracks.RegionFactoryPSet.RegionPSet.ptMin
0145 
0146 
0147     process.reconstruction_step = cms.Sequence(
0148                                                process.siPixelDigis*
0149                                                process.offlineBeamSpot*
0150                                                process.siPixelClusters*
0151                                                process.siPixelRecHits*
0152                                                process.pixelTracks*
0153                                                process.pixelVertices*
0154                                                process.pixelVertexDQM)
0155 
0156     process.p = cms.Path(process.phystrigger 
0157                       * process.reconstruction_step 
0158                      * process.dqmmodules)
0159 
0160     process.castorDigis.InputLabel = cms.InputTag("rawDataCollector")
0161     process.csctfDigis.producer = cms.InputTag("rawDataCollector")
0162     process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataCollector")
0163     process.ecalDigis.InputLabel = cms.InputTag("rawDataCollector")
0164     process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataCollector")
0165     process.gctDigis.inputLabel = cms.InputTag("rawDataCollector")
0166     process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataCollector")
0167     process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataCollector")
0168     process.hcalDigis.InputLabel = cms.InputTag("rawDataCollector")
0169     process.muonCSCDigis.InputObjects = cms.InputTag("rawDataCollector")
0170     process.muonDTDigis.inputLabel = cms.InputTag("rawDataCollector")
0171     process.muonRPCDigis.InputLabel = cms.InputTag("rawDataCollector")
0172     process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataCollector")
0173     process.siPixelDigis.InputLabel = cms.InputTag("rawDataCollector")
0174     process.siStripDigis.ProductLabel = cms.InputTag("rawDataCollector")
0175 
0176 #--------------------------------------------------
0177 # Heavy Ion Specific Part
0178 #--------------------------------------------------
0179 
0180 if (process.runType.getRunType() == process.runType.hi_run):
0181     
0182     print "Running HI "
0183     process.castorDigis.InputLabel = cms.InputTag("rawDataRepacker")
0184     process.csctfDigis.producer = cms.InputTag("rawDataRepacker")
0185     process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataRepacker")
0186     process.ecalDigis.InputLabel = cms.InputTag("rawDataRepacker")
0187     process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataRepacker")
0188     process.gctDigis.inputLabel = cms.InputTag("rawDataRepacker")
0189     process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataRepacker")
0190     process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataRepacker")
0191     process.hcalDigis.InputLabel = cms.InputTag("rawDataRepacker")
0192     process.muonCSCDigis.InputObjects = cms.InputTag("rawDataRepacker")
0193     process.muonDTDigis.inputLabel = cms.InputTag("rawDataRepacker")
0194     process.muonRPCDigis.InputLabel = cms.InputTag("rawDataRepacker")
0195     process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataRepacker")
0196     process.siPixelDigis.InputLabel = cms.InputTag("rawDataRepacker")
0197     process.siStripDigis.ProductLabel = cms.InputTag("rawDataRepacker")
0198 
0199 
0200     process.load("Configuration.StandardSequences.ReconstructionHeavyIons_cff") ## HI sequences
0201 
0202     process.EventStreamHttpReader.consumerName = "Beam Pixel DQM Consumer"
0203     process.EventStreamHttpReader.SelectEvents =  cms.untracked.PSet(
0204              SelectEvents = cms.vstring( 'HLT_HI*')
0205                 )
0206 
0207     #----------------------------
0208     # pixelVertexDQM Configuration
0209     #----------------------------
0210     process.pixelVertexDQM = DQMEDAnalyzer('Vx3DHLTAnalyzer',
0211                                             vertexCollection = cms.InputTag("hiSelectedVertex"),
0212                                             debugMode        = cms.bool(False),
0213                                             nLumiReset       = cms.uint32(1),
0214                                             dataFromFit      = cms.bool(True),
0215                                             minNentries      = cms.uint32(20),
0216                                             # If the histogram has at least "minNentries" then extract Mean and RMS,
0217                                             # or, if we are performing the fit, the number of vertices must be greater
0218                                             # than minNentries otherwise it waits for other nLumiReset
0219                                             xRange           = cms.double(2.0),
0220                                             xStep            = cms.double(0.001),
0221                                             yRange           = cms.double(2.0),
0222                                             yStep            = cms.double(0.001),
0223                                             zRange           = cms.double(30.0),
0224                                             zStep            = cms.double(0.05),
0225                                             VxErrCorr        = cms.double(1.5),
0226                                             fileName         = cms.string("BeamPixelResults.txt"))
0227     if process.dqmSaver.producer.value() is "Playback":
0228        process.pixelVertexDQM.fileName = cms.string("BeamPixelResults.txt")
0229     else:
0230        process.pixelVertexDQM.fileName = cms.string("BeamPixelResults.txt")
0231 
0232 
0233     #----------------------------
0234     # Pixel-Tracks Configuration
0235     #----------------------------
0236     process.PixelTrackReconstructionBlock.RegionFactoryPSet.ComponentName = "GlobalRegionProducer"
0237 
0238 
0239     #----------------------------
0240     # Pixel-Vertices Configuration
0241     #----------------------------
0242     process.reconstruction_step = cms.Sequence(
0243                                            process.siPixelDigis*
0244                                            process.offlineBeamSpot*
0245                                            process.siPixelClusters*
0246                                            process.siPixelRecHits*
0247                                            process.offlineBeamSpot*
0248                                            process.hiPixelVertices*
0249                                            process.pixelVertexDQM)
0250 
0251     #----------------------------
0252     # Define Path
0253     #----------------------------
0254     
0255     process.p = cms.Path(process.phystrigger 
0256                          *process.reconstruction_step 
0257                          *process.dqmmodules)
0258 
0259 
0260 
0261 #######----Event to Analyze----########
0262 process.maxEvents = cms.untracked.PSet(
0263     input = cms.untracked.int32(20000)
0264 )
0265 
0266 #input file
0267 process.source = cms.Source(
0268     "PoolSource",
0269     fileNames = cms.untracked.vstring(
0270     #HighPileUP Fill
0271   # 'file:/tmp/schauhan/HighPUHPF/BC4C924F-4EF3-E011-B001-E0CB4E553651.root',
0272   # 'file:/tmp/schauhan/HighPUHPF/B68B5DDB-4FF3-E011-AD2B-001D09F2B30B.root', 
0273   # 'file:/tmp/schauhan/HighPUHPF/284D89DB-4FF3-E011-9B4E-001D09F28EA3.root' 
0274     #RawReco 
0275   # 'file:/tmp/schauhan/RAWRECO/88B58FFA-0B21-E111-958E-002618943905.root'
0276    #Run 177515, Normal 2011B run
0277    'file:/tmp/schauhan/Run2011B_MinimumBias_RAW/1431D41F-E5EA-E011-8F71-001D09F291D2.root'
0278    #Raw, 178208 highpileup                                                           
0279    #'file:/tmp/schauhan/HighPileUp_Run178208/EC9C9C74-62F3-E011-B0EE-0019B9F4A1D7.root',
0280    #'file:/tmp/schauhan/HighPileUp_Run178208/A2CBA95C-60F3-E011-B4A5-001D09F251CC.root',
0281    #'file:/tmp/schauhan/HighPileUp_Run178208/BC9AC280-62F3-E011-B751-BCAEC518FF52.root',
0282    #'file:/tmp/schauhan/HighPileUp_Run178208/50455D75-62F3-E011-BF70-0015C5FDE067.root',
0283    #'file:/tmp/schauhan/HighPileUp_Run178208/30F48998-60F3-E011-80C0-003048CF99BA.root'
0284 
0285 
0286 
0287  ),
0288   skipBadFiles = cms.untracked.bool(True),  
0289 )
0290 
0291 #print process.dumpPython()