Index: trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01DetectorConstruction.hh
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01DetectorConstruction.hh	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01DetectorConstruction.hh	(revision 1316)
@@ -0,0 +1,68 @@
+//
+// ********************************************************************
+// * 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 TstDrawVox01DetectorConstruction_h
+#define TstDrawVox01DetectorConstruction_h 1
+
+class G4VPhysicalVolume;
+class G4LogicalVolume;
+class G4Material;
+class TstDrawVox01DetectorMessenger;
+
+#include "G4VUserDetectorConstruction.hh"
+#include "globals.hh"
+
+class TstDrawVox01DetectorConstruction : public G4VUserDetectorConstruction
+{
+  public:
+    TstDrawVox01DetectorConstruction();
+    ~TstDrawVox01DetectorConstruction();
+
+  public:
+     G4VPhysicalVolume* Construct();
+     void SwitchDetector();
+     void SelectDetector(G4String val);
+     void SelectMaterial(G4String val);
+
+  private:
+     G4VPhysicalVolume* SelectDetector();
+     void ConstructDetectors();
+     void SelectMaterialPointer();
+
+     G4LogicalVolume*   simpleBoxLog;
+     G4VPhysicalVolume* simpleBoxDetector;
+     G4VPhysicalVolume* honeycombDetector;
+     G4Material* Air;
+     G4Material* Al;
+     G4Material* Pb;
+     G4Material* selectedMaterial;
+     G4int detectorChoice;
+     G4String materialChoice;
+     TstDrawVox01DetectorMessenger * detectorMessenger;
+};
+
+#endif
+
Index: trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01DetectorMessenger.hh
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01DetectorMessenger.hh	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01DetectorMessenger.hh	(revision 1316)
@@ -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.          *
+// ********************************************************************
+//
+
+#ifndef TstDrawVox01DetectorMessenger_h
+#define TstDrawVox01DetectorMessenger_h 1
+
+#include "globals.hh"
+#include "G4UImessenger.hh"
+
+class TstDrawVox01DetectorConstruction;
+class G4UIdirectory;
+class G4UIcmdWithAString;
+
+class TstDrawVox01DetectorMessenger: public G4UImessenger
+{
+  public:
+    TstDrawVox01DetectorMessenger(TstDrawVox01DetectorConstruction * myDC);
+    void SetNewValue(G4UIcommand * command,G4String newValues);
+  private:
+    TstDrawVox01DetectorConstruction * myDetector;
+    G4UIdirectory *      mydetDir;
+    G4UIcmdWithAString * selDetCmd;
+    G4UIcmdWithAString * switchCmd;
+    G4UIcmdWithAString * selMatCmd;
+
+};
+
+#endif
+
Index: trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01PhysicsList.hh
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01PhysicsList.hh	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01PhysicsList.hh	(revision 1316)
@@ -0,0 +1,76 @@
+//
+// ********************************************************************
+// * 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: TstDrawVox01PhysicsList.hh,v 1.4 2006/06/29 18:35:04 gunter Exp $
+// ------------------------------------------------------------
+//	GEANT 4 class header file 
+//
+//      This class is a class derived from G4VUserPhysicsList
+//      for constructing all particles and processes.
+//
+//	History
+//        first version              10  Jan. 1998 by H.Kurashige
+// ------------------------------------------------------------
+#ifndef TstDrawVox01PhysicsList_h
+#define TstDrawVox01PhysicsList_h 1
+
+#include "G4VUserPhysicsList.hh"
+#include "globals.hh"
+
+class TstDrawVox01PhysicsList: public G4VUserPhysicsList
+{
+  public:
+    TstDrawVox01PhysicsList();
+    virtual ~TstDrawVox01PhysicsList();
+
+  protected:
+    // Construct particle and physics
+    virtual void ConstructParticle();
+    virtual void ConstructProcess();
+
+    // 
+    virtual void SetCuts();
+    
+  protected:
+    // these methods Construct particles 
+    virtual void ConstructBosons();
+    virtual void ConstructLeptons();
+    virtual void ConstructMesons();
+    virtual void ConstructBaryons();
+    virtual void ConstructIons();
+
+  protected:
+  // these methods Construct physics processes and register them
+    virtual void ConstructGeneral();
+    virtual void ConstructEM();
+    virtual void ConstructHad();
+    virtual void ConstructLeptHad();
+
+};
+
+#endif
+
+
+
Index: trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01PrimaryGeneratorAction.hh
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01PrimaryGeneratorAction.hh	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01PrimaryGeneratorAction.hh	(revision 1316)
@@ -0,0 +1,65 @@
+//
+// ********************************************************************
+// * 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 TstDrawVox01PrimaryGeneratorAction_h
+#define TstDrawVox01PrimaryGeneratorAction_h 1
+
+#include "G4VUserPrimaryGeneratorAction.hh"
+
+#include "G4VisExtent.hh"
+
+class G4ParticleGun;
+class G4Event;
+class TstDrawVox01PrimaryGeneratorMessenger;
+class G4VPhysicalVolume;
+
+class TstDrawVox01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
+{
+public:
+
+  enum Action {
+    standardGun,
+    randomDirectionGun,
+    randomPositionGun,
+    randomPositionAndDirectionGun
+  };
+
+  TstDrawVox01PrimaryGeneratorAction();
+  ~TstDrawVox01PrimaryGeneratorAction();
+
+public:
+  void GeneratePrimaries(G4Event* anEvent);
+  void SelectPrimaryGeneratorAction (Action);
+
+private:
+  Action generatorAction;
+  G4ParticleGun* particleGun;
+  TstDrawVox01PrimaryGeneratorMessenger* messenger;
+  G4VPhysicalVolume* worldVolume;
+  G4VisExtent worldExtent;
+};
+
+#endif
Index: trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01PrimaryGeneratorMessenger.hh
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01PrimaryGeneratorMessenger.hh	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01PrimaryGeneratorMessenger.hh	(revision 1316)
@@ -0,0 +1,49 @@
+//
+// ********************************************************************
+// * 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 TstDrawVox01PrimaryGeneratorMessenger_h
+#define TstDrawVox01PrimaryGeneratorMessenger_h 1
+
+#include "globals.hh"
+#include "G4UImessenger.hh"
+
+class TstDrawVox01PrimaryGeneratorAction;
+class G4UIcmdWithoutParameter;
+class G4UIcmdWithAString;
+
+class TstDrawVox01PrimaryGeneratorMessenger: public G4UImessenger
+{
+  public:
+    TstDrawVox01PrimaryGeneratorMessenger(TstDrawVox01PrimaryGeneratorAction * myPGA);
+    void SetNewValue(G4UIcommand * command,G4String newValues);
+  private:
+    TstDrawVox01PrimaryGeneratorAction * myPGAction;
+    G4UIcmdWithoutParameter * standardGun;
+    G4UIcmdWithAString * randomGun;
+};
+
+#endif
+
Index: trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01RunAction.hh
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01RunAction.hh	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01RunAction.hh	(revision 1316)
@@ -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 TstDrawVox01RunAction_h
+#define TstDrawVox01RunAction_h 1
+
+#include "G4UserRunAction.hh"
+#include "globals.hh"
+
+class G4Run;
+
+class TstDrawVox01RunAction : public G4UserRunAction
+{
+  public:
+    TstDrawVox01RunAction();
+    virtual ~TstDrawVox01RunAction();
+
+  public:
+    virtual void BeginOfRunAction(const G4Run* aRun);
+    virtual void EndOfRunAction(const G4Run* aRun);
+
+};
+
+#endif
+
Index: trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01SteppingAction.hh
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01SteppingAction.hh	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/include/TstDrawVox01SteppingAction.hh	(revision 1316)
@@ -0,0 +1,51 @@
+//
+// ********************************************************************
+// * 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: TstDrawVox01SteppingAction.hh,v 1.5 2006/06/29 18:35:15 gunter Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
+//
+// 
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+#ifndef TstDrawVox01SteppingAction_h
+#define TstDrawVox01SteppingAction_h 1
+
+#include "G4UserSteppingAction.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+class TstDrawVox01SteppingAction : public G4UserSteppingAction
+{
+  public:
+    TstDrawVox01SteppingAction();
+    virtual ~TstDrawVox01SteppingAction();
+
+    virtual void UserSteppingAction(const G4Step*);
+};
+
+#endif
Index: trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01DetectorConstruction.cc
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01DetectorConstruction.cc	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01DetectorConstruction.cc	(revision 1316)
@@ -0,0 +1,253 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+
+#include "TstDrawVox01DetectorConstruction.hh"
+
+#include "TstDrawVox01DetectorMessenger.hh"
+
+#include "G4Material.hh"
+#include "G4MaterialTable.hh"
+#include "G4Element.hh"
+#include "G4ElementTable.hh"
+#include "G4Box.hh"
+#include "G4Tubs.hh"
+#include "G4LogicalVolume.hh"
+#include "G4ThreeVector.hh"
+#include "G4PVPlacement.hh"
+#include "G4SDManager.hh"
+#include "G4VisAttributes.hh"
+#include "G4Colour.hh"
+#include "G4TransportationManager.hh"
+#include "G4GeometryManager.hh"
+#include "G4StateManager.hh"
+#include "G4UImanager.hh"
+#include "G4ios.hh"
+#include "G4TransportationManager.hh"
+
+
+TstDrawVox01DetectorConstruction::TstDrawVox01DetectorConstruction()
+:simpleBoxLog(0),simpleBoxDetector(0),honeycombDetector(0),
+ Air(0),Al(0),Pb(0),selectedMaterial(0),detectorChoice(0)
+{
+  detectorMessenger = new TstDrawVox01DetectorMessenger(this);
+  materialChoice = "Pb";
+}
+
+TstDrawVox01DetectorConstruction::~TstDrawVox01DetectorConstruction()
+{
+  delete detectorMessenger;
+}
+
+G4VPhysicalVolume* TstDrawVox01DetectorConstruction::Construct()
+{
+  if((!simpleBoxDetector)&&(!honeycombDetector))
+  { ConstructDetectors(); }
+
+  G4VPhysicalVolume* worldVol = 0;
+  switch(detectorChoice)
+  { 
+    case 1:
+      worldVol = honeycombDetector; 
+      break;
+    default:
+      worldVol = simpleBoxDetector;
+  }
+  return worldVol;
+}
+
+void TstDrawVox01DetectorConstruction::SwitchDetector()
+{
+  if((!simpleBoxDetector)&&(!honeycombDetector))
+    ConstructDetectors();
+  
+  switch(detectorChoice)
+  { 
+    case 1:
+      G4TransportationManager::GetTransportationManager()->
+	GetNavigatorForTracking()->SetWorldVolume(honeycombDetector);
+      break;
+    default:
+      G4TransportationManager::GetTransportationManager()->
+	GetNavigatorForTracking()->SetWorldVolume(simpleBoxDetector);
+  }
+}
+
+void TstDrawVox01DetectorConstruction::SelectDetector(G4String val)
+{
+  if(val=="Honeycomb") 
+  { detectorChoice = 1; }
+  else
+  { detectorChoice = 0; }
+  G4cout << "Now Detector is " << val << G4endl;
+}
+
+void TstDrawVox01DetectorConstruction::SelectMaterial(G4String val)
+{
+  materialChoice = val;
+  SelectMaterialPointer();
+  G4cout << "SimpleBox is now made of " << materialChoice << G4endl;
+}
+
+void TstDrawVox01DetectorConstruction::SelectMaterialPointer()
+{
+//--------- Material definition ---------
+
+  G4double a, iz, z, density;
+  G4String name, symbol;
+  G4int nel;
+
+  if(!Air)
+  {
+    a = 14.01*g/mole;
+    G4Element* elN = new G4Element(name="Nitrogen", symbol="N", iz=7., a);
+    a = 16.00*g/mole;
+    G4Element* elO = new G4Element(name="Oxigen", symbol="O", iz=8., a);
+    density = 1.29e-03*g/cm3;
+    Air = new G4Material(name="Air", density, nel=2);
+    Air->AddElement(elN, .7);
+    Air->AddElement(elO, .3);
+  }
+
+  if(!Al)
+  {
+    a = 26.98*g/mole;
+    density = 2.7*g/cm3;
+    Al = new G4Material(name="Aluminium", z=13., a, density);
+  }
+
+  if(!Pb)
+  {
+    a = 207.19*g/mole;
+    density = 11.35*g/cm3;
+    Pb = new G4Material(name="Lead", z=82., a, density);
+  }
+
+  if(materialChoice=="Air")
+  { selectedMaterial = Air; }
+  else if(materialChoice=="Al")
+  { selectedMaterial = Al; }
+  else
+  { selectedMaterial = Pb; }
+
+  if(simpleBoxLog)
+  { simpleBoxLog->SetMaterial(selectedMaterial); }
+}
+
+void TstDrawVox01DetectorConstruction::ConstructDetectors()
+{
+  SelectMaterialPointer();
+
+//--------- G4VSolid, G4LogicalVolume, G4VPhysicalVolume  ---------
+
+//--------- simpleBoxDetector -------------------------------------
+
+  G4Box * mySimpleBox = new G4Box("SBox",2000*cm, 2000*cm, 2000*cm);
+  simpleBoxLog = new G4LogicalVolume( mySimpleBox,
+                                      selectedMaterial,"SLog",0,0,0);
+  simpleBoxDetector = new G4PVPlacement(0,G4ThreeVector(),
+                                        "SPhys",simpleBoxLog,0,false,0);
+
+//--------- honeycombDetector -------------------------------------
+
+  G4double offset=22.5*cm, xTlate, yTlate;
+  G4int i,j,copyNo;
+
+  G4Box *myWorldBox= new G4Box("WBox",2000*cm, 2000*cm, 2000*cm);
+  G4Box *myCalBox = new G4Box("CBox",1500*cm, 1500*cm, 1000*cm);
+  G4Tubs *myTargetTube 
+     = new G4Tubs("TTube",0*cm, 22.5*cm, 1000*cm, 0.*deg, 360.*deg);
+
+  G4LogicalVolume *myWorldLog=new G4LogicalVolume(myWorldBox,Air,
+						    "WLog", 0, 0, 0);
+  G4LogicalVolume *myCalLog=new G4LogicalVolume(myCalBox,Al,
+						  "CLog", 0, 0, 0);
+  G4LogicalVolume *myTargetLog=new G4LogicalVolume(myTargetTube,Pb,
+						     "TLog", 0, 0, 0);
+
+  honeycombDetector = new G4PVPlacement(0,G4ThreeVector(),
+						 "WPhys",
+						 myWorldLog,
+						 0,false,0);
+  G4PVPlacement *myCalPhys=new G4PVPlacement(0,G4ThreeVector(),
+					       "CalPhys",
+					       myCalLog,
+                                               honeycombDetector,
+					       false,0);
+
+  G4String tName1("TPhys1");	// Allow all target physicals to share
+				// same name (delayed copy)
+  copyNo=0;
+  for (j=1;j<=3;j++)
+  {
+    yTlate = -1000.0*cm - 40.0*cm + j*320.0*cm;
+    for (i=1;i<= 4;i++)
+    {
+      xTlate = -1000.0*cm - 20.0*cm + i*160.0*cm - offset;
+      // G4PVPlacement *myTargetPhys=
+      new G4PVPlacement(0,G4ThreeVector(xTlate,yTlate,0*cm),
+                        tName1,myTargetLog,myCalPhys,false,copyNo++);
+    }
+  }
+  for (j=1;j<=3;j++)
+  {
+    yTlate = -1000.0*cm - 80.0*cm + j*320.0*cm;
+    for (i=1;i<= 4;i++)
+    {
+      xTlate = -1000.0*cm - 20.0*cm + i*160.0*cm;
+      // G4PVPlacement *myTargetPhys=
+      new G4PVPlacement(0,G4ThreeVector(xTlate,yTlate,0*cm),
+                        tName1,myTargetLog,myCalPhys,false,copyNo++);
+    }
+  }
+
+//--------- Visualization attributes -------------------------------
+
+  G4VisAttributes * simpleBoxVisAtt
+    = new G4VisAttributes(G4Colour(.0,0.7,.0));
+  simpleBoxVisAtt->SetVisibility(true);
+  simpleBoxLog->SetVisAttributes(simpleBoxVisAtt);
+
+  G4VisAttributes * experimentalHallVisAtt
+    = new G4VisAttributes(G4Colour(0.3,0.,.0));
+  experimentalHallVisAtt->SetVisibility(true);
+  myWorldLog->SetVisAttributes(experimentalHallVisAtt);
+
+  G4VisAttributes * calorimeterBoxVisAtt
+    = new G4VisAttributes(G4Colour(0.0,0.0,1.0));
+  calorimeterBoxVisAtt->SetForceWireframe(true);
+  calorimeterBoxVisAtt->SetVisibility(true);
+  myCalLog->SetVisAttributes(calorimeterBoxVisAtt);
+
+  G4VisAttributes * calorimeterTubeVisAtt
+    = new G4VisAttributes(G4Colour(0.0,0.5,0.5));
+  calorimeterTubeVisAtt->SetForceWireframe(true);
+  calorimeterTubeVisAtt->SetVisibility(true);
+  myTargetLog->SetVisAttributes(calorimeterTubeVisAtt);
+
+//------------------------------------------------------------------
+
+}
+
Index: trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01DetectorMessenger.cc
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01DetectorMessenger.cc	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01DetectorMessenger.cc	(revision 1316)
@@ -0,0 +1,91 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+
+#include "TstDrawVox01DetectorMessenger.hh"
+
+#include "TstDrawVox01DetectorConstruction.hh"
+#include "G4UIdirectory.hh"
+#include "G4UIcmdWithAString.hh"
+#include "globals.hh"
+
+#include "G4ios.hh"
+
+TstDrawVox01DetectorMessenger::TstDrawVox01DetectorMessenger(TstDrawVox01DetectorConstruction * myDC)
+:myDetector(myDC)
+{
+  G4String defParam;
+
+  mydetDir = new G4UIdirectory("/mydet/");
+  mydetDir->SetGuidance("Detector setup commands.");
+
+  selDetCmd = new G4UIcmdWithAString("/mydet/SelectDetector",this);
+  selDetCmd->SetGuidance("Select Detector Setup.");
+  selDetCmd->SetGuidance("  Choice : SimpleBox / Honeycomb ");
+  selDetCmd->SetParameterName("choice",true);
+  selDetCmd->SetDefaultValue("SimpleBox");
+  selDetCmd->SetCandidates("SimpleBox Honeycomb");
+  selDetCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+
+  switchCmd = new G4UIcmdWithAString("/mydet/SwitchDetector",this);
+  switchCmd->SetGuidance("Assign the selected geometry to G4RunManager.");
+  switchCmd->SetGuidance("In cese detector name is associated to this command,");
+  switchCmd->SetGuidance("\"/mydet/SelectDetector\" will be invoked and then switched.");
+  switchCmd->SetParameterName("choice",true);
+  switchCmd->SetDefaultValue(" ");
+  switchCmd->SetCandidates("SimpleBox Honeycomb \" \"");
+  switchCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+
+  selMatCmd = new G4UIcmdWithAString("/mydet/SelectMaterial",this);
+  selMatCmd->SetGuidance("Select Material of the SimpleBox.");
+  selMatCmd->SetGuidance("  Choice : Air, Al, Pb (default)");
+  selMatCmd->SetParameterName("choice",true);
+  selMatCmd->SetDefaultValue("Pb");
+  selMatCmd->SetCandidates("Air Al Pb");
+  selMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+
+  myDetector->SelectDetector(defParam="SimpleBox");
+  myDetector->SelectMaterial(defParam="Pb");
+}
+
+void TstDrawVox01DetectorMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
+{
+  if( command == selDetCmd )
+  {
+    myDetector->SelectDetector(newValues);
+  }
+  if( command == switchCmd )
+  {
+    if(newValues=="SimpleBox" || newValues=="Honeycomb")
+    { myDetector->SelectDetector(newValues); }
+    myDetector->SwitchDetector();
+  }
+  if( command == selMatCmd )
+  {
+    myDetector->SelectMaterial(newValues);
+  }
+  return;
+}
+
Index: trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01PhysicsList.cc
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01PhysicsList.cc	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01PhysicsList.cc	(revision 1316)
@@ -0,0 +1,224 @@
+//
+// ********************************************************************
+// * 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: TstDrawVox01PhysicsList.cc,v 1.6 2006/06/29 18:35:21 gunter Exp $
+// ------------------------------------------------------------
+//	GEANT 4 class header file 
+//
+//      This is a version for maximum particle set
+//	History
+//        first version              10  Jan. 1998 by H.Kurashige
+//        add decay at rest          26  Feb. 1998 by H.Kurashige
+// ------------------------------------------------------------
+
+#include "globals.hh"
+#include "TstDrawVox01PhysicsList.hh"
+#include "G4ParticleDefinition.hh"
+#include "G4ParticleWithCuts.hh"
+#include "G4ProcessManager.hh"
+#include "G4ProcessVector.hh"
+#include "G4ParticleTypes.hh"
+#include "G4ParticleTable.hh"
+#include "G4BosonConstructor.hh"
+#include "G4LeptonConstructor.hh"
+#include "G4MesonConstructor.hh"
+#include "G4BaryonConstructor.hh"
+#include "G4IonConstructor.hh"
+#include "G4Material.hh"
+#include "G4MaterialTable.hh"
+#include "G4ios.hh"
+#include <iomanip>                
+
+
+TstDrawVox01PhysicsList::TstDrawVox01PhysicsList():  G4VUserPhysicsList()
+{
+  SetVerboseLevel(1);
+}
+
+TstDrawVox01PhysicsList::~TstDrawVox01PhysicsList()
+{
+}
+
+void TstDrawVox01PhysicsList::ConstructParticle()
+{
+  // In this method, static member functions should be called
+  // for all particles which you want to use.
+  // This ensures that objects of these particle types will be
+  // created in the program. 
+
+  ConstructBosons();
+  ConstructLeptons();
+  ConstructMesons();
+  ConstructBaryons();
+
+}
+
+void TstDrawVox01PhysicsList::ConstructBosons()
+{
+  // pseudo-particles
+  G4Geantino::GeantinoDefinition();
+  G4ChargedGeantino::ChargedGeantinoDefinition();
+
+  // gamma
+  G4Gamma::GammaDefinition();
+
+  // optical photon
+  G4OpticalPhoton::OpticalPhotonDefinition();
+}
+
+void TstDrawVox01PhysicsList::ConstructLeptons()
+{
+  // Construct all leptons
+  G4LeptonConstructor pConstructor;
+  pConstructor.ConstructParticle();
+}
+
+void TstDrawVox01PhysicsList::ConstructMesons()
+{
+  //  Construct all mesons
+  G4MesonConstructor pConstructor;
+  pConstructor.ConstructParticle();
+}
+
+void TstDrawVox01PhysicsList::ConstructBaryons()
+{
+  //  Construct all baryons
+  G4BaryonConstructor pConstructor;
+  pConstructor.ConstructParticle();
+}
+
+void TstDrawVox01PhysicsList::ConstructIons()
+{
+  //  Construct light ions
+  G4IonConstructor pConstructor;
+  pConstructor.ConstructParticle();  
+}
+
+void TstDrawVox01PhysicsList::ConstructProcess()
+{
+  AddTransportation();
+  ConstructEM();
+  ConstructLeptHad();
+  ConstructHad();
+  ConstructGeneral();
+}
+
+#include "G4ComptonScattering.hh"
+#include "G4GammaConversion.hh"
+#include "G4PhotoElectricEffect.hh"
+
+#include "G4MultipleScattering.hh"
+
+#include "G4eIonisation.hh"
+#include "G4eBremsstrahlung.hh"
+#include "G4eplusAnnihilation.hh"
+
+#include "G4MuIonisation.hh"
+#include "G4MuBremsstrahlung.hh"
+#include "G4MuPairProduction.hh"
+
+#include "G4hIonisation.hh"
+void TstDrawVox01PhysicsList::ConstructEM()
+{
+  theParticleIterator->reset();
+  while( (*theParticleIterator)() ){
+    G4ParticleDefinition* particle = theParticleIterator->value();
+    G4ProcessManager* pmanager = particle->GetProcessManager();
+    G4String particleName = particle->GetParticleName();
+     
+    if (particleName == "gamma") {
+    // gamma
+      // Construct processes for gamma
+      pmanager->AddDiscreteProcess(new G4GammaConversion());
+      pmanager->AddDiscreteProcess(new G4ComptonScattering());      
+      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
+
+    } else if (particleName == "e-") {
+    //electron
+      // Construct processes for electron
+      pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
+      pmanager->AddProcess(new G4eIonisation(),-1,2,2);
+      pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
+  
+    } else if (particleName == "e+") {
+    //positron
+      // Construct processes for positron
+     pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
+     
+     pmanager->AddProcess(new G4eIonisation(),-1,2,2);
+     pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);      
+     pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4);
+  
+    } else if( particleName == "mu+" || 
+               particleName == "mu-"    ) {
+    //muon  
+     // Construct processes for muon+
+     pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
+     pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
+     pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
+     pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);       
+     
+    } else { 
+      if ((particle->GetPDGCharge() != 0.0) && 
+          (particle->GetParticleName() != "chargedgeantino")) {
+     // all others charged particles except geantino
+       pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
+       pmanager->AddProcess(new G4hIonisation(),-1,2,2);       
+     }
+    }
+  }
+}
+
+void TstDrawVox01PhysicsList::ConstructHad()
+{;}
+
+void TstDrawVox01PhysicsList::ConstructLeptHad()
+{;}
+
+#include "G4Decay.hh"
+void TstDrawVox01PhysicsList::ConstructGeneral()
+{
+  G4Decay* theDecayProcess = new G4Decay();
+  theParticleIterator->reset();
+  while( (*theParticleIterator)() ){
+    G4ParticleDefinition* particle = theParticleIterator->value();
+    G4ProcessManager* pmanager = particle->GetProcessManager();
+    if (theDecayProcess->IsApplicable(*particle)) { 
+      pmanager->AddProcess(theDecayProcess, INT_MAX, -1, INT_MAX); 
+   }
+  }
+}
+
+void TstDrawVox01PhysicsList::SetCuts()
+{
+  if (verboseLevel >1){
+    G4cout << "TstDrawVox01PhysicsList::SetCuts:";
+  }  
+  //  " G4VUserPhysicsList::SetCutsWithDefault" method sets 
+  //   the default cut value for all particle types 
+  SetCutsWithDefault();   
+}
+
+
Index: trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01PrimaryGeneratorAction.cc
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01PrimaryGeneratorAction.cc	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01PrimaryGeneratorAction.cc	(revision 1316)
@@ -0,0 +1,164 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+
+#include "TstDrawVox01PrimaryGeneratorAction.hh"
+
+#include "TstDrawVox01PrimaryGeneratorMessenger.hh"
+#include "G4Event.hh"
+#include "G4ParticleGun.hh"
+#include "G4ParticleTable.hh"
+#include "G4ParticleDefinition.hh"
+#include "G4TransportationManager.hh"
+#include "globals.hh"
+#include "CLHEP/Random/RandFlat.h"
+
+TstDrawVox01PrimaryGeneratorAction::TstDrawVox01PrimaryGeneratorAction():
+  generatorAction (standardGun),
+  particleGun (0),
+  messenger (0),
+  worldVolume (0)
+{
+  G4int n_particle = 1;
+  particleGun = new G4ParticleGun(n_particle);
+
+  // default particle
+
+  G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
+  G4String particleName;
+  G4ParticleDefinition* particle 
+    = particleTable->FindParticle(particleName="e-");
+  particleGun->SetParticleDefinition(particle);
+  particleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
+  particleGun->SetParticleEnergy(1.*GeV);
+  particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,0.*cm));
+
+  // messenger
+
+  messenger = new TstDrawVox01PrimaryGeneratorMessenger (this);
+
+  // world extent
+
+  worldVolume = G4TransportationManager::GetTransportationManager ()
+    -> GetNavigatorForTracking () -> GetWorldVolume ();
+  if (worldVolume) worldExtent = worldVolume -> GetLogicalVolume ()
+		     -> GetSolid () -> GetExtent ();
+
+}
+
+TstDrawVox01PrimaryGeneratorAction::~TstDrawVox01PrimaryGeneratorAction()
+{
+  delete particleGun;
+  delete messenger;
+}
+
+void TstDrawVox01PrimaryGeneratorAction::SelectPrimaryGeneratorAction
+(Action action)
+{
+  generatorAction = action;
+}
+
+void TstDrawVox01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
+{
+  G4VPhysicalVolume* currentWorldVolume;
+
+  double costheta;
+  double sintheta;
+  double phi;
+  double cosphi;
+  double sinphi;
+
+  switch (generatorAction) {
+
+  case standardGun:
+
+    particleGun->GeneratePrimaryVertex(anEvent);
+    break;
+
+  case randomDirectionGun:
+
+    costheta = CLHEP::RandFlat::shoot (-1., 1.);
+    sintheta = std::sqrt (1. - costheta * costheta);
+    phi      = CLHEP::RandFlat::shoot (twopi);
+    cosphi   = std::cos (phi);
+    sinphi   = std::sin (phi);
+    particleGun->SetParticleMomentumDirection
+      (G4ThreeVector (sintheta * cosphi, sintheta * sinphi, costheta));
+
+    particleGun->GeneratePrimaryVertex(anEvent);
+    break;
+
+  case randomPositionGun:
+
+    // Check if world is in place or has changed.
+    currentWorldVolume = 
+      G4TransportationManager::GetTransportationManager ()
+      -> GetNavigatorForTracking () -> GetWorldVolume ();
+    if (!worldVolume ||	worldVolume != currentWorldVolume) {
+      worldVolume = currentWorldVolume;
+      if (worldVolume) worldExtent = worldVolume -> GetLogicalVolume ()
+			 -> GetSolid () -> GetExtent ();
+    }
+
+    particleGun->SetParticlePosition
+      (G4ThreeVector
+       (CLHEP::RandFlat::shoot (worldExtent.GetXmin (), worldExtent.GetXmax ()),
+	CLHEP::RandFlat::shoot (worldExtent.GetYmin (), worldExtent.GetYmax ()),
+	CLHEP::RandFlat::shoot (worldExtent.GetZmin (), worldExtent.GetZmax ())));
+
+    particleGun->GeneratePrimaryVertex(anEvent);
+    break;
+
+  case randomPositionAndDirectionGun:
+
+    // Check if world is in place or has changed.
+    currentWorldVolume =
+      G4TransportationManager::GetTransportationManager ()
+      -> GetNavigatorForTracking () -> GetWorldVolume ();
+    if (!worldVolume ||	worldVolume != currentWorldVolume) {
+      worldVolume = currentWorldVolume;
+      if (worldVolume) worldExtent = worldVolume -> GetLogicalVolume ()
+			 -> GetSolid () -> GetExtent ();
+    }
+
+    particleGun->SetParticlePosition
+      (G4ThreeVector
+       (CLHEP::RandFlat::shoot (worldExtent.GetXmin (), worldExtent.GetXmax ()),
+	CLHEP::RandFlat::shoot (worldExtent.GetYmin (), worldExtent.GetYmax ()),
+	CLHEP::RandFlat::shoot (worldExtent.GetZmin (), worldExtent.GetZmax ())));
+
+    costheta = CLHEP::RandFlat::shoot (-1., 1.);
+    sintheta = std::sqrt (1. - costheta * costheta);
+    phi      = CLHEP::RandFlat::shoot (twopi);
+    cosphi   = std::cos (phi);
+    sinphi   = std::sin (phi);
+    particleGun->SetParticleMomentumDirection
+      (G4ThreeVector (sintheta * cosphi, sintheta * sinphi, costheta));
+
+    particleGun->GeneratePrimaryVertex(anEvent);
+    break;
+
+  }
+}
Index: trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01PrimaryGeneratorMessenger.cc
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01PrimaryGeneratorMessenger.cc	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01PrimaryGeneratorMessenger.cc	(revision 1316)
@@ -0,0 +1,79 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+
+#include "TstDrawVox01PrimaryGeneratorMessenger.hh"
+
+#include "TstDrawVox01PrimaryGeneratorAction.hh"
+#include "G4UIdirectory.hh"
+#include "G4UIcmdWithoutParameter.hh"
+#include "G4UIcmdWithAString.hh"
+#include "globals.hh"
+#include "G4ios.hh"
+
+TstDrawVox01PrimaryGeneratorMessenger::TstDrawVox01PrimaryGeneratorMessenger(TstDrawVox01PrimaryGeneratorAction * myPGA)
+:myPGAction(myPGA)
+{
+  G4bool omitable;
+
+  G4UIdirectory* mydetDir = new G4UIdirectory("/myPGAction/");
+  mydetDir->SetGuidance("Primary Generator Action control.");
+
+  standardGun = new G4UIcmdWithoutParameter("/myPGAction/standardGun",this);
+  standardGun->SetGuidance("Select standard gun.");
+
+  randomGun = new G4UIcmdWithAString("/myPGAction/randomGun",this);
+  randomGun->SetGuidance("Select random gun.");
+  randomGun->SetParameterName("random-gun-type", omitable = true);
+  randomGun->SetDefaultValue("randomDirection");
+  randomGun->SetCandidates
+    ("randomDirection randomPosition randomPositionAndDirection");
+}
+
+void TstDrawVox01PrimaryGeneratorMessenger::SetNewValue
+(G4UIcommand * command,G4String newValues)
+{
+  if( command == standardGun)
+  {
+    myPGAction->SelectPrimaryGeneratorAction
+      (TstDrawVox01PrimaryGeneratorAction::standardGun);
+  }
+  if( command == randomGun)
+  {
+    if (newValues == "randomDirection") {
+      myPGAction->SelectPrimaryGeneratorAction
+	(TstDrawVox01PrimaryGeneratorAction::randomDirectionGun);
+    }
+    if (newValues == "randomPosition") {
+      myPGAction->SelectPrimaryGeneratorAction
+	(TstDrawVox01PrimaryGeneratorAction::randomPositionGun);
+    }
+    if (newValues == "randomPositionAndDirection") {
+      myPGAction->SelectPrimaryGeneratorAction
+	(TstDrawVox01PrimaryGeneratorAction::randomPositionAndDirectionGun);
+    }
+  }
+  return;
+}
Index: trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01RunAction.cc
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01RunAction.cc	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01RunAction.cc	(revision 1316)
@@ -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.          *
+// ********************************************************************
+//
+
+#include "TstDrawVox01RunAction.hh"
+
+#include "G4Run.hh"
+#include "G4UImanager.hh"
+#include "G4ios.hh"
+
+TstDrawVox01RunAction::TstDrawVox01RunAction()
+{
+}
+
+TstDrawVox01RunAction::~TstDrawVox01RunAction()
+{
+}
+
+void TstDrawVox01RunAction::BeginOfRunAction(const G4Run*)
+{
+}
+
+void TstDrawVox01RunAction::EndOfRunAction(const G4Run*)
+{
+}
+
Index: trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01SteppingAction.cc
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01SteppingAction.cc	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/src/TstDrawVox01SteppingAction.cc	(revision 1316)
@@ -0,0 +1,58 @@
+//
+// ********************************************************************
+// * 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: TstDrawVox01SteppingAction.cc,v 1.6 2006/06/29 18:35:30 gunter Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
+//
+// 
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+#include "TstDrawVox01SteppingAction.hh"
+#include "G4SteppingManager.hh"
+#include <fstream>
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+TstDrawVox01SteppingAction::TstDrawVox01SteppingAction()
+{
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+TstDrawVox01SteppingAction::~TstDrawVox01SteppingAction()
+{
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
+void TstDrawVox01SteppingAction::UserSteppingAction(const G4Step*)
+{
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+
Index: trunk/source/geometry/management/test/TestDrawVox/testDrawVox.cc
===================================================================
--- trunk/source/geometry/management/test/TestDrawVox/testDrawVox.cc	(revision 1316)
+++ trunk/source/geometry/management/test/TestDrawVox/testDrawVox.cc	(revision 1316)
@@ -0,0 +1,109 @@
+//
+// ********************************************************************
+// * 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: testDrawVox.cc,v 1.5 2006/06/29 18:34:55 gunter Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
+//
+// 
+// --------------------------------------------------------------
+//      GEANT4 - test01 
+//
+// --------------------------------------------------------------
+// Comments
+//
+// 
+// --------------------------------------------------------------
+
+#include "TstDrawVox01DetectorConstruction.hh"
+#include "TstDrawVox01RunAction.hh"
+#include "TstDrawVox01PrimaryGeneratorAction.hh"
+#include "TstDrawVox01SteppingAction.hh"
+#include "TstDrawVox01PhysicsList.hh"
+
+#include "G4UImanager.hh"
+#include "G4UIterminal.hh"
+
+#include "G4RunManager.hh"
+
+#ifdef G4VIS_USE
+#include "G4VisExecutive.hh"
+#endif
+
+#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 TstDrawVox01DetectorConstruction);
+  runManager->SetUserInitialization(new TstDrawVox01PhysicsList);
+
+  #ifdef G4VIS_USE
+    // Visualization, if you choose to have it!
+    G4VisManager* visManager = new G4VisExecutive;
+    visManager->Initialize();
+  #endif
+
+  // UserAction classes
+  runManager->SetUserAction(new TstDrawVox01RunAction);
+  runManager->SetUserAction(new TstDrawVox01PrimaryGeneratorAction);
+  runManager->SetUserAction(new TstDrawVox01SteppingAction);
+
+  // User interactions
+  // Define (G)UI for interactive mode
+ 
+  // User interactions
+    G4UImanager * UI = G4UImanager::GetUIpointer();
+  
+  if(argc==1)
+  { 
+    // G4UIterminal is a (dumb) terminal.
+    G4UIsession * session = new G4UIterminal;
+    UI->ApplyCommand("/control/execute prerun.g4mac"); 
+    session->SessionStart();
+    delete session;
+  }
+  else
+  // Batch mode
+  { 
+    G4String command = "/control/execute ";
+    G4String fileName = argv[1];
+    UI->ApplyCommand(command+fileName);
+  }
+  
+  #ifdef G4VIS_USE
+    delete visManager;
+  #endif
+  delete runManager;
+  return 0;
+}
+
