1 import FWCore.ParameterSet.Config
as cms
2 import Alignment.MillePedeAlignmentAlgorithm.mpslib.tools
as mps_tools
5 def setup(process, binary_files, tree_files, run_start_geometry):
6 """Pede-specific setup. 9 - `process`: cms.Process object 10 - `binary_files`: list of binary files to be read by pede 11 - `tree_files`: list of ROOT files created in the mille step 12 - `run_start_geometry`: run ID to pick the start geometry 17 process.AlignmentProducer.saveToDB =
True 18 process.AlignmentProducer.saveApeToDB =
True 19 process.AlignmentProducer.saveDeformationsToDB =
True 24 process.PoolDBOutputService = cms.Service(
"PoolDBOutputService",
25 CondDB.clone(connect =
"sqlite_file:alignments_MP.db"),
26 timetype = cms.untracked.string(
"runnumber"),
29 record = cms.string(
"TrackerAlignmentRcd"),
30 tag = cms.string(
"Alignments")),
32 record = cms.string(
"TrackerAlignmentErrorExtendedRcd"),
33 tag = cms.string(
"AlignmentErrorsExtended")),
35 record = cms.string(
"TrackerSurfaceDeformationRcd"),
36 tag = cms.string(
"Deformations")),
38 record = cms.string(
"SiStripLorentzAngleRcd_peak"),
39 tag = cms.string(
"SiStripLorentzAngle_peak")),
41 record = cms.string(
"SiStripLorentzAngleRcd_deco"),
42 tag = cms.string(
"SiStripLorentzAngle_deco")),
44 record = cms.string(
"SiPixelLorentzAngleRcd"),
45 tag = cms.string(
"SiPixelLorentzAngle")),
47 record = cms.string(
"SiStripBackPlaneCorrectionRcd"),
48 tag = cms.string(
"SiStripBackPlaneCorrection"))
55 process.AlignmentProducer.algoConfig.mergeBinaryFiles = binary_files
56 process.AlignmentProducer.algoConfig.mergeTreeFiles = tree_files
61 for calib
in process.AlignmentProducer.calibrations:
62 calib.saveToDB = process.AlignmentProducer.saveToDB
63 calib.treeFile = process.AlignmentProducer.algoConfig.treeFile
64 calib.mergeTreeFiles = process.AlignmentProducer.algoConfig.mergeTreeFiles
69 iovs = mps_tools.make_unique_runranges(process.AlignmentProducer)
70 number_of_events = iovs[-1] - iovs[0] + 1
72 process.maxEvents = cms.untracked.PSet(
73 input = cms.untracked.int32(number_of_events))
74 process.source = cms.Source(
76 firstRun = cms.untracked.uint32(run_start_geometry),
77 numberEventsInRun = cms.untracked.uint32(1))
81 process.p = cms.Path(process.AlignmentProducer)
def setup(process, binary_files, tree_files, run_start_geometry)