Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:27:55

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runHGCGeomCheck_cfg.py geometry=D88
0004 #
0005 #   Options for geometry D88, D92, D93
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: D88, D92, D93")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 
0024 print(options)
0025 
0026 ####################################################################
0027 # Use the options
0028 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0029 process = cms.Process('GeomCheck',Phase2C17I13M9)
0030 
0031 geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
0032 inFile = "file:testHGCalSimWatcher" + options.geometry + ".root"
0033 outFile = "hgcGeomCheck" + options.geometry + ".root"
0034 
0035 print("Geometry file: ", geomFile)
0036 print("Input file:    ", inFile)
0037 print("Output file:   ", outFile)
0038 
0039 process.load(geomFile)
0040 process.load('Configuration.StandardSequences.Services_cff')
0041 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')    
0042 process.load('FWCore.MessageService.MessageLogger_cfi')
0043 process.load('Configuration.EventContent.EventContent_cff')
0044 process.load('Configuration.StandardSequences.MagneticField_cff')
0045 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0046 from Configuration.AlCa.GlobalTag import GlobalTag
0047 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0048 
0049 process.MessageLogger.cerr.FwkReport.reportEvery = 5
0050 if hasattr(process,'MessageLogger'):
0051     process.MessageLogger.HGCalValid=dict()
0052     process.MessageLogger.HGCalGeom=dict()
0053 
0054 process.MessageLogger.cerr.FwkReport.reportEvery = 100
0055 process.source = cms.Source("PoolSource",
0056     fileNames = cms.untracked.vstring(inFile)
0057 )
0058 
0059 process.load('Validation.HGCalValidation.hgcGeomCheck_cff')
0060 
0061 process.TFileService = cms.Service("TFileService",
0062                                    fileName = cms.string(outFile),
0063                                    closeFileFast = cms.untracked.bool(True)
0064 )
0065 
0066 SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",ignoreTotal = cms.untracked.int32(1) )
0067 
0068 process.p = cms.Path(process.hgcGeomCheck)