Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import os
0002 import FWCore.ParameterSet.Config as cms
0003 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0004 
0005 process = cms.Process("TEST")
0006 
0007 ### RANDOM setting (change last digit(s) to make runs different !)
0008 process.load("Configuration.StandardSequences.SimulationRandomNumberGeneratorSeeds_cff")
0009 #process.RandomNumberGeneratorService.generator.initialSeed = 12345XXXX
0010 
0011 process.load("Configuration.StandardSequences.Simulation_cff")
0012 process.load("SimGeneral.MixingModule.mixNoPU_cfi")
0013 process.load("Configuration.StandardSequences.Reconstruction_cff")
0014 process.load('Configuration/StandardSequences/DigiToRaw_cff')
0015 process.load('Configuration/StandardSequences/RawToDigi_cff')
0016 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0017 from Configuration.AlCa.autoCond import autoCond
0018 process.GlobalTag.globaltag = autoCond['mc']
0019 
0020 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0021 process.load("Configuration.StandardSequences.GeometryECALHCAL_cff")
0022 process.load("Configuration.StandardSequences.MagneticField_cff")
0023 process.g4SimHits.UseMagneticField = False
0024 
0025 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0026 process.MessageLogger.cerr.FwkReport.reportEvery = 100
0027 
0028 process.load("DQMServices.Core.DQM_cfg")
0029 process.DQM.collectorHost = ''
0030 
0031 process.options = cms.untracked.PSet(
0032     Rethrow = cms.untracked.vstring('ProductNotFound')
0033 )
0034 
0035 # Input source
0036 process.source = cms.Source("PoolSource",
0037     firstEvent = cms.untracked.uint32(1),
0038     noEventSort = cms.untracked.bool(True), 
0039     duplicateCheckMode = cms.untracked.string("noDuplicateCheck"),
0040     fileNames = cms.untracked.vstring(
0041 'file:/afs/cern.ch/cms/data/CMSSW/Validation/HcalHits/data/3_1_X/mc_nue.root'
0042     )
0043 )
0044 
0045 process.maxEvents = cms.untracked.PSet(
0046     input = cms.untracked.int32(1000)
0047 )
0048 
0049 process.FEVT = cms.OutputModule("PoolOutputModule",
0050      outputCommands = cms.untracked.vstring('drop *', 'keep *_MEtoEDMConverter_*_*'),
0051      fileName = cms.untracked.string("HcalValHarvestingEDM.root")
0052 )
0053 
0054 
0055 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0056 process.hcalDigiAnalyzer = DQMEDAnalyzer('HcalDigiTester',
0057     digiLabel = cms.InputTag("hcalDigis"),
0058     outputFile = cms.untracked.string('HcalDigisValidation_ZS.root'),
0059     hcalselector = cms.untracked.string('noise'),
0060     zside = cms.untracked.string('*')
0061 )
0062 
0063 process.hcalRecoAnalyzer = DQMEDAnalyzer('HcalRecHitsValidation',
0064     outputFile = cms.untracked.string('HcalRecHitsValidation_ZS.root'),
0065     HBHERecHitCollectionLabel = cms.untracked.InputTag("hbhereco"),
0066     HFRecHitCollectionLabel   = cms.untracked.InputTag("hfreco"),
0067     HORecHitCollectionLabel   = cms.untracked.InputTag("horeco"),
0068     eventype = cms.untracked.string('single'),
0069     mc = cms.untracked.string('yes'),
0070     sign = cms.untracked.string('*'),
0071     hcalselector = cms.untracked.string('noise'),
0072     ecalselector = cms.untracked.string('no'),
0073 )
0074 
0075 process.hcalTowerAnalyzer = DQMEDAnalyzer('CaloTowersValidation',
0076     outputFile = cms.untracked.string('CaloTowersValidation.root'),
0077     CaloTowerCollectionLabel = cms.untracked.InputTag('towerMaker'),
0078     hcalselector = cms.untracked.string('all'),
0079     useAllHistos             = cms.untracked.bool(True) 
0080 )
0081 
0082 #------------------------------------
0083 
0084 #process.simHcalDigis.HBlevel = -1000
0085 #process.simHcalDigis.HElevel = -1000
0086 #process.simHcalDigis.HOlevel = -1000
0087 #process.simHcalDigis.HFlevel = -1000
0088 #process.simHcalDigis.useConfigZSvalues = 1
0089 
0090 process.VtxSmeared.SigmaX = 0.00001
0091 process.VtxSmeared.SigmaY = 0.00001
0092 process.VtxSmeared.SigmaZ = 0.00001
0093 
0094 
0095 ### Special - CaloOnly ------------------------------------
0096 
0097 #--- comes from DigiToRaw_cff.py
0098 process.ecalPacker.Label = 'simEcalDigis'
0099 process.ecalPacker.InstanceEB = 'ebDigis'
0100 process.ecalPacker.InstanceEE = 'eeDigis'
0101 process.ecalPacker.labelEBSRFlags = "simEcalDigis:ebSrFlags"
0102 process.ecalPacker.labelEESRFlags = "simEcalDigis:eeSrFlags"
0103 #
0104 #- hcalRawData (EventFilter/HcalRawToDigi/python/HcalDigiToRaw_cfi.py
0105 #                 uses simHcalDigis by default...
0106 
0107 
0108 #--- to force RAW->Digi
0109 process.ecalDigis.InputLabel = 'rawDataCollector'
0110 process.hcalDigis.InputLabel = 'rawDataCollector'
0111 process.ecalPreshowerDigis.sourceTag = 'rawDataCollector'
0112 
0113 #--- calolocalreco = cms.Sequence(ecalLocalRecoSequence+hcalLocalRecoSequence)
0114 # RecoLocalCalo.Configuration.ecalLocalRecoSequence_cff
0115 # RecoLocalCalo.Configuration.hcalLocalReco_cff
0116 
0117 #--- To cope with JP Chou pre-reco introduction to bring back hbhe RecHits collection to CaloTowers
0118 delattr(process,"hbhereco")
0119 process.hbhereco = process.hbheprereco.clone()
0120 process.hcalLocalRecoSequence.replace(process.hbheprereco,process.hbhereco)
0121 
0122 #------------------------------------------------ processing
0123 
0124 process.load('Configuration/StandardSequences/EDMtoMEAtRunEnd_cff')
0125 process.dqmSaver.referenceHandling = cms.untracked.string('all')
0126 
0127 cmssw_version = os.environ.get('CMSSW_VERSION','CMSSW_X_Y_Z')
0128 Workflow = '/HcalValidation/'+'Harvesting/'+str(cmssw_version)
0129 process.dqmSaver.workflow = Workflow
0130 
0131 process.calotowersClient = DQMEDHarvester("CaloTowersClient", 
0132      outputFile = cms.untracked.string('CaloTowersHarvestingME.root'),
0133      DQMDirName = cms.string("/") # root directory
0134 )
0135 
0136 process.hcalrechitsClient = DQMEDHarvester("HcalRecHitsClient", 
0137      outputFile = cms.untracked.string('HcalRecHitsHarvestingME_ZS.root'),
0138      DQMDirName = cms.string("/") # root directory
0139 )
0140 
0141 process.g4SimHits.Generator.HepMCProductLabel = 'VtxSmeared'
0142 process.p = cms.Path(
0143  process.VtxSmeared *
0144  process.g4SimHits * 
0145  process.mix *
0146  process.calDigi *
0147  process.ecalPacker *
0148  process.esDigiToRaw *
0149  process.hcalRawData *
0150  process.rawDataCollector *
0151  process.ecalDigis * 
0152  process.ecalPreshowerDigis * 
0153  process.hcalDigis *
0154  process.calolocalreco *
0155  process.caloTowersRec *
0156  process.hcalDigiAnalyzer *
0157  process.hcalTowerAnalyzer *
0158  process.hcalRecoAnalyzer *
0159  process.calotowersClient * 
0160  process.hcalrechitsClient * 
0161  process.dqmSaver)