Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.9 2003/10/06 14:51:14 maire Exp $
|
||||
# $Id: GNUmakefile,v 1.12 2004/06/21 10:55:09 maire Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
@@ -14,21 +14,26 @@ endif
|
||||
.PHONY: all
|
||||
all: lib bin
|
||||
|
||||
####G4ANALYSIS_USE := true
|
||||
#### G4ANALYSIS_USE := true
|
||||
|
||||
ifdef G4ANALYSIS_USE
|
||||
CPPFLAGS += -DG4ANALYSIS_USE
|
||||
USE_AIDA := true
|
||||
endif
|
||||
|
||||
ifdef USE_AIDA
|
||||
CPPFLAGS += -DUSE_AIDA
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
ifdef G4ANALYSIS_USE
|
||||
ifdef USE_AIDA
|
||||
# for the aida-config command see the README file
|
||||
CPPFLAGS += `aida-config --include`
|
||||
LDFLAGS += `aida-config --lib`
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
|
||||
|
||||
visclean:
|
||||
rm -f g4*.prim g4*.eps g4*.wrl
|
||||
rm -f .DAWN_*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.28 2003/11/25 18:36:18 vnivanch Exp $
|
||||
$Id: History,v 1.32 2004/06/21 10:55:10 maire Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -14,6 +14,18 @@ track of all tags.
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
21-06-04 mma (testem4-V0-01-01)
|
||||
- remove direct ROOT interface
|
||||
|
||||
30-03-04 mma (testem4-V0-01-00)
|
||||
- README: more information about ROOT installation
|
||||
|
||||
15-03-04 mma (testem4-V06-00-01)
|
||||
- put back G4ANALYSIS_USE in GNUmakefile
|
||||
|
||||
27-02-04 mma (testem4-V06-00-00)
|
||||
- example of histogram with ROOT: USE_ROOT
|
||||
|
||||
25-11-03 V.Ivanchenko (testem4-V05-02-03)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: README,v 1.8 2003/10/06 14:51:15 maire Exp $
|
||||
$Id: README,v 1.14 2004/06/23 11:30:23 maire Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -40,7 +40,7 @@ $Id: README,v 1.8 2003/10/06 14:51:15 maire Exp $
|
||||
|
||||
5- PHYSICS SURVEY
|
||||
|
||||
the energy deposited in C6F6 is histogramed
|
||||
The energy deposited in C6F6 is histogramed.
|
||||
|
||||
6- HOW TO START ?
|
||||
|
||||
@@ -58,28 +58,43 @@ $Id: README,v 1.8 2003/10/06 14:51:15 maire Exp $
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
- visualize the histogram
|
||||
- visualize the histogram (aida)
|
||||
paw> h/file 1 testem4.paw
|
||||
paw> option stat
|
||||
paw> option logy
|
||||
paw> h/pl 1
|
||||
|
||||
Note that, by default, histograms are disabled. To activate them, uncomment
|
||||
the flag G4ANALYSIS_USE in GNUmakefile.
|
||||
the flag G4ANALYSIS_USE in GNUmakefile.
|
||||
|
||||
|
||||
7- Using the Anaphe implementation of the AIDA 3.0 histograms:
|
||||
--------------------------------------------------------------
|
||||
7- Using histograms
|
||||
-------------------
|
||||
|
||||
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
|
||||
By default the histograms are not activated. To activate histograms
|
||||
the environment variable G4ANALYSIS_USE should be defined. For instance
|
||||
uncomment the flag G4ANALYSIS_USE in GNUmakefile.
|
||||
|
||||
In order to run the executable, you need to source the following
|
||||
script (once):
|
||||
$HOME/bin/setupAnaphe.csh (or $HOME/bin/setupAnaphe)
|
||||
To use histograms any of implementations of AIDA interfaces should
|
||||
be available (see http://aida.freehep.org).
|
||||
|
||||
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)
|
||||
A package including AIDA and extended interfaces also using Python
|
||||
is PI, available from: http://cern.ch/pi .
|
||||
|
||||
Once installed PI or PI-Lite in a specified local area $MYPY, it is
|
||||
required to add the installation path to $PATH, i.e. for example,
|
||||
for release 1.2.1 of PI:
|
||||
|
||||
setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin
|
||||
|
||||
CERN users can use the PATH to the LCG area on AFS.
|
||||
|
||||
Before compilation of the example it is optimal to clean up old
|
||||
files:
|
||||
|
||||
gmake histclean
|
||||
gmake
|
||||
|
||||
Before running the example the command should be issued:
|
||||
|
||||
eval `aida-config --runtime csh`
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
*************************************************************
|
||||
Geant4 version $Name: geant4-06-01 $ (25-March-2004)
|
||||
Geant4 version $Name: geant4-06-02 $ (25-June-2004)
|
||||
Copyright : Geant4 Collaboration
|
||||
Reference : NIM A 506 (2003), 250-303.
|
||||
Reference : NIM A 506 (2003), 250-303
|
||||
WWW : http://cern.ch/geant4
|
||||
*************************************************************
|
||||
|
||||
@@ -93,11 +93,11 @@ Start Run processing.
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 50000
|
||||
User=16.65s Real=469.57s Sys=41.92s
|
||||
User=15.51s Real=553.82s Sys=37.47s
|
||||
|
||||
--------- Ranecu engine status ---------
|
||||
Initial seed (index) = 0
|
||||
Current couple of seeds = 2009194324, 1256174957
|
||||
Current couple of seeds = 1888278667, 436168634
|
||||
----------------------------------------
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: RunAction.hh,v 1.2 2003/10/06 14:51:16 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: RunAction.hh,v 1.5 2004/06/21 10:55:10 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -39,13 +39,15 @@
|
||||
|
||||
class G4Run;
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
namespace AIDA {
|
||||
class ITree;
|
||||
class IHistogram1D;
|
||||
}
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
@@ -56,18 +58,19 @@ class RunAction : public G4UserRunAction
|
||||
void BeginOfRunAction(const G4Run*);
|
||||
void EndOfRunAction(const G4Run*);
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
AIDA::IHistogram1D* GetHisto(G4int id) {return histo[id];}
|
||||
#endif
|
||||
|
||||
|
||||
private:
|
||||
void bookHisto();
|
||||
|
||||
private:
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
AIDA::ITree* tree; //the tree should only be deleted at the end
|
||||
AIDA::IHistogram1D* histo[1]; // (after writing the histos to file)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -20,12 +20,9 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: EventAction.cc,v 1.5 2004/06/21 10:55:10 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// $Id: EventAction.cc,v 1.2 2003/10/06 14:51:17 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -40,7 +37,7 @@
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
#include "AIDA/IHistogram1D.h"
|
||||
#endif
|
||||
|
||||
@@ -76,15 +73,16 @@ void EventAction::BeginOfEventAction( const G4Event* evt)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void EventAction::EndOfEventAction( const G4Event* evt)
|
||||
{
|
||||
{
|
||||
if (drawFlag != "none")
|
||||
G4cout << " Energy deposit: "
|
||||
<< G4BestUnit(TotalEnergyDeposit,"Energy") << G4endl;
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
Run->GetHisto(0)->fill(TotalEnergyDeposit/MeV);
|
||||
#endif
|
||||
|
||||
// draw trajectories
|
||||
if(G4VVisManager::GetConcreteInstance())
|
||||
{
|
||||
G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
@@ -93,9 +91,9 @@ void EventAction::EndOfEventAction( const G4Event* evt)
|
||||
for(G4int i=0; i<n_trajectories; i++)
|
||||
{ G4Trajectory* trj = (G4Trajectory *)
|
||||
((*(evt->GetTrajectoryContainer()))[i]);
|
||||
if (drawFlag == "all") trj->DrawTrajectory(50);
|
||||
if (drawFlag == "all") trj->DrawTrajectory(1000);
|
||||
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
trj->DrawTrajectory(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: RunAction.cc,v 1.2 2003/10/06 14:51:17 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: RunAction.cc,v 1.5 2004/06/21 10:55:10 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -32,12 +32,10 @@
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
#include "AIDA/AIDA.h"
|
||||
#endif
|
||||
|
||||
@@ -52,20 +50,18 @@ RunAction::RunAction()
|
||||
|
||||
RunAction::~RunAction()
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
tree->commit(); // Writing the histograms to the file
|
||||
tree->close(); // and closing the tree (and the file)
|
||||
|
||||
tree->close(); // and closing the tree (and the file)
|
||||
delete tree;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RunAction::bookHisto()
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
// Creating the analysis factory
|
||||
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
|
||||
|
||||
@@ -81,7 +77,8 @@ void RunAction::bookHisto()
|
||||
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
|
||||
|
||||
// Creating the histogram
|
||||
histo[0]=hf->createHistogram1D("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;
|
||||
@@ -98,18 +95,12 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
// save Rndm status
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
HepRandom::showEngineStatus();
|
||||
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RunAction::EndOfRunAction(const G4Run*)
|
||||
{
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
|
||||
|
||||
// show Rndm status
|
||||
HepRandom::showEngineStatus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user