Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.7 2002/05/29 15:33:59 maire Exp $
# $Id: GNUmakefile,v 1.8 2002/12/10 17:20:29 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -21,8 +21,8 @@ ifdef G4NOHIST
CPPFLAGS += -DG4NOHIST
else
# for the aida-config command see the README file
CPPFLAGS += `aida-config --useHBook --include`
LDFLAGS += `aida-config --useHBook --lib`
CPPFLAGS += `aida-config --include`
LDFLAGS += `aida-config --lib`
endif
include $(G4INSTALL)/config/binmake.gmk
@@ -1,4 +1,4 @@
$Id: History,v 1.18 2002/06/05 17:35:11 maire Exp $
$Id: History,v 1.19 2002/12/10 17:20:29 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,9 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
10-12-02 mma (testem4-V04-01-00)
-migration to AIDA 3.0
-UI commands under directory /testem/
05-06-02 mma (testem4-V04-00-02)
-do not delete histos in destructor
@@ -1,4 +1,4 @@
$Id: README,v 1.6 2002/05/29 15:32:27 maire Exp $
$Id: README,v 1.7 2002/12/10 17:20:29 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -67,21 +67,18 @@ $Id: README,v 1.6 2002/05/29 15:32:27 maire Exp $
Note that, histograms are disabled via the flag G4NOHIST in the GNUmakefile.
7- Using the Anaphe implementation of the AIDA 2.2 histograms:
7- Using the Anaphe implementation of the AIDA 3.0 histograms:
--------------------------------------------------------------
In order to use the Anaphe implementation of the AIDA 2.2 interfaces,
prepare some environment variables by source-ing one of the following
startup scripts (depending on your compiler version):
In order to use the Anaphe implementation of the AIDA 3.0 interfaces,
the 'aida-config' command (which is used in the GNUmakefile) is
available at:
/afs/cern.ch/sw/lhcxx/share/LHCXX/latest/scripts/aida-config
# gcc-2.95.2
source $LHCXXTOP/share/LHCXX/4.0.1/install/sharedstart.sh or .csh
In order to run the executable, you need to source the following
script (once):
$HOME/bin/setupAnaphe.csh (or $HOME/bin/setupAnaphe)
# egcs_1.1.2 (aka gcc 2.91.66)
source $LHCXXTOP/share/LHCXX/4.0.1-sec/install/sharedstart.sh or .csh
At CERN, $LHCXXTOP is /afs/cern.ch/sw/lhcxx, you may want to use a
more recent release, check http:/cern.ch/anaphe for more information.
After this, you will have access to the 'aida-config' command which
is used in the GNUmakefile.
At cern 'setupAnaphe' is available at:
/afs/cern.ch/sw/lhcxx/share/LHCXX/latest/scripts/setupAnaphe.csh
(or /afs/cern.ch/sw/lhcxx/share/LHCXX/latest/scripts/setupAnaphe)
@@ -22,7 +22,7 @@
//
//
// $Id: TestEm4.cc,v 1.7 2001/10/25 14:04:22 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -1,4 +1,4 @@
# $Id: TestEm4.in,v 1.2 2001/11/28 15:07:21 maire Exp $
# $Id: TestEm4.in,v 1.3 2002/12/10 17:20:29 maire Exp $
#
# Macro file for "TestEm4.cc"
#
@@ -7,6 +7,6 @@
/control/verbose 2
#
/run/verbose 2
/event/printModulo 10000
/testem/event/printModulo 10000
#
/run/beamOn 50000
@@ -1,6 +1,6 @@
**********************************************
Geant4 version $Name: geant4-04-01 $
(28-Feb-2002)
Geant4 version $Name: geant4-05-00 $
(13-Dec-2002)
Copyright : Geant4 Collaboration
**********************************************
Visualization Manager instantiating...
@@ -13,6 +13,7 @@ Current available graphics systems are:
DAWNFILE (DAWNFILE)
GAGTree (GAGTree)
G4HepRepFile (HepRepFile)
G4HepRep (HepRepXML)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
@@ -58,7 +59,7 @@ Cut in energy
===================================================
#
/run/verbose 2
/event/printModulo 10000
/testem/event/printModulo 10000
#
/run/beamOn 50000
### Run 0 start.
@@ -86,11 +87,11 @@ Start Run processing.
Run terminated.
Run Summary
Number of events processed : 50000
User=21s Real=6.6e+02s Sys=51s
User=18s Real=5.7e+02s Sys=47s
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 156333429, 267719658
Current couple of seeds = 293687261, 334388557
----------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
@@ -22,7 +22,7 @@
//
//
// $Id: Em4DetectorConstruction.hh,v 1.4 2001/10/17 14:04:13 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em4EventAction.hh,v 1.4 2001/10/17 14:04:14 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em4EventActionMessenger.hh,v 1.4 2001/10/17 14:04:14 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em4EventActionMessenger.hh,v 1.5 2002/12/10 17:20:30 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -36,6 +36,7 @@
#include "G4UImessenger.hh"
class Em4EventAction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
@@ -50,7 +51,8 @@ class Em4EventActionMessenger: public G4UImessenger
void SetNewValue(G4UIcommand*, G4String);
private:
Em4EventAction* eventAction;
Em4EventAction* eventAction;
G4UIdirectory* testemDir;
G4UIcmdWithAString* DrawCmd;
G4UIcmdWithAnInteger* PrintCmd;
};
@@ -22,7 +22,7 @@
//
//
// $Id: Em4PhysicsList.hh,v 1.4 2001/10/17 14:04:14 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em4PrimaryGeneratorAction.hh,v 1.4 2001/10/17 14:04:14 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em4RunAction.hh,v 1.9 2002/05/29 15:32:28 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em4RunAction.hh,v 1.10 2002/12/10 17:20:30 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -40,8 +40,10 @@
class G4Run;
#ifndef G4NOHIST
namespace AIDA {
class ITree;
class IHistogram1D;
}
#endif
class Em4RunAction : public G4UserRunAction
@@ -55,7 +57,7 @@ class Em4RunAction : public G4UserRunAction
void EndOfRunAction(const G4Run*);
#ifndef G4NOHIST
IHistogram1D* GetHisto(G4int id) {return histo[id];}
AIDA::IHistogram1D* GetHisto(G4int id) {return histo[id];}
#endif
private:
@@ -63,8 +65,8 @@ class Em4RunAction : public G4UserRunAction
private:
#ifndef G4NOHIST
ITree* tree; // the tree should only be deleted at the end
IHistogram1D* histo[1]; // (after writing the histos to file)
AIDA::ITree* tree; //the tree should only be deleted at the end
AIDA::IHistogram1D* histo[1]; // (after writing the histos to file)
#endif
};
@@ -22,7 +22,7 @@
//
//
// $Id: Em4SteppingAction.hh,v 1.3 2001/07/11 09:57:44 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em4SteppingVerbose.hh,v 1.7 2001/10/17 14:04:14 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
@@ -22,7 +22,7 @@
//
//
// $Id: Em4VisManager.hh,v 1.4 2001/10/17 14:04:15 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -1,4 +1,4 @@
# $Id: run01.mac,v 1.4 2001/11/28 15:07:22 maire Exp $
# $Id: run01.mac,v 1.5 2002/12/10 17:20:29 maire Exp $
#
# Macro file for "TestEm4.cc"
#
@@ -10,6 +10,6 @@
#/run/initialize
#
/run/verbose 2
/event/printModulo 10000
/testem/event/printModulo 10000
#
/run/beamOn 100000
@@ -22,7 +22,7 @@
//
//
// $Id: Em4DetectorConstruction.cc,v 1.4 2001/10/17 14:04:15 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em4EventAction.cc,v 1.10 2002/05/29 15:32:28 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em4EventActionMessenger.cc,v 1.4 2001/10/17 14:04:15 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em4EventActionMessenger.cc,v 1.6 2002/12/10 17:20:30 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -32,6 +32,7 @@
#include "Em4EventActionMessenger.hh"
#include "Em4EventAction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "globals.hh"
@@ -40,20 +41,23 @@
Em4EventActionMessenger::Em4EventActionMessenger(Em4EventAction* EvAct)
:eventAction(EvAct)
{
DrawCmd = new G4UIcmdWithAString("/event/drawTracks",this);
{
testemDir = new G4UIdirectory("/testem/");
testemDir->SetGuidance("commands specific to this example");
DrawCmd = new G4UIcmdWithAString("/testem/event/drawTracks",this);
DrawCmd->SetGuidance("Draw the tracks in the event");
DrawCmd->SetGuidance(" Choice : none,charged, all");
DrawCmd->SetParameterName("choice",true);
DrawCmd->SetDefaultValue("all");
DrawCmd->SetCandidates("none charged all");
DrawCmd->AvailableForStates(Idle);
DrawCmd->AvailableForStates(G4State_Idle);
PrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this);
PrintCmd = new G4UIcmdWithAnInteger("/testem/event/printModulo",this);
PrintCmd->SetGuidance("Print events modulo n");
PrintCmd->SetParameterName("EventNb",false);
PrintCmd->SetRange("EventNb>0");
PrintCmd->AvailableForStates(Idle);
PrintCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -61,7 +65,8 @@ Em4EventActionMessenger::Em4EventActionMessenger(Em4EventAction* EvAct)
Em4EventActionMessenger::~Em4EventActionMessenger()
{
delete DrawCmd;
delete PrintCmd;
delete PrintCmd;
delete testemDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: Em4PhysicsList.cc,v 1.5 2001/10/17 14:04:15 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em4PrimaryGeneratorAction.cc,v 1.5 2001/12/10 16:05:16 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em4RunAction.cc,v 1.14 2002/06/05 17:31:20 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em4RunAction.cc,v 1.15 2002/12/10 17:20:30 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -40,15 +40,7 @@
#include "Randomize.hh"
#ifndef G4NOHIST
#include "AIDA/IAnalysisFactory.h"
#include "AIDA/ITreeFactory.h"
#include "AIDA/ITree.h"
#include "AIDA/IHistogramFactory.h"
#include "AIDA/IHistogram1D.h"
#include "AIDA/IAxis.h"
#include "AIDA/IAnnotation.h"
#include "AIDA/ITupleFactory.h"
#include "AIDA/ITuple.h"
#include "AIDA/AIDA.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -77,19 +69,21 @@ void Em4RunAction::bookHisto()
{
#ifndef G4NOHIST
// Creating the analysis factory
IAnalysisFactory* af = AIDA_createAnalysisFactory();
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
// Creating the tree factory
ITreeFactory* tf = af->createTreeFactory();
AIDA::ITreeFactory* tf = af->createTreeFactory();
// Creating a tree mapped to an hbook file.
tree = tf->create("testem4.paw", false, false, "hbook");
G4bool readOnly = false;
G4bool createNew = true;
tree = tf->create("testem4.paw", "hbook",readOnly, createNew);
// Creating a histogram factory, whose histograms will be handled by the tree
IHistogramFactory* hf = af->createHistogramFactory(*tree);
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
// Creating the histogram
histo[0]=hf->create1D("1","total energy deposit in C6F6 (MeV)",100,0.,10.);
histo[0]=hf->createHistogram1D("1","total energy deposit in C6F6(MeV)",100,0.,10.);
delete hf;
delete tf;
@@ -22,7 +22,7 @@
//
//
// $Id: Em4SteppingAction.cc,v 1.4 2001/10/17 14:04:16 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em4SteppingVerbose.cc,v 1.8 2001/10/17 14:04:16 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+5 -3
View File
@@ -21,10 +21,10 @@
// ********************************************************************
//
//
// $Id: Em4VisManager.cc,v 1.6 2001/11/15 13:09:48 johna Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em4VisManager.cc,v 1.7 2002/11/13 21:39:56 duns Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//
// John Allison 24th January 1998.
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,6 +41,7 @@
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4HepRep.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
@@ -97,6 +98,7 @@ void Em4VisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4HepRep);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
@@ -26,4 +26,4 @@
/tracking/storeTrajectory 1
/vis/scene/endOfEventAction accumulate
#
/event/drawTracks
/testem/event/drawTracks