Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-07 22:23:02

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runHGCalSimHitStudy_cfg.py geometry=D92
0004 #
0005 #   Options for geometry D77, D83, D88, D92
0006 #
0007 ###############################################################################
0008 import FWCore.ParameterSet.Config as cms
0009 import os, sys, imp, re
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011 
0012 ####################################################################
0013 ### SETUP OPTIONS
0014 options = VarParsing.VarParsing('standard')
0015 options.register('geometry',
0016                  "D88",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "geometry of operations: D77, D83, D88, D92")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 
0024 print(options)
0025 
0026 ####################################################################
0027 # Use the options
0028 
0029 if (options.geometry == "D83"):
0030     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0031     process = cms.Process('PROD',Phase2C11M9)
0032     process.load('Configuration.Geometry.GeometryExtended2026D83_cff')
0033     process.load('Configuration.Geometry.GeometryExtended2026D83Reco_cff')
0034     fileInput = 'file:step1D83tt.root'
0035     fileName = 'hgcSimHitD83tt.root'
0036 elif (options.geometry == "D88"):
0037     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0038     process = cms.Process('PROD',Phase2C11M9)
0039     process.load('Configuration.Geometry.GeometryExtended2026D88_cff')
0040     process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
0041     fileInput = 'file:step1D88tt.root'
0042     fileName = 'hgcSimHitD88tt.root'
0043 elif (options.geometry == "D92"):
0044     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0045     process = cms.Process('PROD',Phase2C11M9)
0046     process.load('Configuration.Geometry.GeometryExtended2026D92_cff')
0047     process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
0048     fileInput = 'file:step1D92tt.root'
0049     fileName = 'hgcSimHitD92tt.root'
0050 else:
0051     from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
0052     process = cms.Process('PROD',Phase2C11)
0053     process.load('Configuration.Geometry.GeometryExtended2026D77_cff')
0054     process.load('Configuration.Geometry.GeometryExtended2026D77Reco_cff')
0055     fileInput = 'file:step1D77tt.root'
0056     fileName = 'hgcSimHitD77tt.root'
0057 
0058 print("Input file: ", fileInput)
0059 print("Output file: ", fileName)
0060 
0061 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0062 process.load("Configuration.StandardSequences.MagneticField_cff")
0063 process.load("Configuration.EventContent.EventContent_cff")
0064 process.load('FWCore.MessageService.MessageLogger_cfi')
0065 process.load('Validation.HGCalValidation.hgcSimHitStudy_cfi')
0066 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0067 from Configuration.AlCa.GlobalTag import GlobalTag
0068 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0069 
0070 process.source = cms.Source("PoolSource",
0071                             fileNames = cms.untracked.vstring(fileInput) )
0072 
0073 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0074 
0075 process.TFileService = cms.Service("TFileService",
0076                                    fileName = cms.string(fileName),
0077                                    closeFileFast = cms.untracked.bool(True)
0078                                    )
0079 
0080 process.p = cms.Path(process.hgcalSimHitStudy)