CMS 3D CMS Logo

autoMagneticFieldProducer_cfi.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 # This cfi contains everything needed to use a field engine that is built using
00004 # the current value provided in the ES. 
00005 
00006 magfield = cms.ESSource("XMLIdealGeometryESSource",
00007     geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/normal/cmsextent.xml', 
00008         'Geometry/CMSCommonData/data/cms.xml', 
00009         'Geometry/CMSCommonData/data/cmsMagneticField.xml', 
00010         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_1103l.xml',
00011         'MagneticField/GeomBuilder/data/MagneticFieldParameters_07_2pi.xml'),
00012     rootNodeName = cms.string('cmsMagneticField:MAGF')
00013 )
00014 
00015 # avoid interference with EmptyESSource in uniformMagneticField.cfi
00016 es_prefer_magfield = cms.ESPrefer("XMLIdealGeometryESSource","magfield")
00017 
00018 
00019 # Configue all possible slave (parametrized) fields
00020 
00021 SlaveField0 = cms.ESProducer("UniformMagneticFieldESProducer",
00022     ZFieldInTesla = cms.double(0.0),
00023     label = cms.untracked.string('slave_0')
00024 )
00025 
00026 SlaveField20 = cms.ESProducer("ParametrizedMagneticFieldProducer",
00027     version = cms.string('OAE_1103l_071212'),
00028     parameters = cms.PSet(
00029         BValue = cms.string('2_0T')
00030     ),
00031     label = cms.untracked.string('slave_20')
00032 )
00033 
00034 SlaveField30 = SlaveField20.clone()
00035 SlaveField30.parameters.BValue = '3_0T'
00036 SlaveField30.label = 'slave_30'
00037 
00038 SlaveField35 = SlaveField20.clone()
00039 SlaveField35.parameters.BValue = '3_5T'
00040 SlaveField35.label = 'slave_35'
00041 
00042 SlaveField38 = SlaveField20.clone()
00043 SlaveField38.parameters.BValue= '3_8T'
00044 SlaveField38.label = 'slave_38'
00045 
00046 SlaveField40 = SlaveField20.clone()
00047 SlaveField40.parameters.BValue= '4_0T'
00048 SlaveField40.label = 'slave_40'
00049 
00050 
00051 VBF0 = cms.ESProducer("VolumeBasedMagneticFieldESProducer",
00052     label = cms.untracked.string('0t'),
00053     useParametrizedTrackerField = cms.bool(True),
00054     paramLabel = cms.string('slave_0'),
00055     version = cms.string('grid_1103l_071212_2t'),
00056     debugBuilder = cms.untracked.bool(False),
00057     cacheLastVolume = cms.untracked.bool(True),
00058     overrideMasterSector = cms.bool(True),
00059     scalingVolumes = cms.vint32(),
00060     scalingFactors = cms.vdouble()
00061 )
00062 
00063 VBF20 = VBF0.clone()
00064 VBF20.version = 'grid_1103l_071212_2t'
00065 VBF20.paramLabel = 'slave_20'
00066 VBF20.label = '071212_2t'
00067 
00068 VBF30 = VBF0.clone()
00069 VBF30.version = 'grid_1103l_071212_3t'
00070 VBF30.paramLabel = 'slave_30'
00071 VBF30.label = '071212_3t'
00072 
00073 VBF35 = VBF0.clone()
00074 VBF35.version = 'grid_1103l_071212_3_5t'
00075 VBF35.paramLabel = 'slave_35'
00076 VBF35.label = '071212_3_5t'
00077 
00078 #3.8T map: apply scaling factors; use sector-specific maps (overrideMasterSector=False)
00079 from MagneticField.Engine.ScalingFactors_090322_2pi_090520_cfi import *
00080 VBF38 = VBF0.clone()
00081 VBF38.version = 'grid_1103l_090322_3_8t'
00082 VBF38.paramLabel = 'slave_38'
00083 VBF38.label = '090322_3_8t'
00084 VBF38.overrideMasterSector = False
00085 VBF38.scalingVolumes = fieldScaling.scalingVolumes
00086 VBF38.scalingFactors = fieldScaling.scalingFactors
00087 
00088 VBF40 = VBF0.clone()
00089 VBF40.version = 'grid_1103l_071212_4t'
00090 VBF40.paramLabel = 'slave_40'
00091 VBF40.label = '071212_4t'
00092 
00093 
00094 AutoMagneticFieldESProducer = cms.ESProducer("AutoMagneticFieldESProducer",
00095    # if positive, set B value (in kGauss), overriding the current reading from DB
00096    valueOverride = cms.int32(-1),
00097    nominalCurrents = cms.untracked.vint32(0,9558,14416,16819,18268,19262),
00098    mapLabels = cms.untracked.vstring("0t",
00099                                      "071212_2t",
00100                                      "071212_3t",
00101                                      "071212_3_5t",
00102                                      "090322_3_8t",
00103                                      "071212_4t"),
00104    label = cms.untracked.string(''),
00105  )
00106 

Generated on Tue Jun 9 17:40:31 2009 for CMSSW by  doxygen 1.5.4