/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

MCS.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 '''
00003 This nuwa module adds an MCS geometry to the nominal one.
00004 '''
00005 import os
00006 
00007 # called by nuwa
00008 def configure(argv=None):
00009     '''
00010     Configure the MCS geometry module with (radius, height, angle) or (r,z,phi)
00011 
00012     Each quantity should be a number multiplied to a unit.  Eg:
00013 
00014     200*mm -1*m 240*degree
00015     '''
00016     radius, height, angle = argv
00017     
00018     # turn on / hook in the MCS to the nominal geometry.xml/structure.xml
00019     os.environ['DD_GEOMETRY_EXTRA'] = '<catalogref href="ManualCalibration/geometry.xml#ManualCalibration"/>'
00020     os.environ['DD_STRUCTURE_EXTRA'] = '<catalogref href="ManualCalibration/structure.xml#ManualCalibration"/>'
00021 
00022     # hook in the physical volumes to the AD/GDS.xml file
00023     os.environ['DD_AD_GDS_EE'] = '''
00024 <!ENTITY MCSParameters SYSTEM "../ManualCalibration/parameters.xml">
00025 <!ENTITY MCSPhysVols SYSTEM "../ManualCalibration/physvols.xml">
00026 '''
00027     os.environ['DD_AD_GDS_TOP'] = '&MCSParameters;'
00028     os.environ['DD_AD_GDS_PV'] = '&MCSPhysVols;'
00029 
00030     # set the location parameters which are in the ManualCalibration/parameters.xml file
00031     os.environ['MCS_SOURCE_RADIUS'] = radius
00032     os.environ['MCS_SOURCE_HEIGHT'] = height
00033     os.environ['MCS_SOURCE_ANGLE'] = angle
00034 
00035     return
00036     
00037 
00038 
00039 
00040 
00041 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:56:07 for XmlDetDesc by doxygen 1.7.4