Index: trunk/source/processes/electromagnetic/utils/test/GNUmakefile
===================================================================
--- trunk/source/processes/electromagnetic/utils/test/GNUmakefile	(revision 1199)
+++ trunk/source/processes/electromagnetic/utils/test/GNUmakefile	(revision 1199)
@@ -0,0 +1,31 @@
+# $Id: GNUmakefile,v 1.5 2009/05/16 11:07:24 vnivanch Exp $
+# --------------------------------------------------------------
+# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
+# --------------------------------------------------------------
+
+ifndef G4TARGET
+  G4TARGET := $(TESTTARGET)
+endif
+
+G4EXEC_BUILD := true
+
+ifndef G4INSTALL
+  G4INSTALL = ../../../../../
+endif
+
+
+ifdef G4ANALYSIS_USE_ROOT
+  CPPFLAGS += -DG4ANALYSIS_USE_ROOT
+endif
+
+
+include $(G4INSTALL)/config/architecture.gmk
+
+ifdef G4ANALYSIS_USE_ROOT
+  CPPFLAGS += $(shell $(ROOTSYS)/bin/root-config --cflags)
+  LDFLAGS  += $(shell $(ROOTSYS)/bin/root-config --glibs)
+endif
+
+include $(G4INSTALL)/config/binmake.gmk
+
+#
Index: trunk/source/processes/electromagnetic/utils/test/diff_tables.py
===================================================================
--- trunk/source/processes/electromagnetic/utils/test/diff_tables.py	(revision 1199)
+++ trunk/source/processes/electromagnetic/utils/test/diff_tables.py	(revision 1199)
@@ -0,0 +1,82 @@
+{
+   gROOT->Reset();
+#include "Riostream.h"
+#include "TSystem.h"
+
+   Char_t buffer[256];
+
+   const Int_t n = 1100;
+
+   Double_t En[n], Y1[n], Y2[n], diff[n], pres[n];
+
+   TCanvas *c1 = new TCanvas("c1", "c1",6,6,800,600);
+   gStyle->SetOptStat(0);
+   c1->SetLogx();
+   c1->SetFillColor(0);
+   c1->SetBorderMode(0);
+   c1->SetBorderSize(0);
+   c1->SetFrameBorderMode(0);
+   
+
+   ifstream in;
+
+   in.open("DEDX.hIoni.proton.asc_7bins_spl.out");
+//   in.open("DEDX.eIoni.e-.asc_spl.out");
+   if (!in.good()) break;
+
+// Ignore first blank line
+
+   in.getline(buffer,256);
+
+   for (Int_t i=0; i<n; i++) {
+     in >> En[i] >> Y1[i] >> Y2[i] >> diff[i];
+     if (!in.good()) break;
+     pres[i] = (Y1[i]/Y2[i] - 1)*100; 
+  }
+
+
+/*   Int_t n = 0;
+   while(!(in.eof())) {
+     n++;
+     in >> En[n] >> Y1[n] >> Y2[n] >> diff[n];
+     pres[n] = (Y1[n]/Y2[n] - 1)*100;
+  }
+*/
+   gr = new TGraph(n,En,pres);
+   gr->SetTitle("proton in Pb, table 100 pts / 7 pts_spl per order");
+   gr->SetMarkerStyle(22);
+   gr->SetMarkerSize(0.8);
+   gr->GetYaxis()->SetLabelFont(132);
+   gr->GetYaxis()->SetLabelSize(0.04);
+   gr->GetXaxis()->SetLabelFont(132);
+   gr->GetXaxis()->SetLabelSize(0.04);
+   gr->GetXaxis()->SetTitle("E, MeV");
+   gr->GetYaxis()->SetTitle("dE/dx: (100pts/7pts_spl - 1), %");
+   gr->GetXaxis()->SetTitleOffset(1.2);
+   gr->Draw("AP");
+
+   // draw the legend
+/*   TLegend *leg = new TLegend(0.2,0.65,0.61,0.86);
+   leg->SetTextFont(52);
+   leg->SetTextSize(0.035);
+   leg->SetLineColor(1);
+   leg->SetLineStyle(1);
+   leg->SetLineWidth(1);
+   leg->SetFillStyle(0);
+   leg->SetMargin(0.4);
+   leg->SetBorderSize(1);
+   TLegendEntry *entry=leg->AddEntry("NULL","p (110 MeV) in H_{2}O","h");
+
+   entry->SetTextAlign(22);
+   entry=leg->AddEntry("NULL","Geant 4.9.1ref01","l");
+   entry->SetLineColor(1);
+   entry->SetLineStyle(1);
+   entry->SetLineWidth(1);
+   entry->SetTextAlign(22);
+   entry->SetTextColor(1);
+   entry=leg->AddEntry(gr,"exp. data","p");  
+   leg->Draw();
+*/
+   c1->Modified();
+   c1->cd();
+}
Index: trunk/source/processes/electromagnetic/utils/test/diff_tables_plot-all.py
===================================================================
--- trunk/source/processes/electromagnetic/utils/test/diff_tables_plot-all.py	(revision 1199)
+++ trunk/source/processes/electromagnetic/utils/test/diff_tables_plot-all.py	(revision 1199)
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+
+import os, sys
+from ROOT import gROOT, gStyle, TFile, TCanvas, TGraph
+from array import array
+
+path1 = os.path.basename(sys.argv[1])
+
+dirList=os.listdir(path1)
+for fname in dirList:
+     print fname
+     gROOT.Reset()
+
+#     n = 1100
+     n = 35
+     En, Y1, Y2, diff, pres = array( 'd' ), array( 'd' ), array( 'd' ), array( 'd' ), array( 'd' )
+
+     c1 = TCanvas('c1', 'c1',6,6,800,600)
+     gStyle.SetOptStat(0)
+     c1.SetLogx()
+     c1.SetFillColor(0)
+     c1.SetBorderMode(0)
+     c1.SetBorderSize(0)
+     c1.SetFrameBorderMode(0)
+   
+     infile = open(fname, 'r')
+
+     lines = infile.readlines()
+     title = lines[0]
+
+     for line in lines[1:]:
+          e = (float(line.split() [0]))
+          y1 = (float(line.split() [1]))
+          y2 = (float(line.split() [2]))
+          di = (float(line.split() [3]))
+          if y2 == 0:
+               pr = 0
+          else:
+               pr = ((y1/y2 - 1)*100)     
+          En.append (e)
+          Y1.append (y1)
+          Y2.append (y2)
+          diff.append (di)
+          pres.append (pr) 
+
+     gr = TGraph(n,En,pres)
+     grTit = fname + ' / 100 pts per order, Pb'
+     gr.SetTitle(grTit)
+     gr.SetMarkerStyle(22)
+     gr.SetMarkerSize(0.8)
+     gr.GetYaxis().SetLabelFont(132)
+     gr.GetYaxis().SetLabelSize(0.04)
+     gr.GetXaxis().SetLabelFont(132)
+     gr.GetXaxis().SetLabelSize(0.04)
+     gr.GetXaxis().SetTitle('E, MeV')
+     gr.GetYaxis().SetTitle('(Y1/Y2 - 1), %')
+     gr.GetXaxis().SetTitleOffset(1.2)
+     gr.Draw('AP')
+
+     c1.Modified()
+     c1.cd()
+     plNam = fname + '.png'
+     c1.Print(plNam)
Index: trunk/source/processes/electromagnetic/utils/test/diff_tables_plot.py
===================================================================
--- trunk/source/processes/electromagnetic/utils/test/diff_tables_plot.py	(revision 1199)
+++ trunk/source/processes/electromagnetic/utils/test/diff_tables_plot.py	(revision 1199)
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+
+import os, sys
+from ROOT import gROOT, TFile, TCanvas, TGraph, Riostream
+
+   gROOT.Reset()
+
+n = 1100
+
+En, Y1, Y2, diff, pres = array( 'd' ), array( 'd' ), array( 'd' ), array( 'd' ), array( 'd' ), array( 'd' )
+
+c1 = TCanvas('c1', 'c1',6,6,800,600)
+gStyle.SetOptStat(0)
+c1.SetLogx()
+c1.SetFillColor(0)
+c1.SetBorderMode(0)
+c1.SetBorderSize(0)
+c1.SetFrameBorderMode(0)
+   
+
+in = open('DEDX.hIoni.proton.asc_20bins_spl.out', 'r')
+#in = open('DEDX.eIoni.e-.asc_spl.out, 'r')
+
+lines = in.readlines()
+title = lines[0]
+
+for line in lines[1:]:
+     En.append (line.split() [0])
+     Y1.append (line.split() [1])
+     Y2.append (line.split() [2])
+     diff.append (line.split() [3])
+     pres.append ((Y1/Y2 - 1)*100) 
+
+gr = new TGraph(n,En,pres)
+gr.SetTitle('proton in Pb, table 100 pts / 20 pts_spl per order')
+gr.SetMarkerStyle(22)
+gr.SetMarkerSize(0.8)
+gr.GetYaxis()->SetLabelFont(132)
+gr.GetYaxis()->SetLabelSize(0.04)
+gr.GetXaxis()->SetLabelFont(132)
+gr.GetXaxis()->SetLabelSize(0.04)
+gr.GetXaxis()->SetTitle('E, MeV')
+gr.GetYaxis()->SetTitle('dE/dx: (100pts/20pts_spl - 1), %')
+gr.GetXaxis()->SetTitleOffset(1.2)
+gr.Draw('AP')
+
+
+c1.Modified()
+c1.cd()
Index: trunk/source/processes/electromagnetic/utils/test/testG4AllTables.cc
===================================================================
--- trunk/source/processes/electromagnetic/utils/test/testG4AllTables.cc	(revision 1199)
+++ trunk/source/processes/electromagnetic/utils/test/testG4AllTables.cc	(revision 1199)
@@ -0,0 +1,158 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+// -------------------------------------------------------------
+//
+//
+// -------------------------------------------------------------
+//      GEANT4
+// test for EnergyLoss Range InverseRange Lambda and other Tables, 
+// A. Bagulya 14 May 2009
+//
+// -------------------------------------------------------------
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+#include "globals.hh"
+#include "G4PhysicsVector.hh"
+#include "G4PhysicsTable.hh"
+#include <fstream>
+#include <iostream>
+#include <iomanip>
+#include <string>
+
+int main(int argc,char** argv)
+{
+  // Control on input
+
+  if(argc < 2) {
+    G4cout << "Input parameters are not specified! Exit" << G4endl;
+    exit(1);
+  }
+
+
+  std::string path = "/home/bagoulia/geant4/examples/extended/electromagnetic/TestEm3/";
+  std::string dir1 = "physdata_100bins/";
+  std::string ff   = argv[1];
+  std::string fName1 = path + dir1 + ff;
+
+   std::ifstream in1;
+   in1.open(fName1.c_str());
+   if( !in1.is_open()) {
+     G4cout << "Input file<" << fName1 << "> does not exist! Exit" << G4endl;
+     exit(1);
+   }
+
+   G4PhysicsTable* t1 = new G4PhysicsTable();
+   t1->RetrievePhysicsTable(fName1, true);
+
+   G4PhysicsVector* V1 = (*t1)(1);
+   
+   //   V1->SetSpline(true);
+   std::string d_st = "physdata_";
+   std::string num_bins = argv[2];
+   G4int n_spl = atoi(argv[3]);
+   std::string s_spl = "spl";
+   std::string d_m;
+   if (n_spl) d_m = "bins_spl/";
+   else d_m = "bins/";
+
+   std::string dir2 = d_st + num_bins + d_m;
+   std::string fName2 = path + dir2 + ff;
+
+   std::ifstream in2;
+   in2.open(fName2.c_str());
+
+   if( !in2.is_open()) {
+     G4cout << "Input file<" << fName2 << "> does not exist! Exit" << G4endl;
+     exit(1);
+   }
+
+   G4double n = V1->GetVectorLength();
+   G4double diff_max = 0.0;
+   G4double e, y1, y2, diff;
+
+   G4cout << "n = " << n <<G4endl;
+
+   G4PhysicsTable* t2 = new G4PhysicsTable();
+   t2->RetrievePhysicsTable(fName2, true);
+ 
+   G4PhysicsVector* V2 = (*t2)(1); 
+
+   std::string d_out = "data/";
+   std::string typeFile = ".out";
+   std::string c = "_";
+   std::string bi = "bins";
+ 
+   std::string asciiFileName;
+   if (n_spl) {
+     V2->SetSpline(true);
+     asciiFileName = d_out + ff + c + num_bins + bi + c + s_spl + typeFile;
+   } else {
+     asciiFileName = d_out + ff + c + num_bins + bi + typeFile;
+   }
+
+   std::ofstream asciiFile;
+   asciiFile.open(asciiFileName.c_str(), std::ios::out);
+   if(asciiFile.is_open()) {
+     asciiFile << " Energy(Mev) ||    Y1    ||    Y2      ||  Diff " << G4endl;
+   } else {
+     G4cout << "ERROR file <" << asciiFileName << "> is not opened" << G4endl;
+     exit(1);
+   } 
+
+     G4bool b;
+   for (G4int i = 0; i < n; i++) {
+     e = V1->GetLowEdgeEnergy(i); 
+     y1 = (*V1)[i];
+     y2 = V2->GetValue(e, b);
+     diff = std::fabs((1.0 - y2/y1)*100);
+     if (diff > diff_max) diff_max = diff;
+
+      asciiFile << std::setprecision(5)
+                << std::setiosflags(std::ios::right);
+      asciiFile << e;
+      asciiFile << "    ";
+      asciiFile << std::setiosflags(std::ios::right);
+      asciiFile << y1;
+      asciiFile << "    ";
+      asciiFile << std::setiosflags(std::ios::right);
+      asciiFile << y2;
+      asciiFile << "    ";
+      asciiFile << std::setiosflags(std::ios::right);
+      asciiFile << diff
+                << G4endl;
+
+   }
+   G4cout << "diff_max = " << diff_max << G4endl;
+
+    delete V1;
+    delete V2;
+    exit(0);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
Index: trunk/source/processes/electromagnetic/utils/test/testG4EnergyLossTables.cc
===================================================================
--- trunk/source/processes/electromagnetic/utils/test/testG4EnergyLossTables.cc	(revision 1199)
+++ trunk/source/processes/electromagnetic/utils/test/testG4EnergyLossTables.cc	(revision 1199)
@@ -0,0 +1,621 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: testG4EnergyLossTables.cc,v 1.7 2006/06/29 19:55:29 gunter Exp $
+// GEANT4 tag $Name: geant4-09-03-cand-01 $
+//
+//-------------------------------------------------------------------
+#include "G4ios.hh"
+#include <fstream>
+#include <iomanip>
+#include "globals.hh"
+#include "G4Timer.hh"
+#include "G4MultipleScattering.hh"
+#include "G4DynamicParticle.hh"
+#include "G4Element.hh"
+#include "G4Material.hh"
+#include "G4GRSVolume.hh"
+#include "G4PVPlacement.hh"
+#include "G4LogicalVolume.hh"
+#include "G4Box.hh"
+#include "G4ProcessManager.hh"
+#include "G4Step.hh"
+#include "G4StepPoint.hh"
+#include "G4Track.hh"
+#include "G4Proton.hh"
+#include "G4AntiProton.hh"
+#include "G4PionPlus.hh"
+#include "G4PionMinus.hh"
+#include "G4KaonPlus.hh"
+#include "G4KaonMinus.hh"
+#include "G4MuonPlus.hh"
+#include "G4MuonMinus.hh"
+#include "G4Electron.hh"
+#include "G4Positron.hh"
+#include "G4Gamma.hh"
+#include "G4eEnergyLoss.hh"
+#include "G4eIonisation.hh"
+#include "G4eBremsstrahlung.hh"
+#include "G4MuEnergyLoss.hh"
+#include "G4MuIonisation.hh"
+#include "G4MuBremsstrahlung.hh"
+#include "G4MuPairProduction.hh"
+#include "G4hEnergyLoss.hh"
+#include "G4hIonisation.hh"
+#include "G4GPILSelection.hh"
+
+#include "G4EnergyLossTables.hh"
+
+// test for G4EnergyLossTables, based on tunemsc
+// P. Urban
+  
+G4VPhysicalVolume* BuildVolume(G4Material* matworld)
+//  it builds a simple box filled with material matword .......
+{
+  G4Box *myWorldBox= new G4Box ("WBox",10000.*cm,10000.*cm,10000.*cm);
+
+  G4LogicalVolume *myWorldLog = new G4LogicalVolume(myWorldBox,matworld,
+                                                    "WLog",0,0,0) ;
+
+  G4PVPlacement *myWorldPhys = new G4PVPlacement(0,G4ThreeVector(),
+                                                 "WPhys",
+                                                 myWorldLog,
+                                                 0,false,0) ;
+
+  
+  return myWorldPhys ;
+
+}
+                                              
+
+int main()
+{
+  //-------- set output format-------
+   G4cout.setf( std::ios::scientific, std::ios::floatfield );
+  //---write results to the file msc.out-----
+   std::ofstream outFile("msc.out", std::ios::out ) ;
+   outFile.setf( std::ios::scientific, std::ios::floatfield );
+
+  //--------- Material definition ---------
+  G4Timer theTimer ;
+  G4double a, z, ez, density ,temperature,pressure;
+  G4State state ;
+  G4String name, symbol;
+  G4int nel;
+
+  a = 9.012*g/mole;
+  density = 1.848*g/cm3;
+  G4Material* Be = new G4Material(name="Beryllium", z=4. , a, density);
+
+  a = 12.011*g/mole;
+  density = 2.220*g/cm3;
+  G4Material* C = new G4Material(name="Carbon", z=6. , a, density);
+
+  a = 26.98*g/mole;
+  density = 2.7*g/cm3;
+  G4Material* Al = new G4Material(name="Aluminium", z=13., a, density);
+
+  a = 28.09*g/mole;
+  density = 2.33*g/cm3;
+  G4Material* Si = new G4Material(name="Silicon", z=14., a, density);
+
+  a = 55.85*g/mole;
+  density = 7.87*g/cm3;
+  G4Material* Fe = new G4Material(name="Iron", z=26., a, density);
+
+  a = 63.540*g/mole;
+  density = 8.960*g/cm3;
+  G4Material* Cu = new G4Material(name="Copper", z=29., a, density);
+
+  a = 196.97*g/mole;
+  density = 19.32*g/cm3;
+  G4Material* Au = new G4Material(name="Gold", z=79., a, density);
+
+  a = 207.19*g/mole;
+  density = 11.35*g/cm3;
+  G4Material* Pb = new G4Material(name="Lead", z=82., a, density);
+
+  a = 238.03*g/mole;
+  density = 18.7*g/cm3;
+  G4Material* U = new G4Material(name="Uranium", z=92., a, density);
+
+  a = 14.01*g/mole;
+  G4Element* elN = new G4Element(name="Nitrogen", symbol="N", ez=7., a);
+  a = 16.00*g/mole;
+  G4Element* elO = new G4Element(name="Oxigen", symbol="O", ez=8., a);
+  density = 1.29e-03*g/cm3;
+  state = kStateGas ;
+  temperature = 273.*kelvin ;
+  pressure = 1.*atmosphere ;
+  G4Material* Air = new G4Material(name="Air", density, nel=2 ,
+                                   state ,temperature , pressure ) ;
+  Air->AddElement(elN, .7);
+  Air->AddElement(elO, .3);
+
+  a = 0. ;          
+  density = 0. ;         
+  G4Material* Vac= new G4Material(name="Vacuum",z=0., a, density,kVacuum);
+
+  static const G4MaterialTable* theMaterialTable ;
+  G4Material* apttoMaterial ;
+  G4String MaterialName ; 
+
+//--------- Particle definition ---------
+
+  G4ParticleDefinition* theGamma = G4Gamma::GammaDefinition();
+
+  G4ParticleDefinition* theElectron = G4Electron::ElectronDefinition();
+  G4ParticleDefinition* thePositron = G4Positron::PositronDefinition();
+
+  G4ParticleDefinition* theMuonPlus = G4MuonPlus::MuonPlusDefinition();
+  G4ParticleDefinition* theMuonMinus = G4MuonMinus::MuonMinusDefinition();
+
+  G4ParticleDefinition* theProton = G4Proton::ProtonDefinition();
+  G4ParticleDefinition* theAntiProton = G4AntiProton::AntiProtonDefinition();
+  G4ParticleDefinition* thePionPlus = G4PionPlus::PionPlusDefinition();
+  G4ParticleDefinition* thePionMinus = G4PionMinus::PionMinusDefinition();
+  G4ParticleDefinition* theKaonPlus = G4KaonPlus::KaonPlusDefinition();
+  G4ParticleDefinition* theKaonMinus = G4KaonMinus::KaonMinusDefinition();
+
+//--------- Process definition ---------
+  G4eIonisation theElectronIonisation,thePositronIonisation;
+  G4eBremsstrahlung theElectronBremsstrahlung,thePositronBremsstrahlung;
+//..........e-/e+....................................................
+  G4MultipleScattering theElectronMultipleScattering,thePositronMultipleScattering ;
+       
+  G4ProcessManager* theElectronProcessManager  = theElectron->GetProcessManager();
+  G4ProcessManager* thePositronProcessManager  = thePositron->GetProcessManager();
+  
+  theElectronProcessManager->AddProcess(&theElectronMultipleScattering,-1,0,0) ;
+  thePositronProcessManager->AddProcess(&thePositronMultipleScattering,-1,0,0) ;
+  theElectronProcessManager->AddProcess(&theElectronIonisation,-1,1,1) ;
+  theElectronProcessManager->AddProcess(&theElectronBremsstrahlung,-1,-1,2) ;
+  thePositronProcessManager->AddProcess(&thePositronIonisation,-1,1,1) ;
+  thePositronProcessManager->AddProcess(&thePositronBremsstrahlung,-1,-1,2) ;
+
+//..........mu+/mu-................................................
+  G4MuIonisation theMuonPlusIonisation,theMuonMinusIonisation ;
+  G4MuBremsstrahlung theMuonPlusBremsstrahlung,theMuonMinusBremsstrahlung ;
+  G4MuPairProduction theMuonPlusPairProduction,theMuonMinusPairProduction ;  
+  G4MultipleScattering theMuonPlusMultipleScattering,theMuonMinusMultipleScattering;
+
+  G4ProcessManager* theMuonPlusProcessManager = theMuonPlus->GetProcessManager();
+  theMuonPlusProcessManager->AddProcess(&theMuonPlusMultipleScattering,-1,0,0) ;
+  theMuonPlusProcessManager->AddProcess(&theMuonPlusIonisation,-1,1,1);
+  theMuonPlusProcessManager->AddProcess(&theMuonPlusBremsstrahlung,-1,-1,2);
+  theMuonPlusProcessManager->AddProcess(&theMuonPlusPairProduction,-1,-1,3);
+
+  G4ProcessManager* theMuonMinusProcessManager = theMuonMinus->GetProcessManager();
+  theMuonMinusProcessManager->AddProcess(&theMuonMinusMultipleScattering,-1,0,0) ;
+  theMuonMinusProcessManager->AddProcess(&theMuonMinusIonisation,-1,1,1);
+  theMuonMinusProcessManager->AddProcess(&theMuonMinusBremsstrahlung,-1,-1,2);
+  theMuonMinusProcessManager->AddProcess(&theMuonMinusPairProduction,-1,-1,3);
+
+//------multiple instantiation of G4MultipleScattering  for hadrons-----------------
+  G4MultipleScattering theProtonMultipleScattering,theAntiProtonMultipleScattering;
+  G4hIonisation theProtonIonisation,theAntiProtonIonisation ;
+  G4MultipleScattering thePionPlusMultipleScattering,thePionMinusMultipleScattering;
+  G4hIonisation thePionPlusIonisation,thePionMinusIonisation;
+  G4MultipleScattering theKaonPlusMultipleScattering,theKaonMinusMultipleScattering;
+  G4hIonisation theKaonPlusIonisation,theKaonMinusIonisation;
+
+  G4ProcessManager* theProtonProcessManager = theProton->GetProcessManager();
+  theProtonProcessManager->AddProcess(&theProtonMultipleScattering,-1,0,0) ;
+  theProtonProcessManager->AddProcess(&theProtonIonisation,-1,1,1);
+
+  G4ProcessManager* thePionPlusProcessManager = thePionPlus->GetProcessManager();
+  thePionPlusProcessManager->AddProcess(&thePionPlusMultipleScattering,-1,0,0) ;
+  thePionPlusProcessManager->AddProcess(&thePionPlusIonisation,-1,1,1);
+
+  G4ProcessManager* theKaonPlusProcessManager = theKaonPlus->GetProcessManager();
+  theKaonPlusProcessManager->AddProcess(&theKaonPlusMultipleScattering,-1,0,0) ;
+  theKaonPlusProcessManager->AddProcess(&theKaonPlusIonisation,-1,1,1);
+
+  G4ProcessManager* theAntiProtonProcessManager = theAntiProton->GetProcessManager();
+  theAntiProtonProcessManager->AddProcess(&theAntiProtonMultipleScattering,-1,0,0) ;
+  theAntiProtonProcessManager->AddProcess(&theAntiProtonIonisation,-1,1,1);
+
+  G4ProcessManager* thePionMinusProcessManager = thePionMinus->GetProcessManager();
+  thePionMinusProcessManager->AddProcess(&thePionMinusMultipleScattering,-1,0,0) ;
+  thePionMinusProcessManager->AddProcess(&thePionMinusIonisation,-1,1,1);
+
+  G4ProcessManager* theKaonMinusProcessManager = theKaonMinus->GetProcessManager();
+  theKaonMinusProcessManager->AddProcess(&theKaonMinusMultipleScattering,-1,0,0) ;
+  theKaonMinusProcessManager->AddProcess(&theKaonMinusIonisation,-1,1,1);
+
+  G4GPILSelection selection;
+  G4ParticleWithCuts* theParticle ;
+  G4MultipleScattering* theParticleMultipleScattering;
+  G4ProcessManager* theParticleProcessManager ;
+  G4String confirm ;
+  G4int i1e ;
+  G4double theta1e,th1,th2 ;
+  G4double theta1edata,errth,lambdadata,lambdadatamin,lambdadatamax ;
+
+  // loop until no particle is selected
+  while (1) {
+
+  G4cout << "Do you want the electron as particle (yes/no)?" << std::flush;
+  G4cin >> confirm ;
+  if(confirm == "yes")
+  {
+    theParticle = theElectron ;
+    theParticleMultipleScattering=&theElectronMultipleScattering;
+    theParticleProcessManager=theElectronProcessManager;
+    outFile << " ----------particle = electron -------------" << G4endl;
+  }
+  else
+  {    
+    G4cout << "Do you want the positron as particle (yes/no)?" << std::flush;
+    G4cin >> confirm ;
+    if(confirm == "yes")
+    {
+      theParticle = thePositron ;
+      theParticleMultipleScattering=&thePositronMultipleScattering;
+      theParticleProcessManager=thePositronProcessManager;
+      outFile << " ----------particle = positron -------------" << G4endl;
+    }
+    else
+    {
+      G4cout << "Do you want the mu+ as particle (yes/no)?" << std::flush;
+      G4cin >> confirm ;
+      if(confirm == "yes")
+      {
+        theParticle = theMuonPlus ;
+        theParticleMultipleScattering=&theMuonPlusMultipleScattering;
+        theParticleProcessManager=theMuonPlusProcessManager;
+        outFile << " --------particle = mu+ -------------" << G4endl;
+      }
+      else
+      {
+        G4cout << "Do you want the mu- as particle (yes/no)?" << std::flush;
+        G4cin >> confirm ;
+        if(confirm == "yes")
+        {
+          theParticle = theMuonMinus ;
+          theParticleMultipleScattering=&theMuonMinusMultipleScattering;
+          theParticleProcessManager=theMuonMinusProcessManager;
+          outFile << " --------particle = mu- -------------" << G4endl;
+      }
+      else
+  {
+  G4cout << " Do you want the proton as particle (yes/no)? " << std::flush;
+  G4cin >> confirm ;
+  if(confirm == "yes")
+  {
+    theParticle = theProton;
+    theParticleMultipleScattering=&theProtonMultipleScattering;
+    theParticleProcessManager=theProtonProcessManager;
+    outFile << " ---------- particle = proton ----------------" << G4endl;
+  }
+  else
+  {
+     G4cout << " Do you want the antiproton as particle (yes/no)? " << std::flush;
+     G4cin >> confirm ;
+     if(confirm == "yes")
+     {
+        theParticle = theAntiProton;
+        theParticleMultipleScattering=&theAntiProtonMultipleScattering;
+        theParticleProcessManager=theAntiProtonProcessManager;
+        outFile << " ---------- particle = antiproton ----------------" << G4endl;
+     }
+     else
+     {
+      G4cout << " Do you want the pi+ as particle (yes/no)? " << std::flush;
+      G4cin >> confirm ;
+      if(confirm == "yes")
+      {
+      theParticle = thePionPlus;
+      theParticleMultipleScattering=&thePionPlusMultipleScattering;
+      theParticleProcessManager=thePionPlusProcessManager;
+      outFile << " ---------- particle = pi+ ----------------" << G4endl;
+      }
+      else
+      {
+        G4cout << " Do you want the pi- as particle (yes/no)? " << std::flush;
+        G4cin >> confirm ;
+        if(confirm == "yes")
+        {
+        theParticle = thePionMinus;
+        theParticleMultipleScattering=&thePionMinusMultipleScattering;
+        theParticleProcessManager=thePionMinusProcessManager;
+        outFile << " ---------- particle = pi- ----------------" << G4endl;
+        } 
+        else
+        {
+          G4cout << " Do you want the K+ as particle (yes/no)? " << std::flush;
+          G4cin >> confirm ;
+          if(confirm == "yes")
+          {
+          theParticle = theKaonPlus;
+          theParticleMultipleScattering=&theKaonPlusMultipleScattering;
+          theParticleProcessManager=theKaonPlusProcessManager;
+          outFile << " ---------- particle = K+ ----------------" << G4endl;
+          }
+          else
+          {
+            G4cout << " Do you want the K- as particle (yes/no)? " << std::flush;
+            G4cin >> confirm ;
+            if(confirm == "yes")
+            {
+            theParticle = theKaonMinus;
+            theParticleMultipleScattering=&theKaonMinusMultipleScattering;
+            theParticleProcessManager=theKaonMinusProcessManager;
+            outFile << " ---------- particle = K- ----------------" << G4endl;
+            }
+            else
+            {
+             G4cout << " There is no other particle in the test." << G4endl;
+             return EXIT_SUCCESS;
+            }
+          }
+        }
+       }
+      }
+     }
+    }
+   }
+  }
+ }
+
+  G4ForceCondition cond;
+  G4ForceCondition* condition=&cond ;
+
+  G4double* ElectronKineticEnergyCuts ;
+  G4double* PositronKineticEnergyCuts ;
+  G4double* GammaKineticEnergyCuts ;
+  G4double* ParticleKineticEnergyCuts ;
+
+  theMaterialTable = G4Material::GetMaterialTable() ;
+
+  G4double cutinrange ;
+
+
+  G4cout << "give cuts in range" << G4endl ;
+
+  G4cout << "cut for GAMMA in mm =" ;
+  G4cin >> cutinrange ; 
+  theGamma->SetCuts(cutinrange) ;
+
+  GammaKineticEnergyCuts = theGamma->GetCutsInEnergy() ;
+
+  G4cout << "cut for ELECTRON in mm =" ;
+  G4cin >> cutinrange ; 
+  theElectron->SetCuts(cutinrange) ;
+
+  ElectronKineticEnergyCuts = theElectron->GetCutsInEnergy() ;
+
+  G4cout << "cut for POSITRON in mm =" ;
+  G4cin >> cutinrange ; 
+  thePositron->SetCuts(cutinrange) ;
+
+  PositronKineticEnergyCuts = thePositron->GetCutsInEnergy() ;
+
+//****************************************************
+// setcut for the selected particle (if it is not e-/e+)
+ if((theParticle != theElectron) && (theParticle != thePositron))
+ {
+  G4cout << "cut for the selected particle in mm =" ;
+  G4cin >> cutinrange ; 
+  theParticle->SetCuts(cutinrange) ;
+
+  ParticleKineticEnergyCuts = theParticle->GetEnergyCuts() ;
+ }
+
+  G4double energy, momentum, mass;
+  G4ProcessVector* palongget ;
+  G4ProcessVector* palongdo ;
+  G4ProcessVector* ppostget ;
+  G4ProcessVector* ppostdo ;
+
+    mass = theParticle->GetPDGMass() ;  
+    energy = 1.*GeV + mass ;
+    momentum=std::sqrt(energy*energy-mass*mass) ;
+    G4ParticleMomentum theMomentum(momentum,0.,0.);
+    G4double pModule = theMomentum.mag();
+    G4DynamicParticle aParticle(theParticle,energy,theMomentum);
+    aParticle.SetKineticEnergy(energy-mass);
+    
+    outFile << "  " << G4endl;
+    outFile << " M S C test **********************************************" << G4endl ;
+    outFile << "  " << G4endl;
+    palongget = aParticle.GetDefinition()->GetProcessManager()
+                                 ->GetAlongStepProcessVector(0);
+    ppostget = aParticle.GetDefinition()->GetProcessManager()
+                                 ->GetPostStepProcessVector(0);
+    palongdo = aParticle.GetDefinition()->GetProcessManager()
+                                 ->GetAlongStepProcessVector(1);
+    ppostdo = aParticle.GetDefinition()->GetProcessManager()
+                                 ->GetPostStepProcessVector(1);
+
+//---------------------------------- Physics --------------------------------
+
+  G4int itry=1, Ntry=1, Nstart, ir;
+  G4double r ;
+
+//**************************************************************************
+  const G4int Nbin=100 ;
+  G4double TkinMeV[Nbin]  =
+              {0.0002, 0.0005, 0.001,0.0015,0.002,0.003,0.004,0.005,0.006,0.008,
+               0.01,0.015,0.02,0.03,0.04,0.05,0.06,0.08,
+               0.1,0.15,0.2,0.3,0.4,0.5,0.6,0.8,
+               1.,1.5,2.,3.,4.,5.,6.,8.,
+               10.,15.,20.,30.,40.,50.,60.,80.,
+               100.,150.,200.,300.,400.,500.,600.,800.,
+               1.0e3,1.5e3,2.0e3,3.0e3,4.0e3,5.0e3,6.0e3,8.0e3,
+               1.0e4,1.5e4,2.0e4,3.0e4,4.0e4,5.0e4,6.0e4,8.0e4,
+               1.0e5,1.5e5,2.0e5,3.0e5,4.0e5,5.0e5,6.0e5,8.0e5,
+               1.0e6,1.5e6,2.0e6,3.0e6,4.0e6,5.0e6,6.0e6,8.0e6,
+               1.0e7,1.5e7,2.0e7,3.0e7,4.0e7,5.0e7,6.0e7,8.0e7,
+               1.0e8,1.5e8,2.0e8,3.0e8,4.0e8,5.0e8,6.0e8,8.0e8,
+               1.0e9, 5.0e9} ; 
+         
+    G4int J=-1 ;
+
+    G4double lambda,trueStep,geomStep,stepLimit,
+             previousStepSize,currentMinimumStep ;
+    G4ParticleChange* aParticleChange ;
+    
+    // material loop
+    for (J=0; J<theMaterialTable->length(); J++) {
+
+    apttoMaterial = (*theMaterialTable)[ J ] ;
+    MaterialName = apttoMaterial->GetName() ; 
+    G4cout << G4endl << "material=" << MaterialName << G4endl << G4endl;
+
+//---------- Volume definition ---------------------
+
+    G4VPhysicalVolume* myVolume ;
+
+    myVolume = BuildVolume(apttoMaterial) ;
+
+//--------- track and Step definition (for this test ONLY!)------------
+    G4ThreeVector aPosition(0.,0.,0.);
+    const G4ThreeVector aDirection(0.,0.,1.) ;
+    const G4ThreeVector transl(0.,0.,0.) ;
+
+    G4double aTime = 0. ;
+
+    G4Track* tracke = new G4Track(&aParticle,aTime,aPosition) ;
+    G4Track& trackele = (*tracke) ;
+    G4GRSVolume*  touche = new G4GRSVolume(myVolume,NULL,transl);
+    (*tracke).SetTouchable(touche);
+
+    (*tracke).SetMomentumDirection(aDirection) ;
+
+    G4Step* Step = new G4Step() ;
+  //******************************************
+    tracke->SetStep(Step);
+    (*Step).InitializeStep(tracke) ;
+
+    const G4Step& Step = (*Step) ;
+
+    G4double CurrentSafety=1000.;
+    G4double& currentSafety = CurrentSafety ;
+
+    G4StepPoint* aPoint = new G4StepPoint();
+    (*aPoint).SetPosition(aPosition) ;
+    G4double safety = 10000.*cm ;
+    (*aPoint).SetSafety(safety) ;
+
+    (*Step).SetPostStepPoint(aPoint) ;
+
+    G4int ib,ev ;
+    G4double xc,yc,zc,later ; 
+//**************************************************************************
+
+ //---------------------------------------------------------------------
+    G4double distr[100]=
+                       {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
+    G4double distrx[100]=
+                       {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
+                        0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
+
+    G4int nev[100]=
+                   {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+    G4int nevx[100]=
+                   {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+    G4double thetamean,thetamean2,dthetamean,errdistr ;
+
+    outFile << G4endl ;
+    outFile << "  " << MaterialName << "  PostStepDoIt (scattering) test " << G4endl ;
+    outFile << "  +++++++++++++++++++++++++++++++++++++++++++++++++" << G4endl ;
+    outFile << G4endl ;
+
+    G4double wg[100] ;
+
+    G4double over,overx ;
+    G4double fwg, costheta,theta ;
+    G4int ibin,iw ;
+    G4double TMeV ;
+    G4double dthetadeg,dtheta ;
+    G4int flagdeg ;
+
+//*************************************************************************************
+// example: how to use the GetRange() fuctions............
+
+    for (G4int i=0; i<Nbin; i++) {
+      G4double TMeV= TkinMeV[i]*MeV;
+
+      G4double rangestart;
+      if( theParticle == theElectron )
+	rangestart = theElectronIonisation.OldGetRange(theElectron,TMeV,apttoMaterial) ;
+      if( theParticle == thePositron )
+	rangestart = thePositronIonisation.OldGetRange(thePositron,TMeV,apttoMaterial) ;
+      if( theParticle == theMuonPlus )
+	rangestart = theMuonPlusIonisation.OldGetRange(theMuonPlus,TMeV,apttoMaterial) ;
+      if( theParticle == theMuonMinus )
+	rangestart = theMuonMinusIonisation.OldGetRange(theMuonMinus,TMeV,apttoMaterial) ; 
+      if( theParticle == theProton )
+	rangestart = theProtonIonisation.OldGetRange(theProton,TMeV,apttoMaterial) ;
+      if( theParticle == theAntiProton )
+	rangestart = theAntiProtonIonisation.OldGetRange(theAntiProton,TMeV,apttoMaterial) ; 
+      if( theParticle == thePionPlus )
+	rangestart = thePionPlusIonisation.OldGetRange(thePionPlus,TMeV,apttoMaterial) ; 
+      if( theParticle == thePionMinus )
+	rangestart = thePionMinusIonisation.OldGetRange(thePionMinus,TMeV,apttoMaterial) ; 
+      if( theParticle == theKaonPlus )
+	rangestart = theKaonPlusIonisation.OldGetRange(theKaonPlus,TMeV,apttoMaterial) ; 
+      if( theParticle == theKaonMinus )
+	rangestart = theKaonMinusIonisation.OldGetRange(theKaonMinus,TMeV,apttoMaterial) ; 
+      G4cout << " energy (MeV) = " << TMeV << G4endl;
+      G4cout << " range (OldGetRange) = " << rangestart << G4endl ;   
+
+      G4double range2= G4EnergyLossTables::GetRange(theParticle, TMeV, apttoMaterial);
+
+      G4cout << " range (G4EnergyLossTables::GetRange) = " << range2 << G4endl ;   
+    }
+            
+    } // of material loop
+
+  } // of largest loop
+
+  return EXIT_SUCCESS;
+}
Index: trunk/source/processes/electromagnetic/utils/test/testG4ZTablesCalculation.cc
===================================================================
--- trunk/source/processes/electromagnetic/utils/test/testG4ZTablesCalculation.cc	(revision 1199)
+++ trunk/source/processes/electromagnetic/utils/test/testG4ZTablesCalculation.cc	(revision 1199)
@@ -0,0 +1,135 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+
+#include "globals.hh"
+#include "G4ios.hh"
+#include "G4Timer.hh"
+#include "G4Pow.hh"
+
+#include <fstream>
+#include <string>
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+int main(int argc, char** argv)
+{
+  if(argc < 2) {
+    G4cout << "Name is not specified! Exit" << G4endl;
+    exit(1);
+  }
+
+  G4double onethird = 1.0/3.0;
+  G4int zmax = 255;
+  const G4int n = 2551;
+  G4int nn = 10000;
+
+  G4cout.setf( std::ios::scientific, std::ios::floatfield );
+
+  G4cout << "Loop  Z = 1-256 over " << n << " points in " << nn << " seria " << G4endl;
+  G4cout << "Time comparison of G4Pow calculation of " << argv[1] << G4endl;
+
+  G4int i, j;
+  G4double x[n];
+  G4double y[n];
+  G4double z[n];
+
+  G4double del = G4double(zmax)/G4double(n-1);
+  G4double t   = 0.5;
+  for (i=0; i<n; i++) {
+    x[i] = t;
+    t += del;
+  }
+
+  G4Pow* power = G4Pow::GetInstance();
+  G4Timer* timer1 = new G4Timer();
+
+  timer1->Start();
+  for(j=0; j<nn; j++) {
+    for (i=0; i<n; i++) {
+      t = x[i];
+      //y[i] = power->A13(t);
+      // y[i] = power->A23(t);
+      y[i] = power->logA(t);
+    } 
+  }
+
+  timer1->Stop();
+  G4cout << "======= G4pow   ";
+  G4cout << *timer1 << std::endl;
+
+  timer1->Start();
+  for(j=0; j<nn; j++) {
+    for (i=0; i<n; i++) {
+      t = x[i];
+      //z[i] = std::pow(t,onethird);
+      z[i] = std::log(t);
+      //    G4cout << "d[" << x << "] = " << d << G4endl;
+    } 
+  }
+
+  timer1->Stop();
+  G4cout << std::endl;
+  G4cout << "======= std:   ";
+  G4cout << *timer1 << std::endl;
+  
+  nn *= 10;
+
+  timer1->Start();
+  for(j=0; j<nn; j++) {
+    for (i=1; i<256; i++) {
+      //y[i] = power->Z13(i);
+      // y[i] = power->Z23(i);
+      y[i] = power->logZ(i);
+    } 
+  }
+
+  timer1->Stop();
+  G4cout << std::endl;
+  G4cout << "======= G4pow  Z ";
+  G4cout << *timer1 << std::endl;
+
+  timer1->Start();
+  for(j=0; j<nn; j++) {
+    for (i=1; i<256; i++) {
+      //z[i] = std::pow(G4double(i),onethird);
+      z[i] = std::log(G4double(i));
+      //    G4cout << "d[" << x << "] = " << d << G4endl;
+    } 
+  }
+
+  timer1->Stop();
+  G4cout << std::endl;
+  G4cout << "======= std:   ";
+  G4cout << *timer1 << std::endl;
+
+  delete timer1;
+  return 0;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
