6 def setup(process, binary_files, tree_files, run_start_geometry):
7 """Pede-specific setup.
10 - `process`: cms.Process object
11 - `binary_files`: list of binary files to be read by pede
12 - `tree_files`: list of ROOT files created in the mille step
13 - `run_start_geometry`: run ID to pick the start geometry
18 process.AlignmentProducer.saveToDB =
True
19 process.AlignmentProducer.saveApeToDB =
True
20 process.AlignmentProducer.saveDeformationsToDB =
True
25 process.PoolDBOutputService = cms.Service(
"PoolDBOutputService",
26 CondDB.clone(connect =
"sqlite_file:alignments_MP.db"),
27 timetype = cms.untracked.string(
"runnumber"),
30 record = cms.string(
"TrackerAlignmentRcd"),
31 tag = cms.string(
"Alignments")),
33 record = cms.string(
"TrackerAlignmentErrorExtendedRcd"),
34 tag = cms.string(
"AlignmentErrorsExtended")),
36 record = cms.string(
"TrackerSurfaceDeformationRcd"),
37 tag = cms.string(
"Deformations")),
39 record = cms.string(
"SiStripLorentzAngleRcd_peak"),
40 tag = cms.string(
"SiStripLorentzAngle_peak")),
42 record = cms.string(
"SiStripLorentzAngleRcd_deco"),
43 tag = cms.string(
"SiStripLorentzAngle_deco")),
45 record = cms.string(
"SiPixelLorentzAngleRcd"),
46 tag = cms.string(
"SiPixelLorentzAngle")),
48 record = cms.string(
"SiStripBackPlaneCorrectionRcd"),
49 tag = cms.string(
"SiStripBackPlaneCorrection"))
56 process.AlignmentProducer.algoConfig.mergeBinaryFiles = binary_files
57 process.AlignmentProducer.algoConfig.mergeTreeFiles = tree_files
62 for calib
in process.AlignmentProducer.calibrations:
63 calib.saveToDB = process.AlignmentProducer.saveToDB
64 calib.treeFile = process.AlignmentProducer.algoConfig.treeFile
65 calib.mergeTreeFiles = process.AlignmentProducer.algoConfig.mergeTreeFiles
70 iovs = mps_tools.make_unique_runranges(process.AlignmentProducer)
71 number_of_events = iovs[-1] - iovs[0] + 1
73 process.maxEvents = cms.untracked.PSet(
74 input = cms.untracked.int32(number_of_events))
75 process.source = cms.Source(
77 firstRun = cms.untracked.uint32(run_start_geometry),
78 numberEventsInRun = cms.untracked.uint32(1))
82 process.p = cms.Path(process.AlignmentProducer)