File indexing completed on 2024-11-09 02:40:19
0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003
0004 options = VarParsing.VarParsing("analysis")
0005
0006 options.register ('globalTag',
0007 "auto:run2_data",
0008 VarParsing.VarParsing.multiplicity.singleton,
0009 VarParsing.VarParsing.varType.string,
0010 "GlobalTag")
0011
0012 options.register ('runNumber',
0013 1,
0014 VarParsing.VarParsing.multiplicity.singleton,
0015 VarParsing.VarParsing.varType.int,
0016 "run number")
0017
0018 options.register ('isPhase2',
0019 False,
0020 VarParsing.VarParsing.multiplicity.singleton,
0021 VarParsing.VarParsing.varType.bool,
0022 "is phase2?")
0023
0024 options.parseArguments()
0025
0026
0027
0028
0029 import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
0030 _PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION)
0031
0032 if(options.isPhase2):
0033 process = cms.Process("TopologyAnalysis",_PH2_ERA)
0034 else:
0035 process = cms.Process("TopologyAnalysis")
0036
0037
0038
0039
0040 process.load("FWCore.MessageService.MessageLogger_cfi")
0041 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0042
0043
0044
0045
0046 process.load("Configuration.StandardSequences.Services_cff")
0047
0048 if(options.isPhase2):
0049 process.load("Configuration.Geometry.GeometryExtendedRun4Default_cff")
0050 process.load("Configuration.Geometry.GeometryExtendedRun4DefaultReco_cff")
0051 else:
0052 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0053
0054
0055
0056
0057 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0058 from Configuration.AlCa.GlobalTag import GlobalTag
0059 if(options.isPhase2):
0060 process.GlobalTag = GlobalTag(process.GlobalTag, _PH2_GLOBAL_TAG, '')
0061 else:
0062 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0063
0064
0065
0066
0067 process.source = cms.Source("EmptySource",
0068 firstRun = cms.untracked.uint32(options.runNumber),
0069 numberEventsInRun = cms.untracked.uint32(1),
0070 )
0071
0072 process.maxEvents = cms.untracked.PSet(
0073 input = cms.untracked.int32(1)
0074 )
0075
0076
0077
0078
0079 process.myanalysis = cms.EDAnalyzer("StandaloneTrackerTopologyTest")
0080
0081
0082
0083
0084 process.p1 = cms.Path(process.myanalysis)
0085