Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:40

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("APE")
0004 # we need conditions
0005 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0006 from Configuration.AlCa.GlobalTag import GlobalTag
0007 #process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0008 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:mc', '')
0009 
0010 # include "Configuration/StandardSequences/data/FakeConditions.cff"
0011 # initialize magnetic field
0012 #process.load("Configuration.StandardSequences.MagneticField_cff")
0013 
0014 # ideal geometry and interface
0015 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
0016 process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi")
0017 # for Muon: include "Geometry/MuonNumbering/data/muonNumberingInitialization.cfi"
0018 
0019 # Choose Tracker Geometry
0020 #process.load("Configuration.Geometry.GeometryReco_cff")
0021 
0022 #process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
0023 #process.load("Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff")
0024 #process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi")
0025 
0026 process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi")
0027 process.load("Geometry.TrackerNumberingBuilder.trackerTopologyConstants_cfi")
0028 
0029 
0030 # track selection for alignment
0031 #process.load("Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi")
0032 
0033 # Alignment producer
0034 process.load("Alignment.CommonAlignmentProducer.AlignmentProducer_cff")
0035 from Alignment.CommonAlignmentAlgorithm.ApeSettingAlgorithm_cfi import *
0036 process.AlignmentProducer.algoConfig = ApeSettingAlgorithm
0037 process.AlignmentProducer.saveApeToDB = True
0038 process.AlignmentProducer.algoConfig.readApeFromASCII = True
0039 process.AlignmentProducer.algoConfig.setComposites = False
0040 process.AlignmentProducer.algoConfig.readLocalNotGlobal = True
0041 process.AlignmentProducer.algoConfig.readFullLocalMatrix = True
0042 process.AlignmentProducer.algoConfig.apeASCIIReadFile = 'Alignment/CommonAlignmentAlgorithm/test/moduleDependent_APE_25nsEnlargeTECRing7_v2.txt'
0043 process.AlignmentProducer.algoConfig.saveApeToASCII = False
0044 process.AlignmentProducer.algoConfig.saveComposites = False
0045 process.AlignmentProducer.algoConfig.apeASCIISaveFile = 'myLocalDump.txt'
0046         
0047 # replace AlignmentProducer.doMisalignmentScenario = true
0048 # replace AlignmentProducer.applyDbAlignment = true # needs other conditions than fake!
0049 # Track refitter (adapted to alignment needs)
0050 #process.load("RecoTracker.TrackProducer.RefitterWithMaterial_cff")
0051 
0052 # to be refined...
0053 process.MessageLogger = cms.Service("MessageLogger",
0054     statistics = cms.untracked.vstring('cout', 'alignment'),
0055     categories = cms.untracked.vstring('Alignment'),
0056     cout = cms.untracked.PSet(
0057         threshold = cms.untracked.string('DEBUG'),
0058         noLineBreaks = cms.untracked.bool(True)
0059     ),
0060     alignment = cms.untracked.PSet(
0061         INFO = cms.untracked.PSet(
0062             limit = cms.untracked.int32(0)
0063         ),
0064         noLineBreaks = cms.untracked.bool(True),
0065         DEBUG = cms.untracked.PSet(
0066             limit = cms.untracked.int32(0)
0067         ),
0068         WARNING = cms.untracked.PSet(
0069             limit = cms.untracked.int32(0)
0070         ),
0071         ERROR = cms.untracked.PSet(
0072             limit = cms.untracked.int32(0)
0073         ),
0074         threshold = cms.untracked.string('INFO'),
0075         Alignment = cms.untracked.PSet(
0076             limit = cms.untracked.int32(-1)
0077         )
0078     ),
0079     destinations = cms.untracked.vstring('cout',  ## .log automatically
0080         'alignment')
0081 )
0082 
0083 process.source = cms.Source("EmptySource")
0084 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0085 
0086 from CondCore.DBCommon.CondDBSetup_cfi import *
0087 process.PoolDBOutputService = cms.Service(
0088     "PoolDBOutputService",
0089     CondDBSetup,
0090     timetype = cms.untracked.string('runnumber'),
0091     connect = cms.string('sqlite_file:MyLocalApe.db'),
0092     toPut = cms.VPSet(cms.PSet(record = cms.string('TrackerAlignmentErrorExtendedRcd'),
0093                                tag = cms.string('AlignmentErrors')
0094                                )
0095                       )
0096     )
0097 
0098 
0099 
0100 # We do not even need a path - producer is called anyway...
0101 #process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi")
0102 #process.p = cms.Path(process.offlineBeamSpot)
0103 #process.TrackRefitter.src = 'AlignmentTrackSelector'
0104 #process.TrackRefitter.TrajectoryInEvent = True
0105 
0106