File indexing completed on 2024-09-07 04:38:15
0001
0002
0003
0004
0005
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
0014
0015
0016
0017 options = VarParsing.VarParsing('standard')
0018 options.register('geometry',
0019 "D110",
0020 VarParsing.VarParsing.multiplicity.singleton,
0021 VarParsing.VarParsing.varType.string,
0022 "geometry of operations: D105, D110, D114")
0023
0024 options.register('layers',
0025 "1",
0026 VarParsing.VarParsing.multiplicity.singleton,
0027 VarParsing.VarParsing.varType.string,
0028 "For single layer use 'layers=3' (default is 'layers=1'); or for multiple layers use 'layers=1,27,41,46'; or for all layers use 'layers=1-47'. Note that the size may increase by ~10 times or more in RAM and filesize if 'all layers' option is used.")
0029
0030
0031 options.parseArguments()
0032
0033 import FWCore.ParameterSet.Config as cms
0034
0035 print(options)
0036
0037
0038
0039
0040 fileInput = "file:step3.root"
0041
0042 if (options.geometry == "D105"):
0043 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0044 process = cms.Process('HGCalMTReco',Phase2C17I13M9)
0045 process.load('Configuration.Geometry.GeometryExtended2026D105Reco_cff')
0046 outputFile = 'file:recoutputD105.root'
0047 elif (options.geometry == "D114"):
0048 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0049 process = cms.Process('HGCalMTReco',Phase2C17I13M9)
0050 process.load('Configuration.Geometry.GeometryExtended2026D114Reco_cff')
0051 outputFile = 'file:recoutputD114.root'
0052 elif (options.geometry == "D110"):
0053 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0054 process = cms.Process('HGCalMTReco',Phase2C17I13M9)
0055 process.load('Configuration.Geometry.GeometryExtended2026D110Reco_cff')
0056 outputFile = 'file:recoutputD110.root'
0057 else:
0058 print("Please select a valid geometry version e.g. D105, D110, D114....")
0059
0060 print("Input file: ", fileInput)
0061 print("Output file: ", outputFile)
0062
0063 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0064 process.load('Configuration.StandardSequences.MagneticField_cff')
0065 process.load('Configuration.StandardSequences.Services_cff')
0066 process.load('FWCore.MessageService.MessageLogger_cfi')
0067 process.load('Configuration.EventContent.EventContent_cff')
0068 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0069 from Configuration.AlCa.GlobalTag import GlobalTag
0070 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T33', '')
0071
0072 process.MessageLogger.cerr.FwkReport.reportEvery = 100
0073
0074 process.source = cms.Source("PoolSource",
0075 dropDescendantsOfDroppedBranches = cms.untracked.bool(False),
0076 fileNames = cms.untracked.vstring(fileInput),
0077 inputCommands = cms.untracked.vstring(
0078 'keep *',
0079 'drop l1tTkPrimaryVertexs_L1TkPrimaryVertex__*'
0080 ),
0081 secondaryFileNames = cms.untracked.vstring()
0082 )
0083
0084 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
0085
0086 process.load('Validation.HGCalValidation.hgcalMTRecoStudy_cfi')
0087
0088 process.hgcalMTRecoStudyEE = process.hgcalMTRecoStudy.clone(detectorName = 'HGCalEESensitive',
0089 source = 'HGCalRecHit:HGCEERecHits',
0090 layerList = options.layers
0091 )
0092
0093 process.hgcalMTRecoStudyFH = process.hgcalMTRecoStudy.clone(detectorName = 'HGCalHESiliconSensitive',
0094 source = 'HGCalRecHit:HGCHEFRecHits',
0095 layerList = options.layers
0096 )
0097
0098 process.hgcalMTRecoStudyBH = process.hgcalMTRecoStudy.clone( detectorName = 'HGCalHEScintillatorSensitive',
0099 source = 'HGCalRecHit:HGCHEBRecHits',
0100 layerList = options.layers
0101 )
0102
0103 process.TFileService = cms.Service("TFileService",
0104 fileName = cms.string(outputFile),
0105 closeFileFast = cms.untracked.bool(True))
0106
0107 process.p = cms.Path(process.hgcalMTRecoStudyEE+process.hgcalMTRecoStudyFH+process.hgcalMTRecoStudyBH)
0108