Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:32:13

0001 import os
0002 import FWCore.ParameterSet.Config as cms
0003 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0004 
0005 process = cms.Process("hcalval")
0006 process.load("Configuration.StandardSequences.Reconstruction_cff")
0007 #process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0008 process.load('Configuration/StandardSequences/DigiToRaw_cff')
0009 process.load('Configuration/StandardSequences/RawToDigi_cff')
0010 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0011 from Configuration.AlCa.autoCond import autoCond
0012 process.GlobalTag.globaltag = autoCond['startup']
0013 
0014 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0015 process.MessageLogger.cerr.FwkReport.reportEvery = 100
0016 
0017 process.load("DQMServices.Core.DQM_cfg")
0018 process.DQM.collectorHost = ''
0019 
0020 process.options = cms.untracked.PSet( SkipEvent = cms.untracked.vstring('ProductNotFound') )
0021 
0022 #######################################################################
0023 # TWO-file approach, as both RAW  (for HCAL re-reco)    and
0024 #                               RECO (for unchanged ECAL)  are required 
0025 #######################################################################
0026 process.source = cms.Source("PoolSource",
0027 noEventSort = cms.untracked.bool(True),
0028 duplicateCheckMode = cms.untracked.string('noDuplicateCheck'),   
0029     #--- full set of GEN-SIM-RECO RelVal files ----------------------------
0030     fileNames = cms.untracked.vstring(
0031 
0032     ),
0033     #--- full set of GEN-SIM-DIGI-RAW(-HLTDEBUG) RelVal files -------------
0034     secondaryFileNames = cms.untracked.vstring(   
0035 
0036      ),  
0037     inputCommands = cms.untracked.vstring('keep *', 'drop *_MEtoEDMConverter_*_*')
0038 )
0039 
0040 
0041 process.load("DQMServices.Components.MEtoEDMConverter_cfi")
0042 
0043 process.maxEvents = cms.untracked.PSet(
0044     input = cms.untracked.int32(-1)
0045 )
0046 
0047 process.FEVT = cms.OutputModule("PoolOutputModule",
0048      outputCommands = cms.untracked.vstring('drop *', 'keep *_MEtoEDMConverter_*_*'),
0049      fileName = cms.untracked.string("HcalValHarvestingEDM.root")
0050 )
0051 
0052 
0053 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0054 process.hcalDigiAnalyzer = DQMEDAnalyzer('HcalDigisValidation',
0055     outputFile            = cms.untracked.string('HcalDigisValidationRelVal.root'),
0056     digiLabel             = cms.InputTag("hcalDigis"),
0057     zside             = cms.untracked.string('*'),
0058     mode              = cms.untracked.string('multi'),
0059 
0060     hcalselector          = cms.untracked.string('all'),
0061     mc                = cms.untracked.string('yes') # 'yes' for MC
0062 )   
0063 
0064 process.hcalTowerAnalyzer = DQMEDAnalyzer('CaloTowersValidation',
0065     outputFile               = cms.untracked.string('CaloTowersValidationRelVal.root'),
0066     CaloTowerCollectionLabel = cms.untracked.InputTag('towerMaker'),
0067 
0068     hcalselector             = cms.untracked.string('all'),
0069     mc                       = cms.untracked.string('no'),
0070     useAllHistos             = cms.untracked.bool(False)                         
0071 )
0072 
0073 process.hcalNoiseRates = DQMEDHarvester('NoiseRates',
0074     outputFile   = cms.untracked.string('NoiseRatesRelVal.root'),
0075     rbxCollName  = cms.untracked.InputTag('hcalnoise'),
0076 
0077     minRBXEnergy = cms.untracked.double(20.0),
0078     minHitEnergy = cms.untracked.double(1.5),
0079     useAllHistos = cms.untracked.bool(False)                         
0080 )
0081 
0082 process.hcalRecoAnalyzer = DQMEDAnalyzer('HcalRecHitsValidation',
0083     outputFile                = cms.untracked.string('HcalRecHitValidationRelVal.root'),
0084     HBHERecHitCollectionLabel = cms.untracked.InputTag("hbhereco"),
0085     HFRecHitCollectionLabel   = cms.untracked.InputTag("hfreco"),
0086     HORecHitCollectionLabel   = cms.untracked.InputTag("horeco"),
0087 
0088     eventype                  = cms.untracked.string('multi'),
0089     ecalselector              = cms.untracked.string('yes'),
0090     hcalselector              = cms.untracked.string('all'),
0091     mc                        = cms.untracked.string('no'),
0092 )
0093 
0094 
0095 process.load('Configuration/StandardSequences/EDMtoMEAtRunEnd_cff')
0096 process.dqmSaver.referenceHandling = cms.untracked.string('all')
0097 
0098 cmssw_version = os.environ.get('CMSSW_VERSION','CMSSW_X_Y_Z')
0099 Workflow = '/HcalValidation/'+'Harvesting/'+str(cmssw_version)
0100 process.dqmSaver.workflow = Workflow
0101 
0102 process.calotowersClient = DQMEDHarvester("CaloTowersClient", 
0103      outputFile = cms.untracked.string('CaloTowersHarvestingME.root'),
0104      DQMDirName = cms.string("/") # root directory
0105 )
0106 
0107 process.noiseratesClient = DQMEDHarvester("NoiseRatesClient", 
0108      outputFile = cms.untracked.string('NoiseRatesHarvestingME.root'),
0109      DQMDirName = cms.string("/") # root directory
0110 )
0111 
0112 process.hcalrechitsClient = DQMEDHarvester("HcalRecHitsClient", 
0113      outputFile = cms.untracked.string('HcalRecHitsHarvestingME.root'),
0114      DQMDirName = cms.string("/") # root directory
0115 )
0116 
0117 process.hcaldigisClient = DQMEDHarvester("HcalDigisClient",
0118      outputFile = cms.untracked.string('HcalDigisHarvestingME.root'),
0119      DQMDirName = cms.string("/") # root directory
0120 )   
0121 
0122 process.hcalDigis.InputLabel = 'rawDataCollector' # MC
0123 
0124 process.p2 = cms.Path( 
0125 process.hcalDigis * 
0126 process.hcalTowerAnalyzer * 
0127 process.hcalNoiseRates * 
0128 process.hcalRecoAnalyzer *
0129 process.hcalDigiAnalyzer * 
0130 process.calotowersClient * 
0131 process.noiseratesClient *
0132 process.hcalrechitsClient * 
0133 process.hcaldigisClient * 
0134 process.dqmSaver)