Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-14 04:15:58

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runHGCMissingRecHit_cfg.py geometry=D110
0004 #
0005 #   Options for geometry D98, D99, D103, D104, D105, D106, D107, D108, D109
0006 #                        D110, D111, D112, D113, D114, D115
0007 #
0008 ###############################################################################
0009 import FWCore.ParameterSet.Config as cms
0010 import os, sys, importlib, re
0011 import FWCore.ParameterSet.VarParsing as VarParsing
0012 
0013 ####################################################################
0014 ### SETUP OPTIONS
0015 options = VarParsing.VarParsing('standard')
0016 options.register('geometry',
0017                  "D110",
0018                   VarParsing.VarParsing.multiplicity.singleton,
0019                   VarParsing.VarParsing.varType.string,
0020                   "geometry of operations: D98, D99, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114, D115")
0021 
0022 ### get and parse the command line arguments
0023 options.parseArguments()
0024 
0025 print(options)
0026 
0027 ####################################################################
0028 # Use the options
0029 if (options.geometry == "D115"):
0030     from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
0031     process = cms.Process('HGCMissingHits',Phase2C20I13M9)
0032 elif (options.geometry == "D104"):
0033     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0034     process = cms.Process('HGCMissingHits',PhaseC22I13M9)
0035 elif (options.geometry == "D106"):
0036     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0037     process = cms.Process('HGCMissingHits',PhaseC22I13M9)
0038 elif (options.geometry == "D109"):
0039     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0040     process = cms.Process('HGCMissingHits',PhaseC22I13M9)
0041 elif (options.geometry == "D111"):
0042     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0043     process = cms.Process('HGCMissingHits',PhaseC22I13M9)
0044 elif (options.geometry == "D112"):
0045     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0046     process = cms.Process('HGCMissingHits',PhaseC22I13M9)
0047 elif (options.geometry == "D113"):
0048     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0049     process = cms.Process('HGCMissingHits',PhaseC22I13M9)
0050 else:
0051     from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0052     process = cms.Process('HGCMissingHits',Phase2C17I13M9)
0053 
0054 geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"
0055 inFile = "file:step3" + options.geometry + ".root"
0056 outFile = "missedRecHit" + options.geometry + ".root"
0057 
0058 print("Geometry file: ", geomFile)
0059 print("Input file:    ", inFile)
0060 print("Output file:   ", outFile)
0061 
0062 process.load(geomFile)
0063 process.load('Configuration.StandardSequences.Services_cff')
0064 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')    
0065 process.load('FWCore.MessageService.MessageLogger_cfi')
0066 process.load('Configuration.EventContent.EventContent_cff')
0067 process.load('Configuration.StandardSequences.MagneticField_cff')
0068 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0069 
0070 from Configuration.AlCa.GlobalTag import GlobalTag
0071 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0072 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0073 if hasattr(process,'MessageLogger'):
0074     process.MessageLogger.HGCalMiss=dict()
0075     process.MessageLogger.HGCalError=dict()
0076 #   process.MessageLogger.HGCalGeom=dict()
0077 
0078 process.source = cms.Source("PoolSource",
0079                             fileNames = cms.untracked.vstring(inFile)
0080 )
0081 
0082 process.load('Validation.HGCalValidation.hgcMissingRecHit_cfi')
0083 process.TFileService = cms.Service("TFileService",
0084                                    fileName = cms.string(outFile))
0085 
0086 process.p = cms.Path(process.hgcMissingRecHit)
0087 
0088