CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/MagneticField/Engine/python/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         'Geometry/CMSCommonData/data/materials.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     geometryVersion = cms.int32(71212),
00057     debugBuilder = cms.untracked.bool(False),
00058     cacheLastVolume = cms.untracked.bool(True),
00059     scalingVolumes = cms.vint32(),
00060     scalingFactors = cms.vdouble(),
00061     gridFiles = cms.VPSet(
00062         cms.PSet( # Default tables, replicate sector 1
00063             volumes   = cms.string('1-312'),
00064             sectors   = cms.string('0') ,
00065             master    = cms.int32(1),
00066             path      = cms.string('grid.[v].bin'),
00067         ),
00068     )
00069 )
00070 
00071 VBF20 = VBF0.clone()
00072 VBF20.version = 'grid_1103l_071212_2t'
00073 VBF20.paramLabel = 'slave_20'
00074 VBF20.label = '071212_2t'
00075 
00076 VBF30 = VBF0.clone()
00077 VBF30.version = 'grid_1103l_071212_3t'
00078 VBF30.paramLabel = 'slave_30'
00079 VBF30.label = '071212_3t'
00080 
00081 VBF35 = VBF0.clone()
00082 VBF35.version = 'grid_1103l_071212_3_5t'
00083 VBF35.paramLabel = 'slave_35'
00084 VBF35.label = '071212_3_5t'
00085 
00086 #3.8T map: apply scaling factors; use sector-specific maps
00087 from MagneticField.Engine.ScalingFactors_090322_2pi_090520_cfi import *
00088 VBF38 = VBF0.clone()
00089 VBF38.version = 'grid_1103l_090322_3_8t'
00090 VBF38.geometryVersion = 90322
00091 VBF38.paramLabel = 'slave_38'
00092 VBF38.label = '090322_3_8t'
00093 VBF38.scalingVolumes = fieldScaling.scalingVolumes
00094 VBF38.scalingFactors = fieldScaling.scalingFactors
00095 VBF38.gridFiles = cms.VPSet(
00096         cms.PSet( # Default tables, replicate sector 1
00097             volumes   = cms.string('1-312'),
00098             sectors   = cms.string('0') ,
00099             master    = cms.int32(1),
00100             path      = cms.string('grid.[v].bin'),
00101         ),
00102 
00103         cms.PSet( # Specific volumes in Barrel, sector 3
00104             volumes   = cms.string('176-186,231-241,286-296'),
00105             sectors   = cms.string('3') ,
00106             master    = cms.int32(3),
00107             path      = cms.string('S3/grid.[v].bin'),
00108         ),
00109 
00110         cms.PSet( # Specific volumes in Barrel, sector 4
00111             volumes   = cms.string('176-186,231-241,286-296'),
00112             sectors   = cms.string('4') ,
00113             master    = cms.int32(4),
00114             path      = cms.string('S4/grid.[v].bin'),
00115         ),
00116 
00117         cms.PSet(  # Specific volumes in Barrel and endcaps, sector 9
00118             volumes   = cms.string('14,15,20,21,24-27,32,33,40,41,48,49,56,57,62,63,70,71,286-296'),
00119             sectors   = cms.string('9') ,
00120             master    = cms.int32(9),
00121             path      = cms.string('S9/grid.[v].bin'),
00122         ),
00123 
00124         cms.PSet(  # Specific volumes in Barrel and endcaps, sector 10
00125             volumes   = cms.string('14,15,20,21,24-27,32,33,40,41,48,49,56,57,62,63,70,71,286-296'),
00126             sectors   = cms.string('10') ,
00127             master    = cms.int32(10),
00128             path      = cms.string('S10/grid.[v].bin'),
00129         ),
00130                                                         
00131         cms.PSet( # Specific volumes in Barrel and endcaps, sector 11
00132             volumes   = cms.string('14,15,20,21,24-27,32,33,40,41,48,49,56,57,62,63,70,71,286-296'),
00133             sectors   = cms.string('11') ,
00134             master    = cms.int32(11),
00135             path      = cms.string('S11/grid.[v].bin'),
00136         ),
00137     )
00138 
00139 
00140 
00141 VBF40 = VBF0.clone()
00142 VBF40.version = 'grid_1103l_071212_4t'
00143 VBF40.paramLabel = 'slave_40'
00144 VBF40.label = '071212_4t'
00145 
00146 
00147 AutoMagneticFieldESProducer = cms.ESProducer("AutoMagneticFieldESProducer",
00148    # if positive, set B value (in kGauss), overriding the current reading from DB
00149    valueOverride = cms.int32(-1),
00150    nominalCurrents = cms.untracked.vint32(-1, 0,9558,14416,16819,18268,19262),
00151    mapLabels = cms.untracked.vstring("090322_3_8t",
00152                                      "0t",
00153                                      "071212_2t",
00154                                      "071212_3t",
00155                                      "071212_3_5t",
00156                                      "090322_3_8t",
00157                                      "071212_4t"),
00158    label = cms.untracked.string(''),
00159  )
00160