Index: trunk/examples/extended/medical/DICOM/Data.dat
===================================================================
--- trunk/examples/extended/medical/DICOM/Data.dat	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/Data.dat	(revision 1337)
@@ -1,7 +1,7 @@
+8
+3
+1
 2
 3
-14196616
-14196633
-14196650
 10
 Air 0.207
Index: trunk/examples/extended/medical/DICOM/GNUmakefile
===================================================================
--- trunk/examples/extended/medical/DICOM/GNUmakefile	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/GNUmakefile	(revision 1337)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.3 2003/06/16 07:51:35 guatelli Exp $
+# $Id: GNUmakefile,v 1.4 2010/01/11 16:42:22 gcosmo Exp $
 # --------------------------------------------------------------
 # GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
@@ -7,4 +7,8 @@
 G4TARGET := $(name)
 G4EXLIB := true
+
+ifndef G4INSTALL
+  G4INSTALL = ../../../..
+endif
 
 .PHONY: all
Index: trunk/examples/extended/medical/DICOM/History
===================================================================
--- trunk/examples/extended/medical/DICOM/History	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/History	(revision 1337)
@@ -1,3 +1,3 @@
-$Id: History,v 1.13 2008/01/22 15:09:53 gcosmo Exp $
+$Id: History,v 1.22 2010/06/07 05:40:46 perl Exp $
 -------------------------------------------------------------------
 
@@ -8,4 +8,42 @@
                       Category History file
                       ---------------------
+06.06.2010 - Joseph Perl (DICOM-V09-03-03)
+	    Remove unused variable in EventAction 
+
+03.06.2010 - Joseph Perl (DICOM-V09-03-02)
+	    Updated vis usage
+
+19.11.2009- Stéphane Chauvie (DICOM-V09-03-00)
+01.06.2010- Stephane Chauvie - Andrea Armando 
+	    Added function to read nested items (defined and undefined)
+	    Removed dependencies on CONQUEST
+	    DICOM handler could now read whichever DICOM file (PT,CT,DR,CR,US,MR... ) 
+	    
+19.11.2009- Stephanee Chauvie (DICOM-V09-02-03)
+	    Changed DICOM Handler to read CT files coming from CONQUEST DICOM server
+
+05.02.2009 - Pedro Arce (DICOM-V09-02-01)
+             Added report on dose per voxel.
+             Added warning for erroneous inclusion of development code in
+             release 9.2 (to be removed when fix will be included in patch).
+
+27.01.2009 - Gabriele Cosmo (DICOM-V09-02-00)
+             Use new class G4RegularNavigationHistory for counting of step
+             lengths in voxels of the regular structure.
+
+27.11.2008 - Pedro Arce (DICOM-V09-01-02)
+             Included G4PSDoseDeposit_RegNav to distribute dose along voxels, 
+	     including msc and energy loss corrections, for the case of 
+	     skipping voxel with equal materials when using regular
+	     navigation
+
+21.07.2008 - Pedro Arce (DICOM-V09-01-01)
+             Bug fix in DicomNestedPhantomParameterisation in calculating the
+             'copyNo', so that material assignment was wrong
+             Set default cut to 1 mm (with previous 1.E-3 mm too much time is
+             spent on physics and no improvement is seen with different
+             navigation options).
+             Corrected direction and position of primary particles so that
+             they traverse the DICOM voxels.
 
 22.01.2008 - Pedro Arce (DICOM-V09-01-00)
Index: trunk/examples/extended/medical/DICOM/README
===================================================================
--- trunk/examples/extended/medical/DICOM/README	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/README	(revision 1337)
@@ -18,4 +18,7 @@
 
 And it has been deeply reviewed by Pedro Arce in December 2007.
+Very small changes by Stephane Chauvie in January 2008.
+Stephane Chauvie, Oct 2009: changed Physics list; changes in DICOM read. 
+Stephane Chauvie and Andrea Armando; June 2010 adapted for reading  whatever DICOM file
 
 
@@ -30,9 +33,9 @@
 
  - A standard Geant4 example GNUmakefile is provided            
- - Compile it with 'make' 
+ - Compile it with 'make'/'gmake' 
 
 ---> 3) Run the example:
 
- - To run the environment variable G4LEDATA needs to be set, pointing to the low energy data base, G4EMLOW4.3      
+ - To run the environment variabmore le G4LEDATA needs to be set, pointing to the low energy data base
 
  - batch mode:
@@ -41,10 +44,10 @@
  - interactive mode:
    - $G4INSTALL/bin/Linux-g++/dicom
-   the file vis.mac is read in order to visualise the phantom with OpenGL
+   the file vis.mac is read in order to visualise the phantom with OpenGL, DAWN or VRML
 
 --->4) Metadata:
 
  The file Data.dat has the following information
-  - A line with the compression value (used only to create the .g4dcm, not to read it)
+  - A line with the compression value (used only to create the .g4dcm and .g4dcmb, not to read it)
   - A line with the number of files 
   - A line for each file name (to these names it will be added the suffix .dcm to read the DICOM files in their original format, and the suffix .g4dcm to read the text files that contain the DICOM information where the Hounsfield numbers have been converted to material and densities)
@@ -94,5 +97,5 @@
 The file Colormap.dat defines the colour that will be assigned to the voxels of each material.
 
---->8) DICOM text file format:
+--->8) DICOM file formats:
 
 The DICOM files are converted to a simple text format. You may create your own file with the following format (see e.g. 14196616.g4dcm):
@@ -109,12 +112,14 @@
 As commented before the DICOM files (.dcm) are assumed to describe one Z slice per file, and therefore the GEANT4 text files (.g4dcm) created from them have also one unique Z slice per file. Nevertheless if you create your own .g4dcm file you may include as many Z slices as desired. In any case you have to respect the rule that the Z slices must be contiguous.
 
+The same information is also used to fill a file in binary format, that contains the same information as the text format. Its name ends in .g4dcmb, instead of .g4dcm .
+
 --->9) Choosing different parameterisation/navigation options:
 
 There are four possible ways in GEANT4 to treat the navigation in regular voxelised volumes:
 
-- The non-optimised way. It will be very slow because each time a track exits a voxel it has to loop to all other voxels to know which one it may enter
-- The optimisation with G4SmartVoxel: a 3D grid is built, so that the location of voxels is fast, but it requires a lot of memory
+- The 1D optimisation . It will be very slow because each time a track exits a voxel it has to loop to all other voxels to know which one it may enter
+- The 3D optimisation with G4SmartVoxel: a 3D grid is built, so that the location of voxels is fast, but it requires a lot of memory
 - Using G4NestedParameterisation. The search is done hierarchically in X, Y and Z. It is fast and does not require big memory
-- Using G4PhantomParameterisation/G4RegularNavigation: an special algorithm to navigate in regular voxelised geometries (see GEANT4 doc). This is the fastest way without any extra memory requirement (and it is the default in this example). It includes an option (default) to skip frontiers between voxels when they have the same material
+- Using G4PhantomParameterisation/G4RegularNavigation: an special algorithm to navigate in regular voxelised geometries (see GEANT4 doc). This is the fastest way without any extra memory requirement (and it is the default in this example). It includes an option (default) to skip frontiers between voxels when they have the same material. When using this option at each step the energy is all deposited in the last voxel; for properly distribution of the dose (=energy/volume) the G4PSDoseDeposit_RegNav scorer can be used (see below)
 
 You can select amont the four options in the following way:
@@ -138,2 +143,19 @@
 - To use the third option you have to set the enviromental variable DICOM_NESTED_PARAM to 1
 
+
+--->10) Calculating dose in phantom voxels for regular navigation
+
+As mentioned above the regular navigation has the option to keip voxel frontiers when two voxels share the same material, what can make the CPU time several times smaller. But this option makes that all energy deposited is computed in the last voxel, instead of distributing it along the voxels traversed. To properly calculate the dose in each voxel the G4PSDoseDeposit_RegNav scorer can be used.
+It takes into account the fact that,  when the particle travels through the voxels it looses energy and therefore the energy lost per length (dEdx) is bigger and also the effect of the multiple scattering is bigger. 
+The algorithm to make this correction is an iterative one, as the step length increase due multiple scattering (that converts the geometrical step length in what we will call the true step length) and the energy loss are correlated.
+It works in the folloing way: first the total true step length is distributed among the voxels proportionally to their geometrical step length; with these values it is calculated one voxel after another the value of dEdx and then the value of the kinetic energy at the entrance of each voxel; with these values it is calculated the geometrical to true step corrections due to multiple scattering for each voxel; finally these new values are used to recalculate the energy lost in each voxel. It has been demonstrated for dose in a water phantom and in a real phantom that the two-step iteration described is enough to reproduce the dose calcualted when no skipping of voxel frontiers is done.
+
+This scorer is implemented in this examples if the regular navigation option is 
+chosen. It is triggered at the method RegularDicomDetectorConstruction::ConstructPatient() by the call
+
+SetScorer(voxel_logic);
+
+--->11) Output
+dicom.out is produced running th macro file run.mac. It has 2 columns: the first is the number of 
+voxel (ordered in x,y,z) and the second the dose there deposited (in Gy)
+It is produced, as an example, with a compression value of 32
Index: trunk/examples/extended/medical/DICOM/include/DicomDetectorConstruction.hh
===================================================================
--- trunk/examples/extended/medical/DICOM/include/DicomDetectorConstruction.hh	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/include/DicomDetectorConstruction.hh	(revision 1337)
@@ -97,4 +97,5 @@
   std::vector<G4Material*> fMaterials;  // list of new materials created to distinguish different density voxels that have the same original materials
   size_t* fMateIDs; // index of material of each voxel
+ //unsigned int* fMateIDs; // index of material of each voxel
 
   std::map<G4int,G4double> fDensityDiffs; // Density difference to distinguish material for each original material (by index)
Index: trunk/examples/extended/medical/DICOM/include/DicomHandler.hh
===================================================================
--- trunk/examples/extended/medical/DICOM/include/DicomHandler.hh	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/include/DicomHandler.hh	(revision 1337)
@@ -90,8 +90,11 @@
 
     void GetInformation(G4int &, char *);
-    G4double Pixel2density(G4int pixel);
+    G4float Pixel2density(G4int pixel);
     void ReadMaterialIndices( std::ifstream& finData);
-    size_t GetMaterialIndex( G4double density );
+    unsigned int GetMaterialIndex( G4float density );
     void StoreData(std::ofstream& foutG4DCM);
+    G4int read_defined_nested(FILE *, G4int);
+    void read_undefined_nested(FILE *);
+    void read_undefined_item(FILE *);
 
     short compression;
@@ -112,5 +115,5 @@
 
     G4int** tab;
-  std::map<G4double,G4String> fMaterialIndices;
+    std::map<G4float,G4String> fMaterialIndices;
 };
 #endif
Index: trunk/examples/extended/medical/DICOM/include/DicomNestedPhantomParameterisation.hh
===================================================================
--- trunk/examples/extended/medical/DICOM/include/DicomNestedPhantomParameterisation.hh	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/include/DicomNestedPhantomParameterisation.hh	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: DicomNestedPhantomParameterisation.hh,v 1.3 2009/01/27 10:44:58 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: DicomNestedPhantomParameterisation.hh,v 1.5 2009/11/19 16:15:23 chauvie Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 // --------------------------------------------------------------------
@@ -76,8 +76,9 @@
       // of all instances with the same mother/ancestor volume
 
-    size_t GetMaterialIndex( size_t nx, size_t ny, size_t nz) const;
-    size_t GetMaterialIndex( size_t copyNo) const;
+    unsigned int GetMaterialIndex( unsigned int nx, unsigned int ny, unsigned int nz) const;
+    unsigned int GetMaterialIndex( unsigned int copyNo) const;
+    //void SetMaterialIndices( unsigned int* matInd ) { fMaterialIndices = matInd; }
     void SetMaterialIndices( size_t* matInd ) { fMaterialIndices = matInd; }
-    void SetNoVoxel( size_t nx, size_t ny, size_t nz );
+    void SetNoVoxel( unsigned int nx, unsigned int ny, unsigned int nz );
 
     void ComputeTransformation(const G4int no,
@@ -121,5 +122,5 @@
     std::vector<G4Material*> fMaterials;
     size_t* fMaterialIndices; // Index in materials corresponding to each voxel
+//    unsigned int* fMaterialIndices; // Index in materials corresponding to each voxel
 };
-
 #endif
Index: trunk/examples/extended/medical/DICOM/include/DicomPhysicsList.hh
===================================================================
--- trunk/examples/extended/medical/DICOM/include/DicomPhysicsList.hh	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/include/DicomPhysicsList.hh	(revision 1337)
@@ -24,18 +24,7 @@
 // ********************************************************************
 //
-// The code was written by :
-//	*Louis Archambault louis.archambault@phy.ulaval.ca,
-//      *Luc Beaulieu beaulieu@phy.ulaval.ca
-//      +Vincent Hubert-Tremblay at tigre.2@sympatico.ca
-//
-//
-// *Centre Hospitalier Universitaire de Quebec (CHUQ),
-// Hotel-Dieu de Quebec, departement de Radio-oncologie
-// 11 cote du palais. Quebec, QC, Canada, G1R 2J6
-// tel (418) 525-4444 #6720
-// fax (418) 691 5268
-//
-// + Université Laval, Québec (QC) Canada
-//*******************************************************//
+// -------------------------------------------------------------------
+// $Id: DicomPhysicsList.hh,v 1.7 2009/10/26 11:21:01 chauvie Exp $
+// -------------------------------------------------------------------
 
 #ifndef DicomPhysicsList_h
@@ -43,9 +32,6 @@
 
 #include "G4VUserPhysicsList.hh"
-#include "globals.hh"
 
-class G4LowEnergyIonisation;
-class G4LowEnergyPhotoElectric;
-class G4LowEnergyBremsstrahlung;
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
 class DicomPhysicsList: public G4VUserPhysicsList
@@ -55,36 +41,24 @@
   ~DicomPhysicsList();
 
-  // Set Cuts
-  void SetGammaCut(G4double);
-  void SetElectronCut(G4double);
-  void SetPositronCut(G4double);
- 
-protected:
-  // Construct particle and physics
-  void ConstructParticle();
-  void ConstructProcess();
-
-  void SetCuts();
-
-  // these methods Construct particles
-  void ConstructBosons();
-  void ConstructLeptons();
-
-  // these methods Construct physics processes and register them
-  void ConstructGeneral();
-  void ConstructEM();
-
 private:
-
+  
   G4double cutForGamma;
   G4double cutForElectron;
   G4double cutForPositron;
+  
+protected:
+  
+  void ConstructParticle();
+  void ConstructBosons();
+  void ConstructLeptons();
+  void ConstructBaryons();
 
-  G4LowEnergyIonisation*  loweIon;
-  G4LowEnergyPhotoElectric* lowePhot;
-  G4LowEnergyBremsstrahlung* loweBrem;
-
+  void ConstructProcess();
+  void ConstructEM();
+  void ConstructHad();
+  void ConstructGeneral();
+  void SetCuts();
+  
 };
-
 #endif
 
Index: trunk/examples/extended/medical/DICOM/run.mac
===================================================================
--- trunk/examples/extended/medical/DICOM/run.mac	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/run.mac	(revision 1337)
@@ -1,7 +1,30 @@
+# S. Chauvie
+#
+# Macro file recommended for the use with DICOM example and built-in physic list.
+# This macro uses the physics list already contained in the Geant4 distribution
+# 
+
+#########################
+# Set of the verboses 
+#
 /control/verbose 1
+/tracking/verbose 0
 /run/verbose 1
-/tracking/verbose 1
+/event/verbose 0
+
+
+##########################
+# Random
+#
+
 /random/setDirectoryName .
 /random/setSavingFlag 1
 #/random/resetEngineFrom currentEvent.rndm1
+
+
+##########################
+# Initialisation procedure
+#
+/run/initialize
+
 /run/beamOn 100
Index: trunk/examples/extended/medical/DICOM/src/DicomDetectorConstruction.cc
===================================================================
--- trunk/examples/extended/medical/DICOM/src/DicomDetectorConstruction.cc	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/src/DicomDetectorConstruction.cc	(revision 1337)
@@ -314,5 +314,5 @@
   G4double densityDiff = 0.1; 
   std::map<G4int,G4double>  fDensityDiffs; // to be able to use a different densityDiff for each material
