Index: trunk/examples/extended/optical/LXe/LXe.cc
===================================================================
--- trunk/examples/extended/optical/LXe/LXe.cc	(revision 812)
+++ trunk/examples/extended/optical/LXe/LXe.cc	(revision 1230)
@@ -27,6 +27,4 @@
 #include "G4UImanager.hh"
 #include "G4String.hh"
-#include "G4UItcsh.hh"
-#include "G4UIterminal.hh"
 
 #include "LXeDetectorConstruction.hh"
@@ -44,4 +42,8 @@
 #ifdef G4VIS_USE
 #include "G4VisExecutive.hh"
+#endif
+
+#ifdef G4UI_USE
+#include "G4UIExecutive.hh"
 #endif
 
@@ -71,28 +73,23 @@
   runManager->SetUserAction(new LXeSteppingAction(recorder));
 
-  runManager->Initialize();
+  // runManager->Initialize();
  
   // get the pointer to the UI manager and set verbosities
-  G4UImanager* UI = G4UImanager::GetUIpointer();
+  G4UImanager* UImanager = G4UImanager::GetUIpointer();
   
   if(argc==1){
-    G4UIsession* session=0;
-#ifdef G4UI_USE_TCSH
-    session = new G4UIterminal(new G4UItcsh);
-#else
-    session = new G4UIterminal();
+#ifdef G4UI_USE
+    G4UIExecutive* ui = new G4UIExecutive(argc, argv);
+#ifdef G4VIS_USE
+    UImanager->ApplyCommand("/control/execute vis.mac");     
 #endif
-
-    //execute vis.mac
-    UI->ApplyCommand("/control/execute vis.mac");
-
-    session->SessionStart();
-    delete session;
-
+    ui->SessionStart();
+    delete ui;
+#endif
   }
   else{
     G4String command = "/control/execute ";
     G4String filename = argv[1];
-    UI->ApplyCommand(command+filename);
+    UImanager->ApplyCommand(command+filename);
   }
 
Index: trunk/examples/extended/optical/LXe/include/LXeEMPhysics.hh
===================================================================
--- trunk/examples/extended/optical/LXe/include/LXeEMPhysics.hh	(revision 812)
+++ trunk/examples/extended/optical/LXe/include/LXeEMPhysics.hh	(revision 1230)
@@ -35,5 +35,5 @@
 #include "G4ComptonScattering.hh"
 #include "G4GammaConversion.hh"
-#include "G4MultipleScattering.hh"
+#include "G4eMultipleScattering.hh"
 #include "G4eIonisation.hh"
 #include "G4eBremsstrahlung.hh"
@@ -63,10 +63,10 @@
   
     // Electron physics
-    G4MultipleScattering* theElectronMultipleScattering;
+    G4eMultipleScattering* theElectronMultipleScattering;
     G4eIonisation* theElectronIonisation;
     G4eBremsstrahlung* theElectronBremsStrahlung;
   
     //Positron physics
-    G4MultipleScattering* thePositronMultipleScattering;
+    G4eMultipleScattering* thePositronMultipleScattering;
     G4eIonisation* thePositronIonisation; 
     G4eBremsstrahlung* thePositronBremsStrahlung;  
Index: trunk/examples/extended/optical/LXe/include/LXeMuonPhysics.hh
===================================================================
--- trunk/examples/extended/optical/LXe/include/LXeMuonPhysics.hh	(revision 812)
+++ trunk/examples/extended/optical/LXe/include/LXeMuonPhysics.hh	(revision 1230)
@@ -31,5 +31,5 @@
 
 #include "G4VPhysicsConstructor.hh"
-#include "G4MultipleScattering.hh"
+#include "G4MuMultipleScattering.hh"
 #include "G4MuBremsstrahlung.hh"
 #include "G4MuPairProduction.hh"
@@ -58,10 +58,10 @@
    // Muon physics
    G4MuIonisation*         fMuPlusIonisation;
-   G4MultipleScattering*   fMuPlusMultipleScattering;
+   G4MuMultipleScattering* fMuPlusMultipleScattering;
    G4MuBremsstrahlung*     fMuPlusBremsstrahlung ;
    G4MuPairProduction*     fMuPlusPairProduction;
 
    G4MuIonisation*         fMuMinusIonisation;
