Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-18 00:39:58

0001 # Useful for HCAL validation - coherent with Validation/CaloTowers/test/runNoise_NZS_cfg.py
0002 import os
0003 import FWCore.ParameterSet.Config as cms
0004 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0005 
0006 process = cms.Process('TEST')
0007 
0008 # import of standard configurations
0009 process.load('Configuration.StandardSequences.Services_cff')
0010 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0011 process.load('FWCore.MessageService.MessageLogger_cfi')
0012 process.load('FastSimulation.Configuration.EventContent_cff')
0013 process.load('FastSimulation.PileUpProducer.PileUpSimulator_NoPileUp_cff')
0014 process.load('FastSimulation.Configuration.Geometries_MC_cff')
0015 process.load("Configuration.StandardSequences.MagneticField_0T_cff")
0016 process.load('Configuration.StandardSequences.Generator_cff')
0017 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0018 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0019 process.load('FastSimulation.Configuration.HLT_GRun_cff')
0020 process.load('FastSimulation.Configuration.Validation_cff')
0021 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0022 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0023 
0024 # Input source
0025 process.source = cms.Source("PoolSource",
0026                             firstEvent = cms.untracked.uint32(1),
0027                             noEventSort = cms.untracked.bool(True), 
0028                             duplicateCheckMode = cms.untracked.string("noDuplicateCheck"),
0029                             fileNames = cms.untracked.vstring(
0030         'file:/afs/cern.ch/cms/data/CMSSW/Validation/HcalHits/data/3_1_X/mc_nue.root'
0031         )
0032                             )
0033 
0034 process.maxEvents = cms.untracked.PSet(
0035     input = cms.untracked.int32(10)
0036     )
0037 
0038 process.options = cms.untracked.PSet(
0039 
0040     )
0041 
0042 
0043 # Output definition
0044 
0045 process.FEVT = cms.OutputModule("PoolOutputModule",
0046                                 outputCommands = cms.untracked.vstring('drop *', 'keep *_MEtoEDMConverter_*_*'),
0047                                 fileName = cms.untracked.string("HcalValHarvestingEDM.root")
0048                                 )
0049 
0050 # DQM
0051 
0052 process.load("DQMServices.Core.DQM_cfg")
0053 process.DQM.collectorHost = ''
0054 
0055 process.load("DQMServices.Components.MEtoEDMConverter_cfi")
0056 
0057 #-----------------------------------------------------------------------------
0058 #                     Ananlyser + slient -> DQM
0059 #-----------------------------------------------------------------------------
0060 process.load('Configuration/StandardSequences/EDMtoMEAtRunEnd_cff')
0061 process.dqmSaver.referenceHandling = cms.untracked.string('all')
0062 
0063 cmssw_version = os.environ.get('CMSSW_VERSION','CMSSW_X_Y_Z')
0064 Workflow = '/HcalValidation/'+'Harvesting/'+str(cmssw_version)
0065 process.dqmSaver.workflow = Workflow
0066 
0067 
0068 # Make the tracker transparent, also no SimHits
0069 for layer in process.fastSimProducer.detectorDefinition.BarrelLayers: 
0070     layer.interactionModels = cms.untracked.vstring()
0071 for layer in process.fastSimProducer.detectorDefinition.ForwardLayers: 
0072     layer.interactionModels = cms.untracked.vstring()
0073 
0074 # Other statements
0075 process.simulation = cms.Sequence(process.simulationWithFamos)
0076 process.HLTEndSequence = cms.Sequence(process.reconstructionWithFamos)
0077 
0078 from Configuration.AlCa.autoCond import autoCond
0079 process.GlobalTag.globaltag = autoCond['mc']
0080 
0081 # HCAL validation
0082 
0083 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0084 process.hcalRecoAnalyzer = DQMEDAnalyzer('HcalRecHitsValidation',
0085                                           outputFile                = cms.untracked.string('HcalRecHitValidationRelVal.root'),
0086                                           HBHERecHitCollectionLabel = cms.untracked.InputTag("hbhereco"),
0087                                           HFRecHitCollectionLabel   = cms.untracked.InputTag("hfreco"),
0088                                           HORecHitCollectionLabel   = cms.untracked.InputTag("horeco"),
0089                                           eventype                  = cms.untracked.string('single'),
0090                                           mc                        = cms.untracked.string('yes'),
0091                                           sign = cms.untracked.string('*'),
0092                                           hcalselector              = cms.untracked.string('noise'),
0093                                           ecalselector              = cms.untracked.string('no'),
0094                                           )
0095 
0096 process.hcalrechitsClient = DQMEDHarvester("HcalRecHitsClient", 
0097                                            outputFile = cms.untracked.string('HcalRecHitsHarvestingME.root'),
0098                                            DQMDirName = cms.string("/") # root directory
0099                                            )
0100 
0101 
0102 # Path and EndPath definitions
0103 process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVT)
0104 process.hcalHitsValidation_step = cms.EndPath(
0105     process.hcalRecoAnalyzer *
0106     process.hcalrechitsClient * 
0107     process.dqmSaver)
0108 # process.MEtoEDMConverter
0109 # )
0110 
0111 
0112 
0113 # Schedule definition
0114 process.schedule.extend([process.hcalHitsValidation_step,process.FEVTDEBUGHLToutput_step])