Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:12

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("HFShowerLib")
0004 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0005 process.load('FWCore.MessageService.MessageLogger_cfi')
0006 process.load('Configuration.StandardSequences.Generator_cff')
0007 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0008 #process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic25ns13p6TeVEarly2022Collision_cfi')
0009 process.load("Configuration.Geometry.GeometryExtended2021_cff")
0010 process.load('Configuration.StandardSequences.MagneticField_cff')
0011 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0012 process.load('Configuration.StandardSequences.SimIdeal_cff')
0013 process.load("Configuration.StandardSequences.Services_cff")
0014 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0015 process.load("SimG4CMS.ShowerLibraryProducer.hfShowerLibaryAnalysis_cfi")
0016 from Configuration.AlCa.GlobalTag import GlobalTag 
0017 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic', '')
0018 
0019 if hasattr(process,'MessageLogger'):
0020     process.MessageLogger.HFShower = dict()
0021 
0022 process.Timing = cms.Service("Timing")
0023 
0024 process.maxEvents = cms.untracked.PSet(
0025     input = cms.untracked.int32(1)
0026 )
0027 
0028 process.source = cms.Source("EmptySource")
0029 
0030 process.generator = cms.EDProducer("FlatRandomEThetaGunProducer",
0031     PGunParameters = cms.PSet(
0032         PartID   = cms.vint32(13),
0033         MinTheta = cms.double(0.019997),
0034         MaxTheta = cms.double(0.019997),
0035         MinPhi   = cms.double(3.14500926),
0036         MaxPhi   = cms.double(3.14500926),
0037         MinE     = cms.double(100.0),
0038         MaxE     = cms.double(100.0)
0039     ),
0040     Verbosity = cms.untracked.int32(0),
0041     AddAntiParticle = cms.bool(False),
0042     firstRun = cms.untracked.uint32(1)
0043 )
0044 
0045 process.TFileService = cms.Service("TFileService",
0046     fileName = cms.string('hfShowerDump.root')
0047 )
0048 
0049 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0050 
0051 # Path and EndPath definitions
0052 process.generation_step = cms.Path(process.pgen)
0053 process.simulation_step = cms.Path(process.psim)
0054 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0055 process.analysis_step = cms.EndPath(process.hfShowerLibaryAnalysis)
0056 
0057 # Schedule definition
0058 process.schedule = cms.Schedule(process.generation_step,
0059 #                                process.genfiltersummary_step,
0060                                 process.simulation_step,
0061                                 process.analysis_step)
0062 
0063 #process.hfShowerLibaryAnalysis.Verbosity = True
0064 #process.hfShowerLibaryAnalysis.EventPerBin = 5000
0065 #process.hfShowerLibaryAnalysis.FileName = "HFShowerLibrary_npmt_noatt_eta4_16en_v4.root"
0066 
0067 # filter all path with the production filter sequence
0068 for path in process.paths:
0069         getattr(process,path)._seq = process.generator * getattr(process,path)._seq