Import Geant4 7.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 11:11:55 +02:00
parent e083ffb441
commit 516dbf1a58
5914 changed files with 202605 additions and 71141 deletions
@@ -1,4 +1,4 @@
$Id: History,v 1.4 2003/12/03 11:19:09 gcosmo Exp $
$Id: History,v 1.5 2004/12/03 15:52:39 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,9 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Dec. 3rd, 2004 G.Cosmo
- Implemented migration to <cmath>.
Dec. 2nd, 2003 G.Cosmo
- Brought up-to-date with examples/novice/N04.
@@ -22,7 +22,7 @@
//
//
// $Id: hepmcEx01-clhep.cc,v 1.1 2002/11/19 10:33:00 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// --------------------------------------------------------------
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-02-patch-01 $
Geant4 version $Name: geant4-07-00-cand-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-02-patch-01 $
Geant4 version $Name: geant4-07-00-cand-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04EMPhysics.hh,v 1.1 2002/11/19 10:30:53 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04GeneralPhysics.hh,v 1.1 2002/11/19 10:30:53 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: ExN04HadronPhysics.hh,v 1.5 2003/12/03 11:19:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04IonPhysics.hh,v 1.2 2003/12/03 11:19:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04MuonPhysics.hh,v 1.2 2003/12/03 11:19:10 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04RunAction.hh,v 1.1 2002/11/19 10:30:54 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04SteppingVerbose.hh,v 1.1 2002/11/19 10:30:54 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04VisManager.hh,v 1.1 2002/11/19 10:30:55 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -205,8 +205,8 @@ G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
{
G4double phi, x, y, z;
phi = 360.*deg/nomucounter*i;
x = muBox_radius*sin(phi);
y = muBox_radius*cos(phi);
x = muBox_radius*std::sin(phi);
y = muBox_radius*std::cos(phi);
z = 0.*cm;
G4RotationMatrix rm;
rm.rotateZ(phi);
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04EMPhysics.cc,v 1.3 2003/12/03 11:19:10 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -37,7 +37,7 @@ void ExN04Field::GetFieldValue(const double Point[3],double *Bfield) const
{
Bfield[0] = 0.;
Bfield[1] = 0.;
if(abs(Point[2])<zmax && (sqr(Point[0])+sqr(Point[1]))<rmax_sq)
if(std::abs(Point[2])<zmax && (sqr(Point[0])+sqr(Point[1]))<rmax_sq)
{ Bfield[2] = Bz; }
else
{ Bfield[2] = 0.; }
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04GeneralPhysics.cc,v 1.2 2003/06/16 16:48:22 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04HadronPhysics.cc,v 1.5 2003/12/03 11:19:10 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN04HadronPhysics.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04IonPhysics.cc,v 1.3 2003/12/03 11:19:10 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04MuonPhysics.cc,v 1.3 2003/12/03 11:19:10 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04PhysicsList.cc,v 1.3 2003/12/03 11:19:10 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04RunAction.cc,v 1.1 2002/11/19 10:31:39 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04SteppingVerbose.cc,v 1.3 2003/12/03 11:19:10 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04VisManager.cc,v 1.2 2003/11/13 15:11:20 johna Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// John Allison 24th January 1998.
@@ -22,7 +22,7 @@
//
//
// $Id: hepmcEx01.cc,v 1.2 2002/11/19 10:23:46 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// --------------------------------------------------------------
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-02-patch-01 $
Geant4 version $Name: geant4-07-00-cand-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-02-patch-01 $
Geant4 version $Name: geant4-07-00-cand-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04EMPhysics.hh,v 1.2 2002/11/19 10:15:51 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04GeneralPhysics.hh,v 1.2 2002/11/19 10:15:51 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: ExN04HadronPhysics.hh,v 1.6 2003/12/03 11:03:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04IonPhysics.hh,v 1.3 2003/12/03 11:03:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04MuonPhysics.hh,v 1.3 2003/12/03 11:03:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04RunAction.hh,v 1.1 2002/11/19 10:15:51 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04SteppingVerbose.hh,v 1.1 2002/11/19 10:15:52 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04VisManager.hh,v 1.1 2002/11/19 10:15:52 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -205,8 +205,8 @@ G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
{
G4double phi, x, y, z;
phi = 360.*deg/nomucounter*i;
x = muBox_radius*sin(phi);
y = muBox_radius*cos(phi);
x = muBox_radius*std::sin(phi);
y = muBox_radius*std::cos(phi);
z = 0.*cm;
G4RotationMatrix rm;
rm.rotateZ(phi);
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04EMPhysics.cc,v 1.4 2003/12/03 11:03:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -37,7 +37,7 @@ void ExN04Field::GetFieldValue(const double Point[3],double *Bfield) const
{
Bfield[0] = 0.;
Bfield[1] = 0.;
if(abs(Point[2])<zmax && (sqr(Point[0])+sqr(Point[1]))<rmax_sq)
if(std::abs(Point[2])<zmax && (sqr(Point[0])+sqr(Point[1]))<rmax_sq)
{ Bfield[2] = Bz; }
else
{ Bfield[2] = 0.; }
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04GeneralPhysics.cc,v 1.3 2003/06/16 16:48:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04HadronPhysics.cc,v 1.6 2003/12/03 11:03:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN04HadronPhysics.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04IonPhysics.cc,v 1.4 2003/12/03 11:03:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04MuonPhysics.cc,v 1.4 2003/12/03 11:03:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04PhysicsList.cc,v 1.4 2003/12/03 11:03:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04RunAction.cc,v 1.1 2002/11/19 10:17:05 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04SteppingVerbose.cc,v 1.3 2003/12/03 11:03:07 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: ExN04VisManager.cc,v 1.2 2003/11/13 15:11:12 johna Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// John Allison 24th January 1998.
@@ -1,4 +1,4 @@
$Id: History,v 1.3 2003/11/13 15:26:42 johna Exp $
$Id: History,v 1.4 2004/12/03 15:52:39 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,7 +15,10 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Nov 13th, 2003 John Allison
Dec, 3rd, 2004 G.Cosmo
- Implemented migration to <cmath>.
Nov 13th, 2003 J.Allison
- Reconstructed Vis Manager.
Jul. 04, 2003 G.Cosmo (exHepMC-V05-02-00)
@@ -22,7 +22,7 @@
//
//
// $Id: hepmcEx02-clhep.cc,v 1.1 2002/11/19 10:37:08 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// --------------------------------------------------------------
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-02-patch-01 $
Geant4 version $Name: geant4-07-00-cand-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-02-patch-01 $
Geant4 version $Name: geant4-07-00-cand-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -22,7 +22,7 @@
//
//
// $Id: H02EMPhysics.hh,v 1.1 2002/11/19 10:35:48 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: H02GeneralPhysics.hh,v 1.1 2002/11/19 10:35:48 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: H02IonPhysics.hh,v 1.1 2002/11/19 10:35:49 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: H02MuonPhysics.hh,v 1.1 2002/11/19 10:35:49 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
// ====================================================================
// H02DetectorConstruction.cc
// $Id: H02DetectorConstruction.cc,v 1.3 2003/12/09 15:31:49 gunter Exp $
// $Id: H02DetectorConstruction.cc,v 1.4 2004/12/03 15:52:39 gcosmo Exp $
//
// ====================================================================
#include "H02DetectorConstruction.hh"
@@ -66,7 +66,7 @@ static const G4double DZ_ENDCAP_CAL= 0.5*m;
// [muon system]
static const G4double RIN_BARREL_MUON= 4.3*m;
static const G4double ROUT_BARREL_MUON= 4.5*m;
static const G4double DX_BARREL_MUON= RIN_BARREL_MUON*cos(67.5*deg)-5.*cm;
static const G4double DX_BARREL_MUON= RIN_BARREL_MUON*std::cos(67.5*deg)-5.*cm;
static const G4double DY_BARREL_MUON= 10.*cm;
static const G4double DZ_BARREL_MUON= 7.*m;
@@ -22,7 +22,7 @@
//
//
// $Id: H02EMPhysics.cc,v 1.2 2003/06/16 16:48:46 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -23,7 +23,7 @@
// ====================================================================
//
// H02Field.hh
// $Id: H02Field.cc,v 1.2 2003/12/09 15:31:51 gunter Exp $
// $Id: H02Field.cc,v 1.3 2004/12/03 15:52:40 gcosmo Exp $
//
// ====================================================================
@@ -39,7 +39,7 @@ void H02Field::GetFieldValue(const G4double Point[3], G4double* Bfield) const
Bfield[0]= 0.;
Bfield[1] = 0.;
if(abs(Point[2])<zmax && (sqr(Point[0])+sqr(Point[1]))<rmax_sq) {
if(std::abs(Point[2])<zmax && (sqr(Point[0])+sqr(Point[1]))<rmax_sq) {
Bfield[2]= Bz;
} else {
Bfield[2]= 0.;
@@ -22,7 +22,7 @@
//
//
// $Id: H02GeneralPhysics.cc,v 1.2 2003/06/16 16:48:47 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: H02IonPhysics.cc,v 1.2 2003/06/16 16:48:49 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: H02MuonPhysics.cc,v 1.2 2003/06/16 16:48:51 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: H02PhysicsList.cc,v 1.2 2003/06/16 16:48:52 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: hepmcEx02.cc,v 1.2 2002/05/28 14:19:07 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// --------------------------------------------------------------
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-02-patch-01 $
Geant4 version $Name: geant4-07-00-cand-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-02-patch-01 $
Geant4 version $Name: geant4-07-00-cand-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -22,7 +22,7 @@
//
//
// $Id: H02EMPhysics.hh,v 1.2 2002/11/19 10:25:08 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: H02GeneralPhysics.hh,v 1.2 2002/11/19 10:25:08 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: H02IonPhysics.hh,v 1.2 2002/11/19 10:25:08 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: H02MuonPhysics.hh,v 1.2 2002/11/19 10:25:08 murakami Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
// ====================================================================
// H02DetectorConstruction.cc
// $Id: H02DetectorConstruction.cc,v 1.3 2003/12/09 15:31:19 gunter Exp $
// $Id: H02DetectorConstruction.cc,v 1.4 2004/12/03 15:52:39 gcosmo Exp $
//
// ====================================================================
#include "H02DetectorConstruction.hh"
@@ -66,7 +66,7 @@ static const G4double DZ_ENDCAP_CAL= 0.5*m;
// [muon system]
static const G4double RIN_BARREL_MUON= 4.3*m;
static const G4double ROUT_BARREL_MUON= 4.5*m;
static const G4double DX_BARREL_MUON= RIN_BARREL_MUON*cos(67.5*deg)-5.*cm;
static const G4double DX_BARREL_MUON= RIN_BARREL_MUON*std::cos(67.5*deg)-5.*cm;
static const G4double DY_BARREL_MUON= 10.*cm;
static const G4double DZ_BARREL_MUON= 7.*m;
@@ -22,7 +22,7 @@
//
//
// $Id: H02EMPhysics.cc,v 1.3 2003/06/16 16:48:33 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -23,7 +23,7 @@
// ====================================================================
//
// H02Field.hh
// $Id: H02Field.cc,v 1.2 2003/12/09 15:31:21 gunter Exp $
// $Id: H02Field.cc,v 1.3 2004/12/03 15:52:39 gcosmo Exp $
//
// ====================================================================
@@ -39,7 +39,7 @@ void H02Field::GetFieldValue(const G4double Point[3], G4double* Bfield) const
Bfield[0]= 0.;
Bfield[1] = 0.;
if(abs(Point[2])<zmax && (sqr(Point[0])+sqr(Point[1]))<rmax_sq) {
if(std::abs(Point[2])<zmax && (sqr(Point[0])+sqr(Point[1]))<rmax_sq) {
Bfield[2]= Bz;
} else {
Bfield[2]= 0.;
@@ -22,7 +22,7 @@
//
//
// $Id: H02GeneralPhysics.cc,v 1.3 2003/06/16 16:48:34 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: H02IonPhysics.cc,v 1.3 2003/06/16 16:48:36 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: H02MuonPhysics.cc,v 1.3 2003/06/16 16:48:38 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: H02PhysicsList.cc,v 1.3 2003/06/16 16:48:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -1,4 +1,4 @@
$Id: History,v 1.7 2003/12/03 11:31:22 gcosmo Exp $
$Id: History,v 1.9 2004/12/03 15:54:38 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,9 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Dec 03, 2004 G.Cosmo (exHepMC-V06-02-00)
- Implemented migration to <cmath>.
Dec 02, 2003 G.Cosmo (exHepMC-V05-02-01)
- Brought up-to-date with original novice examples.
- Updated vis-managers.
@@ -0,0 +1,26 @@
# $Id: GNUmakefile,v 1.2 2004/10/28 11:18:27 flei Exp $
# --------------------------------------------------------------
# GNUmakefile for tests module. Gabriele Cosmo, 27/06/98.
# --------------------------------------------------------------
name := exGPS
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
#G4VIS_BUILD_OPENGLX_DRIVER = 0
#G4VIS_USE_OPENGLX = 0
#LDFLAGS += -static
ifdef G4ANALYSIS_USE
CPPFLAGS += `aida-config --include`
LOADLIBS += `aida-config --lib`
endif
@@ -0,0 +1,19 @@
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
example/extended/eventgenerator/exgps History file
------------------------------
This file should be used by the test developer to briefly
summarize all major modifications introduced in the code and keep
track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
03/12/2004, G.Cosmo, (exgps-V06-02-01)
- Implemented migration to <cmath>.
28/10/2004, F.Lei, (exgps-V06-02-00)
- Created.
@@ -0,0 +1,124 @@
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Extended Example for G4GeneralParticleSource (GPS)
---------------------------------------
exGPS is created to demonstrate the usage of G4GeneralParticleSource for generating
primary incident particle according to user defined distributions. These range from simple
monocromatic point source to complicated mutiple sources with various biasing schemes.
More detailed information on the usage of GPS are available on its home site:
http://reat.space.qinetiq.com/gps
-------------------------------------------------------------------------------------------
1. GEOMETRY
Simple geometry consists of a "Vacuum" world and, in it with two other components:
- An alunimium box : 20 x 20 x 20 cm in size, cerntered at the origin.
- A SiO2 sphere: 5 cm in radius and is placed in the centre of the aluminium box.
2. PHYSICS
Tranportation process only for all particles.
3. EVENT:
The event generator is the G4GeneralParticleSource (GPS). The instantiation of G4GeneralParticleSource
is same as that for G4ParticleGun. See the exGPSPrimaryGeneratorAction.cc file for details .
5. VISUALIZATION:
Visualisation of the geometry and the tracks is possible with many of the G4 visualisation packages. An
example of displaying the geometry and tracks using VRML is given in the macro file display_vrml.mac.
6. ANALYSIS:
This example implements an AIDA-compliant analysis manager which creates histograms and ntuples.
If user has an AIDA-compliant tool such as AIDAJNI, ANAPHE, or PI installed on his/her system,
the analysis part of this example can be activated by:
setenv G4ANALYSIS_USE 1
This needs to be done before building the executable.
At the end of an excution, an xml file "exgps.aida" is created by default which contains
histograms and ntuples. User can change the name and type of this output file with the commands
/analysis/filetype new-type
/analysis/fileName new-filename
e.g.
/analysis/filetype hbook
/analysis/filename exgps.hbook
these change the output file type to "hbook" and name to "exgps.hbbok"
The output file conatins 6 histograms and one ntuple:
histogram 1: The energy spectrum of the primary particles.
histogram 2: 2d histogram of primary particle incident position distribution in the X-Y plane.
histogram 3: 2d histogram of primary particle incident position distribution in the X-Z plane.
histogram 4: 2d histogram of primary particle incident position distribution in the Y-Z plane.
histogram 5: 2d histogram of primary particle incident angle distribution in terms of Phi/Cos(Theta).
histogram 6: 2d histogram of primary particle incident angle distribution in terms of Phi/Theta.
The binnings of the histograms can be changed with the UI commands avialable under the
/analysis directory.
In the ntuple the following data are recorded for each incident particle:
Particle Name
Incident Position (x,y,z);
Incident Angle (theta,phi);
Particle weight;
7. GETTING STARTED:
i) If you have an AIDA-compliant analysis package installed, then you should switch on the analysis
part of the example by:
setenv G4ANALYSIS_USE 1
otherwise make sure the G4ANALYSIS_USE is not defined:
unsetenv G4ANALYSIS_USE
ii) Build the exGPS executable:
cd to exgps
gmake clean
gmake
gmake will create tmp and bin directories in your $G4TMP and $G4BIN directories.
The executable, named exGPS, will be created in the $G4BIN/$G4SYSTEM/ directory.
iii) Run the executable:
while in the exgps directory do
$G4BIN/$G4SYSTEM/exGPS exrgps.in
If G4ANALYSIS_USE is defined, one should see a display of the six histograms. If JAIDA is used, one has
to close the plotter window in order to terminate the execution. After the termination one will find
the "exgps.aida", as well as a vrml file "g4_00.wrl" in the directory.
8. FURTHER EXAMPLES of MACRO FILES:
There are a number of g4mac files in the ./macros subdirectory, to show the various features of GPS.
Most of them will lead to the creation of an aida file in the same name as the macro file.
These aida files can be examed and analysed with an analysis tool such as JAS3.
Please see the README file there for further information.
@@ -0,0 +1,9 @@
/vis/scene/create
/vis/open VRML2FILE
/vis/viewer/reset
/vis/viewer/zoom 1.
/vis/viewer/set/style wireframe
/vis/drawVolume
/vis/scene/endOfEventAction accumulate
/tracking/storeTrajectory 1
@@ -0,0 +1,120 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
#ifdef G4UI_USE_XM
#include "G4UIXm.hh"
#endif
#ifdef G4ANALYSIS_USE
#include <AIDA/AIDA.h>
#include "exGPSAnalysisManager.hh"
#endif
#include "exGPSVisManager.hh"
#include "exGPSGeometryConstruction.hh"
#include "exGPSPhysicsList.hh"
#include "exGPSPrimaryGeneratorAction.hh"
#include "exGPSRunAction.hh"
#include "exGPSEventAction.hh"
int main(int argc,char** argv) {
// Construct the default run manager
G4RunManager * runManager = new G4RunManager;
#ifdef G4ANALYSIS_USE
//constructe the analysis manager (need here to activate the UI)
exGPSAnalysisManager* aMgr = exGPSAnalysisManager::getInstance();
#endif
// set mandatory initialization classes
exGPSGeometryConstruction* detector = new exGPSGeometryConstruction;
runManager->SetUserInitialization(detector);
runManager->SetUserInitialization(new exGPSPhysicsList);
// Set optional user action classes
exGPSEventAction* eventAction = new exGPSEventAction();
exGPSRunAction* runAction = new exGPSRunAction();
// set user action classes
runManager->SetUserAction(new exGPSPrimaryGeneratorAction);
runManager->SetUserAction(runAction);
runManager->SetUserAction(eventAction);
G4UIsession* session=0;
if (argc==1) // Define UI session for interactive mode.
{
// G4UIterminal is a (dumb) terminal.
#ifdef G4UI_USE_XM
session = new G4UIXm(argc,argv);
#else
#ifdef G4UI_USE_TCSH
session = new G4UIterminal(new G4UItcsh);
#else
session = new G4UIterminal();
#endif
#endif
}
// visualization manager
G4VisManager* visManager = new exGPSVisManager;
visManager->Initialize();
//Initialize G4 kernel
runManager->Initialize();
// get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
// UI->ApplyCommand("/control/execute display.mac");
if (session) // Define UI session for interactive mode.
{
// G4UIterminal is a (dumb) terminal.
session->SessionStart();
delete session;
}
else // Batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
// job termination
#ifdef G4ANALYSIS_USE
delete aMgr;
#endif
delete visManager;
delete runManager;
return 0;
}
@@ -0,0 +1,39 @@
# focused beam
#
/gps/verbose 0
/gps/particle geantino
#
# the incident surface is in the y-z plane
/gps/pos/type Plane
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
#
# the incident surface is a disc of 10 cm
/gps/pos/shape Circle
/gps/pos/centre -10. 0. 0. cm
/gps/pos/radius 10. cm
# set the focusing point, default is (0, 0, 0)
/gps/ang/type focused
/gps/ang/focuspoint 10 -5 0 cm
#
# the beam energy is in gaussian profile centered at 400 MeV
/gps/ene/type Gauss
/gps/ene/mono 400 MeV
/gps/ene/sigma 50. MeV
#
# commands below are independent of gps
#
#/analysis/filename focus.aida
/analysis/maxeng 800 MeV
/analysis/mineng 200 MeV
/analysis/maxpos 10 cm
/analysis/minpos -10 cm
/event/printModulo 1000
#/tracking/verbose 1
#
/control/execute display_vrml.mac
#
/run/beamOn 20
@@ -0,0 +1,114 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
#ifndef exGPSAnalysisManager_h
#define exGPSAnalysisManager_h 1
#ifdef G4ANALYSIS_USE
#include "globals.hh"
using namespace AIDA;
class AIDA::IAnalysisFactory;
class AIDA::ITree;
class AIDA::IHistogramFactory;
class AIDA::ITupleFactory;
class AIDA::IPlotter;
class exGPSAnalysisMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class exGPSAnalysisManager
{
private:
exGPSAnalysisManager ();
public:
virtual ~exGPSAnalysisManager ();
static exGPSAnalysisManager* getInstance ();
static void dispose();
IHistogramFactory* getHistogramFactory();
ITupleFactory* getTupleFactory();
IPlotter* createPlotter();
public:
void BeginOfRun();
void EndOfRun();
void SetFileName(G4String filename) {fileName = filename;};
void SetFileType(G4String filetype) {fileType = filetype;};
void SetPosMax(G4double pmax) {maxpos = pmax;};
void SetPosMin(G4double pmin) {minpos = pmin;};
void SetEngMax(G4double emax) {maxeng = emax;};
void SetEngMin(G4double emin) {mineng = emin;};
void Fill(G4String, G4double, G4double, G4double, G4double, G4double, G4double, G4double);
private:
static exGPSAnalysisManager* instance;
G4String fileName;
G4String fileType;
IAnalysisFactory* analysisFactory;
IHistogramFactory* hFactory;
ITupleFactory* tFactory;
ITree* tree;
G4double minpos, maxpos;
G4double mineng, maxeng;
IHistogram1D* enerHisto;
IHistogram2D* posiXY;
IHistogram2D* posiXZ;
IHistogram2D* posiYZ;
IHistogram2D* anglCTP;
IHistogram2D* anglTP;
ITuple* tuple;
IPlotter* plotter;
exGPSAnalysisMessenger* analysisMessenger;
};
#endif // G4ANALYSIS_USE
#endif
@@ -0,0 +1,70 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
#ifndef exGPSAnalysisMessenger_h
#define exGPSAnalysisMessenger_h 1
#ifdef G4ANALYSIS_USE
#include "globals.hh"
#include "G4UImessenger.hh"
class exGPSAnalysisManager;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class exGPSAnalysisMessenger: public G4UImessenger
{
public:
exGPSAnalysisMessenger(exGPSAnalysisManager* );
~exGPSAnalysisMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
exGPSAnalysisManager* exGPSAnalysis;
G4UIdirectory* exGPSAnalysisDir;
G4UIcmdWithAString* FileNameCmd;
G4UIcmdWithAString* FileTypeCmd;
G4UIcmdWithADoubleAndUnit* MaxEngCmd;
G4UIcmdWithADoubleAndUnit* MinEngCmd;
G4UIcmdWithADoubleAndUnit* MaxPosCmd;
G4UIcmdWithADoubleAndUnit* MinPosCmd;
};
#endif // G4ANALYSIS_USE
#endif
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
#ifndef exGPSEventAction_h
#define exGPSEventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class exGPSEventActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class exGPSEventAction : public G4UserEventAction
{
public:
exGPSEventAction() ;
virtual ~exGPSEventAction();
public:
virtual void BeginOfEventAction(const G4Event*);
virtual void EndOfEventAction(const G4Event*);
void SetDrawFlag (G4String val) {drawFlag = val;};
void SetPrintModulo(G4int val) {printModulo = val;};
private:
G4String drawFlag;
G4int printModulo;
exGPSEventActionMessenger* eventMessenger;
};
#endif
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: exGPSEventActionMessenger.hh,v 1.3 2004/12/15 15:41:11 gunter Exp $
// GEANT4 tag $Name: geant4-07-00-ref-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef exGPSEventActionMessenger_h
#define exGPSEventActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class exGPSEventAction;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class exGPSEventActionMessenger: public G4UImessenger
{
public:
exGPSEventActionMessenger(exGPSEventAction*);
~exGPSEventActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
exGPSEventAction* eventAction;
G4UIcmdWithAString* DrawCmd;
G4UIcmdWithAnInteger* PrintCmd;
};
#endif
@@ -0,0 +1,50 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
#ifndef exGPSGeometryConstruction1_h
#define exGPSGeometryConstruction1_h 1
//
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
////////////////////////////////////////////////////////////////////////////////
//
class exGPSGeometryConstruction : public G4VUserDetectorConstruction
{
public:
exGPSGeometryConstruction ();
~exGPSGeometryConstruction ();
public:
G4VPhysicalVolume *Construct ();
private:
G4VPhysicalVolume * universe_phys ;
G4VPhysicalVolume * Al_phys ;
G4VPhysicalVolume * aSphere_phys;
};
////////////////////////////////////////////////////////////////////////////////
#endif
@@ -0,0 +1,57 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
#ifndef exGPSPhysicsList_h
#define exGPSPhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class exGPSPhysicsList: public G4VUserPhysicsList
{
public:
exGPSPhysicsList();
~exGPSPhysicsList();
protected:
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
void SetCuts();
public:
protected:
// these methods Construct particles
void ConstructBosons();
void ConstructLeptons();
void ConstructMesons();
void ConstructBaryons();
void ConstructNuclei();
private:
};
#endif
@@ -0,0 +1,48 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
#ifndef exGPSPrimaryGeneratorAction_h
#define exGPSPrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
class G4GeneralParticleSource;
class G4Event;
class exGPSPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
exGPSPrimaryGeneratorAction();
~exGPSPrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4GeneralParticleSource* particleGun;
};
#endif
@@ -0,0 +1,48 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
#ifndef exGPSRunAction_h
#define exGPSRunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class G4Run;
class exGPSRunAction : public G4UserRunAction
{
public:
exGPSRunAction();
~exGPSRunAction();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
private:
};
#endif
@@ -0,0 +1,76 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: exGPSVisManager.hh,v 1.3 2004/12/15 15:41:16 gunter Exp $
// GEANT4 tag $Name: geant4-07-00-ref-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// Example Visualization Manager implementing virtual function
// RegisterGraphicsSystems. Exploits C-pre-processor variables
// G4VIS_USE_DAWN, etc., which are set by the GNUmakefiles if
// environment variables of the same name are set.
// So all you have to do is set environment variables and compile and
// instantiate this in your main().
// Alternatively, you can implement an empty function here and just
// register the systems you want in your main(), e.g.:
// G4VisManager* myVisManager = new MyVisManager;
// myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef exGPSVisManager_h
#define exGPSVisManager_h 1
#ifdef G4VIS_USE
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class exGPSVisManager: public G4VisManager {
public:
exGPSVisManager ();
private:
void RegisterGraphicsSystems ();
};
#endif
#endif
@@ -0,0 +1,142 @@
More info on
http://reat.space.qinetiq.com/gps
-----------------------------------
test1.g4mac
-----------
point source, isotropic radiation, monoenergetic
test2.g4mac
-----------
square plane source, cosine-law radiation, linear energy
test3.g4mac
-----------
rectangular plane source, isotropic radiation, power-law energy
test4.g4mac
-----------
circular plane source, cosine-law radiation, exponential energy
test5.g4mac
-----------
elliptical plane source, isotropic radiation, bremsstrahlung energy
test6.g4mac
-----------
spherical surface source, isotropic radiation, black-body energy
test7.g4mac
-----------
cylindrical surface source, cosine-law radiation, Cosmic diffuse energy
test8.g4mac
-----------
elliptical surface source, isotropic radiation, linear energy
test9.g4mac
-----------
parallepiped surface source, isotropic radiation, linear energy
test10.g4mac
------------
spherical volume source, isotropic radiation, linear energy
test11.g4mac
------------
cylindrical volume source, isotropic radiation, power-law energy
test12.g4mac
------------
elliptical volume source, isotropic radiation, power-law energy
test13.g4mac
------------
parallelepiped volume source, cosine-law radiation, exponential energy
test14.g4mac
------------
rotated circular plane source, isotropic radiation, exponential energy
test15.g4mac
------------
rotated surface cylinder source, isotropic radiation, bremsstrahlung energy
test16.g4mac
------------
rotated parallelepiped volume source, isotropic radiation, bremsstrahlung energy
test17.g4mac
------------
confined spherical volume source, isotropic radiation, exponential energy
test18.g4mac
------------
square plane source, cosine-law radiation, user-defined energy histogram
test19.g4mac
------------
square plane source, cosine-law radiation, arbitrary point-wise energy function with linear interpolation.
test20.g4mac
------------
square plane source, cosine-law radiation, arbitrary point-wise energy function with logarithmic interpolation.
test21.g4mac
------------
square plane source, cosine-law radiation, arbitrary point-wise energy function with exponential interpolation.
test22.g4mac
------------
square plane source, cosine-law radiation, arbitrary point-wise energy function with spline interpolation.
test23.g4mac
------------
square plane source with x and y biasing, user-defined theta and phi distributions, user-defined EPN energy distribution.
test24.g4mac
------------
spherical volume source with z biasing, isotropic radiation with theta and phi biasing, arbitrary point-wise energy function with linear interpolation.
test25.g4mac
------------
spherical volume source, isotropic radiation with theta and phi biasing, user-defined energy histogram
test26.g4mac
------------
square plane source, cosine-law radiation with lower and upper theta and phi limits, linear energy with biasing.
test27.g4mac
------------
square plane source, user-defined theta, arbitrary point-wise energy function with linear interpolation.
test28.g4mac
------------
particle=ion, square plane source, isotropic radiation, monoenergetic energy.
test29.g4mac
------------
plane source of type annulus, cosine-law radiation, exponential energy
test30.g4mac
------------
rotated 1d beam source, Gaussian beam energy
test31.g4mac
------------
two-beam incidence, i.e. multiple sources with relative intensities.
test32.g4mac
------------
Sphere volume source, with biasing in theta and phi
Isotropic directional distribution with theta and phi biasing
test33.g4mac
------------
Focused angular distribution.
test34.g4mac
------------
Two simultaneous sources, both fired at the same time.
@@ -0,0 +1,12 @@
#
/vis/scene/create
/vis/sceneHandler/create OGLIX
/vis/viewer/create
/vis/drawVolume
/vis/viewer/viewpointThetaPhi 30 30
#/vis/viewer/update
/vis/scene/endOfEventAction accumulate
/tracking/storeTrajectory 1
#
@@ -0,0 +1,10 @@
/vis/scene/create
/vis/open DAWNFILE
/vis/viewer/reset
/vis/viewer/zoom 1.
/visviewer/set/style wireframe
/vis/drawVolume
/vis/viewer/update
/tracking/storeTrajectory 1
@@ -0,0 +1,9 @@
/vis/scene/create
/vis/open VRML2FILE
/vis/viewer/reset
/vis/viewer/zoom 1.
/vis/viewer/set/style wireframe
/vis/drawVolume
/vis/scene/endOfEventAction accumulate
/tracking/storeTrajectory 1
@@ -0,0 +1,13 @@
hi/file 0 testFILE.hbook
fortran/file 66 testFILE.ps
meta -66 -111
zone 2 3
hi/pl 1
hi/pl 2
hi/pl 3
hi/pl 4
hi/pl 5
hi/pl 6
close 66
shell ps2gif testFILE.ps
return
+6
View File
@@ -0,0 +1,6 @@
#!/bin/csh -f
foreach i (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31)
cat plot.kumac.template | sed s/'FILE'/$i/g >! temp.kumac
paw -b temp.kumac
end
+5
View File
@@ -0,0 +1,5 @@
#!/bin/csh -f
foreach i (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34)
../bin/Linux-g++/exGPS test$i.g4mac
end
@@ -0,0 +1,13 @@
hi/file 0 test31.hbook
fortran/file 66 test31.ps
meta -66 -111
zone 2 3
hi/pl 1
hi/pl 2
hi/pl 3
hi/pl 4
hi/pl 5
hi/pl 6
close 66
shell ps2gif test31.ps
return
@@ -0,0 +1,21 @@
/gps/particle proton
/gps/pos/type Point
/gps/pos/centre 1. 2. 1. cm
# the above two can be replaced by a single command
# /gps/position 1. 2. 1. cm
#
/gps/ang/type iso
/gps/energy 2. MeV
# commands below are independent of gps
#
/analysis/filename test1.aida
/analysis/maxeng 15 MeV
/analysis/mineng 1 MeV
/analysis/maxpos 5 cm
/analysis/minpos -5 cm
/event/printModulo 10000
#/control/execute display.mac
/run/beamOn 10000
@@ -0,0 +1,23 @@
/gps/particle geantino
/gps/pos/type Volume
/gps/pos/shape Sphere
/gps/pos/centre 2. 2. 2. cm
/gps/pos/radius 2.5 cm
/gps/ang/type iso
/gps/ene/type Lin
/gps/ene/min 2. MeV
/gps/ene/max 10. MeV
/gps/ene/gradient 1.
/gps/ene/intercept 0.
# commands below are independent of gps
#
/analysis/filename test10.aida
/analysis/maxeng 15 MeV
/analysis/mineng 1 MeV
/analysis/maxpos 8 cm
/analysis/minpos -8 cm
/event/printModulo 10000
#/control/execute display.mac
/run/beamOn 10000

Some files were not shown because too many files have changed in this diff Show More