Import Geant4 6.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:41:53 +02:00
parent 4aea781e80
commit 96686e0c8f
6560 changed files with 153347 additions and 238155 deletions
+53 -9
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: exampleB01.cc,v 1.17 2003/06/16 16:47:08 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: exampleB01.cc,v 1.19 2003/08/25 12:32:29 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// --------------------------------------------------------------
@@ -59,6 +59,8 @@
#include "G4Scorer.hh"
#include "G4MassGeometrySampler.hh"
#include "G4IStore.hh"
#include "G4VWeightWindowStore.hh"
#include "G4WeightWindowAlgorithm.hh"
// a score table
#include "G4ScoreTable.hh"
@@ -66,6 +68,12 @@
int main(int argc, char **argv)
{
G4int mode = 0;
if (argc>1) {
mode = atoi(argv[1]);
}
std::ostream *myout = &G4cout;
G4int numberOfEvent = 100;
@@ -83,24 +91,60 @@ int main(int argc, char **argv)
runManager->SetUserAction(new B01PrimaryGeneratorAction);
runManager->Initialize();
// the IStore is filled during detector construction
G4IStore &aIstore = *detector->GetIStore();
// pointers for importance store, weight window sotre
// and weight window algorithm
G4VIStore *aIstore = 0;
G4VWeightWindowStore *aWWstore = 0;
G4VWeightWindowAlgorithm *wwAlg = 0;
// create the importance and scoring sampler for biasing and scoring
// in the tracking world
// use a scorer
G4Scorer scorer;
// create sampler for biasing and scoring
// in the mass geometry
G4MassGeometrySampler mgs("neutron");
mgs.PrepareScoring(&scorer);
mgs.PrepareImportanceSampling(&aIstore, 0);
if (mode == 0) {
// prepare for importance sampling
aIstore = detector->CreateImportanceStore();
mgs.PrepareImportanceSampling(aIstore, 0);
}
else {
// prepare for weight window technique
// in this case the algoritm is initialized such that
// the weight window tehcnique does exactly the same as
// the importance sampling technique, therefore
// the place of action ( the locations where
// splitting and Russian roulette are to be applied)
// is chosen to be on the boundary between cells.
aWWstore = detector->CreateWeightWindowStore();
wwAlg = new G4WeightWindowAlgorithm(1, // upper limit factor
1, // survival factor
100); // max. number of splitting
mgs.PrepareWeightWindow(aWWstore, wwAlg,
onBoundary); // place of action
}
mgs.Configure();
runManager->BeamOn(numberOfEvent);
// print a table of the scores
G4ScoreTable sp(&aIstore);
G4ScoreTable sp(aIstore);
sp.Print(scorer.GetMapGeometryCellCellScorer(), myout);
if (aIstore) {
delete aIstore;
}
if (aWWstore) {
delete aWWstore;
}
if (wwAlg) {
delete wwAlg;
}
return 0;
}
@@ -0,0 +1,280 @@
**********************************************
Geant4 version $Name: geant4-06-00 $
(3-October-2003)
Copyright : Geant4 Collaboration
**********************************************
phot: Total cross sections from Sandia parametrisation.
B01PhysicsList::SetCuts:CutLength : 1 (mm)
Going to assign importance: 1, to volume: cell_01
Going to assign importance: 2, to volume: cell_02
Going to assign importance: 4, to volume: cell_03
Going to assign importance: 8, to volume: cell_04
Going to assign importance: 16, to volume: cell_05
Going to assign importance: 32, to volume: cell_06
Going to assign importance: 64, to volume: cell_07
Going to assign importance: 128, to volume: cell_08
Going to assign importance: 256, to volume: cell_09
Going to assign importance: 512, to volume: cell_10
Going to assign importance: 1024, to volume: cell_11
Going to assign importance: 2048, to volume: cell_12
Going to assign importance: 4096, to volume: cell_13
Going to assign importance: 8192, to volume: cell_14
Going to assign importance: 16384, to volume: cell_15
Going to assign importance: 32768, to volume: cell_16
Going to assign importance: 65536, to volume: cell_17
Going to assign importance: 131072, to volume: cell_18
=== G4ProcessPlacer::AddProcessAsSecondDoIt: for: neutron
ProcessName: MScoreProcess
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
Transportation
DoIt Vector:
Transportation
LElastic
inelastic
LFission
LCapture
Decay
The final Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
MScoreProcess
Transportation
DoIt Vector:
Transportation
MScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
================================================
=== G4ProcessPlacer::AddProcessAsSecondDoIt: for: neutron
ProcessName: MassImportanceProcess
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
MScoreProcess
Transportation
DoIt Vector:
Transportation
MScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
The final Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
MScoreProcess
MassImportanceProcess
Transportation
DoIt Vector:
Transportation
MassImportanceProcess
MScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
================================================
conv: Total cross sections from a parametrisation. Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1.022 MeV to 100 GeV in 100 bins.
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 1 keV to 100 GeV in 80 bins.
msc: Model variant of multiple scattering for e-
Lambda tables from 100 eV to 100 TeV in 120 bins.
Boundary algorithm is active with facrange= 0.199
eIoni: tables are built for e-
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= 1, integral: 1
Delta cross sections from Moller+Bhabha, good description from 1 KeV to 100 GeV.
eBrem: tables are built for e-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Total cross sections from a parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV, log scale extrapolation above 100 GeV.
eIoni: tables are built for e+
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= 1, integral: 1
Delta cross sections from Moller+Bhabha, good description from 1 KeV to 100 GeV.
eBrem: tables are built for e+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Total cross sections from a parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV, log scale extrapolation above 100 GeV.
annihil: Total cross section from Heilter formula(annihilation into 2 photons).
gamma energies sampled according Heitler
PhysicsTables from 10 keV to 10 TeV in 100 bins.
msc: Model variant of multiple scattering for proton
Lambda tables from 100 eV to 100 TeV in 120 bins.
Boundary algorithm is active with facrange= 0.199
hIoni: tables are built for proton
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
Bether-Bloch model for Escaled > 2 MeV, parametrisation of Bragg peak below, Integral mode 0
msc: Model variant of multiple scattering for mu+
Lambda tables from 100 eV to 100 TeV in 120 bins.
Boundary algorithm is active with facrange= 0.199
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
Bether-Bloch model for E > 0.2 MeV parametrisation of Bragg peak below.
MuBrems: 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.
Parametrised model
MuPairProd: 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.
Parametrised model
### All dEdx and Range tables are built #####
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
Bether-Bloch model for E > 0.2 MeV parametrisation of Bragg peak below.
msc: Model variant of multiple scattering for pi-
Lambda tables from 100 eV to 100 TeV in 120 bins.
Boundary algorithm is active with facrange= 0.199
Volume name | Importance| Tr.Entering| Population| Collisions| Coll*WGT| NumWGTedE| FluxWGTedE| Av.Tr.WGT|
cell_01_rep:0............ | 1 | 114 | 134 | 110 | 110 | 7.40303 | 9.22688 | 1 |
cell_02_rep:0............ | 2 | 81 | 171 | 201 | 100.5 | 6.01133 | 8.47808 | 1 |
cell_03_rep:0............ | 4 | 112 | 230 | 254 | 63.5 | 5.71079 | 8.28133 | 1 |
cell_04_rep:0............ | 8 | 145 | 293 | 386 | 48.25 | 4.61676 | 7.73542 | 1 |
cell_05_rep:0............ | 16 | 147 | 323 | 444 | 27.75 | 3.61001 | 7.51528 | 1 |
cell_06_rep:0............ | 32 | 170 | 350 | 460 | 14.375 | 0.171091 | 7.41748 | 1 |
cell_07_rep:0............ | 64 | 189 | 420 | 575 | 8.98438 | 0.0460408 | 7.47914 | 1 |
cell_08_rep:0............ | 128 | 224 | 476 | 705 | 5.50781 | 2.69504 | 6.8239 | 1 |
cell_09_rep:0............ | 256 | 229 | 496 | 820 | 3.20312 | 0.366871 | 6.32006 | 1 |
cell_10_rep:0............ | 512 | 275 | 539 | 893 | 1.74414 | 2.05898 | 6.19657 | 1 |
cell_11_rep:0............ | 1024 | 317 | 665 | 1146 | 1.11914 | 0.218009 | 5.85921 | 1 |
cell_12_rep:0............ | 2048 | 322 | 668 | 1220 | 0.595703 | 0.124351 | 5.69458 | 1 |
cell_13_rep:0............ | 4096 | 354 | 711 | 1467 | 0.358154 | 1.50433 | 4.97726 | 1 |
cell_14_rep:0............ | 8192 | 377 | 785 | 1627 | 0.198608 | 1.40615 | 4.74936 | 1 |
cell_15_rep:0............ | 16384 | 420 | 833 | 1728 | 0.105469 | 1.62041 | 4.7153 | 1 |
cell_16_rep:0............ | 32768 | 379 | 756 | 1486 | 0.0453491 | 2.53735 | 5.00551 | 1 |
cell_17_rep:0............ | 65536 | 406 | 844 | 1579 | 0.0240936 | 0.0346509 | 4.73638 | 1 |
cell_18_rep:0............ | 131072 | 367 | 856 | 1694 | 0.0129242 | 2.43149 | 4.63503 | 1 |
rest_rep:0............... | 131072 | 391 | 391 | 0 | 0 | 0 | 0 | 0 |
shieldWorld_rep:0........ | 1 | 9 | 109 | 0 | 0 | 10 | 10 | 1 |
=== G4ProcessPlacer::RemoveProcess: for: neutron
ProcessName: MassImportanceProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
MScoreProcess
MassImportanceProcess
Transportation
DoIt Vector:
Transportation
MassImportanceProcess
MScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
The final Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
MScoreProcess
Transportation
DoIt Vector:
Transportation
MScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
================================================
=== G4ProcessPlacer::RemoveProcess: for: neutron
ProcessName: MScoreProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
MScoreProcess
Transportation
DoIt Vector:
Transportation
MScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
The final Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
Transportation
DoIt Vector:
Transportation
LElastic
inelastic
LFission
LCapture
Decay
================================================
WARNING - Attempt to delete the physical volume store while geometry closed !
WARNING - Attempt to delete the logical volume store while geometry closed !
WARNING - Attempt to delete the solid store while geometry closed !
WARNING - Attempt to delete the region store while geometry closed !
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B01DetectorConstruction.hh,v 1.5 2002/11/07 13:47:59 dressel Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: B01DetectorConstruction.hh,v 1.6 2003/08/25 12:32:29 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
#ifndef B01DetectorConstruction_hh
@@ -30,9 +30,10 @@
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include <vector>
class G4VPhysicalVolume;
class G4IStore;
class G4VIStore;
class G4VWeightWindowStore;
class B01DetectorConstruction : public G4VUserDetectorConstruction
{
@@ -41,13 +42,18 @@ public:
~B01DetectorConstruction();
G4VPhysicalVolume* Construct();
G4IStore* GetIStore();
G4VIStore* CreateImportanceStore();
// create an importance store, caller is responsible for deleting it
G4VWeightWindowStore *CreateWeightWindowStore();
// create an weight window store, caller is responsible for
// deleting it
G4String GetCellName(G4int i);
private:
G4IStore *fIStore;
std::vector< G4VPhysicalVolume * > fPhysicalVolumeVector;
};
#endif
@@ -21,11 +21,13 @@
// ********************************************************************
//
//
// $Id: B01DetectorConstruction.cc,v 1.10 2003/06/16 16:47:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: B01DetectorConstruction.cc,v 1.12 2003/08/25 12:32:29 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
#include "G4Types.hh"
#include <strstream>
#include <set>
#include "globals.hh"
#include "B01DetectorConstruction.hh"
@@ -42,19 +44,16 @@
// for importance biasing
#include "G4IStore.hh"
B01DetectorConstruction::B01DetectorConstruction()
: fIStore(0)
// for weight window technique
#include "G4WeightWindowStore.hh"
B01DetectorConstruction::B01DetectorConstruction() :
fPhysicalVolumeVector()
{;}
B01DetectorConstruction::~B01DetectorConstruction()
{;}
G4IStore* B01DetectorConstruction::GetIStore()
{
if (!fIStore) G4Exception("B01DetectorConstruction::fIStore empty!");
return fIStore;
}
G4VPhysicalVolume* B01DetectorConstruction::Construct()
{
G4double pos_x;
@@ -140,9 +139,8 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 101*cm; // dont't have scoring
// cells coinside eith world volume boundary
G4double hightCylinder = 105*cm;
G4double outerRadiusCylinder = 100*cm;
G4double hightCylinder = 100*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*deg;
@@ -164,12 +162,11 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
name, 0, false, 0);
std::vector< G4VPhysicalVolume * > physvolumes;
physvolumes.push_back(pWorldVolume);
fPhysicalVolumeVector.push_back(pWorldVolume);
// creating 18 slobs of 10 cm thick concrete
// creating 18 slabs of 10 cm thick concrete
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
@@ -212,15 +209,15 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
worldCylinder_log,
false,
0);
physvolumes.push_back(pvol);
fPhysicalVolumeVector.push_back(pvol);
}
// filling the rest of the world volumr behind the concrete with
// another slob which should get the same importance value as the
// last slob
// another slab which should get the same importance value
// or lower weight bound as the last slab
innerRadiusShield = 0*cm;
outerRadiusShield = 100*cm;
hightShield = 7.5*cm;
hightShield = 5*cm;
startAngleShield = 0*deg;
spanningAngleShield = 360*deg;
@@ -237,7 +234,7 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = 97.5*cm;
pos_z = 95*cm;
G4VPhysicalVolume *pvol_rest =
new G4PVPlacement(0,
G4ThreeVector(pos_x, pos_y, pos_z),
@@ -247,34 +244,104 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
false,
0);
fPhysicalVolumeVector.push_back(pvol_rest);
return pWorldVolume;
}
G4VIStore *B01DetectorConstruction::CreateImportanceStore() {
if (!fPhysicalVolumeVector.size()) {
G4Exception("B01DetectorConstruction::CreateImportanceStore: no physical volumes created yet!");
}
G4VPhysicalVolume *pWorldVolume = fPhysicalVolumeVector[0];
// creating and filling the importance store
G4IStore *istore = new G4IStore(*pWorldVolume);
fIStore = new G4IStore(*pWorldVolume);
// for the world volume repnum is 0 !
G4int n = 0;
G4double imp =1;
fIStore->AddImportanceGeometryCell(1, *pWorldVolume);
istore->AddImportanceGeometryCell(1, *pWorldVolume);
for (std::vector<G4VPhysicalVolume *>::iterator it =
physvolumes.begin();
it != physvolumes.end(); it++)
fPhysicalVolumeVector.begin();
it != fPhysicalVolumeVector.end() - 1; it++)
{
if (*it != pWorldVolume)
{
imp = pow(2., n++);
G4cout << "Going to assign importance: " << imp << ", to volume: "
<< (*it)->GetName() << G4endl;
fIStore->AddImportanceGeometryCell(imp, **it);
istore->AddImportanceGeometryCell(imp, *(*it));
}
}
// the remaining part pf the geometry (rest) gets the same
// importance as the last conrete cell
fIStore->AddImportanceGeometryCell(imp, *pvol_rest);
istore->
AddImportanceGeometryCell(imp,
*(fPhysicalVolumeVector[fPhysicalVolumeVector
.size()-1]));
return istore;
}
return pWorldVolume;
G4VWeightWindowStore *B01DetectorConstruction::CreateWeightWindowStore() {
if (!fPhysicalVolumeVector.size()) {
G4Exception("B01DetectorConstruction::CreateWeightWindowStore: no physical volumes created yet!");
}
G4VPhysicalVolume *pWorldVolume = fPhysicalVolumeVector[0];
// creating and filling the weight window store
G4WeightWindowStore *wwstore = new G4WeightWindowStore(*pWorldVolume);
// create one energy region covering the energies of the problem
std::set<G4double, std::less<G4double> > enBounds;
enBounds.insert(1 * GeV);
wwstore->SetGeneralUpperEnergyBounds(enBounds);
G4int n = 0;
G4double lowerWeight =1;
std::vector<G4double> lowerWeights;
lowerWeights.push_back(1);
G4GeometryCell gWorldCell(*pWorldVolume,0);
wwstore->AddLowerWeights(gWorldCell, lowerWeights);
for (std::vector<G4VPhysicalVolume *>::iterator it =
fPhysicalVolumeVector.begin();
it != fPhysicalVolumeVector.end() - 1; it++)
{
if (*it != pWorldVolume)
{
lowerWeight = 1./pow(2., n++);
G4cout << "Going to assign lower weight: " << lowerWeight
<< ", to volume: "
<< (*it)->GetName() << G4endl;
G4GeometryCell gCell(*(*it),0);
lowerWeights.clear();
lowerWeights.push_back(lowerWeight);
wwstore->AddLowerWeights(gCell, lowerWeights);
}
}
// the remaining part pf the geometry (rest) gets the same
// lower weight bound as the last conrete cell
G4GeometryCell gRestCell(*(fPhysicalVolumeVector[fPhysicalVolumeVector
.size()-1]), 0);
wwstore->AddLowerWeights(gRestCell, lowerWeights);
return wwstore;
}
@@ -22,7 +22,7 @@
//
//
// $Id: B01PhysicsList.cc,v 1.5 2003/06/16 16:47:10 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#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-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#include "globals.hh"
+3 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: exampleB02.cc,v 1.15 2003/06/16 16:47:11 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: exampleB02.cc,v 1.16 2003/07/31 08:28:16 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// --------------------------------------------------------------
@@ -86,7 +86,7 @@
int main(int argc, char **argv)
int main(int , char **)
{
std::ostream *myout = &G4cout;
G4int numberOfEvent = 100;
+1 -1
View File
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-02 $
Geant4 version $Name: geant4-06-00 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -22,7 +22,7 @@
//
//
// $Id: B02CellScorer.hh,v 1.2 2003/06/16 16:47:12 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
// ----------------------------------------------------------------------
// Class B02CellScorer
@@ -22,7 +22,7 @@
//
//
// $Id: B02CellScorerStore.hh,v 1.2 2003/06/16 16:47:14 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
// ----------------------------------------------------------------------
// 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-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#ifndef B02DetectorConstruction_hh
@@ -22,7 +22,7 @@
//
//
// $Id: B02ImportanceDetectorConstruction.hh,v 1.3 2003/06/16 16:47:15 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#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-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#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-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
// ----------------------------------------------------------------------
// 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-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -21,10 +21,10 @@
// ********************************************************************
//
//
// $Id: B02DetectorConstruction.cc,v 1.8 2003/06/16 16:47:17 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: B02DetectorConstruction.cc,v 1.10 2003/07/31 11:59:40 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
#include "G4Types.hh"
#include <strstream>
#include "globals.hh"
@@ -189,15 +189,15 @@ G4VPhysicalVolume* B02DetectorConstruction::Construct()
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = 0;
G4VPhysicalVolume *pvol =
new G4PVPlacement(0,
G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log,
name,
worldCylinder_log,
false,
0);
new G4PVPlacement(0,
G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log,
name,
worldCylinder_log,
false,
0);
return pWorldVolume;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02ImportanceDetectorConstruction.cc,v 1.5 2003/06/16 16:47:18 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: B02ImportanceDetectorConstruction.cc,v 1.6 2003/07/31 08:28:16 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
#include "globals.hh"
@@ -49,8 +49,7 @@ void B02ImportanceDetectorConstruction::Construct()
{
G4String name("none");
G4double A(0), density(universe_mean_density), temperature(0), pressure(0);
G4int z(0);
G4double density(universe_mean_density), temperature(0), pressure(0);
name = "Galactic";
density = universe_mean_density; //from PhysicalConstants.h
@@ -22,7 +22,7 @@
//
//
// $Id: B02PhysicsList.cc,v 1.4 2003/06/16 16:47:20 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#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-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#include "globals.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: B02ScoringDetectorConstruction.cc,v 1.6 2003/02/19 08:24:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#include "globals.hh"
-429
View File
@@ -1,429 +0,0 @@
# This file was created automatically by SWIG.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import _B03App
def _swig_setattr(self,class_type,name,value):
if (name == "this"):
if isinstance(value, class_type):
self.__dict__[name] = value.this
if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
del value.thisown
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
self.__dict__[name] = value
def _swig_getattr(self,class_type,name):
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
import types
try:
_object = types.ObjectType
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
class G4RunManager(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4RunManager, name, value)
__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,)
class G4RunManagerPtr(G4RunManager):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4RunManager
_B03App.G4RunManager_swigregister(G4RunManagerPtr)
class G4VIStore(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4VIStore, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4VIStore, name)
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<C G4VIStore instance at %s>" % (self.this,)
class G4VIStorePtr(G4VIStore):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4VIStore
_B03App.G4VIStore_swigregister(G4VIStorePtr)
class G4VPhysicalVolume(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4VPhysicalVolume, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4VPhysicalVolume, name)
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<C G4VPhysicalVolume instance at %s>" % (self.this,)
class G4VPhysicalVolumePtr(G4VPhysicalVolume):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4VPhysicalVolume
_B03App.G4VPhysicalVolume_swigregister(G4VPhysicalVolumePtr)
class G4GeometryCell(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4GeometryCell, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4GeometryCell, name)
def __init__(self,*args):
self.this = apply(_B03App.new_G4GeometryCell,args)
self.thisown = 1
def __del__(self, destroy= _B03App.delete_G4GeometryCell):
try:
if self.thisown: destroy(self)
except: pass
def GetPhysicalVolume(*args): return apply(_B03App.G4GeometryCell_GetPhysicalVolume,args)
def GetReplicaNumber(*args): return apply(_B03App.G4GeometryCell_GetReplicaNumber,args)
def __repr__(self):
return "<C G4GeometryCell instance at %s>" % (self.this,)
class G4GeometryCellPtr(G4GeometryCell):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4GeometryCell
_B03App.G4GeometryCell_swigregister(G4GeometryCellPtr)
class G4IStore(G4VIStore):
__swig_setmethods__ = {}
for _s in [G4VIStore]: __swig_setmethods__.update(_s.__swig_setmethods__)
__setattr__ = lambda self, name, value: _swig_setattr(self, G4IStore, name, value)
__swig_getmethods__ = {}
for _s in [G4VIStore]: __swig_getmethods__.update(_s.__swig_getmethods__)
__getattr__ = lambda self, name: _swig_getattr(self, G4IStore, name)
def __init__(self,*args):
self.this = apply(_B03App.new_G4IStore,args)
self.thisown = 1
def __del__(self, destroy= _B03App.delete_G4IStore):
try:
if self.thisown: destroy(self)
except: pass
def AddImportanceGeometryCell(*args): return apply(_B03App.G4IStore_AddImportanceGeometryCell,args)
def ChangeImportance(*args): return apply(_B03App.G4IStore_ChangeImportance,args)
def GetImportance(*args): return apply(_B03App.G4IStore_GetImportance,args)
def IsKnown(*args): return apply(_B03App.G4IStore_IsKnown,args)
def GetWorldVolume(*args): return apply(_B03App.G4IStore_GetWorldVolume,args)
def __repr__(self):
return "<C G4IStore instance at %s>" % (self.this,)
class G4IStorePtr(G4IStore):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4IStore
_B03App.G4IStore_swigregister(G4IStorePtr)
class G4CellScoreValues(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4CellScoreValues, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4CellScoreValues, name)
def __init__(self,*args):
self.this = apply(_B03App.new_G4CellScoreValues,args)
self.thisown = 1
__swig_setmethods__["fSumSL"] = _B03App.G4CellScoreValues_fSumSL_set
__swig_getmethods__["fSumSL"] = _B03App.G4CellScoreValues_fSumSL_get
if _newclass:fSumSL = property(_B03App.G4CellScoreValues_fSumSL_get,_B03App.G4CellScoreValues_fSumSL_set)
__swig_setmethods__["fSumSLW"] = _B03App.G4CellScoreValues_fSumSLW_set
__swig_getmethods__["fSumSLW"] = _B03App.G4CellScoreValues_fSumSLW_get
if _newclass:fSumSLW = property(_B03App.G4CellScoreValues_fSumSLW_get,_B03App.G4CellScoreValues_fSumSLW_set)
__swig_setmethods__["fSumSLW_v"] = _B03App.G4CellScoreValues_fSumSLW_v_set
__swig_getmethods__["fSumSLW_v"] = _B03App.G4CellScoreValues_fSumSLW_v_get
if _newclass:fSumSLW_v = property(_B03App.G4CellScoreValues_fSumSLW_v_get,_B03App.G4CellScoreValues_fSumSLW_v_set)
__swig_setmethods__["fSumSLWE"] = _B03App.G4CellScoreValues_fSumSLWE_set
__swig_getmethods__["fSumSLWE"] = _B03App.G4CellScoreValues_fSumSLWE_get
if _newclass:fSumSLWE = property(_B03App.G4CellScoreValues_fSumSLWE_get,_B03App.G4CellScoreValues_fSumSLWE_set)
__swig_setmethods__["fSumSLWE_v"] = _B03App.G4CellScoreValues_fSumSLWE_v_set
__swig_getmethods__["fSumSLWE_v"] = _B03App.G4CellScoreValues_fSumSLWE_v_get
if _newclass:fSumSLWE_v = property(_B03App.G4CellScoreValues_fSumSLWE_v_get,_B03App.G4CellScoreValues_fSumSLWE_v_set)
__swig_setmethods__["fSumTracksEntering"] = _B03App.G4CellScoreValues_fSumTracksEntering_set
__swig_getmethods__["fSumTracksEntering"] = _B03App.G4CellScoreValues_fSumTracksEntering_get
if _newclass:fSumTracksEntering = property(_B03App.G4CellScoreValues_fSumTracksEntering_get,_B03App.G4CellScoreValues_fSumTracksEntering_set)
__swig_setmethods__["fSumPopulation"] = _B03App.G4CellScoreValues_fSumPopulation_set
__swig_getmethods__["fSumPopulation"] = _B03App.G4CellScoreValues_fSumPopulation_get
if _newclass:fSumPopulation = property(_B03App.G4CellScoreValues_fSumPopulation_get,_B03App.G4CellScoreValues_fSumPopulation_set)
__swig_setmethods__["fSumCollisions"] = _B03App.G4CellScoreValues_fSumCollisions_set
__swig_getmethods__["fSumCollisions"] = _B03App.G4CellScoreValues_fSumCollisions_get
if _newclass:fSumCollisions = property(_B03App.G4CellScoreValues_fSumCollisions_get,_B03App.G4CellScoreValues_fSumCollisions_set)
__swig_setmethods__["fSumCollisionsWeight"] = _B03App.G4CellScoreValues_fSumCollisionsWeight_set
__swig_getmethods__["fSumCollisionsWeight"] = _B03App.G4CellScoreValues_fSumCollisionsWeight_get
if _newclass:fSumCollisionsWeight = property(_B03App.G4CellScoreValues_fSumCollisionsWeight_get,_B03App.G4CellScoreValues_fSumCollisionsWeight_set)
__swig_setmethods__["fNumberWeightedEnergy"] = _B03App.G4CellScoreValues_fNumberWeightedEnergy_set
__swig_getmethods__["fNumberWeightedEnergy"] = _B03App.G4CellScoreValues_fNumberWeightedEnergy_get
if _newclass:fNumberWeightedEnergy = property(_B03App.G4CellScoreValues_fNumberWeightedEnergy_get,_B03App.G4CellScoreValues_fNumberWeightedEnergy_set)
__swig_setmethods__["fFluxWeightedEnergy"] = _B03App.G4CellScoreValues_fFluxWeightedEnergy_set
__swig_getmethods__["fFluxWeightedEnergy"] = _B03App.G4CellScoreValues_fFluxWeightedEnergy_get
if _newclass:fFluxWeightedEnergy = property(_B03App.G4CellScoreValues_fFluxWeightedEnergy_get,_B03App.G4CellScoreValues_fFluxWeightedEnergy_set)
__swig_setmethods__["fAverageTrackWeight"] = _B03App.G4CellScoreValues_fAverageTrackWeight_set
__swig_getmethods__["fAverageTrackWeight"] = _B03App.G4CellScoreValues_fAverageTrackWeight_get
if _newclass:fAverageTrackWeight = property(_B03App.G4CellScoreValues_fAverageTrackWeight_get,_B03App.G4CellScoreValues_fAverageTrackWeight_set)
__swig_setmethods__["fImportance"] = _B03App.G4CellScoreValues_fImportance_set
__swig_getmethods__["fImportance"] = _B03App.G4CellScoreValues_fImportance_get
if _newclass:fImportance = property(_B03App.G4CellScoreValues_fImportance_get,_B03App.G4CellScoreValues_fImportance_set)
def __repr__(self):
return "<C G4CellScoreValues instance at %s>" % (self.this,)
class G4CellScoreValuesPtr(G4CellScoreValues):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4CellScoreValues
_B03App.G4CellScoreValues_swigregister(G4CellScoreValuesPtr)
class G4CellScoreComposer(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4CellScoreComposer, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4CellScoreComposer, name)
def __init__(self,*args):
self.this = apply(_B03App.new_G4CellScoreComposer,args)
self.thisown = 1
def __del__(self, destroy= _B03App.delete_G4CellScoreComposer):
try:
if self.thisown: destroy(self)
except: pass
def GetStandardCellScoreValues(*args): return apply(_B03App.G4CellScoreComposer_GetStandardCellScoreValues,args)
def __repr__(self):
return "<C G4CellScoreComposer instance at %s>" % (self.this,)
class G4CellScoreComposerPtr(G4CellScoreComposer):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4CellScoreComposer
_B03App.G4CellScoreComposer_swigregister(G4CellScoreComposerPtr)
class G4CellScorer(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4CellScorer, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4CellScorer, name)
def GetCellScoreComposer(*args): return apply(_B03App.G4CellScorer_GetCellScoreComposer,args)
def GetCellScoreValues(*args): return apply(_B03App.G4CellScorer_GetCellScoreValues,args)
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<C G4CellScorer instance at %s>" % (self.this,)
class G4CellScorerPtr(G4CellScorer):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4CellScorer
_B03App.G4CellScorer_swigregister(G4CellScorerPtr)
class G4VCellScorerStore(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4VCellScorerStore, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4VCellScorerStore, name)
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<C G4VCellScorerStore instance at %s>" % (self.this,)
class G4VCellScorerStorePtr(G4VCellScorerStore):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4VCellScorerStore
_B03App.G4VCellScorerStore_swigregister(G4VCellScorerStorePtr)
class G4CellScorerStore(G4VCellScorerStore):
__swig_setmethods__ = {}
for _s in [G4VCellScorerStore]: __swig_setmethods__.update(_s.__swig_setmethods__)
__setattr__ = lambda self, name, value: _swig_setattr(self, G4CellScorerStore, name, value)
__swig_getmethods__ = {}
for _s in [G4VCellScorerStore]: __swig_getmethods__.update(_s.__swig_getmethods__)
__getattr__ = lambda self, name: _swig_getattr(self, G4CellScorerStore, name)
def __init__(self,*args):
self.this = apply(_B03App.new_G4CellScorerStore,args)
self.thisown = 1
def __del__(self, destroy= _B03App.delete_G4CellScorerStore):
try:
if self.thisown: destroy(self)
except: pass
def SetAutoScorerCreate(*args): return apply(_B03App.G4CellScorerStore_SetAutoScorerCreate,args)
def AddCellScorer(*args): return apply(_B03App.G4CellScorerStore_AddCellScorer,args)
def GetMapGeometryCellCellScorer(*args): return apply(_B03App.G4CellScorerStore_GetMapGeometryCellCellScorer,args)
def __repr__(self):
return "<C G4CellScorerStore instance at %s>" % (self.this,)
class G4CellScorerStorePtr(G4CellScorerStore):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4CellScorerStore
_B03App.G4CellScorerStore_swigregister(G4CellScorerStorePtr)
class G4VScorer(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4VScorer, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4VScorer, name)
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<C G4VScorer instance at %s>" % (self.this,)
class G4VScorerPtr(G4VScorer):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4VScorer
_B03App.G4VScorer_swigregister(G4VScorerPtr)
class G4CellStoreScorer(G4VScorer):
__swig_setmethods__ = {}
for _s in [G4VScorer]: __swig_setmethods__.update(_s.__swig_setmethods__)
__setattr__ = lambda self, name, value: _swig_setattr(self, G4CellStoreScorer, name, value)
__swig_getmethods__ = {}
for _s in [G4VScorer]: __swig_getmethods__.update(_s.__swig_getmethods__)
__getattr__ = lambda self, name: _swig_getattr(self, G4CellStoreScorer, name)
def __init__(self,*args):
self.this = apply(_B03App.new_G4CellStoreScorer,args)
self.thisown = 1
def __repr__(self):
return "<C G4CellStoreScorer instance at %s>" % (self.this,)
class G4CellStoreScorerPtr(G4CellStoreScorer):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4CellStoreScorer
_B03App.G4CellStoreScorer_swigregister(G4CellStoreScorerPtr)
class G4VImportanceAlgorithm(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4VImportanceAlgorithm, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4VImportanceAlgorithm, name)
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<C G4VImportanceAlgorithm instance at %s>" % (self.this,)
class G4VImportanceAlgorithmPtr(G4VImportanceAlgorithm):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4VImportanceAlgorithm
_B03App.G4VImportanceAlgorithm_swigregister(G4VImportanceAlgorithmPtr)
class G4ParallelGeometrySampler(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4ParallelGeometrySampler, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4ParallelGeometrySampler, name)
def __init__(self,*args):
self.this = apply(_B03App.new_G4ParallelGeometrySampler,args)
self.thisown = 1
def __del__(self, destroy= _B03App.delete_G4ParallelGeometrySampler):
try:
if self.thisown: destroy(self)
except: pass
def PrepareScoring(*args): return apply(_B03App.G4ParallelGeometrySampler_PrepareScoring,args)
def PrepareImportanceSampling(*args): return apply(_B03App.G4ParallelGeometrySampler_PrepareImportanceSampling,args)
def PrepareWeightRoulett(*args): return apply(_B03App.G4ParallelGeometrySampler_PrepareWeightRoulett,args)
def Configure(*args): return apply(_B03App.G4ParallelGeometrySampler_Configure,args)
def ClearSampling(*args): return apply(_B03App.G4ParallelGeometrySampler_ClearSampling,args)
def IsConfigured(*args): return apply(_B03App.G4ParallelGeometrySampler_IsConfigured,args)
def __repr__(self):
return "<C G4ParallelGeometrySampler instance at %s>" % (self.this,)
class G4ParallelGeometrySamplerPtr(G4ParallelGeometrySampler):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4ParallelGeometrySampler
_B03App.G4ParallelGeometrySampler_swigregister(G4ParallelGeometrySamplerPtr)
class G4ScoreTable(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, G4ScoreTable, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4ScoreTable, name)
def __init__(self,*args):
self.this = apply(_B03App.new_G4ScoreTable,args)
self.thisown = 1
def __del__(self, destroy= _B03App.delete_G4ScoreTable):
try:
if self.thisown: destroy(self)
except: pass
def Print(*args): return apply(_B03App.G4ScoreTable_Print,args)
def Write(*args): return apply(_B03App.G4ScoreTable_Write,args)
def __repr__(self):
return "<C G4ScoreTable instance at %s>" % (self.this,)
class G4ScoreTablePtr(G4ScoreTable):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = G4ScoreTable
_B03App.G4ScoreTable_swigregister(G4ScoreTablePtr)
class B03ImportanceDetectorConstruction(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, B03ImportanceDetectorConstruction, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, B03ImportanceDetectorConstruction, name)
def __init__(self,*args):
self.this = apply(_B03App.new_B03ImportanceDetectorConstruction,args)
self.thisown = 1
def __del__(self, destroy= _B03App.delete_B03ImportanceDetectorConstruction):
try:
if self.thisown: destroy(self)
except: pass
def GetPhysicalVolumeByName(*args): return apply(_B03App.B03ImportanceDetectorConstruction_GetPhysicalVolumeByName,args)
def GetWorldVolume(*args): return apply(_B03App.B03ImportanceDetectorConstruction_GetWorldVolume,args)
def ListPhysNames(*args): return apply(_B03App.B03ImportanceDetectorConstruction_ListPhysNames,args)
def GetGeometryCell(*args): return apply(_B03App.B03ImportanceDetectorConstruction_GetGeometryCell,args)
def __repr__(self):
return "<C B03ImportanceDetectorConstruction instance at %s>" % (self.this,)
class B03ImportanceDetectorConstructionPtr(B03ImportanceDetectorConstruction):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = B03ImportanceDetectorConstruction
_B03App.B03ImportanceDetectorConstruction_swigregister(B03ImportanceDetectorConstructionPtr)
class B03AppBase(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, B03AppBase, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, B03AppBase, name)
def __del__(self, destroy= _B03App.delete_B03AppBase):
try:
if self.thisown: destroy(self)
except: pass
__swig_getmethods__["GetB03AppBase"] = lambda x: _B03App.B03AppBase_GetB03AppBase
if _newclass:GetB03AppBase = staticmethod(_B03App.B03AppBase_GetB03AppBase)
def GetRunManager(*args): return apply(_B03App.B03AppBase_GetRunManager,args)
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<C B03AppBase instance at %s>" % (self.this,)
class B03AppBasePtr(B03AppBase):
def __init__(self,this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = B03AppBase
_B03App.B03AppBase_swigregister(B03AppBasePtr)
B03AppBase_GetB03AppBase = _B03App.B03AppBase_GetB03AppBase
@@ -1,15 +1,16 @@
#!/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/PublicDomainPackages/2.0.0/bin/python2.2
#! /usr/bin/env python2.2
# #!/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/PublicDomainPackages/2.0.0/bin/python2.2
# #!/opt/Anaphe/5.0.1/specific/redhat72/gcc-2.95.2/PublicDomainPackages/2.0.0/bin/python2.2
# #!/usr/bin/env python2
# This example needs python2.2 http://www.python.org or later.
#
# This script may be used without or with ANAPHE e.g. lizard.
# Without lizrd: just execute this file.
# With lizrd: start lizard and than do
# Without lizard: just execute this file.
# With lizard: start lizard and than do
# execfile("B03RunApplication.py")
import string
+40 -12
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.9 2002/11/19 15:03:58 mdressel Exp $
# $Id: GNUmakefile,v 1.11 2003/06/30 16:40:27 dressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -15,27 +15,55 @@ ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib _B03App.so bin
include $(G4INSTALL)/config/architecture.gmk
CPPFLAGS += -I$(PYTHON_DIR)/include/python2.2/
SWIGINC = include/B03App.i
SWIGCC = src/B03App_wrap.cc
SWIGD = $(G4WORKDIR)/tmp/$(G4SYSTEM)/exampleB03/B03App_wrap.d
objectfilesWrapper = $(G4WORKDIR)/tmp/$(G4SYSTEM)/exampleB03/B03App_wrap.o
SWIGSO = $(G4WORKDIR)/tmp/$(G4SYSTEM)/exampleB03/_B03App.so
moduleName = B03App
MYLIBS = $(subst -l$(name),,$(LDLIBS))
SWIG = $(ANAPHETOP)/specific/$(PLATF)/PublicDomainPackages/2.0.0/bin/swig-1.3.15
.PHONY: all
all: $(SWIGD) $(SWIGCC) lib $(SWIGSO) bin
CPPFLAGS += -I$(ANAPHETOP)/specific/$(PLATF)/PublicDomainPackages/2.0.0/include/python$(PYTHON_VERSION)
CXXFLAGS += -w
LDFLAGS += \
-L$(PYTHON_DIR)/lib/python2.2/config \
-L$(ANAPHETOP)/specific/$(PLATF)/PublicDomainPackages/2.0.0/lib/python$(PYTHON_VERSION)/config \
-L/lib \
-lnsl -ldl -lreadline /lib/libtermcap.so.2 -lieee -lpthread -lutil -lexampleB03 -lpython2.2
-lnsl -ldl -lreadline /lib/libtermcap.so.2 -lieee -lpthread -lutil -lexampleB03 -lpython$(PYTHON_VERSION)
include $(G4INSTALL)/config/binmake.gmk
libdir = $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
objectfiles = $(shell /bin/ls $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)/*.o)
_B03App.so:
@echo Creating shared library: $(libdir)/$@
$(CXX) -Wl,-soname,$(@F) -shared $(LDFLAGS) $(LDLIBS) -L$(libdir) $(objectfiles) -o $(libdir)/$@
$(SWIGSO): $(objectfilesWrapper)
@echo Creating shared library: $@
$(CXX) -Wl,-soname,$(@F) -shared $(LDFLAGS) $(objectfilesWrapper) $(MYLIBS) -lc -o $(SWIGSO)
src/%_wrap.cc: include/%.i
$(SWIG) -python -c++ -shadow -no_default $(SWIGFLAGS) \
-o $@ $<
@mv src/$(moduleName).py ./
${G4WORKDIR}/tmp/${G4SYSTEM}/$(name):
@mkdir ${G4WORKDIR}/tmp/${G4SYSTEM}/$(name)
#libdir = $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
#objectfiles = $(shell /bin/ls $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)/*.o)
#_B03App.so:
# @echo Creating shared library: $(libdir)/$@
# $(CXX) -Wl,-soname,$(@F) -shared $(LDFLAGS) $(LDLIBS) -L$(libdir) $(objectfiles) -o $(libdir)/$@
-22
View File
@@ -1,22 +0,0 @@
#!/bin/tcsh
# The script uses swig to create c++ code according to the
# file include/B03App.i. It also creates the file B03App.py
# containing the python class wrappers.
# If you need to use this script you have to set the
# variable SWIG according to your installation of swig.
# If you want to use this script please edit the file
# env.csh according to your installation of Anaphe and source
# it before running this script.
source env.csh
cd include/
echo Calling swig
set SWIG=${ANAPHE_BASE}/PublicDomainPackages/2.0.0/bin/swig-1.3.15
$SWIG -python -c++ -shadow -no_default B03App.i
echo moving files
mv B03App_wrap.cxx ../src/B03App_wrap.cc
mv B03App.py ../
cd ..
gmake
-18
View File
@@ -1,18 +0,0 @@
# This is an example script for setting the environment variables
# if you are on a redhat6.1 system at CERN.
# Please source this file before compiling and running
# the example.
#if using afs
setenv PYTHON_DIR /afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/PublicDomainPackages/2.0.0
# if Anaphe is installed in /opt
#setenv PYTHON_DIR /opt/Anaphe/5.0.1/specific/redhat72/gcc-2.95.2/PublicDomainPackages/2.0.0
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/lib/${G4SYSTEM}:${G4WORKDIR}/tmp/${G4SYSTEM}/exampleB03
setenv PYTHONPATH $LD_LIBRARY_PATH.
echo WARNING SETTING: G4LIB_BUILD_SHARED 1
setenv G4LIB_BUILD_SHARED 1
+3 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: exampleB03.cc,v 1.10 2002/11/18 13:22:48 dressel Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: exampleB03.cc,v 1.11 2003/06/30 16:17:02 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// --------------------------------------------------------------
@@ -37,7 +37,7 @@
//
// --------------------------------------------------------------
#include "B03App.hh"
#include "B03AppBase.hh"
#include "globals.hh"
int main(int argc, char **argv)
+1 -1
View File
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-02 $
Geant4 version $Name: geant4-06-00 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -1,7 +1,7 @@
%module B03App
%{
#include "globals.hh"
#include "B03App.hh"
#include "B03AppBase.hh"
#include "G4RunManager.hh"
#include "G4IStore.hh"
#include "G4VCellScorerStore.hh"
@@ -143,7 +143,7 @@ public:
const char *Write(const G4MapGeometryCellCellScorer &cs){
std::ostrstream tmpout;
self->Print(cs, &tmpout);
string *value = new string(tmpout.str());
std::string *value = new std::string(tmpout.str());
return value->c_str();
};
}
@@ -20,12 +20,12 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: B03App.hh,v 1.3 2002/12/13 11:26:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: B03AppBase.hh,v 1.1 2003/06/30 16:17:03 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// --------------------------------------------------------------------
#ifndef B03App_hh
#define B03App_hh B03App_hh
#ifndef B03AppBase_hh
#define B03AppBase_hh B03AppBase_hh
class G4RunManager;
class B03PrimaryGeneratorAction;
@@ -22,7 +22,7 @@
//
//
// $Id: B03DetectorConstruction.hh,v 1.4 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#ifndef B03DetectorConstruction_hh
@@ -22,7 +22,7 @@
//
//
// $Id: B03ImportanceDetectorConstruction.hh,v 1.2 2003/06/16 16:47:22 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#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-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#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-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#ifndef B03PrimaryGeneratorAction_hh
-8
View File
@@ -1,8 +0,0 @@
# for command-line completion :
import sys
import rlcompleter
rlcompleter.readline.parse_and_bind("tab: complete")
@@ -20,11 +20,11 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: B03App.cc,v 1.5 2003/06/16 16:47:24 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: B03AppBase.cc,v 1.1 2003/06/30 16:17:03 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// --------------------------------------------------------------------
#include "B03App.hh"
#include "B03AppBase.hh"
#include <iostream>
#include "CLHEP/Random/Random.h"
File diff suppressed because it is too large Load Diff
@@ -21,10 +21,11 @@
// ********************************************************************
//
//
// $Id: B03DetectorConstruction.cc,v 1.12 2003/06/16 16:47:26 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: B03DetectorConstruction.cc,v 1.13 2003/07/31 11:59:41 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
#include "G4Types.hh"
#include <strstream>
#include "globals.hh"
@@ -21,11 +21,12 @@
// ********************************************************************
//
//
// $Id: B03ImportanceDetectorConstruction.cc,v 1.5 2003/06/16 16:47:27 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: B03ImportanceDetectorConstruction.cc,v 1.6 2003/07/31 11:59:41 dressel Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
#include "globals.hh"
#include "G4Types.hh"
#include <strstream>
#include "B03ImportanceDetectorConstruction.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: B03PhysicsList.cc,v 1.4 2003/06/16 16:47:29 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#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-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
#include "globals.hh"
+11 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.24 2003/06/25 13:01:43 gcosmo Exp $
$Id: History,v 1.27 2003/08/25 12:33:52 dressel Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,16 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Jul 31th, 2003 M. Dressel - exbiasing-V05-02-02
- added weight window example to B01
Jul 31th, 2003 M. Dressel - exbiasing-V05-02-01
- removed some unused arguments in fucntion calls
Jun 30th, 2003 M. Dressel - exbiasing-V05-02-00
- simplified building of B03 and removed files created by swig,
these files are created during gmake now
Jun 25th, 2003 G. Cosmo - exbiasing-V05-01-00
- Added disclaimer of liability where needed.
+87 -58
View File
@@ -3,20 +3,21 @@
--------------------------
This directory includes example applications to demonstrate the usage of
different biasing techniques supported in Geant4, or possible from the
user applications.
different variance reduction techniques supported in Geant4, or possible
from the user applications.
General remark to biasing
-------------------------
General remark to variance reduction
------------------------------------
The tools provided for importance sampling (or geometrical splitting and
Russian roulette) require the user to have a good understanding of the
physics in the problem. This is because the user has to decide which
particle types have to be biased, define the regions (physical volumes,
replicas) and assign importances to that regions. If this is not done
properly it can not be expected that the results describe a real
experiment. The examples given here only demonstrate how to use the tools
technically. They don't intend to produce physical correct results.
Russian roulette) and for the weight window technique require the user to
have a good understanding of the physics in the problem. This is because
the user has to decide which particle types have to be biased, define the
cells (physical volumes, replicas) and assign importances or weight
windows to that cells. If this is not done properly it can not be
expected that the results describe a real experiment. The examples given
here only demonstrate how to use the tools technically. They don't intend
to produce physical correct results.
General remark to scoring
-------------------------
@@ -26,24 +27,27 @@ therefore should inherit from the interface G4VScorer.
An example of an implementation of a scorer is G4Scorer
which may be found in source/event.
The scoring in these examples is done with a G4Scorer.
Importance sampling and scoring does not support all options of the
Geant4 geometry. It only supports physical volumes and simple replicas.
The variance reduction techniques and scoring do not support all options
of the Geant4 geometry. It only supports physical volumes and simple
replicas.
To identify a physical volume (or replica) objects of the class
G4GeometryCell are used. Scoring is done according to these
cells and importance values may be assigned to them.
When scoring is done in a "scoring" or in a "importance" geometry
special action has to be taken to prevent counting of
"collisions" with boundaries of the tracking geometry as interactions.
This is differently handled when scoring is done in the tracking geometry.
cells and importance values or the weight windows may be assigned to
them.
When scoring is done in a parallel geometry special action has to be taken
to prevent counting of "collisions" with boundaries of the mass geometry
as interactions. This is differently handled when scoring is done in the
mass geometry.
--> G4GeometryCell must not share boundaries with the world volume! <--
--> G4GeometryCell of the parallel geometry must not share boundaries with
the world volume! <--
Known problems
--------------
In the following scenario it can happen that a particle is not
biased and it's weight is therefore not changed even if it crosses
a boundary where biasing should happen.
The importance sampling creates particles on boundaries
Importance and weight window sampling create particles on boundaries
between volumes. If the GPIL method of a physical process returns
0 as step length for a particle on a boundary and if the PostStepDoIt of
that process changes the direction of the particle to go back in the
@@ -59,9 +63,21 @@ http://dressel.home.cern.ch/dressel/biasscore/Sampling.html
Example B01
===========
The example uses importance sampling and scoring. Importance values are
defined according to the mass geometry. Scoring is also done in according
to the mass geometry.
The example uses importance sampling or the weight window technique
according to an input parameter. It uses scoring in both cases.
Importance values or weight windows are defined according to the mass
geometry. In this example the weight window technique is configured such
that it behaves equivalent to importance sampling: The window is actually
not a window but simply the inverse of the importance value and only
one energy region is used that covers all energies in the problem.
The user may change the weight window configuration by changing the
initialization of the weight window algorithm in example,cc.
Different energy bounds for the weight window technique may be specified
in B01DetectorConstruction.
The executable takes one optional argument: 0 or 1. Without argument or
with argument: 0, the importance sampling is applied with argument: 1,
the weight window technique is applied.
Example B02
@@ -77,26 +93,28 @@ To compile this example you need AIDA 3.0 installed. To link
and run it you need a AIDA compliant analysis package. The
GNUmakefile of this example shows how to use Anaphe as analysis
package.
The following list shows what to do if you are at CERN using rehat61
and gcc-2.95.2:
use the shell /bin/sh
The following list shows what to do if you are at CERN using rehat73
and gcc-3.2 and the tcsh:
1) set the following variables (for example):
ANAPHETOP=/afs/cern.ch/sw/lhcxx
(or if installed in opt: /opt/Anaphe/5.0.1)
AIDA_DIR=/afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp
setenv ANAPHETOP /afs/cern.ch/sw/lhcxx
(or if installed in opt: /opt/Anaphe/5.0.5)
setenv AIDA_DIR /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp
(or if installed in opt: /opt/AIDA/3.0.0/3.0.0/AIDA/3.0/src/cpp)
export ANAPHETOP AIDA_DIR
2) Source the script:
. $ANAPHETOP/share/LHCXX/5.0.1/scripts/setupAnaphe
source $ANAPHETOP/share/LHCXX/5.0.5/scripts/setupAnaphe.csh
This should set the LD_LIBRARY_PATH and the PATH environment to find the
lizrd executable and Anaphe libraries and header files.
It also sets the environment variable PLATF.
3) and add to lirary path the following directories:
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${G4WORKDIR}/lib/${G4SYSTEM}:${G4WORKDIR}/tmp/${G4SYSTEM}/exampleB02
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/lib/${G4SYSTEM}:${G4WORKDIR}/tmp/${G4SYSTEM}/exampleB02
Now you should be able to run gmake and to run exampleB02.
The example stores the plot in the file b02.hbook.
To look at the histogram using lizard you also may use Anaphe 5.0.1
To look at the histogram using lizard you also may use Anaphe 5.0.5
http://anaphe.web.cern.ch/anaphe/index2.html.
Files in B02:
@@ -108,42 +126,53 @@ Example B03
===========
This example uses Geant4 and in particular importance sampling and
scoring through python. It also creates a histogram.
scoring through python. It creates a simple histogram. It's ment
to demonstrate how to use a customized scorer and importance sampling
in combination with a scripting language, python.
Geant4 code is executed from a python session. Therefore, swig is used
to create python shadow classes and to generate the code necessary to
use the Geant4 libraries from a python session.
For simplicity it is recommended to use Anaphe. Anaphe comes with
python and swig installations.
See http://anaphe.web.cern.ch/
Compiling and running
---------------------
To compile and run this example you need a python2.2 installation
see http://www.python.org.
Please set the environment variable "PYTHON_DIR" to your python2.2
installation e.g:
using afs:
to /afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/PublicDomainPackages/2.0.0
or if Anaphe is installed in opt /opt/Anaphe/5.0.1/specific/redhat72/gcc-2.95.2/PublicDomainPackages/2.0.0.
Please add to your environment variables
Building, compiling and running
-------------------------------
Follow similar steps as for example B02. If you already have
the environment set up for example B02 jump to point 3 below:
1) set the following variables (for example):
setenv ANAPHETOP /afs/cern.ch/sw/lhcxx
(or if installed in opt: /opt/Anaphe/5.0.5)
setenv AIDA_DIR /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp
(or if installed in opt: /opt/AIDA/3.0.0/3.0.0/AIDA/3.0/src/cpp)
2) Source the script:
source $ANAPHETOP/share/LHCXX/5.0.5/scripts/setupAnaphe.csh
3) and add to lirary path the following directories:
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/lib/${G4SYSTEM}:${G4WORKDIR}/tmp/${G4SYSTEM}/exampleB03
and setenv PYTHONPATH $LD_LIBRARY_PATH.
====
setenv PYTHONPATH $LD_LIBRARY_PATH
4) setenv PYTHON_VERSION 2.2
You may run gmake now.
You should be able to execute the file B03RunApplication.py from your
shell now.
If you have Anaphe 5.0.1 installed you may also execute the file
B03RunApplication.py from a lizard session. This will create a
histogram. Therefore you may follow the steps 1 and two
in the above exampleB02.
See http://anaphe.web.cern.ch/anaphe/index2.html.
shell or from a lizard session now.
The histogram is displayed only if the script is beeing ran
from lizard.
Files in B03;
env.csh: Is an example script to set the environment. It should work
if you are at CERN and if you are on a redhat6.1 system.
buildit.sh: You don't need to use this file. Only if you want to
make changes to the python interface defined in B03App.i you may need
to use it.
B03Application.py: Is a example class utilizing importance sampling
and scoring using python.
B03RunApplication.py: Is a python script running the example.
It may be executed from the shell or in a python or lizard
session. In case it is executed from lizard it creates a plot
with a histogram.
B03App.py: Is created by swig using the buildit.sh script.
B03App.py: Is created by swig using swig.