Index: trunk/examples/novice/N06/src/ExN06DetectorConstruction.cc
===================================================================
--- trunk/examples/novice/N06/src/ExN06DetectorConstruction.cc	(revision 1337)
+++ trunk/examples/novice/N06/src/ExN06DetectorConstruction.cc	(revision 1342)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: ExN06DetectorConstruction.cc,v 1.17 2008/07/17 00:32:34 gum Exp $
-// GEANT4 tag $Name: geant4-09-04-beta-01 $
+// $Id: ExN06DetectorConstruction.cc,v 1.18 2010/10/23 19:27:38 gum Exp $
+// GEANT4 tag $Name: examples-V09-03-09 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -34,16 +34,12 @@
 
 #include "G4Material.hh"
-#include "G4MaterialTable.hh"
 #include "G4Element.hh"
-#include "G4ElementTable.hh"
 #include "G4LogicalBorderSurface.hh"
 #include "G4LogicalSkinSurface.hh"
+#include "G4OpticalSurface.hh"
 #include "G4Box.hh"
 #include "G4LogicalVolume.hh"
-#include "G4RotationMatrix.hh"
 #include "G4ThreeVector.hh"
-#include "G4Transform3D.hh"
 #include "G4PVPlacement.hh"
-#include "G4OpBoundaryProcess.hh"
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -51,7 +47,7 @@
 ExN06DetectorConstruction::ExN06DetectorConstruction()
 {
-  expHall_x = expHall_y = expHall_z = 10*m;
-  tank_x    = tank_y    = tank_z    = 5*m;
-  bubble_x  = bubble_y  = bubble_z  = 0.5*m;
+  expHall_x = expHall_y = expHall_z = 10.0*m;
+  tank_x    = tank_y    = tank_z    =  5.0*m;
+  bubble_x  = bubble_y  = bubble_z  =  0.5*m;
 }
 
@@ -145,5 +141,57 @@
   myMPT1->AddConstProperty("SLOWTIMECONSTANT",10.*ns);
   myMPT1->AddConstProperty("YIELDRATIO",0.8);
-  
+
+  const G4int NUMENTRIES_water = 90;
+
+  G4double ENERGY_water[NUMENTRIES_water] = {
+     1.56962*eV, 1.58974*eV, 1.61039*eV, 1.63157*eV,
+     1.65333*eV, 1.67567*eV, 1.69863*eV, 1.72222*eV,
+     1.74647*eV, 1.77142*eV, 1.7971 *eV, 1.82352*eV,
+     1.85074*eV, 1.87878*eV, 1.90769*eV, 1.93749*eV,
+     1.96825*eV, 1.99999*eV, 2.03278*eV, 2.06666*eV,
+     2.10169*eV, 2.13793*eV, 2.17543*eV, 2.21428*eV,
+     2.25454*eV, 2.29629*eV, 2.33962*eV, 2.38461*eV,
+     2.43137*eV, 2.47999*eV, 2.53061*eV, 2.58333*eV,
+     2.63829*eV, 2.69565*eV, 2.75555*eV, 2.81817*eV,
+     2.88371*eV, 2.95237*eV, 3.02438*eV, 3.09999*eV,
+     3.17948*eV, 3.26315*eV, 3.35134*eV, 3.44444*eV,
+     3.54285*eV, 3.64705*eV, 3.75757*eV, 3.87499*eV,
+     3.99999*eV, 4.13332*eV, 4.27585*eV, 4.42856*eV,
+     4.59258*eV, 4.76922*eV, 4.95999*eV, 5.16665*eV,
+     5.39129*eV, 5.63635*eV, 5.90475*eV, 6.19998*eV
+  };
+
+  //assume 100 times larger than the rayleigh scattering for now.
+  G4double MIE_water[NUMENTRIES_water] = {
+     167024.4*m, 158726.7*m, 150742  *m,
+     143062.5*m, 135680.2*m, 128587.4*m,
+     121776.3*m, 115239.5*m, 108969.5*m,
+     102958.8*m, 97200.35*m, 91686.86*m,
+     86411.33*m, 81366.79*m, 76546.42*m,
+     71943.46*m, 67551.29*m, 63363.36*m,
+     59373.25*m, 55574.61*m, 51961.24*m,
+     48527.00*m, 45265.87*m, 42171.94*m,
+     39239.39*m, 36462.50*m, 33835.68*m,
+     31353.41*m, 29010.30*m, 26801.03*m,
+     24720.42*m, 22763.36*m, 20924.88*m,
+     19200.07*m, 17584.16*m, 16072.45*m,
+     14660.38*m, 13343.46*m, 12117.33*m,
+     10977.70*m, 9920.416*m, 8941.407*m,
+     8036.711*m, 7202.470*m, 6434.927*m,
+     5730.429*m, 5085.425*m, 4496.467*m,
+     3960.210*m, 3473.413*m, 3032.937*m,
+     2635.746*m, 2278.907*m, 1959.588*m,
+     1675.064*m, 1422.710*m, 1200.004*m,
+     1004.528*m, 833.9666*m, 686.1063*m
+  };
+
+  // gforward, gbackward, forward backward ratio
+  G4double MIE_water_const[3]={0.99,0.99,0.8};
+
+  myMPT1->AddProperty("MIEHG",ENERGY_water,MIE_water,NUMENTRIES_water);
+  myMPT1->AddConstProperty("MIEHG_FORWARD",MIE_water_const[0]);
+  myMPT1->AddConstProperty("MIEHG_BACKWARD",MIE_water_const[1]);
+  myMPT1->AddConstProperty("MIEHG_FORWARD_RATIO",MIE_water_const[2]);
+
   Water->SetMaterialPropertiesTable(myMPT1);
 
