Index: /trunk/source/Doxyfile
===================================================================
--- /trunk/source/Doxyfile	(revision 1273)
+++ /trunk/source/Doxyfile	(revision 1274)
@@ -1,90 +1,595 @@
-# Doxyfile 1.5.7.1
+# Doxyfile 1.6.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
 
 #---------------------------------------------------------------------------
 # Project related configuration options
 #---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
 DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
 PROJECT_NAME           = visualisation
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
 PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
 OUTPUT_DIRECTORY       = /Users/garnier/Work/Geant4-QtDriver/trunk/source/doxygen
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
 CREATE_SUBDIRS         = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
 OUTPUT_LANGUAGE        = French
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
 BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
 REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
 ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
 ALWAYS_DETAILED_SEC    = YES
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
 INLINE_INHERITED_MEMB  = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
 FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
 STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
 STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
 SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
 JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
 QT_AUTOBRIEF           = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
 MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
 INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
 SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
 TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
 ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
 OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
 OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
 OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
 OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses. 
+# With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this tag. 
+# The format is ext=language, where ext is a file extension, and language is one of 
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, 
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat 
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), 
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set
+# FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
 BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
 CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
 SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen to replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
 IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
 DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
 SUBGROUPING            = NO
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
 TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penality. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will rougly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
 SYMBOL_CACHE_SIZE      = 0
+
 #---------------------------------------------------------------------------
 # Build related configuration options
 #---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
 EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
 EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
 EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
 EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
 EXTRACT_LOCAL_METHODS  = YES
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespace are hidden.
+
 EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
 HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
 HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
 HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
 HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
 INTERNAL_DOCS          = YES
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
 CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
 HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
 SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
 INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
 SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
 SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
 SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
 SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
 GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
 GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
 GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
 GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
 ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
 MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
 SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
 SHOW_DIRECTORIES       = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
 SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
 SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
 FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by 
+# doxygen. The layout file controls the global structure of the generated output files 
+# in an output format independent way. The create the layout file that represents 
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a 
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name 
+# of the layout file.
+
 LAYOUT_FILE            = 
+
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
 QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
 WARNINGS               = NO
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
 WARN_IF_UNDOCUMENTED   = NO
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
 WARN_IF_DOC_ERROR      = NO
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
 WARN_NO_PARAMDOC       = NO
-WARN_FORMAT            = "$file:$line: $text "
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
 WARN_LOGFILE           = 
+
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
 INPUT                  = /Users/garnier/Work/Geant4-QtDriver/trunk/source/
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
 INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
 FILE_PATTERNS          = *.cc \
                          *.hh \
@@ -92,166 +597,926 @@
                          *.h \
                          *.icc
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
 RECURSIVE              = YES
-EXCLUDE                =  
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = .svn \
+                         CVS
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
 EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = .svn
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
 EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
 EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
 EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
 EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
 IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
 INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
 FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
 FILTER_SOURCE_FILES    = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to source browsing
 #---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
 SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
 INLINE_SOURCES         = YES
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
 STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
 REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
 REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
 REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
 USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
 VERBATIM_HEADERS       = YES
+
 #---------------------------------------------------------------------------
 # configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
 ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
 COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
 IGNORE_PREFIX          = 
+
 #---------------------------------------------------------------------------
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
 GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
 HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
 HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
 HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
 HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
 HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
 HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
 HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
 GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
 DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
 DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
 GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
 CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
 HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
 GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
 CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
 BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
 TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER 
+# are set, an additional index file will be generated that can be used as input for 
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated 
+# HTML documentation.
+
 GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
 QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
 QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
 QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. 
+# For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
 QHG_LOCATION           = 
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
 DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
 ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to YES, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# Windows users are probably better off using the HTML help feature.
+
 GENERATE_TREEVIEW      = YES
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
 TREEVIEW_WIDTH         = 250
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
 FORMULA_FONTSIZE       = 10
+
+# When the SEARCHENGINE tag is enable doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript 
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) 
+# there is already a search function so this one should typically 
+# be disabled.
+
+SEARCHENGINE           = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
 GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
 LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
 LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
 MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
 COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
 PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
 EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
 LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
 PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
 USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
 LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
 LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to the RTF output
 #---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
 GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
 RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
 COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
 RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
 RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
 RTF_EXTENSIONS_FILE    = 
+
 #---------------------------------------------------------------------------
 # configuration options related to the man page output
 #---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
 GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
 MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
 MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
 MAN_LINKS              = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to the XML output
 #---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
 GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
 XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
 XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
 XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
 XML_PROGRAMLISTING     = YES
+
 #---------------------------------------------------------------------------
 # configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
 GENERATE_AUTOGEN_DEF   = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to the Perl module output
 #---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
 GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
 PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
 PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
 PERLMOD_MAKEVAR_PREFIX = 
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
 ENABLE_PREPROCESSING   = NO
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
 MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
 EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
 SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
 INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
 INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
 PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
 EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
 SKIP_FUNCTION_MACROS   = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
 TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
 GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
 ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
 EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
 PERL_PATH              = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
 CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
 MSCGEN_PATH            = /Applications/_Local/Doxygen.app/Contents/Resources/
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
 HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
 HAVE_DOT               = YES
+
+# By default doxygen will write a font called FreeSans.ttf to the output 
+# directory and reference it in all dot files that doxygen generates. This 
+# font does not include all possible unicode characters however, so when you need 
+# these (or just want a differently looking font) you can specify the font name 
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
 DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
 DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
 DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
 CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
 COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
 GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
 UML_LOOK               = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
 TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
 INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
 INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
 CALL_GRAPH             = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
 CALLER_GRAPH           = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
 GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
 DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif 
+# If left blank png will be used.
+
 DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
 DOT_PATH               = /sw/bin/
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
 DOTFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
 DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
 MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
 DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
 DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
 GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
 DOT_CLEANUP            = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-SEARCHENGINE           = NO
