Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:31

0001 ###
0002 ### Dump a full geometry into a single xml file.
0003 ###
0004 
0005 import FWCore.ParameterSet.Config as cms
0006 
0007 process = cms.Process("MagneticFieldXMLWriter")
0008 process.load("CondCore.DBCommon.CondDBCommon_cfi")
0009 
0010 
0011 #process.load('Configuration.Geometry.MagneticFieldGeometry_cff')
0012 
0013 #GEOMETRY_VERSION = 90322
0014 #GEOMETRY_VERSION = 120812
0015 #GEOMETRY_VERSION = 130503
0016 GEOMETRY_VERSION = 160812
0017 
0018 
0019 if (GEOMETRY_VERSION == 90322) : # Note: Version 90322 and 71212 are identical.
0020   process.XMLIdealGeometryESSource  = cms.ESSource("XMLIdealGeometryESSource",
0021     geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/normal/cmsextent.xml',
0022         'Geometry/CMSCommonData/data/cms.xml',
0023         'Geometry/CMSCommonData/data/cmsMagneticField.xml',
0024         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_1103l.xml',
0025         'Geometry/CMSCommonData/data/materials.xml'),
0026     rootNodeName = cms.string('cmsMagneticField:MAGF')
0027   )
0028 elif (GEOMETRY_VERSION == 120812) :
0029   # Note: material description is for the large YE4 version
0030   process.XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
0031     geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/normal/cmsextent.xml', 
0032         'Geometry/CMSCommonData/data/cms.xml', 
0033         'Geometry/CMSCommonData/data/cmsMagneticField.xml', 
0034         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_1_v7_large.xml',
0035         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_2_v7_large.xml',
0036         'Geometry/CMSCommonData/data/materials.xml'),
0037     rootNodeName = cms.string('cmsMagneticField:MAGF')
0038   )
0039 elif (GEOMETRY_VERSION == 130503) :
0040   # Note: material description is for the large YE4 version
0041   process.XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
0042     geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/normal/cmsextent.xml', 
0043         'Geometry/CMSCommonData/data/cms.xml', 
0044         'Geometry/CMSCommonData/data/cmsMagneticField.xml', 
0045         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_1_v9_large.xml',
0046         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_2_v9_large.xml',
0047         'Geometry/CMSCommonData/data/materials.xml'),
0048     rootNodeName = cms.string('cmsMagneticField:MAGF')
0049   )
0050 elif (GEOMETRY_VERSION == 160812) :
0051   # Note: material description is for the large YE4 version
0052   process.XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
0053     geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/normal/cmsextent.xml', 
0054         'Geometry/CMSCommonData/data/cms.xml', 
0055         'Geometry/CMSCommonData/data/cmsMagneticField.xml', 
0056         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_160812_1.xml',
0057         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_160812_2.xml',
0058         'Geometry/CMSCommonData/data/materials.xml'),
0059     rootNodeName = cms.string('cmsMagneticField:MAGF')
0060   )
0061 
0062 
0063 
0064 process.source = cms.Source("EmptyIOVSource",
0065                             lastValue = cms.uint64(1),
0066                             timetype = cms.string('runnumber'),
0067                             firstValue = cms.uint64(1),
0068                             interval = cms.uint64(1)
0069                             )
0070 
0071 process.BigXMLWriter = cms.EDAnalyzer("OutputMagneticFieldDDToDDL",
0072                               rotNumSeed = cms.int32(0),
0073                               fileName = cms.untracked.string("./mfGeometry_"+str(GEOMETRY_VERSION)+".xml")
0074                               )
0075 
0076 
0077 process.maxEvents = cms.untracked.PSet(
0078     input = cms.untracked.int32(1)
0079     )
0080 
0081 process.p1 = cms.Path(process.BigXMLWriter)
0082