1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
###################################################################
# Setup 'standard' options
###################################################################
options = VarParsing.VarParsing()
options.register('Scenario',
_settings.DEFAULT_VERSION, # default value
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
VarParsing.VarParsing.varType.string, # string, int, or float
"geometry version to use")
options.parseArguments()
###################################################################
# get Global Tag and ERA
###################################################################
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(options.Scenario)
process = cms.Process("Alignment", ERA)
process.load("Configuration.StandardSequences.MagneticField_cff") # B-field map
if(options.Scenario == _settings.DEFAULT_VERSION):
print("Loading default scenario: ", _settings.DEFAULT_VERSION)
process.load('Configuration.Geometry.GeometryExtendedRun4DefaultReco_cff')
else:
process.load('Configuration.Geometry.GeometryExtended'+options.Scenario+'Reco_cff')
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") # Global tag
################################################################################
# parameters to configure:
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag,GLOBAL_TAG)
process.load("Alignment.TrackerAlignment.createIdealTkAlRecords_cfi")
process.createIdealTkAlRecords.alignToGlobalTag = False
################################################################################
usedGlobalTag = process.GlobalTag.globaltag.value()
print("Using Global Tag:", usedGlobalTag)
from CondCore.CondDB.CondDB_cfi import *
process.PoolDBOutputService = cms.Service("PoolDBOutputService",
CondDB,
timetype = cms.untracked.string("runnumber"),
toPut = cms.VPSet(
cms.PSet(
record = cms.string("TrackerAlignmentRcd"),
tag = cms.string("Alignments")
),
cms.PSet(
record = cms.string("TrackerAlignmentErrorExtendedRcd"),
tag = cms.string("AlignmentErrorsExtended")
),
cms.PSet(
record = cms.string("TrackerSurfaceDeformationRcd"),
tag = cms.string("AlignmentSurfaceDeformations")
),
)
)
process.PoolDBOutputService.connect = \
("sqlite_file:tracker_alignment_payloads_"+
options.Scenario+("_reference.db"
if process.createIdealTkAlRecords.createReferenceRcd
else "_fromIdealGeometry.db"))
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
process.source = cms.Source("EmptySource")
process.p = cms.Path(process.createIdealTkAlRecords)
|