Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:40:50

0001 #=================================
0002 #inputs
0003 globaltag = 'auto:phase1_2018_design'    #APEs are copied from this GT (and IdealGeometry and TrackerTopology are used)
0004 inputsqlitefile = None                  #if None, uses the GT alignment
0005 alignmenttag = 'Alignments'             #tag name for TrackerAlignmentRcd in the input file, also used for the output file
0006 runnumberalignmentIOV = 1               #any run number in the iov that you want to start from
0007 
0008 outputfilename = 'outputfile.db'
0009 
0010 
0011 #misalignment amplitudes, -999 means no misalignment
0012 #the commented numbers are the default magnitudes, which produce a maximum movement of around 600 microns
0013 #see Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.cc for definitions
0014 #see also https://twiki.cern.ch/twiki/bin/viewauth/CMS/SystematicMisalignmentsofTracker
0015 radialEpsilon     = -999. # 5e-4
0016 telescopeEpsilon  = -999. # 5e-4
0017 layerRotEpsilon   = -999. # 9.43e-6               #cm^-1
0018 bowingEpsilon     = -999. # 6.77e-9               #cm^-2
0019 zExpEpsilon       = -999. # 2.02e-4
0020 twistEpsilon      = -999. # 2.04e-6               #cm^-1
0021 ellipticalEpsilon = -999. # 5e-4
0022 skewEpsilon       = -999. # 5.5e-2                #cm
0023 sagittaEpsilon    = -999. # 5.0e-4
0024 
0025 #phases for phi dependent misalignments
0026 ellipticalDelta   = 0.
0027 skewDelta         = 0.
0028 sagittaDelta      = 0.
0029 #=================================
0030 
0031 
0032 
0033 
0034 import FWCore.ParameterSet.Config as cms
0035 
0036 process = cms.Process("TrackerSystematicMisalignments")
0037 process.load("FWCore.MessageService.MessageLogger_cfi")
0038 
0039 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0040 
0041 process.load("CondCore.CondDB.CondDB_cfi")
0042 process.source = cms.Source("EmptySource",
0043                             firstRun=cms.untracked.uint32(runnumberalignmentIOV),
0044 )
0045 
0046 process.maxEvents = cms.untracked.PSet(
0047     input = cms.untracked.int32(1)
0048 )
0049 
0050 # initial geom
0051 # configure the database file - use survey one for default
0052 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0053 from Configuration.AlCa.GlobalTag import GlobalTag
0054 process.GlobalTag = GlobalTag(process.GlobalTag, globaltag, '')
0055 
0056 
0057 if inputsqlitefile is not None:
0058     process.GlobalTag.toGet = cms.VPSet(
0059                                         cms.PSet(
0060                                                  record = cms.string('TrackerAlignmentRcd'),
0061                                                  tag = cms.string(alignmenttag),
0062                                                  connect = cms.string('sqlite_file:'+inputsqlitefile),
0063                                         ),
0064     )
0065 
0066 
0067 # input
0068 process.load("Alignment.TrackerAlignment.TrackerSystematicMisalignments_cfi")
0069 process.TrackerSystematicMisalignments.fromDBGeom = True
0070 
0071 #uncomment one or more of these to apply the misalignment(s)
0072 
0073 process.TrackerSystematicMisalignments.radialEpsilon     = radialEpsilon
0074 process.TrackerSystematicMisalignments.telescopeEpsilon  = telescopeEpsilon
0075 process.TrackerSystematicMisalignments.layerRotEpsilon   = layerRotEpsilon
0076 process.TrackerSystematicMisalignments.bowingEpsilon     = bowingEpsilon
0077 process.TrackerSystematicMisalignments.zExpEpsilon       = zExpEpsilon
0078 process.TrackerSystematicMisalignments.twistEpsilon      = twistEpsilon
0079 process.TrackerSystematicMisalignments.ellipticalEpsilon = ellipticalEpsilon
0080 process.TrackerSystematicMisalignments.skewEpsilon       = skewEpsilon
0081 process.TrackerSystematicMisalignments.sagittaEpsilon    = sagittaEpsilon
0082 
0083 #misalignment phases
0084 process.TrackerSystematicMisalignments.ellipticalDelta   = ellipticalDelta
0085 process.TrackerSystematicMisalignments.skewDelta         = skewDelta
0086 process.TrackerSystematicMisalignments.sagittaDelta      = sagittaDelta
0087 
0088 # output
0089 process.CondDB.connect = 'sqlite_file:'+outputfilename
0090 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0091                                           process.CondDB,
0092                                           toPut = cms.VPSet(cms.PSet(record = cms.string('TrackerAlignmentRcd'),
0093                                                                      tag = cms.string(alignmenttag),
0094                                                                      ),
0095                                                             cms.PSet(record = cms.string('TrackerAlignmentErrorExtendedRcd'),
0096                                                                      tag = cms.string('AlignmentErrorsExtended'),
0097                                                                      ),
0098                                                             ),
0099                                           )
0100 
0101 process.p = cms.Path( process.TrackerSystematicMisalignments )