CMS 3D CMS Logo

volumeBasedMagneticField_160812_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
4 # This cfi contains everything needed to use the VolumeBased magnetic
5 # field engine version 160812
6 
7 magfield = cms.ESSource("XMLIdealGeometryESSource",
8  geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/normal/cmsextent.xml',
9  'Geometry/CMSCommonData/data/cms.xml',
10  'Geometry/CMSCommonData/data/cmsMagneticField.xml',
11  'MagneticField/GeomBuilder/data/MagneticFieldVolumes_160812_1.xml',
12  'MagneticField/GeomBuilder/data/MagneticFieldVolumes_160812_2.xml',
13  'Geometry/CMSCommonData/data/materials.xml'),
14  rootNodeName = cms.string('cmsMagneticField:MAGF')
15 )
16 
17 # avoid interference with EmptyESSource in uniformMagneticField.cfi
18 es_prefer_magfield = cms.ESPrefer("XMLIdealGeometryESSource","magfield")
19 
20 
21 ParametrizedMagneticFieldProducer = cms.ESProducer("ParametrizedMagneticFieldProducer",
22  version = cms.string('OAE_1103l_071212'),
23  parameters = cms.PSet(
24  BValue = cms.string('3_8T')
25  ),
26  label = cms.untracked.string('parametrizedField')
27 )
28 
29 
30 VolumeBasedMagneticFieldESProducer = cms.ESProducer("VolumeBasedMagneticFieldESProducer",
31  useParametrizedTrackerField = cms.bool(True),
32  label = cms.untracked.string(''),
33  paramLabel = cms.string('parametrizedField'),
34  version = cms.string('grid_160812_3_8t'),
35  geometryVersion = cms.int32(160812),
36  debugBuilder = cms.untracked.bool(False),
37  cacheLastVolume = cms.untracked.bool(True),
38  scalingVolumes = cms.vint32(),
39  scalingFactors = cms.vdouble(),
40 
41 
42  gridFiles = cms.VPSet(
43 # ### Specs for using specific tables for every volume
44 # cms.PSet(
45 # volumes = cms.string('1001-1464,2001-2464'),
46 # sectors = cms.string('0') ,
47 # master = cms.int32(0),
48 # path = cms.string('s[s]/grid.[v].bin'),
49 # ),
50 
51 
52  # Volumes for which specific tables are used for each sector
53  cms.PSet(
54  volumes = cms.string('1001-1010,1012-1027,1030-1033,1036-1041,1044-1049,1052-1057,1060-1063,1066-1071,1074-1077,1080-1097,1102-1129,1138-1402,1415-1416,' +
55  '2001-2010,2012-2027,2030-2033,2036-2041,2044-2049,2052-2057,2060-2063,2066-2071,2074-2077,2080-2097,2102-2129,2138-2402,2415-2416'),
56  sectors = cms.string('0') ,
57  master = cms.int32(0),
58  path = cms.string('s[s]/grid.[v].bin'),
59  ),
60 
61  # Replicate sector 1 for volumes outside any detector
62  cms.PSet(
63  volumes = cms.string('1011,1028-1029,1034-1035,1042-1043,1050-1051,1058-1059,1064-1065,1072-1073,1078-1079,'+ # volumes extending from R~7.6 m to to R=9 m,
64  '1098-1101,1130-1137,' + # Forward volumes, ouside CASTOR/HF
65  '1403-1414,1417-1464,' # Volumes beyond |Z|>17.74
66  '2011,2028-2029,2034-2035,2042-2043,2050-2051,2058-2059,2064-2065,2072-2073,2078-2079,'+
67  '2098-2101,2130-2137,'+
68  '2403-2414,2417-2464'),
69  sectors = cms.string('0'),
70  master = cms.int32(1),
71  path = cms.string('s01/grid.[v].bin'),
72  ),
73  )
74 )
75 
76 
77 ### To set a different nominal map, set the following in your .py:
78 
79 ### 3T
80 #VolumeBasedMagneticFieldESProducer.version = cms.string('grid_160812_3t')
81 #ParametrizedMagneticFieldProducer.parameters.BValue = cms.string('3_0T')
82 
83 ### 3.5T
84 #VolumeBasedMagneticFieldESProducer.version = cms.string('grid_160812_3_5t')
85 #ParametrizedMagneticFieldProducer.parameters.BValue = cms.string('3_5T')
86 
87 
88 ### Run I, 3.8T
89 #VolumeBasedMagneticFieldESProducer.version = cms.string('grid_160812_3_8t_Run1')