@@ -211,10 +259,6 @@
   OpWaterSurface->SetModel(unified);
 
-  G4LogicalBorderSurface* WaterSurface = 
-                                 new G4LogicalBorderSurface("WaterSurface",
+  new G4LogicalBorderSurface("WaterSurface",
                                  waterTank_phys,expHall_phys,OpWaterSurface);
-
-  if(WaterSurface->GetVolume1() == waterTank_phys) G4cout << "Equal" << G4endl;
-  if(WaterSurface->GetVolume2() == expHall_phys  ) G4cout << "Equal" << G4endl;
 
 // Air Bubble
@@ -228,5 +272,4 @@
 	  new G4LogicalSkinSurface("AirSurface", bubbleAir_log, OpAirSurface);
 
-  if(AirSurface->GetLogicalVolume() == bubbleAir_log) G4cout << "Equal" << G4endl;
   G4OpticalSurface* opticalSurface = dynamic_cast <G4OpticalSurface*>
         (AirSurface->GetSurface(bubbleAir_log)->GetSurfaceProperty());
@@ -238,5 +281,5 @@
 //
   const G4int num = 2;
-  G4double Ephoton[num] = {2.038*eV, 4.144*eV};
+  G4double Ephoton[num] = {2.034*eV, 4.136*eV};
 
   //OpticalWaterSurface 
Index: trunk/examples/novice/N06/src/ExN06PhysicsList.cc
===================================================================
--- trunk/examples/novice/N06/src/ExN06PhysicsList.cc	(revision 1337)
+++ trunk/examples/novice/N06/src/ExN06PhysicsList.cc	(revision 1342)
@@ -25,12 +25,9 @@
 //
 //
-// $Id: ExN06PhysicsList.cc,v 1.17 2009/11/10 05:16:23 gum Exp $
-// GEANT4 tag $Name: geant4-09-04-beta-01 $
+// $Id: ExN06PhysicsList.cc,v 1.19 2010/10/23 19:14:03 gum Exp $
+// GEANT4 tag $Name: examples-V09-03-09 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-
-#include "G4ios.hh"
-#include <iomanip>
 
 #include "globals.hh"
@@ -42,9 +39,5 @@
 #include "G4ParticleTable.hh"
 
-#include "G4Material.hh"
-#include "G4MaterialTable.hh"
-
 #include "G4ProcessManager.hh"
-#include "G4ProcessVector.hh"
 
 #include "G4Cerenkov.hh"
@@ -52,4 +45,5 @@
 #include "G4OpAbsorption.hh"
 #include "G4OpRayleigh.hh"
+#include "G4OpMieHG.hh"
 #include "G4OpBoundaryProcess.hh"
 
@@ -61,9 +55,10 @@
 ExN06PhysicsList::ExN06PhysicsList() :  G4VUserPhysicsList()
 {
-  theCerenkovProcess           = 0;
-  theScintillationProcess      = 0;
-  theAbsorptionProcess         = 0;
-  theRayleighScatteringProcess = 0;
-  theBoundaryProcess           = 0;
+  theCerenkovProcess           = NULL;
+  theScintillationProcess      = NULL;
+  theAbsorptionProcess         = NULL;
+  theRayleighScatteringProcess = NULL;
+  theMieHGScatteringProcess    = NULL;
+  theBoundaryProcess           = NULL;
   
   pMessenger = new ExN06PhysicsListMessenger(this);  
@@ -110,10 +105,14 @@
 {
   // leptons
+  //  e+/-
   G4Electron::ElectronDefinition();
   G4Positron::PositronDefinition();
+  // mu+/-
+  G4MuonPlus::MuonPlusDefinition();
+  G4MuonMinus::MuonMinusDefinition();
+  // nu_e
   G4NeutrinoE::NeutrinoEDefinition();
   G4AntiNeutrinoE::AntiNeutrinoEDefinition();
-  G4MuonPlus::MuonPlusDefinition();
-  G4MuonMinus::MuonMinusDefinition();
+  // nu_mu
   G4NeutrinoMu::NeutrinoMuDefinition();
   G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
@@ -124,5 +123,5 @@
 void ExN06PhysicsList::ConstructMesons()
 {
- //  mesons
+  //  mesons
   G4PionPlus::PionPlusDefinition();
   G4PionMinus::PionMinusDefinition();
@@ -134,7 +133,8 @@
 void ExN06PhysicsList::ConstructBaryons()
 {
-//  barions
+  //  barions
   G4Proton::ProtonDefinition();
   G4AntiProton::AntiProtonDefinition();
+
   G4Neutron::NeutronDefinition();
   G4AntiNeutron::AntiNeutronDefinition();
@@ -207,7 +207,7 @@
     // gamma
       // Construct processes for gamma
-//      pmanager->AddDiscreteProcess(new G4GammaConversion());
-//      pmanager->AddDiscreteProcess(new G4ComptonScattering());
-//      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
+      pmanager->AddDiscreteProcess(new G4GammaConversion());
+      pmanager->AddDiscreteProcess(new G4ComptonScattering());
+      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
 
     } else if (particleName == "e-") {
@@ -238,5 +238,5 @@
       if ((particle->GetPDGCharge() != 0.0) &&
           (particle->GetParticleName() != "chargedgeantino")) {
-     // all others charged particles except geantino
+       // all others charged particles except geantino
        pmanager->AddProcess(new G4hMultipleScattering(),-1,1,1);
        pmanager->AddProcess(new G4hIonisation(),       -1,2,2);
@@ -251,12 +251,12 @@
 {
   theCerenkovProcess           = new G4Cerenkov("Cerenkov");
-  theScintillationProcess = new G4Scintillation("Scintillation");
-  theAbsorptionProcess     = new G4OpAbsorption();
+  theScintillationProcess      = new G4Scintillation("Scintillation");
+  theAbsorptionProcess         = new G4OpAbsorption();
   theRayleighScatteringProcess = new G4OpRayleigh();
-  theBoundaryProcess  = new G4OpBoundaryProcess();
+  theMieHGScatteringProcess    = new G4OpMieHG();
+  theBoundaryProcess           = new G4OpBoundaryProcess();
 
 //  theCerenkovProcess->DumpPhysicsTable();
 //  theScintillationProcess->DumpPhysicsTable();
-//  theAbsorptionProcess->DumpPhysicsTable();
 //  theRayleighScatteringProcess->DumpPhysicsTable();
 
@@ -296,4 +296,5 @@
       pmanager->AddDiscreteProcess(theAbsorptionProcess);
       pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
+      pmanager->AddDiscreteProcess(theMieHGScatteringProcess);
       pmanager->AddDiscreteProcess(theBoundaryProcess);
     }
@@ -309,4 +310,5 @@
   theAbsorptionProcess->SetVerboseLevel(verbose);
   theRayleighScatteringProcess->SetVerboseLevel(verbose);
+  theMieHGScatteringProcess->SetVerboseLevel(verbose);
   theBoundaryProcess->SetVerboseLevel(verbose);  
 }
