2 import FWCore.ParameterSet.Config
as cms
4 inputfiles = os.environ[
"ALIGNMENT_INPUTFILES"].
split(
" ")
5 iteration = int(os.environ[
"ALIGNMENT_ITERATION"])
6 jobnumber = int(os.environ[
"ALIGNMENT_JOBNUMBER"])
7 mode = os.environ[
"ALIGNMENT_MODE"]
8 inputdb = os.environ[
"ALIGNMENT_INPUTDB"]
9 globaltag = os.environ[
"ALIGNMENT_GLOBALTAG"]
10 photogrammetry = eval(os.environ[
"ALIGNMENT_PHOTOGRAMMETRY"])
11 slm = eval(os.environ[
"ALIGNMENT_SLM"])
12 fillME11holes = eval(os.environ[
"ALIGNMENT_FILLME11HOLES"])
13 disks = (os.environ[
"ALIGNMENT_DISKS"] ==
"True")
15 minP = float(os.environ[
"ALIGNMENT_minP"])
16 minHitsPerChamber = int(os.environ[
"ALIGNMENT_minHitsPerChamber"])
17 maxdrdz = float(os.environ[
"ALIGNMENT_maxdrdz"])
18 maxRedChi2 = float(os.environ[
"ALIGNMENT_maxRedChi2"])
19 fiducial = (os.environ[
"ALIGNMENT_fiducial"] ==
"True")
20 useHitWeights = (os.environ[
"ALIGNMENT_useHitWeights"] ==
"True")
21 truncateSlopeResid = float(os.environ[
"ALIGNMENT_truncateSlopeResid"])
22 truncateOffsetResid = float(os.environ[
"ALIGNMENT_truncateOffsetResid"])
23 combineME11 = (os.environ[
"ALIGNMENT_combineME11"] ==
"True")
24 useTrackWeights = (os.environ[
"ALIGNMENT_useTrackWeights"] ==
"True")
25 errorFromRMS = (os.environ[
"ALIGNMENT_errorFromRMS"] ==
"True")
26 minTracksPerOverlap = int(os.environ[
"ALIGNMENT_minTracksPerOverlap"])
27 slopeFromTrackRefit = (os.environ[
"ALIGNMENT_slopeFromTrackRefit"] ==
"True")
28 minStationsInTrackRefits = int(os.environ[
"ALIGNMENT_minStationsInTrackRefits"])
30 process = cms.Process(
"GATHER")
31 process.source = cms.Source(
"PoolSource", fileNames = cms.untracked.vstring(*inputfiles))
32 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1))
34 process.MessageLogger = cms.Service(
"MessageLogger",
35 destinations = cms.untracked.vstring(
"cout"),
36 cout = cms.untracked.PSet(threshold = cms.untracked.string(
"ERROR")))
38 process.load(
"Alignment.MuonAlignmentAlgorithms.CSCOverlapsAlignmentAlgorithm_cff")
40 process.looper.algoConfig.mode = mode
43 import Alignment.MuonAlignmentAlgorithms.CSCOverlapsAlignmentAlgorithm_diskfitters_cff
44 process.looper.algoConfig.fitters = Alignment.MuonAlignmentAlgorithms.CSCOverlapsAlignmentAlgorithm_diskfitters_cff.fitters
46 execfile(
"constraints_cff.py")
54 if slm
and mode
in (
"phipos",
"phiz"):
55 for f
in process.looper.algoConfig.fitters:
56 if "SLMFrame" in f.alignables:
57 f.fixed = cms.string(
"SLMFrame")
59 process.looper.algoConfig.writeTemporaryFile =
"alignment%03d.tmp" % jobnumber
60 process.looper.algoConfig.readTemporaryFiles = cms.vstring()
61 process.looper.algoConfig.doAlignment =
False
63 process.looper.algoConfig.minP = minP
64 process.looper.algoConfig.minHitsPerChamber = minHitsPerChamber
65 process.looper.algoConfig.maxdrdz = maxdrdz
66 process.looper.algoConfig.maxRedChi2 = maxRedChi2
67 process.looper.algoConfig.fiducial = fiducial
68 process.looper.algoConfig.useHitWeights = useHitWeights
69 process.looper.algoConfig.truncateSlopeResid = truncateSlopeResid
70 process.looper.algoConfig.truncateOffsetResid = truncateOffsetResid
71 process.looper.algoConfig.combineME11 = combineME11
72 process.looper.algoConfig.useTrackWeights = useTrackWeights
73 process.looper.algoConfig.errorFromRMS = errorFromRMS
74 process.looper.algoConfig.minTracksPerOverlap = minTracksPerOverlap
75 process.looper.algoConfig.slopeFromTrackRefit = slopeFromTrackRefit
76 process.looper.algoConfig.minStationsInTrackRefits = minStationsInTrackRefits
78 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
79 process.GlobalTag.globaltag = cms.string(globaltag)
81 process.muonAlignment.connect = cms.string(
"sqlite_file:%s" % inputdb)
83 process.looper.saveToDB =
False
84 process.looper.saveApeToDB =
False
85 del process.PoolDBOutputService
87 process.TFileService = cms.Service(
"TFileService", fileName = cms.string(
"plotting%03d.root" % jobnumber))