Index: trunk/examples/extended/exoticphysics/monopole/History
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/History	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/History	(revision 1337)
@@ -1,3 +1,3 @@
-$Id: History,v 1.2 2007/08/16 12:57:59 vnivanch Exp $
+$Id: History,v 1.10 2010/06/07 05:40:46 perl Exp $
 -------------------------------------------------------------------
 
@@ -6,6 +6,6 @@
      =========================================================
 
-                    monopol History file
-                    --------------------
+                    Monopole Example History file
+                    -----------------------------
 This file should be used by the G4 example coordinator to briefly
 summarize all major modifications introduced in the code and keep
@@ -16,4 +16,31 @@
      ----------------------------------------------------------
 
+6 June 10: J.Perl (monopole-V09-03-05)
+- Remove unused variable in EventAction 
+
+4 June 10: J.Perl (monopole-V09-03-04)
+- Updated vis usage 
+
+04 June 10: V.Ivant (monopole-V09-03-03)
+- Substituted QGSP by QGSP_BERT
+- (J. Apostolakis, B. Bozsogi)  Added new classes for monopole
+  G4MonopoleEquation, G4MonopoleFieldSetup, G4MonopoleTransportation
+
+12 May 10: J.Allison (monopole-V09-03-02)
+- Introduced GUIExecutive.
+
+31 March 10: V.Ivant (monopole-V09-03-01)
+- Removed obsolete header G4MultipleScattering.hh
+
+23 March 10: V.Ivant (monopole-V09-03-00)
+- Cleanup and add test on ionisation of heavy highly charged particle
+
+14 July 09: V.Ivant (monopole-V09-02-00)
+- Added messenger to define mass and change of the monopole
+
+11 June 08: V.Ivant (monopole-V09-01-00)
+- Remove AIDA from GNUmakefile
+- Fixed compillation warnings 
+
 16 August 07: V.Ivant (monopole-V09-00-00)
 - First release
Index: trunk/examples/extended/exoticphysics/monopole/README
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/README	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/README	(revision 1337)
@@ -1,3 +1,3 @@
-$Id: README,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
+$Id: README,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
 -------------------------------------------------------------------
 
@@ -46,4 +46,9 @@
     Physics Lists include standard QGSP physics and additional builder
 		for monopole physics.
+    To define monopole parameters an extra string should be provided
+      a) interactive mode by UI command:
+         /monopole/setup 2 0 200 GeV (magnetic number, electric number, mass)
+      b) batch mode:
+         $G4BIN/$G4SYSTEM/monopole file.mac '2 0 200 GeV'  
 
  3- AN EVENT : THE PRIMARY GENERATOR
Index: trunk/examples/extended/exoticphysics/monopole/include/DetectorConstruction.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/DetectorConstruction.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/DetectorConstruction.hh	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: DetectorConstruction.hh,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: DetectorConstruction.hh,v 1.3 2010/06/04 19:03:36 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,4 +41,5 @@
 class G4UniformMagField;
 class DetectorMessenger;
+class G4MonopoleFieldSetup;
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -83,5 +84,8 @@
   G4double	      maxStepSize;
   G4Material*         absorMaterial;
+
   G4UniformMagField*  magField;
+  G4MonopoleFieldSetup* fMFieldSetup;
+
   G4LogicalVolume*    lAbsor;
                
Index: trunk/examples/extended/exoticphysics/monopole/include/DetectorMessenger.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/DetectorMessenger.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/DetectorMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.hh,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/include/EventAction.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/EventAction.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/EventAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventAction.hh,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/include/EventActionMessenger.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/EventActionMessenger.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/EventActionMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.hh,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/include/G4Monopole.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/G4Monopole.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/G4Monopole.hh	(revision 1337)
@@ -77,5 +77,5 @@
   static G4Monopole* Monopole();
 
-  static G4double MagneticCharge() {return magCharge;};
+  G4double MagneticCharge() const;
 
 private:
Index: trunk/examples/extended/exoticphysics/monopole/include/G4MonopolePhysics.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/G4MonopolePhysics.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/G4MonopolePhysics.hh	(revision 1337)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4MonopolePhysics.hh,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: G4MonopolePhysics.hh,v 1.3 2010/03/23 14:12:08 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -40,4 +40,5 @@
 
 class G4MonopolePhysicsMessenger;
