|
1 | 1 | import FWCore.ParameterSet.Config as cms
|
2 | 2 | import FWCore.ParameterSet.VarParsing as VarParsing
|
3 | 3 |
|
4 |
| -process = cms.Process("TopologyAnalysis") |
5 | 4 | options = VarParsing.VarParsing("analysis")
|
6 | 5 |
|
7 | 6 | options.register ('globalTag',
|
|
16 | 15 | VarParsing.VarParsing.varType.int, # string, int, or float
|
17 | 16 | "run number")
|
18 | 17 |
|
| 18 | +options.register ('isPhase2', |
| 19 | + False, |
| 20 | + VarParsing.VarParsing.multiplicity.singleton, # singleton or list |
| 21 | + VarParsing.VarParsing.varType.bool, # string, int, or float |
| 22 | + "is phase2?") |
| 23 | + |
19 | 24 | options.parseArguments()
|
20 | 25 |
|
| 26 | +################################################################### |
| 27 | +# Set default phase-2 settings |
| 28 | +################################################################### |
| 29 | +import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings |
| 30 | +_PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION) |
| 31 | + |
| 32 | +if(options.isPhase2): |
| 33 | + process = cms.Process("TopologyAnalysis",_PH2_ERA) |
| 34 | +else: |
| 35 | + process = cms.Process("TopologyAnalysis") |
| 36 | + |
21 | 37 | ###################################################################
|
22 | 38 | # Message logger service
|
23 | 39 | ###################################################################
|
|
29 | 45 | ###################################################################
|
30 | 46 | process.load("Configuration.StandardSequences.Services_cff")
|
31 | 47 |
|
32 |
| -if 'phase2' in options.globalTag: |
33 |
| - process.load("Configuration.Geometry.GeometryExtended2026D98_cff") |
34 |
| - process.load("Configuration.Geometry.GeometryExtended2026D98Reco_cff") |
| 48 | +if(options.isPhase2): |
| 49 | + process.load("Configuration.Geometry.GeometryExtendedRun4Default_cff") |
| 50 | + process.load("Configuration.Geometry.GeometryExtendedRun4DefaultReco_cff") |
35 | 51 | else:
|
36 | 52 | process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
|
37 | 53 |
|
|
40 | 56 | ####################################################################
|
41 | 57 | process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
|
42 | 58 | from Configuration.AlCa.GlobalTag import GlobalTag
|
43 |
| -process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') |
| 59 | +if(options.isPhase2): |
| 60 | + process.GlobalTag = GlobalTag(process.GlobalTag, _PH2_GLOBAL_TAG, '') |
| 61 | +else: |
| 62 | + process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') |
44 | 63 |
|
45 | 64 | ###################################################################
|
46 | 65 | # Empty Source
|
|
0 commit comments