Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:45:39

0001 import os
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 process = cms.Process("ALIGN")
0005 # process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring("file:///NOBACKUP/results/MuAlBeamHaloOverlaps_MC1.root", "file:///NOBACKUP/results/MuAlBeamHaloOverlaps_MC2.root"))
0006 # process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(30000))
0007 
0008 process.source = cms.Source("EmptySource")
0009 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(0))
0010 
0011 process.MessageLogger = cms.Service("MessageLogger",
0012                                     destinations = cms.untracked.vstring("cout"),
0013                                     cout = cms.untracked.PSet(threshold = cms.untracked.string("ERROR")))
0014 
0015 process.load("TrackingTools/TransientTrack/TransientTrackBuilder_cfi")
0016 process.load("Configuration.Geometry.GeometryIdeal_cff")
0017 process.load("Configuration.StandardSequences.MagneticField_cff")
0018 process.load("TrackingTools.GeomPropagators.SmartPropagator_cff")
0019 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi")
0020 process.load("RecoTracker.Configuration.RecoTracker_cff")
0021 process.load("RecoTracker.TransientTrackingRecHit.TransientTrackingRecHitBuilderWithoutRefit_cfi")
0022 process.load("TrackingTools.TrackRefitter.TracksToTrajectories_cff")
0023 process.TrackerDigiGeometryESModule.applyAlignment = False
0024 del process.DTGeometryESModule
0025 del process.CSCGeometryESModule
0026 
0027 process.TFileService = cms.Service("TFileService", fileName = cms.string("test2.root"))
0028 
0029 process.load("Alignment.CommonAlignmentProducer.AlignmentProducer_cff")
0030 process.looper.doTracker = cms.untracked.bool(False)
0031 process.looper.doMuon = cms.untracked.bool(True)
0032 process.looper.tjTkAssociationMapTag = cms.InputTag("CSCOverlapsTrackPreparationTrackRefitter")
0033 process.looper.algoConfig = cms.PSet(
0034     algoName = cms.string("CSCOverlapsAlignmentAlgorithm"),
0035 
0036     TrackTransformer = cms.PSet(DoPredictionsOnly = cms.bool(False),
0037                                 Fitter = cms.string("KFFitterForRefitInsideOut"),
0038                                 TrackerRecHitBuilder = cms.string("WithoutRefit"),
0039                                 Smoother = cms.string("KFSmootherForRefitInsideOut"),
0040                                 MuonRecHitBuilder = cms.string("MuonRecHitBuilder"),
0041                                 RefitDirection = cms.string("alongMomentum"),
0042                                 RefitRPCHits = cms.bool(False),
0043                                 Propagator = cms.string("SteppingHelixPropagatorAny")),
0044 
0045     mode = cms.string("phipos"),
0046     reportFileName = cms.string("reports.py"),
0047     minP = cms.double(5.),
0048     minHitsPerChamber = cms.int32(5),
0049     maxRedChi2 = cms.double(10.),
0050     fiducial = cms.bool(True),
0051     useHitWeights = cms.bool(True),
0052     slopeFromTrackRefit = cms.bool(False),
0053     minStationsInTrackRefits = cms.int32(2),
0054     combineME11 = cms.bool(True),
0055     useTrackWeights = cms.bool(False),
0056     errorFromRMS = cms.bool(False),
0057     writeTemporaryFile = cms.string(""),
0058     readTemporaryFiles = cms.vstring("test.tmp"),
0059     doAlignment = cms.bool(True),
0060     makeHistograms = cms.bool(True),
0061 
0062     fitters = cms.VPSet(
0063     cms.PSet(name = cms.string("ME+1/1"),
0064              alignables = cms.vstring("PGFrame",
0065                                       "ME+1/1/01", "ME+1/1/02", "ME+1/1/03", "ME+1/1/04", "ME+1/1/05", "ME+1/1/06", "ME+1/1/07", "ME+1/1/08", "ME+1/1/09", "ME+1/1/10", "ME+1/1/11", "ME+1/1/12", "ME+1/1/13", "ME+1/1/14", "ME+1/1/15", "ME+1/1/16", "ME+1/1/17", "ME+1/1/18", "ME+1/1/19", "ME+1/1/20", "ME+1/1/21", "ME+1/1/22", "ME+1/1/23", "ME+1/1/24", "ME+1/1/25", "ME+1/1/26", "ME+1/1/27", "ME+1/1/28", "ME+1/1/29", "ME+1/1/30", "ME+1/1/31", "ME+1/1/32", "ME+1/1/33", "ME+1/1/34", "ME+1/1/35", "ME+1/1/36"),
0066              fixed = cms.string(""),
0067              constraints = cms.VPSet(
0068     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/01"), value = cms.double(0.005), error = cms.double(0.1)),
0069     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/02"), value = cms.double(0.), error = cms.double(0.1)),
0070     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/03"), value = cms.double(0.), error = cms.double(0.1)),
0071     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/04"), value = cms.double(0.), error = cms.double(0.1)),
0072     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/05"), value = cms.double(0.), error = cms.double(0.1)),
0073     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/06"), value = cms.double(0.), error = cms.double(0.1)),
0074     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/07"), value = cms.double(0.), error = cms.double(0.1)),
0075     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/08"), value = cms.double(0.), error = cms.double(0.1)),
0076     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/09"), value = cms.double(0.), error = cms.double(0.1)),
0077     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/10"), value = cms.double(0.), error = cms.double(0.1)),
0078     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/11"), value = cms.double(0.), error = cms.double(0.1)),
0079     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/12"), value = cms.double(0.), error = cms.double(0.1)),
0080     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/13"), value = cms.double(0.), error = cms.double(0.1)),
0081     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/14"), value = cms.double(0.), error = cms.double(0.1)),
0082     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/15"), value = cms.double(0.), error = cms.double(0.1)),
0083     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/16"), value = cms.double(0.), error = cms.double(0.1)),
0084     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/17"), value = cms.double(0.), error = cms.double(0.1)),
0085     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/18"), value = cms.double(0.), error = cms.double(0.1)),
0086     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/19"), value = cms.double(0.), error = cms.double(0.1)),
0087     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/20"), value = cms.double(0.), error = cms.double(0.1)),
0088     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/21"), value = cms.double(0.), error = cms.double(0.1)),
0089     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/22"), value = cms.double(0.), error = cms.double(0.1)),
0090     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/23"), value = cms.double(0.), error = cms.double(0.1)),
0091     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/24"), value = cms.double(0.), error = cms.double(0.1)),
0092     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/25"), value = cms.double(0.), error = cms.double(0.1)),
0093     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/26"), value = cms.double(0.), error = cms.double(0.1)),
0094     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/27"), value = cms.double(0.), error = cms.double(0.1)),
0095     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/28"), value = cms.double(0.), error = cms.double(0.1)),
0096     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/29"), value = cms.double(0.), error = cms.double(0.1)),
0097     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/30"), value = cms.double(0.), error = cms.double(0.1)),
0098     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/31"), value = cms.double(0.), error = cms.double(0.1)),
0099     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/32"), value = cms.double(0.), error = cms.double(0.1)),
0100     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/33"), value = cms.double(0.), error = cms.double(0.1)),
0101     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/34"), value = cms.double(0.), error = cms.double(0.1)),
0102     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/35"), value = cms.double(0.), error = cms.double(0.1)),
0103     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME+1/1/36"), value = cms.double(0.), error = cms.double(0.1)),
0104     
0105     )),
0106 
0107     cms.PSet(name = cms.string("ME-1/1"),
0108              alignables = cms.vstring("PGFrame",
0109                                       "ME-1/1/01", "ME-1/1/02", "ME-1/1/03", "ME-1/1/04", "ME-1/1/05", "ME-1/1/06", "ME-1/1/07", "ME-1/1/08", "ME-1/1/09", "ME-1/1/10", "ME-1/1/11", "ME-1/1/12", "ME-1/1/13", "ME-1/1/14", "ME-1/1/15", "ME-1/1/16", "ME-1/1/17", "ME-1/1/18", "ME-1/1/19", "ME-1/1/20", "ME-1/1/21", "ME-1/1/22", "ME-1/1/23", "ME-1/1/24", "ME-1/1/25", "ME-1/1/26", "ME-1/1/27", "ME-1/1/28", "ME-1/1/29", "ME-1/1/30", "ME-1/1/31", "ME-1/1/32", "ME-1/1/33", "ME-1/1/34", "ME-1/1/35", "ME-1/1/36"),
0110              fixed = cms.string(""),
0111              constraints = cms.VPSet(
0112     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/01"), value = cms.double(0.005), error = cms.double(0.1)),
0113     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/02"), value = cms.double(0.), error = cms.double(0.1)),
0114     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/03"), value = cms.double(0.), error = cms.double(0.1)),
0115     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/04"), value = cms.double(0.), error = cms.double(0.1)),
0116     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/05"), value = cms.double(0.), error = cms.double(0.1)),
0117     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/06"), value = cms.double(0.), error = cms.double(0.1)),
0118     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/07"), value = cms.double(0.), error = cms.double(0.1)),
0119     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/08"), value = cms.double(0.), error = cms.double(0.1)),
0120     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/09"), value = cms.double(0.), error = cms.double(0.1)),
0121     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/10"), value = cms.double(0.), error = cms.double(0.1)),
0122     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/11"), value = cms.double(0.), error = cms.double(0.1)),
0123     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/12"), value = cms.double(0.), error = cms.double(0.1)),
0124     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/13"), value = cms.double(0.), error = cms.double(0.1)),
0125     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/14"), value = cms.double(0.), error = cms.double(0.1)),
0126     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/15"), value = cms.double(0.), error = cms.double(0.1)),
0127     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/16"), value = cms.double(0.), error = cms.double(0.1)),
0128     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/17"), value = cms.double(0.), error = cms.double(0.1)),
0129     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/18"), value = cms.double(0.), error = cms.double(0.1)),
0130     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/19"), value = cms.double(0.), error = cms.double(0.1)),
0131     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/20"), value = cms.double(0.), error = cms.double(0.1)),
0132     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/21"), value = cms.double(0.), error = cms.double(0.1)),
0133     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/22"), value = cms.double(0.), error = cms.double(0.1)),
0134     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/23"), value = cms.double(0.), error = cms.double(0.1)),
0135     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/24"), value = cms.double(0.), error = cms.double(0.1)),
0136     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/25"), value = cms.double(0.), error = cms.double(0.1)),
0137     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/26"), value = cms.double(0.), error = cms.double(0.1)),
0138     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/27"), value = cms.double(0.), error = cms.double(0.1)),
0139     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/28"), value = cms.double(0.), error = cms.double(0.1)),
0140     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/29"), value = cms.double(0.), error = cms.double(0.1)),
0141     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/30"), value = cms.double(0.), error = cms.double(0.1)),
0142     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/31"), value = cms.double(0.), error = cms.double(0.1)),
0143     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/32"), value = cms.double(0.), error = cms.double(0.1)),
0144     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/33"), value = cms.double(0.), error = cms.double(0.1)),
0145     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/34"), value = cms.double(0.), error = cms.double(0.1)),
0146     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/35"), value = cms.double(0.), error = cms.double(0.1)),
0147     cms.PSet(i = cms.string("PGFrame"), j = cms.string("ME-1/1/36"), value = cms.double(0.), error = cms.double(0.1)),
0148     
0149     )),
0150 
0151     ))
0152 
0153 #     cms.PSet(i = cms.string("SLM1Frame"), j = cms.string("ME+2/1/02"), value = cms.double(0.), error = cms.double(1.)),
0154 #     cms.PSet(i = cms.string("SLM1Frame"), j = cms.string("ME+2/1/10"), value = cms.double(0.), error = cms.double(1.)),
0155 #     cms.PSet(i = cms.string("SLM2Frame"), j = cms.string("ME+2/1/04"), value = cms.double(0.), error = cms.double(1.)),
0156 #     cms.PSet(i = cms.string("SLM2Frame"), j = cms.string("ME+2/1/14"), value = cms.double(0.), error = cms.double(1.)),
0157 #     cms.PSet(i = cms.string("SLM3Frame"), j = cms.string("ME+2/1/08"), value = cms.double(0.), error = cms.double(1.)),
0158 #     cms.PSet(i = cms.string("SLM3Frame"), j = cms.string("ME+2/1/16"), value = cms.double(0.), error = cms.double(1.)),
0159 
0160 process.looper.ParameterBuilder.Selector.alignParams = cms.vstring("MuonCSCChambers,111111")
0161 
0162 process.CSCOverlapsTrackPreparationTrackRefitter = cms.EDProducer("CSCOverlapsTrackPreparation", src = cms.InputTag("ALCARECOMuAlBeamHaloOverlaps"))
0163 # process.TrackRefitter = cms.EDProducer("TracksToTrajectories",
0164 #                                        Type = cms.string("Default"),
0165 #                                        Tracks = cms.InputTag("ALCARECOMuAlBeamHaloOverlaps"),
0166 #                                        TrackTransformer = cms.PSet(DoPredictionsOnly = cms.bool(False),
0167 #                                                                    Fitter = cms.string("KFFitterForRefitInsideOut"),
0168 #                                                                    TrackerRecHitBuilder = cms.string("WithoutRefit"),
0169 #                                                                    Smoother = cms.string("KFSmootherForRefitInsideOut"),
0170 #                                                                    MuonRecHitBuilder = cms.string("MuonRecHitBuilder"),
0171 #                                                                    RefitDirection = cms.string("alongMomentum"),
0172 #                                                                    RefitRPCHits = cms.bool(False),
0173 #                                                                    Propagator = cms.string("SmartPropagatorAnyRKOpposite")))
0174 # process.TrackRefitter = cms.EDProducer("TracksToTrajectories",
0175 #                                        Type = cms.string("CosmicMuonsForAlignment"),
0176 #                                        Tracks = cms.InputTag("ALCARECOMuAlBeamHaloOverlaps"),
0177 #                                        TrackTransformer = cms.PSet(TrackerRecHitBuilder = cms.string("WithoutRefit"),
0178 #                                                                    MuonRecHitBuilder = cms.string("MuonRecHitBuilder"),
0179 #                                                                    RefitRPCHits = cms.bool(False)))
0180 process.Path = cms.Path(process.offlineBeamSpot * process.CSCOverlapsTrackPreparationTrackRefitter)
0181 
0182 import CondCore.DBCommon.CondDBSetup_cfi
0183 process.inertGlobalPositionRcd = cms.ESSource("PoolDBESSource",
0184                                               CondCore.DBCommon.CondDBSetup_cfi.CondDBSetup,
0185                                               connect = cms.string("sqlite_file:inertGlobalPositionRcd.db"),
0186                                               toGet = cms.VPSet(cms.PSet(record = cms.string("GlobalPositionRcd"), tag = cms.string("inertGlobalPositionRcd"))))
0187 process.muonAlignment = cms.ESSource("PoolDBESSource",
0188                                      CondCore.DBCommon.CondDBSetup_cfi.CondDBSetup,
0189                                      connect = cms.string("sqlite_file:geometry.db"),   # ideal.db, Photogrammetry.db
0190                                      toGet = cms.VPSet(cms.PSet(record = cms.string("DTAlignmentRcd"),       tag = cms.string("DTAlignmentRcd")),
0191                                                        cms.PSet(record = cms.string("DTAlignmentErrorExtendedRcd"),  tag = cms.string("DTAlignmentErrorExtendedRcd")),
0192                                                        cms.PSet(record = cms.string("CSCAlignmentRcd"),      tag = cms.string("CSCAlignmentRcd")),
0193                                                        cms.PSet(record = cms.string("CSCAlignmentErrorExtendedRcd"), tag = cms.string("CSCAlignmentErrorExtendedRcd"))))
0194 process.looper.applyDbAlignment = True
0195 
0196 process.looper.saveToDB = True
0197 process.looper.saveApeToDB = True
0198 process.load("CondCore.DBCommon.CondDBSetup_cfi")
0199 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0200                                           process.CondDBSetup,
0201                                           connect = cms.string("sqlite_file:after.db"),
0202                                           toPut = cms.VPSet(cms.PSet(record = cms.string("DTAlignmentRcd"), tag = cms.string("DTAlignmentRcd")),
0203                                                             cms.PSet(record = cms.string("DTAlignmentErrorExtendedRcd"), tag = cms.string("DTAlignmentErrorExtendedRcd")),
0204                                                             cms.PSet(record = cms.string("CSCAlignmentRcd"), tag = cms.string("CSCAlignmentRcd")),
0205                                                             cms.PSet(record = cms.string("CSCAlignmentErrorExtendedRcd"), tag = cms.string("CSCAlignmentErrorExtendedRcd"))))