+class G4Monopole;
 
 class G4MonopolePhysics : public G4VPhysicsConstructor
@@ -63,6 +64,6 @@
 
   // hide assignment operator
-  //  G4MonopolePhysics & operator=(const G4MonopolePhysics &right);
-  // G4MonopolePhysics(const G4MonopolePhysics&);
+  G4MonopolePhysics & operator=(const G4MonopolePhysics &right);
+  G4MonopolePhysics(const G4MonopolePhysics&);
 
   G4int    magCharge;
@@ -71,4 +72,5 @@
 
   G4MonopolePhysicsMessenger*  theMessenger;
+  G4Monopole* mpl;
 
 };
Index: trunk/examples/extended/exoticphysics/monopole/include/PrimaryGeneratorAction.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/PrimaryGeneratorAction.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/PrimaryGeneratorAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorAction.hh,v 1.2 2009/07/15 10:19:47 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/exoticphysics/monopole/include/PrimaryGeneratorMessenger.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/PrimaryGeneratorMessenger.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/PrimaryGeneratorMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorMessenger.hh,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/include/RunAction.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/RunAction.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/RunAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: RunAction.hh,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/include/RunActionMessenger.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/RunActionMessenger.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/RunActionMessenger.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: RunActionMessenger.hh,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/include/SteppingAction.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/SteppingAction.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/SteppingAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingAction.hh,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/include/TrackingAction.hh
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/include/TrackingAction.hh	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/include/TrackingAction.hh	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: TrackingAction.hh,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/monopole.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/monopole.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/monopole.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: monopole.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: monopole.cc,v 1.6 2010/06/06 04:53:49 perl 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"
 #include "globals.hh"
@@ -39,5 +37,5 @@
 #include "DetectorConstruction.hh"
 #include "G4MonopolePhysics.hh"
-#include "QGSP.hh"
+#include "QGSP_BERT.hh"
 #include "PrimaryGeneratorAction.hh"
 
@@ -49,4 +47,8 @@
 #ifdef G4VIS_USE
 #include "G4VisExecutive.hh"
+#endif
+
+#ifdef G4UI_USE
+#include "G4UIExecutive.hh"
 #endif
 
@@ -62,16 +64,22 @@
 
   //create physicsList
-  QGSP* phys = new QGSP();
+  QGSP_BERT* phys = new QGSP_BERT();
   G4MonopolePhysics * theMonopole = new G4MonopolePhysics();
   phys->RegisterPhysics(theMonopole);
-
+    
+	// visualization manager
+#ifdef G4VIS_USE
+	G4VisManager* visManager = new G4VisExecutive;
+	visManager->Initialize();
+#endif
+	
   //get the pointer to the User Interface manager
-  G4UImanager* UI = G4UImanager::GetUIpointer();
+  G4UImanager* UImanager = G4UImanager::GetUIpointer();
 
   // Setup monopole
   G4String s = ""; 
-  if(argc > 2) s = argv[2];
-  UI->ApplyCommand("/control/verbose 1");
-  UI->ApplyCommand("/monopole/setup "+s);
+  if(argc > 2) { s = argv[2]; }
+  UImanager->ApplyCommand("/control/verbose 1");
+  UImanager->ApplyCommand("/monopole/setup "+s);
 
   // mandator user classes
@@ -84,9 +92,4 @@
   runManager->SetUserAction(kin);
 
-#ifdef G4VIS_USE
-  //visualization manager
-  G4VisManager* visManager = 0;
-#endif
-
   //user action classes
   RunAction* run;
@@ -97,22 +100,17 @@
   runManager->SetUserAction(new SteppingAction(det, run));
 
-  if (argc == 1)   // Define UI terminal for interactive mode
-    {
-      visManager = new G4VisExecutive();
-      visManager->Initialize();
-      G4UIsession* session = 0;
-#ifdef G4UI_USE_TCSH
-      session = new G4UIterminal(new G4UItcsh);
-#else
-      session = new G4UIterminal();
-#endif
-      session->SessionStart();
-      delete session;
-    }
-  else           // Batch mode
+  if (argc!=1)   // batch mode
     {
       G4String command = "/control/execute ";
       G4String fileName = argv[1];
-      UI->ApplyCommand(command+fileName);
+      UImanager->ApplyCommand(command+fileName);    
+    }
+  else
+    {  // interactive mode : define UI session
+#ifdef G4UI_USE
+      G4UIExecutive* ui = new G4UIExecutive(argc, argv);
+      ui->SessionStart();
+      delete ui;
+#endif
     }
 
