Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-08 22:57:11

0001 # This cfi shows an example of how to activate some debugging tests of the field
0002 # map geometry and data tables.
0003 # For further information, please refer to
0004 # https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideMagneticField#Development_workflow
0005 #
0006 # Please note that the configuration shown below does not produce a complete field map.
0007 # It should not be used as an example of setting a field map.
0008 # For a full test of the validity of a given field map, please use:
0009 # MagneticField/Engine/test/regression.py
0010 # which is a superset of the test that is run here.
0011 
0012 import FWCore.ParameterSet.Config as cms
0013 
0014 process = cms.Process("MagneticFieldTest")
0015 
0016 process.source = cms.Source("EmptySource")
0017 process.maxEvents = cms.untracked.PSet(
0018     input = cms.untracked.int32(1)
0019     )
0020 
0021 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0022 
0023 process.MessageLogger = cms.Service("MessageLogger",
0024     cerr = cms.untracked.PSet(
0025         enable = cms.untracked.bool(False)
0026     ),
0027     cout = cms.untracked.PSet(
0028         DEBUG = cms.untracked.PSet(
0029             limit = cms.untracked.int32(-1)
0030         ),
0031         ERROR = cms.untracked.PSet(
0032             limit = cms.untracked.int32(-1)
0033         ),
0034         INFO = cms.untracked.PSet(
0035             limit = cms.untracked.int32(-1)
0036         ),
0037         WARNING = cms.untracked.PSet(
0038             limit = cms.untracked.int32(-1)
0039         ),
0040         default = cms.untracked.PSet(
0041             limit = cms.untracked.int32(-1)
0042         ),
0043         enable = cms.untracked.bool(True),
0044         noLineBreaks = cms.untracked.bool(True),
0045         threshold = cms.untracked.string('DEBUG')
0046     ),
0047     debugModules = cms.untracked.vstring('*')
0048 )
0049 
0050 process.magfield = cms.ESSource("XMLIdealGeometryESSource",
0051     geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/normal/cmsextent.xml', 
0052         'Geometry/CMSCommonData/data/cms.xml', 
0053         'Geometry/CMSCommonData/data/cmsMagneticField.xml', 
0054         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_160812_1.xml',
0055         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_160812_2.xml',
0056         'Geometry/CMSCommonData/data/materials.xml'),
0057     rootNodeName = cms.string('cmsMagneticField:MAGF')
0058 )
0059 
0060 # avoid interference with EmptyESSource in uniformMagneticField.cfi
0061 process.es_prefer_magfield = cms.ESPrefer("XMLIdealGeometryESSource","magfield")
0062 
0063 
0064 process.MagneticFieldESProducer = cms.ESProducer("VolumeBasedMagneticFieldESProducer",
0065                                               DDDetector = cms.ESInputTag('', 'magfield'),
0066                                               appendToDataLabel = cms.string(''),
0067                                               useParametrizedTrackerField = cms.bool(False),
0068                                               label = cms.untracked.string(''),
0069                                               attribute = cms.string('magfield'),
0070                                               value = cms.string('magfield'),
0071                                               paramLabel = cms.string(''),
0072                                               version = cms.string('fake'),
0073                                               geometryVersion = cms.int32(160812),
0074                                               debugBuilder = cms.untracked.bool(False), # Set to True to activate full debug
0075                                               scalingVolumes = cms.vint32(),
0076                                               scalingFactors = cms.vdouble(),
0077 
0078                                               gridFiles = cms.VPSet()
0079                                                )
0080 
0081 process.test = cms.EDAnalyzer("testMagGeometryAnalyzer",
0082                               DDDetector = cms.ESInputTag('', 'magfield')
0083                               )
0084 
0085 process.p = cms.Path(process.test)