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 runHGCalWaferStudy_cfg.py geometry=D88
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                  "D88",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "geometry of operations: D49, D68, D77, D83, D84, 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 import FWCore.ParameterSet.Config as cms
0030 
0031 if (options.geometry == "D49"):
0032     from Configuration.Eras.Era_Phase2C9_cff import Phase2C9
0033     process = cms.Process('HGCGeomAnalysis',Phase2C9)
0034     process.load('Configuration.Geometry.GeometryExtended2026D49_cff')
0035     process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff')
0036     fileName = 'hgcWaferD49.root'
0037 elif (options.geometry == "D68"):
0038     from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
0039     process = cms.Process('HGCGeomAnalysis',Phase2C11)
0040     process.load('Configuration.Geometry.GeometryExtended2026D68_cff')
0041     process.load('Configuration.Geometry.GeometryExtended2026D68Reco_cff')
0042     fileName = 'hgcWaferD68.root'
0043 elif (options.geometry == "D70"):
0044     from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
0045     process = cms.Process('HGCGeomAnalysis',Phase2C11)
0046     process.load('Configuration.Geometry.GeometryExtended2026D70_cff')
0047     process.load('Configuration.Geometry.GeometryExtended2026D70Reco_cff')
0048     fileName = 'hgcWaferD70.root'
0049 elif (options.geometry == "D83"):
0050     from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9
0051     process = cms.Process('HGCGeomAnalysis',Phase2C11I13M9)
0052     process.load('Configuration.Geometry.GeometryExtended2026D83_cff')
0053     process.load('Configuration.Geometry.GeometryExtended2026D83Reco_cff')
0054     fileName = 'hgcWaferD83.root'
0055 elif (options.geometry == "D88"):
0056     from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9
0057     process = cms.Process('HGCGeomAnalysis',Phase2C11I13M9)
0058     process.load('Configuration.Geometry.GeometryExtended2026D88_cff')
0059     process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
0060     fileName = 'hgcWaferD88.root'
0061 elif (options.geometry == "D92"):
0062     from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9
0063     process = cms.Process('HGCGeomAnalysis',Phase2C11I13M9)
0064     process.load('Configuration.Geometry.GeometryExtended2026D92_cff')
0065     process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
0066 else:
0067     from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9
0068     process = cms.Process('HGCGeomAnalysis',Phase2C11I13M9)
0069     process.load('Configuration.Geometry.GeometryExtended2026D77_cff')
0070     process.load('Configuration.Geometry.GeometryExtended2026D77Reco_cff')
0071     fileName = 'hgcWaferD77.root'
0072 
0073 print("Output file: ", fileName)
0074 
0075 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0076 process.load("Configuration.StandardSequences.MagneticField_cff")
0077 process.load('FWCore.MessageService.MessageLogger_cfi')
0078 process.load('Configuration.StandardSequences.RawToDigi_cff')
0079 process.load('Validation.HGCalValidation.hgcalWaferStudy_cfi')
0080 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0081 from Configuration.AlCa.autoCond import autoCond
0082 process.GlobalTag.globaltag = autoCond['phase2_realistic']
0083 
0084 if hasattr(process,'MessageLogger'):
0085     process.MessageLogger.HGCalValidation=dict()
0086 
0087 process.source = cms.Source("PoolSource",
0088                             fileNames = cms.untracked.vstring(
0089         'file:step2.root',
0090         )
0091                             )
0092 
0093 process.maxEvents = cms.untracked.PSet(
0094     input = cms.untracked.int32(-1)
0095 )
0096 
0097 process.TFileService = cms.Service("TFileService",
0098                                    fileName = cms.string(fileName),
0099                                    closeFileFast = cms.untracked.bool(True)
0100                                    )
0101 
0102 process.raw2digi_step = cms.Path(process.RawToDigi)
0103 process.analysis_step = cms.Path(process.hgcalWaferStudy)
0104 process.hgcalWaferStudy.verbosity = 1
0105 process.hgcalWaferStudy.nBinHit   = 60
0106 process.hgcalWaferStudy.nBinDig   = 60
0107 process.hgcalWaferStudy.layerMinSim = cms.untracked.vint32(1,1)
0108 process.hgcalWaferStudy.layerMaxSim = cms.untracked.vint32(10,10)
0109 process.hgcalWaferStudy.layerMinDig = cms.untracked.vint32(1,1)
0110 process.hgcalWaferStudy.layerMaxDig = cms.untracked.vint32(10,10)
0111 
0112 # Schedule definition
0113 process.schedule = cms.Schedule(process.raw2digi_step,process.analysis_step)