2 import FWCore.ParameterSet.Config
as cms
4 alignmenttmp = os.environ[
"ALIGNMENT_ALIGNMENTTMP"].
split(
"\n")
5 if alignmenttmp == [
""]: alignmenttmp = []
6 iteration =
int(os.environ[
"ALIGNMENT_ITERATION"])
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(
"ALIGN")
31 process.source = cms.Source(
"EmptySource")
32 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
34 process.load(
"Alignment.MuonAlignmentAlgorithms.CSCOverlapsAlignmentAlgorithm_cff")
37 process.looper.algoConfig.mode = mode
40 import Alignment.MuonAlignmentAlgorithms.CSCOverlapsAlignmentAlgorithm_diskfitters_cff
41 process.looper.algoConfig.fitters = Alignment.MuonAlignmentAlgorithms.CSCOverlapsAlignmentAlgorithm_diskfitters_cff.fitters
43 execfile(
"constraints_cff.py")
51 if slm
and mode
in (
"phipos",
"phiz"):
52 for f
in process.looper.algoConfig.fitters:
53 if "SLMFrame" in f.alignables:
54 f.fixed = cms.string(
"SLMFrame")
56 process.looper.algoConfig.writeTemporaryFile =
"" 57 process.looper.algoConfig.readTemporaryFiles = cms.vstring(*alignmenttmp)
58 process.looper.algoConfig.doAlignment =
True 60 process.looper.algoConfig.minP = minP
61 process.looper.algoConfig.minHitsPerChamber = minHitsPerChamber
62 process.looper.algoConfig.maxdrdz = maxdrdz
63 process.looper.algoConfig.maxRedChi2 = maxRedChi2
64 process.looper.algoConfig.fiducial = fiducial
65 process.looper.algoConfig.useHitWeights = useHitWeights
66 process.looper.algoConfig.truncateSlopeResid = truncateSlopeResid
67 process.looper.algoConfig.truncateOffsetResid = truncateOffsetResid
68 process.looper.algoConfig.combineME11 = combineME11
69 process.looper.algoConfig.useTrackWeights = useTrackWeights
70 process.looper.algoConfig.errorFromRMS = errorFromRMS
71 process.looper.algoConfig.minTracksPerOverlap = minTracksPerOverlap
72 process.looper.algoConfig.slopeFromTrackRefit = slopeFromTrackRefit
73 process.looper.algoConfig.minStationsInTrackRefits = minStationsInTrackRefits
75 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
76 process.GlobalTag.globaltag = cms.string(globaltag)
78 process.muonAlignment.connect = cms.string(
"sqlite_file:%s" % inputdb)
80 process.TFileService = cms.Service(
"TFileService", fileName = cms.string(
"plotting.root"))