Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 # Useful for HCAL validation
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 process = cms.Process('TEST')
0005 
0006 # import of standard configurations
0007 process.load('Configuration.StandardSequences.Services_cff')
0008 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0009 process.load('FWCore.MessageService.MessageLogger_cfi')
0010 process.load('FastSimulation.Configuration.EventContent_cff')
0011 process.load('FastSimulation.PileUpProducer.PileUpSimulator_NoPileUp_cff')
0012 process.load('FastSimulation.Configuration.Geometries_MC_cff')
0013 process.load("Configuration.StandardSequences.MagneticField_0T_cff")
0014 process.load('Configuration.StandardSequences.Generator_cff')
0015 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0016 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0017 process.load('FastSimulation.Configuration.HLT_GRun_cff')
0018 process.load('FastSimulation.Configuration.Validation_cff')
0019 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0020 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0021 
0022 process.maxEvents = cms.untracked.PSet(
0023     input = cms.untracked.int32(2000)
0024     )
0025 
0026 # Input source
0027 process.source = cms.Source("PoolSource",
0028                             #                   firstEvent = cms.untracked.uint32(XXXXX),
0029                             firstEvent = cms.untracked.uint32(0),
0030                             #                   fileNames = cms.untracked.vstring('file:mc.root')
0031                             fileNames = cms.untracked.vstring('file:/afs/cern.ch/cms/data/CMSSW/Validation/HcalHits/data/3_1_X/mc_pi50_eta05.root')
0032                 )
0033 
0034 process.options = cms.untracked.PSet(
0035 
0036     )
0037 
0038 
0039 # Output definition
0040 
0041 process.FEVT = cms.OutputModule("PoolOutputModule",
0042                                 outputCommands = cms.untracked.vstring('drop *', 'keep *_MEtoEDMConverter_*_*'),
0043                                 fileName = cms.untracked.string("output.root")
0044                                 )
0045 
0046 # DQM
0047 
0048 process.load("DQMServices.Core.DQM_cfg")
0049 process.DQM.collectorHost = ''
0050 
0051 process.load("DQMServices.Components.MEtoEDMConverter_cfi")
0052 
0053 # Vertex in (0,0,0)
0054 
0055 process.load("RecoVertex.BeamSpotProducer.BeamSpotFakeParameters_cfi")
0056 process.es_prefer_beamspot = cms.ESPrefer("BeamSpotFakeConditions","")
0057 process.BeamSpotFakeConditions.X0=0
0058 process.BeamSpotFakeConditions.Y0=0
0059 process.BeamSpotFakeConditions.Z0=0
0060 
0061 process.fastSimProducer.VertexGenerator.SigmaX=0
0062 process.fastSimProducer.VertexGenerator.SigmaY=0
0063 process.fastSimProducer.VertexGenerator.SigmaZ=0  
0064 
0065 process.VtxSmeared.SigmaX = 0.00001 # unuseful?
0066 process.VtxSmeared.SigmaY = 0.00001 # unuseful?
0067 process.VtxSmeared.SigmaZ = 0.00001 # unuseful?
0068 
0069 # Make the tracker transparent
0070 for layer in process.fastSimProducer.detectorDefinition.BarrelLayers: 
0071     layer.interactionModels = cms.untracked.vstring()
0072 for layer in process.fastSimProducer.detectorDefinition.ForwardLayers: 
0073     layer.interactionModels = cms.untracked.vstring()
0074     
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                                           ecalselector              = cms.untracked.string('yes'),
0091                                           hcalselector              = cms.untracked.string('all'),
0092                                           mc                        = cms.untracked.string('yes'),
0093                                           Famos                     = cms.untracked.bool(True) 
0094                                           )
0095 
0096 process.hcalTowerAnalyzer = DQMEDAnalyzer('CaloTowersValidation',
0097                                            outputFile               = cms.untracked.string('CaloTowersValidationRelVal.root'),
0098                                            CaloTowerCollectionLabel = cms.untracked.InputTag('towerMaker'),
0099                                            hcalselector             = cms.untracked.string('all'),
0100                                            mc                       = cms.untracked.string('yes')  
0101                                            )
0102 
0103 
0104 # Path and EndPath definitions
0105 process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVT)
0106 process.hcalHitsValidation_step = cms.EndPath(
0107     process.hcalTowerAnalyzer *
0108     process.hcalRecoAnalyzer *
0109     process.MEtoEDMConverter
0110     )
0111 
0112 # Schedule definition
0113 process.schedule.extend([process.hcalHitsValidation_step,process.FEVTDEBUGHLToutput_step])