Index: trunk/examples/extended/analysis/A01/src/A01DetectorConstruction.cc
===================================================================
--- trunk/examples/extended/analysis/A01/src/A01DetectorConstruction.cc	(revision 1230)
+++ trunk/examples/extended/analysis/A01/src/A01DetectorConstruction.cc	(revision 1337)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// $Id: A01DetectorConstruction.cc,v 1.9 2006/06/29 16:32:22 gunter Exp $
+// $Id: A01DetectorConstruction.cc,v 1.10 2009/11/21 00:22:55 perl Exp $
 // --------------------------------------------------------------
 //
@@ -32,8 +32,10 @@
 #include "G4FieldManager.hh"
 #include "G4TransportationManager.hh"
+#include "G4Mag_UsualEqRhs.hh"
 
 #include "G4Material.hh"
 #include "G4Element.hh"
 #include "G4MaterialTable.hh"
+#include "G4NistManager.hh"
 
 #include "G4VSolid.hh"
@@ -76,4 +78,5 @@
   messenger = new A01DetectorConstMessenger(this);
   magneticField = new A01MagneticField();
+  fieldMgr = new G4FieldManager();
   armRotation = new G4RotationMatrix();
   armRotation->rotateY(armAngle);
@@ -84,4 +87,5 @@
   delete armRotation;
   delete magneticField;
+  delete fieldMgr;
   delete messenger;
 
@@ -111,13 +115,11 @@
   G4VSensitiveDetector* HadCalorimeter;
 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
   ConstructMaterials();
 
-  // Magnetic field ----------------------------------------------------------
+  // Local Magnetic Field
   static G4bool fieldIsInitialized = false;