Index: trunk/examples/extended/exoticphysics/monopole/monopole.in
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/monopole.in	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/monopole.in	(revision 1337)
@@ -18,5 +18,5 @@
 /run/initialize
 #
-/process/eLoss/verbose 0
+/process/eLoss/verbose 1
 /testex/event/printModulo 10
 #
Index: trunk/examples/extended/exoticphysics/monopole/src/DetectorConstruction.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/DetectorConstruction.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/DetectorConstruction.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: DetectorConstruction.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: DetectorConstruction.cc,v 1.2 2010/06/04 19:03:36 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -48,4 +48,8 @@
 #include "G4NistManager.hh"
 
+#include "G4MonopoleFieldSetup.hh"
+#include "G4FieldManager.hh"
+#include "G4TransportationManager.hh"
+
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
@@ -60,4 +64,5 @@
   magField = 0;
   lAbsor   = 0;
+  fMFieldSetup = 0;
 
   DefineMaterials();
@@ -68,13 +73,13 @@
 }
 
-
-
 DetectorConstruction::~DetectorConstruction()
-{delete detectorMessenger;}
-
+{
+  delete detectorMessenger;
+}
 
 G4VPhysicalVolume* DetectorConstruction::Construct()
-{ return ConstructVolumes();}
-
+{ 
+  return ConstructVolumes();
+}
 
 void DetectorConstruction::DefineMaterials()
@@ -116,6 +121,4 @@
   G4LogicalVolumeStore::GetInstance()->Clean();
   G4SolidStore::GetInstance()->Clean();
-
-
 
   /****************************    World   *****************************/
@@ -199,13 +202,15 @@
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-#include "G4FieldManager.hh"
-#include "G4TransportationManager.hh"
 
 void DetectorConstruction::SetMagField(G4double fieldValue)
 {
   //apply a global uniform magnetic field along Z axis
-  G4FieldManager * fieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager();
+  G4FieldManager * fieldMgr = 
+    G4TransportationManager::GetTransportationManager()->GetFieldManager();
     
-  if (magField) delete magField;	//delete the existing magn field
+  if (magField) { delete magField; }	//delete the existing magn field
+
+  //fMFieldSetup = G4MonopoleFieldSetup::GetMonopoleFieldSetup(); // create the field
+
   
   if (fieldValue != 0.)			// create a new one if non nul
@@ -222,6 +227,6 @@
 }
 
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
 void DetectorConstruction::SetMaxStepSize(G4double step_)
 {
Index: trunk/examples/extended/exoticphysics/monopole/src/DetectorMessenger.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/DetectorMessenger.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/DetectorMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: DetectorMessenger.cc,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/src/EventAction.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/EventAction.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/EventAction.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: EventAction.cc,v 1.1 2007/08/16 10:32:04 vnivanch 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......
@@ -35,7 +35,4 @@
 
 #include "G4Event.hh"
-#include "G4TrajectoryContainer.hh"
-#include "G4Trajectory.hh"
-#include "G4VVisManager.hh"
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -66,21 +63,6 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
-void EventAction::EndOfEventAction(const G4Event* evt)
+void EventAction::EndOfEventAction(const G4Event*)
 {
-  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(1000); 
-      }
-  }
 }
 
Index: trunk/examples/extended/exoticphysics/monopole/src/EventActionMessenger.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/EventActionMessenger.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/EventActionMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: EventActionMessenger.cc,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/src/G4Monopole.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/G4Monopole.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/G4Monopole.cc	(revision 1337)
@@ -106,5 +106,5 @@
 G4Monopole* G4Monopole::Monopole()
 {    
-  if(!theMonopole) theMonopole = MonopoleDefinition();
+  if(!theMonopole) { theMonopole = MonopoleDefinition(); }
   return theMonopole;
 } 
