Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runZDCStudy_cfg.py type=Standard
0004 #
0005 #   Options for type Standard, Forward, Legacy
0006 #
0007 ###############################################################################
0008 import FWCore.ParameterSet.Config as cms
0009 import os, sys, importlib, re
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011 
0012 ####################################################################
0013 ### SETUP OPTIONS
0014 options = VarParsing.VarParsing('standard')
0015 options.register('type',
0016                  "Standard",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "type of operations: Standard, Forward, Legacy")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 print(options)
0024 
0025 from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
0026 
0027 process = cms.Process("ZDCStudy")
0028 
0029 inFile = "file:zdc" + options.type + ".root"
0030 outFile = options.type + ".root"
0031 print("Input file:  ", inFile)
0032 print("Output file: ", outFile)
0033 
0034 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0035 process.load('FWCore.MessageService.MessageLogger_cfi')
0036 
0037 process.MessageLogger.HitStudy=dict()
0038 
0039 process.maxEvents = cms.untracked.PSet(  input = cms.untracked.int32(-1) )
0040 
0041 process.source = cms.Source("PoolSource",
0042                             fileNames = cms.untracked.vstring(inFile)
0043 )
0044 
0045 process.TFileService = cms.Service("TFileService",
0046     fileName = cms.string(outFile)
0047 )
0048 
0049 process.load("SimG4CMS.Forward.zdcSimHitStudy_cfi")
0050 
0051 process.zdcSimHitStudy.Verbose = True
0052  
0053 process.schedule = cms.Path(process.zdcSimHitStudy)
0054