Import Geant4 5.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:15:15 +02:00
parent 37fff30d2e
commit fbd4999cf7
4396 changed files with 56662 additions and 52446 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: exampleB01.cc,v 1.16 2002/11/07 13:50:29 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// --------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: B01DetectorConstruction.hh,v 1.5 2002/11/07 13:47:59 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B01DetectorConstruction_hh
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B01DetectorConstruction.cc,v 1.7 2002/11/22 17:47:57 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B01DetectorConstruction.cc,v 1.9 2003/03/11 13:54:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "g4std/strstream"
@@ -38,7 +38,6 @@
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "PhysicalConstants.h"
// for importance biasing
#include "G4IStore.hh"
@@ -253,22 +252,21 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
fIStore = new G4IStore(*pWorldVolume);
// for the world volume repnum is -1 !
// for the world volume repnum is 0 !
G4int n = 0;
G4double imp =1;
fIStore->AddImportanceGeometryCell(1, *pWorldVolume);
for (G4std::vector<G4VPhysicalVolume *>::iterator it =
physvolumes.begin();
it != physvolumes.end(); it++)
{
imp = pow(2., n++);
G4cout << "Going to assign importance: " << imp << ", to volume: "
<< (*it)->GetName() << G4endl;
if (*it == pWorldVolume)
if (*it != pWorldVolume)
{
// repnum -1
fIStore->AddImportanceGeometryCell(imp, **it, -1);
imp = pow(2., n++);
G4cout << "Going to assign importance: " << imp << ", to volume: "
<< (*it)->GetName() << G4endl;
fIStore->AddImportanceGeometryCell(imp, **it);
}
fIStore->AddImportanceGeometryCell(imp, **it);
}
// the remaining part pf the geometry (rest) gets the same
@@ -22,7 +22,7 @@
//
//
// $Id: B01PhysicsList.cc,v 1.4 2002/11/07 13:48:02 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: B01PrimaryGeneratorAction.cc,v 1.7 2002/11/07 13:48:02 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
+10 -8
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: exampleB02.cc,v 1.13 2002/11/13 15:10:27 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: exampleB02.cc,v 1.14 2003/03/11 13:54:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// --------------------------------------------------------------
@@ -103,17 +103,19 @@ int main(int argc, char **argv)
// ---------------------------------------------------
runManager->SetUserInitialization(new B02PhysicsList);
runManager->SetUserAction(new B02PrimaryGeneratorAction);
runManager->Initialize();
// runManager->Initialize();
// create a parallel detector
B02ImportanceDetectorConstruction *pdet =
new B02ImportanceDetectorConstruction;
runManager->Initialize();
// create an importance
G4IStore aIstore(pdet->GetWorldVolume());
// create a geometry cell for the world volume replpicanumber is -1!
G4GeometryCell gWorldVolumeCell(pdet->GetWorldVolume(), -1);
// create a geometry cell for the world volume replpicanumber is 0!
G4GeometryCell gWorldVolumeCell(pdet->GetWorldVolume(), 0);
// set world volume importance to 1
aIstore.AddImportanceGeometryCell(1, gWorldVolumeCell);
@@ -171,9 +173,9 @@ int main(int argc, char **argv)
// print a table of the scores
G4ScoreTable sp(&aIstore);
sp.Print(b02store.GetMapGeometryCellCellScorer(), myout);
sp.Print(b02store.GetMapGeometryCellCellScorer(), myout);
tree->commit();
tree->close();
@@ -181,7 +183,7 @@ int main(int argc, char **argv)
delete tf;
delete tree;
return 0;
}
+1 -1
View File
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-00 $
Geant4 version $Name: geant4-05-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -22,7 +22,7 @@
//
//
// $Id: B02CellScorer.hh,v 1.1 2002/11/08 14:52:16 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// Class B02CellScorer
@@ -22,7 +22,7 @@
//
//
// $Id: B02CellScorerStore.hh,v 1.1 2002/11/08 14:52:16 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// Class B02CellScorerStore
@@ -22,7 +22,7 @@
//
//
// $Id: B02DetectorConstruction.hh,v 1.3 2002/11/08 14:47:42 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B02DetectorConstruction_hh
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02ImportanceDetectorConstruction.hh,v 1.1 2002/11/08 14:52:16 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B02ImportanceDetectorConstruction.hh,v 1.2 2003/03/11 13:54:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B02ImportanceDetectorConstruction_hh
@@ -22,7 +22,7 @@
//
//
// $Id: B02ScoringDetectorConstruction.hh,v 1.2 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B02ScoringDetectorConstruction_hh
@@ -22,7 +22,7 @@
//
//
// $Id: B02CellScorer.cc,v 1.1 2002/11/08 14:52:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: B02CellScorerStore.cc,v 1.1 2002/11/08 14:52:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02DetectorConstruction.cc,v 1.6 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B02DetectorConstruction.cc,v 1.7 2003/02/19 08:24:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "g4std/strstream"
@@ -38,7 +38,6 @@
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "PhysicalConstants.h"
// for importance biasing
#include "G4IStore.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02ImportanceDetectorConstruction.cc,v 1.2 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B02ImportanceDetectorConstruction.cc,v 1.4 2003/03/11 13:54:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -35,7 +35,6 @@
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
B02ImportanceDetectorConstruction::B02ImportanceDetectorConstruction()
@@ -48,16 +47,21 @@ B02ImportanceDetectorConstruction::~B02ImportanceDetectorConstruction()
void B02ImportanceDetectorConstruction::Construct()
{
G4String name;
G4double A, density, temperature, pressure;
G4int z;
G4String name("none");
G4double A(0), density(universe_mean_density), temperature(0), pressure(0);
G4int z(0);
name = "Galactic";
density = universe_mean_density; //from PhysicalConstants.h
pressure = 3.e-18*pascal;
temperature = 2.73*kelvin;
G4cout << density << " " << kStateGas << G4endl;
G4Material *Galactic =
new G4Material(name="Galactic", z=1, A=1.01*g/mole, density,
new G4Material(name, 1., 1.01*g/mole, density,
kStateGas,temperature,pressure);
//////////////////////////////////
// parallel world cylinder volume
//////////////////////////////////
@@ -87,7 +91,7 @@ void B02ImportanceDetectorConstruction::Construct()
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, -1));
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, 0));
@@ -168,7 +172,7 @@ void B02ImportanceDetectorConstruction::Construct()
0);
G4GeometryCell cell(*pvol, 0);
fPVolumeStore.AddPVolume(cell);
}
const G4VPhysicalVolume &B02ImportanceDetectorConstruction::
@@ -214,3 +218,4 @@ G4VPhysicalVolume &B02ImportanceDetectorConstruction::GetWorldVolume() const{
return *fWorldVolume;
}
@@ -22,7 +22,7 @@
//
//
// $Id: B02PhysicsList.cc,v 1.3 2002/11/08 14:47:48 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: B02PrimaryGeneratorAction.cc,v 1.5 2002/11/08 14:47:48 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02ScoringDetectorConstruction.cc,v 1.5 2002/07/11 08:12:22 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B02ScoringDetectorConstruction.cc,v 1.6 2003/02/19 08:24:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -34,7 +34,6 @@
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
{
+1
View File
@@ -33,6 +33,7 @@ class G4RunManager(_object):
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4RunManager, name)
def BeamOn(*args): return apply(_B03App.G4RunManager_BeamOn,args)
def Initialize(*args): return apply(_B03App.G4RunManager_Initialize,args)
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<C G4RunManager instance at %s>" % (self.this,)
@@ -63,6 +63,8 @@ class B03Application:
self.CellRest = self.pgeom.GetGeometryCell(19)
r = self.base.GetRunManager()
r.Initialize()
def createIstoreAndScorer(self):
if "istore" in dir(self):
@@ -92,7 +94,7 @@ class B03Application:
# set importance of world volume
self.istore. \
AddImportanceGeometryCell(1, G4GeometryCell(self.p_world,-1))
AddImportanceGeometryCell(1, G4GeometryCell(self.p_world,0))
imp_cell_17 = self.istore.GetImportance(self.pgeom.GetGeometryCell(17))
self.istore. \
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: exampleB03.cc,v 1.10 2002/11/18 13:22:48 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// --------------------------------------------------------------
+1 -1
View File
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-00 $
Geant4 version $Name: geant4-05-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: B03App.hh,v 1.3 2002/12/13 11:26:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// --------------------------------------------------------------------
#ifndef B03App_hh
@@ -26,6 +26,7 @@
class G4RunManager {
public:
void BeamOn(int e);
void Initialize();
};
class G4VIStore{
@@ -22,7 +22,7 @@
//
//
// $Id: B03DetectorConstruction.hh,v 1.4 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B03DetectorConstruction_hh
@@ -22,7 +22,7 @@
//
//
// $Id: B03ImportanceDetectorConstruction.hh,v 1.1 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B03ImportanceDetectorConstruction_hh
@@ -22,7 +22,7 @@
//
//
// $Id: B03PhysicsList.hh,v 1.3 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B03PhysicsList_h
@@ -22,7 +22,7 @@
//
//
// $Id: B03PrimaryGeneratorAction.hh,v 1.3 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B03PrimaryGeneratorAction_hh
+3 -3
View File
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: B03App.cc,v 1.3 2002/12/13 11:26:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B03App.cc,v 1.4 2003/03/11 13:54:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
// --------------------------------------------------------------------
#include "B03App.hh"
@@ -60,7 +60,7 @@ B03AppBase::B03AppBase(){
frunMgr->SetUserInitialization(fPhysics);
fPrimary = new B03PrimaryGeneratorAction;
frunMgr->SetUserAction(fPrimary);
frunMgr->Initialize();
// frunMgr->Initialize();
/*
// create the detector for the importances and scoring
@@ -1,27 +1,6 @@
//
// ********************************************************************
// * 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 file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.15u-20021012-1750
* Version 1.3.15u-20021124-1448
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
@@ -751,6 +730,22 @@ static PyObject *_wrap_G4RunManager_BeamOn(PyObject *self, PyObject *args) {
}
static PyObject *_wrap_G4RunManager_Initialize(PyObject *self, PyObject *args) {
PyObject *resultobj;
G4RunManager *arg1 ;
PyObject * obj0 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"O:G4RunManager_Initialize",&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_G4RunManager,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
(arg1)->Initialize();
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject * G4RunManager_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -2131,6 +2126,7 @@ static PyObject * B03AppBase_swigregister(PyObject *self, PyObject *args) {
}
static PyMethodDef SwigMethods[] = {
{ (char *)"G4RunManager_BeamOn", _wrap_G4RunManager_BeamOn, METH_VARARGS },
{ (char *)"G4RunManager_Initialize", _wrap_G4RunManager_Initialize, METH_VARARGS },
{ (char *)"G4RunManager_swigregister", G4RunManager_swigregister, METH_VARARGS },
{ (char *)"G4VIStore_swigregister", G4VIStore_swigregister, METH_VARARGS },
{ (char *)"G4VPhysicalVolume_swigregister", G4VPhysicalVolume_swigregister, METH_VARARGS },
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B03DetectorConstruction.cc,v 1.10 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B03DetectorConstruction.cc,v 1.11 2003/02/19 08:24:36 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "g4std/strstream"
@@ -38,7 +38,6 @@
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "PhysicalConstants.h"
B03DetectorConstruction::B03DetectorConstruction()
{;}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B03ImportanceDetectorConstruction.cc,v 1.2 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B03ImportanceDetectorConstruction.cc,v 1.4 2003/03/11 13:54:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -35,7 +35,6 @@
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
B03ImportanceDetectorConstruction::B03ImportanceDetectorConstruction()
@@ -87,7 +86,7 @@ void B03ImportanceDetectorConstruction::Construct()
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, -1));
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, 0));
@@ -22,7 +22,7 @@
//
//
// $Id: B03PhysicsList.cc,v 1.3 2002/11/08 17:35:19 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: B03PrimaryGeneratorAction.cc,v 1.5 2002/11/08 17:35:19 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
+15 -5
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.21 2002/11/25 10:41:12 dressel Exp $
$Id: History,v 1.23 2003/03/11 14:27:29 dressel Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,11 +17,21 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Nov 25th M. Dressel - exbiasing-V04-01-01
change README
Mar 11th, 2003 M. Dressel - exbiasing-V05-00-01
- changed the replica number of the world volume from -1 to 0
- Initialze() of the G4RunManager is now called after all Materials
and volumes (also in the parallel geometry) are built.
Nov 22th M. Dressel
changed geometry for scoring. Cells must not coinside with
Feb 19th, 2003 G.Cosmo - exbiasing-V05-00-00
- removed redundant inclusion of PhysicalConstants.h.
Now using CLHEP headers.
Nov 25th, 2002 M.Dressel - exbiasing-V04-01-01
- change README
Nov 22th, 2002 M.Dressel
- changed geometry for scoring. Cells must not coinside with
wolrd boundary since tracks would be killed before
scoring is called in the case a track exits a cell into
"out of world".