Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:19

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TEST")
0004 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0005 process.load("Configuration.Geometry.GeometryDB_cff")
0006 
0007 process.load("FWCore.MessageService.MessageLogger_cfi")
0008 
0009 ### needed to get the geometry
0010 from Configuration.AlCa.GlobalTag import GlobalTag
0011 process.GlobalTag = GlobalTag(process.GlobalTag,"auto:phase1_2017_design")
0012 
0013 from CondCore.CondDB.CondDB_cfi import *
0014 
0015 CondDBAlignment = CondDB.clone(connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'))
0016                             
0017 ### example starting data geometry that is known to have an off-centered BPIX
0018 process.ZeroGeom = cms.ESSource("PoolDBESSource",
0019                                 CondDBAlignment,
0020                                 timetype = cms.string("runnumber"),
0021                                 toGet = cms.VPSet(cms.PSet(record = cms.string('TrackerAlignmentRcd'),
0022                                                            tag = cms.string('TrackerAlignment_StartUp17_v11')
0023                                                            )
0024                                                   )                                                            
0025                                 )
0026                 
0027 CondDBAPE = CondDB.clone(connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'))
0028 
0029 process.ZeroAPE = cms.ESSource("PoolDBESSource",
0030                                CondDBAPE,
0031                                timetype = cms.string("runnumber"),
0032                                toGet = cms.VPSet(cms.PSet(record = cms.string('TrackerAlignmentErrorExtendedRcd'),
0033                                                           tag = cms.string('TrackerAlignmentErrorsExtended_Upgrade2017_design_v0')
0034                                                           )
0035                                                  )
0036                                )
0037 
0038 process.es_prefer_ZeroGeom = cms.ESPrefer("PoolDBESSource", "ZeroGeom")
0039 process.es_prefer_ZeroAPE = cms.ESPrefer("PoolDBESSource", "ZeroAPE")
0040 
0041 process.maxEvents = cms.untracked.PSet(
0042     input = cms.untracked.int32(1)
0043 )
0044 process.source = cms.Source("EmptySource")
0045 
0046 GeometryIntoNtuplesRootFile = cms.untracked.string('InputGeometry.root')
0047 
0048 # into ntuples
0049 process.dump = cms.EDAnalyzer("TrackerGeometryIntoNtuples",
0050                               outputFile = GeometryIntoNtuplesRootFile,
0051                               outputTreename = cms.untracked.string('alignTree')
0052                               )
0053 
0054 # geometry comparison
0055 process.load("Alignment.OfflineValidation.TrackerGeometryCompare_cfi")
0056 process.TrackerGeometryCompare.inputROOTFile1 = 'IDEAL'
0057 process.TrackerGeometryCompare.inputROOTFile2 = GeometryIntoNtuplesRootFile
0058 process.TrackerGeometryCompare.setCommonTrackerSystem = "P1PXBBarrel"  # for MC
0059 #process.TrackerGeometryCompare.setCommonTrackerSystem = "TOBBarrel"  # for Data
0060 process.TrackerGeometryCompare.levels = []
0061 process.TrackerGeometryCompare.writeToDB = True
0062 
0063 process.TFileService = cms.Service("TFileService",
0064                                    fileName=cms.string("TPBCenteredOutputComparison.root")  # for MC
0065                                    #fileName=cms.string("TOBCenteredOutputComparison.root") #for Data
0066                                    )
0067 
0068 CondDBoutput=CondDB.clone(connect = cms.string('sqlite_file:TrackerAlignment_StartUp17_v11_BPIX-Centred.db'))
0069 
0070 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0071                                           CondDBoutput,
0072                                           timetype = cms.untracked.string('runnumber'),
0073                                           toPut = cms.VPSet(cms.PSet(record = cms.string('TrackerAlignmentRcd'),
0074                                                                      tag = cms.string('Alignments')
0075                                                                      ),
0076                                                             cms.PSet(record = cms.string('TrackerAlignmentErrorExtendedRcd'),
0077                                                                      tag = cms.string('AlignmentErrorsExtended')
0078                                                                      )
0079                                                             )
0080                                           )
0081 
0082 process.p = cms.Path(process.dump*process.TrackerGeometryCompare)
0083