CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
autoMagneticFieldProducer_cfi.py
Go to the documentation of this file.
2 
3 # This cfi contains everything needed to use a field engine that is built using
4 # the current value provided in the ES.
5 
6 magfield = cms.ESSource("XMLIdealGeometryESSource",
7  geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/normal/cmsextent.xml',
8  'Geometry/CMSCommonData/data/cms.xml',
9  'Geometry/CMSCommonData/data/cmsMagneticField.xml',
10  'MagneticField/GeomBuilder/data/MagneticFieldVolumes_1103l.xml',
11  'Geometry/CMSCommonData/data/materials.xml'),
12  rootNodeName = cms.string('cmsMagneticField:MAGF')
13 )
14 
15 # avoid interference with EmptyESSource in uniformMagneticField.cfi
16 es_prefer_magfield = cms.ESPrefer("XMLIdealGeometryESSource","magfield")
17 
18 
19 # Configue all possible slave (parametrized) fields
20 
21 SlaveField0 = cms.ESProducer("UniformMagneticFieldESProducer",
22  ZFieldInTesla = cms.double(0.0),
23  label = cms.untracked.string('slave_0')
24 )
25 
26 SlaveField20 = cms.ESProducer("ParametrizedMagneticFieldProducer",
27  version = cms.string('OAE_1103l_071212'),
28  parameters = cms.PSet(
29  BValue = cms.string('2_0T')
30  ),
31  label = cms.untracked.string('slave_20')
32 )
33 
34 SlaveField30 = SlaveField20.clone()
35 SlaveField30.parameters.BValue = '3_0T'
36 SlaveField30.label = 'slave_30'
37 
38 SlaveField35 = SlaveField20.clone()
39 SlaveField35.parameters.BValue = '3_5T'
40 SlaveField35.label = 'slave_35'
41 
42 SlaveField38 = SlaveField20.clone()
43 SlaveField38.parameters.BValue= '3_8T'
44 SlaveField38.label = 'slave_38'
45 
46 SlaveField40 = SlaveField20.clone()
47 SlaveField40.parameters.BValue= '4_0T'
48 SlaveField40.label = 'slave_40'
49 
50 
51 VBF0 = cms.ESProducer("VolumeBasedMagneticFieldESProducer",
52  label = cms.untracked.string('0t'),
53  useParametrizedTrackerField = cms.bool(True),
54  paramLabel = cms.string('slave_0'),
55  version = cms.string('grid_1103l_071212_2t'),
56  geometryVersion = cms.int32(71212),
57  debugBuilder = cms.untracked.bool(False),
58  cacheLastVolume = cms.untracked.bool(True),
59  scalingVolumes = cms.vint32(),
60  scalingFactors = cms.vdouble(),
61  gridFiles = cms.VPSet(
62  cms.PSet( # Default tables, replicate sector 1
63  volumes = cms.string('1-312'),
64  sectors = cms.string('0') ,
65  master = cms.int32(1),
66  path = cms.string('grid.[v].bin'),
67  ),
68  )
69 )
70 
71 VBF20 = VBF0.clone()
72 VBF20.version = 'grid_1103l_071212_2t'
73 VBF20.paramLabel = 'slave_20'
74 VBF20.label = '071212_2t'
75 
76 VBF30 = VBF0.clone()
77 VBF30.version = 'grid_1103l_071212_3t'
78 VBF30.paramLabel = 'slave_30'
79 VBF30.label = '071212_3t'
80 
81 VBF35 = VBF0.clone()
82 VBF35.version = 'grid_1103l_071212_3_5t'
83 VBF35.paramLabel = 'slave_35'
84 VBF35.label = '071212_3_5t'
85 
86 #3.8T map: apply scaling factors; use sector-specific maps
88 VBF38 = VBF0.clone()
89 VBF38.version = 'grid_1103l_090322_3_8t'
90 VBF38.geometryVersion = 90322
91 VBF38.paramLabel = 'slave_38'
92 VBF38.label = '090322_3_8t'
93 VBF38.scalingVolumes = fieldScaling.scalingVolumes
94 VBF38.scalingFactors = fieldScaling.scalingFactors
95 VBF38.gridFiles = cms.VPSet(
96  cms.PSet( # Default tables, replicate sector 1
97  volumes = cms.string('1-312'),
98  sectors = cms.string('0') ,
99  master = cms.int32(1),
100  path = cms.string('grid.[v].bin'),
101  ),
102 
103  cms.PSet( # Specific volumes in Barrel, sector 3
104  volumes = cms.string('176-186,231-241,286-296'),
105  sectors = cms.string('3') ,
106  master = cms.int32(3),
107  path = cms.string('S3/grid.[v].bin'),
108  ),
109 
110  cms.PSet( # Specific volumes in Barrel, sector 4
111  volumes = cms.string('176-186,231-241,286-296'),
112  sectors = cms.string('4') ,
113  master = cms.int32(4),
114  path = cms.string('S4/grid.[v].bin'),
115  ),
116 
117  cms.PSet( # Specific volumes in Barrel and endcaps, sector 9
118  volumes = cms.string('14,15,20,21,24-27,32,33,40,41,48,49,56,57,62,63,70,71,286-296'),
119  sectors = cms.string('9') ,
120  master = cms.int32(9),
121  path = cms.string('S9/grid.[v].bin'),
122  ),
123 
124  cms.PSet( # Specific volumes in Barrel and endcaps, sector 10
125  volumes = cms.string('14,15,20,21,24-27,32,33,40,41,48,49,56,57,62,63,70,71,286-296'),
126  sectors = cms.string('10') ,
127  master = cms.int32(10),
128  path = cms.string('S10/grid.[v].bin'),
129  ),
130 
131  cms.PSet( # Specific volumes in Barrel and endcaps, sector 11
132  volumes = cms.string('14,15,20,21,24-27,32,33,40,41,48,49,56,57,62,63,70,71,286-296'),
133  sectors = cms.string('11') ,
134  master = cms.int32(11),
135  path = cms.string('S11/grid.[v].bin'),
136  ),
137  )
138 
139 
140 
141 VBF40 = VBF0.clone()
142 VBF40.version = 'grid_1103l_071212_4t'
143 VBF40.paramLabel = 'slave_40'
144 VBF40.label = '071212_4t'
145 
146 
147 AutoMagneticFieldESProducer = cms.ESProducer("AutoMagneticFieldESProducer",
148  # if positive, set B value (in kGauss), overriding the current reading from DB
149  valueOverride = cms.int32(-1),
150  nominalCurrents = cms.untracked.vint32(-1, 0,9558,14416,16819,18268,19262),
151  mapLabels = cms.untracked.vstring("090322_3_8t",
152  "0t",
153  "071212_2t",
154  "071212_3t",
155  "071212_3_5t",
156  "090322_3_8t",
157  "071212_4t"),
158  label = cms.untracked.string(''),
159  )
160