@@ -112,2 +112,9 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 
+G4double G4Monopole::MagneticCharge() const
+{
+  return magCharge;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
Index: trunk/examples/extended/exoticphysics/monopole/src/G4MonopolePhysics.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/G4MonopolePhysics.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/G4MonopolePhysics.cc	(revision 1337)
@@ -24,7 +24,6 @@
 // ********************************************************************
 //
-//
-// $Id: G4MonopolePhysics.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: G4MonopolePhysics.cc,v 1.5 2010/06/04 19:03:36 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //---------------------------------------------------------------------------
@@ -51,5 +50,6 @@
 #include "G4StepLimiter.hh"
 #include "G4Transportation.hh"
-#include "G4MultipleScattering.hh"
+#include "G4MonopoleTransportation.hh"
+#include "G4hMultipleScattering.hh"
 #include "G4mplIonisation.hh"
 #include "G4hhIonisation.hh"
@@ -73,8 +73,7 @@
 void G4MonopolePhysics::ConstructParticle()
 {
-  G4Monopole::MonopoleDefinition(monopoleMass, magCharge, elCharge);
+  mpl = G4Monopole::MonopoleDefinition(monopoleMass, magCharge, elCharge);
 }
 
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 void G4MonopolePhysics::ConstructProcess()
 {
@@ -82,5 +81,4 @@
     G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl;
   }
-  G4Monopole* mpl = G4Monopole::Monopole();
   
   G4ProcessManager* pmanager = new G4ProcessManager(mpl);
@@ -101,5 +99,22 @@
   nbin *= 10;
   
-  pmanager->AddProcess( new G4Transportation(), -1, 0, 0);
+  if(magn == 0.0) {
+    pmanager->AddProcess( new G4Transportation(), -1, 0, 0);
+  } else {
+    pmanager->AddProcess( new G4MonopoleTransportation(mpl), -1, 0, 0);
+  }
+
+  G4int idx = 1;
+  if(mpl->GetPDGCharge() != 0.0) {
+    //G4hMultipleScattering* hmsc = new G4hMultipleScattering();
+    //pmanager->AddProcess(hmsc,  -1, idx, idx);
+    //++idx;
+    G4hhIonisation* hhioni = new G4hhIonisation();
+    hhioni->SetDEDXBinning(nbin);
+    hhioni->SetMinKinEnergy(emin);
+    hhioni->SetMaxKinEnergy(emax);
+    pmanager->AddProcess(hhioni,  -1, idx, idx);
+    ++idx;
+  }
   if(magn != 0.0) {
     G4mplIonisation* mplioni = new G4mplIonisation(magn);
@@ -107,14 +122,8 @@
     mplioni->SetMinKinEnergy(emin);
     mplioni->SetMaxKinEnergy(emax);
-    pmanager->AddProcess(mplioni, -1, 1, 1);
+    pmanager->AddProcess(mplioni, -1, idx, idx);
+    ++idx;
   }
-  if(mpl->GetPDGCharge() != 0.0) {
-    G4hhIonisation* hhioni = new G4hhIonisation();
-    hhioni->SetDEDXBinning(nbin);
-    hhioni->SetMinKinEnergy(emin);
-    hhioni->SetMaxKinEnergy(emax);
-    pmanager->AddProcess(hhioni,  -1, 2, 2);
-  }
-  pmanager->AddProcess( new G4StepLimiter(),  -1, -1, 3);
+  pmanager->AddProcess( new G4StepLimiter(),  -1, -1, idx);
 
 }