-   G4MultipleScattering*   fMuMinusMultipleScattering;
+   G4MuMultipleScattering* fMuMinusMultipleScattering;
    G4MuBremsstrahlung*     fMuMinusBremsstrahlung ;
    G4MuPairProduction*     fMuMinusPairProduction;
Index: trunk/examples/extended/optical/LXe/include/LXePrimaryGeneratorAction.hh
===================================================================
--- trunk/examples/extended/optical/LXe/include/LXePrimaryGeneratorAction.hh	(revision 812)
+++ trunk/examples/extended/optical/LXe/include/LXePrimaryGeneratorAction.hh	(revision 1230)
@@ -28,5 +28,4 @@
 #define LXePrimaryGeneratorAction_h 1
 
-#include "G4GeneralParticleSource.hh"
 #include "G4VUserPrimaryGeneratorAction.hh"
 
Index: trunk/examples/extended/optical/LXe/src/LXeDetectorConstruction.cc
===================================================================
--- trunk/examples/extended/optical/LXe/src/LXeDetectorConstruction.cc	(revision 812)
+++ trunk/examples/extended/optical/LXe/src/LXeDetectorConstruction.cc	(revision 1230)
@@ -140,4 +140,8 @@
   LXe_mt->AddConstProperty("YIELDRATIO",1.0);
   LXe->SetMaterialPropertiesTable(LXe_mt);
+
+  // Set the Birks Constant for the LXe scintillator
+
+  LXe->GetIonisation()->SetBirksConstant(0.126*mm/MeV);
   
   G4double Glass_RIND[LXe_NUMENTRIES]={1.49,1.49,1.49};
@@ -171,4 +175,8 @@
   Pstyrene->SetMaterialPropertiesTable(MPTPStyrene);
 
+  // Set the Birks Constant for the Polystyrene scintillator
+
+  Pstyrene->GetIonisation()->SetBirksConstant(0.126*mm/MeV);
+
   G4double RefractiveIndexFiber[WLS_NUMENTRIES]={ 1.60, 1.60, 1.60, 1.60};
   G4double AbsFiber[WLS_NUMENTRIES]={9.00*m,9.00*m,0.1*mm,0.1*mm};
@@ -343,4 +351,5 @@
   G4LogicalSkinSurface::CleanSurfaceTable();
   G4LogicalBorderSurface::CleanSurfaceTable();
+  G4SurfaceProperty::CleanSurfacePropertyTable();
 
   //define new one
Index: trunk/examples/extended/optical/LXe/src/LXeEMPhysics.cc
===================================================================
--- trunk/examples/extended/optical/LXe/src/LXeEMPhysics.cc	(revision 812)
+++ trunk/examples/extended/optical/LXe/src/LXeEMPhysics.cc	(revision 1230)
@@ -74,10 +74,10 @@
   
     // Electron physics
-  theElectronMultipleScattering = new G4MultipleScattering();
+  theElectronMultipleScattering = new G4eMultipleScattering();
   theElectronIonisation = new G4eIonisation();
   theElectronBremsStrahlung = new G4eBremsstrahlung();
   
     //Positron physics
-  thePositronMultipleScattering = new G4MultipleScattering();
+  thePositronMultipleScattering = new G4eMultipleScattering();
   thePositronIonisation = new G4eIonisation(); 
   thePositronBremsStrahlung = new G4eBremsstrahlung();  
Index: trunk/examples/extended/optical/LXe/src/LXeMainVolume.cc
===================================================================
--- trunk/examples/extended/optical/LXe/src/LXeMainVolume.cc	(revision 812)
+++ trunk/examples/extended/optical/LXe/src/LXeMainVolume.cc	(revision 1230)
@@ -266,8 +266,10 @@
   //**Photocathode surface properties
   G4double photocath_EFF[num]={1.,1.}; //Enables 'detection' of photons
-  G4double photocath_REFL[num]={0.,0.};
+  G4double photocath_ReR[num]={1.92,1.92};
+  G4double photocath_ImR[num]={1.69,1.69};
   G4MaterialPropertiesTable* photocath_mt = new G4MaterialPropertiesTable();
   photocath_mt->AddProperty("EFFICIENCY",Ephoton,photocath_EFF,num);
