File indexing completed on 2024-11-25 02:29:07
0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003
0004 import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
0005
0006
0007
0008 options = VarParsing.VarParsing()
0009 options.register('Scenario',
0010 _settings.DEFAULT_VERSION,
0011 VarParsing.VarParsing.multiplicity.singleton,
0012 VarParsing.VarParsing.varType.string,
0013 "geometry version to use")
0014 options.parseArguments()
0015
0016
0017
0018
0019 GLOBAL_TAG, ERA = _settings.get_era_and_conditions(options.Scenario)
0020 process = cms.Process("Alignment", ERA)
0021
0022 process.load("Configuration.StandardSequences.MagneticField_cff")
0023 if(options.Scenario == _settings.DEFAULT_VERSION):
0024 print("Loading default scenario: ", _settings.DEFAULT_VERSION)
0025 process.load('Configuration.Geometry.GeometryExtendedRun4DefaultReco_cff')
0026 else:
0027 process.load('Configuration.Geometry.GeometryExtended'+options.Scenario+'Reco_cff')
0028 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0029
0030
0031
0032
0033 from Configuration.AlCa.GlobalTag import GlobalTag
0034 process.GlobalTag = GlobalTag(process.GlobalTag,GLOBAL_TAG)
0035
0036 process.load("Alignment.TrackerAlignment.createIdealTkAlRecords_cfi")
0037 process.createIdealTkAlRecords.alignToGlobalTag = False
0038
0039
0040 usedGlobalTag = process.GlobalTag.globaltag.value()
0041 print("Using Global Tag:", usedGlobalTag)
0042
0043 from CondCore.CondDB.CondDB_cfi import *
0044 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0045 CondDB,
0046 timetype = cms.untracked.string("runnumber"),
0047 toPut = cms.VPSet(
0048 cms.PSet(
0049 record = cms.string("TrackerAlignmentRcd"),
0050 tag = cms.string("Alignments")
0051 ),
0052 cms.PSet(
0053 record = cms.string("TrackerAlignmentErrorExtendedRcd"),
0054 tag = cms.string("AlignmentErrorsExtended")
0055 ),
0056 cms.PSet(
0057 record = cms.string("TrackerSurfaceDeformationRcd"),
0058 tag = cms.string("AlignmentSurfaceDeformations")
0059 ),
0060 )
0061 )
0062 process.PoolDBOutputService.connect = \
0063 ("sqlite_file:tracker_alignment_payloads_"+
0064 options.Scenario+("_reference.db"
0065 if process.createIdealTkAlRecords.createReferenceRcd
0066 else "_fromIdealGeometry.db"))
0067
0068 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
0069 process.source = cms.Source("EmptySource")
0070
0071 process.p = cms.Path(process.createIdealTkAlRecords)