Index: trunk/source/processes/decay/include/G4DecayProcessType.hh
===================================================================
--- trunk/source/processes/decay/include/G4DecayProcessType.hh	(revision 966)
+++ trunk/source/processes/decay/include/G4DecayProcessType.hh	(revision 966)
@@ -0,0 +1,52 @@
+//
+// ********************************************************************
+// * 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: G4DecayProcessType.hh,v 1.2 2008/09/19 03:19:53 kurasige Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+//
+//---------------------------------------------------------------
+//
+// G4DecayProcessType.hh
+//
+// Class Description:
+//   This is an enumerator to define process sub type for decay
+//
+//
+//---------------------------------------------------------------
+
+#ifndef G4DecayProcessType_h
+#define G4DecayProcessType_h 1
+
+enum G4DecayProcessType
+{
+  DECAY = 201 ,
+  DECAY_WithSpin ,
+  DECAY_PionMakeSpin ,
+  DECAY_Unknown = 211,
+  DECAY_External = 231
+};
+#endif
Index: trunk/source/processes/decay/tests/test01/GNUmakefile
===================================================================
--- trunk/source/processes/decay/tests/test01/GNUmakefile	(revision 966)
+++ trunk/source/processes/decay/tests/test01/GNUmakefile	(revision 966)
@@ -0,0 +1,23 @@
+# $Id: GNUmakefile,v 1.1 2001/02/08 08:41:36 kurasige Exp $
+# --------------------------------------------------------------
+# GNUmakefile for tests module.  Gabriele Cosmo, 27/06/98.
+# --------------------------------------------------------------
+
+name := decay_test_01
+G4TARGET := $(name)
+G4EXLIB := true
+
+ifndef G4INSTALL
+  G4INSTALL = ../../../../..
+endif
+
+.PHONY: all tools
+ 
+
+all: lib bin
+
+include $(G4INSTALL)/config/binmake.gmk
+
+CXXFLAGS_WITHOUT_O := $(filter-out -O% , $(CXXFLAGS))
+CXXFLAGS_WITHOUT_O := $(filter-out +O% , $(CXXFLAGS_WITHOUT_O))
+
Index: trunk/source/processes/decay/tests/test01/History
===================================================================
--- trunk/source/processes/decay/tests/test01/History	(revision 966)
+++ trunk/source/processes/decay/tests/test01/History	(revision 966)
@@ -0,0 +1,23 @@
+$Id: History,v 1.2 2007/05/07 10:12:29 kurasige Exp $
+-------------------------------------------------------------------
+
+     =========================================================
+     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
+     =========================================================
+
+                    Decay Test 01 History file
+                    --------------------
+This file should be used by the test developer to briefly
+summarize all major modifications introduced in the code and keep
+track of all tags.
+
+     ----------------------------------------------------------
+     * Reverse chronological order (last date on top), please *
+     ----------------------------------------------------------
+May 07, 07 H.Kurashige
+- Modified to fit with geant4-08-02
+
+
+Feb 08, 01 H. Kurashige
+- Created.
+
Index: trunk/source/processes/decay/tests/test01/NMake
===================================================================
--- trunk/source/processes/decay/tests/test01/NMake	(revision 966)
+++ trunk/source/processes/decay/tests/test01/NMake	(revision 966)
@@ -0,0 +1,40 @@
+
+This_macros = \
+bin="$(G4WORKDIR)\bin\$$(CONFIG)"\
+mgr=..\mgr\
+app=.\
+test_CPPFLAGS="/I ./include"\
+rogue_CPPFLAGS="/I $(RWBASE)"\
+librwtool="$(RWBASE)\vc\librwtool.lib"\
+CLHEP_CPPFLAGS="/I $(CLHEPHOME)"\
+libCLHEP="$(CLHEPHOME)\vc\libCLHEP.lib"\
+libG4global="$(G4WORKDIR)\lib\$$(CONFIG)\libG4global.lib"\
+libG4intercoms="$(G4WORKDIR)\lib\$$(CONFIG)\libG4intercoms.lib"\
+libG4graphics_reps="$(G4WORKDIR)\lib\$$(CONFIG)\libG4graphics_reps.lib"\
+libG4geometry="$(G4WORKDIR)\lib\$$(CONFIG)\libG4geometry.lib"\
+libG4digits_hits="$(G4WORKDIR)\lib\$$(CONFIG)\libG4digits_hits.lib"\
+libG4materials="$(G4WORKDIR)\lib\$$(CONFIG)\libG4materials.lib"\
+libG4event="$(G4WORKDIR)\lib\$$(CONFIG)\libG4event.lib"\
+libG4particles="$(G4WORKDIR)\lib\$$(CONFIG)\libG4particles.lib"\
+libG4processes="$(G4WORKDIR)\lib\$$(CONFIG)\libG4processes.lib"\
+libG4track="$(G4WORKDIR)\lib\$$(CONFIG)\libG4track.lib"\
+libG4tracking="$(G4WORKDIR)\lib\$$(CONFIG)\libG4tracking.lib"\
+libG4interfaces="$(G4WORKDIR)\lib\$$(CONFIG)\libG4interfaces.lib"\
+libG4run="$(G4WORKDIR)\lib\$$(CONFIG)\libG4run.lib"\
+libdecay_test_01="$(G4WORKDIR)\bin\$$(CONFIG)\libdecay_test_01.lib"\
+Inventor_CPPFLAGS="$(OIVFLAGS)"\
+ATLAS_CPPFLAGS="/I $(G4ATLAS)\include /DATLAS"\
+libG4ATLAS="$(G4WORKDIR)\lib\$$(CONFIG)\libG4ATLAS.lib"\
+libWin="user32.lib"
+
+#test_CPPFLAGS="/I ./include /DG4INTY_BUILD_WIN32 /DG4UI_BUILD_WIN32_SESSION /DG4VIS_BUILD_OI_DRIVER /DG4VIS_BUILD_OIWIN32_DRIVER /DG4VIS_USE /DG4INTY_USE_WIN32 /DG4UI_USE_WIN32 /DG4VIS_USE_OIWIN32"
+#libInventor="$(OIVLIBS)"\
+#libGL="opengl32.lib"\
+#libGLU="glu32.lib"\
+#libG4visualization="$(G4WORKDIR)\lib\$$(CONFIG)\libG4visualization.lib"\
+#libWin="/subsystem:windows gdi32.lib user32.lib"
+
+!include $(G4INSTALL)\tests\tools\NT\Config.nmk
+
+This_needed :
+
Index: trunk/source/processes/decay/tests/test01/README
===================================================================
--- trunk/source/processes/decay/tests/test01/README	(revision 966)
+++ trunk/source/processes/decay/tests/test01/README	(revision 966)
@@ -0,0 +1,10 @@
+$Id: README,v 1.1 2001/02/08 08:41:37 kurasige Exp $
+-------------------------------------------------------------------
+
+     =========================================================
+     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
+     =========================================================
+
+                            Decay Test 01
+                            ------
+
Index: trunk/source/processes/decay/tests/test01/decay_test_01.cc
===================================================================
--- trunk/source/processes/decay/tests/test01/decay_test_01.cc	(revision 966)
+++ trunk/source/processes/decay/tests/test01/decay_test_01.cc	(revision 966)
@@ -0,0 +1,80 @@
+//
+// ********************************************************************
+// * 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: decay_test_01.cc,v 1.4 2007/05/07 10:12:29 kurasige Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+
+#include "Tst01DetectorConstruction.hh"
+#include "Tst01RunAction.hh"
+#include "Tst01PrimaryGeneratorAction.hh"
+#include "Tst01PhysicsList.hh"
+
+#include "G4UImanager.hh"
+#include "G4UIterminal.hh"
+#include "G4RunManager.hh"
+
+#include "G4ios.hh"
+
+int main(int argc,char** argv) {
+
+ // Set the default random engine to RanecuEngine
+  CLHEP::RanecuEngine defaultEngine;
+  CLHEP::HepRandom::setTheEngine(&defaultEngine);
+
+  // Run manager
+  G4RunManager * runManager = new G4RunManager;
+
+  // UserInitialization classes
+  runManager->SetUserInitialization(new Tst01DetectorConstruction);
+  runManager->SetUserInitialization(new Tst01PhysicsList);
+
+  // UserAction classes
+  runManager->SetUserAction(new Tst01RunAction);
+  runManager->SetUserAction(new Tst01PrimaryGeneratorAction);
+
+  if(argc==1)
+  {
+    // G4UIterminal is a (dumb) terminal.
+    G4UIsession* session = new G4UIterminal;
+    session->SessionStart();
+    delete session;
+  }
+  else
+  {
+    G4UImanager* UImanager = G4UImanager::GetUIpointer();
+    G4String command = "/control/execute ";
+    G4String fileName = argv[1];
+    UImanager->ApplyCommand(command+fileName);
+  }
+
+  delete runManager;
+  return 0;
+}
+
+
+
+
Index: trunk/source/processes/decay/tests/test01/decay_test_01.in
===================================================================
--- trunk/source/processes/decay/tests/test01/decay_test_01.in	(revision 966)
+++ trunk/source/processes/decay/tests/test01/decay_test_01.in	(revision 966)
@@ -0,0 +1,7 @@
+/run/initialize
+/gun/energy 1 MeV
+/tracking/verbose 1
+/gun/decayTime 1.0 ns
+/run/beamOn 1
+/gun/decayTime 10.0 ns
+/run/beamOn 1
Index: trunk/source/processes/decay/tests/test01/include/Tst01DetectorConstruction.hh
===================================================================
--- trunk/source/processes/decay/tests/test01/include/Tst01DetectorConstruction.hh	(revision 966)
+++ trunk/source/processes/decay/tests/test01/include/Tst01DetectorConstruction.hh	(revision 966)
@@ -0,0 +1,52 @@
+//
+// ********************************************************************
+// * 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: Tst01DetectorConstruction.hh,v 1.3 2006/06/29 19:31:44 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+
+#ifndef Tst01DetectorConstruction_h
+#define Tst01DetectorConstruction_h 1
+
+class G4VPhysicalVolume;
+class G4LogicalVolume;
+class G4Material;
+
+#include "G4VUserDetectorConstruction.hh"
+#include "globals.hh"
+
+class Tst01DetectorConstruction : public G4VUserDetectorConstruction
+{
+  public:
+    Tst01DetectorConstruction();
+    ~Tst01DetectorConstruction();
+
+  public:
+     G4VPhysicalVolume* Construct();
+};
+
+#endif
+
Index: trunk/source/processes/decay/tests/test01/include/Tst01GeneralPhysics.hh
===================================================================
--- trunk/source/processes/decay/tests/test01/include/Tst01GeneralPhysics.hh	(revision 966)
+++ trunk/source/processes/decay/tests/test01/include/Tst01GeneralPhysics.hh	(revision 966)
@@ -0,0 +1,80 @@
+//
+// ********************************************************************
+// * 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: Tst01GeneralPhysics.hh,v 1.3 2006/06/29 19:31:46 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+// 
+// ------------------------------------------------------------
+//	GEANT 4 class header file 
+// Class Description:
+//      This class is an derived class of G4VPhysicsConstructor
+//
+// ------------------------------------------- 
+//	History
+//        first version                   12 Nov. 2000 by H.Kurashige 
+// ------------------------------------------------------------
+#ifndef Tst01GeneralPhysics_h
+#define Tst01GeneralPhysics_h 1
+
+#include "globals.hh"
+#include "G4ios.hh"
+
+#include "G4VPhysicsConstructor.hh"
+
+
+#include "G4Decay.hh"
+
+class Tst01GeneralPhysics : public G4VPhysicsConstructor
+{
+  public: 
+    Tst01GeneralPhysics(const G4String& name = "general");
+    virtual ~Tst01GeneralPhysics();
+
+  public: 
+    // This method will be invoked in the Construct() method. 
+    // each particle type will be instantiated
+    virtual void ConstructParticle();
+ 
+    // This method will be invoked in the Construct() method.
+    // each physics process will be instantiated and
+    // registered to the process manager of each particle type 
+    virtual void ConstructProcess();
+
+  protected:
+    G4Decay fDecayProcess;
+};
+
+
+#endif
+
+
+
+
+
+
+
+
Index: trunk/source/processes/decay/tests/test01/include/Tst01ParticleGun.hh
===================================================================
--- trunk/source/processes/decay/tests/test01/include/Tst01ParticleGun.hh	(revision 966)
+++ trunk/source/processes/decay/tests/test01/include/Tst01ParticleGun.hh	(revision 966)
@@ -0,0 +1,103 @@
+//
+// ********************************************************************
+// * 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: Tst01ParticleGun.hh,v 1.4 2006/06/29 19:31:48 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+
+#ifndef Tst01ParticleGun_h
+#define Tst01ParticleGun_h 1
+
+
+#include "globals.hh"
+#include "G4ParticleGun.hh"
+#include "G4PrimaryParticle.hh"
+#include <vector>
+
+class G4Event;
+class G4DecayProducts;
+
+class Tst01ParticleGunMessenger;
+
+class Tst01ParticleGun : public G4ParticleGun
+{
+  public:
+    Tst01ParticleGun();
+    Tst01ParticleGun(G4int numberofparticles);
+    Tst01ParticleGun(G4ParticleDefinition * particleDef, 
+                   G4int numberofparticles = 1);
+
+  public:
+    virtual ~Tst01ParticleGun();
+    Tst01ParticleGun(const Tst01ParticleGun &right);
+
+    const Tst01ParticleGun & operator=(const Tst01ParticleGun &right);
+
+  public:
+    void GeneratePrimaryVertex(G4Event* evt);
+    void SetDecayProperTime(G4double t);
+    void AddDaughter(const G4PrimaryParticle *daughter);
+
+  public:
+    G4double GetDecayProperTime() const;
+
+  protected:  
+    virtual              void SetInitialValues();
+    G4double             particle_decay_time;
+
+    std::vector<const G4PrimaryParticle*>  decay_products;  
+
+  private:
+    Tst01ParticleGunMessenger* theMessenger;
+};
+
+ 
+inline
+ void Tst01ParticleGun::SetDecayProperTime(G4double t)
+{
+  particle_decay_time = t;
+}
+
+inline
+ G4double  Tst01ParticleGun::GetDecayProperTime() const
+{
+  return particle_decay_time;
+}
+
+inline 
+ void Tst01ParticleGun::AddDaughter(const G4PrimaryParticle *daughter)
+{
+    decay_products.push_back(daughter);
+}
+
+#endif
+
+
+
+
+
+
+
Index: trunk/source/processes/decay/tests/test01/include/Tst01ParticleGunMessenger.hh
===================================================================
--- trunk/source/processes/decay/tests/test01/include/Tst01ParticleGunMessenger.hh	(revision 966)
+++ trunk/source/processes/decay/tests/test01/include/Tst01ParticleGunMessenger.hh	(revision 966)
@@ -0,0 +1,72 @@
+//
+// ********************************************************************
+// * 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: Tst01ParticleGunMessenger.hh,v 1.3 2006/06/29 19:31:50 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+// 
+
+#ifndef Tst01ParticleGunMessenger_h
+#define Tst01ParticleGunMessenger_h 1
+
+class Tst01ParticleGun;
+
+class G4ParticleTable;
+class G4UIcommand;
+class G4UIcmdWithADoubleAndUnit;
+
+#include "G4UImessenger.hh"
+#include "globals.hh"
+
+
+class Tst01ParticleGunMessenger: public  G4UImessenger
+{
+  public:
+    Tst01ParticleGunMessenger(Tst01ParticleGun * fPtclGun);
+    ~Tst01ParticleGunMessenger();
+    
+  public:
+    void SetNewValue(G4UIcommand * command,G4String newValues);
+    G4String GetCurrentValue(G4UIcommand * command);
+
+  private:
+    Tst01ParticleGun*   fParticleGun;
+    G4ParticleTable*    particleTable;
+
+  private: //commands
+    G4UIcmdWithADoubleAndUnit * properTimeCmd;
+  
+};
+
+#endif
+
+
+
+
+
+
+
+
Index: trunk/source/processes/decay/tests/test01/include/Tst01PhysicsList.hh
===================================================================
--- trunk/source/processes/decay/tests/test01/include/Tst01PhysicsList.hh	(revision 966)
+++ trunk/source/processes/decay/tests/test01/include/Tst01PhysicsList.hh	(revision 966)
@@ -0,0 +1,48 @@
+//
+// ********************************************************************
+// * 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.          *
+// ********************************************************************
+//
+#ifndef Tst01PhysicsList_h
+#define Tst01PhysicsList_h 1
+
+#include "G4VModularPhysicsList.hh"
+#include "globals.hh"
+
+class Tst01PhysicsList: public G4VModularPhysicsList
+{
+public:
+  Tst01PhysicsList();
+  virtual ~Tst01PhysicsList();
+  
+public:
+  // SetCuts() 
+  virtual void SetCuts();
+
+};
+
+
+#endif
+
+
+
Index: trunk/source/processes/decay/tests/test01/include/Tst01PrimaryGeneratorAction.hh
===================================================================
--- trunk/source/processes/decay/tests/test01/include/Tst01PrimaryGeneratorAction.hh	(revision 966)
+++ trunk/source/processes/decay/tests/test01/include/Tst01PrimaryGeneratorAction.hh	(revision 966)
@@ -0,0 +1,54 @@
+//
+// ********************************************************************
+// * 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: Tst01PrimaryGeneratorAction.hh,v 1.3 2006/06/29 19:31:54 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+
+#ifndef Tst01PrimaryGeneratorAction_h
+#define Tst01PrimaryGeneratorAction_h 1
+
+#include "G4VUserPrimaryGeneratorAction.hh"
+
+class Tst01ParticleGun;
+class G4Event;
+
+class Tst01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
+{
+  public:
+    Tst01PrimaryGeneratorAction();
+    ~Tst01PrimaryGeneratorAction();
+
+  public:
+    void GeneratePrimaries(G4Event* anEvent);
+
+  private:
+    Tst01ParticleGun* particleGun;
+};
+
+#endif
+
+
Index: trunk/source/processes/decay/tests/test01/include/Tst01RunAction.hh
===================================================================
--- trunk/source/processes/decay/tests/test01/include/Tst01RunAction.hh	(revision 966)
+++ trunk/source/processes/decay/tests/test01/include/Tst01RunAction.hh	(revision 966)
@@ -0,0 +1,55 @@
+//
+// ********************************************************************
+// * 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: Tst01RunAction.hh,v 1.3 2006/06/29 19:31:56 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+
+#ifndef Tst01RunAction_h
+#define Tst01RunAction_h 1
+
+#include "G4UserRunAction.hh"
+#include "globals.hh"
+#include "G4Timer.hh"
+
+class G4Run;
+
+class Tst01RunAction : public G4UserRunAction
+{
+  public:
+    Tst01RunAction();
+    ~Tst01RunAction();
+
+  public:
+    void BeginOfRunAction(const G4Run* aRun);
+    void EndOfRunAction(const G4Run* aRun);
+  
+  private:
+    G4Timer  ftimer;
+};
+
+#endif
+
Index: trunk/source/processes/decay/tests/test01/src/Tst01DetectorConstruction.cc
===================================================================
--- trunk/source/processes/decay/tests/test01/src/Tst01DetectorConstruction.cc	(revision 966)
+++ trunk/source/processes/decay/tests/test01/src/Tst01DetectorConstruction.cc	(revision 966)
@@ -0,0 +1,67 @@
+//
+// ********************************************************************
+// * 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: Tst01DetectorConstruction.cc,v 1.3 2006/06/29 19:31:58 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+
+#include "Tst01DetectorConstruction.hh"
+
+#include "G4Material.hh"
+#include "G4MaterialTable.hh"
+#include "G4Element.hh"
+#include "G4ElementTable.hh"
+#include "G4Box.hh"
+#include "G4LogicalVolume.hh"
+#include "G4ThreeVector.hh"
+#include "G4PVPlacement.hh"
+#include "G4UImanager.hh"
+#include "G4ios.hh"
+
+Tst01DetectorConstruction::Tst01DetectorConstruction()
+{
+}
+
+Tst01DetectorConstruction::~Tst01DetectorConstruction()
+{
+}
+
+
+
+G4VPhysicalVolume* Tst01DetectorConstruction::Construct()
+{ 
+  G4double density     = universe_mean_density;    //from PhysicalConstants.h
+  G4double pressure    = 3.e-18*pascal;
+  G4double temperature = 2.73*kelvin;
+  G4Material* vacuum = new G4Material("Vacuum", 1., 1.01*g/mole, density,kStateGas,temperature,pressure);
+
+  G4Box * mySimpleBox = new G4Box("SBox", 1.0*km, 1.0*km, 1.0*km);
+  G4LogicalVolume * simpleBoxLog = new G4LogicalVolume( mySimpleBox,vacuum ,"SLog",0,0,0);
+  G4VPhysicalVolume* simpleBoxDetector = new G4PVPlacement(0,G4ThreeVector(),"SPhys",simpleBoxLog,0,false,0);
+
+  return simpleBoxDetector;
+}
+
Index: trunk/source/processes/decay/tests/test01/src/Tst01GeneralPhysics.cc
===================================================================
--- trunk/source/processes/decay/tests/test01/src/Tst01GeneralPhysics.cc	(revision 966)
+++ trunk/source/processes/decay/tests/test01/src/Tst01GeneralPhysics.cc	(revision 966)
@@ -0,0 +1,113 @@
+//
+// ********************************************************************
+// * 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: Tst01GeneralPhysics.cc,v 1.4 2006/06/29 19:32:00 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+// 
+
+#include "Tst01GeneralPhysics.hh"
+
+#include "globals.hh"
+#include "G4ios.hh"
+#include <iomanip>   
+
+Tst01GeneralPhysics::Tst01GeneralPhysics(const G4String& name)
+                     :  G4VPhysicsConstructor(name)
+{
+}
+
+Tst01GeneralPhysics::~Tst01GeneralPhysics()
+{
+}
+
+#include "G4ParticleDefinition.hh"
+#include "G4ProcessManager.hh"
+
+#include "G4Gamma.hh"
+
+#include "G4Electron.hh"
+#include "G4Positron.hh"
+#include "G4MuonMinus.hh"
+#include "G4MuonPlus.hh"
+
+#include "G4NeutrinoE.hh"
+#include "G4AntiNeutrinoE.hh"
+#include "G4NeutrinoMu.hh"
+#include "G4AntiNeutrinoMu.hh"
+
+#include "G4Proton.hh"
+#include "G4AntiProton.hh"
+#include "G4Neutron.hh"
+#include "G4AntiNeutron.hh"
+
+#include "G4MesonConstructor.hh"
+
+void Tst01GeneralPhysics::ConstructParticle()
+{
+   // gamma
+  G4Gamma::GammaDefinition();
+ 
+  // electron
+  G4Electron::ElectronDefinition();
+  G4Positron::PositronDefinition();
+  G4NeutrinoE::NeutrinoEDefinition();
+  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
+
+  // muon
+  G4MuonMinus::MuonMinusDefinition();
+  G4MuonPlus::MuonPlusDefinition();
+  G4NeutrinoMu::NeutrinoMuDefinition();
+  G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
+ 
+  // nucleon
+  G4Proton::ProtonDefinition();
+  G4Neutron::NeutronDefinition();
+  G4AntiProton::AntiProtonDefinition();
+  G4AntiNeutron::AntiNeutronDefinition();
+
+  //  Construct all mesons
+  G4MesonConstructor pMesonConstructor;
+  pMesonConstructor.ConstructParticle();
+}
+
+void Tst01GeneralPhysics::ConstructProcess()
+{
+  // Add Decay Process
+  theParticleIterator->reset();
+  while( (*theParticleIterator)() ){
+    G4ParticleDefinition* particle = theParticleIterator->value();
+    G4ProcessManager* pmanager = particle->GetProcessManager();
+    if (fDecayProcess.IsApplicable(*particle)) { 
+      pmanager ->AddProcess(&fDecayProcess);
+      // set ordering for PostStepDoIt and AtRestDoIt
+      pmanager ->SetProcessOrdering(&fDecayProcess, idxPostStep);
+      pmanager ->SetProcessOrdering(&fDecayProcess, idxAtRest);
+    }
+  }
+}
+
+
Index: trunk/source/processes/decay/tests/test01/src/Tst01ParticleGun.cc
===================================================================
--- trunk/source/processes/decay/tests/test01/src/Tst01ParticleGun.cc	(revision 966)
+++ trunk/source/processes/decay/tests/test01/src/Tst01ParticleGun.cc	(revision 966)
@@ -0,0 +1,151 @@
+//
+// ********************************************************************
+// * 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: Tst01ParticleGun.cc,v 1.6 2008/10/24 15:24:16 kurasige Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+
+// G4ParticleGun
+#include "Tst01ParticleGun.hh"
+#include "Tst01ParticleGunMessenger.hh"
+#include "G4Event.hh"
+
+
+
+Tst01ParticleGun::Tst01ParticleGun()
+                :G4ParticleGun()
+{
+  SetInitialValues();
+}
+
+
+Tst01ParticleGun::Tst01ParticleGun(G4int )
+                 :G4ParticleGun(1)
+{
+  SetInitialValues();
+}
+
+
+Tst01ParticleGun::Tst01ParticleGun(G4ParticleDefinition * particleDef, 
+				   G4int )
+                 :G4ParticleGun(particleDef, 1)  
+{
+  SetInitialValues();
+}
+
+
+Tst01ParticleGun::~Tst01ParticleGun()
+{
+  while (!decay_products.empty()){
+    G4PrimaryParticle* particle = (G4PrimaryParticle*)(decay_products.back());
+    decay_products.pop_back();
+    delete particle;
+  }
+}
+    
+Tst01ParticleGun::Tst01ParticleGun(const Tst01ParticleGun &right)
+  : G4ParticleGun()
+{
+  *this = right;
+}
+
+
+const Tst01ParticleGun & Tst01ParticleGun::operator=(const Tst01ParticleGun &right)
+{
+  if ( this == &right) return *this;
+  NumberOfParticlesToBeGenerated = right.NumberOfParticlesToBeGenerated;
+  particle_definition = right.particle_definition;
+  particle_momentum_direction = right.particle_momentum_direction; 
+  particle_energy = right.particle_energy;
+  particle_charge = right.particle_charge;
+  particle_polarization = right.particle_polarization;
+  particle_decay_time  =  right.particle_decay_time;
+  decay_products.clear();
+  return *this;
+}
+
+void Tst01ParticleGun::GeneratePrimaryVertex(G4Event* evt)
+{
+  if(particle_definition==NULL) return;
+
+  // create a new vertex
+  G4PrimaryVertex* vertex = 
+    new G4PrimaryVertex(particle_position,particle_time);
+
+  // create new primaries and set them to the vertex
+  G4double mass =  particle_definition->GetPDGMass();
+  G4double energy = particle_energy + mass;
+  G4double pmom = std::sqrt(energy*energy-mass*mass);
+  G4double px = pmom*particle_momentum_direction.x();
+  G4double py = pmom*particle_momentum_direction.y();
+  G4double pz = pmom*particle_momentum_direction.z();
+ 
+  G4PrimaryParticle* particle =
+    new G4PrimaryParticle(particle_definition,px,py,pz);
+  particle->SetMass( mass );
+  particle->SetCharge( particle_charge );
+  particle->SetPolarization(particle_polarization.x(),
+			    particle_polarization.y(),
+			    particle_polarization.z());
+  if (particle_decay_time>=0.) particle->SetProperTime(particle_decay_time);
+  while (!decay_products.empty()){
+    G4PrimaryParticle* daughter = (G4PrimaryParticle*)(decay_products.back());
+    decay_products.pop_back();
+    particle->SetDaughter(daughter);
+  }
+  vertex->SetPrimary( particle );
+
+  evt->AddPrimaryVertex( vertex );
+}
+
+
+void Tst01ParticleGun::SetInitialValues()
+{
+  NumberOfParticlesToBeGenerated = 1;
+  particle_definition = NULL;
+  G4ThreeVector zero;
+  particle_momentum_direction = (G4ParticleMomentum)zero;
+  particle_energy = 0.0;
+  particle_position = zero;
+  particle_time = 0.0;
+  particle_polarization = zero;
+  particle_charge = 0.0;
+
+  particle_decay_time = -1.0;
+
+  theMessenger = new Tst01ParticleGunMessenger(this);
+}
+
+
+
+
+
+
+
+
+
+
+
Index: trunk/source/processes/decay/tests/test01/src/Tst01ParticleGunMessenger.cc
===================================================================
--- trunk/source/processes/decay/tests/test01/src/Tst01ParticleGunMessenger.cc	(revision 966)
+++ trunk/source/processes/decay/tests/test01/src/Tst01ParticleGunMessenger.cc	(revision 966)
@@ -0,0 +1,74 @@
+//
+// ********************************************************************
+// * 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: Tst01ParticleGunMessenger.cc,v 1.3 2006/06/29 19:32:04 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+
+#include "Tst01ParticleGunMessenger.hh"
+#include "Tst01ParticleGun.hh"
+#include "G4ParticleTable.hh"
+#include "G4UIcmdWithADoubleAndUnit.hh"
+
+#include "G4ios.hh"
+
+
+Tst01ParticleGunMessenger::Tst01ParticleGunMessenger(Tst01ParticleGun * fPtclGun)
+  :fParticleGun(fPtclGun)
+{
+  particleTable = G4ParticleTable::GetParticleTable();
+
+  properTimeCmd= new G4UIcmdWithADoubleAndUnit("/gun/decayTime",this);
+  properTimeCmd->SetGuidance("Set pre-assigned decay time.");
+  properTimeCmd->SetParameterName("t",true,true);
+  properTimeCmd->SetDefaultUnit("ns");
+  properTimeCmd->SetRange("t>=0.");
+}
+
+Tst01ParticleGunMessenger::~Tst01ParticleGunMessenger()
+{
+  delete properTimeCmd;
+}
+
+void Tst01ParticleGunMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
+{
+  if( command==properTimeCmd ){
+    fParticleGun->SetDecayProperTime(properTimeCmd->GetNewDoubleValue(newValues)); 
+  }
+}
+
+G4String Tst01ParticleGunMessenger::GetCurrentValue(G4UIcommand * command)
+{
+  G4String cv;
+  
+  if( command==properTimeCmd ){
+    cv = properTimeCmd ->ConvertToString(fParticleGun->GetDecayProperTime(),"ns"); 
+  }    
+  return cv;
+}
+
+
+
Index: trunk/source/processes/decay/tests/test01/src/Tst01PhysicsList.cc
===================================================================
--- trunk/source/processes/decay/tests/test01/src/Tst01PhysicsList.cc	(revision 966)
+++ trunk/source/processes/decay/tests/test01/src/Tst01PhysicsList.cc	(revision 966)
@@ -0,0 +1,70 @@
+//
+// ********************************************************************
+// * 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: Tst01PhysicsList.cc,v 1.4 2006/06/29 19:32:06 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+// 
+
+#include "Tst01PhysicsList.hh"
+
+#include "globals.hh"
+#include "G4ParticleDefinition.hh"
+#include "G4ParticleWithCuts.hh"
+#include "G4ProcessManager.hh"
+#include "G4ProcessVector.hh"
+#include "G4ParticleTypes.hh"
+#include "G4ParticleTable.hh"
+
+#include "G4ios.hh"
+#include <iomanip>   
+
+#include "Tst01GeneralPhysics.hh"
+
+Tst01PhysicsList::Tst01PhysicsList():  G4VModularPhysicsList()
+{
+  // default cut value  (1.0mm) 
+  defaultCutValue = 1.0*mm;
+  SetVerboseLevel(1);
+
+  // General Physics
+  RegisterPhysics( new Tst01GeneralPhysics("general") );
+
+}
+
+Tst01PhysicsList::~Tst01PhysicsList()
+{
+}
+
+void Tst01PhysicsList::SetCuts()
+{
+  //  " G4VUserPhysicsList::SetCutsWithDefault" method sets 
+  //   the default cut value for all particle types 
+  SetCutsWithDefault();   
+}
+
+
+
Index: trunk/source/processes/decay/tests/test01/src/Tst01PrimaryGeneratorAction.cc
===================================================================
--- trunk/source/processes/decay/tests/test01/src/Tst01PrimaryGeneratorAction.cc	(revision 966)
+++ trunk/source/processes/decay/tests/test01/src/Tst01PrimaryGeneratorAction.cc	(revision 966)
@@ -0,0 +1,67 @@
+//
+// ********************************************************************
+// * 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: Tst01PrimaryGeneratorAction.cc,v 1.3 2006/06/29 19:32:08 gunter Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+
+#include "Tst01PrimaryGeneratorAction.hh"
+
+#include "G4Event.hh"
+#include "Tst01ParticleGun.hh"
+#include "G4ParticleTable.hh"
+#include "G4ParticleDefinition.hh"
+#include "globals.hh"
+
+Tst01PrimaryGeneratorAction::Tst01PrimaryGeneratorAction()
+{
+  G4int n_particle = 1;
+  particleGun = new Tst01ParticleGun(n_particle);
+
+// default particle
+
+  G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
+  G4String particleName;
+  G4ParticleDefinition* particle 
+    = particleTable->FindParticle(particleName="mu-");
+  particleGun->SetParticleDefinition(particle);
+  particleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
+  particleGun->SetParticleEnergy(1.*GeV);
+  particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,0.*cm));
+
+}
+
+Tst01PrimaryGeneratorAction::~Tst01PrimaryGeneratorAction()
+{
+  delete particleGun;
+}
+
+void Tst01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
+{
+  particleGun->GeneratePrimaryVertex(anEvent);
+}
+
+
Index: trunk/source/processes/decay/tests/test01/src/Tst01RunAction.cc
===================================================================
--- trunk/source/processes/decay/tests/test01/src/Tst01RunAction.cc	(revision 966)
+++ trunk/source/processes/decay/tests/test01/src/Tst01RunAction.cc	(revision 966)
@@ -0,0 +1,55 @@
+//
+// ********************************************************************
+// * 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: Tst01RunAction.cc,v 1.4 2008/10/24 15:24:16 kurasige Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
+//
+
+#include "Tst01RunAction.hh"
+
+#include "G4Run.hh"
+#include "G4UImanager.hh"
+#include "G4ios.hh"
+
+Tst01RunAction::Tst01RunAction()
+{
+}
+
+Tst01RunAction::~Tst01RunAction()
+{
+}
+
+void Tst01RunAction::BeginOfRunAction(const G4Run* )
+{
+  ftimer.Start();
+}
+
+void Tst01RunAction::EndOfRunAction(const G4Run* )
+{
+   ftimer.Stop();
+   G4cout << ftimer <<G4endl;
+}
+
