Import Geant4 6.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:56:29 +02:00
parent 1d812b78b1
commit e083ffb441
1415 changed files with 111223 additions and 21207 deletions
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.9 2003/10/10 10:42:35 maire Exp $
# $Id: GNUmakefile,v 1.11 2004/03/31 16:33:32 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -14,15 +14,19 @@ 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`
@@ -1,4 +1,4 @@
$Id: History,v 1.16 2003/11/25 18:31:47 vnivanch Exp $
$Id: History,v 1.18 2004/03/31 16:33:33 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,12 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
31-03-04 mma (testem6-V06-01-00)
- remove direct interface with root
15-03-04 mma (testem6-V06-00-00)
- example of histograms with ROOT: USE_ROOT
25-11-03 V.Ivanchenko (testem6-V05-02-02)
- Fix geometry (G.Cosmo)
@@ -1,4 +1,4 @@
$Id: README,v 1.8 2003/10/10 10:42:35 maire Exp $
$Id: README,v 1.12 2004/06/23 11:29:59 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -110,30 +110,47 @@ $Id: README,v 1.8 2003/10/10 10:42:35 maire Exp $
7- HISTOGRAMS
Testem6 produces 6 histograms (saved as testem6.paw) which illustrate
the final state of the GammaConversionToMuons process.
See their definitions in RunAction.cc
Note that, by default, histograms are disabled. To activate them, uncomment
the flag G4ANALYSIS_USE in GNUmakefile.
Testem6 produces 6 histograms which illustrate the final state of
the GammaConversionToMuons process. See their definitions in RunAction.cc
The histograms are saved as testem7.paw
Note that, by default, histograms are disabled. To activate them, uncomment
G4ANALYSIS_USE in GNUmakefile.
8- Using the Anaphe implementation of the AIDA 3.0 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
8- Using histograms
-------------------
In order to run the executable, you need to source the following
script (once):
$HOME/bin/setupAnaphe.csh (or $HOME/bin/setupAnaphe)
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.
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)
To use histograms any of implementations of AIDA interfaces should
be available (see http://aida.freehep.org).
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`
9- HOW TO INCREASE STATISTICS ON gamma -> mu+mu- ?
The processes of gamma -> mu+mu- and e+e- -> mu+mu-
@@ -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,7 +93,7 @@ msc: Model variant of multiple scattering for mu+
MuIoni: tables are built for mu+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 0
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1
Bether-Bloch model for E > 0.2 MeV, parametrisation of Bragg peak below,
radiative corrections for E > 1 GeV
@@ -111,7 +111,7 @@ MuPairProd: tables are built for mu+
MuIoni: tables are built for mu-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 0
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1
Bether-Bloch model for E > 0.2 MeV, parametrisation of Bragg peak below,
radiative corrections for E > 1 GeV
@@ -167,8 +167,7 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 31.9 m 0 fm 0 fm 29.8 TeV 0 eV 0 fm 0 fm Iron initStep
1 189 m -4.12 mm -4.49 cm 11.9 TeV 17.9 TeV 158 m 158 m Iron MuIoni
2 250 m 589 mum -4.69 cm 8.46 TeV 3.46 TeV 60.5 m 218 m OutOfWorld Transportation
1 250 m -65.2 mum -53.1 mum 18.1 TeV 11.7 TeV 218 m 218 m OutOfWorld Transportation
*********************************************************************************************************
* G4Track Information: Particle = mu+, Track ID = 2, Parent ID = 1
@@ -176,8 +175,7 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 31.9 m 0 fm 0 fm 70.2 TeV 0 eV 0 fm 0 fm Iron initStep
1 217 m 2.91 cm 4.76 cm 20.6 TeV 49.6 TeV 185 m 185 m Iron MuIoni
2 250 m 2.96 cm 4.72 cm 13.3 TeV 7.3 TeV 33.1 m 218 m OutOfWorld Transportation
1 250 m 27.6 mum 22.6 mum 40.5 TeV 29.7 TeV 218 m 218 m OutOfWorld Transportation
*********************************************************************************************************
* G4Track Information: Particle = gamma, Track ID = 1, Parent ID = 0
@@ -185,23 +183,7 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 -250 m 0 fm 0 fm 100 TeV 0 eV 0 fm 0 fm Iron initStep
1 120 m 0 fm 0 fm 0 eV 0 eV 370 m 370 m Iron GammaToMuPair
*********************************************************************************************************
* G4Track Information: Particle = mu-, Track ID = 3, Parent ID = 1
*********************************************************************************************************
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 120 m 0 fm 0 fm 20 TeV 0 eV 0 fm 0 fm Iron initStep
1 250 m 1.11 mm 1.17 mm 9.94 TeV 10.1 TeV 130 m 130 m OutOfWorld Transportation
*********************************************************************************************************
* G4Track Information: Particle = mu+, Track ID = 2, Parent ID = 1
*********************************************************************************************************
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 120 m 0 fm 0 fm 80 TeV 0 eV 0 fm 0 fm Iron initStep
1 250 m -277 mum -292 mum 44.2 TeV 35.8 TeV 130 m 130 m OutOfWorld Transportation
1 250 m 0 fm 0 fm 100 TeV 0 eV 500 m 500 m OutOfWorld Transportation
*********************************************************************************************************
* G4Track Information: Particle = gamma, Track ID = 1, Parent ID = 0
@@ -209,31 +191,7 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 -250 m 0 fm 0 fm 100 TeV 0 eV 0 fm 0 fm Iron initStep
1 91.5 m 0 fm 0 fm 0 eV 0 eV 342 m 342 m Iron GammaToMuPair
*********************************************************************************************************
* G4Track Information: Particle = mu-, Track ID = 3, Parent ID = 1
*********************************************************************************************************
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 91.5 m 0 fm 0 fm 567 GeV 0 eV 0 fm 0 fm Iron initStep
1 130 m -5.6 cm -29.2 cm 416 GeV 151 GeV 38.9 m 38.9 m Iron MuIoni
2 163 m -11.3 cm -37.6 cm 234 GeV 182 GeV 32.1 m 71.1 m Iron MuIoni
3 184 m -15.1 cm -50.6 cm 180 GeV 53.6 GeV 21.6 m 92.6 m Iron MuIoni
4 202 m -12.6 cm -56.7 cm 142 GeV 38.3 GeV 17.7 m 110 m Iron MuIoni
5 217 m -19.3 cm -69.2 cm 112 GeV 30.4 GeV 14.7 m 125 m Iron MuIoni
6 229 m -12.3 cm -69.9 cm 87.3 GeV 24.3 GeV 12 m 137 m Iron MuIoni
7 238 m -10.8 cm -71.5 cm 65.9 GeV 21.4 GeV 9.8 m 147 m Iron MuIoni
8 246 m -3.62 cm -67.1 cm 52.8 GeV 13.1 GeV 7.7 m 155 m Iron MuIoni
9 250 m -9.93 mm -70.1 cm 45.7 GeV 7.14 GeV 3.91 m 158 m OutOfWorld Transportation
*********************************************************************************************************
* G4Track Information: Particle = mu+, Track ID = 2, Parent ID = 1
*********************************************************************************************************
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 91.5 m 0 fm 0 fm 99.4 TeV 0 eV 0 fm 0 fm Iron initStep
1 250 m -40.5 mum -4.92 mum 36 TeV 63.4 TeV 158 m 158 m OutOfWorld Transportation
1 250 m 0 fm 0 fm 100 TeV 0 eV 500 m 500 m OutOfWorld Transportation
*********************************************************************************************************
* G4Track Information: Particle = gamma, Track ID = 1, Parent ID = 0
@@ -241,37 +199,33 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 -250 m 0 fm 0 fm 100 TeV 0 eV 0 fm 0 fm Iron initStep
1 -190 m 0 fm 0 fm 0 eV 0 eV 60.2 m 60.2 m Iron GammaToMuPair
1 -84.8 m 0 fm 0 fm 0 eV 0 eV 165 m 165 m Iron GammaToMuPair
*********************************************************************************************************
* G4Track Information: Particle = mu-, Track ID = 3, Parent ID = 1
*********************************************************************************************************
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 -190 m 0 fm 0 fm 82.5 TeV 0 eV 0 fm 0 fm Iron initStep
1 -61.8 cm -5.73 cm 2.49 cm 21.6 TeV 60.9 TeV 189 m 189 m Iron MuIoni
2 147 m 6.31 mm 1.5 cm 8.1 TeV 13.5 TeV 147 m 336 m Iron MuIoni
3 250 m 8.78 mm 3.44 cm 4.57 TeV 3.53 TeV 103 m 440 m OutOfWorld Transportation
0 -84.8 m 0 fm 0 fm 92 TeV 0 eV 0 fm 0 fm Iron initStep
1 250 m 623 mum -1.81 mm 50 TeV 42 TeV 335 m 335 m OutOfWorld Transportation
*********************************************************************************************************
* G4Track Information: Particle = mu+, Track ID = 2, Parent ID = 1
*********************************************************************************************************
Step# X Y Z KineE dEStep StepLeng TrakLeng Volume Process
0 -190 m 0 fm 0 fm 17.5 TeV 0 eV 0 fm 0 fm Iron initStep
1 -49.3 m 1.44 cm 4.56 cm 7.95 TeV 9.6 TeV 141 m 141 m Iron MuIoni
2 66.3 m -1.14 cm 10.4 cm 4.21 TeV 3.74 TeV 116 m 256 m Iron MuIoni
3 162 m 2.45 cm 19.7 cm 2.45 TeV 1.76 TeV 95.4 m 351 m Iron MuIoni
4 240 m -9.84 mm 24.6 cm 1.4 TeV 1.05 TeV 78.9 m 430 m Iron MuIoni
5 250 m -1.15 cm 25.1 cm 1.3 TeV 93.7 GeV 9.53 m 440 m OutOfWorld Transportation
0 -84.8 m 0 fm 0 fm 8.02 TeV 0 eV 0 fm 0 fm Iron initStep
1 119 m -3.42 mm 8.94 cm 2.06 TeV 5.96 TeV 204 m 204 m Iron MuIoni
2 232 m -9.57 cm 18.7 cm 1.39 TeV 666 GeV 112 m 316 m Iron MuIoni
3 250 m -9.27 cm 18.1 cm 1.31 TeV 83.5 GeV 18.4 m 335 m OutOfWorld Transportation
Run terminated.
Run Summary
Number of events processed : 5
User=0.01s Real=2.04s Sys=0.02s
User=0.01s Real=0.14s Sys=0.01s
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1436682984, 1663224890
Current couple of seeds = 1362242984, 2014133420
----------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: RunAction.hh,v 1.5 2003/10/10 10:42:39 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: RunAction.hh,v 1.7 2004/03/31 16:33:35 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,19 +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();
void cleanHisto();
#ifdef G4ANALYSIS_USE
private:
#ifdef USE_AIDA
AIDA::ITree* tree;
AIDA::IHistogram1D* histo[6];
#endif
#endif
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,4 +1,4 @@
# $Id: run02.mac,v 1.4 2003/10/10 10:42:36 maire Exp $
# $Id: run02.mac,v 1.5 2004/03/15 11:23:16 maire Exp $
#
# Macro file for "TestEm6.cc"
# (can be run in batch, without graphic)
@@ -16,4 +16,4 @@
/gun/energy 100 TeV
/testem/gun/rndm 0.8
#
#/run/beamOn 50000
/run/beamOn 50000
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: EventAction.cc,v 1.3 2003/10/10 10:42:39 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: EventAction.cc,v 1.4 2004/03/15 11:23:16 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
@@ -76,9 +76,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.5 2003/10/10 10:42:39 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: RunAction.cc,v 1.7 2004/03/31 16:33:36 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -33,12 +33,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
@@ -58,7 +56,7 @@ RunAction::~RunAction()
void RunAction::bookHisto()
{
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
// Creating the analysis factory
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
@@ -84,17 +82,17 @@ void RunAction::bookHisto()
delete hf;
delete tf;
delete af;
#endif
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::cleanHisto()
{
#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
}
@@ -112,19 +110,12 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
//histograms
//
if (aRun->GetRunID() == 0) bookHisto();
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::EndOfRunAction(const G4Run*)
{
//draw the events
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
// show Rndm status
HepRandom::showEngineStatus();
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: SteppingAction.cc,v 1.3 2003/10/10 10:42:40 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: SteppingAction.cc,v 1.5 2004/03/31 16:33:36 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
@@ -35,7 +35,7 @@
#include "G4VProcess.hh"
#include "G4ParticleTypes.hh"
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
#include "AIDA/IHistogram1D.h"
#endif
@@ -77,15 +77,15 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
}
G4double xPlus = Eplus/EGamma, xMinus = Eminus/EGamma;
G4double thetaPlus = PGamma.angle(Pplus), thetaMinus = PGamma.angle(Pminus);
#ifdef G4ANALYSIS_USE
static const G4double muonMass=G4MuonPlus::MuonPlus()->GetPDGMass();
G4double GammaPlus=EGamma*xPlus/muonMass;
G4double GammaMinus=EGamma*xMinus/muonMass;
#ifdef USE_AIDA
runAction->GetHisto(0)->fill(1./(1.+pow(thetaPlus*GammaPlus,2)));
runAction->GetHisto(1)->fill(log10(thetaPlus*GammaPlus));
G4double GammaMinus=EGamma*xMinus/muonMass;
runAction->GetHisto(2)->fill(log10(thetaMinus*GammaMinus));
runAction->GetHisto(3)->fill(log10(fabs(thetaPlus *GammaPlus
-thetaMinus*GammaMinus)));