Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 # Config file template to produce a treeFile.root usable as input for
0002 # .../CMSSW/Alignment/MillePedeAlignmentAlgorithm/macros/CompareMillePede.h
0003 # to compare two different geometries.
0004 #
0005 # last update on $Date: 2010/12/14 01:36:38 $ by $Author: flucke $
0006 
0007 import FWCore.ParameterSet.Config as cms
0008 
0009 process = cms.Process("Alignment")
0010 
0011 process.options = cms.untracked.PSet(
0012     Rethrow = cms.untracked.vstring("ProductNotFound") # do not accept this exception
0013     )
0014 
0015 # initialize  MessageLogger
0016 process.load("FWCore.MessageService.MessageLogger_cfi")
0017 process.MessageLogger.files.alignment = cms.untracked.PSet(
0018     DEBUG = cms.untracked.PSet(
0019         limit = cms.untracked.int32(-1)
0020         ),
0021     INFO = cms.untracked.PSet(
0022         limit = cms.untracked.int32(5),
0023         reportEvery = cms.untracked.int32(5)
0024         ),
0025     WARNING = cms.untracked.PSet(
0026         limit = cms.untracked.int32(10)
0027         ),
0028     ERROR = cms.untracked.PSet(
0029         limit = cms.untracked.int32(-1)
0030         ),
0031     Alignment = cms.untracked.PSet(
0032         limit = cms.untracked.int32(-1),
0033         reportEvery = cms.untracked.int32(1)
0034         ),
0035     enableStatistics = cms.untracked.bool(True)
0036     )
0037 
0038 
0039 # initialize magnetic field
0040 process.load("Configuration.StandardSequences.MagneticField_cff")
0041 # geometry
0042 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0043 # global tag and other conditions
0044 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0045 process.GlobalTag.globaltag = 'DESIGN42_V12::All' # take your favourite
0046 
0047 # if alignment constants not from global tag, add this
0048 from CondCore.DBCommon.CondDBSetup_cfi import *
0049 # CondDBSetup.DBParameters.authenticationPath = '...' # needed to access cms_orcoff_prod
0050 process.trackerAlignment = cms.ESSource(
0051     "PoolDBESSource",
0052     CondDBSetup,
0053 #    connect = cms.string("sqlite_file:TrackerAlignment_GR10v6_offline_append.db"),
0054     connect = cms.string("frontier://FrontierProd/CMS_COND_31X_ALIGNMENT"),
0055 #    connect = cms.string("oracle://cms_orcoff_prod/CMS_COND_31X_ALIGNMENT"),
0056     toGet = cms.VPSet(cms.PSet(record = cms.string("TrackerAlignmentRcd"),
0057                                tag = cms.string("TrackerAlignment_GR10_v6_offline")
0058 #                               tag = cms.string("Alignments")
0059 #                               ),
0060 #                      cms.PSet(record = cms.string("TrackerAlignmentErrorExtendedRcd"),
0061 #                               tag = cms.string("TrackerIdealGeometryErrors210_mc")
0062                                )
0063                       )
0064     )
0065 
0066 
0067 process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource", "trackerAlignment")
0068 
0069 
0070 # Alignment producer
0071 process.load("Alignment.CommonAlignmentProducer.AlignmentProducer_cff")
0072 
0073 process.AlignmentProducer.ParameterBuilder.Selector = cms.PSet(
0074     alignParams = cms.vstring(
0075         'TrackerTPBModule,111111',
0076         'TrackerTPEModule,111111',
0077         'TrackerTIBModuleUnit,101111',
0078         'TrackerTIDModuleUnit,101111',
0079         'TrackerTOBModuleUnit,101111',
0080         'TrackerTECModuleUnit,101111'
0081         )
0082     )
0083 
0084 process.AlignmentProducer.doMisalignmentScenario = False #True
0085 process.AlignmentProducer.applyDbAlignment = True # either globalTag or trackerAlignment
0086 
0087 # assign by reference (i.e. could change MillePedeAlignmentAlgorithm as well):
0088 process.AlignmentProducer.algoConfig = process.MillePedeAlignmentAlgorithm
0089 
0090 process.AlignmentProducer.algoConfig.mode = 'pedeRead'
0091 process.AlignmentProducer.algoConfig.pedeReader.readFile = 'FILE_MUST_NOT_EXIST.res'
0092 
0093 process.AlignmentProducer.algoConfig.treeFile = 'my_treeFile.root'
0094 
0095 process.source = cms.Source("EmptySource",
0096                             firstRun = cms.untracked.uint32(170249) # choose your run!
0097                             )
0098 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1) )
0099 
0100 process.dump = cms.EDAnalyzer("EventContentAnalyzer")
0101 process.p = cms.Path(process.dump)
0102 
0103 process.AlignmentProducer.saveToDB = True # should not be needed, but is:
0104 #                     otherwise AlignmentProducer does not  call relevant algorithm part
0105 process.PoolDBOutputService = cms.Service(
0106     "PoolDBOutputService",
0107     CondDBSetup,
0108     timetype = cms.untracked.string('runnumber'),
0109     connect = cms.string('sqlite_file:remove_me.db'),
0110     toPut = cms.VPSet(cms.PSet(
0111       record = cms.string('TrackerAlignmentRcd'),
0112       tag = cms.string('dummyTagAlignment')
0113       )
0114                       )
0115     )
0116