-  for( size_t ii = 0; ii < fOriginalMaterials.size(); ii++ ){
+  for( unsigned int ii = 0; ii < fOriginalMaterials.size(); ii++ ){
     fDensityDiffs[ii] = densityDiff; //currently all materials with same difference
   }
@@ -327,8 +327,10 @@
   //--- If first slice, initiliaze fMateIDs
   if( fZSliceHeaders.size() == 1 ) {
+    //fMateIDs = new unsigned int[fNoFiles*nVoxels];
     fMateIDs = new size_t[fNoFiles*nVoxels];
-  }
-
-  size_t mateID;
+
+  }
+
+  unsigned int mateID;
   G4int voxelCopyNo = (fZSliceHeaders.size()-1)*nVoxels; // number of voxels from previously read slices
   for( G4int ii = 0; ii < nVoxels; ii++, voxelCopyNo++ ){
@@ -353,5 +355,5 @@
     
     //-- Look if a material with this name is already created (because a previous voxel was already in this density bin)
-    size_t im;
+    unsigned int im;
     for( im = 0; im < fMaterials.size(); im++ ){
       if( fMaterials[im]->GetName() == newMateName ) {
@@ -377,5 +379,5 @@
   //----- Images must have the same dimension ... 
   fZSliceHeaderMerged = new DicomPatientZSliceHeader( *fZSliceHeaders[0] );
-  for( size_t ii = 1; ii < fZSliceHeaders.size(); ii++ ) {
+  for( unsigned int ii = 1; ii < fZSliceHeaders.size(); ii++ ) {
     *fZSliceHeaderMerged += *fZSliceHeaders[ii];
   };
Index: trunk/examples/extended/medical/DICOM/src/DicomEventAction.cc
===================================================================
--- trunk/examples/extended/medical/DICOM/src/DicomEventAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/src/DicomEventAction.cc	(revision 1337)
@@ -42,7 +42,4 @@
 #include "DicomEventAction.hh"
 #include "G4Event.hh"
-#include "G4TrajectoryContainer.hh"
-#include "G4Trajectory.hh"
-#include "G4VVisManager.hh"
 
 DicomEventAction::DicomEventAction():drawFlag("all")
@@ -55,28 +52,7 @@
 {
   G4cout << "EV: " << evt->GetEventID() << G4endl;
- }
-
-void DicomEventAction::EndOfEventAction(const G4Event* evt)
-{
-  // extract the trajectories and draw them
-
-  if (G4VVisManager::GetConcreteInstance())
-    {
-      G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
-      G4int nTrajectories = 0;
-      if ( trajectoryContainer )
-	nTrajectories = trajectoryContainer->entries();
-
-      for ( G4int i = 0;i < nTrajectories; i++ )
-        {
-	  G4Trajectory* trj = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
-	  if (drawFlag == "all")
-	    trj->DrawTrajectory(50);
-	  else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
-	    trj->DrawTrajectory(50);
-	  else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.))
-	    trj->DrawTrajectory(50);
-        }
-    }
 }
 
+void DicomEventAction::EndOfEventAction(const G4Event*)
+{
+}
Index: trunk/examples/extended/medical/DICOM/src/DicomHandler.cc
===================================================================
--- trunk/examples/extended/medical/DICOM/src/DicomHandler.cc	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/src/DicomHandler.cc	(revision 1337)
@@ -61,5 +61,5 @@
 
 DicomHandler::DicomHandler()
-    : DATABUFFSIZE(8192), LINEBUFFSIZE(128), FILENAMESIZE(512),
+    : DATABUFFSIZE(8192), LINEBUFFSIZE(5020), FILENAMESIZE(512),
       compression(0), nFiles(0), rows(0), columns(0),
       bitAllocated(0), maxPixelValue(0), minPixelValue(0),
@@ -98,8 +98,10 @@
     short readElementId;  // identify a particular type information
     short elementLength2; // deal with element length in 2 bytes
+    //unsigned int elementLength4; // deal with element length in 4 bytes
     G4int elementLength4; // deal with element length in 4 bytes
 
     char * data = new char[DATABUFFSIZE];
 
+ 
     // Read information up to the pixel data
     while(true) {
@@ -117,15 +119,19 @@
 	// Creating a tag to be identified afterward
 	G4int tagDictionary = readGroupId*0x10000 + readElementId;
-
-
-	// VR or element length
+	
+	// beginning of the pixels
+	    if(tagDictionary == 0x7FE00010) break;
+
+      // VR or element length
 	std::fread(buffer,2,1,dicom);
 	GetValue(buffer, elementLength2);
-
-	// If value representation (VR) is OB, OW, SQ, UN, 
+	  
+ 	// If value representation (VR) is OB, OW, SQ, UN, added OF and UT 
 	//the next length is 32 bits
 	if((elementLength2 == 0x424f ||  // "OB"
 	    elementLength2 == 0x574f ||  // "OW"
-	    elementLength2 == 0x5153 ||  // "SQ"
+	    elementLength2 == 0x464f ||  // "OF"
+	    elementLength2 == 0x5455 ||  // "UT"
+	    elementLength2 == 0x5153 || //  "SQ"
 	    elementLength2 == 0x4e55) && // "UN"
 	   !implicitEndian ) {           // explicit VR
@@ -136,34 +142,58 @@
 	    std::fread(buffer, 4, 1, dicom);
 	    GetValue(buffer, elementLength4);
-
-	    // beginning of the pixels
-	    if(tagDictionary == 0x7FE00010) break;
-
+	    
+	    if(elementLength2 == 0x5153)
+	    {
+	     if(elementLength4 == 0xFFFFFFFF)
+	      read_undefined_nested( dicom );
+	     else{
+	      if(read_defined_nested( dicom, elementLength4 )==0){
+	       G4cerr << "Reading defined nested functin failed!" << G4endl;
+	       exit(-10);	       }
+	      }
+	    } else  { 
 	    // Reading the information with data
 	    std::fread(data, elementLength4,1,dicom);
-
-
-	} else { // length is 16 bits :
-
-	    if(!implicitEndian || readGroupId == 2) {
-		// element length (2 bytes)
-		std::fread(buffer, 2, 1, dicom);
-		GetValue(buffer, elementLength2);
-		elementLength4 = elementLength2;
-
-	    } else { 
-		// element length (4 bytes)
-		if(std::fseek(dicom, -2, SEEK_CUR) != 0) {
-		    G4cerr << "[DicomHandler] fseek failed" << G4endl;
-		    exit(-10);
-		}
-		std::fread(buffer, 4, 1, dicom);
-		GetValue(buffer, elementLength4);
-	    }
-
-	    // beginning of the pixels
-	    if(tagDictionary == 0x7FE00010) break;
-
-	    std::fread(data, elementLength4, 1, dicom);
+	    }  
+
+		
+	}  else { 
+
+		if(!implicitEndian || readGroupId == 2) {  //  explicit with VR different than previous ones
+	    	
+		  //G4cout << "Reading  DICOM files with Explicit VR"<< G4endl;
+		  // element length (2 bytes)
+		  std::fread(buffer, 2, 1, dicom);
+		  GetValue(buffer, elementLength2);
+		  elementLength4 = elementLength2;
+		  
+		  
+	          
+		  std::fread(data, elementLength4, 1, dicom);
+	        
+		} else { 				 // Implicit VR
+
+                  //G4cout << "Reading  DICOM files with Implicit VR"<< G4endl;
+   
+		  // element length (4 bytes)
+		  if(std::fseek(dicom, -2, SEEK_CUR) != 0) {
+		      G4cerr << "[DicomHandler] fseek failed" << G4endl;
+		      exit(-10);}
+
+		  std::fread(buffer, 4, 1, dicom);
+		  GetValue(buffer, elementLength4);
+
+	          //G4cout <<  std::hex<< elementLength4 << G4endl;
+	      
+	          if(elementLength4 == 0xFFFFFFFF) 
+	           read_undefined_nested(dicom);
+		  else {
+	          
+	          
+		  std::fread(data, elementLength4, 1, dicom);
+	        
+		 } 
+		      
+	       } 
 	}
 
@@ -179,10 +209,10 @@
     G4String fnameG4DCM = G4String(filename2) + ".g4dcm";
     foutG4DCM.open(fnameG4DCM);
-    G4cout << " opened fnameG4DCM file " << fnameG4DCM << G4endl;
+    G4cout << "### Writing of " << fnameG4DCM << " ### " << G4endl;
 
     foutG4DCM << fMaterialIndices.size() << G4endl;
     //--- Write materials
-    size_t ii = 0;
-    std::map<G4double,G4String>::const_iterator ite;
+    unsigned int ii = 0;
+    std::map<G4float,G4String>::const_iterator ite;
     for( ite = fMaterialIndices.begin(); ite != fMaterialIndices.end(); ite++, ii++ ){
       foutG4DCM << ii << " " << (*ite).second << G4endl;
@@ -194,4 +224,5 @@
     foutG4DCM << -pixelSpacingY*columns/2 << " " << pixelSpacingY*columns/2 << G4endl;
     foutG4DCM << sliceLocation-sliceThickness/2. << " " << sliceLocation+sliceThickness/2. << G4endl;
+    //    foutG4DCM << compression << G4endl;
     
     ReadData( dicom, filename2 );
@@ -431,12 +462,12 @@
 void DicomHandler::ReadMaterialIndices( std::ifstream& finData)
 {
-  size_t nMate;
+  unsigned int nMate;
   G4String mateName;
-  G4double densityMax;
+  G4float densityMax;
   finData >> nMate;
   if( finData.eof() ) return;
 
   G4cout << " ReadMaterialIndices " << nMate << G4endl;
-  for( size_t ii = 0; ii < nMate; ii++ ){
+  for( unsigned int ii = 0; ii < nMate; ii++ ){
     finData >> mateName >> densityMax;
     fMaterialIndices[densityMax] = mateName;
@@ -446,8 +477,7 @@
 }
 
-size_t DicomHandler::GetMaterialIndex( G4double density )
+unsigned int DicomHandler::GetMaterialIndex( G4float density )
 {
-  size_t mateID;
-  std::map<G4double,G4String>::reverse_iterator ite;
+  std::map<G4float,G4String>::reverse_iterator ite;
   G4int ii = fMaterialIndices.size();
   for( ite = fMaterialIndices.rbegin(); ite != fMaterialIndices.rend(); ite++, ii-- ) {
@@ -508,19 +538,46 @@
 
     // Creation of .g4 files wich contains averaged density data
-
     char * nameProcessed = new char[FILENAMESIZE];
-    FILE* processed;
-
-    std::sprintf(nameProcessed,"%s.g4",filename2);
-    processed = std::fopen(nameProcessed,"w+b");
+    FILE* fileOut;
+
+    std::sprintf(nameProcessed,"%s.g4dcmb",filename2);
+    fileOut = std::fopen(nameProcessed,"w+b");
     std::printf("### Writing of %s ###\n",nameProcessed);
 
-    std::fwrite(&rows, 2, 1, processed);
-    std::fwrite(&columns, 2, 1, processed);
-    std::fwrite(&pixelSpacingX, 8, 1, processed);
-    std::fwrite(&pixelSpacingY, 8, 1, processed);
-    std::fwrite(&sliceThickness, 8, 1, processed);
-    std::fwrite(&sliceLocation, 8, 1, processed);
-    std::fwrite(&compression, 2, 1, processed);
+    unsigned int nMate = fMaterialIndices.size();
+    std::fwrite(&nMate, sizeof(unsigned int), 1, fileOut);
+    //--- Write materials
+    std::map<G4float,G4String>::const_iterator ite;
+    for( ite = fMaterialIndices.begin(); ite != fMaterialIndices.end(); ite++ ){
+      G4String mateName = (*ite).second;
+      for( G4int ii = (*ite).second.length(); ii < 40; ii++ ) {
+	mateName += " ";
+      }	 //mateName = const_cast<char*>(((*ite).second).c_str());
+
+      const char* mateNameC = mateName.c_str();
+      std::fwrite(mateNameC, sizeof(char),40, fileOut);
+    }
+
+    unsigned int rowsC = rows/compression;
+    unsigned int columnsC = columns/compression;
+    unsigned int planesC = 1;
+    G4float pixelLocationXM = -pixelSpacingX*rows/2.;
+    G4float pixelLocationXP = pixelSpacingX*rows/2.;
+    G4float pixelLocationYM = -pixelSpacingY*rows/2.;
+    G4float pixelLocationYP = pixelSpacingY*rows/2.;
+    G4float sliceLocationZM = sliceLocation-sliceThickness/2.;
+    G4float sliceLocationZP = sliceLocation+sliceThickness/2.;
+    //--- Write number of voxels (assume only one voxel in Z)
+    std::fwrite(&rowsC, sizeof(unsigned int), 1, fileOut);
+    std::fwrite(&columnsC, sizeof(unsigned int), 1, fileOut);
+    std::fwrite(&planesC, sizeof(unsigned int), 1, fileOut);
+    //--- Write minimum and maximum extensions
+    std::fwrite(&pixelLocationXM, sizeof(G4float), 1, fileOut);
+    std::fwrite(&pixelLocationXP, sizeof(G4float), 1, fileOut);
+    std::fwrite(&pixelLocationYM, sizeof(G4float), 1, fileOut);
+    std::fwrite(&pixelLocationYP, sizeof(G4float), 1, fileOut);
+    std::fwrite(&sliceLocationZM, sizeof(G4float), 1, fileOut);
+    std::fwrite(&sliceLocationZP, sizeof(G4float), 1, fileOut);
+    //    std::fwrite(&compression, sizeof(unsigned int), 1, fileOut);
 
     std::printf("%8i   %8i\n",rows,columns);
@@ -532,44 +589,84 @@
     G4int compSize = compression;
     G4int mean;
-    G4double density;
+    G4float density;
     G4bool overflow = false;
     G4int cpt=1;
 
+    //----- Write index of material for each pixel
     if(compSize == 1) { // no compression: each pixel has a density value)
-	for( G4int ww = 0; ww < rows; ww++) {
-	    for( G4int xx = 0; xx < columns; xx++) {
-		mean = tab[ww][xx];
-		density = Pixel2density(mean);
-		std::fwrite(&density, sizeof(G4double), 1, processed);
-            }
-        }
+      for( G4int ww = 0; ww < rows; ww++) {
+	for( G4int xx = 0; xx < columns; xx++) {
+	  mean = tab[ww][xx];
+	  density = Pixel2density(mean);
+	  unsigned int mateID = GetMaterialIndex( density );
+	  std::fwrite(&mateID, sizeof(unsigned int), 1, fileOut);
+	}
+      }
 
     } else {
-	// density value is the average of a square region of
-	// compression*compression pixels
-	for(G4int ww = 0; ww < rows ;ww += compSize ) {
-	    for(G4int xx = 0; xx < columns ;xx +=compSize ) {
-		overflow = false;
-		mean = 0;
-		for(int sumx = 0; sumx < compSize; sumx++) {
-		    for(int sumy = 0; sumy < compSize; sumy++) {
-			if(ww+sumy >= rows || xx+sumx >= columns) overflow = true;
-			mean += tab[ww+sumy][xx+sumx];
-		    }
-		    if(overflow) break;
-		}
-		mean /= compSize*compSize;
-		cpt = 1;
-
-		if(!overflow) {
-		    G4double density = Pixel2density(mean);
-		    std::fwrite(&density, sizeof(G4double), 1, processed);
-		}
+      // density value is the average of a square region of
+      // compression*compression pixels
+      for(G4int ww = 0; ww < rows ;ww += compSize ) {
+	for(G4int xx = 0; xx < columns ;xx +=compSize ) {
+	  overflow = false;
+	  mean = 0;
+	  for(int sumx = 0; sumx < compSize; sumx++) {
+	    for(int sumy = 0; sumy < compSize; sumy++) {
+	      if(ww+sumy >= rows || xx+sumx >= columns) overflow = true;
+	      mean += tab[ww+sumy][xx+sumx];
 	    }
-
-	}
-    }
-    std::fclose(processed);
-
+	    if(overflow) break;
+	  }
+	  mean /= compSize*compSize;
+	  cpt = 1;
+	  
+	  if(!overflow) {
+	    density = Pixel2density(mean);
+	    unsigned int mateID = GetMaterialIndex( density );
+	    std::fwrite(&mateID, sizeof(unsigned int), 1, fileOut);
+	  }
+	}
+	
+      }
+    }
+
+    //----- Write density for each pixel
+    if(compSize == 1) { // no compression: each pixel has a density value)
+      for( G4int ww = 0; ww < rows; ww++) {
+	for( G4int xx = 0; xx < columns; xx++) {
+	  mean = tab[ww][xx];
+	  density = Pixel2density(mean);
+	  std::fwrite(&density, sizeof(G4float), 1, fileOut);
+	}
+      }
+      
+    } else {
+      // density value is the average of a square region of
+      // compression*compression pixels
+      for(G4int ww = 0; ww < rows ;ww += compSize ) {
+	for(G4int xx = 0; xx < columns ;xx +=compSize ) {
+	  overflow = false;
+	  mean = 0;
+	  for(int sumx = 0; sumx < compSize; sumx++) {
+	    for(int sumy = 0; sumy < compSize; sumy++) {
+	      if(ww+sumy >= rows || xx+sumx >= columns) overflow = true;
+	      mean += tab[ww+sumy][xx+sumx];
+	    }
+	    if(overflow) break;
+	  }
+	  mean /= compSize*compSize;
+	  cpt = 1;
+	  
+	  if(!overflow) {
+	    density = Pixel2density(mean);
+	    std::fwrite(&density, sizeof(G4float), 1, fileOut);
+	  }
+	}
+	
+      }
+    }
+    
+    std::fclose(fileOut);
+    
     delete [] nameProcessed;
 
@@ -595,7 +692,7 @@
 */
 
-G4double DicomHandler::Pixel2density(G4int pixel)
+G4float DicomHandler::Pixel2density(G4int pixel)
 {
-    G4double density = -1.;
+    G4float density = -1.;
     G4int nbrequali = 0;
     G4double deltaCT = 0;
@@ -752,2 +849,99 @@
     _rval = *(Type *)_val;
 }
+
+G4int DicomHandler::read_defined_nested(FILE * nested,G4int SQ_Length)
+{
+  //      VARIABLES
+  unsigned short item_GroupNumber;
+  unsigned short item_ElementNumber;
+  G4int item_Length;
+  G4int items_array_length=0;
+  char * buffer= new char[LINEBUFFSIZE];
+  
+
+  while(items_array_length < SQ_Length)
+  {
+   std::fread(buffer, 2, 1, nested);
+   GetValue(buffer, item_GroupNumber);
+   
+   std::fread(buffer, 2, 1, nested);
+   GetValue(buffer, item_ElementNumber);
+   
+   std::fread(buffer, 4, 1, nested);
+   GetValue(buffer, item_Length);
+   
+   std::fread(buffer, item_Length, 1, nested);
+   
+   items_array_length= items_array_length+8+item_Length;
+  }
+ 
+  delete []buffer;
+  
+  if(SQ_Length>items_array_length)
+   return 0;
+  else
+   return 1;
+
+}
+
+void DicomHandler::read_undefined_nested(FILE * nested)
+{
+  //      VARIABLES
+  unsigned short item_GroupNumber;
+  unsigned short item_ElementNumber;
+  G4int item_Length;
+  char * buffer= new char[LINEBUFFSIZE];
+  
+
+  do
+  {
+   std::fread(buffer, 2, 1, nested);
+   GetValue(buffer, item_GroupNumber);
+   
+   std::fread(buffer, 2, 1, nested);
+   GetValue(buffer, item_ElementNumber);
+   
+   std::fread(buffer, 4, 1, nested);
+   GetValue(buffer, item_Length);
+   
+   if(item_Length!=0xffffffff)
+    std::fread(buffer, item_Length, 1, nested);
+   else
+    read_undefined_item(nested);
+   
+   
+  }while(item_GroupNumber!=0xFFFE || item_ElementNumber!=0xE0DD || item_Length!=0);
+
+  delete [] buffer;
+
+}
+
+void DicomHandler::read_undefined_item(FILE * nested)
+{
+  //      VARIABLES
+ unsigned short item_GroupNumber;
+ unsigned short item_ElementNumber;
+ G4int item_Length;
+ char *buffer= new char[LINEBUFFSIZE];
+ 
+ do
+ {
+  std::fread(buffer, 2, 1, nested);
+  GetValue(buffer, item_GroupNumber);
+   
+  std::fread(buffer, 2, 1, nested);
+  GetValue(buffer, item_ElementNumber);
+   
+  std::fread(buffer, 4, 1, nested);
+  GetValue(buffer, item_Length);
+
+
+  if(item_Length!=0)
+   std::fread(buffer,item_Length,1,nested);
+
+ }
+ while(item_GroupNumber!=0xFFFE || item_ElementNumber!=0xE00D || item_Length!=0);
+ 
+ delete []buffer;
+ 
+}
Index: trunk/examples/extended/medical/DICOM/src/DicomNestedPhantomParameterisation.cc
===================================================================
--- trunk/examples/extended/medical/DICOM/src/DicomNestedPhantomParameterisation.cc	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/src/DicomNestedPhantomParameterisation.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: DicomNestedPhantomParameterisation.cc,v 1.5 2009/01/27 10:44:58 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: DicomNestedPhantomParameterisation.cc,v 1.6 2009/11/10 18:48:46 arce Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 // --------------------------------------------------------------------
@@ -53,5 +53,5 @@
 
 void DicomNestedPhantomParameterisation::
-SetNoVoxel( size_t nx, size_t ny, size_t nz )
+SetNoVoxel( unsigned int nx, unsigned int ny, unsigned int nz )
 {
   fnX = nx;
@@ -80,5 +80,5 @@
   G4int copyNo = ix + fnX*iy + fnX*fnY*iz;
 
-  size_t matIndex = GetMaterialIndex(copyNo);
+  unsigned int matIndex = GetMaterialIndex(copyNo);
 
   return fMaterials[ matIndex ];
@@ -86,6 +86,6 @@
 
 //------------------------------------------------------------------
-size_t DicomNestedPhantomParameterisation::
-GetMaterialIndex( size_t copyNo ) const
+unsigned int DicomNestedPhantomParameterisation::
+GetMaterialIndex( unsigned int copyNo ) const
 {
   return *(fMaterialIndices+copyNo);
Index: trunk/examples/extended/medical/DICOM/src/DicomPatientZSliceHeader.cc
===================================================================
--- trunk/examples/extended/medical/DICOM/src/DicomPatientZSliceHeader.cc	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/src/DicomPatientZSliceHeader.cc	(revision 1337)
@@ -148,5 +148,5 @@
     G4Exception("");
   }
-  for( size_t ii = 0; ii < fMaterialNames.size(); ii++ ) {
+  for( unsigned int ii = 0; ii < fMaterialNames.size(); ii++ ) {
     if( fMaterialNames[ii] != fMaterialNames2[ii] ) {
       G4cerr << "DicomPatientZSliceHeader error adding two slice headers: !!! Different material number " << ii << " : " << fMaterialNames[ii] << " =? " << fMaterialNames2[ii] << G4endl;
Index: trunk/examples/extended/medical/DICOM/src/DicomPhantomParameterisationColour.cc
===================================================================
--- trunk/examples/extended/medical/DICOM/src/DicomPhantomParameterisationColour.cc	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/src/DicomPhantomParameterisationColour.cc	(revision 1337)
@@ -77,5 +77,5 @@
   if( physVol ) {
     G4String mateName = mate->GetName();
-    size_t iuu = mateName.find("__");
+    unsigned int iuu = mateName.find("__");
     if( iuu != std::string::npos ) {
       mateName = mateName.substr( 0, iuu );
Index: trunk/examples/extended/medical/DICOM/src/DicomPhysicsList.cc
===================================================================
--- trunk/examples/extended/medical/DICOM/src/DicomPhysicsList.cc	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/src/DicomPhysicsList.cc	(revision 1337)
@@ -24,62 +24,54 @@
 // ********************************************************************
 //
-// The code was written by :
-//	*Louis Archambault louis.archambault@phy.ulaval.ca,
-//      *Luc Beaulieu beaulieu@phy.ulaval.ca
-//      +Vincent Hubert-Tremblay at tigre.2@sympatico.ca
-//
-//
-// *Centre Hospitalier Universitaire de Quebec (CHUQ),
-// Hotel-Dieu de Quebec, departement de Radio-oncologie
-// 11 cote du palais. Quebec, QC, Canada, G1R 2J6
-// tel (418) 525-4444 #6720
-// fax (418) 691 5268
-//
-// + Université Laval, Québec (QC) Canada
-//
-// History: 30.11.07  P.Arce default cut changed to 1 mm
-//*******************************************************
-
-#include "DicomPhysicsList.hh"
+// -------------------------------------------------------------------
+// $Id: DicomPhysicsList.cc,v 1.11 2009/10/26 11:20:49 chauvie Exp $
+// -------------------------------------------------------------------
 
 #include "G4ParticleDefinition.hh"
-#include "G4ParticleWithCuts.hh"
 #include "G4ProcessManager.hh"
 #include "G4ParticleTypes.hh"
-#include "G4ParticleTable.hh"
-#include "G4Material.hh"
-#include "G4UnitsTable.hh"
-#include "G4ios.hh"
+#include "G4StepLimiter.hh"
+#include "G4BaryonConstructor.hh"	              
+#include "G4IonConstructor.hh"	 
+#include "G4MesonConstructor.hh"	 
+
+#include "DicomPhysicsList.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
 DicomPhysicsList::DicomPhysicsList():  G4VUserPhysicsList()
 {
-  defaultCutValue = 1.*mm;
-  cutForGamma     = 1.*mm;
+  defaultCutValue = 0.01*micrometer;
+  cutForGamma     = defaultCutValue;
   cutForElectron  = defaultCutValue;
   cutForPositron  = defaultCutValue;
-
-  SetVerboseLevel(0);
-}
+  SetVerboseLevel(1);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
 DicomPhysicsList::~DicomPhysicsList()
 {}
 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
 void DicomPhysicsList::ConstructParticle()
 {
-  // In this method, static member functions should be called
-  // for all particles which you want to use.
-  // This ensures that objects of these particle types will be
-  // created in the program.
-
   ConstructBosons();
   ConstructLeptons();
-}
+  ConstructBaryons();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
 void DicomPhysicsList::ConstructBosons()
-{
+{ 
   // gamma
   G4Gamma::GammaDefinition();
 
-}
+  // optical photon
+  G4OpticalPhoton::OpticalPhotonDefinition();
+}
+ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
 void DicomPhysicsList::ConstructLeptons()
@@ -90,121 +82,276 @@
 }
 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void DicomPhysicsList::ConstructBaryons()
+{
+  //  baryons
+  G4BaryonConstructor bConstructor;
+  bConstructor.ConstructParticle();
+
+  G4IonConstructor iConstructor;
+  iConstructor.ConstructParticle();
+
+  G4MesonConstructor mConstructor;
+  mConstructor.ConstructParticle();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
 void DicomPhysicsList::ConstructProcess()
 {
   AddTransportation();
   ConstructEM();
-}
-
-#include "G4MultipleScattering.hh"
+  ConstructHad();
+  ConstructGeneral();
+}
+
+// *** Processes and models
+
 // gamma
-#include "G4LowEnergyRayleigh.hh"
-#include "G4LowEnergyPhotoElectric.hh"
-#include "G4LowEnergyCompton.hh"
-#include "G4LowEnergyGammaConversion.hh"
+
+#include "G4PhotoElectricEffect.hh"
+#include "G4LivermorePhotoElectricModel.hh"
+
+#include "G4ComptonScattering.hh"
+#include "G4LivermoreComptonModel.hh"
+
+#include "G4GammaConversion.hh"
+#include "G4LivermoreGammaConversionModel.hh"
+
+#include "G4RayleighScattering.hh" 
+#include "G4LivermoreRayleighModel.hh"
+
 // e-
-#include "G4LowEnergyIonisation.hh"
-#include "G4LowEnergyBremsstrahlung.hh"
+
+#include "G4eMultipleScattering.hh"
+#include "G4UniversalFluctuation.hh"
+
+#include "G4eIonisation.hh"
+#include "G4LivermoreIonisationModel.hh"
+
+#include "G4eBremsstrahlung.hh"
+#include "G4LivermoreBremsstrahlungModel.hh"
+
 // e+
-#include "G4eIonisation.hh"
-#include "G4eBremsstrahlung.hh"
+
 #include "G4eplusAnnihilation.hh"
 
+// mu
+
+#include "G4MuIonisation.hh"
+#include "G4MuBremsstrahlung.hh"
+#include "G4MuPairProduction.hh"
+
+// hadrons
+
+#include "G4hMultipleScattering.hh"
+#include "G4MscStepLimitType.hh"
+
+#include "G4hBremsstrahlung.hh"
+#include "G4hPairProduction.hh"
+
+#include "G4hIonisation.hh"
+#include "G4ionIonisation.hh"
+#include "G4IonParametrisedLossModel.hh"
+
+//
+
+#include "G4LossTableManager.hh"
+#include "G4EmProcessOptions.hh"
+
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
 void DicomPhysicsList::ConstructEM()
 {
+  theParticleIterator->reset();
+
+  while( (*theParticleIterator)() ){
+
+    G4ParticleDefinition* particle = theParticleIterator->value();
+    G4ProcessManager* pmanager = particle->GetProcessManager();
+    G4String particleName = particle->GetParticleName();
+
+    if (particleName == "gamma") {
+
+
+      G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
+      G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel = new G4LivermorePhotoElectricModel();
+      thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
+      pmanager->AddDiscreteProcess(thePhotoElectricEffect);
+
+      G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
+      G4LivermoreComptonModel* theLivermoreComptonModel = new G4LivermoreComptonModel();
+      theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
+      pmanager->AddDiscreteProcess(theComptonScattering);
+
+      G4GammaConversion* theGammaConversion = new G4GammaConversion();
+      G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel = new G4LivermoreGammaConversionModel();
+      theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
+      pmanager->AddDiscreteProcess(theGammaConversion);
+
+      G4RayleighScattering* theRayleigh = new G4RayleighScattering();
+      G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
+      theRayleigh->AddEmModel(0, theRayleighModel);
+      pmanager->AddDiscreteProcess(theRayleigh);
+      
+      pmanager->AddProcess(new G4StepLimiter(), -1, -1, 5);
+      
+    } else if (particleName == "e-") {
+     
+      G4eMultipleScattering* msc = new G4eMultipleScattering();
+      msc->SetStepLimitType(fUseDistanceToBoundary);
+      pmanager->AddProcess(msc,                   -1, 1, 1);
+      
+      // Ionisation
+      G4eIonisation* eIoni = new G4eIonisation();
+      eIoni->AddEmModel(0, new G4LivermoreIonisationModel(), new G4UniversalFluctuation() );
+      eIoni->SetStepFunction(0.2, 100*um); //     
+      pmanager->AddProcess(eIoni,                 -1, 2, 2);
+      
+      // Bremsstrahlung
+      G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
+      eBrem->AddEmModel(0, new G4LivermoreBremsstrahlungModel());
+      pmanager->AddProcess(eBrem, 		  -1,-3, 3);
+
+      pmanager->AddProcess(new G4StepLimiter(), -1, -1, 4);
+      
+    } else if (particleName == "e+") {
+
+      // Identical to G4EmStandardPhysics_option3
+    
+      G4eMultipleScattering* msc = new G4eMultipleScattering();
+      msc->SetStepLimitType(fUseDistanceToBoundary);
+      pmanager->AddProcess(msc,                   -1, 1, 1);
+
+      G4eIonisation* eIoni = new G4eIonisation();
+      eIoni->SetStepFunction(0.2, 100*um);      
+      pmanager->AddProcess(eIoni,                 -1, 2, 2);
+      
+      pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3);
+      
+      pmanager->AddProcess(new G4eplusAnnihilation,0,-1, 4);
+      
+      pmanager->AddProcess(new G4StepLimiter(), -1, -1, 5);
+
+    } else if (particleName == "GenericIon") {
+
+      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
+
+      G4ionIonisation* ionIoni = new G4ionIonisation();
+      ionIoni->SetEmModel(new G4IonParametrisedLossModel());
+      ionIoni->SetStepFunction(0.1, 20*um);
+      pmanager->AddProcess(ionIoni,                   -1, 2, 2);
+
+      pmanager->AddProcess(new G4StepLimiter(), -1, -1, 3);
+
+    } else if (particleName == "alpha" ||
+               particleName == "He3" ) {
+
+      // Identical to G4EmStandardPhysics_option3
+      
+      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
+
+      G4ionIonisation* ionIoni = new G4ionIonisation();
+      ionIoni->SetStepFunction(0.1, 20*um);
+      pmanager->AddProcess(ionIoni,                   -1, 2, 2);
+
+      pmanager->AddProcess(new G4StepLimiter(), -1, -1, 3);
+    }
+
+   //
+
+  }
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "G4HadronElasticProcess.hh"
+#include "G4LElastic.hh"
+
+#include "G4AlphaInelasticProcess.hh"
+#include "G4BinaryLightIonReaction.hh"
+#include "G4TripathiCrossSection.hh"
+#include "G4IonsShenCrossSection.hh"
+#include "G4LEAlphaInelastic.hh"
+
+void DicomPhysicsList::ConstructHad()
+{
+
+  G4HadronElasticProcess * theElasticProcess = new G4HadronElasticProcess;
+  theElasticProcess->RegisterMe( new G4LElastic() );
+
   theParticleIterator->reset();
   while( (*theParticleIterator)() )
-    {
-      G4ParticleDefinition* particle = theParticleIterator->value();
-      G4ProcessManager* pmanager = particle->GetProcessManager();
-      G4String particleName = particle->GetParticleName();
-
-      //processes
-      lowePhot = new  G4LowEnergyPhotoElectric("LowEnPhotoElec");
-      loweIon  = new G4LowEnergyIonisation("LowEnergyIoni");
-      loweBrem = new G4LowEnergyBremsstrahlung("LowEnBrem");
-
-      if (particleName == "gamma")
-        {
-	  //gamma
-	  pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh);
-	  pmanager->AddDiscreteProcess(lowePhot);
-	  pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
-	  pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion);
-
-        }
-      else if (particleName == "e-")
-        {
-	  //electron
-	  pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
-	  pmanager->AddProcess(loweIon,     -1, 2,2);
-	  pmanager->AddProcess(loweBrem,    -1,-1,3);
-
-        }
-      else if (particleName == "e+")
-        {
-	  //positron
-	  pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
-	  pmanager->AddProcess(new G4eIonisation,        -1, 2,2);
-	  pmanager->AddProcess(new G4eBremsstrahlung,    -1,-1,3);
-	  pmanager->AddProcess(new G4eplusAnnihilation,   0,-1,4);
-
-        }
-    }
-}
-#include "G4Decay.hh"
+  {
+    G4ParticleDefinition* particle = theParticleIterator->value();
+    G4ProcessManager* pManager = particle->GetProcessManager();
+
+    if (particle->GetParticleName() == "alpha") 
+       { 
+
+ 	  // INELASTIC SCATTERING
+	  // Binary Cascade
+  	  G4BinaryLightIonReaction* theBC = new G4BinaryLightIonReaction();
+  	  theBC -> SetMinEnergy(80.*MeV);
+  	  theBC -> SetMaxEnergy(40.*GeV);
+  
+  	  // TRIPATHI CROSS SECTION
+  	  // Implementation of formulas in analogy to NASA technical paper 3621 by 
+  	  // Tripathi, et al. Cross-sections for ion ion scattering
+  	  G4TripathiCrossSection* TripathiCrossSection = new G4TripathiCrossSection;
+  
+  	  // IONS SHEN CROSS SECTION
+  	  // Implementation of formulas 
+  	  // Shen et al. Nuc. Phys. A 491 130 (1989) 
+  	  // Total Reaction Cross Section for Heavy-Ion Collisions
+  	  G4IonsShenCrossSection* aShen = new G4IonsShenCrossSection;
+  
+  	  // Final state production model for Alpha inelastic scattering below 20 GeV
+  	  G4LEAlphaInelastic* theAIModel = new G4LEAlphaInelastic;
+  	  theAIModel -> SetMaxEnergy(100.*MeV);
+
+	  G4AlphaInelasticProcess * theIPalpha = new G4AlphaInelasticProcess;		  
+	  theIPalpha->AddDataSet(TripathiCrossSection);
+	  theIPalpha->AddDataSet(aShen);
+
+	  // Register the Alpha Inelastic and Binary Cascade Model
+	  theIPalpha->RegisterMe(theAIModel);
+	  theIPalpha->RegisterMe(theBC);
+	  
+	  // Activate the alpha inelastic scattering using the alpha inelastic and binary cascade model
+	  pManager -> AddDiscreteProcess(theIPalpha);
+	  
+	  // Activate the Hadron Elastic Process
+	  pManager -> AddDiscreteProcess(theElasticProcess); 
+            
+       }
+  }
+
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
 void DicomPhysicsList::ConstructGeneral()
-{
-  // Add Decay Process
-  G4Decay* theDecayProcess = new G4Decay();
-  theParticleIterator->reset();
-  while( (*theParticleIterator)() )
-    {
-      G4ParticleDefinition* particle = theParticleIterator->value();
-      G4ProcessManager* pmanager = particle->GetProcessManager();
-      if (theDecayProcess->IsApplicable(*particle))
-        {
-	  pmanager ->AddProcess(theDecayProcess);
-	  // set ordering for PostStepDoIt and AtRestDoIt
-	  pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
-	  pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
-        }
-    }
-}
+{ }
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
 void DicomPhysicsList::SetCuts()
 {
-  if (verboseLevel >0)
-    {
-      G4cout << "DicomPhysicsList::SetCuts:";
-      G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
-    }
-
+  if (verboseLevel >0){
+    G4cout << "DicomPhysicsList::SetCuts:";
+    G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
+  }  
+  
   // set cut values for gamma at first and for e- second and next for e+,
-  // because some processes for e+/e- need cut values for gamma
+  // because some processes for e+/e- need cut values for gamma 
   SetCutValue(cutForGamma, "gamma");
   SetCutValue(cutForElectron, "e-");
   SetCutValue(cutForPositron, "e+");
-
-
-  if (verboseLevel>0)
-    DumpCutValuesTable();
-}
-
-void DicomPhysicsList::SetGammaCut(G4double val)
-{
-  ResetCuts();
-  cutForGamma = val;
-}
-
-void DicomPhysicsList::SetElectronCut(G4double val)
-{
-  //  ResetCuts();
-  cutForElectron = val;
-}
-
-void DicomPhysicsList::SetPositronCut(G4double val)
-{
-  //  ResetCuts();
-  cutForPositron = val;
-}
-
+  
+  if (verboseLevel>0) DumpCutValuesTable();
+
+}
+
Index: trunk/examples/extended/medical/DICOM/src/DicomPrimaryGeneratorAction.cc
===================================================================
--- trunk/examples/extended/medical/DICOM/src/DicomPrimaryGeneratorAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/src/DicomPrimaryGeneratorAction.cc	(revision 1337)
@@ -74,5 +74,5 @@
   particleGun->SetParticleEnergy(5.*MeV);
   //put it at SAD = 1 m on xy plane of central slice
-  particleGun->SetParticlePosition(G4ThreeVector(0.,-99.9*cm,-27.));
+  particleGun->SetParticlePosition(G4ThreeVector(0.,-99.9*cm,87.5*mm));
   //particleGun->SetParticlePosition(G4ThreeVector(0.,0.,-22.));
   particleGun->GeneratePrimaryVertex(anEvent);
Index: trunk/examples/extended/medical/DICOM/vis.mac
===================================================================
--- trunk/examples/extended/medical/DICOM/vis.mac	(revision 1230)
+++ trunk/examples/extended/medical/DICOM/vis.mac	(revision 1337)
@@ -1,15 +1,75 @@
-/control/verbose 2
+surface/control/verbose 2
 /run/verbose 2
-#visualisation
-/vis/scene/create
-/vis/open OGLIX
+#
+# Use this open statement to create an OpenGL view:
+#/vis/open OGL 600x600-0+0
+#
+# Use this open statement to create a .prim file suitable for
+# viewing in DAWN:
 #/vis/open DAWNFILE
+#
+# Use this open statement to create a .heprep file suitable for
+# viewing in HepRApp:
+#/vis/open HepRepFile
+#
+# Use this open statement to create a .wrl file suitable for
+# viewing in a VRML viewer:
 /vis/open VRML2FILE
-/vis/viewer/update
-/vis/viewer/zoom 5
-/tracking/storeTrajectory 1
-/vis/scene/endOfEventAction accumulate
+#
+# Disable auto refresh and quieten vis messages whilst scene and
+# trajectories are established:
+/vis/viewer/set/autoRefresh false
+/vis/verbose errors
+#
+# Draw geometry:
+/vis/drawVolume
+#
+# Specify view angle:
+#/vis/viewer/set/viewpointThetaPhi 90. 0.
+#
+# Specify zoom value:
+/vis/viewer/zoom 5.
+#
+# Specify style (surface or wireframe):
+#/vis/viewer/set/style wireframe
+#
+# Draw coordinate axes:
+#/vis/scene/add/axes 0 0 0 1 m
+#
+# Draw smooth trajectories at end of event, showing trajectory points
+# as markers 2 pixels wide:
+/vis/scene/add/trajectories smooth
+/vis/modeling/trajectories/create/drawByCharge
+/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
+/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
+# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
+#
+# Draw hits at end of event:
+#/vis/scene/add/hits
+#
+# To draw only gammas:
+#/vis/filtering/trajectories/create/particleFilter
+#/vis/filtering/trajectories/particleFilter-0/add gamma
+#
+# To invert the above, drawing all particles except gammas,
+# keep the above two lines but also add:
+#/vis/filtering/trajectories/particleFilter-0/invert true
+#
+# Many other options are available with /vis/modeling and /vis/filtering.
+# For example, to select colour by particle ID:
+#/vis/modeling/trajectories/create/drawByParticleID
+#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
+#
+# To superimpose all of the events from a given run:
+/vis/scene/endOfEventAction accumulate 10
+#
+# Re-establish auto refreshing and verbosity:
+/vis/viewer/set/autoRefresh true
+/vis/verbose warnings
+#
+# For file-based drivers, use this to create an empty detector view:
+#/vis/viewer/flush
+#
 /tracking/verbose 1
 /run/beamOn 10
-/vis/viewer/update
 
Index: trunk/examples/extended/medical/GammaTherapy/GNUmakefile
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/GNUmakefile	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/GNUmakefile	(revision 1337)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.3 2008/06/11 15:17:57 vnivanch Exp $
+# $Id: GNUmakefile,v 1.4 2010/01/11 16:43:05 gcosmo Exp $
 # --------------------------------------------------------------
 # GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
@@ -9,5 +9,5 @@
 
 ifndef G4INSTALL
-  G4INSTALL = ../geant4
+  G4INSTALL = ../../../..
 endif
 
Index: trunk/examples/extended/medical/GammaTherapy/GammaTherapy.cc
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/GammaTherapy.cc	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/GammaTherapy.cc	(revision 1337)
@@ -91,5 +91,5 @@
   if (argc==1)   // Define UI terminal for interactive mode
     {
-      visManager = new G4VisExecutive();
+      visManager = new G4VisExecutive("Quiet");
       visManager->Initialize();
       G4UIsession * session;
Index: trunk/examples/extended/medical/GammaTherapy/GammaTherapy.in
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/GammaTherapy.in	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/GammaTherapy.in	(revision 1337)
@@ -13,6 +13,6 @@
 /testem/phys/addPhysics       emstandard
 #/testem/phys/addPhysics      emstandard_opt2
-#/testem/phys/addPhysics       penelope
-#/testem/phys/addPhysics       livermore
+#/testem/phys/addPhysics       empenelope
+#/testem/phys/addPhysics       emlivermore
 #/testem/phys/addPhysics      step_limit
 #
Index: trunk/examples/extended/medical/GammaTherapy/GammaTherapy.out
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/GammaTherapy.out	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/GammaTherapy.out	(revision 1337)
@@ -1,5 +1,9 @@
+
+        ############################################
+        !!! WARNING - FPE detection is activated !!!
+        ############################################
 
 *************************************************************
- Geant4 version Name: global-V09-00-03    (9-May-2008)
+ Geant4 version Name: geant4-09-03-ref-06    (25-June-2010)
                       Copyright : Geant4 Collaboration
                       Reference : NIM A 506 (2003), 250-303
@@ -10,57 +14,57 @@
 ***** Table : Nb of materials = 6 *****
 
- Material:    G4_Be     density:  1.848 g/cm3   RadL:  35.276 cm   Imean:  63.700 eV 
+ Material:    G4_Be     density:  1.848 g/cm3   RadL:  35.276 cm   Nucl.Int.Length:  39.449 cm   Imean:  63.700 eV 
    --->  Element: Be (Be)   Z =  4.0   N =   9.0   A =   9.01 g/mole
-   --->  Isotope:    Be   Z =  4   N =   9   A =   9.01 g/mole   abundance: 100.00 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
-
- Material:     G4_W     density: 19.300 g/cm3   RadL:   3.504 mm   Imean: 727.000 eV 
+   --->  Isotope:   Be9   Z =  4   N =   9   A =   9.01 g/mole   abundance: 100.00 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
+
+ Material:     G4_W     density: 19.300 g/cm3   RadL:   3.504 mm   Nucl.Int.Length:  10.310 cm   Imean: 727.000 eV 
    --->  Element: W (W)   Z = 74.0   N = 183.9   A = 183.84 g/mole
-   --->  Isotope:     W   Z = 74   N = 180   A = 179.95 g/mole   abundance:   0.12 %
-   --->  Isotope:     W   Z = 74   N = 182   A = 181.95 g/mole   abundance:  26.50 %
-   --->  Isotope:     W   Z = 74   N = 183   A = 182.95 g/mole   abundance:  14.31 %
-   --->  Isotope:     W   Z = 74   N = 184   A = 183.95 g/mole   abundance:  30.64 %
-   --->  Isotope:     W   Z = 74   N = 186   A = 185.95 g/mole   abundance:  28.43 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
-
- Material:    G4_He     density:  0.166 mg/cm3  RadL:   5.671 km   Imean:  41.800 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Isotope:  W180   Z = 74   N = 180   A = 179.95 g/mole   abundance:   0.12 %
+   --->  Isotope:  W182   Z = 74   N = 182   A = 181.95 g/mole   abundance:  26.50 %
+   --->  Isotope:  W183   Z = 74   N = 183   A = 182.95 g/mole   abundance:  14.31 %
+   --->  Isotope:  W184   Z = 74   N = 184   A = 183.95 g/mole   abundance:  30.64 %
+   --->  Isotope:  W186   Z = 74   N = 186   A = 185.95 g/mole   abundance:  28.43 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
+
+ Material:    G4_He     density:  0.166 kg/m3   RadL:   5.671 km   Nucl.Int.Length:   3.343 km   Imean:  41.800 eV   temperature: 273.15 K  pressure:   1.00 atm
    --->  Element: He (He)   Z =  2.0   N =   4.0   A =   4.00 g/mole
-   --->  Isotope:    He   Z =  2   N =   3   A =   3.02 g/mole   abundance:   0.00 %
-   --->  Isotope:    He   Z =  2   N =   4   A =   4.00 g/mole   abundance: 100.00 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
-
- Material: G4_WATER H_2O   density:  1.000 g/cm3   RadL:  36.083 cm   Imean:  75.000 eV 
+   --->  Isotope:   He3   Z =  2   N =   3   A =   3.02 g/mole   abundance:   0.00 %
+   --->  Isotope:   He4   Z =  2   N =   4   A =   4.00 g/mole   abundance: 100.00 %  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
+
+ Material: G4_WATER H_2O   density:  1.000 g/cm3   RadL:  36.083 cm   Nucl.Int.Length:  75.505 cm   Imean:  78.000 eV 
    --->  Element: H (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole
-   --->  Isotope:     H   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
-   --->  Isotope:     H   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:  11.19 %  ElmAbundance  66.67 %
+   --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
+   --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:  11.19 %  ElmAbundance  66.67 %
    --->  Element: O (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole
-   --->  Isotope:     O   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
-   --->  Isotope:     O   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
-   --->  Isotope:     O   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:  88.81 %  ElmAbundance  33.33 %
-
- Material:   G4_AIR     density:  1.205 mg/cm3  RadL: 303.921 m    Imean:  85.700 eV   temperature: 273.15 K  pressure:   1.00 atm
+   --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
+   --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
+   --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:  88.81 %  ElmAbundance  33.33 %
+
+ Material:   G4_AIR     density:  1.205 mg/cm3  RadL: 303.921 m    Nucl.Int.Length: 710.137 m    Imean:  85.700 eV   temperature: 273.15 K  pressure:   1.00 atm
    --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
-   --->  Isotope:     C   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
-   --->  Isotope:     C   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:   0.01 %  ElmAbundance   0.02 %
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:   0.01 %  ElmAbundance   0.02 %
    --->  Element: N (N)   Z =  7.0   N =  14.0   A =  14.01 g/mole
-   --->  Isotope:     N   Z =  7   N =  14   A =  14.00 g/mole   abundance:  99.63 %
-   --->  Isotope:     N   Z =  7   N =  15   A =  15.00 g/mole   abundance:   0.37 %  ElmMassFraction:  75.53 %  ElmAbundance  78.44 %
+   --->  Isotope:   N14   Z =  7   N =  14   A =  14.00 g/mole   abundance:  99.63 %
+   --->  Isotope:   N15   Z =  7   N =  15   A =  15.00 g/mole   abundance:   0.37 %  ElmMassFraction:  75.53 %  ElmAbundance  78.44 %
    --->  Element: O (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole
-   --->  Isotope:     O   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
-   --->  Isotope:     O   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
-   --->  Isotope:     O   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:  23.18 %  ElmAbundance  21.07 %
+   --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
+   --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
+   --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:  23.18 %  ElmAbundance  21.07 %
    --->  Element: Ar (Ar)   Z = 18.0   N =  40.0   A =  39.95 g/mole
-   --->  Isotope:    Ar   Z = 18   N =  36   A =  35.97 g/mole   abundance:   0.34 %
-   --->  Isotope:    Ar   Z = 18   N =  38   A =  37.96 g/mole   abundance:   0.06 %
-   --->  Isotope:    Ar   Z = 18   N =  40   A =  39.96 g/mole   abundance:  99.60 %  ElmMassFraction:   1.28 %  ElmAbundance   0.47 %
-
- Material: G4_MYLAR     density:  1.400 g/cm3   RadL:  28.536 cm   Imean:  78.700 eV 
+   --->  Isotope:  Ar36   Z = 18   N =  36   A =  35.97 g/mole   abundance:   0.34 %
+   --->  Isotope:  Ar38   Z = 18   N =  38   A =  37.96 g/mole   abundance:   0.06 %
+   --->  Isotope:  Ar40   Z = 18   N =  40   A =  39.96 g/mole   abundance:  99.60 %  ElmMassFraction:   1.28 %  ElmAbundance   0.47 %
+
+ Material: G4_MYLAR     density:  1.400 g/cm3   RadL:  28.536 cm   Nucl.Int.Length:  55.961 cm   Imean:  78.700 eV 
    --->  Element: H (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole
-   --->  Isotope:     H   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
-   --->  Isotope:     H   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:   4.20 %  ElmAbundance  36.36 %
+   --->  Isotope:    H1   Z =  1   N =   1   A =   1.01 g/mole   abundance:  99.99 %
+   --->  Isotope:    H2   Z =  1   N =   2   A =   2.01 g/mole   abundance:   0.01 %  ElmMassFraction:   4.20 %  ElmAbundance  36.36 %
    --->  Element: C (C)   Z =  6.0   N =  12.0   A =  12.01 g/mole
-   --->  Isotope:     C   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
-   --->  Isotope:     C   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:  62.50 %  ElmAbundance  45.46 %
+   --->  Isotope:   C12   Z =  6   N =  12   A =  12.00 g/mole   abundance:  98.93 %
+   --->  Isotope:   C13   Z =  6   N =  13   A =  13.00 g/mole   abundance:   1.07 %  ElmMassFraction:  62.50 %  ElmAbundance  45.46 %
    --->  Element: O (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole
-   --->  Isotope:     O   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
-   --->  Isotope:     O   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
-   --->  Isotope:     O   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:  33.30 %  ElmAbundance  18.18 %
+   --->  Isotope:   O16   Z =  8   N =  16   A =  15.99 g/mole   abundance:  99.76 %
+   --->  Isotope:   O17   Z =  8   N =  17   A =  17.00 g/mole   abundance:   0.04 %
+   --->  Isotope:   O18   Z =  8   N =  18   A =  18.00 g/mole   abundance:   0.20 %  ElmMassFraction:  33.30 %  ElmAbundance  18.18 %
 
 
@@ -78,8 +82,8 @@
 ### PhysicsList Add Physics <emstandard> emBuilderIsRegisted= 0
 PhysicsList::AddPhysicsList <emstandard>
-#/testem/phys/addPhysics emstandard_opt2
-#/testem/phys/addPhysics penelope
-#/testem/phys/addPhysics livermore
-#/testem/phys/addPhysics step_limit
+#/testem/phys/addPhysics      emstandard_opt2
+#/testem/phys/addPhysics       empenelope
+#/testem/phys/addPhysics       emlivermore
+#/testem/phys/addPhysics      step_limit
 #
 /testem/target1Material G4_Be
@@ -90,7 +94,7 @@
 /testem/target2Z 6 mm
 #
-#/testem/histoName be_w_st.paw
-#
-#/testem/stepMax 1.0 mm
+#/testem/histoName            be_w_st.paw
+#
+#/testem/stepMax               1.0  mm
 #
 /gun/particle e-
@@ -126,6 +130,6 @@
 Index : 0     used in the geometry : Yes     recalculation needed : No 
  Material : G4_AIR
- Range cuts        :  gamma 100 um     e- 100 um     e+ 100 um 
- Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV 
+ Range cuts        :  gamma  100 um     e-  100 um     e+  100 um  proton 0 fm 
+ Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV 
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -133,6 +137,6 @@
 Index : 1     used in the geometry : Yes     recalculation needed : No 
  Material : G4_Be
- Range cuts        :  gamma 100 um     e- 100 um     e+ 100 um 
- Energy thresholds :  gamma 1.02934 keV    e- 107.795 keV    e+ 106.476 keV
+ Range cuts        :  gamma  100 um     e-  100 um     e+  100 um  proton 0 fm 
+ Energy thresholds :  gamma  1.05172 keV    e-  109.289 keV    e+  107.83 keV proton 0 eV 
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -140,6 +144,6 @@
 Index : 2     used in the geometry : Yes     recalculation needed : No 
  Material : G4_He
- Range cuts        :  gamma 100 um     e- 100 um     e+ 100 um 
- Energy thresholds :  gamma 990 eV     e- 990 eV     e+ 990 eV 
+ Range cuts        :  gamma  100 um     e-  100 um     e+  100 um  proton 0 fm 
+ Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 0 eV 
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -147,6 +151,6 @@
 Index : 3     used in the geometry : Yes     recalculation needed : No 
  Material : G4_W
- Range cuts        :  gamma 100 um     e- 100 um     e+ 100 um 
- Energy thresholds :  gamma 36.0479 keV    e- 351.438 keV    e+ 334.551 keV
+ Range cuts        :  gamma  100 um     e-  100 um     e+  100 um  proton 0 fm 
+ Energy thresholds :  gamma  36.0599 keV    e-  351.877 keV    e+  337.972 keV proton 0 eV 
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -154,6 +158,6 @@
 Index : 4     used in the geometry : Yes     recalculation needed : No 
  Material : G4_MYLAR
- Range cuts        :  gamma 100 um     e- 100 um     e+ 100 um 
- Energy thresholds :  gamma 1.19365 keV    e- 98.2879 keV    e+ 96.4896 keV
+ Range cuts        :  gamma  100 um     e-  100 um     e+  100 um  proton 0 fm 
+ Energy thresholds :  gamma  1.21113 keV    e-  99.4755 keV    e+  98.1475 keV proton 0 eV 
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -161,6 +165,6 @@
 Index : 5     used in the geometry : Yes     recalculation needed : No 
  Material : G4_WATER
- Range cuts        :  gamma 100 um     e- 100 um     e+ 100 um 
- Energy thresholds :  gamma 1.09571 keV    e- 84.2696 keV    e+ 83.2385 keV
+ Range cuts        :  gamma  100 um     e-  100 um     e+  100 um  proton 0 fm 
+ Energy thresholds :  gamma  1.10981 keV    e-  84.6589 keV    e+  83.5287 keV proton 0 eV 
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -178,22 +182,23 @@
 Run Summary
   Number of events processed : 10000
-  User=14.88s Real=14.89s Sys=0.01s
+  User=8.44s Real=10.22s Sys=0s
 RunAction: End of run actions are started
 Histo: End of run actions are started
 ========================================================
 Number of events                                  10000
-Average number of e-                         12.26
-Average number of gamma                      21.05
-Average number of e+                         0.7483
+Average number of e-                         12.24
+Average number of gamma                      21.28
+Average number of e+                         0.7963
 Average number of neutrons                   0
-Average number of steps in absorber          33.78
-Average number of e- steps in target         18.76
-Average number of g  produced in the target  20.18
-Average number of e- produced in the target  7.089
-Average number of g produced in the phantom  0.5544
-Average number of e- produced in the phantom 2.927
-Total gamma fluence in front of phantom      9.022 MeV 
+Average number of steps in absorber          31.91
+Average number of e- steps in target         18.67
+Average number of g  produced in the target  20.44
+Average number of e- produced in the target  7.238
+Average number of g produced in the phantom  0.5203
+Average number of e- produced in the phantom 2.795
+Total gamma fluence in front of phantom      8.671 MeV 
 ========================================================
 
 
 G4 kernel has come to Quit state.
+
Index: trunk/examples/extended/medical/GammaTherapy/History
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/History	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/History	(revision 1337)
@@ -1,3 +1,3 @@
-$Id: History,v 1.25 2007/07/04 11:14:33 vnivanch Exp $
+$Id: History,v 1.29 2010/06/07 05:40:46 perl Exp $
 -------------------------------------------------------------------
 
@@ -15,4 +15,17 @@
      * Reverse chronological order (last date on top), please *
      ----------------------------------------------------------
+
+06-06-10 J.Perl (gtherapy-V09-03-01)
+- Remove unused variable in EventAction 
+
+04-06-10 J.Perl (gtherapy-V09-03-00)
+- Updated vis usage 
+
+21-11-09  V.Ivant (gtherapy-V09-02-00)
+- update EM physics according to 9.3
+
+11-06-08  V.Ivant (gtherapy-V09-01-00)
+- Remove AIDA from GNUmakefile
+- Added opt3 variant of EM physics
 
 04-07-07  V.Ivant (gtherapy-V09-00-00)
Index: trunk/examples/extended/medical/GammaTherapy/README
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/README	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/README	(revision 1337)
@@ -42,10 +42,11 @@
 Cu W target).
 
-Following Physics Lists can be activated via UI commands:
+Only Physics Lists from physics_list kernal library can be activated. 
+Corresponding UI commands are following
 
-/testem/phys/addPhysics       standard
-/testem/phys/addPhysics        g4v52
-/testem/phys/addPhysics       penelope
-/testem/phys/addPhysics       lowenergy
+/testem/phys/addPhysics       emstandard
+/testem/phys/addPhysics       emstandard_opt3
+/testem/phys/addPhysics       empenelope
+/testem/phys/addPhysics       emlivermore
 
 For interactive mode G4 visualization options and variables should be
Index: trunk/examples/extended/medical/GammaTherapy/be.in
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/be.in	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/be.in	(revision 1337)
@@ -11,5 +11,5 @@
 /testem/phys/addPhysics       emstandard
 #/testem/phys/addPhysics      emstandard_opt2
-#/testem/phys/addPhysics       livermore
+#/testem/phys/addPhysics       emlivermore
 #/testem/phys/addPhysics       elastic
 #/testem/phys/addPhysics       binary
Index: trunk/examples/extended/medical/GammaTherapy/be_w.in
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/be_w.in	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/be_w.in	(revision 1337)
@@ -13,5 +13,5 @@
 /testem/phys/addPhysics       emstandard
 #/testem/phys/addPhysics      emstandard_opt2
-#/testem/phys/addPhysics       livermore
+#/testem/phys/addPhysics       emlivermore
 #/testem/phys/addPhysics       elastic
 #/testem/phys/addPhysics       binary
@@ -31,5 +31,5 @@
 /gun/energy 50.0 MeV
 #
-/run/initialize
-/run/beamOn 1000000
+#/run/initialize
+#/run/beamOn 1000000
 
Index: trunk/examples/extended/medical/GammaTherapy/cu_w.in
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/cu_w.in	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/cu_w.in	(revision 1337)
@@ -13,5 +13,4 @@
 /testem/phys/addPhysics       emstandard
 #/testem/phys/addPhysics      emstandard_opt2
-#/testem/phys/addPhysics       lowenergy
 #
 /testem/target1Material       G4_W
Index: trunk/examples/extended/medical/GammaTherapy/include/EventActionMessenger.hh
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/include/EventActionMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/include/EventActionMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.hh,v 1.2 2006/06/29 17:25:54 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterBuilder.hh
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterBuilder.hh	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterBuilder.hh	(revision 1337)
@@ -26,5 +26,5 @@
 //
 // $Id: G4StepLimiterBuilder.hh,v 1.2 2006/06/29 17:26:25 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterMessenger.hh
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: G4StepLimiterMessenger.hh,v 1.2 2006/06/29 17:26:28 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterPerRegion.hh
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterPerRegion.hh	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/include/G4StepLimiterPerRegion.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: G4StepLimiterPerRegion.hh,v 1.4 2007/05/16 16:27:53 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/GammaTherapy/include/PhysicsList.hh
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/include/PhysicsList.hh	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/include/PhysicsList.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsList.hh,v 1.6 2006/11/16 14:42:20 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 // Modified:
Index: trunk/examples/extended/medical/GammaTherapy/include/PhysicsListMessenger.hh
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/include/PhysicsListMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/include/PhysicsListMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsListMessenger.hh,v 1.3 2006/06/29 17:26:41 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/GammaTherapy/src/EventAction.cc
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/src/EventAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/src/EventAction.cc	(revision 1337)
@@ -41,7 +41,4 @@
 
 #include "G4UImanager.hh"
-#include "G4TrajectoryContainer.hh"
-#include "G4Trajectory.hh"
-#include "G4VVisManager.hh"
 #include "G4ios.hh"
 
@@ -118,26 +115,7 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
-void EventAction::EndOfEventAction(const G4Event* evt)
+void EventAction::EndOfEventAction(const G4Event*)
 {
   (Histo::GetPointer())->SaveEvent();
-  G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
-
-  if(pVVisManager) {
-    G4TrajectoryContainer* trjc = evt->GetTrajectoryContainer();
-    G4int n_trajectories = 0;
-    if (trjc) n_trajectories = trjc->entries();
-
-    for(G4int i=0; i<n_trajectories; i++) {
-      G4Trajectory* t = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
-      if (drawFlag == "all") t->DrawTrajectory(1000);
-      else if ((drawFlag == "charged")&&(t->GetCharge() != 0.))
-                             t->DrawTrajectory(1000);
-      else if ((drawFlag == "neutral")&&(t->GetCharge() == 0.))
-                             t->DrawTrajectory(1000);
-      else if ((drawFlag == "charged+n")&&((t->GetCharge() != 0.)||
-                                           (t->GetCharge()==0.&&t->GetParticleName()=="neutron")))
-                             t->DrawTrajectory(1000);
-   }
-  }
 
   if(verbose > 0) {
Index: trunk/examples/extended/medical/GammaTherapy/src/EventActionMessenger.cc
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/src/EventActionMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/src/EventActionMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.cc,v 1.2 2006/06/29 17:27:19 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterBuilder.cc
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterBuilder.cc	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterBuilder.cc	(revision 1337)
@@ -26,5 +26,5 @@
 //
 // $Id: G4StepLimiterBuilder.cc,v 1.3 2006/06/29 17:27:48 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //---------------------------------------------------------------------------
Index: trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterMessenger.cc
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: G4StepLimiterMessenger.cc,v 1.2 2006/06/29 17:27:50 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterPerRegion.cc
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterPerRegion.cc	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/src/G4StepLimiterPerRegion.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: G4StepLimiterPerRegion.cc,v 1.4 2007/05/16 16:27:53 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/GammaTherapy/src/PhysicsList.cc
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/src/PhysicsList.cc	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/src/PhysicsList.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: PhysicsList.cc,v 1.16 2008/06/11 15:17:57 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: PhysicsList.cc,v 1.17 2009/11/21 16:47:07 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //---------------------------------------------------------------------------
@@ -46,11 +46,10 @@
 #include "PhysicsListMessenger.hh"
 
-#include "ParticlesBuilder.hh"
 #include "G4EmStandardPhysics.hh"
 #include "G4EmStandardPhysics_option1.hh"
 #include "G4EmStandardPhysics_option2.hh"
 #include "G4EmStandardPhysics_option3.hh"
-#include "PhysListEmLivermore.hh"
-#include "PhysListEmPenelope.hh"
+#include "G4EmLivermorePhysics.hh"
+#include "G4EmPenelopePhysics.hh"
 #include "G4StepLimiterBuilder.hh"
 #include "G4DecayPhysics.hh"
@@ -60,5 +59,4 @@
 #include "G4EmExtraPhysics.hh"
 #include "G4QStoppingPhysics.hh"
-//#include "PhysListEmModelPai.hh"
 
 #include "G4UnitsTable.hh"
@@ -89,5 +87,5 @@
 
   // Add Physics builders
-  RegisterPhysics(new ParticlesBuilder());
+  RegisterPhysics(new G4DecayPhysics());
 }
 
@@ -156,23 +154,12 @@
     G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
 
-  } else if (name == "livermore" && !emBuilderIsRegisted) {
-    RegisterPhysics(new PhysListEmLivermore());
-    emBuilderIsRegisted = true;
-    G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
-
-  } else if (name == "penelope" && !emBuilderIsRegisted) {
-    RegisterPhysics(new PhysListEmPenelope());
-    emBuilderIsRegisted = true;
-    G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
-    /*
-  } else if (name == "pai" && !emBuilderIsRegisted) {
-    RegisterPhysics(new PhysListEmModelPai());
-    emBuilderIsRegisted = true;
-    G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
-    */
-
-  } else if (name == "decay" && !decayIsRegisted && emBuilderIsRegisted) {
-    RegisterPhysics(new G4DecayPhysics());
-    decayIsRegisted = true;
+  } else if (name == "emlivermore" && !emBuilderIsRegisted) {
+    RegisterPhysics(new G4EmLivermorePhysics());
+    emBuilderIsRegisted = true;
+    G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
+
+  } else if (name == "empenelope" && !emBuilderIsRegisted) {
+    RegisterPhysics(new G4EmPenelopePhysics());
+    emBuilderIsRegisted = true;
     G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
 
Index: trunk/examples/extended/medical/GammaTherapy/src/PhysicsListMessenger.cc
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/src/PhysicsListMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/src/PhysicsListMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsListMessenger.cc,v 1.3 2006/06/29 17:28:04 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/GammaTherapy/vis.mac
===================================================================
--- trunk/examples/extended/medical/GammaTherapy/vis.mac	(revision 1230)
+++ trunk/examples/extended/medical/GammaTherapy/vis.mac	(revision 1337)
@@ -27,22 +27,70 @@
 /gun/energy 50.0 MeV
 #
-# Create empty scene ("world" is default)
-/vis/scene/create
+# Use this open statement to create an OpenGL view:
+/vis/open OGL 600x600-0+0
 #
-# Create a scene handler for a specific graphics system
-# Edit the next line(s) to choose another graphic system
+# Use this open statement to create a .prim file suitable for
+# viewing in DAWN:
+#/vis/open DAWNFILE
 #
-####/vis/open DAWNFILE
-/vis/open OGLIX
+# Use this open statement to create a .heprep file suitable for
+# viewing in HepRApp:
+#/vis/open HepRepFile
 #
-# Draw scene
-/vis/viewer/set/viewpointThetaPhi -90 0 deg
+# Use this open statement to create a .wrl file suitable for
+# viewing in a VRML viewer:
+#/vis/open VRML2FILE
+#
+# Disable auto refresh and quieten vis messages whilst scene and
+# trajectories are established:
+/vis/viewer/set/autoRefresh false
+/vis/verbose errors
+#
+# Draw geometry:
+/vis/drawVolume
+#
+# Specify view angle:
+/vis/viewer/set/viewpointThetaPhi -90. 0.
+#
+# Specify zoom value:
 /vis/viewer/zoom 1.4
-/vis/viewer/flush
 #
-# for drawing the tracks
-# if too many tracks cause core dump => storeTrajectory 0
-/tracking/storeTrajectory 1
+# Specify style (surface or wireframe):
+#/vis/viewer/set/style wireframe
+#
+# Draw coordinate axes:
+#/vis/scene/add/axes 0 0 0 1 m
+#
+# Draw smooth trajectories at end of event, showing trajectory points
+# as markers 2 pixels wide:
+/vis/scene/add/trajectories smooth
+/vis/modeling/trajectories/create/drawByCharge
+/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
+/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
+# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
+#
+# Draw hits at end of event:
+#/vis/scene/add/hits
+#
+# To draw only gammas:
+#/vis/filtering/trajectories/create/particleFilter
+#/vis/filtering/trajectories/particleFilter-0/add gamma
+#
+# To invert the above, drawing all particles except gammas,
+# keep the above two lines but also add:
+#/vis/filtering/trajectories/particleFilter-0/invert true
+#
+# Many other options are available with /vis/modeling and /vis/filtering.
+# For example, to select colour by particle ID:
+#/vis/modeling/trajectories/create/drawByParticleID
+#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
+#
+# To superimpose all of the events from a given run:
 /vis/scene/endOfEventAction accumulate
 #
-/testem/event/drawTracks all
+# Re-establish auto refreshing and verbosity:
+/vis/viewer/set/autoRefresh true
+/vis/verbose warnings
+#
+# For file-based drivers, use this to create an empty detector view:
+#/vis/viewer/flush
Index: trunk/examples/extended/medical/fanoCavity/History
===================================================================
--- trunk/examples/extended/medical/fanoCavity/History	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/History	(revision 1337)
@@ -1,3 +1,3 @@
-$Id: History,v 1.19 2007/11/13 11:31:53 maire Exp $
+$Id: History,v 1.36 2010/06/07 05:40:46 perl Exp $
 -------------------------------------------------------------------
 
@@ -15,4 +15,58 @@
      * Reverse chronological order (last date on top), please *
      ----------------------------------------------------------
+
+06-06-10 J.Perl (fano-V09-03-03)
+- Remove unused variable in EventAction 
+
+04-06-10 J.Perl (fano-V09-03-02)
+- Updated vis usage 
+    
+22-05-10 mma (fano-V09-03-01)
+- fanoCavity.cc : introduction of G4UIExecutive
+     
+19-01-10 mma (fano-V09-03-00)
+- introduce PhysListEmStandard_option2 : UrbanMscModel93 without options
+            PhysListEmStandard_WVI : WentzelVIModel
+- put in run01.mac all physics lists choice	    
+     
+16-11-09 mma (fano-V09-02-03)
+- PhysListEmStandard_option3 : use UrbanMscModel93
+     
+29-10-09 mma (fano-V09-02-02)
+- new PhysListEmStandard_GS for GoudsmitSaundersonMsc model
+       
+25-10-09 mma (fano-V09-02-01)
+- splite PhysicsList in 2, as others TestEm examples.
+- local copy of PhysListEmStandard_option0, PhysListEmStandard_option3,
+  PhysListEmStandard_SS
+- PhysicsList: add cut for proton recoil in case of Single Scattering
+     
+30-01-09 mma (fano-V09-02-00)
+- EndOfRun : error = ratio*std::sqrt(dEoverE*dEoverE + dToverT*dToverT)
+     
+16-11-08 mma (fano-V09-01-06)
+- Em options: 20bins/decade  LinLossLimit=default=0.01
+     
+01-11-08 mma (fano-V09-01-05)
+- PhysicsList : add comments for Em options
+     
+26-10-08 mma (fano-V09-01-04)
+- PhysicsList : modified Em options
+     
+28-09-08 mma (fano-V09-01-03)
+- HistoManager : root format by default
+
+11-06-08 V.Ivant (fano-V09-01-02)
+- Remove AIDA from GNUmakefile
+     
+07-05-08 mma (fano-V09-01-01)
+- README : update Aida informations     
+     
+11-04-08 mma
+- HistoManager::Scale() : suppress warning
+     
+04-04-08 mma(fano-V09-01-00)
+- PhysicsList : replace G4MultipleScattering by new G4eMultipleScattering
+  --> allows to use MscUrbanModel2
      
 12-11-07 mma (fano-V09-00-08) 
Index: trunk/examples/extended/medical/fanoCavity/README
===================================================================
--- trunk/examples/extended/medical/fanoCavity/README	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/README	(revision 1337)
@@ -1,3 +1,3 @@
-$Id: README,v 1.13 2007/11/13 11:31:54 maire Exp $
+$Id: README,v 1.16 2009/10/25 19:06:26 maire Exp $
 -------------------------------------------------------------------
 
@@ -96,5 +96,5 @@
  4- PHYSICS
  
-    The physics list contains the standard electromagnetic processes, with few 
+    The physics lists contains the standard electromagnetic processes, with few 
     modifications listed here.
     
@@ -108,6 +108,6 @@
     - Bremsstrahlung : Fano conditions imply no energy transfer via
     bremsstrahlung radiation. Therefore this process is not registered in the
-    physics list. However, it is always possible to include it via an UI
-    command. See PhysicsListMessenger class.
+    physics list. However, it is always possible to include it.
+    See PhysListEmStandard class.
     
     - Ionisation : In order to have same stopping power in wall and cavity, one
@@ -154,5 +154,5 @@
    
    It is possible to choose the format of the histogram file (hbook, root, XML)
-   with the command /testem/histo/setFileType (hbook by default)
+   with the command /testem/histo/setFileType (root by default)
    
    It is also possible to print selected histograms on an ascii file:
@@ -182,44 +182,4 @@
 
   To use histograms, at least one of the AIDA implementations should be 
-  available (see http://aida.freehep.org).
+  available. See InstallAida.txt
   
- 8a - PI 
-
-  A package including AIDA and extended interfaces also using Python is PI, 
-  available from: http://cern.ch/pi
-
-  Once installed PI or PI-Lite in a specified local area $MYPY, it is required 
-  to add the installation path to $PATH, i.e. for example, for release 1.2.1 of 
-  PI:
-  setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin
-
-  CERN users can use the PATH to the LCG area on AFS.
-  Before running the example the command should be issued:
-  eval `aida-config --runtime csh`
-
- 8b -  OpenScientist
-
-  OpenScientist is available at http://OpenScientist.lal.in2p3.fr.
-
-  You have to "setup" the OpenScientist AIDA implementation before compiling
-  (then with G4ANALYSIS_USE set) and running your Geant4 application.
-
- On UNIX you setup, with a csh flavoured shell : 
-	csh> source <<OpenScientist install path>/aida-setup.csh 
-        or with a sh flavoured shell : 
-	sh> . <<OpenScientist install path>/aida-setup.sh
- On Windows : 
-	DOS> call <<OpenScientist install path>/aida-setup.bat 
-
-  You can use various file formats for writing (AIDA-XML, hbook, root).
-  These formats are readable by the Lab onx interactive program
-  or the OpenPAW application. See the web pages.
-
-
-  With OpenPAW, on a run.hbook file, one can view the histograms
-  with something like :
-	OS> opaw 
-        opaw> h/file 1 run.hbook  ( or opaw> h/file 1 run.aida or run.root)  
-	opaw> zone 2 2 
-	opaw> h/plot 1 
-	opaw> h/plot 2
Index: trunk/examples/extended/medical/fanoCavity/fanoCavity.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/fanoCavity.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/fanoCavity.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: fanoCavity.cc,v 1.6 2007/10/29 17:09:53 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: fanoCavity.cc,v 1.7 2010/05/22 21:02:48 maire Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 // 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -32,6 +32,4 @@
 #include "G4RunManager.hh"
 #include "G4UImanager.hh"
-#include "G4UIterminal.hh"
-#include "G4UItcsh.hh"
 #include "Randomize.hh"
 
@@ -50,4 +48,8 @@
 #ifdef G4VIS_USE
  #include "G4VisExecutive.hh"
+#endif
+
+#ifdef G4UI_USE
+#include "G4UIExecutive.hh"
 #endif
 
@@ -104,16 +106,13 @@
 #endif    
      
-     G4UIsession * session = 0;
-#ifdef G4UI_USE_TCSH
-      session = new G4UIterminal(new G4UItcsh);      
-#else
-      session = new G4UIterminal();
-#endif     
-     session->SessionStart();
-     delete session;
-     
+#ifdef G4UI_USE
+      G4UIExecutive * ui = new G4UIExecutive(argc,argv);      
+      ui->SessionStart();
+      delete ui;
+#endif
+          
 #ifdef G4VIS_USE
      delete visManager;
-#endif     
+#endif          
     }
 
Index: trunk/examples/extended/medical/fanoCavity/fanoCavity.in
===================================================================
--- trunk/examples/extended/medical/fanoCavity/fanoCavity.in	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/fanoCavity.in	(revision 1337)
@@ -1,6 +1,8 @@
-# $Id: fanoCavity.in,v 1.5 2007/10/29 12:36:26 maire Exp $
+# $Id: fanoCavity.in,v 1.6 2009/10/25 19:06:26 maire Exp $
 #
 /control/verbose 2
 /run/verbose 2
+#
+/testem/phys/addPhysics standard_opt3
 #
 /run/initialize
Index: trunk/examples/extended/medical/fanoCavity/fanoCavity.out
===================================================================
--- trunk/examples/extended/medical/fanoCavity/fanoCavity.out	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/fanoCavity.out	(revision 1337)
@@ -1,5 +1,9 @@
+
+        ############################################
+        !!! WARNING - FPE detection is activated !!!
+        ############################################
 
 *************************************************************
- Geant4 version Name: global-V09-00-03    (9-May-2008)
+ Geant4 version Name: geant4-09-03-ref-06    (25-June-2010)
                       Copyright : Geant4 Collaboration
                       Reference : NIM A 506 (2003), 250-303
@@ -10,30 +14,33 @@
 ***** Table : Nb of materials = 7 *****
 
- Material:    Water     density:  1.000 g/cm3   RadL:  36.092 cm   Imean:  75.000 eV 
+ Material:    Water     density:  1.000 g/cm3   RadL:  36.092 cm   Nucl.Int.Length:  75.416 cm   Imean:  75.000 eV 
    --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  11.21 %  ElmAbundance  66.67 %
    --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  88.79 %  ElmAbundance  33.33 %
 
- Material: Water_vapor     density:  1.000 mg/cm3  RadL: 360.925 m    Imean:  75.000 eV   temperature: 273.15 K  pressure:   1.00 atm
+ Material: Water_vapor     density:  1.000 mg/cm3  RadL: 360.924 m    Nucl.Int.Length: 754.163 m    Imean:  75.000 eV   temperature: 273.15 K  pressure:   1.00 atm
    --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  11.21 %  ElmAbundance  66.67 %
    --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  88.79 %  ElmAbundance  33.33 %
 
- Material:      Air     density:  1.290 mg/cm3  RadL: 285.161 m    Imean:  85.684 eV   temperature: 273.15 K  pressure:   1.00 atm
+ Material:      Air     density:  1.290 mg/cm3  RadL: 285.161 m    Nucl.Int.Length: 662.680 m    Imean:  85.703 eV   temperature: 273.15 K  pressure:   1.00 atm
    --->  Element: Nitrogen (N)   Z =  7.0   N =  14.0   A =  14.01 g/mole  ElmMassFraction:  70.00 %  ElmAbundance  72.71 %
    --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  30.00 %  ElmAbundance  27.29 %
 
- Material: Graphite     density:  2.265 g/cm3   RadL:  18.850 cm   Imean:  78.000 eV 
+ Material: Graphite     density:  2.265 g/cm3   RadL:  18.850 cm   Nucl.Int.Length:  35.387 cm   Imean:  81.000 eV 
    --->  Element: Graphite ( )   Z =  6.0   N =  12.0   A =  12.01 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
 
- Material: Graphite_gas     density:  2.265 mg/cm3  RadL: 188.496 m    Imean:  78.000 eV   temperature: 273.15 K  pressure:   1.00 atm
+ Material: Graphite_gas     density:  2.265 mg/cm3  RadL: 188.496 m    Nucl.Int.Length: 353.873 m    Imean:  81.000 eV   temperature: 273.15 K  pressure:   1.00 atm
    --->  Element: Graphite_gas ( )   Z =  6.0   N =  12.0   A =  12.01 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
 
- Material: Aluminium     density:  2.700 g/cm3   RadL:   8.893 cm   Imean: 166.400 eV 
+ Material: Aluminium     density:  2.700 g/cm3   RadL:   8.893 cm   Nucl.Int.Length:  38.879 cm   Imean: 166.000 eV 
    --->  Element: Aluminium ( )   Z = 13.0   N =  27.0   A =  26.98 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
 
- Material: Aluminium_gas     density:  2.700 mg/cm3  RadL:  88.925 m    Imean: 166.400 eV   temperature: 273.15 K  pressure:   1.00 atm
+ Material: Aluminium_gas     density:  2.700 mg/cm3  RadL:  88.925 m    Nucl.Int.Length: 388.793 m    Imean: 166.000 eV   temperature: 273.15 K  pressure:   1.00 atm
    --->  Element: Aluminium_gas ( )   Z = 13.0   N =  27.0   A =  26.98 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
 
 
 /run/verbose 2
+#
+/testem/phys/addPhysics standard_opt3
+PhysicsList::AddPhysicsList: <standard_opt3>
 #
 /run/initialize
@@ -48,4 +55,5 @@
 physicsList->Construct() start.
 physicsList->Construct() start.
+physicsList->CheckParticleList() start.
 physicsList->setCut() start.
 PhysicsList::SetCuts:CutLength : 10 km 
@@ -54,64 +62,60 @@
 #
 /run/beamOn 4000
-G4VRangeToEnergyConverter::ConvertCutToKineticEnergy   for gamma
-The cut in range [1e+07 (mm)]   is too big   for material  idx=0
-The cut in energy is set1.79769e+305GeV 
-G4VRangeToEnergyConverter::ConvertCutToKineticEnergy   for e-
-The cut in range [1e+07 (mm)]   is too big   for material  idx=0
-The cut in energy is set1.79769e+305GeV 
-G4VRangeToEnergyConverter::ConvertCutToKineticEnergy   for e+
-The cut in range [1e+07 (mm)]   is too big   for material  idx=0
-The cut in energy is set1.79769e+305GeV 
-G4VRangeToEnergyConverter::ConvertCutToKineticEnergy   for gamma
-The cut in range [1e+07 (mm)]   is too big   for material  idx=1
-The cut in energy is set1.79769e+305GeV 
-
-compt:  Total cross sections has a good parametrisation from 10 KeV to (100/Z) GeV
-      Sampling according myKlein-Nishina model
-      tables are built for  gamma
-      Lambda tables from 100 eV  to 10 GeV in 800 bins.
-
-phot:  Total cross sections from Sandia parametrisation. 
-      Sampling according PhotoElectric model
-
-conv:  Total cross sections has a good parametrisation from 1.5 MeV to 100 GeV for all Z;
-      sampling secondary e+e- according Bethe-Heitler model
-      tables are built for  gamma
-      Lambda tables from 1.022 MeV to 10 GeV in 800 bins.
-
-msc:  Model variant of multiple scattering for e-
-      Lambda tables from 100 eV  to 10 GeV in 800 bins.
-      LateralDisplacementFlag=  1   Skin= 2
-      Boundary/stepping algorithm is active with RangeFactor= 0.02  Step limit type 2
-
-eIoni:   tables are built for  e-
-      dE/dx and range tables from 100 eV  to 10 GeV in 800 bins.
-      Lambda tables from threshold to 10 GeV in 800 bins.
-      Delta cross sections and sampling from myMollerBhabha model
-      Good description from 1 KeV to 100 GeV.
-      Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1
-      CSDA range table up to 10 GeV in 800 bins.
-
-eIoni:   tables are built for  e+
-      dE/dx and range tables from 100 eV  to 10 GeV in 800 bins.
-      Lambda tables from threshold to 10 GeV in 800 bins.
-      Delta cross sections and sampling from myMollerBhabha model
-      Good description from 1 KeV to 100 GeV.
-      Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1
-      CSDA range table up to 10 GeV in 800 bins.
-
-msc:  Model variant of multiple scattering for proton
-      Lambda tables from 100 eV  to 10 GeV in 800 bins.
-      LateralDisplacementFlag=  1   Skin= 2
-      Boundary/stepping algorithm is active with RangeFactor= 0.02  Step limit type 2
-
-hIoni:   tables are built for  proton
-      dE/dx and range tables from 100 eV  to 10 GeV in 800 bins.
-      Lambda tables from threshold to 10 GeV in 800 bins.
-      Scaling relation is used from proton dE/dx and range.
-      Delta cross sections and sampling from BetheBloch model for scaled energy > 2 MeV
-      Parametrisation from Bragg for protons below. NuclearStopping= 1
-      Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1
-      CSDA range table up to 10 GeV in 800 bins.
+
+phot:   for  gamma    SubType= 12
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+       PhotoElectric :     Emin=          0 eV         Emax=   10 GeV
+
+compt:   for  gamma    SubType= 13
+      Lambda tables from 100 eV  to 10 GeV in 160 bins, spline: 1
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+     myKlein-Nishina :     Emin=          0 eV         Emax=   10 GeV
+
+conv:   for  gamma    SubType= 14
+      Lambda tables from 1.022 MeV to 10 GeV in 160 bins, spline: 1
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+       Bethe-Heitler :     Emin=          0 eV         Emax=   10 GeV
+
+msc:   for e-    SubType= 10
+      Lambda tables from 100 eV  to 10 GeV in 160 bins, spline: 1
+      RangeFactor= 0.02, stepLimitType: 2, latDisplacement: 1, skin= 3, geomFactor= 2.5
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+          UrbanMsc93 :     Emin=          0 eV         Emax=   10 GeV
+
+eIoni:   for  e-    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 GeV in 160 bins
+      Lambda tables from threshold to 10 GeV in 160 bins, spline: 1
+      finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+      myMollerBhabha :     Emin=          0 eV         Emax=   10 GeV
+      CSDA range table up to 10 GeV in 160 bins
+
+eIoni:   for  e+    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 GeV in 160 bins
+      Lambda tables from threshold to 10 GeV in 160 bins, spline: 1
+      finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+      myMollerBhabha :     Emin=          0 eV         Emax=   10 GeV
+      CSDA range table up to 10 GeV in 160 bins
+
+annihil:   for  e+    SubType= 5
+      Lambda tables from 100 eV  to 10 GeV in 160 bins, spline: 1
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+            eplus2gg :     Emin=          0 eV         Emax=   10 GeV
+
+msc:   for proton    SubType= 10
+      Lambda tables from 100 eV  to 10 GeV in 160 bins, spline: 1
+      RangeFactor= 0.02, stepLimitType: 2, latDisplacement: 1, skin= 3, geomFactor= 2.5
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+          UrbanMsc90 :     Emin=          0 eV         Emax=   10 GeV
+
+hIoni:   for  proton    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 GeV in 160 bins
+      Lambda tables from threshold to 10 GeV in 160 bins, spline: 1
+      finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+               Bragg :     Emin=          0 eV         Emax=   2 MeV
+          BetheBloch :     Emin=          2 MeV        Emax=   10 GeV
+      CSDA range table up to 10 GeV in 160 bins
 
 Region <DefaultRegionForTheWorld> -- appears in <Wall> world volume
@@ -119,5 +123,5 @@
  Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
  Materials : Water Water_vapor 
- Production cuts :  gamma 10 km     e- 10 km     e+ 10 km 
+ Production cuts :   gamma 10 km      e- 10 km      e+ 10 km  proton 10 km 
 
 ========= Table of registered couples ==============================
@@ -125,6 +129,6 @@
 Index : 0     used in the geometry : Yes     recalculation needed : No 
  Material : Water
- Range cuts        :  gamma 10 km     e- 10 km     e+ 10 km 
- Energy thresholds :  gamma 2.88022e+295 J      e- 2.88022e+295 J      e+ 2.88022e+295 J  
+ Range cuts        :  gamma  10 km     e-  10 km     e+  10 km  proton 10 km 
+ Energy thresholds :  gamma  10 GeV    e-  10 GeV    e+  10 GeV proton 1 TeV
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -132,6 +136,6 @@
 Index : 1     used in the geometry : Yes     recalculation needed : No 
  Material : Water_vapor
- Range cuts        :  gamma 10 km     e- 10 km     e+ 10 km 
- Energy thresholds :  gamma 2.88022e+295 J      e- 18.4792 GeV    e+ 17.5913 GeV
+ Range cuts        :  gamma  10 km     e-  10 km     e+  10 km  proton 10 km 
+ Energy thresholds :  gamma  10 GeV    e-  10 GeV    e+  10 GeV proton 1 TeV
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -152,13 +156,13 @@
 Start Run processing.
 
- ---> NbofEvents= 1000   NbOfelectr= 70497   Tkin= 590.556 keV (0.000 %)   NbOfelec in cav= 4840   Dose/EnFluence= 29.303 cm2/g (0.000 %)
-
- ---> NbofEvents= 2000   NbOfelectr= 140946   Tkin= 589.455 keV (-0.186 %)   NbOfelec in cav= 9491   Dose/EnFluence= 27.877 cm2/g (-4.868 %)
-
- ---> NbofEvents= 3000   NbOfelectr= 212082   Tkin= 589.024 keV (-0.073 %)   NbOfelec in cav= 14452   Dose/EnFluence= 28.465 cm2/g (2.109 %)
+ ---> NbofEvents= 1000   NbOfelectr= 70538   Tkin= 590.669 keV (0.000 %)   NbOfelec in cav= 4726   Dose/EnFluence= 30.091 cm2/g (0.000 %)
+
+ ---> NbofEvents= 2000   NbOfelectr= 141090   Tkin= 589.502 keV (-0.198 %)   NbOfelec in cav= 9358   Dose/EnFluence= 28.953 cm2/g (-3.782 %)
+
+ ---> NbofEvents= 3000   NbOfelectr= 211481   Tkin= 589.178 keV (-0.055 %)   NbOfelec in cav= 14156   Dose/EnFluence= 28.931 cm2/g (-0.076 %)
 Run terminated.
 Run Summary
   Number of events processed : 4000
-  User=45.49s Real=45.58s Sys=0.01s
+  User=32.81s Real=48.36s Sys=0s
 
  ======================== run summary ======================
@@ -170,30 +174,30 @@
  ============================================================
 
- Process calls frequency --->  compt= 282830  Transportation= 78247  msc= 1357160  eIoni= 1879015
+ Process calls frequency --->  compt= 282107  Transportation= 77642  msc= 2087713  eIoni= 1755986
 
  Gamma crossSections in wall material :  compt= 63.447 cm2/g   --> total= 63.447 cm2/g
 
- Mean energy of secondary e- = 589.0917 keV +- 0.1026 %  (--> range in wall material = 2.2155 mm )
- Mass_energy_transfer coef: 29.9009 cm2/g
-
- StoppingPower in wall   = 1.9719 MeV*cm2/g
-               in cavity = 1.9719 MeV*cm2/g
+ Mean energy of secondary e- = 588.9126 keV +- 0.1029 %  (--> range in wall material = 2.2146 mm )
+ Mass_energy_transfer coef: 29.8918 cm2/g
+
+ StoppingPower in wall   = 1.9720 MeV*cm2/g
+               in cavity = 1.9720 MeV*cm2/g
 
  Charged particle flow in cavity :
-      Enter --> nbParticles = 19159	 Energy = 9.6732 GeV
-      Exit  --> nbParticles = 19159	 Energy = 9.6744 GeV
-
- Total edep in cavity = 12.6517 MeV +- 2.0796 %	 Total charged trackLength = 53.2115 m     (mean value = 2.7774 mm )
- Total dose in cavity = 20.1358 MeV/mg
- Dose/EnergyFluence   = 28.4663 cm2/g
-
- (Dose/EnergyFluence)/Mass_energy_transfer = 0.95202 +- 0.02078
-
- StepSize of ch. tracks in wall   = 147.0421 um  +- 130.3004 um 	 (nbSteps/track = 11.3711)
- StepSize of ch. tracks in cavity = 585.5850 um  +- 658.6927 um 	 (nbSteps/track = 4.7429)
+      Enter --> nbParticles = 18882	 Energy = 9.5906 GeV
+      Exit  --> nbParticles = 18879	 Energy = 9.5913 GeV
+
+ Total edep in cavity = 13.0468 MeV +- 3.3776 %	 Total charged trackLength = 51.4975 m     (mean value = 2.7273 mm )
+ Total dose in cavity = 20.7646 MeV/mg
+ Dose/EnergyFluence   = 29.3552 cm2/g
+
+ (Dose/EnergyFluence)/Mass_energy_transfer = 0.98205 +- 0.03318
+
+ StepSize of ch. tracks in wall   = 122.8120 um  +- 121.5387 um 	 (nbSteps/track = 13.6004)
+ StepSize of ch. tracks in cavity = 668.5550 um  +- 853.6674 um 	 (nbSteps/track = 4.0794)
 
 --------- Ranecu engine status ---------
  Initial seed (index) = 0
- Current couple of seeds = 1874919070, 2097012381
+ Current couple of seeds = 1335550696, 1317159614
 ----------------------------------------
 UserDetectorConstruction deleted.
@@ -203,5 +207,4 @@
 G4 kernel has come to Quit state.
 EventManager deleted.
-Default detector region deleted.
 UImanager deleted.
 Units table cleared.
@@ -209,2 +212,3 @@
 RunManagerKernel is deleted.
 RunManager is deleting.
+
Index: trunk/examples/extended/medical/fanoCavity/include/DetectorConstruction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/DetectorConstruction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/DetectorConstruction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorConstruction.hh,v 1.2 2007/10/08 12:05:02 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/DetectorMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/DetectorMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/DetectorMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.hh,v 1.2 2007/10/08 12:05:02 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/EventAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/EventAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/EventAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventAction.hh,v 1.3 2007/10/29 17:09:53 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/EventActionMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/EventActionMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/EventActionMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.hh,v 1.1 2007/01/19 17:20:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/HistoManager.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/HistoManager.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/HistoManager.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoManager.hh,v 1.4 2007/11/13 11:31:54 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/HistoMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/HistoMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/HistoMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoMessenger.hh,v 1.2 2007/11/13 11:31:54 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/MyKleinNishinaCompton.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/MyKleinNishinaCompton.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/MyKleinNishinaCompton.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: MyKleinNishinaCompton.hh,v 1.4 2009/10/25 19:06:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Index: trunk/examples/extended/medical/fanoCavity/include/MyMollerBhabhaModel.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/MyMollerBhabhaModel.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/MyMollerBhabhaModel.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: MyMollerBhabhaModel.hh,v 1.1 2007/01/19 17:20:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Index: trunk/examples/extended/medical/fanoCavity/include/PhysicsList.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/PhysicsList.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/PhysicsList.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsList.hh,v 1.4 2009/10/25 19:06:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/PhysicsListMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/PhysicsListMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/PhysicsListMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsListMessenger.hh,v 1.3 2009/10/25 19:06:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorAction.hh,v 1.1 2007/01/19 17:20:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/PrimaryGeneratorMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorMessenger.hh,v 1.1 2007/01/19 17:20:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/ProcessesCount.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/ProcessesCount.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/ProcessesCount.hh	(revision 1337)
@@ -26,5 +26,5 @@
 //
 // $Id: ProcessesCount.hh,v 1.1 2007/01/19 17:20:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/RunAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/RunAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/RunAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: RunAction.hh,v 1.3 2007/10/29 12:36:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/StackingAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/StackingAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/StackingAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StackingAction.hh,v 1.1 2007/01/23 13:34:19 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/StackingMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/StackingMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/StackingMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StackingMessenger.hh,v 1.1 2007/01/23 13:34:19 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/StepMax.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/StepMax.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/StepMax.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMax.hh,v 1.1 2007/01/19 17:20:27 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/StepMaxMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/StepMaxMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/StepMaxMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMaxMessenger.hh,v 1.1 2007/01/19 17:20:27 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/SteppingAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/SteppingAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/SteppingAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingAction.hh,v 1.4 2007/10/29 17:09:53 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/SteppingVerbose.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/SteppingVerbose.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/SteppingVerbose.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingVerbose.hh,v 1.1 2007/01/19 17:20:27 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/include/TrackingAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity/include/TrackingAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/include/TrackingAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: TrackingAction.hh,v 1.3 2007/10/29 17:09:53 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/run01.mac
===================================================================
--- trunk/examples/extended/medical/fanoCavity/run01.mac	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/run01.mac	(revision 1337)
@@ -1,8 +1,13 @@
-# $Id: run01.mac,v 1.7 2009/10/25 19:06:26 maire Exp $
+# $Id: run01.mac,v 1.8 2010/01/19 17:28:20 maire Exp $
 #
 /control/verbose 2
 /run/verbose 2
 #
+###/testem/phys/addPhysics  standard_opt0
+###/testem/phys/addPhysics  standard_opt2
 /testem/phys/addPhysics  standard_opt3
+###/testem/phys/addPhysics  standard_GS
+###/testem/phys/addPhysics  standard_WVI
+###/testem/phys/addPhysics  standard_SS
 #
 /run/initialize
Index: trunk/examples/extended/medical/fanoCavity/src/DetectorConstruction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/DetectorConstruction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/DetectorConstruction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorConstruction.cc,v 1.3 2007/10/08 12:05:02 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 
 //
Index: trunk/examples/extended/medical/fanoCavity/src/DetectorMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/DetectorMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/DetectorMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.cc,v 1.3 2007/11/05 13:44:18 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/EventAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/EventAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/EventAction.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: EventAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: EventAction.cc,v 1.6 2010/06/07 05:40:46 perl Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -37,7 +37,4 @@
 
 #include "G4Event.hh"
-#include "G4TrajectoryContainer.hh"
-#include "G4Trajectory.hh"
-#include "G4VVisManager.hh"
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -69,21 +66,6 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
-void EventAction::EndOfEventAction(const G4Event* evt)
+void EventAction::EndOfEventAction(const G4Event*)
 {   
-  //trajectories
-  //
-  if (G4VVisManager::GetConcreteInstance())
-  {
-   G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
-   G4int n_trajectories = 0;
-   if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();  
-   for(G4int i=0; i<n_trajectories; i++) 
-      { G4Trajectory* trj = (G4Trajectory*)
-                                       ((*(evt->GetTrajectoryContainer()))[i]);
-        if (drawFlag == "all") trj->DrawTrajectory(1000);
-        else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
-                               trj->DrawTrajectory(); 
-      }
-  }
 }
 
Index: trunk/examples/extended/medical/fanoCavity/src/EventActionMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/EventActionMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/EventActionMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/HistoManager.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/HistoManager.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/HistoManager.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoManager.cc,v 1.7 2008/09/28 16:04:01 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/HistoMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/HistoMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/HistoMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoMessenger.cc,v 1.2 2007/11/13 11:31:54 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/MyKleinNishinaCompton.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/MyKleinNishinaCompton.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/MyKleinNishinaCompton.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: MyKleinNishinaCompton.cc,v 1.6 2009/10/25 19:06:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Index: trunk/examples/extended/medical/fanoCavity/src/MyMollerBhabhaModel.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/MyMollerBhabhaModel.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/MyMollerBhabhaModel.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: MyMollerBhabhaModel.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/PhysicsList.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/PhysicsList.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/PhysicsList.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: PhysicsList.cc,v 1.18 2009/10/29 16:19:59 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: PhysicsList.cc,v 1.19 2010/01/19 17:28:20 maire Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -34,6 +34,8 @@
 
 #include "PhysListEmStandard_option0.hh"
+#include "PhysListEmStandard_option2.hh"
 #include "PhysListEmStandard_option3.hh"
 #include "PhysListEmStandard_GS.hh"
+#include "PhysListEmStandard_WVI.hh"
 #include "PhysListEmStandard_SS.hh"
 
@@ -149,4 +151,10 @@
     emPhysicsList = new PhysListEmStandard_option0(name,detector);
     
+  } else if (name == "standard_opt2") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new PhysListEmStandard_option2(name,detector);
+        
   } else if (name == "standard_opt3") {
 
@@ -161,4 +169,10 @@
     emPhysicsList = new PhysListEmStandard_GS(name,detector);    
     
+  } else if (name == "standard_WVI") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new PhysListEmStandard_WVI(name,detector);
+           
   } else if (name == "standard_SS") {
 
Index: trunk/examples/extended/medical/fanoCavity/src/PhysicsListMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/PhysicsListMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/PhysicsListMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsListMessenger.cc,v 1.3 2009/10/25 19:06:26 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorAction.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/PrimaryGeneratorMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/RunAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/RunAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/RunAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: RunAction.cc,v 1.4 2009/01/22 18:34:06 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 // 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/StackingAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/StackingAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/StackingAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StackingAction.cc,v 1.2 2007/03/02 11:08:41 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/StackingMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/StackingMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/StackingMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StackingMessenger.cc,v 1.1 2007/01/23 13:34:19 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/StepMax.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/StepMax.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/StepMax.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMax.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/StepMaxMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/StepMaxMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/StepMaxMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMaxMessenger.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/SteppingAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/SteppingAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/SteppingAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/SteppingVerbose.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/SteppingVerbose.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/SteppingVerbose.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingVerbose.cc,v 1.1 2007/01/19 17:20:27 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/src/TrackingAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity/src/TrackingAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/src/TrackingAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: TrackingAction.cc,v 1.4 2007/10/29 17:09:53 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity/vis.mac
===================================================================
--- trunk/examples/extended/medical/fanoCavity/vis.mac	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity/vis.mac	(revision 1337)
@@ -10,24 +10,70 @@
 /run/initialize
 #
-# Create empty scene ("world" is default)
-/vis/scene/create
+# Use this open statement to create an OpenGL view:
+/vis/open OGL 600x600-0+0
 #
-# Create a scene handler for a specific graphics system
-# Edit the next line(s) to choose another graphic system
-#
-/vis/open OGLIX
-#
+# Use this open statement to create a .prim file suitable for
+# viewing in DAWN:
 #/vis/open DAWNFILE
 #
-# Draw scene
-/vis/viewer/set/viewpointThetaPhi 90 180 deg
+# Use this open statement to create a .heprep file suitable for
+# viewing in HepRApp:
+#/vis/open HepRepFile
+#
+# Use this open statement to create a .wrl file suitable for
+# viewing in a VRML viewer:
+#/vis/open VRML2FILE
+#
+# Disable auto refresh and quieten vis messages whilst scene and
+# trajectories are established:
+/vis/viewer/set/autoRefresh false
+/vis/verbose errors
+#
+# Draw geometry:
+/vis/drawVolume
+#
+# Specify view angle:
+/vis/viewer/set/viewpointThetaPhi 90. 180.
+#
+# Specify zoom value:
 /vis/viewer/zoom 1.4
-/vis/viewer/flush
 #
-# for drawing the tracks
-# if too many tracks cause core dump => storeTrajectory 0
-/tracking/storeTrajectory 1
+# Specify style (surface or wireframe):
+#/vis/viewer/set/style wireframe
+#
+# Draw coordinate axes:
+#/vis/scene/add/axes 0 0 0 1 m
+#
+# Draw smooth trajectories at end of event, showing trajectory points
+# as markers 2 pixels wide:
+/vis/scene/add/trajectories smooth
+/vis/modeling/trajectories/create/drawByCharge
+/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
+/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 1
+# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
+#
+# Draw hits at end of event:
+#/vis/scene/add/hits
+#
+# To draw only gammas:
+#/vis/filtering/trajectories/create/particleFilter
+#/vis/filtering/trajectories/particleFilter-0/add gamma
+#
+# To invert the above, drawing all particles except gammas,
+# keep the above two lines but also add:
+#/vis/filtering/trajectories/particleFilter-0/invert true
+#
+# Many other options are available with /vis/modeling and /vis/filtering.
+# For example, to select colour by particle ID:
+#/vis/modeling/trajectories/create/drawByParticleID
+#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
+#
+# To superimpose all of the events from a given run:
 /vis/scene/endOfEventAction accumulate
 #
-/testem/event/drawTracks all
-
+# Re-establish auto refreshing and verbosity:
+/vis/viewer/set/autoRefresh true
+/vis/verbose warnings
+#
+# For file-based drivers, use this to create an empty detector view:
+#/vis/viewer/flush
Index: trunk/examples/extended/medical/fanoCavity2/History
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/History	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/History	(revision 1337)
@@ -1,3 +1,3 @@
-$Id: History,v 1.4 2007/11/12 18:19:30 maire Exp $
+$Id: History,v 1.18 2010/06/07 05:40:46 perl Exp $
 -------------------------------------------------------------------
 
@@ -15,4 +15,50 @@
      * Reverse chronological order (last date on top), please *
      ----------------------------------------------------------
+
+06-06-10 J.Perl (fano2-V09-03-03)
+- Remove unused variable in EventAction 
+
+04-06-10 J.Perl (fano2-V09-03-02)
+- Updated vis usage 
+
+20-01-10 mma (fano2-V09-03-00)
+- introduce PhysListEmStandard_option2 : UrbanMscModel93 without options
+            PhysListEmStandard_WVI : WentzelVIModel
+- put in run01.mac all physics lists choice
+	         
+16-11-09 mma (fano2-V09-02-01)
+- PhysListEmStandard_option3 : use UrbanMscModel93
+     
+31-10-09 mma (fano2-V09-02-00)
+- splite PhysicsList in 2, as others TestEm examples.
+- local copy of PhysListEmStandard_option0, PhysListEmStandard_option3,
+  PhysListEmStandard_SS
+- new PhysListEmStandard_GS for GoudsmitSaundersonMsc model  
+- PhysicsList: add cut for proton recoil in case of Single Scattering
+     
+16-11-08 mma (fano2-V09-01-06)
+- Em options: 20bins/decade  LinLossLimit=default=0.01
+     
+01-11-08 mma (fano2-V09-01-05)
+- PhysicsList : add comments for Em options
+     
+26-10-08 mma (fano2-V09-01-04)
+- PhysicsList : modified Em options
+     
+28-09-08 mma (fano2-V09-01-03)
+- HistoManager : root format by default
+
+11-06-08 V.Ivant (fano2-V09-01-02)
+- Remove AIDA from GNUmakefile
+     
+07-05-08 mma (fano2-V09-01-01)
+- README : update Aida informations     
+     
+ 11-04-08 mma
+- HistoManager::Scale() : suppress warning
+    
+04-04-08 mma(fano2-V09-01-00)
+- PhysicsList : replace G4MultipleScattering by new G4eMultipleScattering
+  --> allows to use MscUrbanModel2
      
 12-11-07 mma (fano2-V09-00-01) 
Index: trunk/examples/extended/medical/fanoCavity2/README
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/README	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/README	(revision 1337)
@@ -1,3 +1,3 @@
-$Id: README,v 1.8 2007/11/12 18:19:30 maire Exp $
+$Id: README,v 1.11 2009/10/31 18:05:56 maire Exp $
 -------------------------------------------------------------------
 
@@ -82,6 +82,6 @@
     - Bremsstrahlung : Fano conditions imply no energy transfer via
     bremsstrahlung radiation. Therefore this process is not registered in the
-    physics list. However, it is always possible to include it via an UI
-    command. See PhysicsListMessenger class.
+    physics list. However, it is always possible to include it. 
+    See PhysListEm classes.
     
     - Ionization : In order to have same stopping power in wall and cavity, one
@@ -125,8 +125,8 @@
    
    One can control the name of the histograms file with the command:
-   /testem/histo/setFileName  name  (default fanoCavity)
+   /testem/histo/setFileName  name  (default fanocavity2)
    
    It is possible to choose the format of the histogram file (hbook, root, XML)
-   with the command /testem/histo/setFileType (hbook by default)
+   with the command /testem/histo/setFileType (root by default)
    
    It is also possible to print selected histograms on an ascii file:
@@ -156,44 +156,3 @@
 
   To use histograms, at least one of the AIDA implementations should be 
-  available (see http://aida.freehep.org).
-  
- 8a - PI 
-
-  A package including AIDA and extended interfaces also using Python is PI, 
-  available from: http://cern.ch/pi
-
-  Once installed PI or PI-Lite in a specified local area $MYPY, it is required 
-  to add the installation path to $PATH, i.e. for example, for release 1.2.1 of 
-  PI:
-  setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin
-
-  CERN users can use the PATH to the LCG area on AFS.
-  Before running the example the command should be issued:
-  eval `aida-config --runtime csh`
-
- 8b -  OpenScientist
-
-  OpenScientist is available at http://OpenScientist.lal.in2p3.fr.
-
-  You have to "setup" the OpenScientist AIDA implementation before compiling
-  (then with G4ANALYSIS_USE set) and running your Geant4 application.
-
- On UNIX you setup, with a csh flavoured shell : 
-	csh> source <<OpenScientist install path>/aida-setup.csh 
-        or with a sh flavoured shell : 
-	sh> . <<OpenScientist install path>/aida-setup.sh
- On Windows : 
-	DOS> call <<OpenScientist install path>/aida-setup.bat 
-
-  You can use various file formats for writing (AIDA-XML, hbook, root).
-  These formats are readable by the Lab onx interactive program
-  or the OpenPAW application. See the web pages.
-
-
-  With OpenPAW, on a run.hbook file, one can view the histograms
-  with something like :
-	OS> opaw 
-        opaw> h/file 1 run.hbook  ( or opaw> h/file 1 run.aida or run.root)  
-	opaw> zone 2 2 
-	opaw> h/plot 1 
-	opaw> h/plot 2
+  available. See InstallAida.txt
Index: trunk/examples/extended/medical/fanoCavity2/essai.mac
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/essai.mac	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/essai.mac	(revision 1337)
@@ -1,8 +1,8 @@
-# $Id: essai.mac,v 1.5 2009/10/31 18:05:56 maire Exp $
+# $Id: essai.mac,v 1.6 2010/01/20 15:41:14 maire Exp $
 #
 /control/verbose 2
 /run/verbose 2
 #
-/testem/phys/addPhysics standard_opt3
+/testem/phys/addPhysics standard_WVI
 #
 /run/initialize
@@ -10,5 +10,5 @@
 /gun/energy 1 MeV
 #
-/testem/event/printModulo 100000
+/testem/event/printModulo 10000
 #
-/run/beamOn 1000000
+/run/beamOn 100000
Index: trunk/examples/extended/medical/fanoCavity2/fanoCavity2.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/fanoCavity2.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/fanoCavity2.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: fanoCavity2.cc,v 1.2 2007/10/31 16:16:20 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 // 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/fanoCavity2.in
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/fanoCavity2.in	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/fanoCavity2.in	(revision 1337)
@@ -1,6 +1,8 @@
-# $Id: fanoCavity2.in,v 1.2 2007/11/05 13:19:16 maire Exp $
+# $Id: fanoCavity2.in,v 1.3 2009/10/31 18:05:56 maire Exp $
 #
 /control/verbose 2
 /run/verbose 2
+#
+/testem/phys/addPhysics standard_opt3
 #
 /run/initialize
Index: trunk/examples/extended/medical/fanoCavity2/fanoCavity2.out
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/fanoCavity2.out	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/fanoCavity2.out	(revision 1337)
@@ -1,5 +1,9 @@
+
+        ############################################
+        !!! WARNING - FPE detection is activated !!!
+        ############################################
 
 *************************************************************
- Geant4 version Name: global-V09-00-03    (9-May-2008)
+ Geant4 version Name: geant4-09-03-ref-06    (25-June-2010)
                       Copyright : Geant4 Collaboration
                       Reference : NIM A 506 (2003), 250-303
@@ -10,26 +14,29 @@
 ***** Table : Nb of materials = 6 *****
 
- Material:    Water     density:  1.000 g/cm3   RadL:  36.092 cm   Imean:  75.000 eV 
+ Material:    Water     density:  1.000 g/cm3   RadL:  36.092 cm   Nucl.Int.Length:  75.416 cm   Imean:  75.000 eV 
    --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  11.21 %  ElmAbundance  66.67 %
    --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  88.79 %  ElmAbundance  33.33 %
 
- Material: Water_gas     density:  1.000 mg/cm3  RadL: 360.925 m    Imean:  75.000 eV   temperature: 273.15 K  pressure:   1.00 atm
+ Material: Water_gas     density:  1.000 mg/cm3  RadL: 360.924 m    Nucl.Int.Length: 754.163 m    Imean:  75.000 eV   temperature: 273.15 K  pressure:   1.00 atm
    --->  Element: Hydrogen (H)   Z =  1.0   N =   1.0   A =   1.01 g/mole  ElmMassFraction:  11.21 %  ElmAbundance  66.67 %
    --->  Element: Oxygen (O)   Z =  8.0   N =  16.0   A =  16.00 g/mole  ElmMassFraction:  88.79 %  ElmAbundance  33.33 %
 
- Material: Graphite     density:  2.265 g/cm3   RadL:  18.850 cm   Imean:  78.000 eV 
+ Material: Graphite     density:  2.265 g/cm3   RadL:  18.850 cm   Nucl.Int.Length:  35.387 cm   Imean:  81.000 eV 
    --->  Element: Graphite ( )   Z =  6.0   N =  12.0   A =  12.01 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
 
- Material: Graphite_gas     density:  2.265 mg/cm3  RadL: 188.496 m    Imean:  78.000 eV   temperature: 273.15 K  pressure:   1.00 atm
+ Material: Graphite_gas     density:  2.265 mg/cm3  RadL: 188.496 m    Nucl.Int.Length: 353.873 m    Imean:  81.000 eV   temperature: 273.15 K  pressure:   1.00 atm
    --->  Element: Graphite_gas ( )   Z =  6.0   N =  12.0   A =  12.01 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
 
- Material: Aluminium     density:  2.700 g/cm3   RadL:   8.893 cm   Imean: 166.400 eV 
+ Material: Aluminium     density:  2.700 g/cm3   RadL:   8.893 cm   Nucl.Int.Length:  38.879 cm   Imean: 166.000 eV 
    --->  Element: Aluminium ( )   Z = 13.0   N =  27.0   A =  26.98 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
 
- Material: Aluminium_gas     density:  2.700 mg/cm3  RadL:  88.925 m    Imean: 166.400 eV   temperature: 273.15 K  pressure:   1.00 atm
+ Material: Aluminium_gas     density:  2.700 mg/cm3  RadL:  88.925 m    Nucl.Int.Length: 388.793 m    Imean: 166.000 eV   temperature: 273.15 K  pressure:   1.00 atm
    --->  Element: Aluminium_gas ( )   Z = 13.0   N =  27.0   A =  26.98 g/mole  ElmMassFraction: 100.00 %  ElmAbundance 100.00 %
 
 
 /run/verbose 2
+#
+/testem/phys/addPhysics standard_opt3
+PhysicsList::AddPhysicsList: <standard_opt3>
 #
 /run/initialize
@@ -44,4 +51,5 @@
 physicsList->Construct() start.
 physicsList->Construct() start.
+physicsList->CheckParticleList() start.
 physicsList->setCut() start.
 PhysicsList::SetCuts:CutLength : 10 km 
@@ -52,64 +60,60 @@
 #
 /run/beamOn 40000
-G4VRangeToEnergyConverter::ConvertCutToKineticEnergy   for gamma
-The cut in range [1e+07 (mm)]   is too big   for material  idx=0
-The cut in energy is set1.79769e+305GeV 
-G4VRangeToEnergyConverter::ConvertCutToKineticEnergy   for e-
-The cut in range [1e+07 (mm)]   is too big   for material  idx=0
-The cut in energy is set1.79769e+305GeV 
-G4VRangeToEnergyConverter::ConvertCutToKineticEnergy   for e+
-The cut in range [1e+07 (mm)]   is too big   for material  idx=0
-The cut in energy is set1.79769e+305GeV 
-G4VRangeToEnergyConverter::ConvertCutToKineticEnergy   for gamma
-The cut in range [1e+07 (mm)]   is too big   for material  idx=1
-The cut in energy is set1.79769e+305GeV 
-
-phot:  Total cross sections from Sandia parametrisation. 
-      Sampling according PhotoElectric model
-
-compt:  Total cross sections has a good parametrisation from 10 KeV to (100/Z) GeV
-      Sampling according Klein-Nishina model
-      tables are built for  gamma
-      Lambda tables from 100 eV  to 10 GeV in 800 bins.
-
-conv:  Total cross sections has a good parametrisation from 1.5 MeV to 100 GeV for all Z;
-      sampling secondary e+e- according Bethe-Heitler model
-      tables are built for  gamma
-      Lambda tables from 1.022 MeV to 10 GeV in 800 bins.
-
-msc:  Model variant of multiple scattering for e-
-      Lambda tables from 100 eV  to 10 GeV in 800 bins.
-      LateralDisplacementFlag=  1   Skin= 2
-      Boundary/stepping algorithm is active with RangeFactor= 0.02  Step limit type 2
-
-eIoni:   tables are built for  e-
-      dE/dx and range tables from 100 eV  to 10 GeV in 800 bins.
-      Lambda tables from threshold to 10 GeV in 800 bins.
-      Delta cross sections and sampling from myMollerBhabha model
-      Good description from 1 KeV to 100 GeV.
-      Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1
-      CSDA range table up to 10 GeV in 800 bins.
-
-eIoni:   tables are built for  e+
-      dE/dx and range tables from 100 eV  to 10 GeV in 800 bins.
-      Lambda tables from threshold to 10 GeV in 800 bins.
-      Delta cross sections and sampling from myMollerBhabha model
-      Good description from 1 KeV to 100 GeV.
-      Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1
-      CSDA range table up to 10 GeV in 800 bins.
-
-msc:  Model variant of multiple scattering for proton
-      Lambda tables from 100 eV  to 10 GeV in 800 bins.
-      LateralDisplacementFlag=  1   Skin= 2
-      Boundary/stepping algorithm is active with RangeFactor= 0.02  Step limit type 2
-
-hIoni:   tables are built for  proton
-      dE/dx and range tables from 100 eV  to 10 GeV in 800 bins.
-      Lambda tables from threshold to 10 GeV in 800 bins.
-      Scaling relation is used from proton dE/dx and range.
-      Delta cross sections and sampling from BetheBloch model for scaled energy > 2 MeV
-      Parametrisation from Bragg for protons below. NuclearStopping= 1
-      Step function: finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1
-      CSDA range table up to 10 GeV in 800 bins.
+
+phot:   for  gamma    SubType= 12
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+       PhotoElectric :     Emin=          0 eV         Emax=   10 GeV
+
+compt:   for  gamma    SubType= 13
+      Lambda tables from 100 eV  to 10 GeV in 160 bins, spline: 1
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+       Klein-Nishina :     Emin=          0 eV         Emax=   10 GeV
+
+conv:   for  gamma    SubType= 14
+      Lambda tables from 1.022 MeV to 10 GeV in 160 bins, spline: 1
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+       Bethe-Heitler :     Emin=          0 eV         Emax=   10 GeV
+
+msc:   for e-    SubType= 10
+      Lambda tables from 100 eV  to 10 GeV in 160 bins, spline: 1
+      RangeFactor= 0.02, stepLimitType: 2, latDisplacement: 1, skin= 3, geomFactor= 2.5
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+          UrbanMsc93 :     Emin=          0 eV         Emax=   10 GeV
+
+eIoni:   for  e-    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 GeV in 160 bins
+      Lambda tables from threshold to 10 GeV in 160 bins, spline: 1
+      finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+      myMollerBhabha :     Emin=          0 eV         Emax=   10 GeV
+      CSDA range table up to 10 GeV in 160 bins
+
+eIoni:   for  e+    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 GeV in 160 bins
+      Lambda tables from threshold to 10 GeV in 160 bins, spline: 1
+      finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+      myMollerBhabha :     Emin=          0 eV         Emax=   10 GeV
+      CSDA range table up to 10 GeV in 160 bins
+
+annihil:   for  e+    SubType= 5
+      Lambda tables from 100 eV  to 10 GeV in 160 bins, spline: 1
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+            eplus2gg :     Emin=          0 eV         Emax=   10 GeV
+
+msc:   for proton    SubType= 10
+      Lambda tables from 100 eV  to 10 GeV in 160 bins, spline: 1
+      RangeFactor= 0.02, stepLimitType: 2, latDisplacement: 1, skin= 3, geomFactor= 2.5
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+          UrbanMsc90 :     Emin=          0 eV         Emax=   10 GeV
+
+hIoni:   for  proton    SubType= 2
+      dE/dx and range tables from 100 eV  to 10 GeV in 160 bins
+      Lambda tables from threshold to 10 GeV in 160 bins, spline: 1
+      finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
+      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
+               Bragg :     Emin=          0 eV         Emax=   2 MeV
+          BetheBloch :     Emin=          2 MeV        Emax=   10 GeV
+      CSDA range table up to 10 GeV in 160 bins
 
 Region <DefaultRegionForTheWorld> -- appears in <Wall> world volume
@@ -117,5 +121,5 @@
  Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
  Materials : Water Water_gas 
- Production cuts :  gamma 10 km     e- 10 km     e+ 10 km 
+ Production cuts :   gamma 10 km      e- 10 km      e+ 10 km  proton 10 km 
 
 ========= Table of registered couples ==============================
@@ -123,6 +127,6 @@
 Index : 0     used in the geometry : Yes     recalculation needed : No 
  Material : Water
- Range cuts        :  gamma 10 km     e- 10 km     e+ 10 km 
- Energy thresholds :  gamma 2.88022e+295 J      e- 2.88022e+295 J      e+ 2.88022e+295 J  
+ Range cuts        :  gamma  10 km     e-  10 km     e+  10 km  proton 10 km 
+ Energy thresholds :  gamma  10 GeV    e-  10 GeV    e+  10 GeV proton 1 TeV
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -130,6 +134,6 @@
 Index : 1     used in the geometry : Yes     recalculation needed : No 
  Material : Water_gas
- Range cuts        :  gamma 10 km     e- 10 km     e+ 10 km 
- Energy thresholds :  gamma 2.88022e+295 J      e- 18.4792 GeV    e+ 17.5913 GeV
+ Range cuts        :  gamma  10 km     e-  10 km     e+  10 km  proton 10 km 
+ Energy thresholds :  gamma  10 GeV    e-  10 GeV    e+  10 GeV proton 1 TeV
  Region(s) which use this couple : 
     DefaultRegionForTheWorld
@@ -163,35 +167,35 @@
 Start Run processing.
 
---->evntNb= 10000 Nwall= 9997 Ncav= 4 Ic/Iw= 2.09883 Ne-_cav= 2823 doseCavity/Ebeam= 1.13192  (100*(ratio-1) = 13.19193 %)
-
---->evntNb= 20000 Nwall= 19996 Ncav= 5 Ic/Iw= 1.31164 Ne-_cav= 5677 doseCavity/Ebeam= 1.23974  (100*(ratio-1) = 23.97404 %)
-
---->evntNb= 30000 Nwall= 29991 Ncav= 10 Ic/Iw= 1.74903 Ne-_cav= 8523 doseCavity/Ebeam= 1.29183  (100*(ratio-1) = 29.18310 %)
+--->evntNb= 10000 Nwall= 10000 Ncav= 1 Ic/Iw= 0.52456 Ne-_cav= 2787 doseCavity/Ebeam= 1.12338  (100*(ratio-1) = 12.33820 %)
+
+--->evntNb= 20000 Nwall= 19999 Ncav= 2 Ic/Iw= 0.52458 Ne-_cav= 5507 doseCavity/Ebeam= 1.00206  (100*(ratio-1) = 0.20619 %)
+
+--->evntNb= 30000 Nwall= 29998 Ncav= 3 Ic/Iw= 0.52459 Ne-_cav= 8236 doseCavity/Ebeam= 0.98084  (100*(ratio-1) = -1.91610 %)
 Run terminated.
 Run Summary
   Number of events processed : 40000
-  User=13s Real=13s Sys=0.01s
-
- Process calls frequency --->  msc= 351630  eIoni= 635349  Transportation= 22715
+  User=9.6s Real=12s Sys=0s
+
+ Process calls frequency --->  msc= 507867  eIoni= 620396  Transportation= 22034
 
  Charged particle flow in cavity :
-      Enter --> nbParticles = 11358	 Energy = 7.238 GeV
-      Exit  --> nbParticles = 11357	 Energy = 7.238 GeV
-
- beamFluence in wall = 39990	 in cavity = 10	 Icav/Iwall = 1.31170	 energyFluence = 38.12063 MeV*cm2/mg
-
- Total edep in cavity = 9.95706 MeV +- 6.35210 %
- Total dose in cavity = 49.78531 MeV*cm2/mg +- 6.35210 %
-
- DoseCavity/EnergyFluence = 1.30599 +- 0.08296
-
- Total charged trackLength in cavity = 40.0185 m     (mean value = 3.5234 mm )
-
- StepSize of ch. tracks in wall   = 183.6241 um  +- 185.5614 um 	 (nbSteps/track = 23.8988)
- StepSize of ch. tracks in cavity = 741.3298 um  +- 3.0344 mm 	 (nbSteps/track = 4.7528)
+      Enter --> nbParticles = 11019	 Energy = 7.036 GeV
+      Exit  --> nbParticles = 11015	 Energy = 7.034 GeV
+
+ beamFluence in wall = 39994	 in cavity = 6	 Icav/Iwall = 0.78695	 energyFluence = 38.12014 MeV*cm2/mg
+
+ Total edep in cavity = 7.76475 MeV +- 5.14221 %
+ Total dose in cavity = 38.82375 MeV*cm2/mg +- 5.14221 %
+
+ DoseCavity/EnergyFluence = 1.01846 +- 0.05237
+
+ Total charged trackLength in cavity = 33.1218 m     (mean value = 3.0059 mm )
+
+ StepSize of ch. tracks in wall   = 158.8831 um  +- 182.9748 um 	 (nbSteps/track = 27.6011)
+ StepSize of ch. tracks in cavity = 713.5388 um  +- 1.1439 mm 	 (nbSteps/track = 4.2126)
 
 --------- Ranecu engine status ---------
  Initial seed (index) = 0
- Current couple of seeds = 580686433, 475796940
+ Current couple of seeds = 991846787, 685450694
 ----------------------------------------
 UserDetectorConstruction deleted.
@@ -201,5 +205,4 @@
 G4 kernel has come to Quit state.
 EventManager deleted.
-Default detector region deleted.
 UImanager deleted.
 Units table cleared.
@@ -207,2 +210,3 @@
 RunManagerKernel is deleted.
 RunManager is deleting.
+
Index: trunk/examples/extended/medical/fanoCavity2/include/DetectorConstruction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/DetectorConstruction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/DetectorConstruction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorConstruction.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/DetectorMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/DetectorMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/DetectorMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/EventAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/EventAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/EventAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventAction.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/EventActionMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/EventActionMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/EventActionMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/HistoManager.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/HistoManager.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/HistoManager.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoManager.hh,v 1.3 2007/11/12 18:19:30 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/HistoMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/HistoMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/HistoMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoMessenger.hh,v 1.2 2007/11/12 18:19:30 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/MyMollerBhabhaModel.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/MyMollerBhabhaModel.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/MyMollerBhabhaModel.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: MyMollerBhabhaModel.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Index: trunk/examples/extended/medical/fanoCavity2/include/PhysicsList.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/PhysicsList.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/PhysicsList.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsList.hh,v 1.2 2009/10/31 18:05:56 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/PhysicsListMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/PhysicsListMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/PhysicsListMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsListMessenger.hh,v 1.2 2009/10/31 18:05:56 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/PrimaryGeneratorAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/PrimaryGeneratorAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/PrimaryGeneratorAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorAction.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/ProcessesCount.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/ProcessesCount.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/ProcessesCount.hh	(revision 1337)
@@ -26,5 +26,5 @@
 //
 // $Id: ProcessesCount.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/RunAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/RunAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/RunAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: RunAction.hh,v 1.2 2007/10/31 16:16:20 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/StepMax.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/StepMax.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/StepMax.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMax.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/StepMaxMessenger.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/StepMaxMessenger.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/StepMaxMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMaxMessenger.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/SteppingAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/SteppingAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/SteppingAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingAction.hh,v 1.2 2007/10/31 16:16:20 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/SteppingVerbose.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/SteppingVerbose.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/SteppingVerbose.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingVerbose.hh,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/include/TrackingAction.hh
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/include/TrackingAction.hh	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/include/TrackingAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: TrackingAction.hh,v 1.2 2007/10/31 16:16:20 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/run01.mac
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/run01.mac	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/run01.mac	(revision 1337)
@@ -1,8 +1,13 @@
-# $Id: run01.mac,v 1.3 2009/10/31 18:05:56 maire Exp $
+# $Id: run01.mac,v 1.4 2010/01/20 15:41:14 maire Exp $
 #
 /control/verbose 2
 /run/verbose 2
 #
+###/testem/phys/addPhysics standard_opt0
+###/testem/phys/addPhysics standard_opt2
 /testem/phys/addPhysics standard_opt3
+###/testem/phys/addPhysics standard_GS
+###/testem/phys/addPhysics standard_WVI
+###/testem/phys/addPhysics standard_SS
 #
 /run/initialize
Index: trunk/examples/extended/medical/fanoCavity2/src/DetectorConstruction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/DetectorConstruction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/DetectorConstruction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorConstruction.cc,v 1.2 2007/11/05 13:19:16 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 
 //
Index: trunk/examples/extended/medical/fanoCavity2/src/DetectorMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/DetectorMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/DetectorMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.cc,v 1.2 2007/11/05 13:19:16 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/EventAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/EventAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/EventAction.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: EventAction.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: EventAction.cc,v 1.3 2010/06/07 05:40:46 perl Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -37,7 +37,4 @@
 
 #include "G4Event.hh"
-#include "G4TrajectoryContainer.hh"
-#include "G4Trajectory.hh"
-#include "G4VVisManager.hh"
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -69,21 +66,6 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
-void EventAction::EndOfEventAction(const G4Event* evt)
+void EventAction::EndOfEventAction(const G4Event*)
 {  
-  //trajectories
-  //
-  if (G4VVisManager::GetConcreteInstance())
-  {
-   G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
-   G4int n_trajectories = 0;
-   if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();  
-   for(G4int i=0; i<n_trajectories; i++) 
-      { G4Trajectory* trj = (G4Trajectory*)
-                                       ((*(evt->GetTrajectoryContainer()))[i]);
-        if (drawFlag == "all") trj->DrawTrajectory(1000);
-        else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
-                               trj->DrawTrajectory(); 
-      }
-  }
 }
 
Index: trunk/examples/extended/medical/fanoCavity2/src/EventActionMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/EventActionMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/EventActionMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/HistoManager.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/HistoManager.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/HistoManager.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoManager.cc,v 1.5 2008/09/28 16:15:39 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/HistoMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/HistoMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/HistoMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: HistoMessenger.cc,v 1.2 2007/11/12 18:19:30 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/MyMollerBhabhaModel.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/MyMollerBhabhaModel.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/MyMollerBhabhaModel.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: MyMollerBhabhaModel.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/PhysicsList.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/PhysicsList.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/PhysicsList.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: PhysicsList.cc,v 1.7 2009/10/31 18:05:01 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: PhysicsList.cc,v 1.8 2010/01/20 15:41:14 maire Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -34,6 +34,8 @@
 
 #include "PhysListEmStandard_option0.hh"
+#include "PhysListEmStandard_option2.hh"
 #include "PhysListEmStandard_option3.hh"
 #include "PhysListEmStandard_GS.hh"
+#include "PhysListEmStandard_WVI.hh"
 #include "PhysListEmStandard_SS.hh"
 
@@ -149,4 +151,10 @@
     emPhysicsList = new PhysListEmStandard_option0(name,detector);
     
+  } else if (name == "standard_opt2") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new PhysListEmStandard_option2(name,detector);
+    
   } else if (name == "standard_opt3") {
 
@@ -154,5 +162,5 @@
     delete emPhysicsList;
     emPhysicsList = new PhysListEmStandard_option3(name,detector);
-    
+        
   } else if (name == "standard_GS") {
 
@@ -160,10 +168,17 @@
     delete emPhysicsList;
     emPhysicsList = new PhysListEmStandard_GS(name,detector);    
-    
+        
+  } else if (name == "standard_WVI") {
+
+    emName = name;
+    delete emPhysicsList;
+    emPhysicsList = new PhysListEmStandard_WVI(name,detector);
+            
   } else if (name == "standard_SS") {
 
     emName = name;
     delete emPhysicsList;
-    emPhysicsList = new PhysListEmStandard_SS(name,detector);    
+    emPhysicsList = new PhysListEmStandard_SS(name,detector);
+        
   } else {
 
Index: trunk/examples/extended/medical/fanoCavity2/src/PhysicsListMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/PhysicsListMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/PhysicsListMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PhysicsListMessenger.cc,v 1.2 2009/10/31 18:05:01 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/PrimaryGeneratorAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/PrimaryGeneratorAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/PrimaryGeneratorAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorAction.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/RunAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/RunAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/RunAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: RunAction.cc,v 1.3 2007/11/05 13:19:16 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 // 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/StepMax.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/StepMax.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/StepMax.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMax.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/StepMaxMessenger.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/StepMaxMessenger.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/StepMaxMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: StepMaxMessenger.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/SteppingAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/SteppingAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/SteppingAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingAction.cc,v 1.2 2007/10/31 16:16:20 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/SteppingVerbose.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/SteppingVerbose.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/SteppingVerbose.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingVerbose.cc,v 1.1 2007/10/15 16:20:23 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/src/TrackingAction.cc
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/src/TrackingAction.cc	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/src/TrackingAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: TrackingAction.cc,v 1.2 2007/10/31 16:16:20 maire Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Index: trunk/examples/extended/medical/fanoCavity2/vis.mac
===================================================================
--- trunk/examples/extended/medical/fanoCavity2/vis.mac	(revision 1230)
+++ trunk/examples/extended/medical/fanoCavity2/vis.mac	(revision 1337)
@@ -10,24 +10,70 @@
 /run/initialize
 #
-# Create empty scene ("world" is default)
-/vis/scene/create
+# Use this open statement to create an OpenGL view:
+/vis/open OGL 600x600-0+0
 #
-# Create a scene handler for a specific graphics system
-# Edit the next line(s) to choose another graphic system
-#
-/vis/open OGLIX
-#
+# Use this open statement to create a .prim file suitable for
+# viewing in DAWN:
 #/vis/open DAWNFILE
 #
-# Draw scene
-/vis/viewer/set/viewpointThetaPhi 90 180 deg
+# Use this open statement to create a .heprep file suitable for
+# viewing in HepRApp:
+#/vis/open HepRepFile
+#
+# Use this open statement to create a .wrl file suitable for
+# viewing in a VRML viewer:
+#/vis/open VRML2FILE
+#
+# Disable auto refresh and quieten vis messages whilst scene and
+# trajectories are established:
+/vis/viewer/set/autoRefresh false
+/vis/verbose errors
+#
+# Draw geometry:
+/vis/drawVolume
+#
+# Specify view angle:
+/vis/viewer/set/viewpointThetaPhi 90. 180.
+#
+# Specify zoom value:
 /vis/viewer/zoom 1.4
-/vis/viewer/flush
 #
-# for drawing the tracks
-# if too many tracks cause core dump => storeTrajectory 0
-/tracking/storeTrajectory 1
+# Specify style (surface or wireframe):
+#/vis/viewer/set/style wireframe
+#
+# Draw coordinate axes:
+#/vis/scene/add/axes 0 0 0 1 m
+#
+# Draw smooth trajectories at end of event, showing trajectory points
+# as markers 2 pixels wide:
+/vis/scene/add/trajectories smooth
+/vis/modeling/trajectories/create/drawByCharge
+/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
+/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 1
+# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
+#
+# Draw hits at end of event:
+#/vis/scene/add/hits
+#
+# To draw only gammas:
+#/vis/filtering/trajectories/create/particleFilter
+#/vis/filtering/trajectories/particleFilter-0/add gamma
+#
+# To invert the above, drawing all particles except gammas,
+# keep the above two lines but also add:
+#/vis/filtering/trajectories/particleFilter-0/invert true
+#
+# Many other options are available with /vis/modeling and /vis/filtering.
+# For example, to select colour by particle ID:
+#/vis/modeling/trajectories/create/drawByParticleID
+#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
+#
+# To superimpose all of the events from a given run:
 /vis/scene/endOfEventAction accumulate
 #
-/testem/event/drawTracks all
-
+# Re-establish auto refreshing and verbosity:
+/vis/viewer/set/autoRefresh true
+/vis/verbose warnings
+#
+# For file-based drivers, use this to create an empty detector view:
+#/vis/viewer/flush