-  photocath_mt->AddProperty("REFLECTIVITY",Ephoton,photocath_REFL,num);
+  photocath_mt->AddProperty("REALRINDEX",Ephoton,photocath_ReR,num);
+  photocath_mt->AddProperty("IMAGINARYRINDEX",Ephoton,photocath_ImR,num);
   G4OpticalSurface* photocath_opsurf= 
     new G4OpticalSurface("photocath_opsurf",glisur,polished,
Index: trunk/examples/extended/optical/LXe/src/LXeMuonPhysics.cc
===================================================================
--- trunk/examples/extended/optical/LXe/src/LXeMuonPhysics.cc	(revision 812)
+++ trunk/examples/extended/optical/LXe/src/LXeMuonPhysics.cc	(revision 1230)
@@ -63,10 +63,10 @@
 {
   fMuPlusIonisation = new G4MuIonisation();
-  fMuPlusMultipleScattering = new G4MultipleScattering();
+  fMuPlusMultipleScattering = new G4MuMultipleScattering();
   fMuPlusBremsstrahlung=new G4MuBremsstrahlung();
   fMuPlusPairProduction= new G4MuPairProduction();
 
   fMuMinusIonisation = new G4MuIonisation();
-  fMuMinusMultipleScattering = new G4MultipleScattering;
+  fMuMinusMultipleScattering = new G4MuMultipleScattering;
   fMuMinusBremsstrahlung = new G4MuBremsstrahlung();
   fMuMinusPairProduction = new G4MuPairProduction();
Index: trunk/examples/extended/optical/LXe/src/LXePMTSD.cc
===================================================================
--- trunk/examples/extended/optical/LXe/src/LXePMTSD.cc	(revision 812)
+++ trunk/examples/extended/optical/LXe/src/LXePMTSD.cc	(revision 1230)
@@ -65,6 +65,6 @@
 
 //_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
-G4bool LXePMTSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist){
-  return ProcessHits_constStep(aStep,ROhist);
+G4bool LXePMTSD::ProcessHits(G4Step* ,G4TouchableHistory* ){
+  return false;
 }
 
@@ -120,5 +120,4 @@
   }
     
-
   return true;
 }
Index: trunk/examples/extended/optical/LXe/src/LXePhysicsList.cc
===================================================================
--- trunk/examples/extended/optical/LXe/src/LXePhysicsList.cc	(revision 812)
+++ trunk/examples/extended/optical/LXe/src/LXePhysicsList.cc	(revision 1230)
@@ -26,20 +26,9 @@
 #include "LXePhysicsList.hh"
 
-#include "globals.hh"
-#include "G4ParticleDefinition.hh"
-#include "G4ProcessManager.hh"
-#include "G4ProcessVector.hh"
-#include "G4ParticleTypes.hh"
-#include "G4ParticleTable.hh"
-
-#include "G4Material.hh"
-#include "G4MaterialTable.hh"
-#include "G4ios.hh"
-#include <iomanip>   
-
 #include "LXeGeneralPhysics.hh"
 #include "LXeEMPhysics.hh"
 #include "LXeMuonPhysics.hh"
-#include "LXeOpticalPhysics.hh"
+
+#include "G4OpticalPhysics.hh"
 
 LXePhysicsList::LXePhysicsList():  G4VModularPhysicsList()
@@ -47,5 +36,4 @@
   // default cut value  (1.0mm) 
   defaultCutValue = 1.0*mm;
-  // SetVerboseLevel(1);
 
   // General Physics
@@ -56,8 +44,19 @@
 
   // Muon Physics
-  RegisterPhysics(  new LXeMuonPhysics("muon"));
+  RegisterPhysics( new LXeMuonPhysics("muon"));
 
-   // Optical Physics
-  RegisterPhysics(  new LXeOpticalPhysics("optical"));
+  // Optical Physics
+  G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
+  RegisterPhysics( opticalPhysics );
+
+  opticalPhysics->SetWLSTimeProfile("delta");
+
+  opticalPhysics->SetScintillationYieldFactor(1.0);
+  opticalPhysics->SetScintillationExcitationRatio(0.0);
+
+  opticalPhysics->SetMaxNumPhotonsPerStep(100);
+  opticalPhysics->SetMaxBetaChangePerStep(10.0);
+
+  opticalPhysics->SetTrackSecondariesFirst(true);
 
 }