Index: trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorAction.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorAction.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorAction.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: PrimaryGeneratorAction.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: PrimaryGeneratorAction.cc,v 1.3 2010/03/23 14:12:08 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -47,7 +47,7 @@
 {
   particleGun  = new G4ParticleGun(1);
-  G4ParticleDefinition* particle = 
-    G4ParticleTable::GetParticleTable()->FindParticle("monopole");
-  particleGun->SetParticleDefinition(particle);
+  //G4ParticleDefinition* particle = 
+  //  G4ParticleTable::GetParticleTable()->FindParticle("monopole");
+  //particleGun->SetParticleDefinition(particle);
   particleGun->SetParticleEnergy(100 * GeV);
   particleGun->SetParticleMomentumDirection(G4ThreeVector(1., 0., 0.));
Index: trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorMessenger.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorMessenger.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: PrimaryGeneratorMessenger.cc,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/src/RunAction.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/RunAction.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/RunAction.cc	(revision 1337)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: RunAction.cc,v 1.2 2008/06/11 14:34:19 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: RunAction.cc,v 1.4 2010/06/04 19:03:36 vnivanch Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 // 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -50,7 +50,8 @@
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
-RunAction::RunAction(DetectorConstruction* det, PrimaryGeneratorAction* kin):detector(det), kinematic(kin), af(0), tree(0)
+RunAction::RunAction(DetectorConstruction* det, PrimaryGeneratorAction* kin)
+  :detector(det), kinematic(kin), af(0), tree(0)
 { 
-  verboseLevel = 0;
+  verboseLevel = 1;
   binLength = offsetX = 0.;
   histo[0] = 0;
@@ -60,5 +61,5 @@
   // Creating the analysis factory
   af = AIDA_createAnalysisFactory();
-	ftype   = "hbook";
+  ftype   = "root";
   fname   = "monopole";
 #endif
@@ -68,6 +69,6 @@
 }
 
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
 RunAction::~RunAction()
 {
@@ -77,17 +78,19 @@
 }
 
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
 void RunAction::bookHisto()
 {
   G4double length  = detector->GetAbsorSizeX();
-  if(!binLength) binLength = 5 * mm;
-	if(binLength > detector->GetMaxStepSize()) binLength = detector->GetMaxStepSize();
+  if(!binLength) { binLength = 5 * mm; }
+  if(binLength > detector->GetMaxStepSize()) { 
+    binLength = detector->GetMaxStepSize();
+  }
   offsetX   = 0.5 * length;
  
 #ifdef G4ANALYSIS_USE
-  if(GetVerbose() > 0) G4cout << "\n----> Histogram Tree opened" << G4endl;
-
-  G4int nbBins = (int)(0.5 + length / binLength);
+  if(GetVerbose() > 0) { G4cout << "\n----> Histogram Tree opened" << G4endl; }
+
+  G4int nbBins = (G4int)(0.5 + length / binLength);
 
   // Create the tree factory
@@ -120,6 +123,6 @@
 }
 
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
 void RunAction::saveHisto()
 {
@@ -133,6 +136,6 @@
 }
 
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
 void RunAction::SetBinSize(G4double size)
 {
@@ -180,6 +183,7 @@
   G4Material* material = detector->GetAbsorMaterial();
   G4double density = material->GetDensity();
-   
-  G4String particle = kinematic->GetParticleGun()->GetParticleDefinition()->GetParticleName();    
+  const G4ParticleDefinition* part = 
+    kinematic->GetParticleGun()->GetParticleDefinition();
+  G4String particle = part->GetParticleName();    
   G4double energy = kinematic->GetParticleGun()->GetParticleEnergy();
 
@@ -209,5 +213,5 @@
   calc.SetVerbose(0);
   G4int i;
-  for(i = 0; i < 100; i++) {
+  for(i = 0; i < 100; ++i) {
     ekin[i] = std::pow(10., 0.1*G4double(i)) * keV;
     dedxproton[i] = calc.ComputeElectronicDEDX(ekin[i], "proton",  material->GetName());
@@ -215,5 +219,5 @@
   }
 
-  if(GetVerbose() > 1){
+  if(GetVerbose() > 0){
     G4cout << "### Stopping Powers" << G4endl;
     for(i=0; i<100; i++) {
@@ -223,5 +227,5 @@
     }
   };
-
+  G4cout << "### End of stopping power table" << G4endl;
 #ifdef G4ANALYSIS_USE
   // normalize histogram
@@ -234,6 +238,5 @@
 	};
 
-
-  for(i=0; i<100; i++) {
+  for(i=0; i<100; ++i) {
     G4double e = std::log10(ekin[i] / MeV) + 0.05;
     histo[1]->fill(e, dedxproton[i]);
Index: trunk/examples/extended/exoticphysics/monopole/src/RunActionMessenger.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/RunActionMessenger.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/RunActionMessenger.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: RunActionMessenger.cc,v 1.1 2007/08/16 10:32:04 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/exoticphysics/monopole/src/SteppingAction.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/SteppingAction.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/SteppingAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: SteppingAction.cc,v 1.2 2007/12/10 16:28:17 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/exoticphysics/monopole/src/TrackingAction.cc
===================================================================
--- trunk/examples/extended/exoticphysics/monopole/src/TrackingAction.cc	(revision 1230)
+++ trunk/examples/extended/exoticphysics/monopole/src/TrackingAction.cc	(revision 1337)
@@ -25,5 +25,5 @@
 //
 // $Id: TrackingAction.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
 //
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