Index: /trunk/source/geometry/magneticfield/include/G4CachedMagneticField.hh
===================================================================
--- /trunk/source/geometry/magneticfield/include/G4CachedMagneticField.hh	(revision 1274)
+++ /trunk/source/geometry/magneticfield/include/G4CachedMagneticField.hh	(revision 1274)
@@ -0,0 +1,83 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $ Id: G4CachedMagneticField.hh,v 1.0 2009/07/20 18:53:00 japost Exp $
+// GEANT4 tag $Name:  $
+//
+//
+// class G4CachedMagneticField
+//
+// Class description:
+//
+// Caches Magnetic Field value, for field whose evaluation is expensive.
+
+// History:
+// - Created. JA, July 20th, 2009.
+// --------------------------------------------------------------------
+
+#ifndef G4CACHED_MAGNETIC_FIELD_DEF
+#define G4CACHED_MAGNETIC_FIELD_DEF
+
+#include "G4Types.hh"
+#include "G4ThreeVector.hh"
+#include "G4MagneticField.hh"
+
+class G4CachedMagneticField : public G4MagneticField
+{
+  public:  // with description
+
+     G4CachedMagneticField(G4MagneticField *, G4double distanceConst);
+     virtual ~G4CachedMagneticField();
+       // Constructor and destructor. No actions.
+
+     G4CachedMagneticField(const G4CachedMagneticField &r);
+     G4CachedMagneticField& operator = (const G4CachedMagneticField &p);
+       // Copy constructor & assignment operator.
+
+     virtual void  GetFieldValue( const G4double Point[4],
+                                        G4double *Bfield ) const;
+     
+     G4double GetConstDistance() const         { return fDistanceConst; } 
+     void     SetConstDistance( G4double dist ){ fDistanceConst= dist;}
+
+     G4int GetCountCalls() const { return fCountCalls; }
+     G4int GetCountEvaluations() const { return fCountEvaluations; } 
+     void  ClearCounts() { fCountCalls = 0; fCountEvaluations=0; }
+     void  ReportStatistics();
+
+  private: 
+     G4MagneticField *fpMagneticField;
+     // When the field is evaluated within this distance it will not change
+     G4double      fDistanceConst;
+     // Caching state
+     mutable G4ThreeVector fLastLocation;
+     mutable G4ThreeVector fLastValue;
+
+  protected:
+     mutable G4int fCountCalls, fCountEvaluations;  
+};
+
+#endif /* G4CACHED_MAGNETIC_FIELD_DEF */
Index: /trunk/source/geometry/magneticfield/include/G4EqEMFieldWithEDM.hh
===================================================================
--- /trunk/source/geometry/magneticfield/include/G4EqEMFieldWithEDM.hh	(revision 1274)
+++ /trunk/source/geometry/magneticfield/include/G4EqEMFieldWithEDM.hh	(revision 1274)
@@ -0,0 +1,91 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: G4EqEMFieldWithEDM.hh,v 1.1 2009/11/04 23:51:42 gum Exp $
+// GEANT4 tag $Name:  $
+//
+//
+// class G4EqEMFieldWithEDM
+//
+// Class description:
+//
+// This is the right-hand side of equation of motion in a combined
+// electric and magnetic field, with spin tracking for both MDM and
+// EDM terms.
+
+// History:
+// - Created. Kevin Lynch, 19.02.2009, based on G4EqEMFieldWithSpin
+// -------------------------------------------------------------------
+
+#ifndef G4EQEMFIELDWITHEDM_hh
+#define G4EQEMFIELDWITHEDM_hh
+
+#include "G4EquationOfMotion.hh"
+
+class G4ElectroMagneticField;
+
+class G4EqEMFieldWithEDM : public G4EquationOfMotion
+{
+  public:  // with description
+
+    G4EqEMFieldWithEDM(G4ElectroMagneticField *emField );
+
+    ~G4EqEMFieldWithEDM();
+  
+    void  SetChargeMomentumMass(G4double particleCharge, // in e+ units
+                                G4double MomentumXc,
+                                G4double mass);
+
+    void EvaluateRhsGivenB(const G4double y[],
+                           const G4double Field[],
+                                 G4double dydx[] ) const;
+      // Given the value of the electromagnetic field, this function 
+      // calculates the value of the derivative dydx.
+
+    inline void SetAnomaly(G4double a) { anomaly = a; }
+    inline G4double GetAnomaly() const { return anomaly; }
+      // set/get magnetic anomaly
+
+    inline void SetEta(G4double n) { eta = n; }
+    inline G4double GetEta() const { return eta; }
+      // set/get EDM eta parameter
+
+  private:
+
+    G4double fElectroMagCof ;
+    G4double fMassCof;
+
+    G4double omegac;
+    G4double anomaly;
+    G4double eta;
+    G4double ParticleCharge;
+    G4double E;
+    G4double gamma;
+    G4double beta;
+
+};
+
+#endif /* G4EQEMFIELDWITHEDM */
Index: /trunk/source/geometry/magneticfield/include/G4MonopoleEq.hh
===================================================================
--- /trunk/source/geometry/magneticfield/include/G4MonopoleEq.hh	(revision 1274)
+++ /trunk/source/geometry/magneticfield/include/G4MonopoleEq.hh	(revision 1274)
@@ -0,0 +1,74 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: G4MonopoleEq.hh,v 1.1 2009/11/17 09:53:03 grichine Exp $
+// GEANT4 tag $Name:  $
+//
+//
+// class G4MonopoleEq
+//
+// Class description:
+//
+// This is the right-hand side of equation of motion 
+// for monopole in a combined
+// electric and magnetic field.
+
+// History:
+// - Created. V.Grichine, 17.11.09
+// -------------------------------------------------------------------
+
+#ifndef G4EQMAGELECTRICFIELD_hh
+#define G4EQMAGELECTRICFIELD_hh
+
+#include "G4EquationOfMotion.hh"
+#include "G4ElectroMagneticField.hh"
+
+class G4MonopoleEq : public G4EquationOfMotion
+{
+  public:  // with description
+
+    G4MonopoleEq(G4ElectroMagneticField *emField )
+      : G4EquationOfMotion( emField ) {;}
+
+    ~G4MonopoleEq() {;} 
+
+    void  SetChargeMomentumMass(G4double particleCharge, // in e+ units
+                                G4double MomentumXc,
+                                G4double mass);
+
+    void EvaluateRhsGivenB(const G4double y[],
+                           const G4double Field[],
+                                 G4double dydx[] ) const;
+      // Given the value of the electromagnetic field, this function 
+      // calculates the value of the derivative dydx.
+
+  private:
+
+    G4double        fElectroMagCof ;
+    G4double        fMassCof;
+};
+
+#endif
Index: /trunk/source/geometry/magneticfield/include/G4NystromRK4.hh
===================================================================
--- /trunk/source/geometry/magneticfield/include/G4NystromRK4.hh	(revision 1274)
+++ /trunk/source/geometry/magneticfield/include/G4NystromRK4.hh	(revision 1274)
@@ -0,0 +1,134 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4NystromRK4.hh,v 1.3 2009/11/12 15:01:36 japost Exp $ 
+// GEANT4 tag $Name:  $
+//
+// class G4NystromRK4
+//
+// Class description:
+//
+// Integrate the equations of the motion of a particle in a magnetic field
+// using 4th Runge-Kutta-Nystrom method with errors estimation 
+// (ATL-SOFT-PUB-2009-01)
+// Current form can be used only for 'pure' magnetic field.
+// Notes: 1) field must be time-independent.
+//        2) time is not integrated
+// 
+// History:
+// - Created: I.Gavrilenko   15.05.2009   (as G4AtlasRK4)
+// - Adaptations:  J. Apostolakis  May-Nov 2009
+// -------------------------------------------------------------------
+
+#ifndef G4NYSTROMRK4_HH
+#define G4NYSTROMRK4_HH
+
+#include "globals.hh"
+#include "G4MagIntegratorStepper.hh"
+#include "G4Mag_EqRhs.hh"
+
+class G4NystromRK4 : public G4MagIntegratorStepper
+{
+  public: 
+    G4NystromRK4(G4Mag_EqRhs *EquationMotion, G4double distanceConstField=0.0); 
+      // Can be used only for Magnetic Fields - and for 6 variables (x,p)
+
+    ~G4NystromRK4() ;
+
+    void Stepper(const G4double P   [],
+	         const G4double dPdS[],
+	               G4double step  ,
+	               G4double Po  [],
+	               G4double Err []);
+      // Single call for integration result and error
+      // - Provides Error via analytical method
+
+    virtual void ComputeRightHandSide(const double P[],double dPdS[]);   
+      // Must compute RHS - and does caches result
+
+    void      SetDistanceForConstantField( G4double length ); 
+    G4double  GetDistanceForConstantField() const; 
+   
+    G4int     IntegratorOrder() const {return 4;}
+    G4double  DistChord() const; 
+  
+  private:
+
+    inline void getField   (const G4double P[4]);
+
+    ////////////////////////////////////////////////////////////////
+    // Private data
+    ////////////////////////////////////////////////////////////////
+
+    G4Mag_EqRhs*           m_fEq;          
+    G4double      m_lastField[3];
+    G4double      m_fldPosition[4];
+    G4double      m_magdistance ;
+    G4double      m_magdistance2;
+    G4double      m_cof         ;
+    G4double      m_mom         ;
+    G4double      m_imom        ;
+    G4bool        m_cachedMom   ;
+    G4double      m_iPoint   [3];
+    G4double      m_mPoint   [3];
+    G4double      m_fPoint   [3];
+    
+};
+
+/////////////////////////////////////////////////////////////////////////////////
+// Inline methods
+/////////////////////////////////////////////////////////////////////////////////
+inline void  G4NystromRK4::SetDistanceForConstantField( G4double length )
+{
+  m_magdistance=   length;
+  m_magdistance2 = length*length;
+}
+
+inline G4double  G4NystromRK4::GetDistanceForConstantField() const
+{
+  return m_magdistance; 
+}
+
+/////////////////////////////////////////////////////////////////////////////////
+// Get value of magnetic field while checking distance from last stored call
+/////////////////////////////////////////////////////////////////////////////////
+
+inline void G4NystromRK4::getField (const G4double P[4])
+{
+  
+  G4double dx = P[0]-m_fldPosition[0];
+  G4double dy = P[1]-m_fldPosition[1];
+  G4double dz = P[2]-m_fldPosition[2];
+
+  if((dx*dx+dy*dy+dz*dz) > m_magdistance2) {
+
+    m_fldPosition[0] = P[0];
+    m_fldPosition[1] = P[1];
+    m_fldPosition[2] = P[2];
+    m_fldPosition[3] = P[3];   //  Generally it is P[7] - changed convention !!
+    m_fEq->GetFieldValue(m_fldPosition, m_lastField);
+  }
+}
+#endif  // G4NYSTROMRK4
Index: /trunk/source/geometry/magneticfield/src/G4CachedMagneticField.cc
===================================================================
--- /trunk/source/geometry/magneticfield/src/G4CachedMagneticField.cc	(revision 1274)
+++ /trunk/source/geometry/magneticfield/src/G4CachedMagneticField.cc	(revision 1274)
@@ -0,0 +1,99 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: G4CachedMagneticField.cc,v 1.1 2009/11/05 11:06:13 japost Exp $
+// GEANT4 tag $Name:  $
+//
+// --------------------------------------------------------------------
+
+#include "G4CachedMagneticField.hh"
+
+G4CachedMagneticField::G4CachedMagneticField(G4MagneticField *pMagField, 
+					     G4double         distance)
+  : G4MagneticField(), 
+    fLastLocation(DBL_MAX,DBL_MAX,DBL_MAX),
+    fLastValue(DBL_MAX,DBL_MAX,DBL_MAX),
+    fCountCalls(0),  fCountEvaluations(0)
+{
+  fpMagneticField=     pMagField;
+  fDistanceConst= distance;
+
+  // G4cout << " Cached-B-Field constructor> Distance = " << distance << G4endl;
+  this->ClearCounts(); 
+}
+
+G4CachedMagneticField::~G4CachedMagneticField()
+{
+}
+
+void
+G4CachedMagneticField::ReportStatistics()
+{
+  G4cout << " Cached field: " << this << G4endl
+	 << "   Number of calls:        " << fCountCalls << G4endl
+	 << "   Number of evaluations : " << fCountEvaluations << G4endl;                     
+}
+
+G4CachedMagneticField::G4CachedMagneticField(const G4CachedMagneticField &rightCMF)
+  : G4MagneticField()
+{
+  fpMagneticField=      rightCMF.fpMagneticField;
+  fDistanceConst = rightCMF.fDistanceConst;
+  fLastLocation  = rightCMF.fLastLocation;
+  fLastValue     = rightCMF.fLastValue;
+  this->ClearCounts(); 
+}
+
+G4CachedMagneticField& G4CachedMagneticField::operator = (const G4CachedMagneticField &p)
+{
+  if (&p == this) return *this; *this = p; return *this;
+}
+
+void
+G4CachedMagneticField::GetFieldValue( const G4double Point[4],
+                                            G4double *Bfield ) const
+{
+  G4ThreeVector newLocation( Point[0], Point[1], Point[2] );
+
+  // G4cout << "Cache-B-field called at " << newLocation << G4endl;
+
+  G4double      distSq= (newLocation-fLastLocation).mag2();
+  fCountCalls++;
+  if( distSq < fDistanceConst*fDistanceConst ) { 
+     Bfield[0] = fLastValue.x();
+     Bfield[1] = fLastValue.y();
+     Bfield[2] = fLastValue.z();
+  }else{
+     // G4CachedMagneticField* thisNonC= const_cast<G4CachedMagneticField*>(this);
+     fpMagneticField->GetFieldValue( Point, Bfield );
+     // G4cout << " Evaluating. " << G4endl;
+     fCountEvaluations++;
+     // thisNonC->
+     fLastLocation= G4ThreeVector( Point[0],  Point[1],  Point[2] );
+     // thisNonC->
+     fLastValue=    G4ThreeVector( Bfield[0], Bfield[1], Bfield[2] );
+  }
+}
Index: /trunk/source/geometry/magneticfield/src/G4EqEMFieldWithEDM.cc
===================================================================
--- /trunk/source/geometry/magneticfield/src/G4EqEMFieldWithEDM.cc	(revision 1274)
+++ /trunk/source/geometry/magneticfield/src/G4EqEMFieldWithEDM.cc	(revision 1274)
@@ -0,0 +1,163 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: G4EqEMFieldWithEDM.cc,v 1.2 2009/11/06 22:31:54 gum Exp $
+// GEANT4 tag $Name:  $
+//
+//
+//  This is the standard right-hand side for equation of motion.
+//
+//  19.02.2009 Kevin Lynch, based on G4EqEMFieldWithSpin
+//  06.11.2009 Hiromi Iinuma see:
+//  http://hypernews.slac.stanford.edu/HyperNews/geant4/get/emfields/161.html
+//
+// -------------------------------------------------------------------
+
+#include "G4EqEMFieldWithEDM.hh"
+#include "G4ElectroMagneticField.hh"
+#include "G4ThreeVector.hh"
+#include "globals.hh"
+
+G4EqEMFieldWithEDM::G4EqEMFieldWithEDM(G4ElectroMagneticField *emField )
+      : G4EquationOfMotion( emField )
+{
+  anomaly = 0.0011659208;
+  eta = 0.;
+}
+
+G4EqEMFieldWithEDM::~G4EqEMFieldWithEDM()
+{
+} 
+
+void  
+G4EqEMFieldWithEDM::SetChargeMomentumMass(G4double particleCharge, // e+ units
+                                            G4double MomentumXc,
+                                            G4double particleMass)
+{
+   fElectroMagCof =  eplus*particleCharge*c_light ;
+   fMassCof = particleMass*particleMass ;
+
+   omegac = 0.105658387*GeV/particleMass * 2.837374841e-3*(rad/cm/kilogauss);
+
+   ParticleCharge = particleCharge;
+
+   E = std::sqrt(sqr(MomentumXc)+sqr(particleMass));
+   beta  = MomentumXc/E;
+   gamma = E/particleMass;
+
+}
+
+void
+G4EqEMFieldWithEDM::EvaluateRhsGivenB(const G4double y[],
+                                       const G4double Field[],
+                                             G4double dydx[] ) const
+{
+
+   // Components of y:
+   //    0-2 dr/ds,
+   //    3-5 dp/ds - momentum derivatives
+   //    9-11 dSpin/ds = (1/beta) dSpin/dt - spin derivatives
+
+   // The BMT equation, following J.D.Jackson, Classical
+   // Electrodynamics, Second Edition, with additions for EDM
+   // evolution from 
+   // M.Nowakowski, et.al. Eur.J.Phys.26, pp 545-560, (2005)
+   // or
+   // Silenko, Phys.Rev.ST Accel.Beams 9:034003, (2006)
+
+   // dS/dt = (e/m) S \cross 
+   // MDM:         [ (g/2-1 +1/\gamma) B
+   //               -(g/2-1)\gamma/(\gamma+1) (\beta \cdot B)\beta 
+   //               -(g/2-\gamma/(\gamma+1) \beta \cross E 
+   //
+   // EDM:        eta/2( E - gamma/(gamma+1) \beta (\beta \cdot E)
+   //                    + \beta \cross B ) ]
+   //
+   // where
+   // S = \vec{s}, where S^2 = 1
+   // B = \vec{B}
+   // \beta = \vec{\beta} = \beta \vec{u} with u^2 = 1
+   // E = \vec{E}
+
+   G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ;
+
+   G4double Energy   = std::sqrt( pSquared + fMassCof );
+   G4double cof2     = Energy/c_light ;
+
+   G4double pModuleInverse  = 1.0/std::sqrt(pSquared) ;
+
+   G4double inverse_velocity = Energy * pModuleInverse / c_light;
+
+   G4double cof1     = fElectroMagCof*pModuleInverse ;
+
+   dydx[0] = y[3]*pModuleInverse ;                         
+   dydx[1] = y[4]*pModuleInverse ;                         
+   dydx[2] = y[5]*pModuleInverse ;                        
+
+   dydx[3] = cof1*(cof2*Field[3] + (y[4]*Field[2] - y[5]*Field[1])) ;
+   
+   dydx[4] = cof1*(cof2*Field[4] + (y[5]*Field[0] - y[3]*Field[2])) ; 
+ 
+   dydx[5] = cof1*(cof2*Field[5] + (y[3]*Field[1] - y[4]*Field[0])) ;  
+   
+   dydx[6] = dydx[8] = 0.;//not used
+
+   // Lab Time of flight
+   dydx[7] = inverse_velocity;
+   
+   G4ThreeVector BField(Field[0],Field[1],Field[2]);
+   G4ThreeVector EField(Field[3],Field[4],Field[5]);
+
+   EField /= c_light;
+
+   G4ThreeVector u(y[3], y[4], y[5]);
+   u *= pModuleInverse;
+
+   G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
+   G4double ucb = (anomaly+1./gamma)/beta;
+   G4double uce = anomaly + 1./(gamma+1.);
+   G4double ude = beta*gamma/(1.+gamma)*(EField*u);
+
+   G4ThreeVector Spin(y[9],y[10],y[11]);
+
+   G4ThreeVector dSpin
+     = ParticleCharge*omegac*( ucb*(Spin.cross(BField))-udb*(Spin.cross(u))
+                               // from Jackson
+                               // -uce*Spin.cross(u.cross(EField)) )
+                               // but this form has one less operation
+                               - uce*(u*(Spin*EField) - EField*(Spin*u))
+                               +eta/2.*(Spin.cross(EField) - ude*(Spin.cross(u))
+                                        // +Spin.cross(u.cross(Bfield))
+				        + (u*(Spin*BField) - BField*(Spin*u))
+                                       )
+                             );
+			      
+   dydx[ 9] = dSpin.x();
+   dydx[10] = dSpin.y();
+   dydx[11] = dSpin.z();
+
+   return ;
+}
Index: /trunk/source/geometry/magneticfield/src/G4MonopoleEq.cc
===================================================================
--- /trunk/source/geometry/magneticfield/src/G4MonopoleEq.cc	(revision 1274)
+++ /trunk/source/geometry/magneticfield/src/G4MonopoleEq.cc	(revision 1274)
@@ -0,0 +1,99 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: G4MonopoleEq.cc,v 1.1 2009/11/17 09:53:03 grichine Exp $
+// GEANT4 tag $Name:  $
+//
+//
+//  This is the standard right-hand side for equation of motion.
+//
+//  d(p_c)/ds=g{c-energyB_ - p_c x E}/pc
+//
+//  The only case another is required is when using a moving reference
+//  frame ... or extending the class to include additional Forces,
+//  eg an electric field
+//
+//  17.11.09   V.Grichine
+//
+// -------------------------------------------------------------------
+
+#include "G4MonopoleEq.hh"
+#include "globals.hh"
+
+void  
+G4MonopoleEq::SetChargeMomentumMass(G4double particleCharge, // e+ units
+		                            G4double,
+                                            G4double particleMass)
+{
+  fElectroMagCof =  eplus*particleCharge;  // no *c_light as for ususal q
+  fElectroMagCof /= 2*fine_structure_const;
+
+  fMassCof = particleMass*particleMass ; 
+}
+
+
+
+void
+G4MonopoleEq::EvaluateRhsGivenB(const G4double y[],
+			                const G4double Field[],
+				              G4double dydx[] ) const
+{
+
+   // Components of y:
+   //    0-2 dr/ds, 
+   //    3-5 dpc/ds - momentum derivatives 
+
+   G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ;
+
+   G4double Energy   = std::sqrt( pSquared + fMassCof );
+   G4double cof2     = Energy*c_light ;
+
+   G4double pModuleInverse  = 1.0/std::sqrt(pSquared) ;
+
+   //  G4double inverse_velocity = Energy * c_light * pModuleInverse;
+   G4double inverse_velocity = Energy * pModuleInverse / c_light;
+
+   G4double cof1     = fElectroMagCof*pModuleInverse ;
+
+   //  G4double vDotE = y[3]*Field[3] + y[4]*Field[4] + y[5]*Field[5] ;
+
+
+   dydx[0] = y[3]*pModuleInverse ;                         
+   dydx[1] = y[4]*pModuleInverse ;                         
+   dydx[2] = y[5]*pModuleInverse ;                        
+
+   dydx[3] = cof1*(cof2*Field[0] - (y[4]*Field[5] - y[5]*Field[4])) ;
+   
+   dydx[4] = cof1*(cof2*Field[1] - (y[5]*Field[3] - y[3]*Field[5])) ; 
+ 
+   dydx[5] = cof1*(cof2*Field[2] - (y[3]*Field[4] - y[4]*Field[3])) ;  
+
+   dydx[6] = 0.;//not used
+
+   // Lab Time of flight
+   dydx[7] = inverse_velocity;
+   return ;
+}
Index: /trunk/source/geometry/magneticfield/src/G4NystromRK4.cc
===================================================================
--- /trunk/source/geometry/magneticfield/src/G4NystromRK4.cc	(revision 1274)
+++ /trunk/source/geometry/magneticfield/src/G4NystromRK4.cc	(revision 1274)
@@ -0,0 +1,209 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: G4NystromRK4.cc,v 1.6 2009/12/16 17:49:57 gunter Exp $
+// GEANT4 tag $Name:  $
+//
+// History:
+// - Created:      I.Gavrilenko    15.05.2009   (as G4AtlasRK4)
+// - Adaptations:  J. Apostolakis  May-Nov 2009
+// -------------------------------------------------------------------
+
+#include "G4NystromRK4.hh"
+#include <iostream>
+
+//////////////////////////////////////////////////////////////////
+// Constructor - with optional distance ( has default value)
+//////////////////////////////////////////////////////////////////
+
+G4NystromRK4::G4NystromRK4(G4Mag_EqRhs* magEqRhs, G4double distanceConstField)
+  : G4MagIntegratorStepper(magEqRhs, 6),            // number of variables
+    m_fEq( magEqRhs ),
+    m_magdistance( distanceConstField ),
+    m_cof( 0.0 ),
+    m_mom( 0.0 ),
+    m_imom( 0.0 ),
+    m_cachedMom( false )
+{
+  m_fldPosition[0]  = m_iPoint[1] = m_fPoint[2] = 9.9999999e+99 ;
+  m_fldPosition[1]  = m_iPoint[1] = m_fPoint[2] = 9.9999999e+99 ;
+  m_fldPosition[2]  = m_iPoint[1] = m_fPoint[2] = 9.9999999e+99 ;
+  m_fldPosition[3]  = -9.9999999e+99;
+
+  m_magdistance2 = distanceConstField*distanceConstField;
+}
+
+////////////////////////////////////////////////////////////////
+// Destructor
+////////////////////////////////////////////////////////////////
+
+G4NystromRK4::~G4NystromRK4()
+{
+}
+
+/////////////////////////////////////////////////////////////////////////////////
+// Integration in one  step 
+/////////////////////////////////////////////////////////////////////////////////
+
+void 
+G4NystromRK4::Stepper
+(const G4double P[],const G4double dPdS[],G4double Step,G4double Po[],G4double Err[])
+{
+  G4double R[3] = {   P[0],   P[1] ,    P[2]};
+  G4double A[3] = {dPdS[0], dPdS[1], dPdS[2]};
+
+  m_iPoint[0]=R[0]; m_iPoint[1]=R[1]; m_iPoint[2]=R[2];
+
+  const G4double one_sixth= 1./6.;
+  G4double S  =     Step   ;
+  G4double S5 =  .5*Step   ;
+  G4double S4 = .25*Step   ;
+  G4double S6 =     Step * one_sixth;   // Step / 6.;
+
+
+  // John A  added, in order to emulate effect of call to changed/derived RHS
+  // m_mom   = sqrt(P[3]*P[3]+P[4]*P[4]+P[5]*P[5]); 
+  // m_imom  = 1./m_mom;
+  // m_cof   = m_fEq->FCof()*m_imom;
+
+  // Point 1
+  //
+  G4double K1[3] = { m_imom*dPdS[3], m_imom*dPdS[4], m_imom*dPdS[5] };
+  
+  // Point2
+  //
+  G4double p[4] = {R[0]+S5*(A[0]+S4*K1[0]),
+		   R[1]+S5*(A[1]+S4*K1[1]),
+		   R[2]+S5*(A[2]+S4*K1[2]),
+		   P[7]                   }; 
+  getField(p);
+
+  G4double A2[3] = {A[0]+S5*K1[0],A[1]+S5*K1[1],A[2]+S5*K1[2]};
+  G4double K2[3] = {(A2[1]*m_lastField[2]-A2[2]*m_lastField[1])*m_cof,
+		    (A2[2]*m_lastField[0]-A2[0]*m_lastField[2])*m_cof,
+		    (A2[0]*m_lastField[1]-A2[1]*m_lastField[0])*m_cof};
+ 
+  m_mPoint[0]=p[0]; m_mPoint[1]=p[1]; m_mPoint[2]=p[2];
+
+  // Point 3 with the same magnetic field
+  //
+  G4double A3[3] = {A[0]+S5*K2[0],A[1]+S5*K2[1],A[2]+S5*K2[2]};
+  G4double K3[3] = {(A3[1]*m_lastField[2]-A3[2]*m_lastField[1])*m_cof,
+		    (A3[2]*m_lastField[0]-A3[0]*m_lastField[2])*m_cof,
+		    (A3[0]*m_lastField[1]-A3[1]*m_lastField[0])*m_cof};
+  
+  // Point 4
+  //
+  p[0] = R[0]+S*(A[0]+S5*K3[0]);
+  p[1] = R[1]+S*(A[1]+S5*K3[1]);
+  p[2] = R[2]+S*(A[2]+S5*K3[2]);             
+
+  getField(p);
+  
+  G4double A4[3] = {A[0]+S*K3[0],A[1]+S*K3[1],A[2]+S*K3[2]};
+  G4double K4[3] = {(A4[1]*m_lastField[2]-A4[2]*m_lastField[1])*m_cof,
+		    (A4[2]*m_lastField[0]-A4[0]*m_lastField[2])*m_cof,
+		    (A4[0]*m_lastField[1]-A4[1]*m_lastField[0])*m_cof};
+  
+  // New position
+  //
+  Po[0] = P[0]+S*(A[0]+S6*(K1[0]+K2[0]+K3[0]));
+  Po[1] = P[1]+S*(A[1]+S6*(K1[1]+K2[1]+K3[1]));
+  Po[2] = P[2]+S*(A[2]+S6*(K1[2]+K2[2]+K3[2]));
+
+  m_fPoint[0]=Po[0]; m_fPoint[1]=Po[1]; m_fPoint[2]=Po[2];
+
+  // New direction
+  //
+  Po[3] = A[0]+S6*(K1[0]+K4[0]+2.*(K2[0]+K3[0]));
+  Po[4] = A[1]+S6*(K1[1]+K4[1]+2.*(K2[1]+K3[1]));
+  Po[5] = A[2]+S6*(K1[2]+K4[2]+2.*(K2[2]+K3[2]));
+
+  // Errors
+  //
+  Err[3] = S*std::fabs(K1[0]-K2[0]-K3[0]+K4[0]);
+  Err[4] = S*std::fabs(K1[1]-K2[1]-K3[1]+K4[1]);
+  Err[5] = S*std::fabs(K1[2]-K2[2]-K3[2]+K4[2]);
+  Err[0] = S*Err[3]                       ;
+  Err[1] = S*Err[4]                       ;
+  Err[2] = S*Err[5]                       ;
+  Err[3]*= m_mom                          ;
+  Err[4]*= m_mom                          ;
+  Err[5]*= m_mom                          ;
+
+  // Normalize momentum
+  //
+  G4double normF = m_mom/std::sqrt(Po[3]*Po[3]+Po[4]*Po[4]+Po[5]*Po[5]);
+  Po [3]*=normF; Po[4]*=normF; Po[5]*=normF; 
+
+  // Pass Energy, time unchanged -- time is not integrated !!
+  Po[6]=P[6]; Po[7]=P[7];
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////
+// Estimate the maximum distance from the curve to the chord
+/////////////////////////////////////////////////////////////////////////////////
+
+G4double 
+G4NystromRK4::DistChord() const 
+{
+  G4double ax = m_fPoint[0]-m_iPoint[0];  
+  G4double ay = m_fPoint[1]-m_iPoint[1];  
+  G4double az = m_fPoint[2]-m_iPoint[2];
+  G4double dx = m_mPoint[0]-m_iPoint[0]; 
+  G4double dy = m_mPoint[1]-m_iPoint[1]; 
+  G4double dz = m_mPoint[2]-m_iPoint[2];
+  G4double d2 = (ax*ax+ay*ay+az*az)    ; 
+
+  if(d2!=0.) {
+    G4double  s = (ax*dx+ay*dy+az*dz)/d2;
+    dx         -= (s*ax)                ;
+    dy         -= (s*ay)                ;
+    dz         -= (s*az)                ;
+  }
+  return std::sqrt(dx*dx+dy*dy+dz*dz);
+}
+
+/////////////////////////////////////////////////////////////////////////////////
+// Derivatives calculation - caching the momentum value
+/////////////////////////////////////////////////////////////////////////////////
+
+void 
+G4NystromRK4::ComputeRightHandSide(const G4double P[],G4double dPdS[])
+{
+  getField(P);
+  m_mom   = std::sqrt(P[3]*P[3]+P[4]*P[4]+P[5]*P[5])     ; 
+  m_imom  = 1./m_mom                                ;
+  m_cof   = m_fEq->FCof()*m_imom                    ;
+  m_cachedMom = true                                ; // Caching the value
+  dPdS[0] = P[3]*m_imom                             ; // dx /ds
+  dPdS[1] = P[4]*m_imom                             ; // dy /ds
+  dPdS[2] = P[5]*m_imom                             ; // dz /ds
+  dPdS[3] = m_cof*(P[4]*m_lastField[2]-P[5]*m_lastField[1]) ; // dPx/ds
+  dPdS[4] = m_cof*(P[5]*m_lastField[0]-P[3]*m_lastField[2]) ; // dPy/ds
+  dPdS[5] = m_cof*(P[3]*m_lastField[1]-P[4]*m_lastField[0]) ; // dPz/ds
+}
Index: /trunk/source/graphics_reps/test/BuildCalorimeter.hh
===================================================================
--- /trunk/source/graphics_reps/test/BuildCalorimeter.hh	(revision 1274)
+++ /trunk/source/graphics_reps/test/BuildCalorimeter.hh	(revision 1274)
@@ -0,0 +1,124 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: BuildCalorimeter.hh,v 1.4 2006/06/29 19:07:35 gunter Exp $
+// GEANT4 tag $Name:  $
+//
+#ifndef BUILDCALORIMETER_HH
+#define BUILDCALORIMETER_HH
+
+#include "G4PVPlacement.hh"
+#include "G4LogicalVolume.hh"
+#include "G4Box.hh"
+#include "G4Tubs.hh"
+#include "G4Material.hh"
+#include "G4VisAttributes.hh"
+
+G4VPhysicalVolume* BuildCalorimeter()
+{
+    G4double offset=22.5,xTlate,yTlate;
+    G4int i,j,copyNo;
+    G4double z = 13.;
+    G4double a = 26.98*g/mole;
+    G4double density = 2.7*g/cm3;
+    G4Material myMaterial("Aluminium", z, a, density);
+
+    G4VisAttributes* red   = new G4VisAttributes (G4Colour(1,0,0));
+    G4VisAttributes* green = new G4VisAttributes (G4Colour(0,1,0));
+    G4VisAttributes* blue  = new G4VisAttributes (G4Colour(0,0,1));
+
+    G4Box *myWorldBox= new G4Box ("WBox",10000,10000,10000);
+    G4Box *myCalBox = new G4Box ("CBox",1500,1500,1000);
+//    G4Tubs *myTargetTube = new G4Tubs ("TTube",0,22.5,1000,0,360);
+    G4Tubs *myTargetTube = new G4Tubs ("TTube",0,22.5,100,0,360);
+
+    G4LogicalVolume *myWorldLog=new G4LogicalVolume(myWorldBox,&myMaterial,
+						    "WLog",0,0,0);
+    G4LogicalVolume *myCalLog=new G4LogicalVolume(myCalBox,&myMaterial,
+						  "CLog",0,0,0);
+    myCalLog -> SetVisAttributes (green);
+    G4LogicalVolume *myTargetLog=new G4LogicalVolume(myTargetTube,&myMaterial,
+						     "TLog",0,0,0);
+    myTargetLog -> SetVisAttributes (blue);
+
+    G4PVPlacement *myWorldPhys=new G4PVPlacement(0,G4ThreeVector(),
+						 "WPhys",
+						 myWorldLog,
+						 0,false,0);
+    G4PVPlacement *myCalPhys=new G4PVPlacement(0,G4ThreeVector(),
+					       "CalPhys",
+					       myCalLog,
+					       myWorldPhys,false,0);
+
+    G4String tName1("TPhys1");	// Allow all target physicals to share
+    // same name (delayed copy)
+    copyNo=0;
+    //for (j=1;j<=25;j++)
+    for (j=1;j<=3;j++)
+      {
+	yTlate=-1000.0-40.0+j*80.0;
+	
+	//for (i=1;i<=50;i++)
+	for (i=1;i<=5;i++)
+	  {
+	    copyNo++;
+	    xTlate=-1000.0-20.0+i*45.0-offset;
+	    G4PVPlacement *myTargetPhys=new G4PVPlacement(0,G4ThreeVector(xTlate,yTlate,0),
+							  tName1,
+							  myTargetLog,
+							  myCalPhys,
+							  false,
+							  copyNo);
+	  }
+      }
+
+    G4String tName2("TPhys2");	// Allow all target physicals to share
+				// same name (delayed copy)
+    copyNo=0;
+    //for (j=1;j<=26;j++)
+    for (j=1;j<=4;j++)
+      {
+	yTlate=-1000.0-80.0+j*80.0;
+	//for (i=1;i<=50;i++)
+	for (i=1;i<=5;i++)
+	  {
+	    copyNo++;
+	    xTlate=-1000.0-20.0+i*45.0;
+	    G4PVPlacement *myTargetPhys=new G4PVPlacement(0,G4ThreeVector(xTlate,yTlate,0),
+							  tName2,
+							  myTargetLog,
+							  myCalPhys,
+							  false,
+							  copyNo);
+	  }
+      }
+
+    return myWorldPhys;
+}
+#endif
+
+
+
Index: /trunk/source/graphics_reps/test/test1.cc
===================================================================
--- /trunk/source/graphics_reps/test/test1.cc	(revision 1274)
+++ /trunk/source/graphics_reps/test/test1.cc	(revision 1274)
@@ -0,0 +1,51 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: test1.cc,v 1.5 2006/06/29 19:07:37 gunter Exp $
+// GEANT4 tag $Name:  $
+//
+// 
+// John Allison  19th July 1996
+
+// Simply tests linkability of kernel without visualization.
+
+#include "G4ios.hh"
+#include <cmath>
+
+#include "BuildCalorimeter.hh"
+#include "G4VPhysicalVolume.hh"
+#include "G4GeometryManager.hh"
+
+#include "g4templates.hh"
+
+main () {
+
+  // Build some geometry and get relevant pointers.
+  G4VPhysicalVolume *pWorld = BuildCalorimeter ();
+  G4GeometryManager::GetInstance () -> CloseGeometry ();
+
+  return 0;
+}
Index: /trunk/source/graphics_reps/test/testG4Polyhedron.cc
===================================================================
--- /trunk/source/graphics_reps/test/testG4Polyhedron.cc	(revision 1274)
+++ /trunk/source/graphics_reps/test/testG4Polyhedron.cc	(revision 1274)
@@ -0,0 +1,255 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: testG4Polyhedron.cc,v 1.4 2006/06/29 19:07:40 gunter Exp $
+// GEANT4 tag $Name:  $
+//
+// 
+
+// Create polyhedron for different shapes
+
+#include "G4ios.hh"
+#include "G4Polyhedron.hh"
+
+int main() {
+
+  G4Polyhedron polyhedron;
+
+//   B O X
+
+  G4cout << "=== G4PolyhedronBox" << G4endl;
+  polyhedron = G4PolyhedronBox(100., 200., 400.);
+
+//   T R D 1
+
+  G4cout << "=== G4PolyhedronTrd1" << G4endl;
+  polyhedron = G4PolyhedronTrd1(100., 150., 200., 400.);
+
+//   T R D 2
+
+  G4cout << "=== G4PolyhedronTrd2" << G4endl;
+  polyhedron = G4PolyhedronTrd2(2., 3., 4., 5., 6.);
+
+//   P A R A
+
+  G4cout << "=== G4PolyhedronPara" << G4endl;
+  polyhedron = G4PolyhedronPara(100., 200., 400., 15.*deg, 30.*deg, 30.*deg);
+
+//   T R A P
+
+  G4cout << "=== G4PolyhedronTrap" << G4endl;
+  polyhedron = G4PolyhedronTrap(390., 0.*deg, 0.*deg,
+				60., 40., 90., 15.*deg,
+				120., 80., 180., 15.*deg);
+
+//   T U B E
+
+  G4cout << "=== G4PolyhedronTube" << G4endl;
+  polyhedron = G4PolyhedronTube(100., 200., 400.);
+
+  G4cout << "=== G4PolyhedronTube(Rmin = 0)" << G4endl;
+  polyhedron = G4PolyhedronTube(0., 200., 400.);
+
+//   T U B S
+
+  G4cout << "=== G4PolyhedronTubs" << G4endl;
+  polyhedron = G4PolyhedronTubs(0., 200., 400., 200.*deg, 140.*deg);
+
+  G4cout << "=== G4PolyhedronTubs(Rmin = 0, Dphi=180)" << G4endl;
+  polyhedron = G4PolyhedronTubs(0., 200., 400., 200.*deg, 180.*deg);
+
+//   C O N E
+
+  G4cout << "=== G4PolyhedronCone" << G4endl;
+  polyhedron = G4PolyhedronCone(50., 100., 150., 200., 400.);
+
+  G4cout << "=== G4PolyhedronCone(Rmin1 = Rmin2 = 0)" << G4endl;
+  polyhedron = G4PolyhedronCone(0., 100., 0., 200., 400.);
+
+  G4cout << "=== G4PolyhedronCone(Rmin1 = Rmax1 = 0)" << G4endl;
+  polyhedron = G4PolyhedronCone(0., 0., 150., 200., 400.);
+
+  G4cout << "=== G4PolyhedronCone(Rmin1 = Rmax1)" << G4endl;
+  polyhedron = G4PolyhedronCone(100., 100., 150., 200., 400.);
+
+  G4cout << "=== G4PolyhedronCone(Rmin2 = Rmax2 = 0.)" << G4endl;
+  polyhedron = G4PolyhedronCone(50., 100., 0., 0., 400.);
+
+  G4cout << "=== G4PolyhedronCone(Rmin2 = Rmax2)" << G4endl;
+  polyhedron = G4PolyhedronCone(50., 100., 200., 200., 400.);
+
+//   C O N S
+
+  G4cout << "=== G4PolyhedronCons" << G4endl;
+  polyhedron = G4PolyhedronCons(50.,100.,150.,200.,400.,200.*deg,140.*deg);
+
+  G4cout << "=== G4PolyhedronCons(Rmin1 = Rmin2 = 0)" << G4endl;
+  polyhedron = G4PolyhedronCons(0.,100.,0.,200.,400.,200.*deg,140.*deg);
+
+  G4cout << "=== G4PolyhedronCons(Rmin1 = Rmin2 = 0, Dphi=180)" << G4endl;
+  polyhedron = G4PolyhedronCons(0.,100.,0.,200.,400.,200.*deg,180.*deg);
+
+  G4cout << "=== G4PolyhedronCons(Rmin1 = Rmax1 = 0)" << G4endl;
+  polyhedron = G4PolyhedronCons(0.,0.,150.,200.,400.,200.*deg,180.*deg);
+
+  G4cout << "=== G4PolyhedronCons(Rmin1 = Rmax1)" << G4endl;
+  polyhedron = G4PolyhedronCons(100.,100.,150.,200.,400.,200.*deg,180.*deg);
+
+  G4cout << "=== G4PolyhedronCons(Rmin2 = Rmax2 = 0.)" << G4endl;
+  polyhedron = G4PolyhedronCons(50.,100.,0.,0.,400.,200.*deg,180.*deg);
+
+  G4cout << "=== G4PolyhedronCons(Rmin2 = Rmax2)" << G4endl;
+  polyhedron = G4PolyhedronCons(50.,100.,200.,200.,400.,200.*deg,180.*deg);
+
+//   S P H E R E
+
+  G4cout << "=== G4PolyhedronSphere" << G4endl;
+  polyhedron = G4PolyhedronSphere(100.,200.,0.*deg,360.*deg,0.*deg,180.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Rmin=0)" << G4endl;
+  polyhedron = G4PolyhedronSphere(0.,200.,0.*deg,360.*deg,0.*deg,180.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Dphi=180)" << G4endl;
+  polyhedron = G4PolyhedronSphere(100.,200.,0.*deg,180.*deg,0.*deg,180.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Rmin=0, Dphi=180)" << G4endl;
+  polyhedron = G4PolyhedronSphere(0.,200.,5.*deg,180.*deg,0.*deg,180.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Dthe=0-90)" << G4endl;
+  polyhedron = G4PolyhedronSphere(100.,200.,0.*deg,360.*deg,0.*deg,90.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Rmin=0, Dthe=0-90)" << G4endl;
+  polyhedron = G4PolyhedronSphere(0.,200.,5.*deg,360.*deg,0.*deg,90.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Dthe=90-180)" << G4endl;
+  polyhedron = G4PolyhedronSphere(100.,200.,0.*deg,360.*deg,90.*deg,90.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Rmin=0, Dthe=90-180)" << G4endl;
+  polyhedron = G4PolyhedronSphere(0.,200.,5.*deg,360.*deg,90.*deg,90.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Dphi=180, Dthe=0-90)" << G4endl;
+  polyhedron = G4PolyhedronSphere(100.,200.,5.*deg,180.*deg,0.*deg,90.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Rmin=0, Dphi=180, Dthe=0-900)" << G4endl;
+  polyhedron = G4PolyhedronSphere(0.,200.,5.*deg,180.*deg,0.*deg,90.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Dphi=180, Dthe=90-180)" << G4endl;
+  polyhedron = G4PolyhedronSphere(100.,200.,5.*deg,180.*deg,90.*deg,90.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Rmin=0, Dphi=180, Dthe=90-180)" << G4endl;
+  polyhedron = G4PolyhedronSphere(0.,200.,5.*deg,180.*deg,90.*deg,90.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Dphi=45-135, Dthe=45-135)" << G4endl;
+  polyhedron = G4PolyhedronSphere(100.,200.,45.*deg,90.*deg,45.*deg,90.*deg);
+
+  G4cout << "=== G4PolyhedronSphere(Rmin=0, Dphi=30-120, Dthe=30-120)" << G4endl;
+  polyhedron = G4PolyhedronSphere(0.,200.,30.*deg,90.*deg,30.*deg,90.*deg);
+
+//   T O R U S
+
+  G4cout << "=== G4PolyhedronTorus" << G4endl;
+  polyhedron = G4PolyhedronTorus(100.,200.,400.,0.*deg,360.*deg);
+  
+  G4cout << "=== G4PolyhedronTorus(Rmin=0)" << G4endl;
+  polyhedron = G4PolyhedronTorus(0.,200.,400.,0.*deg,360.*deg);
+  
+  G4cout << "=== G4PolyhedronTorus(Dphi=180)" << G4endl;
+  polyhedron = G4PolyhedronTorus(100.,200.,400.,5.*deg,180.*deg);
+  
+  G4cout << "=== G4PolyhedronTorus(Rmin=0, Dphi=180)" << G4endl;
+  polyhedron = G4PolyhedronTorus(0.,200.,400.,5.*deg,180.*deg);
+  
+//   P G O N
+
+  G4cout << "=== G4PolyhedronPgon(Nz=4)" << G4endl;
+  G4double rmax01[4] = {  150.,  200., 200., 150.};
+  G4double rmin01[4] = {   50.,  100., 100.,  50.};
+  G4double z01[4]    = { -200., -100., 100., 200.};
+  polyhedron = G4PolyhedronPgon(5.*deg, 45.*deg, 2, 4, z01, rmin01, rmax01);
+
+  G4cout << "=== G4PolyhedronPgon(Nz=4, N=1)" << G4endl;
+  polyhedron = G4PolyhedronPgon(5.*deg, 45.*deg, 1, 4, z01, rmin01, rmax01);
+
+  G4cout << "=== G4PolyhedronPgon(Nz=4, Rmin=Rmax)" << G4endl;
+  G4double rmax02[4] = {  150.,  200., 200., 150.};
+  G4double rmin02[4] = {  150.,  100., 100., 150.};
+  G4double z02[4]    = { -200., -100., 100., 200.};
+  polyhedron = G4PolyhedronPgon(5.*deg, 45.*deg, 2, 4, z02, rmin02, rmax02);
+
+  G4cout << "=== G4PolyhedronPgon(Nz=4, N=1, Rmin=Rmax)" << G4endl;
+  polyhedron = G4PolyhedronPgon(5.*deg, 45.*deg, 1, 4, z02, rmin02, rmax02);
+
+  G4cout << "=== G4PolyhedronPgon(Nz=4, Rmin=Rmax=0)" << G4endl;
+  G4double rmax03[4] = {  0.,  200., 200., 0.};
+  G4double rmin03[4] = {  0.,  100., 100., 0.};
+  G4double z03[4]    = { -200., -100., 100., 200.};
+  polyhedron = G4PolyhedronPgon(5.*deg, 45.*deg, 2, 4, z03, rmin03, rmax03);
+
+  G4cout << "=== G4PolyhedronPgon(Nz=4, N=1, Rmin=Rmax=0)" << G4endl;
+  polyhedron = G4PolyhedronPgon(5.*deg, 45.*deg, 1, 4, z03, rmin03, rmax03);
+
+  G4cout << "=== G4PolyhedronPgon(Nz=4, Rmin=100)" << G4endl;
+  G4double rmax04[4] = {  150.,  200., 200., 150.};
+  G4double rmin04[4] = {  100.,  100., 100., 100.};
+  G4double z04[4]    = { -200., -100., 100., 200.};
+  polyhedron = G4PolyhedronPgon(5.*deg, 120.*deg, 6, 4, z04, rmin04, rmax04);
+
+  G4cout << "=== G4PolyhedronPgon(Nz=4, Rmin=0, Dphi=180)" << G4endl;
+  G4double rmax05[4] = {  150.,  200., 200., 150.};
+  G4double rmin05[4] = {    0.,    0.,   0.,   0.};
+  G4double z05[4]    = { -200., -100., 100., 200.};
+  polyhedron = G4PolyhedronPgon(5.*deg, 180.*deg, 6, 4, z05, rmin05, rmax05);
+
+  G4cout << "=== G4PolyhedronPgon(Nz=3, Rmin=Rmax)" << G4endl;
+  G4double rmax06[3] = {  100.,  200., 200.};
+  G4double rmin06[3] = {  100.,  100., 100.};
+  G4double z06[3]    = { -200., -100., 100.};
+  polyhedron = G4PolyhedronPgon(5.*deg, 120.*deg, 6, 3, z06, rmin06, rmax06);
+
+//   P C O N
+
+  G4cout << "=== G4PolyhedronPcon(Nz=4)" << G4endl;
+  polyhedron = G4PolyhedronPcon(5.*deg, 45.*deg, 4, z01, rmin01, rmax01);
+
+  G4cout << "=== G4PolyhedronPcon(Nz=4, Rmin=Rmax)" << G4endl;
+  polyhedron = G4PolyhedronPcon(5.*deg, 45.*deg, 4, z02, rmin02, rmax02);
+
+  G4cout << "=== G4PolyhedronPcon(NZ=4, Rmin=Rmax=0)" << G4endl;
+  polyhedron = G4PolyhedronPcon(5.*deg, 45.*deg, 4, z03, rmin03, rmax03);
+
+  G4cout << "=== G4PolyhedronPcon(Nz=4, Rmin=100)" << G4endl;
+  polyhedron = G4PolyhedronPcon(5.*deg, 120.*deg, 4, z04, rmin04, rmax04);
+
+  G4cout << "=== G4PolyhedronPcon(Nz=4, Rmin=0, Dphi=180)" << G4endl;
+  polyhedron = G4PolyhedronPcon(5.*deg, 180.*deg, 4, z05, rmin05, rmax05);
+
+  G4cout << "=== G4PolyhedronPcon(Nz=3, Rmin=Rmax)" << G4endl;
+  polyhedron = G4PolyhedronPcon(5.*deg, 120.*deg, 3, z06, rmin06, rmax06);
+
+  return 0;
+}
+     
+      
Index: /trunk/source/interfaces/History
===================================================================
--- /trunk/source/interfaces/History	(revision 1273)
+++ /trunk/source/interfaces/History	(revision 1274)
@@ -1,3 +1,3 @@
-$Id: History,v 1.133 2010/05/20 07:01:03 lgarnier Exp $
+$Id: History,v 1.135 2010/05/26 14:27:14 lgarnier Exp $
 -------------------------------------------------------------------
 
@@ -21,5 +21,5 @@
  - G4UIQt: Fix some compil errors with qt3
 
-20 May, L. Garnier
+20 May, L. Garnier (interfaces-V09-03-02)
  Co-working tag : intercoms-V09-03-01
  - G4UIQt: Add some changes in order to register UI in order to access
Index: /trunk/source/interfaces/XVT/include/G4UIxvt.hh
===================================================================
--- /trunk/source/interfaces/XVT/include/G4UIxvt.hh	(revision 1274)
+++ /trunk/source/interfaces/XVT/include/G4UIxvt.hh	(revision 1274)
@@ -0,0 +1,236 @@
+//
+// ********************************************************************
+// * DISCLAIMER                                                       *
+// *                                                                  *
+// * The following disclaimer summarizes all the specific disclaimers *
+// * of contributors to this software. The specific disclaimers,which *
+// * govern, are listed with their locations in:                      *
+// *   http://cern.ch/geant4/license                                  *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.                                                             *
+// *                                                                  *
+// * This  code  implementation is the  intellectual property  of the *
+// * GEANT4 collaboration.                                            *
+// * By copying,  distributing  or modifying the Program (or any work *
+// * based  on  the Program)  you indicate  your  acceptance of  this *
+// * statement, and all its terms.                                    *
+// ********************************************************************
+//
+//
+// $Id: G4UIxvt.hh,v 1.5 2003/06/16 16:55:53 gunter Exp $
+// GEANT4 tag $Name:  $
+//
+////////////////////////////////////////////////////////////////////////
+//                     XVT driver class header                        //
+//                     ~~~~~~~~~~~~~~~~~~~~~~~                        //
+// Written by: Simon Prior                                            //
+//       Date: 22/04/97                                               //
+//                                                                    //
+// Updated for state machine: 12/08/97                                //
+//                                                                    //
+////////////////////////////////////////////////////////////////////////
+#ifndef G4UIxvt_h
+#define G4UIxvt_h
+
+#if defined(G4UI_BUILD_XVT_SESSION) || defined(G4UI_USE_XVT)
+
+////////////////////////////////////////////////////////////////////////
+// define the named pipe names                                        //
+////////////////////////////////////////////////////////////////////////
+
+#define XvtToGeant "XvtToGeant.tmp"  
+#define GeantToXvt "GeantToXvt.tmp"
+
+
+////////////////////////////////////////////////////////////////////////
+// mode for opening a named pipe                                      //
+////////////////////////////////////////////////////////////////////////
+
+#define FILE_MODE (0664 | S_IFIFO)    
+
+
+////////////////////////////////////////////////////////////////////////
+// If compiling using AFS different libraries required                //
+////////////////////////////////////////////////////////////////////////
+
+#ifdef _AIX              
+#include <sys/mode.h>    // mkfifo utils 
+#endif
+
+#include <unistd.h>      // POSIX standards for stdin, out, err.
+//#include <values.h>
+#include <sys/stat.h>    // mkfifo utils for HP 
+#include <fcntl.h>       // Open, Close, Unlink etc 
+#include <sys/ioctl.h>
+#include <stdio.h>       // sscanf, sprinf 
+
+#ifndef FIONREAD
+#include <sys/filio.h>   // FIONREAD defines
+#endif
+
+////////////////////////////////////////////////////////////////////////
+// Geant4 specific includes                                           //
+////////////////////////////////////////////////////////////////////////
+
+#include "G4UIsession.hh"
+#include "G4UImanager.hh"
+#include "G4UIcommandTree.hh"
+
+
+////////////////////////////////////////////////////////////////////////
+// State machine Geant4 includes                                      //
+////////////////////////////////////////////////////////////////////////
+
+#include "G4VStateDependent.hh"
+#include <fstream>
+
+
+////////////////////////////////////////////////////////////////////////
+// New data structures, one to hold the parameter information of a    //
+// command and one to hold information on the command itself.         //
+////////////////////////////////////////////////////////////////////////
+
+typedef struct G4parameterData
+{
+  G4String name;
+  G4String guidance;
+  G4String defaultValue;
+  G4String range;
+  G4String candidate;
+  char     type;
+  G4String omittable; 
+} G4parameterData;
+
+typedef struct G4commandData
+{
+  int flag;
+  G4String name;
+  G4String guidance;
+  int numOfParameters;
+  G4parameterData parameters[10];
+  
+//  G4String bitmapName;
+
+  int commandNumber;
+} G4commandData;
+
+
+class G4UIxvt : public G4UIsession//, public G4VStateDependent
+{
+  public:
+    G4UIxvt();
+    ~G4UIxvt();
+    
+    ////////////////////////////////////////////////////////////////////
+    // Inherited virtual functions                                    //
+    ////////////////////////////////////////////////////////////////////
+
+//    void SessionStart(void);    
+G4UIsession*  SessionStart(void);    
+    G4String GetCommand(void);
+    void SessionTerminate(void);
+
+
+    ////////////////////////////////////////////////////////////////////
+    // New state machine methods                                      //
+    ////////////////////////////////////////////////////////////////////
+    
+    G4bool Notify(G4ApplicationState requestedState);
+
+    inline void set_breakPointAt(int id,G4bool flg)
+    { 
+      brktbl[id] = flg; 
+      noBreakFlag = !(brktbl[0]||brktbl[1]||brktbl[2]||brktbl[3]);
+    };
+
+    void set_verbose(void);    
+    
+  private:
+  
+    ////////////////////////////////////////////////////////////////////
+    // Terminal and interface data members (might be taken out as     //   
+    // they are not needed for the XVT GUI)                           //
+    ////////////////////////////////////////////////////////////////////    
+        
+    G4UImanager * UI;          
+
+
+    ////////////////////////////////////////////////////////////////////
+    // New state machine data members                                 //
+    ////////////////////////////////////////////////////////////////////
+    
+    G4bool iExit;
+    G4bool iCont;
+    G4bool brktbl[4];
+    G4bool noBreakFlag;
+    G4bool verboseFlag;
+
+
+    ////////////////////////////////////////////////////////////////////
+    // New state machine methods                                      //
+    ////////////////////////////////////////////////////////////////////
+    
+    void additionalSession(void);    
+    G4bool breakRequested(G4ApplicationState,G4ApplicationState);
+
+
+    ////////////////////////////////////////////////////////////////////
+    // IPC Data Members                                               //
+    ////////////////////////////////////////////////////////////////////
+    
+    int fd_XvtToGeant, fd_GeantToXvt; 
+    char textDump[100];  
+    int number;   
+
+
+    ////////////////////////////////////////////////////////////////////
+    // IPC methods                                                    //
+    ////////////////////////////////////////////////////////////////////
+    
+    void openConnections(void);
+    int checkXvtToGeantPipe(void);
+    G4String readXvtToGeant(void);
+    void writeGeantToXvt(const G4String& theString); 
+
+
+    ////////////////////////////////////////////////////////////////////
+    // Terminal and TCL methods updated for use with XVT              //
+    ////////////////////////////////////////////////////////////////////
+    
+    void codeGen(G4UIcommandTree *,int recursive_level);                           
+    void listCurrentDirectory(void);
+
+    
+    ////////////////////////////////////////////////////////////////////
+    // Command handling data members                                  //
+    ////////////////////////////////////////////////////////////////////
+    
+    G4commandData commandArray[200];
+    int currentPosition, lastPosition;
+
+
+    ////////////////////////////////////////////////////////////////////
+    // Command handling methods                                       //
+    ////////////////////////////////////////////////////////////////////
+    
+    void fillArrayEntries(G4UIcommandTree * tree, int level);
+    void sendArrayEntriesToXvt(void);
+    void briefListCommands(void);
+
+        
+    ////////////////////////////////////////////////////////////////////
+    // Debugging methods                                              //
+    ////////////////////////////////////////////////////////////////////
+    void listCommandArray(void);
+    void errorHandler(const G4String& theError);
+
+
+};
+
+#endif
+
+#endif
Index: /trunk/source/interfaces/XVT/include/G4UIxvtMessenger.hh
===================================================================
--- /trunk/source/interfaces/XVT/include/G4UIxvtMessenger.hh	(revision 1274)
+++ /trunk/source/interfaces/XVT/include/G4UIxvtMessenger.hh	(revision 1274)
@@ -0,0 +1,57 @@
+//
+// ********************************************************************
+// * DISCLAIMER                                                       *
+// *                                                                  *
+// * The following disclaimer summarizes all the specific disclaimers *
+// * of contributors to this software. The specific disclaimers,which *
+// * govern, are listed with their locations in:                      *
+// *   http://cern.ch/geant4/license                                  *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.                                                             *
+// *                                                                  *
+// * This  code  implementation is the  intellectual property  of the *
+// * GEANT4 collaboration.                                            *
+// * By copying,  distributing  or modifying the Program (or any work *
+// * based  on  the Program)  you indicate  your  acceptance of  this *
+// * statement, and all its terms.                                    *
+// ********************************************************************
+//
+//
+// $Id: G4UIxvtMessenger.hh,v 1.4 2001/07/11 10:01:19 gunter Exp $
+// GEANT4 tag $Name:  $
+//
+//////////////////////////////////////////////////////////////////////////////
+//                                                                          //
+// The original code (written by Makoto Asai) has been adapted for use      //
+// with the XVT Geant GUI                                                   //
+//                                                                          //
+// By: Simon Prior 11/08/97                                                 //
+//                                                                          //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef G4UIxvtMessenger_h
+#define G4UIxvtMessenger_h 1
+
+#if defined(G4UI_BUILD_XVT_SESSION) || defined(G4UI_USE_XVT)
+
+#include "G4UImessenger.hh"
+#include "G4UImanager.hh"
+
+class G4UIxvt;
+
+class G4UIxvtMessenger : public G4UImessenger 
+{
+  public:
+      G4UIxvtMessenger(G4UIxvt*);
+      void SetNewValue(G4UIcommand * command,G4String newValue);
+  private:
+      G4UIxvt* xvtptr;
+};
+
+#endif
+
+#endif
+
Index: /trunk/source/interfaces/XVT/src/G4UIxvt.cc
===================================================================
--- /trunk/source/interfaces/XVT/src/G4UIxvt.cc	(revision 1274)
+++ /trunk/source/interfaces/XVT/src/G4UIxvt.cc	(revision 1274)
@@ -0,0 +1,819 @@
+//
+// ********************************************************************
+// * DISCLAIMER                                                       *
+// *                                                                  *
+// * The following disclaimer summarizes all the specific disclaimers *
+// * of contributors to this software. The specific disclaimers,which *
+// * govern, are listed with their locations in:                      *
+// *   http://cern.ch/geant4/license                                  *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.                                                             *
+// *                                                                  *
+// * This  code  implementation is the  intellectual property  of the *
+// * GEANT4 collaboration.                                            *
+// * By copying,  distributing  or modifying the Program (or any work *
+// * based  on  the Program)  you indicate  your  acceptance of  this *
+// * statement, and all its terms.                                    *
+// ********************************************************************
+//
+//
+// $Id: G4UIxvt.cc,v 1.5 2002/12/04 22:03:09 asaim Exp $
+// GEANT4 tag $Name:  $
+//
+#ifdef G4UI_BUILD_XVT_SESSION
+
+////////////////////////////////////////////////////////////////////////////
+//                   XVT driver class implementation
+//                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Written by: Simon Prior
+//       Date: 23/04/97
+//
+// Updated for state machine: 12/08/97
+//
+// The update consisted of adding the new state methods and I also deleted
+// a lot of old redundant code (like ChangeDirectory etc which aren't 
+// needed with the XVT GUI).
+//
+////////////////////////////////////////////////////////////////////////////
+#include "G4UIxvt.hh"
+#include "G4StateManager.hh"
+#include "G4UIxvtMessenger.hh"
+
+////////////////////////////////////////////////////////////////////////////
+//                   
+// G4UIxvt - Consructor
+//
+// Initalise the class variables.
+//
+// Note: number is the number of bytes transfered with each read or write.
+//
+////////////////////////////////////////////////////////////////////////////
+G4UIxvt::G4UIxvt()
+{  
+  UI = G4UImanager::GetUIpointer();
+
+  iExit = false;
+  iCont = false;
+  
+  for(int i=0;i<4;i++)
+  { 
+    brktbl[i] = false; 
+  }
+  
+  noBreakFlag = true;
+  verboseFlag = true;
+  new G4UIxvtMessenger(this);
+
+  number = 100;
+  currentPosition = 0;
+  lastPosition = 100;
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//
+// ~G4UIxvt - Destructor
+//
+////////////////////////////////////////////////////////////////////////////
+G4UIxvt::~G4UIxvt()
+{
+
+}
+
+////////////////////////////////////////////////////////////////////////////
+// 
+// Notify
+//
+// Notifies the user of the state changes of the system.
+//
+////////////////////////////////////////////////////////////////////////////
+//G4bool G4UIxvt::Notify(G4ApplicationState requestedState)
+//{
+//  G4StateManager * statM = G4StateManager::GetStateManager();
+//  G4ApplicationState previousState = statM->GetPreviousState();
+//
+//  if(verboseFlag) 
+//  {
+//    writeGeantToXvt("========== STATE CHANGE ===========");
+//    writeGeantToXvt("FROM: " + statM->GetStateString(previousState));
+//    writeGeantToXvt("  TO: " + statM->GetStateString(requestedState));
+//    writeGeantToXvt("===================================");
+//  }
+//
+//  if(requestedState==Pause || breakRequested(previousState,requestedState))
+//  { 
+//    additionalSession(); 
+//  }
+//  
+//  return true;
+//}
+ 
+////////////////////////////////////////////////////////////////////////////
+// 
+// breakRequested
+//
+// Notifies and puts breaks in the Geant4 run.
+//
+////////////////////////////////////////////////////////////////////////////
+G4bool G4UIxvt::breakRequested(G4ApplicationState previousState,
+                                    G4ApplicationState requestedState)
+{
+  if(noBreakFlag) return false;
+
+  G4bool ans = false;
+
+  if(previousState==G4State_Idle && requestedState==G4State_GeomClosed && brktbl[0])
+  { 
+    writeGeantToXvt("====== BREAKPOINT NOTIFICATION ======");
+    writeGeantToXvt("BreakPoint at: BEGIN OF RUN");
+    writeGeantToXvt("Enter 'continue' command to proceed");
+    writeGeantToXvt("=====================================");
+    
+    ans = true;
+  }
+
+  if(previousState==G4State_GeomClosed && requestedState==G4State_EventProc && brktbl[1])
+  { 
+    writeGeantToXvt("====== BREAKPOINT NOTIFICATION ======");
+    writeGeantToXvt("BreakPoint at: BEGIN OF EVENT");
+    writeGeantToXvt("Enter 'continue' command to proceed");
+    writeGeantToXvt("=====================================");
+    
+    ans = true;
+  }
+
+  if(previousState==G4State_EventProc && requestedState==G4State_GeomClosed && brktbl[2])
+  {     
+    writeGeantToXvt("====== BREAKPOINT NOTIFICATION ======");
+    writeGeantToXvt("BreakPoint at: END OF EVENT");
+    writeGeantToXvt("Enter 'continue' command to proceed");
+    writeGeantToXvt("=====================================");
+    
+    ans = true;
+  }
+
+  if(previousState==G4State_GeomClosed && requestedState==G4State_Idle && brktbl[3])
+  { 
+    writeGeantToXvt("====== BREAKPOINT NOTIFICATION ======");
+    writeGeantToXvt("BreakPoint at: END OF RUN");    
+    writeGeantToXvt("Enter 'continue' command to proceed");
+    writeGeantToXvt("=====================================");
+    
+    ans = true;
+  }
+
+  return ans;
+}
+
+////////////////////////////////////////////////////////////////////////////
+//
+// set_verbose
+//
+// Toggles the Verbose state of the GUI concerning the state machine.
+//
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::set_verbose(void)
+{
+  verboseFlag = !verboseFlag;
+  
+  if (verboseFlag)   
+  {
+    writeGeantToXvt("Verbose mode switched ON");
+  }
+  else
+  {
+    writeGeantToXvt("Verbose mode switched OFF");
+  }
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+// 
+// SessionStart
+//
+// Informs user of Geant Kernel starting and does a 'brief' command listing.
+// Update: 12/08/97 - now used as main control of Geant (get command is 
+//         currently called from here NOT from the UIManager.
+//
+////////////////////////////////////////////////////////////////////////////
+//void G4UIxvt::SessionStart(void)
+G4UIsession*  G4UIxvt::SessionStart(void)
+{
+  openConnections();
+  writeGeantToXvt("Connection to Geant open...\0");    
+  
+  G4UImanager * UI = G4UImanager::GetUIpointer();
+  G4UIcommandTree * comTree = UI->GetTree();
+
+  fillArrayEntries(comTree, 0);
+
+  G4cout << " --------- List of Array Entries ---------- " << G4endl;
+
+  listCommandArray();
+  briefListCommands();
+  
+  // --- Enter main program control --- //
+  
+  iExit = true;
+
+  while( iExit )
+  {
+    G4String newCommand = GetCommand();
+    if(newCommand.length()>1) UI->ApplyCommand(newCommand);
+  }    
+  return NULL;
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+// 
+// additionalSession
+//
+// 
+//
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::additionalSession(void)
+{
+  writeGeantToXvt("=== Entering Addtional Session ===");
+  iCont = true;
+  while( iCont )
+  {
+    G4String newCommand = GetCommand();
+    if(newCommand.length()>1) UI->ApplyCommand(newCommand);
+  }
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//
+// SessionTerminate
+//
+// Informs user that Geant has terminated.
+//
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::SessionTerminate(void)
+{
+  writeGeantToXvt("XVT <-> Geant4 terminating...");
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//
+// openConnections                 
+//
+// This method opens the IPC connection.   
+// 
+// Open the named pipes in the current directory using the 
+// appropriate permissions.
+//
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::openConnections(void)
+{          
+  int o_flags;
+  
+  o_flags = O_WRONLY | O_NONBLOCK;
+  
+  if((fd_GeantToXvt = open(GeantToXvt, o_flags)) == -1)
+  {
+    errorHandler("GeantToXvt pipe opening");
+  }
+  
+  o_flags = O_RDONLY | O_NONBLOCK;
+  
+  if((fd_XvtToGeant = open(XvtToGeant, o_flags)) == -1)
+  {
+    errorHandler("XvtToGeant pipe opening"); 
+  } 
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//                   
+// checkXvtToGeantPipe
+//
+// This method checks to see if the XvtToGeant pipe contains anything.
+// Thus meaning it will be readable without blocking.
+//
+// Returns 0 if nothing present, 1 otherwise. 
+// 
+////////////////////////////////////////////////////////////////////////////
+int G4UIxvt::checkXvtToGeantPipe(void)
+{
+  int nbytes;
+  ioctl(fd_XvtToGeant, FIONREAD, &nbytes);
+  
+  if (nbytes > 0)
+    return 1;
+  else
+    return 0;
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//                   
+// readXvtToGeant
+//
+// This method grabs the data in the XvtToGeant named pipe, and 
+// returns it to the caller.
+//
+////////////////////////////////////////////////////////////////////////////
+G4String G4UIxvt::readXvtToGeant(void)
+{
+  int bytes_read = read(fd_XvtToGeant, textDump, number);
+  textDump[bytes_read] = '\0'; 
+  G4String newString = textDump;
+  return newString;
+}
+ 
+ 
+////////////////////////////////////////////////////////////////////////////
+//
+// writeGeantToXvt                 
+//
+// This method writes the passed string to the GeantToXvt named pipe.
+//
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::writeGeantToXvt(const G4String& theString)
+{
+  int write_check = write(fd_GeantToXvt, theString, number);
+    
+  if(write_check == -1)
+    G4cout << "ERROR WITH WRITE!!" << G4endl;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// errorHandler
+//
+// A general purpose error handler.  It can be called by any method.  A string
+// is passed so that this method simply prints a message via G4cout that explains 
+// what the error is.
+//
+///////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::errorHandler(const G4String& theError)
+{
+  G4cout << "Error with " << theError << G4endl;  
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//
+// GetCommand
+//
+// This method is called by SessionStart to get a command from the user.
+//
+// It enters a loop to repeatedly check the Geant end of the named pipe.
+// When something is present in the pipe (sent by XVT GUI) it then grabs it 
+// and returns the string to the caller.
+//
+////////////////////////////////////////////////////////////////////////////
+G4String G4UIxvt::GetCommand()
+{
+  G4String newCommand('\0');
+  G4UImanager * UI = G4UImanager::GetUIpointer();
+  while( 1 )
+  {
+    int Done = 0;
+  
+    while (!Done)
+    {
+      if (checkXvtToGeantPipe())
+      {
+        newCommand = readXvtToGeant();
+        Done = 1;
+      }
+      else
+        ; // Pipe is empty so loop again
+    }
+
+    G4String nC = newCommand;
+    
+    if(nC == "getCommands")
+    {
+      sendArrayEntriesToXvt();
+    }
+    else if( nC == "/control/exit" )
+    { 
+      if( iCont )
+      { 
+        writeGeantToXvt("You are now processing RUN.");
+        writeGeantToXvt("Please abort it using \"/run/abort\" command first");
+        writeGeantToXvt("and use \"continue\" command until the application");
+        writeGeantToXvt("becomes Idle.");        
+      }
+      else
+      {
+        iExit = false;
+        newCommand = "/";
+        break;
+      }
+    }    
+    else if( nC(0,4) == "cont" )
+    { 
+      iCont = false;
+      newCommand = "/";
+      break;
+    }    
+    else
+    { 
+      break; 
+    }
+  }
+
+  if( newCommand(0) != '/' )
+    G4cerr << "IT GOT THERE!!!!" << G4endl;
+    // If you ever see the error message in the output something has gone
+    // wrong.
+
+  return newCommand;
+
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//
+// codeGen
+//
+// Traverses the command tree and retrieves the directories and 
+// subdirectories of available commands.
+// 
+// This does a 'brief' listing, i.e. does not List the guidance or 
+// parameters.
+//
+// I have updated this method from the TCL implementation for XVT.
+// The differences are that G4cout is not used and some string concatenation
+// is Done differently (i.e. not with G4cout).
+//
+// This is still however not really needed and might be deleted.
+// 
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::codeGen(G4UIcommandTree * tree, int level)
+{ 
+  int treeEntry;
+  int commandEntry; 
+  treeEntry = tree->GetTreeEntry();
+  commandEntry = tree->GetCommandEntry();
+  G4String commandPath;
+  G4String pathName; //tree name
+  G4UIcommandTree * t;
+
+  // --- this loop lists the current directory and its commands --- //
+  
+  for(int com=0; com<commandEntry; com++)
+  {
+    commandPath = tree->GetCommand(com+1)->GetCommandPath();
+    if(level==0) 
+    {
+      // This is not normally executed    
+      writeGeantToXvt(commandPath);  // Unsure as to what this does         
+    }
+    else     
+    {      
+      writeGeantToXvt(commandPath + " command");  // this gives the commands
+    }
+  }
+
+  if(treeEntry == 0) 
+    return; //end recursion
+
+  for(int i=0; i< treeEntry; i++)
+  {
+    t = tree->GetTree(i+1);
+    pathName =  t->GetPathName();   
+    if(level == 0) 
+    {
+      writeGeantToXvt(pathName);  // This is the directory name
+    }
+    else
+    {      
+      writeGeantToXvt(pathName + " cascade"); // This is the sub dirs      
+    }
+      
+    codeGen(t, level+1);
+  }
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//
+// briefListCommands
+//
+// This method uses codeGen to traverse the tree and List the commands
+// and directories - it does a brief listing, i.e. no parameters or guidance
+// accompanying the text.
+//
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::briefListCommands(void)
+{
+  writeGeantToXvt("--- Brief List of available commands ---");
+  G4UIcommandTree * comTree = UI->GetTree();
+  codeGen(comTree, 0);
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//
+// ListCurrentDirectory
+//
+// This is the XVT specific implementation of the 'List Current' method
+// from the G4UICommandTree class.
+// 
+// It is almost the same only instead of any couts all the data is written
+// to the named pipe for XVT to process.
+//
+// Although this is entirely XVT specific it may be deleted because it is
+// not really needed. (most directory navigation methods that were so
+// important in the terminal session aren't needed in this XVT GUI
+// implementation.)
+//
+// I have left it here in case similar code is needed in the future - this
+// demonstrates how to access the command tree etc.
+//
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::listCurrentDirectory(void)
+{
+  G4UIcommandTree * comTree = UI->GetTree();
+  G4String path = comTree->GetPathName();
+  
+  writeGeantToXvt("Command Directory Path: " + path);
+
+  // --- Guidance code --- //
+
+  G4UIcommand * tempGuidance = (G4UIcommand *)comTree->GetGuidance();
+ 
+  if (tempGuidance != NULL)
+  {
+    writeGeantToXvt("Command: " + tempGuidance->GetCommandPath());
+    writeGeantToXvt("Guidance: ");
+
+    int n_guidanceEntry = tempGuidance->GetGuidanceEntries();
+
+    for (int i_thGuidance=0; i_thGuidance < n_guidanceEntry; i_thGuidance++ )
+    {
+      writeGeantToXvt(tempGuidance->GetGuidanceLine(i_thGuidance));
+    }
+
+    int n_parameterEntry = tempGuidance->GetParameterEntries();
+  
+    if(n_parameterEntry > 0)
+    {
+      for( int i_thParameter=0; i_thParameter<n_parameterEntry; i_thParameter++ )
+      {
+        G4UIparameter * tempParameter = (G4UIparameter *)tempGuidance->GetParameter(i_thParameter);
+    
+        writeGeantToXvt("Parameter: " + tempParameter->GetParameterName());
+        writeGeantToXvt(tempParameter->GetParameterGuidance());
+        writeGeantToXvt("Parameter type: " + tempParameter->GetParameterType());
+      
+        // --- remember to fix the below bug --- //
+      
+        // writeGeantToXvt("Omittable: " + tempParameter->IsOmittable());
+      
+        writeGeantToXvt("Default Value: " + tempParameter->GetDefaultValue());
+        writeGeantToXvt("Parameter Range: " + tempParameter->GetParameterRange());
+      }
+    }                    
+  }
+  
+  // --- End of Guidance code --- //
+  
+  writeGeantToXvt("Sub Directories: ");
+  
+  int n_treeEntry = comTree->GetTreeEntry();
+  
+  for( int i_thTree = 0; i_thTree < n_treeEntry; i_thTree++ )
+  {
+    G4UIcommandTree * tempTree = comTree->GetTree(i_thTree + 1);    
+    writeGeantToXvt(tempTree->GetPathName() + tempTree->GetTitle());
+  }                     
+  
+  writeGeantToXvt("Commands : ");
+  
+  int n_commandEntry = comTree->GetCommandEntry();
+  
+  for( int i_thCommand = 0; i_thCommand < n_commandEntry; i_thCommand++ )
+  {
+    G4UIcommand * tempCommand = comTree->GetCommand(i_thCommand + 1);    
+    writeGeantToXvt(tempCommand->GetCommandName() + tempCommand->GetTitle());
+  }                     
+}
+
+////////////////////////////////////////////////////////////////////////////
+// Methods for handling the command information                           //
+////////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////
+//
+// sendArrayEntriesToXvt
+//
+// This goes through the commandArray when called and sends all the command
+// information down the named pipe to XVT.
+// 
+// It must first send the control command 'comTree' to alert XVT of the 
+// following commands - XVT can then take action to fill its own 'commandArray'
+// with the ensuing strings passed to it.
+//
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::sendArrayEntriesToXvt(void)
+{
+  writeGeantToXvt("comTree");
+  
+  char theInt[5];
+  sprintf(theInt, "%d", currentPosition);
+  
+  writeGeantToXvt(theInt);
+
+  // --- Output all the Data from the array to the named pipe --- //
+  
+  for (int i = 0; i < currentPosition; i++)
+  {
+    // --- Send flag to XVT --- //
+    sprintf(theInt, "%d",commandArray[i].flag);     
+    writeGeantToXvt(theInt);
+    
+    // --- Send name and guidance --- //
+    writeGeantToXvt(commandArray[i].name);
+    writeGeantToXvt(commandArray[i].guidance);
+    
+    // --- Send number of parameters --- //
+    sprintf(theInt, "%d", commandArray[i].numOfParameters);
+    writeGeantToXvt(theInt);
+    
+    // --- if there are parameters send them next --- //
+    if (commandArray[i].numOfParameters > 0)
+    {
+      for(int x = 0; x < commandArray[i].numOfParameters; x++)
+      {
+        writeGeantToXvt(commandArray[i].parameters[x].name);
+        writeGeantToXvt(commandArray[i].parameters[x].guidance);
+        writeGeantToXvt(commandArray[i].parameters[x].defaultValue);
+        writeGeantToXvt(commandArray[i].parameters[x].range);
+        writeGeantToXvt(commandArray[i].parameters[x].candidate);
+        writeGeantToXvt(commandArray[i].parameters[x].type);
+        writeGeantToXvt(commandArray[i].parameters[x].omittable);      
+      }    
+    }             
+    
+    // --- Send number --- //
+    sprintf(theInt, "%d", commandArray[i].commandNumber);    
+    writeGeantToXvt(theInt);
+  }   
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//
+// fillArrayEntries
+//
+// This traverses the command tree and fills in the command structures in 
+// the class variable 'commandArray'.
+//
+// Note: for flag value:
+//
+//       0 = Directory
+//       1 = command
+//       2 = subdirectory
+// 
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::fillArrayEntries(G4UIcommandTree * tree, int level)
+{
+  int treeEntry;
+  int commandEntry; 
+
+  treeEntry = tree->GetTreeEntry();
+  commandEntry = tree->GetCommandEntry();
+
+  G4String commandPath;
+  G4String pathName; //tree name
+  G4UIcommandTree * t;
+
+  // New variables
+  G4UIcommand * tempCommand;
+  G4UIparameter * tempParameter;
+  
+  // --- this loop lists the current directory and its commands --- //
+  
+  for(int com=0; com<commandEntry; com++)
+  {
+    tempCommand = (G4UIcommand *)tree->GetCommand(com+1);    
+    
+    commandPath = tree->GetCommand(com+1)->GetCommandPath();        
+    if(level==0) 
+    {
+      // --- This code shouldn't ever get executed --- //
+      G4cout << "Printing command Path" << commandPath << G4endl;
+    }
+    else     
+    {
+      commandArray[currentPosition].flag = 1;
+      commandArray[currentPosition].name = commandPath;      
+      commandArray[currentPosition].guidance = tempCommand->GetTitle();      
+      commandArray[currentPosition].numOfParameters = tempCommand->GetParameterEntries();
+            
+      int numParam = tempCommand->GetParameterEntries();
+      
+      if(numParam != 0)
+      {              
+        for(int x = 0; x < numParam; x++)
+        {
+          tempParameter = (G4UIparameter*)tempCommand->GetParameter(x); 
+
+          commandArray[currentPosition].parameters[x].name = tempParameter->GetParameterName();
+          commandArray[currentPosition].parameters[x].guidance = tempParameter->GetParameterGuidance();
+          commandArray[currentPosition].parameters[x].defaultValue = tempParameter->GetDefaultValue();
+          commandArray[currentPosition].parameters[x].range = tempParameter->GetParameterRange();
+          commandArray[currentPosition].parameters[x].candidate = tempParameter->GetParameterCandidate();
+          commandArray[currentPosition].parameters[x].type = tempParameter->GetParameterType();
+//          commandArray[currentPosition].parameters[x].omittable = tempParameter->IsOmittable();
+        }      
+      }
+      
+      commandArray[currentPosition].commandNumber = currentPosition;
+
+      currentPosition = currentPosition + 1;
+    }
+  }
+
+  if(treeEntry == 0) 
+    return; //end recursion
+  
+  G4UIcommand * treeGuidance;  
+  
+  for(int i=0; i< treeEntry; i++)
+  {
+    t = tree->GetTree(i+1);
+    pathName =  t->GetPathName();   
+    
+    treeGuidance = (G4UIcommand *)t->GetGuidance();
+    
+    if(level == 0) 
+    {
+      commandArray[currentPosition].flag = 0;
+      commandArray[currentPosition].name = pathName;
+      commandArray[currentPosition].guidance = treeGuidance->GetTitle();      
+      commandArray[currentPosition].numOfParameters = 0;
+      commandArray[currentPosition].commandNumber = currentPosition;
+
+      currentPosition = currentPosition + 1;
+    }
+    else
+    {      
+      commandArray[currentPosition].flag = 2;
+      commandArray[currentPosition].name = pathName;
+      commandArray[currentPosition].guidance = treeGuidance->GetTitle();      
+      commandArray[currentPosition].numOfParameters = 0;
+      commandArray[currentPosition].commandNumber = currentPosition;
+      
+      currentPosition = currentPosition + 1;
+    }
+      
+    fillArrayEntries(t, level+1);
+  }
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+// A debugging routine                                                    //
+//                                                                        //
+// This method is purely used for debugging purposes - will be deleted    //
+// from the final code (when we are sure it is bug free)                  //
+//                                                                        //
+////////////////////////////////////////////////////////////////////////////
+void G4UIxvt::listCommandArray(void)
+{
+  for(int i = 0; i < currentPosition; i++)
+  {
+    G4cout << "CommandArray, Entry-> " << i << G4endl
+         << "Flag-> " << commandArray[i].flag << G4endl
+         << "Name-> " << commandArray[i].name << G4endl
+         << "Guidance-> " << commandArray[i].guidance << G4endl
+         << "Number of Parameters-> " << commandArray[i].numOfParameters << G4endl;
+         
+         int numParam = commandArray[i].numOfParameters;
+         
+         if (numParam != 0)
+         {
+           for(int x = 0; x < numParam; x++)
+           {
+             G4cout << "Parameters for this command: " << G4endl << G4endl
+                  << "Parameter Name-> "          << commandArray[i].parameters[x].name         << G4endl
+                  << "Parameter Guidance-> "      << commandArray[i].parameters[x].guidance     << G4endl
+                  << "Parameter Default Value-> " << commandArray[i].parameters[x].defaultValue << G4endl
+                  << "Parameter Range-> "         << commandArray[i].parameters[x].range        << G4endl
+                  << "Parameter Candidate-> "     << commandArray[i].parameters[x].candidate    << G4endl
+                  << "Parameter Type-> "          << commandArray[i].parameters[x].type         << G4endl
+                  << "Parameter Omittable-> "     << commandArray[i].parameters[x].omittable    << G4endl 
+                  << G4endl << G4endl;
+           }
+         }
+         
+         G4cout << "Number-> " << commandArray[i].commandNumber << G4endl << G4endl;
+  }
+}
+
+#endif
Index: /trunk/source/interfaces/XVT/src/G4UIxvtMessenger.cc
===================================================================
--- /trunk/source/interfaces/XVT/src/G4UIxvtMessenger.cc	(revision 1274)
+++ /trunk/source/interfaces/XVT/src/G4UIxvtMessenger.cc	(revision 1274)
@@ -0,0 +1,94 @@
+//
+// ********************************************************************
+// * DISCLAIMER                                                       *
+// *                                                                  *
+// * The following disclaimer summarizes all the specific disclaimers *
+// * of contributors to this software. The specific disclaimers,which *
+// * govern, are listed with their locations in:                      *
+// *   http://cern.ch/geant4/license                                  *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.                                                             *
+// *                                                                  *
+// * This  code  implementation is the  intellectual property  of the *
+// * GEANT4 collaboration.                                            *
+// * By copying,  distributing  or modifying the Program (or any work *
+// * based  on  the Program)  you indicate  your  acceptance of  this *
+// * statement, and all its terms.                                    *
+// ********************************************************************
+//
+//
+// $Id: G4UIxvtMessenger.cc,v 1.4 2001/07/11 10:01:19 gunter Exp $
+// GEANT4 tag $Name:  $
+//
+#ifdef G4UI_BUILD_XVT_SESSION
+
+//////////////////////////////////////////////////////////////////////////////
+//                                                                          //
+// The original code (written by Makoto Asai) has been adapted for use      //
+// with the XVT Geant GUI                                                   //
+//                                                                          //
+// By: Simon Prior 11/08/97                                                 //
+//                                                                          //
+//////////////////////////////////////////////////////////////////////////////
+#include "G4UIxvtMessenger.hh"
+#include "G4UIcommand.hh"
+#include "G4UIparameter.hh"
+#include "G4UIxvt.hh"
+#include "G4ios.hh"
+
+
+G4UIxvtMessenger::G4UIxvtMessenger(G4UIxvt* tempxvt)
+:xvtptr(tempxvt)
+{
+  G4UIcommand * command;
+  G4UIparameter * param;
+
+  command = new G4UIcommand("/control/setBreakAt",this);
+  command->SetGuidance("Set a break point at the begining or end of");
+  command->SetGuidance("each run or event.");
+  command->SetGuidance(" Available points :");
+  command->SetGuidance("  beginOfRun, endOfRun, beginOfEvent, EndOfEvent");
+  param = new G4UIparameter("point",'c',false);
+  command->SetParameter(param);
+  AddUIcommand( command );
+
+  command = new G4UIcommand("/control/removeBreakPoint",this);
+  command->SetGuidance("Reset all of assigned break.");
+  AddUIcommand( command );
+
+  command = new G4UIcommand("/control/noticeState",this);
+  command->SetGuidance("Toggle Verbose flag of G4UIxvt for state change.");
+  command->SetGuidance("If it is on, all state change will be displayed.");
+  AddUIcommand( command );
+}
+
+void G4UIxvtMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
+{
+  if(command->GetCommandName()=="setBreakAt")
+  {
+    int id = -1;
+    if(newValue=="beginOfRun") id=0;
+    if(newValue=="beginOfEvent") id=1;
+    if(newValue=="EndOfEvent") id=2;
+    if(newValue=="endOfRun") id=3;
+    if(id<0)
+    { G4cout << "Unknown break point <" << newValue << "> ignored." << G4endl; }
+    else
+    { xvtptr->set_breakPointAt(id,true); }
+  }
+  if(command->GetCommandName()=="removeBreakPoint")
+  {
+    for(int i=0;i<4;i++)
+    { xvtptr->set_breakPointAt(i,false); }
+  }
+  if(command->GetCommandName()=="noticeState")
+  {
+    xvtptr->set_verbose();
+  }
+}
+
+#endif
Index: /trunk/source/interfaces/basic/src/G4UIQt.cc
===================================================================
--- /trunk/source/interfaces/basic/src/G4UIQt.cc	(revision 1273)
+++ /trunk/source/interfaces/basic/src/G4UIQt.cc	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4UIQt.cc,v 1.37 2010/05/20 07:01:03 lgarnier Exp $
+// $Id: G4UIQt.cc,v 1.38 2010/05/26 14:27:14 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: /trunk/source/physics_lists/builders/include/G4IonQMDPhysics.hh
===================================================================
--- /trunk/source/physics_lists/builders/include/G4IonQMDPhysics.hh	(revision 1274)
+++ /trunk/source/physics_lists/builders/include/G4IonQMDPhysics.hh	(revision 1274)
@@ -0,0 +1,111 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4IonQMDPhysics.hh,v 1.1 2009/11/27 17:25:15 gunter Exp $
+// GEANT4 tag $Name: geant4-09-03 $
+//
+//---------------------------------------------------------------------------
+//
+// ClassName:   G4IonBinaryCascadeBuilder
+//   Created from G4IonBinaryCascadePhysics
+//
+// Author:      G.Folger
+//
+// Modified:
+//
+//----------------------------------------------------------------------------
+//
+
+#ifndef G4IonQMDPhysics_h
+#define G4IonQMDPhysics_h 1
+
+#include "globals.hh"
+#include "G4VPhysicsConstructor.hh"
+
+#include "G4LEDeuteronInelastic.hh"
+#include "G4LETritonInelastic.hh"
+#include "G4LEAlphaInelastic.hh"
+
+#include <vector>
+
+class G4HadronInelasticProcess;
+class G4HadronicInteraction;
+class G4BinaryLightIonReaction;
+class G4QMDReaction;
+class G4TripathiLightCrossSection;
+class G4TripathiCrossSection;
+class G4IonsShenCrossSection;
+
+
+class G4IonQMDPhysics : public G4VPhysicsConstructor
+{
+public:
+  G4IonQMDPhysics(const G4String& name="ions", G4int verb = 0);
+  virtual ~G4IonQMDPhysics();
+
+  // This method will be invoked in the Construct() method.
+  // each particle type will be instantiated
+  virtual void ConstructParticle();
+
+  // This method will be invoked in the Construct() method.
+  // each physics process will be instantiated and
+  // registered to the process manager of each particle type
+  virtual void ConstructProcess();
+
+private:
+
+  void AddProcess(const G4String&,
+		  G4ParticleDefinition*, 
+		  G4BinaryLightIonReaction*,
+		  G4QMDReaction*,
+		  G4HadronicInteraction*);
+
+  std::vector<G4HadronInelasticProcess*> p_list;
+  std::vector<G4HadronicInteraction*> model_list;
+
+  G4TripathiCrossSection* fTripathi;
+  G4TripathiLightCrossSection* fTripathiLight;
+  G4IonsShenCrossSection* fShen;
+
+  G4LEDeuteronInelastic*  fLEDModel;
+  G4LETritonInelastic*    fLETModel;
+  G4LEAlphaInelastic*     fLEAModel;
+
+  G4double eminBIC;
+ 
+  G4double eminQMD;
+  G4double emaxQMD;
+
+  G4double emaxLHEP;
+
+  G4double overlap;
+   
+  G4int  verbose;
+  G4bool wasActivated;
+};
+
+
+#endif
+
Index: /trunk/source/physics_lists/builders/include/G4MiscCHIPSBuilder.hh
===================================================================
--- /trunk/source/physics_lists/builders/include/G4MiscCHIPSBuilder.hh	(revision 1274)
+++ /trunk/source/physics_lists/builders/include/G4MiscCHIPSBuilder.hh	(revision 1274)
@@ -0,0 +1,68 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// GEANT4 tag $Name: phys-lists-V09-03-03 $
+//
+//---------------------------------------------------------------------------
+//
+// ClassName:   G4MiscCHIPSBuilder
+//
+// Author: 2010, G.Folger
+//
+// created by modifying G4QInelasticCHIPSBuilder to apply only to MISC particles
+// -----------------------------------------------------------------------------
+#ifndef G4MiscCHIPSBuilder_h
+#define G4MiscCHIPSBuilder_h 1
+
+#include "globals.hh"
+
+#include "G4VPhysicsConstructor.hh"
+#include "G4QInelastic.hh"
+
+#include "G4ParticleDefinition.hh"
+#include "G4ParticleTable.hh"
+#include "G4ProcessManager.hh"
+
+class G4MiscCHIPSBuilder
+{
+ public: 
+  G4MiscCHIPSBuilder(G4int verbose=0);
+  virtual ~G4MiscCHIPSBuilder();
+
+ public: 
+  void Build();
+
+ protected:
+  // the particle table has the complete List of existing particle types
+  G4ParticleTable* theParticleTable;
+  G4ParticleTable::G4PTblDicIterator* theParticleIterator;
+
+ private:
+  G4int  verbose;
+  G4bool wasActivated;
+  G4QInelastic* inelastic;
+};
+
+#endif
Index: /trunk/source/physics_lists/builders/src/G4MiscCHIPSBuilder.cc
===================================================================
--- /trunk/source/physics_lists/builders/src/G4MiscCHIPSBuilder.cc	(revision 1274)
+++ /trunk/source/physics_lists/builders/src/G4MiscCHIPSBuilder.cc	(revision 1274)
@@ -0,0 +1,81 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// GEANT4 tag $Name: phys-lists-V09-03-03 $
+//
+//---------------------------------------------------------------------------
+//
+// ClassName:   G4MiscCHIPSBuilder
+//
+// Author: 2010, G.Folger
+//
+// created by modifying G4QInelasticCHIPSBuilder to apply only to MISC particles
+// -----------------------------------------------------------------------------
+#include "G4MiscCHIPSBuilder.hh"
+
+G4MiscCHIPSBuilder::G4MiscCHIPSBuilder(G4int ver):
+ verbose(ver), wasActivated(false)
+{
+  // pointer to the particle table
+  theParticleTable = G4ParticleTable::GetParticleTable();
+  theParticleIterator = theParticleTable->GetIterator();
+}
+
+G4MiscCHIPSBuilder::~G4MiscCHIPSBuilder()
+{
+  if(wasActivated) delete inelastic;
+}
+
+void G4MiscCHIPSBuilder::Build()
+{
+  if(wasActivated) return;
+
+  wasActivated = true;
+  theParticleIterator->reset();
+  inelastic = new G4QInelastic();
+
+  while( (*theParticleIterator)() )
+  {
+    G4ParticleDefinition* particle = theParticleIterator->value();
+    G4String pname = particle->GetParticleName();
+    if(pname == "kaon-" || pname == "kaon+" || pname == "kaon0S"  ||  pname == "kaon0L" ||
+       pname == "pi-"   || pname == "pi+"   || pname == "neutron" ||  pname == "proton" )
+    {
+      if(verbose>1)G4cout<<"** G4MiscCHIPSBuilder: "<<pname<<" already defined"<<G4endl;
+    }
+    else  if( pname == "lambda"       || pname == "sigma+"       || pname == "sigma0"       ||
+              pname == "sigma-"       || pname == "xi0" || pname == "xi-" || pname == "omega-" ||
+              pname == "anti_proton"  || pname == "anti_neutron" || pname == "anti_lambda"  ||
+              pname == "anti_sigma+"  || pname == "anti_sigma0"  || pname == "anti_sigma-"  ||
+              pname == "anti_xi0"     || pname == "anti_xi-"     || pname == "anti_omega-"  )
+    {
+      if(verbose>1)G4cout<< "__G4QInelCHIPSBuilder: "<< pname <<" is defined here"<<G4endl;
+      G4ProcessManager* pmanager = particle->GetProcessManager();
+      pmanager->AddDiscreteProcess(inelastic);
+      if(verbose>1) G4cout<<"###> G4MiscCHIPSBuilder: "<<inelastic->GetProcessName()
+                          <<" is added for "<<pname<<G4endl;
+    }
+  }
+}
Index: /trunk/source/physics_lists/lists/include/HadronPhysicsQGSP_BERT_CHIPS.hh
===================================================================
--- /trunk/source/physics_lists/lists/include/HadronPhysicsQGSP_BERT_CHIPS.hh	(revision 1274)
+++ /trunk/source/physics_lists/lists/include/HadronPhysicsQGSP_BERT_CHIPS.hh	(revision 1274)
@@ -0,0 +1,104 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: HadronPhysicsQGSP_BERT_CHIPS.hh,v 1.1 2010/05/26 15:06:49 gunter Exp $
+// GEANT4 tag $Name: phys-lists-V09-03-03 $
+//
+//---------------------------------------------------------------------------
+//
+// ClassName:   HadronPhysicsQGSP_BERT_CHIPS
+//
+// Author: 2010 G.Folger
+//   derived from HadronPhysicsQGSP_BERT
+//
+// Modified:
+//
+//----------------------------------------------------------------------------
+//
+#ifndef HadronPhysicsQGSP_BERT_CHIPS_h
+#define HadronPhysicsQGSP_BERT_CHIPS_h 1
+
+#include "globals.hh"
+#include "G4ios.hh"
+
+#include "G4VPhysicsConstructor.hh"
+#include "G4MiscCHIPSBuilder.hh"
+
+#include "G4PiKBuilder.hh"
+#include "G4LEPPiKBuilder.hh"
+#include "G4QGSPPiKBuilder.hh"
+#include "G4BertiniPiKBuilder.hh"
+
+#include "G4ProtonBuilder.hh"
+#include "G4LEPProtonBuilder.hh"
+#include "G4QGSPProtonBuilder.hh"
+#include "G4BertiniProtonBuilder.hh"
+
+#include "G4NeutronBuilder.hh"
+#include "G4LEPNeutronBuilder.hh"
+#include "G4QGSPNeutronBuilder.hh"
+#include "G4BertiniNeutronBuilder.hh"
+
+class HadronPhysicsQGSP_BERT_CHIPS : public G4VPhysicsConstructor
+{
+  public: 
+    HadronPhysicsQGSP_BERT_CHIPS(const G4String& name ="hadron",G4bool quasiElastic=true);
+    virtual ~HadronPhysicsQGSP_BERT_CHIPS();
+
+  public: 
+    virtual void ConstructParticle();
+    virtual void ConstructProcess();
+
+    void SetQuasiElastic(G4bool value) {QuasiElastic = value;}; 
+    void SetProjectileDiffraction(G4bool value) {ProjectileDiffraction = value;}; 
+
+  private:
+    void CreateModels();
+    G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *);
+    
+    G4NeutronBuilder * theNeutrons;
+    G4LEPNeutronBuilder * theLEPNeutron;
+    G4QGSPNeutronBuilder * theQGSPNeutron;
+    G4BertiniNeutronBuilder * theBertiniNeutron;
+    
+    G4PiKBuilder * thePiK;
+    G4LEPPiKBuilder * theLEPPiK;
+    G4QGSPPiKBuilder * theQGSPPiK;
+    G4BertiniPiKBuilder * theBertiniPiK;
+    
+    G4ProtonBuilder * thePro;
+    G4LEPProtonBuilder * theLEPPro;
+    G4QGSPProtonBuilder * theQGSPPro; 
+    G4BertiniProtonBuilder * theBertiniPro;
+    
+    G4MiscCHIPSBuilder * theMiscCHIPS;
+    
+    G4bool QuasiElastic;
+    G4bool ProjectileDiffraction;
+    G4VCrossSectionDataSet * theCHIPSInelastic;
+};
+
+#endif
+
Index: /trunk/source/physics_lists/lists/include/QGSP_BERT_CHIPS.hh
===================================================================
--- /trunk/source/physics_lists/lists/include/QGSP_BERT_CHIPS.hh	(revision 1274)
+++ /trunk/source/physics_lists/lists/include/QGSP_BERT_CHIPS.hh	(revision 1274)
@@ -0,0 +1,67 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: QGSP_BERT_CHIPS.hh,v 1.1 2010/05/26 15:06:49 gunter Exp $
+// GEANT4 tag $Name: phys-lists-V09-03-03 $
+//
+//---------------------------------------------------------------------------
+//
+// ClassName:   QGSP_BERT_CHIPS
+//
+// Author: 2010 G.Folger
+//   derived from QGSP_BERT
+//
+// Modified:
+//
+//----------------------------------------------------------------------------
+//
+#ifndef TQGSP_BERT_CHIPS_h
+#define TQGSP_BERT_CHIPS_h 1
+
+#include "G4VModularPhysicsList.hh"
+#include "globals.hh"
+#include "CompileTimeConstraints.hh"
+
+template<class T>
+class TQGSP_BERT_CHIPS: public T
+{
+public:
+  TQGSP_BERT_CHIPS(G4int ver = 1);
+  virtual ~TQGSP_BERT_CHIPS();
+  
+public:
+  // SetCuts() 
+  virtual void SetCuts();
+
+private:
+  enum {ok = CompileTimeConstraints::IsA<T, G4VModularPhysicsList>::ok };
+};
+
+#include "QGSP_BERT_CHIPS.icc"
+typedef TQGSP_BERT_CHIPS<G4VModularPhysicsList> QGSP_BERT_CHIPS;
+#endif
+
+
+
Index: /trunk/source/physics_lists/lists/include/QGSP_BERT_CHIPS.icc
===================================================================
--- /trunk/source/physics_lists/lists/include/QGSP_BERT_CHIPS.icc	(revision 1274)
+++ /trunk/source/physics_lists/lists/include/QGSP_BERT_CHIPS.icc	(revision 1274)
@@ -0,0 +1,118 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: QGSP_BERT_CHIPS.icc,v 1.1 2010/05/26 15:06:49 gunter Exp $
+// GEANT4 tag $Name: phys-lists-V09-03-03 $
+//
+//---------------------------------------------------------------------------
+//
+// ClassName:   QGSP_BERT_CHIPS
+//
+// Author: 2010 G.Folger
+//   derived from QGSP_BERT
+//
+// Modified:
+//
+//----------------------------------------------------------------------------
+//
+
+#include "globals.hh"
+#include "G4ParticleDefinition.hh"
+#include "G4ParticleWithCuts.hh"
+#include "G4ProcessManager.hh"
+#include "G4ProcessVector.hh"
+#include "G4ParticleTypes.hh"
+#include "G4ParticleTable.hh"
+
+#include "G4Material.hh"
+#include "G4MaterialTable.hh"
+#include "G4ios.hh"
+#include <iomanip>   
+
+#include "G4DecayPhysics.hh"
+#include "G4EmStandardPhysics.hh"
+#include "G4EmExtraPhysics.hh"
+#include "G4IonPhysics.hh"
+#include "G4QStoppingPhysics.hh"
+#include "G4HadronElasticPhysics.hh"
+#include "G4NeutronTrackingCut.hh"
+
+#include "G4DataQuestionaire.hh"
+#include "HadronPhysicsQGSP_BERT_CHIPS.hh"
+
+template<class T> TQGSP_BERT_CHIPS<T>::TQGSP_BERT_CHIPS(G4int ver):  T()
+{
+
+  G4DataQuestionaire it(photon);
+  G4cout << "<<< Geant4 Physics List simulation engine: QGSP_BERT_CHIPS 1.0"<<G4endl;
+  G4cout <<G4endl;
+
+  this->defaultCutValue = 0.7*mm;  
+  this->SetVerboseLevel(ver);
+
+  // EM Physics
+  this->RegisterPhysics( new G4EmStandardPhysics(ver));
+
+  // Synchroton Radiation & GN Physics
+  this->RegisterPhysics( new G4EmExtraPhysics("extra EM"));
+
+  // Decays
+  this->RegisterPhysics( new G4DecayPhysics("decay",ver) );
+
+   // Hadron Elastic scattering
+  this-> RegisterPhysics( new G4HadronElasticPhysics("elastic",ver,false));
+
+  // Hadron Physics
+   G4bool quasiElastic;
+  this->RegisterPhysics( new HadronPhysicsQGSP_BERT_CHIPS("hadron",quasiElastic=true));
+
+  // Stopping Physics
+  this->RegisterPhysics( new G4QStoppingPhysics("stopping"));
+
+  // Ion Physics
+  this->RegisterPhysics( new G4IonPhysics("ion"));
+  
+  // Neutron tracking cut
+  this->RegisterPhysics( new G4NeutronTrackingCut("Neutron tracking cut", ver));
+
+}
+
+template<class T> TQGSP_BERT_CHIPS<T>::~TQGSP_BERT_CHIPS()
+{
+}
+
+template<class T> void TQGSP_BERT_CHIPS<T>::SetCuts()
+{
+  if (this->verboseLevel >1){
+    G4cout << "QGSP_BERT_CHIPS::SetCuts:";
+  }  
+  //  " G4VUserPhysicsList::SetCutsWithDefault" method sets 
+  //   the default cut value for all particle types 
+
+  this->SetCutsWithDefault();   
+  
+//  if (this->verboseLevel >0)
+//    G4VUserPhysicsList::DumpCutValuesTable();  
+}
Index: /trunk/source/physics_lists/lists/src/HadronPhysicsQGSP_BERT_CHIPS.cc
===================================================================
--- /trunk/source/physics_lists/lists/src/HadronPhysicsQGSP_BERT_CHIPS.cc	(revision 1274)
+++ /trunk/source/physics_lists/lists/src/HadronPhysicsQGSP_BERT_CHIPS.cc	(revision 1274)
@@ -0,0 +1,158 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: HadronPhysicsQGSP_BERT_CHIPS.cc,v 1.1 2010/05/26 15:06:49 gunter Exp $
+// GEANT4 tag $Name: phys-lists-V09-03-03 $
+//
+//---------------------------------------------------------------------------
+//
+// ClassName:   HadronPhysicsQGSP_BERT_CHIPS
+//
+// Author: 2010 G.Folger
+//   derived from HadronPhysicsQGSP_BERT
+//
+// Modified:
+//
+//----------------------------------------------------------------------------
+//
+#include "HadronPhysicsQGSP_BERT_CHIPS.hh"
+
+#include "globals.hh"
+#include "G4ios.hh"
+#include <iomanip>   
+#include "G4ParticleDefinition.hh"
+#include "G4ParticleTable.hh"
+#include "G4HadronicProcessType.hh"
+
+#include "G4MesonConstructor.hh"
+#include "G4BaryonConstructor.hh"
+#include "G4ShortLivedConstructor.hh"
+
+#include "G4QHadronInelasticDataSet.hh"
+
+HadronPhysicsQGSP_BERT_CHIPS::HadronPhysicsQGSP_BERT_CHIPS(const G4String& name, G4bool quasiElastic)
+                    :  G4VPhysicsConstructor(name) , QuasiElastic(quasiElastic)
+{
+   ProjectileDiffraction=false;
+}
+
+void HadronPhysicsQGSP_BERT_CHIPS::CreateModels()
+{
+  theNeutrons=new G4NeutronBuilder;
+  theNeutrons->RegisterMe(theQGSPNeutron=new G4QGSPNeutronBuilder(QuasiElastic, ProjectileDiffraction));
+  theNeutrons->RegisterMe(theLEPNeutron=new G4LEPNeutronBuilder);
+  theLEPNeutron->SetMinInelasticEnergy(9.5*GeV);
+  theLEPNeutron->SetMaxInelasticEnergy(25*GeV);  
+
+  theNeutrons->RegisterMe(theBertiniNeutron=new G4BertiniNeutronBuilder);
+  theBertiniNeutron->SetMinEnergy(0.0*GeV);
+  theBertiniNeutron->SetMaxEnergy(9.9*GeV);
+
+  thePro=new G4ProtonBuilder;
+  thePro->RegisterMe(theQGSPPro=new G4QGSPProtonBuilder(QuasiElastic, ProjectileDiffraction));
+  thePro->RegisterMe(theLEPPro=new G4LEPProtonBuilder);
+  theLEPPro->SetMinEnergy(9.5*GeV);
+  theLEPPro->SetMaxEnergy(25*GeV);
+
+  thePro->RegisterMe(theBertiniPro=new G4BertiniProtonBuilder);
+  theBertiniPro->SetMaxEnergy(9.9*GeV);
+  
+  thePiK=new G4PiKBuilder;
+  thePiK->RegisterMe(theQGSPPiK=new G4QGSPPiKBuilder(QuasiElastic));
+  thePiK->RegisterMe(theLEPPiK=new G4LEPPiKBuilder);
+  theLEPPiK->SetMaxEnergy(25*GeV);
+  theLEPPiK->SetMinEnergy(9.5*GeV);
+
+  thePiK->RegisterMe(theBertiniPiK=new G4BertiniPiKBuilder);
+  theBertiniPiK->SetMaxEnergy(9.9*GeV);
+  
+  theMiscCHIPS=new G4MiscCHIPSBuilder;
+}
+
+HadronPhysicsQGSP_BERT_CHIPS::~HadronPhysicsQGSP_BERT_CHIPS()
+{
+   delete theMiscCHIPS;
+   delete theQGSPNeutron;
+   delete theLEPNeutron;
+   delete theBertiniNeutron;
+   delete theQGSPPro;
+   delete theLEPPro;
+   delete thePro;
+   delete theBertiniPro;
+   delete theQGSPPiK;
+   delete theLEPPiK;
+   delete theBertiniPiK;
+   delete thePiK;
+   delete theCHIPSInelastic;
+}
+
+void HadronPhysicsQGSP_BERT_CHIPS::ConstructParticle()
+{
+  G4MesonConstructor pMesonConstructor;
+  pMesonConstructor.ConstructParticle();
+
+  G4BaryonConstructor pBaryonConstructor;
+  pBaryonConstructor.ConstructParticle();
+
+  G4ShortLivedConstructor pShortLivedConstructor;
+  pShortLivedConstructor.ConstructParticle();  
+}
+
+#include "G4ProcessManager.hh"
+void HadronPhysicsQGSP_BERT_CHIPS::ConstructProcess()
+{
+  CreateModels();
+  theNeutrons->Build();
+  thePro->Build();
+  thePiK->Build();
+  // use CHIPS cross sections also for Kaons
+  theCHIPSInelastic = new G4QHadronInelasticDataSet();
+  
+  FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(theCHIPSInelastic);
+  FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(theCHIPSInelastic);
+  FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(theCHIPSInelastic);
+  FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(theCHIPSInelastic);
+
+  theMiscCHIPS->Build();
+}
+
+G4HadronicProcess* 
+HadronPhysicsQGSP_BERT_CHIPS::FindInelasticProcess(const G4ParticleDefinition* p)
+{
+  G4HadronicProcess* had = 0;
+  if(p) {
+     G4ProcessVector*  pvec = p->GetProcessManager()->GetProcessList();
+     size_t n = pvec->size();
+     if(0 < n) {
+       for(size_t i=0; i<n; ++i) {
+	 if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) {
+	   had = static_cast<G4HadronicProcess*>((*pvec)[i]);
+	   break;
+	 }
+       }
+     }
+  }
+  return had;
+}
Index: /trunk/source/physics_lists/test/compile.cc
===================================================================
--- /trunk/source/physics_lists/test/compile.cc	(revision 1274)
+++ /trunk/source/physics_lists/test/compile.cc	(revision 1274)
@@ -0,0 +1,127 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+#include "G4RunManager.hh" 
+
+#include "FTFC.hh"
+#include "FTFP.hh"
+#include "FTFP_BERT.hh"
+#include "FTFP_BERT_TRV.hh"
+
+#include "LBE.hh"
+#include "LHEP_BERT_HP.hh"
+#include "LHEP_BERT.hh"
+#include "LHEP_EMV.hh"
+#include "LHEP.hh"
+#include "LHEP_PRECO_HP.hh"
+
+#include "QBBC.hh"
+
+#include "QGSC_EMV.hh"
+#include "QGSC.hh"
+#include "QGSC_EFLOW.hh"
+#include "QGSC_BERT.hh"
+#include "QGSC_QGSC.hh"
+#include "QGSC_CHIPS.hh"
+#include "CHIPS.hh"
+
+#include "QGSP.hh"
+#include "QGSP_DIF.hh"
+#include "QGSP_BERT_HP.hh"
+#include "QGSP_BERT.hh"
+#include "QGSP_BERT_EMX.hh"
+#include "QGSP_BERT_DIF.hh"
+#include "QGSP_BIC_HP.hh"
+#include "QGSP_BIC.hh"
+#include "G4IonQMDPhysics.hh"
+#include "QGSP_EMV.hh"
+#include "QGSP_EMX.hh"
+#include "QGSP_QEL.hh"
+//#include "QGSP_CASC.hh"
+#include "QGSP_INCL_ABLA.hh"
+
+#include "QGSP_FTFP_BERT.hh"
+
+#include "QGS_BIC.hh"
+#include "FTF_BIC.hh"
+
+#include "CLHEP/Random/RanluxEngine.h" 
+
+int main(int argc,char** argv) { 
+
+  CLHEP::RanluxEngine defaultEngine( 1234567, 4 ); 
+  CLHEP::HepRandom::setTheEngine( &defaultEngine ); 
+  G4RunManager* runManager = new G4RunManager; 
+//  runManager->SetUserInitialization( new StatAccepTestDetectorConstruction ); 
+
+  G4VModularPhysicsList * theFTF1 = new FTFC; 
+  G4VModularPhysicsList * theFTF2 = new FTFP;
+  G4VModularPhysicsList * theFTF3 = new FTFP_BERT;
+  G4VModularPhysicsList * theFTF3a = new FTFP_BERT_TRV;
+
+  G4VModularPhysicsList *theLBE = new LBE; 
+
+  G4VModularPhysicsList *thePL4 = new LHEP_BERT_HP; 
+  G4VModularPhysicsList *thePL5 = new LHEP_BERT; 
+  G4VModularPhysicsList *thePL8 = new LHEP_EMV; 
+  G4VModularPhysicsList *thePL10 = new LHEP; 
+
+  G4VModularPhysicsList *thePL15 = new QBBC;
+
+  G4VModularPhysicsList *thePL16 = new QGSC_EMV;
+  G4VModularPhysicsList *thePL17 = new QGSC;
+//replaced  G4VModularPhysicsList *thePL17a = new QGSC_EFLOW;
+  G4VModularPhysicsList *thePL18 = new QGSC_BERT;
+  G4VModularPhysicsList *thePL18a = new QGSC_QGSC;
+  G4VModularPhysicsList *thePL18b = new QGSC_CHIPS;
+  G4VModularPhysicsList *thePL19 = new CHIPS;
+    
+  G4VModularPhysicsList *thePL20 = new QGSP_BERT_HP; 
+  G4VModularPhysicsList *thePL21 = new QGSP_BERT;
+  G4VModularPhysicsList *thePL21a = new QGSP_BERT_EMX;
+  G4VModularPhysicsList *thePL21b = new QGSP_BERT_DIF;
+  G4VModularPhysicsList *thePL22 = new QGSP_BIC_HP; 
+  G4VModularPhysicsList *thePL23 = new QGSP_BIC;
+  G4VModularPhysicsList *thePL23a= new QGSP_BIC(1);
+      G4IonQMDPhysics * ionQMD=new G4IonQMDPhysics("IonQMD",1);
+      thePL23a->RegisterPhysics(ionQMD);
+      ionQMD->ConstructProcess();
+  G4VModularPhysicsList *thePL24 = new QGSP_EMV;
+//replaced  G4VModularPhysicsList *thePL25 = new QGSP_EMX;
+  G4VModularPhysicsList *thePL27 = new QGSP;
+  G4VModularPhysicsList *thePL27a = new QGSP_DIF;
+  G4VModularPhysicsList *thePL28 = new QGSP_QEL;
+//  G4VModularPhysicsList *thePL29 = new QGSP_CASC;
+  G4VModularPhysicsList *thePL29 = new QGSP_INCL_ABLA;
+  
+  G4VModularPhysicsList *thePL30 = new QGS_BIC;
+  G4VModularPhysicsList *thePL31 = new FTF_BIC;
+  
+  G4VModularPhysicsList *thePL40 = new QGSP_FTFP_BERT;
+
+
+  delete runManager; 
+  return 0; 
+} 
Index: /trunk/source/processes/electromagnetic/lowenergy/include/G4OrlicLCrossSection.hh
===================================================================
--- /trunk/source/processes/electromagnetic/lowenergy/include/G4OrlicLCrossSection.hh	(revision 1274)
+++ /trunk/source/processes/electromagnetic/lowenergy/include/G4OrlicLCrossSection.hh	(revision 1274)
@@ -0,0 +1,78 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4OrlicLCrossSection.hh,v 1.3 2008/06/03 07:29:15 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03 $
+//
+// Author: Haifa Ben Abdelouahed
+//         
+//
+// History:
+// -----------
+//  23 Apr 2008   H. Ben Abdelouahed   1st implementation
+//  28 Apr 2008   MGP        Major revision according to a design iteration
+//
+// -------------------------------------------------------------------
+
+// Class description:
+// Low Energy Electromagnetic Physics, Cross section, proton ionisation, L shell
+// Further documentation available from http://www.ge.infn.it/geant4/lowE
+
+// -------------------------------------------------------------------
+
+
+#ifndef G4ORLICLCROSSSECTION_HH
+#define G4ORLICLCROSSSECTION_HH 1
+
+#include "globals.hh"
+
+
+class G4OrlicLCrossSection 
+
+{
+public:
+
+  G4OrlicLCrossSection();
+
+  virtual ~G4OrlicLCrossSection();
+
+
+//according to I.ORLIC, C.H.SOW and S.M.TANG,International Journal of PIXE.Vol.4(1997) 217-230	
+		     
+  G4double CalculateL1CrossSection(G4int zTarget, G4double energyIncident);
+
+  G4double CalculateL2CrossSection(G4int zTarget, G4double energyIncident);				    
+ 
+  G4double CalculateL3CrossSection(G4int zTarget, G4double energyIncident);
+
+private:
+
+
+  G4OrlicLCrossSection(const G4OrlicLCrossSection&);
+  G4OrlicLCrossSection & operator = (const G4OrlicLCrossSection &right);
+
+};
+
+#endif
Index: /trunk/source/processes/electromagnetic/lowenergy/include/G4ecpssrCrossSection.hh
===================================================================
--- /trunk/source/processes/electromagnetic/lowenergy/include/G4ecpssrCrossSection.hh	(revision 1274)
+++ /trunk/source/processes/electromagnetic/lowenergy/include/G4ecpssrCrossSection.hh	(revision 1274)
@@ -0,0 +1,77 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// $Id: G4ecpssrCrossSection.hh,v 1.3 2008/06/03 07:29:15 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-03 $
+//
+// Author: Haifa Ben Abdelouahed
+//         
+//
+// History:
+// -----------
+//  21 Apr 2008   H. Ben Abdelouahed   1st implementation
+//  21 Apr 2008   MGP        Major revision according to a design iteration
+//
+// -------------------------------------------------------------------
+
+// Class description:
+// Low Energy Electromagnetic Physics, Cross section, p ionisation, K shell
+// Further documentation available from http://www.ge.infn.it/geant4/lowE
+
+// -------------------------------------------------------------------
+
+
+#ifndef G4ECPSSRCROSSSECTION_HH
+#define G4ECPSSRCROSSSECTION_HH 1
+
+#include "globals.hh"
+
+
+class G4ecpssrCrossSection 
+
+{
+public:
+
+  G4ecpssrCrossSection();
+
+  virtual ~G4ecpssrCrossSection();
+			     
+  G4double CalculateCrossSection(G4int zTarget,G4int zIncident, G4double energyIncident);//according to W.Brandt and G.Lapicki, Phys.Rev.A23(1981)
+				    
+  G4double CalculateVelocity(G4int zTarget,G4int zIncident, G4double energyIncident); 
+			      
+  G4double  ExpIntFunction(G4int n,G4double x);//Exponential Integral Function
+
+   
+
+private:
+
+
+  G4ecpssrCrossSection(const G4ecpssrCrossSection&);
+  G4ecpssrCrossSection & operator = (const G4ecpssrCrossSection &right);
+
+};
+
+#endif
Index: /trunk/source/visualization/History
===================================================================
--- /trunk/source/visualization/History	(revision 1273)
+++ /trunk/source/visualization/History	(revision 1274)
@@ -1,3 +1,3 @@
-$Id: History,v 1.460 2009/11/23 05:56:37 perl Exp $
+$Id: History,v 1.464 2010/05/20 07:58:13 allison Exp $
 -------------------------------------------------------------------
 
@@ -24,4 +24,23 @@
 History file for visualization category
 ---------------------------------------
+
+20th May 2010  John Allison  (vis-V09-03-01)
+- Co-working tags: intercoms-V09-03-01, interfaces-V09-03-02
+- opengl-V09-03-01:
+  o GNUMakefile, G4OpenGLQtViewer : Better inclusion of new tabs in UI part
+- visman-V09-03-01:
+  o Restore previous viewer after /vis/drawTree.
+
+11th May 2010  John Allison  (vis-V09-03-00)
+- visman-09-03-00: Print i_mode warnings.
+- modeling-V09-03-00:
+  o Replace polyhedra with solids for sections and cutaways.
+  o Trap use of i_mode and print warning.
+- opengl-V09-03-00:
+  o Many improvements to OpenGL Qt.
+  o Speed improvements for polymarkers (e.g., trajectories).
+  o Use generic section and cutaway algorithm.
+- gMocren-V09-03-01: printing improvement.
+- vistest-V09-03-00: Added printEPS to test19.g4m, as suggested by Laurent.
 
 22nd November 2009  Joseph Perl (vis-V09-02-12)
Index: /trunk/source/visualization/OpenGL/GNUmakefile
===================================================================
--- /trunk/source/visualization/OpenGL/GNUmakefile	(revision 1273)
+++ /trunk/source/visualization/OpenGL/GNUmakefile	(revision 1274)
@@ -11,5 +11,5 @@
 
 # For debug mode
-# CPPFLAGS += -DG4DEBUG_VIS_OGL
+CPPFLAGS += -DG4DEBUG_VIS_OGL
 
 GLOBLIBS  = libG4vis_management.lib libG4modeling.lib libG4gl2ps.lib
Index: /trunk/source/visualization/OpenGL/History
===================================================================
--- /trunk/source/visualization/OpenGL/History	(revision 1273)
+++ /trunk/source/visualization/OpenGL/History	(revision 1274)
@@ -1,3 +1,3 @@
-$Id: History,v 1.169 2010/05/20 07:09:33 lgarnier Exp $
+$Id: History,v 1.171 2010/05/26 14:50:56 lgarnier Exp $
 -------------------------------------------------------------------
 
@@ -17,5 +17,9 @@
      * Reverse chronological order (last date on top), please *
      ----------------------------------------------------------
-20th May 2010 Laurent Garnier
+
+26th May 2010 Laurent Garnier
+ - G4OpenGLQtViewer : Some improvments with auto rotation mode.
+
+20th May 2010 Laurent Garnier  (opengl-V09-03-01)
  Co-working tag : intercoms-V09-03-01, interfaces-V09-03-02
  - GNUMakefile, G4OpenGLQtViewer : Better inclusion of new tabs in UI part
Index: /trunk/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh
===================================================================
--- /trunk/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 1273)
+++ /trunk/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLQtViewer.hh,v 1.21 2010/01/06 15:05:29 lgarnier Exp $
+// $Id: G4OpenGLQtViewer.hh,v 1.22 2010/05/26 14:50:56 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: /trunk/source/visualization/OpenGL/include/G4OpenGLSceneHandler.hh
===================================================================
--- /trunk/source/visualization/OpenGL/include/G4OpenGLSceneHandler.hh	(revision 1273)
+++ /trunk/source/visualization/OpenGL/include/G4OpenGLSceneHandler.hh	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLSceneHandler.hh,v 1.28 2010/04/30 13:18:32 lgarnier Exp $
+// $Id: G4OpenGLSceneHandler.hh,v 1.29 2010/05/11 10:17:32 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -93,6 +93,6 @@
   virtual ~G4OpenGLSceneHandler ();
 
-  const G4Polyhedron* CreateSectionPolyhedron ();
-  const G4Polyhedron* CreateCutawayPolyhedron ();
+  G4VSolid* CreateSectionSolid ();
+  G4VSolid* CreateCutawaySolid ();
 
   void ClearAndDestroyAtts();  // Destroys att holders and clears pick map.
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 1273)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLQtViewer.cc,v 1.50 2010/05/20 08:13:37 allison Exp $
+// $Id: G4OpenGLQtViewer.cc,v 1.51 2010/05/26 14:50:56 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc	(revision 1273)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLSceneHandler.cc,v 1.57 2010/04/30 13:18:32 lgarnier Exp $
+// $Id: G4OpenGLSceneHandler.cc,v 1.58 2010/05/11 10:17:32 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -138,22 +138,22 @@
 }
 
-const G4Polyhedron* G4OpenGLSceneHandler::CreateSectionPolyhedron ()
+G4VSolid* G4OpenGLSceneHandler::CreateSectionSolid ()
 {
   // Clipping done in G4OpenGLViewer::SetView.
-  return 0;
+  // return 0;
 
   // But...OpenGL no longer seems to reconstruct clipped edges, so,
   // when the BooleanProcessor is up to it, abandon this and use
-  // generic clipping in G4VSceneHandler::CreateSectionPolyhedron...
-  // return G4VSceneHandler::CreateSectionPolyhedron();
-}
-
-const G4Polyhedron* G4OpenGLSceneHandler::CreateCutawayPolyhedron ()
+  // generic clipping in G4VSceneHandler::CreateSectionSolid...
+  return G4VSceneHandler::CreateSectionSolid();
+}
+
+G4VSolid* G4OpenGLSceneHandler::CreateCutawaySolid ()
 {
   // Cutaway done in G4OpenGLViewer::SetView.
-  return 0;
+  // return 0;
 
   // But...if not, when the BooleanProcessor is up to it...
-  // return G4VSceneHandler::CreateCutawayPolyhedron();
+  return G4VSceneHandler::CreateCutawaySolid();
 }
 
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc	(revision 1273)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLViewer.cc,v 1.61 2010/04/27 15:59:10 lgarnier Exp $
+// $Id: G4OpenGLViewer.cc,v 1.62 2010/05/11 10:22:37 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -271,5 +271,6 @@
   // force kernel visit on change of clipping plane in
   // G4OpenGLStoredViewer::CompareForKernelVisit.
-  if (fVP.IsSection () ) {  // pair of back to back clip planes.
+  //if (fVP.IsSection () ) {  // pair of back to back clip planes.
+  if (false) {  // pair of back to back clip planes.
     const G4Plane3D& s = fVP.GetSectionPlane ();
     double sArray[4];
@@ -293,5 +294,6 @@
   const G4Planes& cutaways = fVP.GetCutawayPlanes();
   size_t nPlanes = cutaways.size();
-  if (fVP.IsCutaway() &&
+  //if (fVP.IsCutaway() &&
+  if (false &&
       fVP.GetCutawayMode() == G4ViewParameters::cutawayIntersection &&
       nPlanes > 0) {
@@ -384,5 +386,5 @@
   GLint hits = glRenderMode(GL_RENDER);
   if (hits < 0)
-    G4cout << "Too many hits.  Zoom in to reduce overlaps." << G4cout;
+    G4cout << "Too many hits.  Zoom in to reduce overlaps." << G4endl;
   else if (hits > 0) {
     //G4cout << hits << " hit(s)" << G4endl;
@@ -390,6 +392,6 @@
     for (GLint i = 0; i < hits; ++i) {
       GLuint nnames = *p++;
-      *p++; //OR GLuint zmin = *p++;
-      *p++; //OR GLuint zmax = *p++;
+      p++; //OR GLuint zmin = *p++;
+      p++; //OR GLuint zmax = *p++;
       //G4cout << "Hit " << i << ": " << nnames << " names"
       //     << "\nzmin: " << zmin << ", zmax: " << zmax << G4endl;
@@ -478,5 +480,6 @@
   // Change the LC_NUMERIC value in order to have "." separtor and not ","
   // This case is only useful for French, Canadien...
-  char *oldLocale = strdup(setlocale(LC_NUMERIC,NULL));
+  char* oldLocale = (char*)(malloc(strlen(setlocale(LC_NUMERIC,NULL))+1));
+  if(oldLocale!=NULL) strcpy(oldLocale,setlocale(LC_NUMERIC,NULL));
   setlocale(LC_NUMERIC,"C");
 
Index: /trunk/source/visualization/gMocren/History
===================================================================
--- /trunk/source/visualization/gMocren/History	(revision 1273)
+++ /trunk/source/visualization/gMocren/History	(revision 1274)
@@ -1,3 +1,3 @@
-$Id: History,v 1.9 2009/12/03 11:44:42 akimura Exp $
+$Id: History,v 1.11 2010/05/11 10:44:35 allison Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,12 @@
 History file for visualization/gMocren sub-category
 ---------------------------------------------------
+
+11 May 2010  John Allison  (gMocren-V09-03-01)
+- G4GMocrenFileSceneHandler.cc: Added G4cout << G4endl; to improve printing.
+
+22 January 2010  Gabriele Cosmo (gMocren-V09-03-00)
+Fix in G4GMocrenFileSceneHandler.cc to allow for porting on C++0x Standard:
+made explicit with static_cast conversions from double to float. Also use
+G4 types in consistent way.
 
 3 December 2009  Akinori Kimura
Index: /trunk/source/visualization/gMocren/src/G4GMocrenFileSceneHandler.cc
===================================================================
--- /trunk/source/visualization/gMocren/src/G4GMocrenFileSceneHandler.cc	(revision 1273)
+++ /trunk/source/visualization/gMocren/src/G4GMocrenFileSceneHandler.cc	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4GMocrenFileSceneHandler.cc,v 1.12 2009/12/03 11:44:42 akimura Exp $
+// $Id: G4GMocrenFileSceneHandler.cc,v 1.14 2010/05/11 10:44:11 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -93,7 +93,7 @@
 
 //-- for a debugging
-const bool GFDEBUG = false;
-const bool GFDEBUG_TRK = false;//true;
-const bool GFDEBUG_HIT = false;//true;
+const G4bool GFDEBUG = false;
+const G4bool GFDEBUG_TRK = false;//true;
+const G4bool GFDEBUG_HIT = false;//true;
 const G4int GFDEBUG_DET = 0; // 0: false 
 
@@ -170,5 +170,5 @@
   kbSetModalityVoxelSize = false;
 
-  for(int i = 0; i < 3; i++) {
+  for(G4int i = 0; i < 3; i++) {
     kModalitySize[i] = 0;
     kNestedVolumeDimension[i] = 0;
@@ -182,5 +182,5 @@
 {
   // g4_00.gdd, g4_01.gdd, ..., g4_MAX_FILE_INDEX.gdd
-  const int MAX_FILE_INDEX = kMaxFileNum - 1 ;
+  const G4int MAX_FILE_INDEX = kMaxFileNum - 1 ;
 
   // dest directory (null if no environmental variables is set)
@@ -191,6 +191,6 @@
 
   // Automatic updation of file names
-  static int currentNumber = 0;
-  for( int i = currentNumber ; i < kMaxFileNum ; i++) { 
+  static G4int currentNumber = 0;
+  for( G4int i = currentNumber ; i < kMaxFileNum ; i++) { 
 
     // Message in the final execution
@@ -268,7 +268,7 @@
     minmax[1] = ctdens.GetMaxCT();
     kgMocrenIO->setModalityImageMinMax(minmax);
-    std::vector<float> map;
-    float dens;
-    for(int i = minmax[0]; i <= minmax[1]; i++) {
+    std::vector<G4float> map;
+    G4float dens;
+    for(G4int i = minmax[0]; i <= minmax[1]; i++) {
       dens = ctdens.GetDensity(i);
       map.push_back(dens);
@@ -283,7 +283,7 @@
       ifile >> minmax[0] >> minmax[1];
       kgMocrenIO->setModalityImageMinMax(minmax);
-      std::vector<float> map;
-      float dens;
-      for(int i = minmax[0]; i <= minmax[1]; i++) {
+      std::vector<G4float> map;
+      G4float dens;
+      for(G4int i = minmax[0]; i <= minmax[1]; i++) {
 	ifile >> dens;
 	map.push_back(dens);
@@ -329,5 +329,5 @@
     kFlagSaving_g4_gdd = false; 
 
-    std::map<Index3D, float>::iterator itr = kNestedModality.begin();
+    std::map<Index3D, G4float>::iterator itr = kNestedModality.begin();
     G4int xmax=0, ymax=0, zmax=0;
     for(; itr != kNestedModality.end(); itr++) {
@@ -347,10 +347,10 @@
 
     G4int nxy = kModalitySize[0]*kModalitySize[1];
-    //std::map<G4int, float>::iterator itr;
-    for(int z = 0; z < kModalitySize[2]; z++) {
+    //std::map<G4int, G4float>::iterator itr;
+    for(G4int z = 0; z < kModalitySize[2]; z++) {
       short * modality = new short[nxy];
-      for(int y = 0; y < kModalitySize[1]; y++) {
-	for(int x = 0; x < kModalitySize[0]; x++) {
-	  //for(int x = kModalitySize[0]-1; x >= 0 ; x--) {
+      for(G4int y = 0; y < kModalitySize[1]; y++) {
+	for(G4int x = 0; x < kModalitySize[0]; x++) {
+	  //for(G4int x = kModalitySize[0]-1; x >= 0 ; x--) {
 	  //G4int ixy = x + (kModalitySize[1]-y-1)*kModalitySize[0];
 
@@ -377,5 +377,5 @@
     std::map<G4String, std::map<Index3D, G4double> >::iterator hitsListItr = kNestedHitsList.begin();
 
-    for(int n = 0; hitsListItr != kNestedHitsList.end(); hitsListItr++, n++) {
+    for(G4int n = 0; hitsListItr != kNestedHitsList.end(); hitsListItr++, n++) {
 
       kgMocrenIO->newDoseDist();
@@ -384,8 +384,8 @@
 
       G4double minmax[2] = {DBL_MAX, -DBL_MAX};
-      for(int z = 0 ; z < kModalitySize[2]; z++) {
+      for(G4int z = 0 ; z < kModalitySize[2]; z++) {
 	G4double * values = new G4double[nxy];
-	for(int y = 0; y < kModalitySize[1]; y++) {
-	  for(int x = 0; x < kModalitySize[0]; x++) {
+	for(G4int y = 0; y < kModalitySize[1]; y++) {
+	  for(G4int x = 0; x < kModalitySize[0]; x++) {
 
 	    G4int ixy = x + y*kModalitySize[0];
@@ -421,7 +421,7 @@
       rot = kVolumeTrans3D.getRotation().inverse();
       // x
-      std::vector<float *> tracks;
+      std::vector<G4float *> tracks;
       unsigned char colors[3];
-      float * trk = new float[6];
+      G4float * trk = new G4float[6];
       tracks.push_back(trk);
 
@@ -435,14 +435,14 @@
       za -= trans;
       za.transform(rot);
-      for(int i = 0; i < 3; i++) trk[i] = orig[i];
-      for(int i = 0; i < 3; i++) trk[i+3] = xa[i];
+      for(G4int i = 0; i < 3; i++) trk[i] = orig[i];
+      for(G4int i = 0; i < 3; i++) trk[i+3] = xa[i];
       colors[0] = 255; colors[1] = 0; colors[2] = 0;
       kgMocrenIO->addTrack(tracks, colors);
       // y
-      for(int i = 0; i < 3; i++) trk[i+3] = ya[i];
+      for(G4int i = 0; i < 3; i++) trk[i+3] = ya[i];
       colors[0] = 0; colors[1] = 255; colors[2] = 0;
       kgMocrenIO->addTrack(tracks, colors);
       // z
-      for(int i = 0; i < 3; i++) trk[i+3] = za[i];
+      for(G4int i = 0; i < 3; i++) trk[i+3] = za[i];
       colors[0] = 0; colors[1] = 0; colors[2] = 255;
       kgMocrenIO->addTrack(tracks, colors);
@@ -454,6 +454,6 @@
 
     if(GFDEBUG_DET) G4cout << ">>>>>>>>>>>>>>>>>>>>>>   (";
-    std::vector<float> transformObjects;
-    for(int i = 0; i < 3; i++) {
+    std::vector<G4float> transformObjects;
+    for(G4int i = 0; i < 3; i++) {
       // need to check!!
       transformObjects.push_back((kVolumeSize[i]/2. - kVoxelDimension[i]/2.));
@@ -533,5 +533,5 @@
 
     if(GFDEBUG_TRK) G4cout << "   trajectory points : " << G4endl;
-    std::vector<float *> trajectory;
+    std::vector<G4float *> trajectory;
     if(polyline.size() < 2) return;
     G4Polyline::const_iterator preitr = polyline.begin();
@@ -544,5 +544,5 @@
       postPts -= trans;
       postPts.transform(rot);
-      float * stepPts = new float[6];
+      G4float * stepPts = new G4float[6];
       stepPts[0] = prePts.x();
       stepPts[1] = prePts.y();
@@ -657,5 +657,5 @@
 
   //---------- (3) Facet block
-  for (int f = polyhedron.GetNoFacets(); f; f--){
+  for (G4int f = polyhedron.GetNoFacets(); f; f--){
     G4int notLastEdge;
     G4int index = -1; // initialization
@@ -764,9 +764,9 @@
     G4Polyhedron * poly = box.CreatePolyhedron();
     poly->Transform(*fpObjectTransformation);
-    //int nv = poly->GetNoVertices();
+    //G4int nv = poly->GetNoVertices();
     G4Point3D v1, v2;
     G4int next;
     //while(1) { // next flag isn't functional.
-    for(int i = 0; i < 12; i++) { // # of edges is 12.
+    for(G4int i = 0; i < 12; i++) { // # of edges is 12.
       poly->GetNextEdge(v1, v2, next);
       if(next == 0) break;
@@ -927,5 +927,5 @@
       }
       
-      for(int i = 0; i < 3; i++) {
+      for(G4int i = 0; i < 3; i++) {
 	kNestedVolumeDimension[i] = nDaughters[i];
 	//kNestedVolumeDimension[i] = nDaughters[dirAxis[i]];
@@ -940,7 +940,7 @@
       if(nestPara) {
 	G4double prexyz[3] = {0.,0.,0.}, xyz[3] = {0.,0.,0.};
-	for(int n0 = 0; n0 < nDaughters[0]; n0++) {
-	  for(int n1 = 0; n1 < nDaughters[1]; n1++) {
-	    for(int n2 = 0; n2 < nDaughters[2]; n2++) {
+	for(G4int n0 = 0; n0 < nDaughters[0]; n0++) {
+	  for(G4int n1 = 0; n1 < nDaughters[1]; n1++) {
+	    for(G4int n2 = 0; n2 < nDaughters[2]; n2++) {
 		  
 	      G4GMocrenTouchable * touch = new G4GMocrenTouchable(n1, n0);
@@ -961,5 +961,5 @@
 	      xyz[2] = tbox.GetZHalfLength()/mm;
 	      if(n0 != 0 || n1 != 0 || n2 != 0) {
-		for(int i = 0; i < 3; i++) {
+		for(G4int i = 0; i < 3; i++) {
 		  if(xyz[i] != prexyz[i]) G4Exception("Error[gMocrenFileSceneHandler]: Unsupported parameterisation.");
 		}
@@ -980,5 +980,5 @@
 		       << "  density: " << dens << G4endl;
 
-	      for(int i = 0; i < 3; i++) prexyz[i] = xyz[i];
+	      for(G4int i = 0; i < 3; i++) prexyz[i] = xyz[i];
 	    }
 	  }
@@ -990,5 +990,7 @@
 	// mesh size
 	if(!kbSetModalityVoxelSize) {
-	  float spacing[3] = {2*xyz[0], 2*xyz[1], 2*xyz[2]};
+	  G4float spacing[3] = {static_cast<G4float>(2*xyz[0]),
+                                static_cast<G4float>(2*xyz[1]),
+                                static_cast<G4float>(2*xyz[2])};
 	  kgMocrenIO->setVoxelSpacing(spacing);
 	  kVoxelDimension.set(spacing[0], spacing[1], spacing[2]);
@@ -1014,5 +1016,5 @@
 	  G4cout << "     physical volume node id : "
 		 << "size: " << npvp << ", PV name: ";
-	  for(int i = 0; i < npvp; i++) {
+	  for(G4int i = 0; i < npvp; i++) {
 	    G4cout << pPVModel->GetDrawnPVPath()[i].GetPhysicalVolume()->GetName()
 		   << " [param:"
@@ -1093,7 +1095,7 @@
       G4int nXY = kNestedVolumeDimension[0]*kNestedVolumeDimension[1];
 
-      for(int n0 = 0; n0 < kNestedVolumeDimension[0]; n0++) {
-	for(int n1 = 0; n1 < kNestedVolumeDimension[1]; n1++) {
-	  for(int n2 = 0; n2 < kNestedVolumeDimension[2]; n2++) {
+      for(G4int n0 = 0; n0 < kNestedVolumeDimension[0]; n0++) {
+	for(G4int n1 = 0; n1 < kNestedVolumeDimension[1]; n1++) {
+	  for(G4int n2 = 0; n2 < kNestedVolumeDimension[2]; n2++) {
 
 	    G4int repNo = n0 + n1*nX + n2*nXY;
@@ -1123,7 +1125,7 @@
       // mesh size
       if(!kbSetModalityVoxelSize) {
-	float spacing[3] = {2*phantomPara->GetVoxelHalfX(),
-			    2*phantomPara->GetVoxelHalfY(),
-			    2*phantomPara->GetVoxelHalfZ()};
+	G4float spacing[3] = {static_cast<G4float>(2*phantomPara->GetVoxelHalfX()),
+			      static_cast<G4float>(2*phantomPara->GetVoxelHalfY()),
+			      static_cast<G4float>(2*phantomPara->GetVoxelHalfZ())};
 	kgMocrenIO->setVoxelSpacing(spacing);
 	kVoxelDimension.set(spacing[0], spacing[1], spacing[2]);
@@ -1158,7 +1160,7 @@
 
     // get densities of the parameterized patient geometry
-    for(int n0 = 0; n0 < kNestedVolumeDimension[0]; n0++) {
-      for(int n1 = 0; n1 < kNestedVolumeDimension[1]; n1++) {
-	for(int n2 = 0; n2 < kNestedVolumeDimension[2]; n2++) {
+    for(G4int n0 = 0; n0 < kNestedVolumeDimension[0]; n0++) {
+      for(G4int n1 = 0; n1 < kNestedVolumeDimension[1]; n1++) {
+	for(G4int n2 = 0; n2 < kNestedVolumeDimension[2]; n2++) {
 
 	  G4double dens = 0.*(g/cm3);
@@ -1192,7 +1194,7 @@
     // mesh size
     if(!kbSetModalityVoxelSize) {
-      float spacing[3] = {boxSize.x()*2/nVoxels[0],
-			  boxSize.y()*2/nVoxels[1],
-			  boxSize.z()*2/nVoxels[2]};
+      G4float spacing[3] = {static_cast<G4float>(boxSize.x()*2/nVoxels[0]),
+			    static_cast<G4float>(boxSize.y()*2/nVoxels[1]),
+			    static_cast<G4float>(boxSize.z()*2/nVoxels[2])};
 
       kgMocrenIO->setVoxelSpacing(spacing);
@@ -1292,6 +1294,6 @@
     G4cout << "    " << tubes.GetName() << G4endl;
     G4Polyhedron * poly = tubes.CreatePolyhedron();
-    int nv = poly->GetNoVertices();
-    for(int i = 0; i < nv; i++) {
+    G4int nv = poly->GetNoVertices();
+    for(G4int i = 0; i < nv; i++) {
       G4cout << "    (" << poly->GetVertex(i).x() << ", "
 	     << poly->GetVertex(i).y() << ", "
@@ -1449,5 +1451,4 @@
   if(GFDEBUG_TRK) {
     std::cout << " ::AddCompound(const G4VTrajectory&) >>>>>>>>> " << std::endl;
-
     G4TrajectoriesModel * pTrModel = dynamic_cast<G4TrajectoriesModel*>(fpModel);
     if (!pTrModel) { 
@@ -1464,13 +1465,12 @@
       G4cout << "    momentum: " << trj->GetInitialMomentum() << G4endl;
       
-      int nPnt = trj->GetPointEntries();
+      G4int nPnt = trj->GetPointEntries();
       G4cout << "    point:    ";
-      for(int i = 0; i < nPnt; i++) {
+      for(G4int i = 0; i < nPnt; i++) {
 	G4cout << trj->GetPoint(i)->GetPosition() << ", ";
       }
       G4cout << G4endl;
-
-
-    }
+    }
+    G4cout << G4endl;
   }
 
@@ -1544,5 +1544,5 @@
       // Get attributes
       for(itr = attval->begin(); itr != attval->end(); itr++) {
-	for(int i = 0; i < nhitname; i++) {
+	for(G4int i = 0; i < nhitname; i++) {
 	  if(itr->GetName() == hitNames[i]) {
 
@@ -1601,5 +1601,5 @@
   
 
-  //for(int i = 0; i < nhitname; i++) {       // this selection trusts
+  //for(G4int i = 0; i < nhitname; i++) {       // this selection trusts
     //if(scorername == hitScorerNames[i]) {   // thea command /vis/scene/add/psHits hit_name.
 
@@ -1630,5 +1630,5 @@
     G4cout << "       >>>>> " << meshname << " : " << scorername  << G4endl;
 
-    for(int i = 0; i < nhitname; i++)
+    for(G4int i = 0; i < nhitname; i++)
       if(scorername == hitScorerNames[i]) 
 	G4cout << "       !!!! Hit scorer !!!! " << scorername << G4endl;
@@ -1702,5 +1702,5 @@
 
   // edge points of the detector
-  std::vector<float *> dedges;
+  std::vector<G4float *> dedges;
   G4Polyhedron * poly = solid.CreatePolyhedron();
   detector.polyhedron = poly;
@@ -1717,11 +1717,11 @@
     //uccolor[0] = uccolor[1] = uccolor[2] = 30; // dark grey
   }
-  for(int i = 0; i < 3; i++) detector.color[i] = uccolor[i];
+  for(G4int i = 0; i < 3; i++) detector.color[i] = uccolor[i];
   //
   kDetectors.push_back(detector);
 
   if(GFDEBUG_DET > 1) {
-    G4cout << "0     color:   (" << (int)uccolor[0] << ", "
-	   << (int)uccolor[1] << ", " << (int)uccolor[2] << ")"
+    G4cout << "0     color:   (" << (G4int)uccolor[0] << ", "
+	   << (G4int)uccolor[1] << ", " << (G4int)uccolor[2] << ")"
 	   << G4endl;
   }
@@ -1742,5 +1742,5 @@
 
     // edge points of the detector
-    std::vector<float *> dedges;
+    std::vector<G4float *> dedges;
     G4Polyhedron * poly = itr->polyhedron;
     poly->Transform(itr->transform3D);
@@ -1755,5 +1755,5 @@
     while(bnext) {
       if(!(poly->GetNextEdge(v1, v2, next))) bnext =false;
-      float * edge = new float[6];
+      G4float * edge = new G4float[6];
       edge[0] = v1.x()/mm;
       edge[1] = v1.y()/mm;
@@ -1772,5 +1772,5 @@
     //
     kgMocrenIO->addDetector(detname, dedges, uccolor);
-    for(int i = 0; i < nedges; i++) { // # of edges is 12.
+    for(G4int i = 0; i < nedges; i++) { // # of edges is 12.
       delete [] dedges[i];
     }
@@ -1778,6 +1778,6 @@
 
     if(GFDEBUG_DET > 1) {
-      G4cout << "    color:   (" << (int)uccolor[0] << ", "
-	     << (int)uccolor[1] << ", " << (int)uccolor[2] << ")"
+      G4cout << "    color:   (" << (G4int)uccolor[0] << ", "
+	     << (G4int)uccolor[1] << ", " << (G4int)uccolor[2] << ")"
 	     << G4endl;
     }
@@ -1789,5 +1789,5 @@
      kNestedVolumeDimension[1] == 0 ||
      kNestedVolumeDimension[2] == 0) {
-    for(int i = 0; i < 3; i++) _idx3d[i] = 0;
+    for(G4int i = 0; i < 3; i++) _idx3d[i] = 0;
     return;
   }
Index: /trunk/source/visualization/management/History
===================================================================
--- /trunk/source/visualization/management/History	(revision 1273)
+++ /trunk/source/visualization/management/History	(revision 1274)
@@ -1,3 +1,3 @@
-$Id: History,v 1.142 2010/05/11 12:17:40 allison Exp $
+$Id: History,v 1.143 2010/05/20 07:56:21 allison Exp $
 
 -------------------------------------------------------------------
@@ -26,4 +26,9 @@
 History file for visualization management sub-category
 ------------------------------------------------------
+
+20th May 2010  John Allison  (visman-V09-03-01)
+- G4VisCommandsCompound.cc: Restore previous viewer after /vis/drawTree.
+- G4VisManager.hh: Cosmetic.
+- G4VGraphicsSystem: Add Set methods.
 
 11th May 2010  John Allison  (visman-V09-03-00)
Index: /trunk/source/visualization/management/include/G4VGraphicsSystem.hh
===================================================================
--- /trunk/source/visualization/management/include/G4VGraphicsSystem.hh	(revision 1273)
+++ /trunk/source/visualization/management/include/G4VGraphicsSystem.hh	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VGraphicsSystem.hh,v 1.11 2006/06/29 21:28:04 gunter Exp $
+// $Id: G4VGraphicsSystem.hh,v 1.12 2010/05/20 07:55:47 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -80,9 +80,13 @@
   const G4String& GetDescription   () const;
   Functionality   GetFunctionality () const;
+  void SetName          (const G4String&);
+  void SetNickName      (const G4String&);
+  void SetDescription   (const G4String&);
+  void SetFunctionality (Functionality);
 
 protected:
-  const G4String fName;
-  const G4String fNickname;
-  const G4String fDescription;
+  G4String fName;
+  G4String fNickname;
+  G4String fDescription;
   Functionality  fFunctionality;
 };
Index: /trunk/source/visualization/management/include/G4VGraphicsSystem.icc
===================================================================
--- /trunk/source/visualization/management/include/G4VGraphicsSystem.icc	(revision 1273)
+++ /trunk/source/visualization/management/include/G4VGraphicsSystem.icc	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VGraphicsSystem.icc,v 1.7 2006/06/29 21:28:06 gunter Exp $
+// $Id: G4VGraphicsSystem.icc,v 1.8 2010/05/20 07:55:47 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -48,2 +48,18 @@
   return fFunctionality;
 }
+
+inline void G4VGraphicsSystem::SetName (const G4String& name) {
+  fName = name;
+}
+
+inline void G4VGraphicsSystem::SetNickName (const G4String& nickname) {
+  fNickname = nickname;
+}
+
+inline void G4VGraphicsSystem::SetDescription (const G4String& description) {
+  fDescription = description;
+}
+
+inline void G4VGraphicsSystem::SetFunctionality (Functionality f) {
+  fFunctionality = f;
+}
Index: /trunk/source/visualization/management/include/G4VisManager.hh
===================================================================
--- /trunk/source/visualization/management/include/G4VisManager.hh	(revision 1273)
+++ /trunk/source/visualization/management/include/G4VisManager.hh	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VisManager.hh,v 1.70 2009/02/25 18:28:00 lgarnier Exp $
+// $Id: G4VisManager.hh,v 1.71 2010/05/20 07:54:31 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -366,8 +366,8 @@
 		      const G4VisExtent& = G4VisExtent::NullExtent);
   void SetUserActionExtent (const G4VisExtent&);
-  void              SetCurrentGraphicsSystem    (G4VGraphicsSystem* pSystem);
+  void              SetCurrentGraphicsSystem    (G4VGraphicsSystem*);
   void              SetCurrentScene             (G4Scene*);
-  void              SetCurrentSceneHandler      (G4VSceneHandler* pScene);
-  void              SetCurrentViewer            (G4VViewer* pView);
+  void              SetCurrentSceneHandler      (G4VSceneHandler*);
+  void              SetCurrentViewer            (G4VViewer*);
   G4SceneHandlerList& SetAvailableSceneHandlers ();  // Returns lvalue.
   G4SceneList&      SetSceneList                ();  // Returns lvalue.
Index: /trunk/source/visualization/management/src/G4VisCommandsCompound.cc
===================================================================
--- /trunk/source/visualization/management/src/G4VisCommandsCompound.cc	(revision 1273)
+++ /trunk/source/visualization/management/src/G4VisCommandsCompound.cc	(revision 1274)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VisCommandsCompound.cc,v 1.39 2007/11/16 20:29:04 perl Exp $
+// $Id: G4VisCommandsCompound.cc,v 1.40 2010/05/20 07:54:01 allison Exp $
 // GEANT4 tag $Name:  $
 
@@ -66,4 +66,9 @@
   is >> pvname >> system;
 
+  G4VGraphicsSystem* keepSystem = fpVisManager->GetCurrentGraphicsSystem();
+  G4Scene* keepScene = fpVisManager->GetCurrentScene();
+  G4VSceneHandler* keepSceneHandler = fpVisManager->GetCurrentSceneHandler();
+  G4VViewer* keepViewer = fpVisManager->GetCurrentViewer();
+
   G4UImanager* UImanager = G4UImanager::GetUIpointer();
   G4int keepVerbose = UImanager->GetVerboseLevel();
@@ -77,4 +82,14 @@
   UImanager->ApplyCommand("/vis/viewer/flush");
   UImanager->SetVerboseLevel(keepVerbose);
+
+  if (keepViewer) {
+    if (fpVisManager->GetVerbosity() >= G4VisManager::warnings) {
+      G4cout << "Reverting to " << keepViewer->GetName() << G4endl;
+    }
+    fpVisManager->SetCurrentGraphicsSystem(keepSystem);
+    fpVisManager->SetCurrentScene(keepScene);
+    fpVisManager->SetCurrentSceneHandler(keepSceneHandler);
+    fpVisManager->SetCurrentViewer(keepViewer);
+  }
 }
 
Index: /trunk/source/visualization/test/History
===================================================================
--- /trunk/source/visualization/test/History	(revision 1273)
+++ /trunk/source/visualization/test/History	(revision 1274)
@@ -1,3 +1,3 @@
-$Id: History,v 1.121 2009/11/06 16:02:33 allison Exp $
+$Id: History,v 1.123 2010/05/11 12:06:08 allison Exp $
 
 History file for visualization/test subdirectory
@@ -5,4 +5,10 @@
 
 $Log: History,v $
+Revision 1.123  2010/05/11 12:06:08  allison
+vistest-V09-03-00
+
+Revision 1.122  2010/05/11 12:04:39  allison
+Added printEPS to test19.g4m, as suggested by Laurent.
+
 Revision 1.121  2009/11/06 16:02:33  allison
 vistest-V09-02-01
Index: /trunk/source/visualization/test/test19.g4m
===================================================================
--- /trunk/source/visualization/test/test19.g4m	(revision 1273)
+++ /trunk/source/visualization/test/test19.g4m	(revision 1274)
@@ -41,6 +41,6 @@
 #/vis/sceneHandler/create OGLSXm
 #/vis/sceneHandler/create OGLIX
-#/vis/sceneHandler/create OGLSX
-/vis/sceneHandler/create OGLSXm
+/vis/sceneHandler/create OGLSX
+#/vis/sceneHandler/create OGLSXm
 #/vis/sceneHandler/create VRML1
 #/vis/sceneHandler/create VRML1FILE
@@ -71,4 +71,8 @@
 # (all that happens is an extra refresh).
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-1
+/vis/ogl/printEPS
 #
 # Create another viewer.
@@ -80,4 +84,8 @@
 #
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-2
+/vis/ogl/printEPS
 #
 # Now hidden line removal.
@@ -90,4 +98,8 @@
 #
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-3
+/vis/ogl/printEPS
 #
 # Now hidden line *and* hidden surface removal.
@@ -100,4 +112,8 @@
 #
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-4
+/vis/ogl/printEPS
 #
 # Start a run to initialise/optimise geometry and draw user-drawn transients.
@@ -112,4 +128,8 @@
 /vis/scene/notifyHandlers
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-5
+/vis/ogl/printEPS
 #
 # Logical volume of Boolean solids...
@@ -122,4 +142,8 @@
 /vis/scene/notifyHandlers
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-6
+/vis/ogl/printEPS
 #
 /vis/scene/create
@@ -129,4 +153,8 @@
 /vis/viewer/set/viewpointThetaPhi 35 35
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-7
+/vis/ogl/printEPS
 #
 /vis/scene/create
@@ -136,4 +164,8 @@
 /vis/viewer/set/viewpointThetaPhi 35 35
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-8
+/vis/ogl/printEPS
 #
 # Send geantino through...
@@ -153,4 +185,8 @@
 /tracking/verbose 0
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-9
+/vis/ogl/printEPS
 #
 # Rotated tracker tube
@@ -172,4 +208,8 @@
 /run/beamOn
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-10
+/vis/ogl/printEPS
 #
 # G4Trap1
@@ -215,4 +255,8 @@
 /run/beamOn
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-11
+/vis/ogl/printEPS
 #
 # G4Trap2
@@ -241,4 +285,8 @@
 /run/beamOn
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-12
+/vis/ogl/printEPS
 #
 # Displaced solid.
@@ -252,4 +300,8 @@
 /run/beamOn
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-13
+/vis/ogl/printEPS
 #
 # Boolean solid.
@@ -313,4 +365,8 @@
 /run/beamOn
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-14
+/vis/ogl/printEPS
 #
 # To view replicas...
@@ -355,4 +411,8 @@
 /run/beamOn
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-15
+/vis/ogl/printEPS
 #...end
 #
@@ -360,4 +420,8 @@
 /vis/viewer/set/projection perspective 30
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-16
+/vis/ogl/printEPS
 #
 #/vis/sceneHandler/create OIX
@@ -367,4 +431,8 @@
 /vis/viewer/set/viewpointThetaPhi 30 30
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-17
+/vis/ogl/printEPS
 #
 # You can use /vis/rayTracer/... commands
@@ -378,6 +446,15 @@
 /vis/viewer/set/viewpointThetaPhi 45 45
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-18
+/vis/ogl/printEPS
 #
 # Odd!!?  JPEG image seems upside down for default view direction...
 /vis/viewer/create ! ! 200
 /vis/viewer/flush
+/vis/ogl/set/printMode vectored
+/vis/ogl/set/printSize 800 600
+/vis/ogl/set/printFilename output-test19-19
+/vis/ogl/printEPS
+exit