+
   if(!fieldIsInitialized)
   {
-    G4FieldManager* fieldMgr
-      = G4TransportationManager::GetTransportationManager()->GetFieldManager();
     fieldMgr->SetDetectorField(magneticField);
     fieldMgr->CreateChordFinder(magneticField);
@@ -133,8 +135,16 @@
     = new G4PVPlacement(0,G4ThreeVector(),worldLogical,"worldPhysical",0,0,0);
 
-  // magnetic field region
+  // Tube with Local Magnetic field
+   
   G4VSolid* magneticSolid = new G4Tubs("magneticTubs",0.,1.*m,1.*m,0.,360.*deg);
-  G4LogicalVolume* magneticLogical
-    = new G4LogicalVolume(magneticSolid,air,"magneticLogical",0,0,0);
+  G4NistManager* man = G4NistManager::Instance();
+  G4Material* G4_Galactic = man->FindOrBuildMaterial("G4_Galactic");
+  
+   G4LogicalVolume* magneticLogical
+    = new G4LogicalVolume(magneticSolid,G4_Galactic,"magneticLogical",fieldMgr,0,0);
+  //                                                                  ********
+ 
+  // placement of Tube 
+ 
   G4RotationMatrix* fieldRot = new G4RotationMatrix();
   fieldRot->rotateX(90.*deg);
Index: trunk/examples/extended/analysis/A01/src/A01EMPhysics.cc
===================================================================
--- trunk/examples/extended/analysis/A01/src/A01EMPhysics.cc	(revision 1230)
+++ trunk/examples/extended/analysis/A01/src/A01EMPhysics.cc	(revision 1337)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// $Id: A01EMPhysics.cc,v 1.8 2006/06/29 16:32:30 gunter Exp $
+// $Id: A01EMPhysics.cc,v 1.9 2009/11/21 01:00:19 perl Exp $
 // --------------------------------------------------------------
 //
@@ -73,5 +73,5 @@
    //Electorn
    pManager = G4Electron::Electron()->GetProcessManager();
-   G4VProcess* theeminusMultipleScattering = new G4MultipleScattering();
+   G4VProcess* theeminusMultipleScattering = new G4eMultipleScattering();
    G4VProcess* theeminusIonisation         = new G4eIonisation();
    G4VProcess* theeminusBremsstrahlung     = new G4eBremsstrahlung();
@@ -94,5 +94,5 @@
    //Positron
    pManager = G4Positron::Positron()->GetProcessManager();
-   G4VProcess* theeplusMultipleScattering = new G4MultipleScattering();
+   G4VProcess* theeplusMultipleScattering = new G4eMultipleScattering();
    G4VProcess* theeplusIonisation         = new G4eIonisation();
    G4VProcess* theeplusBremsstrahlung     = new G4eBremsstrahlung();
Index: trunk/examples/extended/analysis/A01/src/A01HadronPhysics.cc
===================================================================
--- trunk/examples/extended/analysis/A01/src/A01HadronPhysics.cc	(revision 1230)
+++ trunk/examples/extended/analysis/A01/src/A01HadronPhysics.cc	(revision 1337)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// $Id: A01HadronPhysics.cc,v 1.8 2006/06/29 16:32:48 gunter Exp $
+// $Id: A01HadronPhysics.cc,v 1.9 2009/11/21 01:00:19 perl Exp $
 // --------------------------------------------------------------
 //
@@ -74,5 +74,5 @@
    pManager->AddDiscreteProcess(thePionPlusInelasticProcess);
 
-   G4VProcess* theppMultipleScattering = new G4MultipleScattering();
+   G4VProcess* theppMultipleScattering = new G4hMultipleScattering();
    G4VProcess* theppIonisation        = new G4hIonisation();
    // 
@@ -107,5 +107,5 @@
    pManager->AddDiscreteProcess(thePionMinusInelasticProcess);
 
-   G4VProcess* thepmMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thepmMultipleScattering = new G4hMultipleScattering();
    G4VProcess* thepmIonisation        = new G4hIonisation();
    // 
@@ -141,5 +141,5 @@
    pManager->AddDiscreteProcess(theKaonPlusInelasticProcess);
 
-   G4VProcess* thekpMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thekpMultipleScattering = new G4hMultipleScattering();
    G4VProcess* thekpIonisation        = new G4hIonisation();
    // 
@@ -176,5 +176,5 @@
    pManager->AddDiscreteProcess(theKaonMinusInelasticProcess);
 
-   G4VProcess* thekmMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thekmMultipleScattering = new G4hMultipleScattering();
    G4VProcess* thekmIonisation        = new G4hIonisation();
 
@@ -248,5 +248,5 @@
    pManager->AddDiscreteProcess(theProtonInelasticProcess);
 
-   G4VProcess* thepMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thepMultipleScattering = new G4hMultipleScattering();
    G4VProcess* thepIonisation        = new G4hIonisation();
 
@@ -286,5 +286,5 @@
    pManager->AddRestProcess(theAntiProtonAnnihilation);
 
-   G4VProcess* theapMultipleScattering = new G4MultipleScattering();
+   G4VProcess* theapMultipleScattering = new G4hMultipleScattering();
    G4VProcess* theapIonisation        = new G4hIonisation();
 
@@ -417,5 +417,5 @@
    pManager->AddDiscreteProcess(theSigmaPlusInelasticProcess);
 
-   G4VProcess* thespMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thespMultipleScattering = new G4hMultipleScattering();
    G4VProcess* thespIonisation        = new G4hIonisation();
 
@@ -451,5 +451,5 @@
    pManager->AddDiscreteProcess(theAntiSigmaPlusInelasticProcess);
 
-   G4VProcess* theaspMultipleScattering = new G4MultipleScattering();
+   G4VProcess* theaspMultipleScattering = new G4hMultipleScattering();
    G4VProcess* theaspIonisation        = new G4hIonisation();
 
@@ -485,5 +485,5 @@
    pManager->AddDiscreteProcess(theSigmaMinusInelasticProcess);
 
-   G4VProcess* thesmMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thesmMultipleScattering = new G4hMultipleScattering();
    G4VProcess* thesmIonisation        = new G4hIonisation();
 
@@ -519,5 +519,5 @@
    pManager->AddDiscreteProcess(theAntiSigmaMinusInelasticProcess);
 
-   G4VProcess* theasmMultipleScattering = new G4MultipleScattering();
+   G4VProcess* theasmMultipleScattering = new G4hMultipleScattering();
    G4VProcess* theasmIonisation        = new G4hIonisation();
 
@@ -593,5 +593,5 @@
    pManager->AddDiscreteProcess(theXiMinusInelasticProcess);
 
-   G4VProcess* thexmMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thexmMultipleScattering = new G4hMultipleScattering();
    G4VProcess* thexmIonisation        = new G4hIonisation();
 
@@ -627,5 +627,5 @@
    pManager->AddDiscreteProcess(theAntiXiMinusInelasticProcess);
 
-   G4VProcess* theaxmMultipleScattering = new G4MultipleScattering();
+   G4VProcess* theaxmMultipleScattering = new G4hMultipleScattering();
    G4VProcess* theaxmIonisation        = new G4hIonisation();
 
@@ -661,5 +661,5 @@
    pManager->AddDiscreteProcess(theOmegaMinusInelasticProcess);
 
-   G4VProcess* theomMultipleScattering = new G4MultipleScattering();
+   G4VProcess* theomMultipleScattering = new G4hMultipleScattering();
    G4VProcess* theomIonisation        = new G4hIonisation();
 
@@ -695,5 +695,5 @@
    pManager->AddDiscreteProcess(theAntiOmegaMinusInelasticProcess);
 
-   G4VProcess* theaomMultipleScattering = new G4MultipleScattering();
+   G4VProcess* theaomMultipleScattering = new G4hMultipleScattering();
    G4VProcess* theaomIonisation        = new G4hIonisation();
 
Index: trunk/examples/extended/analysis/A01/src/A01IonPhysics.cc
===================================================================
--- trunk/examples/extended/analysis/A01/src/A01IonPhysics.cc	(revision 1230)
+++ trunk/examples/extended/analysis/A01/src/A01IonPhysics.cc	(revision 1337)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// $Id: A01IonPhysics.cc,v 1.9 2006/06/29 16:32:55 gunter Exp $
+// $Id: A01IonPhysics.cc,v 1.10 2009/11/21 01:00:19 perl Exp $
 // --------------------------------------------------------------
 //
@@ -62,5 +62,5 @@
 
    // add process
-   G4VProcess* thegionMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thegionMultipleScattering = new G4hMultipleScattering();
    //
    // G4hIonization may be not able to use for Geanric Ion in future 
@@ -100,5 +100,5 @@
    pManager->AddDiscreteProcess(theDeuteronInelasticProcess);
 
-   G4VProcess* thedueMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thedueMultipleScattering = new G4hMultipleScattering();
    G4VProcess* thedueIonisation        = new G4hIonisation();
    //
@@ -132,5 +132,5 @@
    pManager->AddDiscreteProcess(theTritonInelasticProcess);
 
-   G4VProcess* thetriMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thetriMultipleScattering = new G4hMultipleScattering();
    G4VProcess* thetriIonisation        = new G4hIonisation();
    //
@@ -164,5 +164,5 @@
    pManager->AddDiscreteProcess(theAlphaInelasticProcess);
 
-   G4VProcess* thealpMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thealpMultipleScattering = new G4hMultipleScattering();
    G4VProcess* thealpIonisation        = new G4hIonisation();
    //
@@ -189,5 +189,5 @@
    pManager->AddDiscreteProcess(thehe3ElasticProcess);
 
-   G4VProcess* thehe3MultipleScattering = new G4MultipleScattering();
+   G4VProcess* thehe3MultipleScattering = new G4hMultipleScattering();
    G4VProcess* thehe3Ionisation        = new G4hIonisation();
    //
Index: trunk/examples/extended/analysis/A01/src/A01MagneticField.cc
===================================================================
--- trunk/examples/extended/analysis/A01/src/A01MagneticField.cc	(revision 1230)
+++ trunk/examples/extended/analysis/A01/src/A01MagneticField.cc	(revision 1337)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// $Id: A01MagneticField.cc,v 1.6 2006/06/29 16:32:57 gunter Exp $
+// $Id: A01MagneticField.cc,v 1.7 2009/11/21 00:22:55 perl Exp $
 // --------------------------------------------------------------
 //
@@ -30,4 +30,5 @@
 #include "A01MagneticField.hh"
 #include "A01MagneticFieldMessenger.hh"
+#include "globals.hh"
 
 A01MagneticField::A01MagneticField()
@@ -35,6 +36,5 @@
   messenger = new A01MagneticFieldMessenger(this);
   By = 1.0*tesla;
-  rmax_sq = sqr(1.*m);
-  ymax = 100.*cm;
+  
 }
 
