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 runHGCGeomCheck_cfg.py geometry=D77
0004 #
0005 #   Options for geometry D49, D68, D77, D83, D84, 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                  "D86",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "geometry of operations: D49, D68, D84, 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 == "D49"):
0030     from Configuration.Eras.Era_Phase2C9_cff import Phase2C9
0031     process = cms.Process('PROD',Phase2C9)
0032     process.load('Configuration.Geometry.GeometryExtended2026D49_cff')
0033     process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff')
0034     inFile = 'file:testHGCalSimWatcherV11.root'
0035     outFile = 'hgcGeomCheckD49.root'
0036 elif (options.geometry == "D68"):
0037     from Configuration.Eras.Era_Phase2C12_cff import Phase2C12
0038     process = cms.Process('PROD',Phase2C12)
0039     process.load('Configuration.Geometry.GeometryExtended2026D68_cff')
0040     process.load('Configuration.Geometry.GeometryExtended2026D68Reco_cff')
0041     inFile = 'file:testHGCalSimWatcherV12.root'
0042     outFile = 'hgcGeomCheckD68.root'
0043 elif (options.geometry == "D83"):
0044     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0045     process = cms.Process('PROD',Phase2C11M9)
0046     process.load('Configuration.Geometry.GeometryExtended2026D83_cff')
0047     process.load('Configuration.Geometry.GeometryExtended2026D83Reco_cff')
0048     inFile = 'file:testHGCalSimWatcherV15.root'
0049     outFile = 'hgcGeomCheckD83.root'
0050 elif (options.geometry == "D84"):
0051     from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
0052     process = cms.Process('PROD',Phase2C11)
0053     process.load('Configuration.Geometry.GeometryExtended2026D84_cff')
0054     process.load('Configuration.Geometry.GeometryExtended2026D84Reco_cff')
0055     inFile = 'file:testHGCalSimWatcherV13.root'
0056     outFile = 'hgcGeomCheckD84.root'
0057 elif (options.geometry == "D88"):
0058     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0059     process = cms.Process('PROD',Phase2C11M9)
0060     process.load('Configuration.Geometry.GeometryExtended2026D88_cff')
0061     process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
0062     inFile = 'file:testHGCalSimWatcherV16.root'
0063     outFile = 'hgcGeomCheckD88.root'
0064 elif (options.geometry == "D92"):
0065     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0066     process = cms.Process('PROD',Phase2C11M9)
0067     process.load('Configuration.Geometry.GeometryExtended2026D92_cff')
0068     process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
0069     inFile = 'file:testHGCalSimWatcherV17.root'
0070     outFile = 'hgcGeomCheckD92.root'
0071 else:
0072     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0073     process = cms.Process('PROD',Phase2C11M9)
0074     process.load('Configuration.Geometry.GeometryExtended2026D77_cff')
0075     process.load('Configuration.Geometry.GeometryExtended2026D77Reco_cff')
0076     inFile = 'file:testHGCalSimWatcherV14.root'
0077     outFile = 'hgcGeomCheckD77.root'
0078 
0079 print("Input file: ", inFile)
0080 print("Output file: ", outFile)
0081 
0082 process.load('Configuration.StandardSequences.Services_cff')
0083 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')    
0084 process.load('FWCore.MessageService.MessageLogger_cfi')
0085 process.load('Configuration.EventContent.EventContent_cff')
0086 process.load('Configuration.StandardSequences.MagneticField_cff')
0087 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0088 from Configuration.AlCa.GlobalTag import GlobalTag
0089 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0090 
0091 process.MessageLogger.cerr.FwkReport.reportEvery = 5
0092 if hasattr(process,'MessageLogger'):
0093     process.MessageLogger.HGCalValid=dict()
0094     process.MessageLogger.HGCalGeom=dict()
0095 
0096 process.MessageLogger.cerr.FwkReport.reportEvery = 100
0097 process.source = cms.Source("PoolSource",
0098     fileNames = cms.untracked.vstring(inFile)
0099 )
0100 
0101 process.load('Validation.HGCalValidation.hgcGeomCheck_cff')
0102 
0103 process.TFileService = cms.Service("TFileService",
0104                                    fileName = cms.string(outFile),
0105                                    closeFileFast = cms.untracked.bool(True)
0106 )
0107 
0108 SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",ignoreTotal = cms.untracked.int32(1) )
0109 
0110 process.p = cms.Path(process.hgcGeomCheck)
0111 
0112