Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:22

0001 #################################################
0002 #
0003 # Please run the script with cmsRun:
0004 # 
0005 # cmsRun displayMFGeom_cfg.py
0006 #
0007 #################################################
0008 
0009 import FWCore.ParameterSet.Config as cms
0010 
0011 process = cms.Process("DISPLAY")
0012 
0013 #process.load("Configuration.StandardSequences.GeometryExtended_cff")
0014 #process.load("Configuration.StandardSequences.MagneticField_38T_cff")
0015 process.load("MagneticField.Engine.volumeBasedMagneticField_160812_cfi")
0016 
0017 MFGeom=True;
0018 
0019 if MFGeom: 
0020  process.XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
0021       geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/normal/cmsextent.xml', 
0022          'Geometry/CMSCommonData/data/cms.xml', 
0023          'Geometry/CMSCommonData/data/cmsMagneticField.xml',
0024 #         'MagneticField/GeomBuilder/data/test.xml',
0025           # for 090322 and older
0026 #         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_1103l.xml',
0027 
0028 
0029           # for 160812
0030         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_160812_1.xml',
0031         'MagneticField/GeomBuilder/data/MagneticFieldVolumes_160812_2.xml',
0032 
0033         'Geometry/CMSCommonData/data/materials.xml'),
0034       rootNodeName = cms.string('cmsMagneticField:MAGF')
0035  ) 
0036 else : 
0037  process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
0038 
0039 
0040 
0041 process.maxEvents = cms.untracked.PSet(
0042     input = cms.untracked.int32(1)
0043     )
0044 
0045 
0046 process.source = cms.Source("EmptySource")
0047 
0048 process.EveService = cms.Service("EveService")
0049 
0050 ### Extractor of geometry needed to display it in Eve.
0051 ### Required for "DummyEvelyser".
0052 process.add_( cms.ESProducer(
0053         "TGeoMgrFromDdd",
0054         verbose = cms.untracked.bool(False),
0055         level   = cms.untracked.int32(8)
0056 ))
0057 
0058 #Z_SECTION=-165  #S3 chimney
0059 #Z_SECTION=165   #S4 chimney
0060 #Z_SECTION=760  #YE1
0061 #Z_SECTION=880  #YE2
0062 #Z_SECTION=979  #YE3
0063 #Z_SECTION=1069 #YE4 edge
0064 #Z_SECTION=1072 #YE4
0065 #Z_SECTION=-1519.4957 #CASTOR
0066 
0067 #Z_SECTION=1434 #?
0068 #Z_SECTION=1548 #?
0069 
0070 
0071 
0072 
0073 process.dump = cms.EDAnalyzer("DisplayGeom",                              
0074 #    process.dump.level   = cms.untracked.int32(2),
0075     MF   = cms.untracked.int32(MFGeom),            #Display the MF geometry instead of detector geometry
0076     MF_component = cms.untracked.string("B"), #Field map: None, B, AbsBZ, AbsBR, AvsBphi, BR, Bphi
0077     MF_pickable = cms.untracked.bool(False),     #Field map: pickable values
0078     
0079 
0080 #Field map on ZY plane @ X=0 (Top-right quarter)
0081 #    MF_plane_d0 = cms.untracked.vdouble(0, 0, 0),
0082 #    MF_plane_d1 = cms.vdouble(0, 0., 2000),
0083 #    MF_plane_d2 = cms.vdouble(0, 900., 0.),
0084 
0085 #Field map on ZY plane @ X=0 (full CMS)
0086     MF_plane_d0 = cms.untracked.vdouble(0, -900, -2400),
0087     MF_plane_d1 = cms.vdouble(0, -900., 2400),
0088     MF_plane_d2 = cms.vdouble(0, 900., -2400.),
0089 
0090 #Field map on XY plane @ Z=0
0091 #    MF_plane_d0 = cms.untracked.vdouble(-900, -900, 0.),
0092 #    MF_plane_d1 = cms.vdouble(-900, 900, 0.),
0093 #    MF_plane_d2 = cms.vdouble(900, -900, 0.),
0094 
0095 #Field map on XY plane @ S3chimney
0096 #    MF_plane_d0 = cms.untracked.vdouble(-900, -900, -165.),
0097 #    MF_plane_d1 = cms.vdouble(-900, 900, -165.),
0098 #    MF_plane_d2 = cms.vdouble(900, -900, -165.),
0099 
0100 #Field map on XY plane @ S11 feet
0101 #    MF_plane_d0 = cms.untracked.vdouble(0, -900, 0),
0102 #    MF_plane_d1 = cms.vdouble(0, 0, 0),
0103 #    MF_plane_d2 = cms.vdouble(900, -900, 0),
0104 
0105 #XY plane @ Z_SECTION
0106 #    MF_plane_d0 = cms.untracked.vdouble(-900, -900, Z_SECTION),
0107 #    MF_plane_d1 = cms.vdouble(-900, 900, Z_SECTION),
0108 #    MF_plane_d2 = cms.vdouble(900, -900, Z_SECTION),
0109 
0110 #CASTOR detail
0111 #    MF_plane_d0 = cms.untracked.vdouble(-200, -200, -1519.49571429),
0112 #    MF_plane_d1 = cms.vdouble(-200, 200, -1519.49571429),
0113 #    MF_plane_d2 = cms.vdouble(200, -200, -1519.49571429),
0114 
0115 
0116     MF_plane_N  = cms.untracked.uint32(1000), #Field map bins
0117 #    MF_plane_N2  = cms.untracked.uint32(500),
0118    
0119     MF_plane_draw_dir =  cms.untracked.int32(False)
0120 )
0121 
0122 process.p = cms.Path(process.dump)
0123