@@ -42,12 +42,10 @@
 { delete messenger; }
 
-void A01MagneticField::GetFieldValue(const double Point[3],double *Bfield) const
+void A01MagneticField::GetFieldValue(const G4double [4],double *Bfield) const
 {
   Bfield[0] = 0.;
   Bfield[2] = 0.;
-  if(std::abs(Point[1])<ymax && (sqr(Point[0])+sqr(Point[2]))<rmax_sq)
-  { Bfield[1] = By; }
-  else
-  { Bfield[1] = 0.; }
+  Bfield[1] = By;
+
 }
 
Index: trunk/examples/extended/analysis/A01/src/A01MuonPhysics.cc
===================================================================
--- trunk/examples/extended/analysis/A01/src/A01MuonPhysics.cc	(revision 1230)
+++ trunk/examples/extended/analysis/A01/src/A01MuonPhysics.cc	(revision 1337)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// $Id: A01MuonPhysics.cc,v 1.8 2006/06/29 16:33:01 gunter Exp $
+// $Id: A01MuonPhysics.cc,v 1.10 2009/12/02 22:45:09 perl Exp $
 // --------------------------------------------------------------
 //
@@ -62,5 +62,5 @@
    //Muon+
    pManager = G4MuonPlus::MuonPlus()->GetProcessManager();
-   G4VProcess* thempMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thempMultipleScattering = new G4MuMultipleScattering();
    G4VProcess* thempBremsstrahlung     = new G4MuBremsstrahlung();
    G4VProcess* thempPairProduction     = new G4MuPairProduction();
@@ -87,5 +87,5 @@
    //Muon-
    pManager = G4MuonMinus::MuonMinus()->GetProcessManager();
-   G4VProcess* themmMultipleScattering = new G4MultipleScattering();
+   G4VProcess* themmMultipleScattering = new G4MuMultipleScattering();
    G4VProcess* themmBremsstrahlung     = new G4MuBremsstrahlung();
    G4VProcess* themmPairProduction     = new G4MuPairProduction();
@@ -111,5 +111,5 @@
    // Tau+ Physics
    pManager = G4TauPlus::TauPlus()->GetProcessManager();
-   G4VProcess* thetpMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thetpMultipleScattering = new G4MuMultipleScattering();
    G4VProcess* thetpIonisation        = new G4hIonisation();
    //
@@ -128,5 +128,5 @@
    // Tau- Physics
    pManager = G4TauMinus::TauMinus()->GetProcessManager();
-   G4VProcess* thetmMultipleScattering = new G4MultipleScattering();
+   G4VProcess* thetmMultipleScattering = new G4MuMultipleScattering();
    G4VProcess* thetmIonisation        = new G4hIonisation();
    //
