Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1 2002/03/26 16:46:08 dressel Exp $
# $Id: GNUmakefile,v 1.7 2002/11/07 13:47:59 dressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -13,6 +13,8 @@ endif
.PHONY: all
all: lib bin
CPPFLAGS +=
CPPFLAGS +=
include $(G4INSTALL)/config/binmake.gmk
+40 -101
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: exampleB01.cc,v 1.10 2002/05/31 11:46:23 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: exampleB01.cc,v 1.16 2002/11/07 13:50:29 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// --------------------------------------------------------------
@@ -31,34 +31,44 @@
// --------------------------------------------------------------
// Comments
//
// This example intends to show how to use importance sampling and scoring
// in the mass (tracking) geometry.
// A simple geometry consisting of a 180 cm high concrete cylinder
// divided into 18 slabs of 10cm each is created.
// Importance values are assigned to the 18 concrete slabs in the
// detector construction class for simplicity.
// Pairs of G4GeometryCell and importance values are stored in
// the importance store.
// The G4Scorer is used for the scoring. This is a top level
// class using the frame work provided for scoring.
//
// --------------------------------------------------------------
#include "g4std/set"
#include "g4std/iomanip"
#include "g4std/iostream"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "B01DetectorConstruction.hh"
#include "B01PhysicsList.hh"
#include "B01PrimaryGeneratorAction.hh"
// Files specific for scoring
#include "B01Scorer.hh"
#include "G4Sigma.hh"
#include "G4MassScoreSampler.hh"
// Files specific for biasing and scoring
#include "G4Scorer.hh"
#include "G4MassGeometrySampler.hh"
#include "G4IStore.hh"
// a score table
#include "G4ScoreTable.hh"
// helper function for print out
G4std::string FillString(const G4std::string &name, char c, G4int n, G4bool back = true);
int main(int argc, char **argv)
{
G4std::ostream *myout = &G4cout;
G4int numberOfEvent = 1000;
G4int numberOfEvent = 100;
G4String random_status_out_file, random_status_in_file;
G4long myseed = 345354;
HepRandom::setTheSeed(myseed);
@@ -66,102 +76,31 @@ int main(int argc, char **argv)
G4RunManager *runManager = new G4RunManager;
// create the detector ---------------------------
runManager->SetUserInitialization(new B01DetectorConstruction);
B01DetectorConstruction *detector = new B01DetectorConstruction();
runManager->SetUserInitialization(detector);
// ---------------------------------------------------
runManager->SetUserInitialization(new B01PhysicsList);
runManager->SetUserAction(new B01PrimaryGeneratorAction);
runManager->Initialize();
// create scorer and sampler to score neutrons in the detector
B01Scorer mScorer;
G4MassScoreSampler msm(mScorer, "neutron"); // to be don after
msm.Initialize(); // runManager->Initialize()
// the IStore is filled during detector construction
G4IStore &aIstore = *detector->GetIStore();
// create the importance and scoring sampler for biasing and scoring
// in the tracking world
G4Scorer scorer;
G4MassGeometrySampler mgs("neutron");
mgs.PrepareScoring(&scorer);
mgs.PrepareImportanceSampling(&aIstore, 0);
mgs.Configure();
runManager->BeamOn(numberOfEvent);
// ======= after running ============================
// print all the numbers calculated from the scorer
*myout << "output mScorer, mass geometry, neutron" << G4endl;
*myout << mScorer << G4endl;
*myout << "----------------------------------------------" << G4endl;
// print some exclusive numbers
// head line
G4int FieldName = 25;
G4int FieldValue = 12;
G4std::string vname = FillString("Volume name", ' ', FieldName+1);
*myout << vname << '|';
vname = FillString(" AV E/Track ", ' ', FieldValue+1, false);
*myout << vname << '|';
vname = FillString(" sigma", ' ', FieldValue+1);
*myout << vname << '|';
vname = FillString("Coll_Ent.Tr", ' ', FieldValue+1, false);
*myout << vname << '|';
*myout << G4endl;
const G4PMapPtkTallys &m = mScorer.GetMapPtkTallys();
for (G4PMapPtkTallys::const_iterator mit = m.begin();
mit != m.end(); mit++) {
G4PTouchableKey ptk = (*mit).first; // get a key identifying a volume
G4PMapNameTally mtallies = (*mit).second; // get tallies of the volume
G4String name(ptk.fVPhysiclaVolume->GetName()); // print volume name
G4int nEnteringTracks = 0;
G4double colli_EnteringTrack = 0;
G4double meanTrackEnergy = 0, sigmaTrackEnergy = 0;
for (G4PMapNameTally::iterator mt = mtallies.begin();
mt != mtallies.end(); mt++) {
G4String tmp((*mt).first);
if (tmp == "HistorysEntering") {
nEnteringTracks = G4int((*mt).second.GetXsum());
}
if (tmp == "EnergyEnteringHistory") {
meanTrackEnergy = (*mt).second.GetMean();
sigmaTrackEnergy = (*mt).second.GetSigma();
}
if (tmp == "Collisions") {
if (!nEnteringTracks) {
G4cout << "exampleB01: Error nEnteringTracks=0" <<G4endl;
}
else {
colli_EnteringTrack = (*mt).second.GetXsum() / nEnteringTracks;
}
}
}
// print values
G4std::string fname = FillString(name, '.', FieldName);
*myout << fname << " |";
*myout << G4std::setw(FieldValue) << meanTrackEnergy << " |";
*myout << G4std::setw(FieldValue) << sigmaTrackEnergy << " |";
*myout << G4std::setw(FieldValue) << colli_EnteringTrack << " |";
*myout << G4endl;
}
// print a table of the scores
G4ScoreTable sp(&aIstore);
sp.Print(scorer.GetMapGeometryCellCellScorer(), myout);
return 0;
}
G4std::string FillString(const G4std::string &name, char c, G4int n, bool back)
{
G4std::string fname;
G4int k = n - name.size();
if (k > 0) {
if (back) {
fname = name;
fname += G4std::string(k,c);
}
else {
fname = G4std::string(k,c);
fname += name;
}
}
else {
fname = name;
}
return fname;
}
@@ -1,247 +0,0 @@
**********************************************
Geant4 version $Name: geant4-04-01 $
(28-Feb-2002)
Copyright : Geant4 Collaboration
**********************************************
phot: Total cross sections from Sandia parametrisation.
B01PhysicsList::SetCuts:CutLength : 1 (mm)
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: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
eBrem: Total cross sections from a NEW parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
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: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
MuIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuBrems: theoretical cross section
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
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
================================================
output mScorer, mass geometry, neutron
Volume name = worldCylinder_phys, Replica number = -1
HistorysEntering
entries : 331
Sum(w) : 331
Sum(w*x) : 331
Sum(w*x*x) : 331
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 331
Sum(x^2) : 331
EnergyEnteringHistory
entries : 331
Sum(w) : 331
Sum(w*x) : 2868.82
Sum(w*x*x) : 26144.9
mean=Sum(w*x) / Sum(w) : 8.66714
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.96678
Sum(x) : 2868.82
Sum(x^2) : 26144.9
Volume name = cell: 02, shield, Replica number = 0
HistorysEntering
entries : 1066
Sum(w) : 1066
Sum(w*x) : 1066
Sum(w*x*x) : 1066
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1066
Sum(x^2) : 1066
EnergyEnteringHistory
entries : 1066
Sum(w) : 1066
Sum(w*x) : 10503.1
Sum(w*x*x) : 104013
mean=Sum(w*x) / Sum(w) : 9.85277
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0.704593
Sum(x) : 10503.1
Sum(x^2) : 104013
Collisions
entries : 1274
Sum(w) : 1274
Sum(w*x) : 1274
Sum(w*x*x) : 1274
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1274
Sum(x^2) : 1274
Volume name = cell: 03, shield, Replica number = 0
HistorysEntering
entries : 665
Sum(w) : 665
Sum(w*x) : 665
Sum(w*x*x) : 665
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 665
Sum(x^2) : 665
EnergyEnteringHistory
entries : 665
Sum(w) : 665
Sum(w*x) : 6401.76
Sum(w*x*x) : 62732.9
mean=Sum(w*x) / Sum(w) : 9.62671
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.28905
Sum(x) : 6401.76
Sum(x^2) : 62732.9
Collisions
entries : 908
Sum(w) : 908
Sum(w*x) : 908
Sum(w*x*x) : 908
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 908
Sum(x^2) : 908
Volume name = cell: 04, shield, Replica number = 0
HistorysEntering
entries : 376
Sum(w) : 376
Sum(w*x) : 376
Sum(w*x*x) : 376
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 376
Sum(x^2) : 376
EnergyEnteringHistory
entries : 376
Sum(w) : 376
Sum(w*x) : 3528.31
Sum(w*x*x) : 34285
mean=Sum(w*x) / Sum(w) : 9.3838
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.76852
Sum(x) : 3528.31
Sum(x^2) : 34285
Collisions
entries : 522
Sum(w) : 522
Sum(w*x) : 522
Sum(w*x*x) : 522
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 522
Sum(x^2) : 522
----------------------------------------------
Volume name | AV E/Track | sigma | Coll_Ent.Tr|
worldCylinder_phys....... | 8.66714 | 1.96678 | 0 |
cell: 02, shield......... | 9.85277 | 0.704593 | 1.19512 |
cell: 03, shield......... | 9.62671 | 1.28905 | 1.36541 |
cell: 04, shield......... | 9.3838 | 1.76852 | 1.3883 |
+++ G4ProcessPlacer::G4ProcessPlacer: 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 !
@@ -21,17 +21,19 @@
// ********************************************************************
//
//
// $Id: B01DetectorConstruction.hh,v 1.2 2002/04/19 10:54:24 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B01DetectorConstruction.hh,v 1.5 2002/11/07 13:47:59 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef B01DetectorConstruction_hh
#define B01DetectorConstruction_hh B01DetectorConstruction_hh
class G4VPhysicalVolume;
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
class G4IStore;
class B01DetectorConstruction : public G4VUserDetectorConstruction
{
public:
@@ -39,9 +41,13 @@ public:
~B01DetectorConstruction();
G4VPhysicalVolume* Construct();
G4VPhysicalVolume* GetWorldVolume(){return fWorldVolume;}
G4IStore* GetIStore();
G4String GetCellName(G4int i);
private:
G4VPhysicalVolume* fWorldVolume;
G4IStore *fIStore;
};
#endif
@@ -21,10 +21,6 @@
// ********************************************************************
//
//
// $Id: B01PhysicsList.hh,v 1.2 2002/04/19 10:54:24 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B01PhysicsList_h
#define B01PhysicsList_h 1
@@ -65,3 +61,6 @@ class B01PhysicsList: public G4VUserPhysicsList
};
#endif
@@ -21,9 +21,6 @@
// ********************************************************************
//
//
// $Id: B01PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B01PrimaryGeneratorAction_hh
#define B01PrimaryGeneratorAction_hh B01PrimaryGeneratorAction_hh
@@ -47,3 +44,5 @@ class B01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
};
#endif
@@ -1,53 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B01Scorer.hh,v 1.3 2002/04/19 10:54:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B01scorer_hh
#define B01scorer_hh B01scorer_hh
#include "g4std/iostream"
#include "G4VPScorer.hh"
#include "G4PMapPtkTallys.hh"
class G4Step;
class G4PStep;
class B01Scorer : public G4VPScorer
{
public:
B01Scorer();
~B01Scorer();
void Score(const G4Step &aStep, const G4PStep &aPStep);
const G4PMapPtkTallys &GetMapPtkTallys() const { return fPtkTallys; }
private:
G4PMapPtkTallys fPtkTallys;
};
G4std::ostream& operator<<(G4std::ostream &out, const B01Scorer &ps);
#endif
@@ -21,10 +21,13 @@
// ********************************************************************
//
//
// $Id: B01DetectorConstruction.cc,v 1.4 2002/04/19 10:54:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B01DetectorConstruction.cc,v 1.7 2002/11/22 17:47:57 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "g4std/strstream"
#include "globals.hh"
#include "B01DetectorConstruction.hh"
#include "G4Material.hh"
@@ -35,22 +38,26 @@
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "g4std/strstream"
#include "PhysicalConstants.h"
#include "globals.hh"
// for importance biasing
#include "G4IStore.hh"
B01DetectorConstruction::B01DetectorConstruction()
: fWorldVolume(0)
: fIStore(0)
{;}
B01DetectorConstruction::~B01DetectorConstruction()
{;}
G4IStore* B01DetectorConstruction::GetIStore()
{
if (!fIStore) G4Exception("B01DetectorConstruction::fIStore empty!");
return fIStore;
}
G4VPhysicalVolume* B01DetectorConstruction::Construct()
{
char line[255];
G4double pos_x;
G4double pos_y;
G4double pos_z;
@@ -84,7 +91,6 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
A = 28.09*g/mole;
G4Element* elSi = new G4Element(name="Silicon", symbol="Si", Z=14, A);
A = 39.1*g/mole;
G4Element* elK = new G4Element(name="K" ,symbol="K" , Z=19 , A);
@@ -113,21 +119,20 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
Concrete->AddElement(elCa , fractionmass= 0.044);
Concrete->AddElement(elFe , fractionmass= 0.014);
Concrete->AddElement(elC , fractionmass= 0.001);
density = 0.0203*g/cm3;
G4Material* LightConcrete = new G4Material("LightConcrete", density, 10);
LightConcrete->AddElement(elH , fractionmass= 0.01);
LightConcrete->AddElement(elO , fractionmass= 0.529);
LightConcrete->AddElement(elNa , fractionmass= 0.016);
LightConcrete->AddElement(elHg , fractionmass= 0.002);
LightConcrete->AddElement(elAl , fractionmass= 0.034);
LightConcrete->AddElement(elSi , fractionmass= 0.337);
LightConcrete->AddElement(elK , fractionmass= 0.013);
LightConcrete->AddElement(elCa , fractionmass= 0.044);
LightConcrete->AddElement(elFe , fractionmass= 0.014);
LightConcrete->AddElement(elC , fractionmass= 0.001);
G4Material *WorldMaterial = Galactic;
/////////////////////////////
// world cylinder volume
@@ -136,40 +141,36 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 100*cm;
G4double hightCylinder = 15.001*cm;
G4double outerRadiusCylinder = 101*cm; // dont't have scoring
// cells coinside eith world volume boundary
G4double hightCylinder = 105*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*deg;
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical world
G4LogicalVolume *worldCylinder_log =
new G4LogicalVolume(worldCylinder, WorldMaterial, "worldCylinder_log");
new G4LogicalVolume(worldCylinder, Galactic, "worldCylinder_log");
name = "shieldWorld";
G4VPhysicalVolume *pWorldVolume = new
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
G4VisAttributes * WorldVisAtt
= new G4VisAttributes(G4Colour(0.0,0.0,1.0));
WorldVisAtt->SetVisibility(true);
worldCylinder_log->SetVisAttributes(WorldVisAtt);
G4std::vector< G4VPhysicalVolume * > physvolumes;
physvolumes.push_back(pWorldVolume);
// physical world
name = "worldCylinder_phys";
G4VPhysicalVolume* worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
///////////////////////////////////////////////
// shield cylinder for (cells 2-4)
////////////////////////////////////////////////
// creating 18 slobs of 10 cm thick concrete
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
@@ -178,40 +179,117 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
G4double spanningAngleShield = 360*deg;
G4Tubs *aShield = new G4Tubs("aShield",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
// logical shield
G4LogicalVolume *aShield_log =
new G4LogicalVolume(aShield, Concrete, "aShield_log");
G4VisAttributes * shieldVisAtt
= new G4VisAttributes(G4Colour(0.0,1.0,1.0));
shieldVisAtt->SetVisibility(true);
shieldVisAtt->SetForceSolid(false);
aShield_log->SetVisAttributes(shieldVisAtt);
G4VisAttributes* pShieldVis = new
G4VisAttributes(G4Colour(0.0,0.0,1.0));
pShieldVis->SetForceSolid(true);
aShield_log->SetVisAttributes(pShieldVis);
// physical shields
// physical shields for cell 2 to 4
for(G4int i=0; i<3; i++)
{
if (i+2<10) sprintf(line,"cell: 0%d, shield",i+2);
else sprintf(line,"cell: %d, shield",i+2);
G4String name(line);
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = -10*cm+(10*cm)*i;
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log, name, worldCylinder_log, false, 0);
G4int i;
G4double startz = -85*cm;
for (i=1; i<=18; i++) {
name = GetCellName(i);
G4double pos_x = 0*cm;
G4double pos_y = 0*cm;
G4double pos_z = startz + (i-1) * (2*hightShield);
G4VPhysicalVolume *pvol =
new G4PVPlacement(0,
G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log,
name,
worldCylinder_log,
false,
0);
physvolumes.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
innerRadiusShield = 0*cm;
outerRadiusShield = 100*cm;
hightShield = 7.5*cm;
startAngleShield = 0*deg;
spanningAngleShield = 360*deg;
fWorldVolume = worldCylinder_phys;
return worldCylinder_phys;
G4Tubs *aRest = new G4Tubs("Rest",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *aRest_log =
new G4LogicalVolume(aRest, Galactic, "aRest_log");
name = "rest";
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = 97.5*cm;
G4VPhysicalVolume *pvol_rest =
new G4PVPlacement(0,
G4ThreeVector(pos_x, pos_y, pos_z),
aRest_log,
name,
worldCylinder_log,
false,
0);
// creating and filling the importance store
fIStore = new G4IStore(*pWorldVolume);
// for the world volume repnum is -1 !
G4int n = 0;
G4double imp =1;
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)
{
// repnum -1
fIStore->AddImportanceGeometryCell(imp, **it, -1);
}
fIStore->AddImportanceGeometryCell(imp, **it);
}
// the remaining part pf the geometry (rest) gets the same
// importance as the last conrete cell
fIStore->AddImportanceGeometryCell(imp, *pvol_rest);
return pWorldVolume;
}
G4String B01DetectorConstruction::GetCellName(G4int i) {
char st[200];
G4std::ostrstream os(st,200);
os << "cell_";
if (i<10) {
os << "0";
}
os << i
<< '\0';
G4String name(st);
return name;
}
@@ -21,14 +21,15 @@
// ********************************************************************
//
//
// $Id: B01PhysicsList.cc,v 1.2 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B01PhysicsList.cc,v 1.4 2002/11/07 13:48:02 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "globals.hh"
#include "g4std/iomanip"
#include "B01PhysicsList.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
@@ -44,7 +45,7 @@
#include "G4Material.hh"
#include "G4MaterialTable.hh"
B01PhysicsList::B01PhysicsList() : G4VUserPhysicsList()
B01PhysicsList::B01PhysicsList(): G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B01PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:42 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B01PrimaryGeneratorAction.cc,v 1.7 2002/11/07 13:48:02 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "globals.hh"
@@ -40,7 +40,7 @@ B01PrimaryGeneratorAction::B01PrimaryGeneratorAction()
particleGun = new G4ParticleGun(n_particle);
particleGun->SetParticleDefinition(G4Neutron::NeutronDefinition());
particleGun->SetParticleEnergy(10.0*MeV);
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -15.0005*cm));
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -90.0005*cm));
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
}
+7
View File
@@ -0,0 +1,7 @@
# This script may be executed from a lizard session to display
# the histogram in b02.hbook. To create the histogram and the file
# b02.hbook run exampleB02 first.
tree = tf.create ("b02.hbook", "hbook",1,0)
h = tree.findH1D("10")
hplot(h)
+18 -2
View File
@@ -1,8 +1,15 @@
# $Id: GNUmakefile,v 1.1 2002/03/26 16:46:08 dressel Exp $
# $Id: GNUmakefile,v 1.7 2002/11/19 15:03:58 mdressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
# this GNUmakefile shows how to use the example together with Anaphe
# you may also chose another AIDA compliant analysis package.
#
# The environment variable ANAPHETOP has to be setup. See ../README
#
name := exampleB02
G4TARGET := $(name)
G4EXLIB := true
@@ -13,6 +20,15 @@ endif
.PHONY: all
all: lib bin
CPPFLAGS +=
# set this variable to your Anaphe instalation.
ANAPHE_SCRIPTS_PATH:=share/LHCXX/5.0.1/scripts
CPPFLAGS +=
#LDFLAGS += -L/usr/local/lib
include $(G4INSTALL)/config/binmake.gmk
CPPFLAGS += `$(ANAPHETOP)/$(ANAPHE_SCRIPTS_PATH)/aida-config -i`
LDFLAGS += `$(ANAPHETOP)/$(ANAPHE_SCRIPTS_PATH)/aida-config -l`
+117 -98
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: exampleB02.cc,v 1.9 2002/05/31 11:46:23 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: exampleB02.cc,v 1.13 2002/11/13 15:10:27 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// --------------------------------------------------------------
@@ -31,140 +31,159 @@
// --------------------------------------------------------------
// Comments
//
// This example intends to show how to use both importance sampling and a
// customized scoring making use of the scoring framework
// in a parallel geometry.
//
// A simple geometry consisting of a 180 cm high concrete cylinder
// is constructed in the mass geometry.
// A geometry is constructed in the parallel geometry
// in order to assign importance values to slabs
// of width 10cm and for scoring. The parallel world volume should
// overlap the mass world volume and the radii of the slabs is larger
// than the radius of the concrete cylinder in the mass geometry.
// Pairs of G4GeometryCell and importance values are stored in
// the importance store.
// The scoring uses the G4CellSCorer and one customized scorer for
// the last slab.
//
//
// --------------------------------------------------------------
#include "g4std/set"
#include "g4std/iomanip"
#include "g4std/iostream"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "B02DetectorConstruction.hh"
#include "B02PhysicsList.hh"
#include "B02PrimaryGeneratorAction.hh"
#include "B02ScoringDetectorConstruction.hh"
// construction for the parallel geometry
#include "B02ImportanceDetectorConstruction.hh"
// Files specific for biasing and scoring
#include "G4Scorer.hh"
#include "G4ParallelGeometrySampler.hh"
#include "G4IStore.hh"
// customized scorer and store
#include "B02CellScorer.hh"
#include "B02CellScorerStore.hh"
// a score table
#include "G4ScoreTable.hh"
// AIDA stuff
#include "AIDA/IAnalysisFactory.h"
#include "AIDA/ITree.h"
#include "AIDA/ITreeFactory.h"
#include "AIDA/IHistogram1D.h"
#include "AIDA/IHistogramFactory.h"
// Files specific for scoring
#include "B02Scorer.hh"
#include "G4Sigma.hh"
#include "G4ParallelScoreSampler.hh"
// helper function for print out
G4std::string FillString(const G4std::string &name, char c, G4int n, G4bool back = true);
int main(int argc, char **argv)
{
G4std::ostream *myout = &G4cout;
G4int numberOfEvent = 1000;
G4int numberOfEvent = 100;
G4String random_status_out_file, random_status_in_file;
G4long myseed = 345354;
HepRandom::setTheSeed(myseed);
G4RunManager *runManager = new G4RunManager;
// create the "tracking" detector -----------------
runManager->SetUserInitialization(new B02DetectorConstruction);
// create the detector ---------------------------
B02DetectorConstruction *detector = new B02DetectorConstruction();
runManager->SetUserInitialization(detector);
// ---------------------------------------------------
runManager->SetUserInitialization(new B02PhysicsList);
runManager->SetUserAction(new B02PrimaryGeneratorAction);
runManager->Initialize();
// create the detector for scoring
B02ScoringDetectorConstruction scoringdetector;
// create a parallel detector
B02ImportanceDetectorConstruction *pdet =
new B02ImportanceDetectorConstruction;
// create an importance
G4IStore aIstore(pdet->GetWorldVolume());
// create a geometry cell for the world volume replpicanumber is -1!
G4GeometryCell gWorldVolumeCell(pdet->GetWorldVolume(), -1);
// set world volume importance to 1
aIstore.AddImportanceGeometryCell(1, gWorldVolumeCell);
// create a customized cell scorer store
B02CellScorerStore b02store;
// set importance values and create scorers
G4int cell(1);
for (cell=1; cell<=18; cell++) {
G4GeometryCell gCell = pdet->GetGeometryCell(cell);
G4double imp = pow(2,cell-1);
aIstore.AddImportanceGeometryCell(imp, gCell);
// adding the standard G4CellScorer for 17 concrete cells
if (cell<18) {
b02store.AddG4CellScorer(gCell);
}
}
// create a histogram for a special scorer for the last cell
AIDA::IAnalysisFactory *af = AIDA_createAnalysisFactory();
AIDA::ITreeFactory *tf = af->createTreeFactory();
AIDA::ITree *tree = tf->create("b02.hbook", "hbook",false,true);
AIDA::IHistogramFactory *hf = af->createHistogramFactory( *tree );
AIDA::IHistogram1D *h =
hf->createHistogram1D("10","w*sl vs. e", 30, 0., 20*MeV);
// create a special scorer for the last cell
B02CellScorer b02scorer(h);
// create scorer and sampler to score neutrons in the "scoring" detector
B02Scorer pScorer;
G4ParallelScoreSampler pmgr(*(scoringdetector.Construct()),
"neutron", pScorer);
pmgr.Initialize();
// creating the geometry cell and add both to the store
G4GeometryCell gCell = pdet->GetGeometryCell(18);
b02store.AddB02CellScorer(&b02scorer, gCell);
// create importance geometry cell pair for the "rest"cell
// with the same importance as the last concrete cell
gCell = pdet->GetGeometryCell(19);
G4double imp = pow(2,18);
aIstore.AddImportanceGeometryCell(imp, gCell);
// create the importance and scoring sampler for biasing and scoring
// in the parallel world
G4CellStoreScorer scorer(b02store);
G4ParallelGeometrySampler mgs(pdet->GetWorldVolume(),
"neutron");
mgs.PrepareScoring(&scorer);
mgs.PrepareImportanceSampling(&aIstore, 0);
mgs.Configure();
runManager->BeamOn(numberOfEvent);
// ======= after running ============================
// print a table of the scores
G4ScoreTable sp(&aIstore);
sp.Print(b02store.GetMapGeometryCellCellScorer(), myout);
// print all the numbers calculated from the scorer
*myout << "output pScorer, scoring detector, neutron" << G4endl;
*myout << pScorer << G4endl;
*myout << "----------------------------------------------" << G4endl;
// print some exclusive numbers
tree->commit();
tree->close();
// head line
G4int FieldName = 25;
G4int FieldValue = 12;
G4std::string vname = FillString("Volume name", ' ', FieldName+1);
*myout << vname << '|';
vname = FillString(" AV E/Track ", ' ', FieldValue+1, false);
*myout << vname << '|';
vname = FillString(" sigma", ' ', FieldValue+1);
*myout << vname << '|';
vname = FillString("Coll_Ent.Tr", ' ', FieldValue+1, false);
*myout << vname << '|';
*myout << G4endl;
delete af;
delete tf;
delete tree;
const G4PMapPtkTallys &m = pScorer.GetMapPtkTallys();
for (G4PMapPtkTallys::const_iterator mit = m.begin();
mit != m.end(); mit++) {
G4PTouchableKey ptk = (*mit).first; // get a key identifying a volume
G4PMapNameTally mtallies = (*mit).second; // get tallies of the volume
G4String name(ptk.fVPhysiclaVolume->GetName()); // print volume name
G4int nEnteringTracks = 0;
G4double colli_EnteringTrack = 0;
G4double meanTrackEnergy = 0, sigmaTrackEnergy = 0;
for (G4PMapNameTally::iterator mt = mtallies.begin();
mt != mtallies.end(); mt++) {
G4String tmp((*mt).first);
if (tmp == "HistorysEntering") {
nEnteringTracks = G4int((*mt).second.GetXsum());
}
if (tmp == "EnergyEnteringHistory") {
meanTrackEnergy = (*mt).second.GetMean();
sigmaTrackEnergy = (*mt).second.GetSigma();
}
if (tmp == "Collisions") {
if (!nEnteringTracks) {
G4cout << "exampleB01: Error nEnteringTracks=0" <<G4endl;
}
else {
colli_EnteringTrack = (*mt).second.GetXsum() / nEnteringTracks;
}
}
}
// print values
G4std::string fname = FillString(name, '.', FieldName);
*myout << fname << " |";
*myout << G4std::setw(FieldValue) << meanTrackEnergy << " |";
*myout << G4std::setw(FieldValue) << sigmaTrackEnergy << " |";
*myout << G4std::setw(FieldValue) << colli_EnteringTrack << " |";
*myout << G4endl;
}
return 0;
}
G4std::string FillString(const G4std::string &name, char c, G4int n, bool back)
{
G4std::string fname;
G4int k = n - name.size();
if (k > 0) {
if (back) {
fname = name;
fname += G4std::string(k,c);
}
else {
fname = G4std::string(k,c);
fname += name;
}
}
else {
fname = name;
}
return fname;
}
+2 -2
View File
@@ -1,6 +1,6 @@
**********************************************
Geant4 version $Name: geant4-04-01 $
(28-Feb-2002)
Geant4 version $Name: geant4-05-00 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -21,35 +21,52 @@
// ********************************************************************
//
//
// $Id: B05PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:44 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B02CellScorer.hh,v 1.1 2002/11/08 14:52:16 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// ----------------------------------------------------------------------
// Class B02CellScorer
//
// Class description:
//
// This class is an example how to build a customized cell scorer
// derived from G4VCellScorer that also uses the G4CellScorer.
//
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#include "globals.hh"
#ifndef B02CellScorer_hh
#define B02CellScorer_hh B02CellScorer_hh
#include "B05PrimaryGeneratorAction.hh"
#include "G4VCellScorer.hh"
#include "G4CellScoreComposer.hh"
#include "G4CellScorer.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4Neutron.hh"
#include "G4ThreeVector.hh"
#include "g4std/vector"
B05PrimaryGeneratorAction::B05PrimaryGeneratorAction()
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
particleGun->SetParticleDefinition(G4Neutron::NeutronDefinition());
particleGun->SetParticleEnergy(10.0*MeV);
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -15.0005*cm));
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
}
#include "AIDA/IHistogram1D.h"
B05PrimaryGeneratorAction::~B05PrimaryGeneratorAction()
{
delete particleGun;
}
class B02CellScorer : public G4VCellScorer {
public:
B02CellScorer(AIDA::IHistogram1D *h);
virtual ~B02CellScorer();
virtual void ScoreAnExitingStep(const G4Step &aStep,
const G4GeometryCell &gCell);
virtual void ScoreAnEnteringStep(const G4Step &aStep,
const G4GeometryCell &gCell);
virtual void ScoreAnInVolumeStep(const G4Step &aStep,
const G4GeometryCell &gCell);
void B05PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}
G4CellScorer &GetG4CellScorer(){
return fG4CellScorer;
}
private:
void FillHisto(const G4Step &aStep);
G4CellScorer fG4CellScorer;
AIDA::IHistogram1D *fHisto;
};
#endif
@@ -0,0 +1,80 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B02CellScorerStore.hh,v 1.1 2002/11/08 14:52:16 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// ----------------------------------------------------------------------
// Class B02CellScorerStore
//
// Class description:
//
// This class is a cell customized cell scorer store.
// Nevertheless the standard G4CellScorer may be created with this class
// simular to the G4CellScorerStore. In addition this class
// stores B02CellScorer pointers.
// This class delivers a map with the G4CellScorer objects
// to be printed with the G4ScorerTable class.
//
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef B02CellScorerStore_hh
#define B02CellScorerStore_hh B02CellScorerStore_hh
#include "g4std/map"
#include "G4GeometryCell.hh"
#include "G4GeometryCellComp.hh"
#include "globals.hh"
#include "G4VCellScorerStore.hh"
class G4CellScorer;
class B02CellScorer;
class IHistogram1D;
typedef G4std::map<G4GeometryCell, G4CellScorer *, G4GeometryCellComp> G4MapGeometryCellCellScorer;
typedef G4std::map<G4GeometryCell,B02CellScorer *, G4GeometryCellComp> B02MapGeometryCellB02CellScorer;
class B02CellScorerStore : public G4VCellScorerStore {
public:
B02CellScorerStore();
virtual ~B02CellScorerStore(){}
virtual G4VCellScorer *GetCellScore(const G4GeometryCell &gCell);
G4CellScorer *AddG4CellScorer(const G4GeometryCell &gCell);
const G4MapGeometryCellCellScorer &GetMapGeometryCellCellScorer() ;
void AddB02CellScorer(B02CellScorer *b02cellScorer,
const G4GeometryCell &gCell);
const B02MapGeometryCellB02CellScorer &GetMapGeometryCellB02CellScorer() const ;
private:
G4MapGeometryCellCellScorer fMapGeometryCellCellScorer;
B02MapGeometryCellB02CellScorer fMapGeometryCellB02CellScorer;
};
#endif
@@ -21,17 +21,19 @@
// ********************************************************************
//
//
// $Id: B02DetectorConstruction.hh,v 1.2 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B02DetectorConstruction.hh,v 1.3 2002/11/08 14:47:42 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef B02DetectorConstruction_hh
#define B02DetectorConstruction_hh B02DetectorConstruction_hh
class G4VPhysicalVolume;
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
class G4IStore;
class B02DetectorConstruction : public G4VUserDetectorConstruction
{
public:
@@ -39,9 +41,7 @@ public:
~B02DetectorConstruction();
G4VPhysicalVolume* Construct();
G4VPhysicalVolume* GetWorldVolume(){return fWorldVolume;}
private:
G4VPhysicalVolume* fWorldVolume;
};
#endif
@@ -21,31 +21,38 @@
// ********************************************************************
//
//
// $Id: B04ImportanceDetectorConstruction.hh,v 1.2 2002/04/19 10:54:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B02ImportanceDetectorConstruction.hh,v 1.1 2002/11/08 14:52:16 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef B04ImportanceDetectorConstruction_hh
#define B04ImportanceDetectorConstruction_hh B04ImportanceDetectorConstruction_hh
#ifndef B02ImportanceDetectorConstruction_hh
#define B02ImportanceDetectorConstruction_hh B02ImportanceDetectorConstruction_hh
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include "g4std/map"
#include "G4GeometryCell.hh"
#include "B02PVolumeStore.hh"
class G4VPhysicalVolume;
class G4VIStore;
class B04ImportanceDetectorConstruction : public G4VUserDetectorConstruction
class B02ImportanceDetectorConstruction
{
public:
B04ImportanceDetectorConstruction();
~B04ImportanceDetectorConstruction();
B02ImportanceDetectorConstruction();
~B02ImportanceDetectorConstruction();
G4VPhysicalVolume* Construct();
G4VIStore* GetIStore();
const G4VPhysicalVolume &GetPhysicalVolumeByName(const G4String& name) const;
G4VPhysicalVolume &GetWorldVolume() const;
G4String ListPhysNamesAsG4String();
G4String GetCellName(G4int i);
G4GeometryCell GetGeometryCell(G4int i);
private:
G4VIStore *fIStore;
void Construct();
B02PVolumeStore fPVolumeStore;;
G4VPhysicalVolume *fWorldVolume;
};
#endif
@@ -21,31 +21,42 @@
// ********************************************************************
//
//
// $Id: B07ImportanceDetectorConstruction.hh,v 1.4 2002/04/19 12:13:23 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B02PVolumeStore.hh,v 1.1 2002/11/08 14:52:16 dressel Exp $
// GEANT4 tag
//
// ----------------------------------------------------------------------
// Class B02PVolumeStore
//
// Class description:
//
// ...
#ifndef B07ImportanceDetectorConstruction_hh
#define B07ImportanceDetectorConstruction_hh B07ImportanceDetectorConstruction_hh
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef B02PVolumeStore_hh
#define B02PVolumeStore_hh B02PVolumeStore_hh
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include "g4std/set"
#include "G4GeometryCell.hh"
#include "G4GeometryCellComp.hh"
class G4VPhysicalVolume;
class G4VIStore;
typedef G4std::set< G4GeometryCell, G4GeometryCellComp > B02SetGeometryCell;
class B07ImportanceDetectorConstruction : public G4VUserDetectorConstruction
{
class B02PVolumeStore {
public:
B07ImportanceDetectorConstruction();
~B07ImportanceDetectorConstruction();
G4VPhysicalVolume* Construct();
G4VIStore* GetIStore();
B02PVolumeStore();
~B02PVolumeStore();
void AddPVolume(const G4GeometryCell &cell);
const G4VPhysicalVolume *GetPVolume(const G4String &name) const;
G4String GetPNames() const;
private:
G4VIStore *fIStore;
B02SetGeometryCell fSetGeometryCell;
};
#endif
@@ -21,17 +21,16 @@
// ********************************************************************
//
//
// $Id: B02PhysicsList.hh,v 1.2 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B02PhysicsList_h
#define B02PhysicsList_h 1
#include "globals.hh"
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
class B02PhysicsList : public G4VUserPhysicsList
// taken from Tst12PhysicsList
class B02PhysicsList: public G4VUserPhysicsList
{
public:
B02PhysicsList();
@@ -42,6 +41,7 @@ class B02PhysicsList : public G4VUserPhysicsList
virtual void ConstructParticle();
virtual void ConstructProcess();
//
virtual void SetCuts();
protected:
@@ -61,3 +61,6 @@ class B02PhysicsList : public G4VUserPhysicsList
};
#endif
@@ -21,9 +21,6 @@
// ********************************************************************
//
//
// $Id: B02PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B02PrimaryGeneratorAction_hh
#define B02PrimaryGeneratorAction_hh B02PrimaryGeneratorAction_hh
@@ -47,3 +44,5 @@ class B02PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
};
#endif
@@ -1,53 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B02Scorer.hh,v 1.3 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B02scorer_hh
#define B02scorer_hh B02scorer_hh
#include "g4std/iostream"
#include "G4VPScorer.hh"
#include "G4PMapPtkTallys.hh"
class G4Step;
class G4PStep;
class B02Scorer : public G4VPScorer
{
public:
B02Scorer();
~B02Scorer();
void Score(const G4Step &aStep, const G4PStep &aPStep);
const G4PMapPtkTallys &GetMapPtkTallys() const { return fPtkTallys; }
private:
G4PMapPtkTallys fPtkTallys;
};
G4std::ostream& operator<<(G4std::ostream &out, const B02Scorer &ps);
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: B02ScoringDetectorConstruction.hh,v 1.2 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef B02ScoringDetectorConstruction_hh
+148
View File
@@ -0,0 +1,148 @@
#!/bin/tcsh -x
#set verbose = 0
set release = "5.0.1"
set redHat72 = "redhat72"
set redHat61 = "redhat61"
set redhat73 = "redhat73"
set gcc295 = "gcc-2.95.2"
set gcc296 = "gcc-2.96"
set gcc32 = "gcc-3.2"
set platform = "$redHat72/$gcc295" # default
set COMP = `g++ --version | tail -1`
set os = `uname`
set osVersion = `uname -r`
set unavailable = "Sorry, Anaphe $release is not available for $os, compiler $COMP"
# deal with non-Linux (= Solaris CC 5.3) first
if ($os != "Linux" && ) then
if ($os == "SunOS" && $osVersion == "5.8") then
set platform = "sun4x_58/CC-5.3"
else
echo $unavailable
exit
endif
endif
# Linux next. Find Redhat/SuSE flavours
set is61 = "no"
if { grep "6.1" /etc/issue > /dev/null } then
set is61 = "yes"
endif
set is72 = "no"
if { grep "7.2" /etc/issue > /dev/null } then
set is72 = "yes"
endif
set is73 = "no"
if { grep "7.3" /etc/issue > /dev/null } then
set is73 = "yes"
endif
set isSuSE = "no"
if { grep "SuSE" /etc/issue > /dev/null } then
set isSuSE = "yes"
endif
# Constraint: all these vars are now "yes" or "no"
# deal with SuSE
if ($isSuSE == "yes") then
echo "Found SuSE distribution"
if ($is72 == "yes") then # SuSE 7.2 is compatible with RH61
# use Red Hat 6.1 / gcc-2.95.2 for SuSE 7.2 (gcc-2.95.3)
set platform = "$redHat61/$gcc295"
else
echo "Unknown version of SuSE - please report to HepLib.Support@cern.ch"
echo "/etc/issue contains:"
cat /etc/issue
exit
endif
endif
# deal with non-SuSE - assumed to be Red Hat (but might be wrong..!)
if ($isSuSE == "no") then
# first deal with Red Hat 6.1
if ($is61 == "yes") then
if ($COMP == "gcc-2.96") then
echo $unavailable
exit
else if ($COMP == "2.95.2") then
set platform = "redhat61/gcc-2.95.2"
else
set platform = "redhat61/egcs_1.1.2" # assumption!
endif
endif
# now deal with Red Hat 7.2
if ($is72 == "yes") then
if ($COMP == "gcc-2.96") then
echo $unavailable
exit
else if ($COMP == "2.95.2") then
set platform = "redhat72/gcc-2.95.2"
else
set platform = "redhat72/gcc-3.2" # assumption!
endif
endif
# finally deal with Red Hat 7.3
else if ($is73 == "yes") then
if ( $COMP == "gcc-2.96" ) then
echo $unavailable
exit
else if ( $COMP == "gcc-2.95.2" ) then
set platform = "redhat73/gcc-2.95.2"
else
set platform = "redhat73/gcc-3.2" # assumption!
endif
endif
else
echo $unavailable
endif
setenv PLATF $platform
if ($?AIDA_DIR == 0) then
setenv AIDA_DIR /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp
endif
if ($?ANAPHETOP == 0) then
setenv ANAPHETOP /afs/cern.ch/sw/lhcxx
endif
# add to PATH and LD_LIBRARY_PATH, but only if not already present ...
set pubDom = "${ANAPHETOP}/specific/${PLATF}/PublicDomainPackages/2.0.0"
if ( { echo $PATH | grep $pubDom } == 0 ) then
setenv PATH "${pubDom}/bin:${PATH}"
endif
if ( $?LD_LIBRARY_PATH == 0 ) then
setenv LD_LIBRARY_PATH "${pubDom}/lib"
else if ( { echo $LD_LIBRARY_PATH | grep $pubDom } == 0 ) then
setenv LD_LIBRARY_PATH "${pubDom}/lib:${LD_LIBRARY_PATH}"
endif
set releaseDirectory = "${ANAPHETOP}/specific/${PLATF}/${release}"
if ( { echo $PATH | grep $releaseDirectory } == 0 ) then
setenv PATH "${releaseDirectory}/bin:${PATH}"
endif
if ( { echo $LD_LIBRARY_PATH | grep $releaseDirectory } == 0 ) then
setenv LD_LIBRARY_PATH "${releaseDirectory}/lib:${LD_LIBRARY_PATH}"
endif
if ( $?GRACE_HOME == 0 ) then
setenv GRACE_HOME "${pubDom}/grace"
endif
if ( { echo $PATH | grep $GRACE_HOME } == 0 ) then
setenv PATH "${GRACE_HOME}/bin:${PATH}"
endif
@@ -21,45 +21,58 @@
// ********************************************************************
//
//
// $Id: B01Scorer.cc,v 1.3 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B02CellScorer.cc,v 1.1 2002/11/08 14:52:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
//
// B02CellScorer.cc
//
// ----------------------------------------------------------------------
#include "B01Scorer.hh"
#include "B02CellScorer.hh"
#include "G4GeometryCell.hh"
#include "G4Step.hh"
#include "G4PStep.hh"
#include "G4Sigma.hh"
#include "G4StateManager.hh"
#include "G4StepPoint.hh"
B01Scorer::B01Scorer(){}
B01Scorer::~B01Scorer(){}
void B01Scorer::Score(const G4Step &aStep, const G4PStep &aPstep){
G4Track *track = aStep.GetTrack();
B02CellScorer::B02CellScorer(AIDA::IHistogram1D *h) :
fHisto(h)
{}
if (track->GetTrackStatus()==fStopAndKill) {
G4cout << " track status is StopAndKill -> do nothing" << G4endl;
}
// do the scoring
else {
// the map fPtkTallys, the map nametallys and the "G4Sigma" will
// be setup the first time they are accesed.
// the user may choos any other place to store the results e.g.
// histogramms
G4PTouchableKey post_ptk(aPstep.fPostTouchableKey);
if (aPstep.fCrossBoundary) {
// Pstep crosses boundary
fPtkTallys[post_ptk]["HistorysEntering"].Xin(1);
fPtkTallys[post_ptk]["EnergyEnteringHistory"].
Xin(track->GetKineticEnergy());
}
else {
fPtkTallys[post_ptk]["Collisions"].Xin(1);
}
}
B02CellScorer::~B02CellScorer()
{}
void B02CellScorer::ScoreAnExitingStep(const G4Step &aStep,
const G4GeometryCell &pre_gCell){
fG4CellScorer.ScoreAnExitingStep(aStep, pre_gCell);
FillHisto(aStep);
}
G4std::ostream& operator<<(G4std::ostream &out, const B01Scorer &ps) {
out << ps.GetMapPtkTallys();
return out;
void B02CellScorer::ScoreAnEnteringStep(const G4Step &aStep,
const G4GeometryCell &post_gCell){
fG4CellScorer.ScoreAnEnteringStep(aStep, post_gCell);
return;
}
void B02CellScorer::ScoreAnInVolumeStep(const G4Step &aStep,
const G4GeometryCell &post_gCell){
fG4CellScorer.ScoreAnInVolumeStep(aStep, post_gCell);
FillHisto(aStep);
}
void B02CellScorer::FillHisto(const G4Step &aStep){
G4StepPoint *p = 0;
p = aStep.GetPreStepPoint();
G4double sl = aStep.GetStepLength();
G4double slw = sl * p->GetWeight();
fHisto->fill(p->GetKineticEnergy(), slw);
}
@@ -0,0 +1,85 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B02CellScorerStore.cc,v 1.1 2002/11/08 14:52:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
//
// B02CellScorerStore.cc
//
// ----------------------------------------------------------------------
#include "B02CellScorerStore.hh"
#include "G4CellScorer.hh"
#include "B02CellScorer.hh"
B02CellScorerStore::B02CellScorerStore()
{}
G4CellScorer *B02CellScorerStore::
AddG4CellScorer(const G4GeometryCell &g) {
return fMapGeometryCellCellScorer[g] =
new G4CellScorer;
};
void B02CellScorerStore::
AddB02CellScorer(B02CellScorer *b02scorer,
const G4GeometryCell &g) {
fMapGeometryCellB02CellScorer[g] = b02scorer;
};
const G4MapGeometryCellCellScorer &B02CellScorerStore::GetMapGeometryCellCellScorer() {
for (B02MapGeometryCellB02CellScorer::iterator it = fMapGeometryCellB02CellScorer.begin();
it != fMapGeometryCellB02CellScorer.end(); it++) {
fMapGeometryCellCellScorer[(*it).first] =
&((*it).second->GetG4CellScorer());
}
return fMapGeometryCellCellScorer;
}
const B02MapGeometryCellB02CellScorer &B02CellScorerStore::GetMapGeometryCellB02CellScorer() const {
return fMapGeometryCellB02CellScorer;
}
G4VCellScorer *B02CellScorerStore::
GetCellScore(const G4GeometryCell &gCell){
B02MapGeometryCellB02CellScorer::iterator itb08 =
fMapGeometryCellB02CellScorer.find(gCell);
if (itb08 != fMapGeometryCellB02CellScorer.end()) {
return (*itb08).second;
}
else {
G4MapGeometryCellCellScorer::iterator it = fMapGeometryCellCellScorer.find(gCell);
if (it != fMapGeometryCellCellScorer.end()) {
return (*it).second;
}
else {
return 0;
}
}
}
@@ -21,12 +21,12 @@
// ********************************************************************
//
//
// $Id: B02DetectorConstruction.cc,v 1.4 2002/04/19 10:54:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B02DetectorConstruction.cc,v 1.6 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "globals.hh"
#include "g4std/strstream"
#include "globals.hh"
#include "B02DetectorConstruction.hh"
@@ -40,8 +40,10 @@
#include "G4Colour.hh"
#include "PhysicalConstants.h"
// for importance biasing
#include "G4IStore.hh"
B02DetectorConstruction::B02DetectorConstruction()
: fWorldVolume(0)
{;}
B02DetectorConstruction::~B02DetectorConstruction()
@@ -49,8 +51,6 @@ B02DetectorConstruction::~B02DetectorConstruction()
G4VPhysicalVolume* B02DetectorConstruction::Construct()
{
char line[255];
G4double pos_x;
G4double pos_y;
G4double pos_z;
@@ -84,7 +84,6 @@ G4VPhysicalVolume* B02DetectorConstruction::Construct()
A = 28.09*g/mole;
G4Element* elSi = new G4Element(name="Silicon", symbol="Si", Z=14, A);
A = 39.1*g/mole;
G4Element* elK = new G4Element(name="K" ,symbol="K" , Z=19 , A);
@@ -113,21 +112,20 @@ G4VPhysicalVolume* B02DetectorConstruction::Construct()
Concrete->AddElement(elCa , fractionmass= 0.044);
Concrete->AddElement(elFe , fractionmass= 0.014);
Concrete->AddElement(elC , fractionmass= 0.001);
density = 0.0203*g/cm3;
G4Material* LightConcrete = new G4Material("LightConcrete", density, 10);
LightConcrete->AddElement(elH , fractionmass= 0.01);
LightConcrete->AddElement(elO , fractionmass= 0.529);
LightConcrete->AddElement(elNa , fractionmass= 0.016);
LightConcrete->AddElement(elHg , fractionmass= 0.002);
LightConcrete->AddElement(elAl , fractionmass= 0.034);
LightConcrete->AddElement(elSi , fractionmass= 0.337);
LightConcrete->AddElement(elK , fractionmass= 0.013);
LightConcrete->AddElement(elCa , fractionmass= 0.044);
LightConcrete->AddElement(elFe , fractionmass= 0.014);
LightConcrete->AddElement(elC , fractionmass= 0.001);
G4Material *WorldMaterial = Galactic;
/////////////////////////////
// world cylinder volume
@@ -136,79 +134,72 @@ G4VPhysicalVolume* B02DetectorConstruction::Construct()
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 100*cm;
G4double hightCylinder = 15.001*cm;
G4double outerRadiusCylinder = 101*cm; // dont't have scoring
// cells coinside eith world volume boundary
G4double hightCylinder = 105*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*deg;
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical world
G4LogicalVolume *worldCylinder_log =
new G4LogicalVolume(worldCylinder, WorldMaterial, "worldCylinder_log");
new G4LogicalVolume(worldCylinder, Galactic, "worldCylinder_log");
G4VisAttributes * WorldVisAtt
= new G4VisAttributes(G4Colour(0.0,0.0,1.0));
WorldVisAtt->SetVisibility(true);
worldCylinder_log->SetVisAttributes(WorldVisAtt);
name = "shieldWorld";
G4VPhysicalVolume *pWorldVolume = new
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
// physical world
name = "worldCylinder_phys";
G4VPhysicalVolume* worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
///////////////////////////////////////////////
// shield cylinder for (cells 1-2)
////////////////////////////////////////////////
// creating 18 slobs of 10 cm thick concrete
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
G4double hightShield = 5*cm;
G4double hightShield = 90*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*deg;
G4Tubs *aShield = new G4Tubs("aShield",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
// logical shield
G4LogicalVolume *aShield_log =
new G4LogicalVolume(aShield, Concrete, "aShield_log");
G4VisAttributes * shieldVisAtt
= new G4VisAttributes(G4Colour(0.0,1.0,1.0));
shieldVisAtt->SetVisibility(true);
shieldVisAtt->SetForceSolid(false);
aShield_log->SetVisAttributes(shieldVisAtt);
G4VisAttributes* pShieldVis = new
G4VisAttributes(G4Colour(0.0,0.0,1.0));
pShieldVis->SetForceSolid(true);
aShield_log->SetVisAttributes(pShieldVis);
// physical shields
// physical shields for cell 2 to 4
for(G4int i=0; i<3; i++)
{
if (i+2<10) sprintf(line,"cell: 0%d, shield",i+2);
else sprintf(line,"cell: %d, shield",i+2);
G4String name(line);
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = -10*cm+(10*cm)*i;
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log, name, worldCylinder_log, false, 0);
}
fWorldVolume = worldCylinder_phys;
name = "concreteShield";
return worldCylinder_phys;
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);
return pWorldVolume;
}
@@ -0,0 +1,216 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B02ImportanceDetectorConstruction.cc,v 1.2 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "globals.hh"
#include "g4std/strstream"
#include "B02ImportanceDetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
B02ImportanceDetectorConstruction::B02ImportanceDetectorConstruction()
{
Construct();
}
B02ImportanceDetectorConstruction::~B02ImportanceDetectorConstruction()
{;}
void B02ImportanceDetectorConstruction::Construct()
{
G4String name;
G4double A, density, temperature, pressure;
G4int z;
G4Material *Galactic =
new G4Material(name="Galactic", z=1, A=1.01*g/mole, density,
kStateGas,temperature,pressure);
//////////////////////////////////
// parallel world cylinder volume
//////////////////////////////////
// parallel world solid larger than in the mass geometry
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 110*cm;
G4double hightCylinder = 110*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*deg;
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical world
G4LogicalVolume *worldCylinder_log =
new G4LogicalVolume(worldCylinder, Galactic, "worldCylinder_log");
name = "parallelWorld";
fWorldVolume = new
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, -1));
// creating 18 slobs of 10 cm thicknes
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
G4double hightShield = 5*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*deg;
G4Tubs *aShield = new G4Tubs("aShield",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
// logical parallel cells
G4LogicalVolume *aShield_log =
new G4LogicalVolume(aShield, Galactic, "aShield_log");
// physical parallel cells
G4int i = 1;
G4double startz = -85*cm;
for (i=1; i<=18; ++i) {
name = GetCellName(i);
G4double pos_x = 0*cm;
G4double pos_y = 0*cm;
G4double pos_z = startz + (i-1) * (2*hightShield);
G4VPhysicalVolume *pvol =
new G4PVPlacement(0,
G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log,
name,
worldCylinder_log,
false,
0);
G4GeometryCell cell(*pvol, 0);
fPVolumeStore.AddPVolume(cell);
}
// filling the rest of the world volumr behind the concrete with
// another slob which should get the same importance value as the
// last slob
innerRadiusShield = 0*cm;
outerRadiusShield = 110*cm;
hightShield = 10*cm;
startAngleShield = 0*deg;
spanningAngleShield = 360*deg;
G4Tubs *aRest = new G4Tubs("Rest",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *aRest_log =
new G4LogicalVolume(aRest, Galactic, "aRest_log");
name = GetCellName(19);
G4double pos_x = 0*cm;
G4double pos_y = 0*cm;
G4double pos_z = 100*cm;
G4VPhysicalVolume *pvol =
new G4PVPlacement(0,
G4ThreeVector(pos_x, pos_y, pos_z),
aRest_log,
name,
worldCylinder_log,
false,
0);
G4GeometryCell cell(*pvol, 0);
fPVolumeStore.AddPVolume(cell);
}
const G4VPhysicalVolume &B02ImportanceDetectorConstruction::
GetPhysicalVolumeByName(const G4String& name) const {
return *fPVolumeStore.GetPVolume(name);
}
G4String B02ImportanceDetectorConstruction::ListPhysNamesAsG4String(){
G4String names(fPVolumeStore.GetPNames());
return names;
}
G4String B02ImportanceDetectorConstruction::GetCellName(G4int i) {
char st[200];
G4std::ostrstream os(st,200);
os << "cell_";
if (i<10) {
os << "0";
}
os << i
<< '\0';
G4String name(st);
return name;
}
G4GeometryCell B02ImportanceDetectorConstruction::GetGeometryCell(G4int i){
G4String name(GetCellName(i));
const G4VPhysicalVolume *p=0;
p = fPVolumeStore.GetPVolume(name);
if (p) {
return G4GeometryCell(*p,0);
}
else {
G4cout << "B02ImportanceDetectorConstruction::GetGeometryCell: couldn't get G4GeometryCell" << G4endl;
return G4GeometryCell(*fWorldVolume,-2);
}
}
G4VPhysicalVolume &B02ImportanceDetectorConstruction::GetWorldVolume() const{
return *fWorldVolume;
}
@@ -0,0 +1,93 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B02PVolumeStore.cc,v 1.1 2002/11/08 14:52:17 dressel Exp $
// GEANT4 tag
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
//
// B02PVolumeStore.cc
//
// ----------------------------------------------------------------------
#include "B02PVolumeStore.hh"
#include "g4std/strstream"
#include "G4VPhysicalVolume.hh"
B02PVolumeStore::B02PVolumeStore(){}
B02PVolumeStore::~B02PVolumeStore(){}
void B02PVolumeStore::AddPVolume(const G4GeometryCell &cell){
B02SetGeometryCell::iterator it =
fSetGeometryCell.find(cell);
if (it != fSetGeometryCell.end()) {
G4cout << "B02PVolumeStore::AddPVolume: cell already stored"
<< G4endl;
return;
}
fSetGeometryCell.insert(cell);
}
const G4VPhysicalVolume *B02PVolumeStore::
GetPVolume(const G4String &name) const {
const G4VPhysicalVolume *pvol = 0;
for (B02SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
it != fSetGeometryCell.end(); ++it) {
const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
if (vol.GetName() == name) {
pvol = &vol;
}
}
if (!pvol) {
G4cout << "B02PVolumeStore::GetPVolume: no physical volume named: "
<< name << ", found" << G4endl;
}
return pvol;
}
G4String B02PVolumeStore::GetPNames() const {
G4String NameString;
for (B02SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
it != fSetGeometryCell.end(); ++it) {
const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
char st[200];
G4std::ostrstream os(st,200);
os << vol.GetName() << "_" << it->GetReplicaNumber()
<< "\n" << '\0';
G4String cellname(st);
// G4String cellname(vol.GetName());
// cellname += G4String("_");
// cellname += G4std::str(it->GetReplicaNumber());
NameString += cellname;
}
return NameString;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02PhysicsList.cc,v 1.2 2002/04/19 10:54:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B02PhysicsList.cc,v 1.3 2002/11/08 14:47:48 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "globals.hh"
@@ -45,7 +45,7 @@
#include "G4Material.hh"
#include "G4MaterialTable.hh"
B02PhysicsList::B02PhysicsList() : G4VUserPhysicsList()
B02PhysicsList::B02PhysicsList(): G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
@@ -622,11 +622,12 @@ void B02PhysicsList::ConstructGeneral()
void B02PhysicsList::SetCuts()
{
if (verboseLevel >0){
if (verboseLevel >0)
{
G4cout << "B02PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// " G4VUserPhysicsList::SetCutsWithDefault" method sets
// "G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:43 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B02PrimaryGeneratorAction.cc,v 1.5 2002/11/08 14:47:48 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "globals.hh"
@@ -40,7 +40,7 @@ B02PrimaryGeneratorAction::B02PrimaryGeneratorAction()
particleGun = new G4ParticleGun(n_particle);
particleGun->SetParticleDefinition(G4Neutron::NeutronDefinition());
particleGun->SetParticleEnergy(10.0*MeV);
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -15.0005*cm));
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -90.0005*cm));
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
}
@@ -1,75 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B02Scorer.cc,v 1.3 2002/04/19 10:54:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "B02Scorer.hh"
#include "G4Step.hh"
#include "G4PStep.hh"
#include "G4Sigma.hh"
#include "G4StateManager.hh"
B02Scorer::B02Scorer(){}
B02Scorer::~B02Scorer(){}
void B02Scorer::Score(const G4Step &aStep, const G4PStep &aPstep)
{
G4Track *track = aStep.GetTrack();
if (track->GetTrackStatus()==fStopAndKill)
{
G4cout << " track status is StopAndKill -> do nothing" << G4endl;
}
// do the scoring
else
{
// the map fPtkTallys, the map nametallys and the "G4Sigma" will
// be setup the first time they are accesed.
// the user may choos any other place to store the results e.g.
// histogramms
G4PTouchableKey post_ptk(aPstep.fPostTouchableKey);
if (aPstep.fCrossBoundary)
{
// Pstep crosses boundary
fPtkTallys[post_ptk]["HistorysEntering"].Xin(1);
fPtkTallys[post_ptk]["EnergyEnteringHistory"].
Xin(track->GetKineticEnergy());
}
else
{
// this check is necessary in case of scoring in a parallel world
if (aStep.GetPostStepPoint()->GetStepStatus() != fGeomBoundary)
{
fPtkTallys[post_ptk]["Collisions"].Xin(1);
}
}
}
}
G4std::ostream& operator<<(G4std::ostream &out, const B02Scorer &ps)
{
out << ps.GetMapPtkTallys();
return out;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02ScoringDetectorConstruction.cc,v 1.4 2002/04/19 12:01:46 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B02ScoringDetectorConstruction.cc,v 1.5 2002/07/11 08:12:22 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "globals.hh"
@@ -76,7 +76,7 @@ G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
// physical world
name = "score_worldCylinder_phys";
name = "score_world_phys";
G4VPhysicalVolume* score_worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), score_worldCylinder_log,
name, 0, false, 0);
+428
View File
@@ -0,0 +1,428 @@
# 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 __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
@@ -0,0 +1,159 @@
# This file is used by G03RunApplication.py
#
# A very prototype like class which allows to do a given number
# of runs runs (nruns) of a given number of events (nevents)
# by calling nruns times BeamOn(nevents).
# The class fills a list after every call to BeamOn(nevents)
# with the number of tracks entered in a certain cell
# in the last run.
import math
import string
# import the G4 shadow classes. B03App in tern loads B03Appc.so
# containing the "hooks" to the c++ code
from B03App import *
class B03Application:
def __init__(self, nevents):
# this function prepares Geant4 for running by calling,
# creates a parallel geometry, sets importance values
# creates an parallel importance score sampler,
# creates scores to access data,
# and creates an empty histogram
#(so by far to much for one function, but this is a prototype)
# nevents is the number of events per run
self.nevents = nevents
# an array to store the messurments
self.messurements = []
def initializeApplication(self):
if "base" in dir(self):
print "already initialized"
return
# get B03AppBase singleton, in tern creating the mass detector and
# the physics list
self.base = B03AppBase_GetB03AppBase ()
def setupParallelGeometry(self):
if "pgeom" in dir(self):
print "geometry already created"
return
if not "base" in dir(self):
print "call \"initializeApplication\" first"
return
# create the parallel geometry and get it's world volume
self.pgeom = B03ImportanceDetectorConstruction()
self.p_world = self.pgeom.GetWorldVolume()
# create a list of G4GeometryCells related to the
# physical volumes in the parallel detector
# needed to assign importance values to the cells
# and to create scorers for the cells
self.gCell_list =[]
for i in range(1,19):
self.gCell_list.append(self.pgeom.GetGeometryCell(i))
self.CellRest = self.pgeom.GetGeometryCell(19)
def createIstoreAndScorer(self):
if "istore" in dir(self):
print "Istore and Scorer already created"
return
if not "pgeom" in dir(self):
print "call \"setupParallelGeometry\" first"
return
# create an importance store
self.istore = G4IStore(self.p_world)
# create a store for G4CellScorers
self.cs_store = G4CellScorerStore()
# fill the istore with importance values for the
# G4GeometryCells
# and create G4CellScorers for the G4GeometryCells
self.CellScorerList = []
exp = 0
for gCell in self.gCell_list:
exp += 1
importance = math.pow(2,exp)
if exp < 18:
self.istore.AddImportanceGeometryCell(importance,gCell)
self.CellScorerList.append(self.cs_store.AddCellScorer(gCell))
# set importance of world volume
self.istore. \
AddImportanceGeometryCell(1, G4GeometryCell(self.p_world,-1))
imp_cell_17 = self.istore.GetImportance(self.pgeom.GetGeometryCell(17))
self.istore. \
AddImportanceGeometryCell(imp_cell_17,
self.pgeom.GetGeometryCell(18))
self.istore. \
AddImportanceGeometryCell(imp_cell_17, self.CellRest)
# create G4CellStoreScorer derived from G4VPScorer
self.scorer = G4CellStoreScorer(self.cs_store)
def setupSampler(self):
if "sampler" in dir(self):
print "Sampler already created"
return
if not "istore" in dir(self):
print "call \"createIstoreAndScorer\" first"
return
# create a sampler for neutrons
self.sampler = G4ParallelGeometrySampler(self.p_world,
"neutron")
self.sampler.PrepareImportanceSampling(self.istore)
self.sampler.PrepareScoring(self.scorer)
self.sampler.Configure()
def run(self, nruns):
if not "sampler" in dir(self):
print "call \"setupSampler\" first"
return
# this function class BeamOn(self.nevents) nruns times
# and fills a histogram with the number of tracks
# entered the 4th cell in the self.CellScorerList ("p_D2")
# at the end it prints a table of the scores
# get run manager and run 100 events
r = self.base.GetRunManager()
tinold=self.CellScorerList[17].GetCellScoreValues().fSumTracksEntering
# run nruns runs with self.nevents events
# each and fill a histogram after each run
for i in range(nruns):
r.BeamOn(self.nevents)
tin = self.CellScorerList[17].GetCellScoreValues().fSumTracksEntering
v = tin-tinold
self.messurements.append(v)
tinold = tin
print "run number:", i+1, "messured: ", v
# create a G4ScoreTable
st = G4ScoreTable(self.istore)
# get the result as table in a string
s = st.Write(self.cs_store.GetMapGeometryCellCellScorer())
print s
+44
View File
@@ -0,0 +1,44 @@
#!/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
# execfile("B03RunApplication.py")
import string
execfile("B03Application.py")
#executing the application could be done "by hand"
Bapp = B03Application(10)
Bapp.initializeApplication()
Bapp.setupParallelGeometry()
Bapp.createIstoreAndScorer()
Bapp.setupSampler()
Bapp.run(30)
# using lizard and ANAPHE to create a histogram
# check if lizrd is loaded by looking for the af instance of the AnalysisFactory
if 'af' in dir():
tr = tf.create()
hf = af.createHistogramFactory(tr)
n = Bapp.nevents
minm = int(min(Bapp.messurements))-0.5
maxm = int(max(Bapp.messurements)+1)+0.5
h = hf.createHistogram1D ("10","Tracks entering in " +
'%(n)d' % vars() +
" events",30, minm, maxm)
for v in Bapp.messurements:
h.fill(v)
hplot(h)
+26 -3
View File
@@ -1,18 +1,41 @@
# $Id: GNUmakefile,v 1.1 2002/03/26 16:46:08 dressel Exp $
# $Id: GNUmakefile,v 1.9 2002/11/19 15:03:58 mdressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
#
# The variable PYTHON_DIR has to be setup. See ../README.
#
name := exampleB03
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
CPPFLAGS +=
all: lib _B03App.so bin
include $(G4INSTALL)/config/architecture.gmk
CPPFLAGS += -I$(PYTHON_DIR)/include/python2.2/
LDFLAGS += \
-L$(PYTHON_DIR)/lib/python2.2/config \
-L/lib \
-lnsl -ldl -lreadline /lib/libtermcap.so.2 -lieee -lpthread -lutil -lexampleB03 -lpython2.2
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)/$@
+22
View File
@@ -0,0 +1,22 @@
#!/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
@@ -0,0 +1,18 @@
# 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
+9 -41
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: exampleB03.cc,v 1.6 2002/05/31 11:46:23 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: exampleB03.cc,v 1.10 2002/11/18 13:22:48 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// --------------------------------------------------------------
@@ -30,53 +30,21 @@
//
// --------------------------------------------------------------
// Comments
// This main may not be used at all. Instead you may use python or
// lizard an execute the script B03RunApplication in them.
//
// This main function may used to test B03AppBase::GetB03AppBase().
//
// --------------------------------------------------------------
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "B03DetectorConstruction.hh"
#include "B03PhysicsList.hh"
#include "B03PrimaryGeneratorAction.hh"
// Files specific for biasing
#include "G4MassImportanceSampler.hh"
#include "B03App.hh"
#include "globals.hh"
int main(int argc, char **argv)
{
G4int numberOfEvent = 1000;
G4String random_status_out_file, random_status_in_file;
G4long myseed = 345354;
HepRandom::setTheSeed(myseed);
G4RunManager *runManager = new G4RunManager;
// create the detector ---------------------------
B03DetectorConstruction *detector = new B03DetectorConstruction();
runManager->SetUserInitialization(detector);
// ---------------------------------------------------
runManager->SetUserInitialization(new B03PhysicsList);
runManager->SetUserAction(new B03PrimaryGeneratorAction);
runManager->Initialize();
// the IStore is filled during detector construction
G4VIStore &aIstore = *detector->GetIStore();
// create the importance sampler for biasing in the tracking world
G4MassImportanceSampler mim(aIstore, "neutron");
mim.Initialize();
G4UImanager* UI;
UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/control/execute init.mac");
runManager->BeamOn(numberOfEvent);
B03AppBase &base = B03AppBase::GetB03AppBase();
return 0;
}
+2 -2
View File
@@ -1,6 +1,6 @@
**********************************************
Geant4 version $Name: geant4-04-01 $
(28-Feb-2002)
Geant4 version $Name: geant4-05-00 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
Going to assign importance: 1, to volumeworldCylinder_phys
@@ -20,31 +20,46 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: B03App.hh,v 1.3 2002/12/13 11:26:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// $Id: B06ImportanceDetectorConstruction.hh,v 1.3 2002/04/19 10:54:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// --------------------------------------------------------------------
#ifndef B03App_hh
#define B03App_hh B03App_hh
#ifndef B06ImportanceDetectorConstruction_hh
#define B06ImportanceDetectorConstruction_hh B06ImportanceDetectorConstruction_hh
class G4RunManager;
class B03PrimaryGeneratorAction;
class B03PhysicsList;
class B03DetectorConstruction;
#include "globals.hh"
class G4VPhysicalVolume;
class G4VIStore;
class B06ImportanceDetectorConstruction
{
class B03AppBase {
public:
B06ImportanceDetectorConstruction();
~B06ImportanceDetectorConstruction();
G4VIStore* GetIStore();
private:
void Construct();
G4VIStore *fIStore;
~B03AppBase();
static B03AppBase &GetB03AppBase();
G4RunManager &GetRunManager(){return *frunMgr;}
private:
B03AppBase();
static B03AppBase *fB03AppBase;
G4RunManager *frunMgr;
B03DetectorConstruction *fDetector;
B03PrimaryGeneratorAction *fPrimary;
B03PhysicsList *fPhysics;
};
// B03AppBase *GetB03AppBase();
#endif
@@ -0,0 +1,178 @@
%module B03App
%{
#include "globals.hh"
#include "B03App.hh"
#include "G4RunManager.hh"
#include "G4IStore.hh"
#include "G4VCellScorerStore.hh"
#include "G4VScorer.hh"
#include "G4ParallelGeometrySampler.hh"
#include "G4CellScorerStore.hh"
#include "G4CellStoreScorer.hh"
#include "G4GeometryCell.hh"
#include "G4CellScoreComposer.hh"
#include "G4CellScoreValues.hh"
#include "G4CellScorer.hh"
#include "G4ScoreTable.hh"
#include "G4VIStore.hh"
#include <string>
#include "g4std/strstream"
#include <memory>
#include "G4VPhysicalVolume.hh"
#include "B03ImportanceDetectorConstruction.hh"
#include "G4VImportanceAlgorithm.hh"
%}
class G4RunManager {
public:
void BeamOn(int e);
};
class G4VIStore{
};
class G4VPhysicalVolume {
};
class G4GeometryCell{
public:
G4GeometryCell(const G4VPhysicalVolume &aVolume, int RepNum);
~G4GeometryCell();
const G4VPhysicalVolume &GetPhysicalVolume() const;
int GetReplicaNumber() const;
};
class G4IStore : public G4VIStore{
public:
G4IStore(const G4VPhysicalVolume &worldvolume);
~G4IStore();
void AddImportanceGeometryCell(double importance,
const G4GeometryCell &gCell);
void ChangeImportance(double importance,
const G4GeometryCell &gCell);
double GetImportance(const G4GeometryCell &gCell) const;
bool IsKnown(const G4GeometryCell &gCell) const;
const G4VPhysicalVolume &GetWorldVolume() const;
};
struct G4CellScoreValues {
G4CellScoreValues();
double fSumSL;
double fSumSLW;
double fSumSLW_v;
double fSumSLWE;
double fSumSLWE_v;
int fSumTracksEntering;
int fSumPopulation;
int fSumCollisions;
double fSumCollisionsWeight;
double fNumberWeightedEnergy;
double fFluxWeightedEnergy;
double fAverageTrackWeight;
double fImportance;
};
class G4CellScoreComposer {
public:
G4CellScoreComposer();
~G4CellScoreComposer();
G4CellScoreValues GetStandardCellScoreValues() const;
};
class G4CellScorer{
public:
G4CellScoreComposer GetCellScoreComposer() const;
G4CellScoreValues GetCellScoreValues() const;
};
typedef G4std::map<G4GeometryCell, G4CellScorer *, G4PTkComp> G4MapGeometryCellCellScorer;
class G4VCellScorerStore{
};
class G4CellScorerStore : public G4VCellScorerStore{
public:
G4CellScorerStore();
~G4CellScorerStore();
void SetAutoScorerCreate();
G4CellScorer *AddCellScorer(const G4GeometryCell &gCell);
const G4MapGeometryCellCellScorer &GetMapGeometryCellCellScorer() const;
};
class G4VScorer{
};
class G4CellStoreScorer : public G4VScorer{
public:
G4CellStoreScorer(G4VCellScorerStore &csc);
};
class G4VImportanceAlgorithm{
};
class G4ParallelGeometrySampler{
public:
G4ParallelGeometrySampler(G4VPhysicalVolume &worldvolume,
const char *);
~G4ParallelGeometrySampler();
void PrepareScoring(G4VScorer *Scorer);
void PrepareImportanceSampling(G4VIStore *istore,
const G4VImportanceAlgorithm *ialg = 0);
void PrepareWeightRoulett(G4double wsurvive,
G4double wlimit,
G4double isource);
void Configure();
void ClearSampling();
G4bool IsConfigured() const;
};
class G4ScoreTable
{
public:
G4ScoreTable(const G4VIStore *aIStore = 0);
~G4ScoreTable(){}
void Print(const G4MapGeometryCellCellScorer &cs,
G4std::ostream *out = 0);
%extend {
const char *Write(const G4MapGeometryCellCellScorer &cs){
G4std::ostrstream tmpout;
self->Print(cs, &tmpout);
string *value = new string(tmpout.str());
return value->c_str();
};
}
};
class B03ImportanceDetectorConstruction{
public:
B03ImportanceDetectorConstruction();
~B03ImportanceDetectorConstruction();
const G4VPhysicalVolume &GetPhysicalVolumeByName(const char *name) const;
G4VPhysicalVolume &GetWorldVolume() const;
%extend {
const char *ListPhysNames(){
G4String *value = new G4String(self->ListPhysNamesAsG4String());
return value->c_str();
}
}
G4GeometryCell GetGeometryCell(int i);
};
class B03AppBase{
public:
~B03AppBase();
static B03AppBase &GetB03AppBase();
G4RunManager &GetRunManager();
private:
B03AppBase();
};
@@ -21,18 +21,16 @@
// ********************************************************************
//
//
// $Id: B03DetectorConstruction.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B03DetectorConstruction.hh,v 1.4 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef B03DetectorConstruction_hh
#define B03DetectorConstruction_hh B03DetectorConstruction_hh
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
class G4VIStore;
#include "G4VUserDetectorConstruction.hh"
class B03DetectorConstruction : public G4VUserDetectorConstruction
{
@@ -41,10 +39,6 @@ public:
~B03DetectorConstruction();
G4VPhysicalVolume* Construct();
G4VIStore* GetIStore();
private:
G4VIStore *fIStore;
};
#endif
@@ -21,33 +21,36 @@
// ********************************************************************
//
//
// $Id: B08ImportanceDetectorConstruction.hh,v 1.1 2002/06/04 11:14:51 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B03ImportanceDetectorConstruction.hh,v 1.1 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef B08ImportanceDetectorConstruction_hh
#define B08ImportanceDetectorConstruction_hh B08ImportanceDetectorConstruction_hh
#ifndef B03ImportanceDetectorConstruction_hh
#define B03ImportanceDetectorConstruction_hh B03ImportanceDetectorConstruction_hh
#include "globals.hh"
#include "g4std/map"
#include "B03PVolumeStore.hh"
class G4VPhysicalVolume;
class G4VIStore;
class B08ImportanceDetectorConstruction
class B03ImportanceDetectorConstruction
{
public:
B08ImportanceDetectorConstruction();
~B08ImportanceDetectorConstruction();
B03ImportanceDetectorConstruction();
~B03ImportanceDetectorConstruction();
G4VIStore* GetIStore();
G4VPhysicalVolume *GetWorldVolume();
const G4VPhysicalVolume &GetPhysicalVolumeByName(const G4String& name) const;
G4VPhysicalVolume &GetWorldVolume() const;
G4String ListPhysNamesAsG4String();
G4String GetCellName(G4int i);
G4GeometryCell GetGeometryCell(G4int i);
private:
void Construct();
G4VIStore *fnIStore;
B03PVolumeStore fPVolumeStore;;
G4VPhysicalVolume *fWorldVolume;
};
#endif
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B03PVolumeStore.hh,v 1.1 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag
//
// ----------------------------------------------------------------------
// Class B03PVolumeStore
//
// Class description:
//
// ...
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef B03PVolumeStore_hh
#define B03PVolumeStore_hh B03PVolumeStore_hh
#include "globals.hh"
#include "g4std/set"
#include "G4GeometryCell.hh"
#include "G4GeometryCellComp.hh"
typedef G4std::set< G4GeometryCell, G4GeometryCellComp > B03SetGeometryCell;
class B03PVolumeStore {
public:
B03PVolumeStore();
~B03PVolumeStore();
void AddPVolume(const G4GeometryCell &cell);
const G4VPhysicalVolume *GetPVolume(const G4String &name) const;
G4String GetPNames() const;
private:
B03SetGeometryCell fSetGeometryCell;
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B03PhysicsList.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B03PhysicsList.hh,v 1.3 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef B03PhysicsList_h
@@ -42,16 +42,15 @@ class B03PhysicsList : public G4VUserPhysicsList
virtual void ConstructParticle();
virtual void ConstructProcess();
//
virtual void SetCuts();
protected:
// these methods Construct physics processes and register them
// these methods Construct physics processes and register them
virtual void ConstructGeneral();
virtual void ConstructEM();
virtual void ConstructHad();
virtual void ConstructLeptHad();
//
void ConstructAllBosons();
void ConstructAllLeptons();
void ConstructAllMesons();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B03PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B03PrimaryGeneratorAction.hh,v 1.3 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef B03PrimaryGeneratorAction_hh
-4
View File
@@ -1,4 +0,0 @@
/control/verbose 0
/run/verbose 0
/event/verbose 0
/tracking/verbose 0
+8
View File
@@ -0,0 +1,8 @@
# for command-line completion :
import sys
import rlcompleter
rlcompleter.readline.parse_and_bind("tab: complete")
@@ -20,62 +20,72 @@
// * 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: exampleB04.cc,v 1.5 2002/05/31 11:46:23 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleB04
//
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
// --------------------------------------------------------------------
#include "B03App.hh"
#include "g4std/iostream"
#include "CLHEP/Random/Random.h"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "B04DetectorConstruction.hh"
#include "B04PhysicsList.hh"
#include "B04PrimaryGeneratorAction.hh"
#include "G4VPhysicalVolume.hh"
#include "B03DetectorConstruction.hh"
#include "B03PhysicsList.hh"
#include "B03PrimaryGeneratorAction.hh"
#include "B04ImportanceDetectorConstruction.hh"
// Files specific for biasing
#include "G4ParallelImportanceSampler.hh"
B03AppBase *B03AppBase::fB03AppBase = 0;
B03AppBase &B03AppBase::GetB03AppBase() {
if (!fB03AppBase) {
fB03AppBase = new B03AppBase;
}
return *fB03AppBase;
}
int main(int argc, char **argv)
{
G4int numberOfEvent = 1000;
G4String random_status_out_file, random_status_in_file;
B03AppBase::B03AppBase(){
G4long myseed = 345354;
HepRandom::setTheSeed(myseed);
G4RunManager *runManager = new G4RunManager;
frunMgr = new G4RunManager;
// create the "tracking" detector -----------------
runManager->SetUserInitialization(new B04DetectorConstruction);
fDetector = new B03DetectorConstruction;
frunMgr->SetUserInitialization(fDetector);
// ---------------------------------------------------
runManager->SetUserInitialization(new B04PhysicsList);
runManager->SetUserAction(new B04PrimaryGeneratorAction);
runManager->Initialize();
fPhysics = new B03PhysicsList;
frunMgr->SetUserInitialization(fPhysics);
fPrimary = new B03PrimaryGeneratorAction;
frunMgr->SetUserAction(fPrimary);
frunMgr->Initialize();
// create the detector for the importances
B04ImportanceDetectorConstruction importancedetector;
importancedetector.Construct();
/*
// create the detector for the importances and scoring
fImportancedetector
= new B03ImportanceDetectorConstruction();
// the IStore is filled during detector construction
G4VIStore &aIstore = *importancedetector.GetIStore();
// create importance sampler to importance sample neutrons
// in the importance geometry
G4ParallelImportanceSampler pmgr(aIstore, "neutron");
pmgr.Initialize();
runManager->BeamOn(numberOfEvent);
return 0;
fIStore = fImportancedetector->GetIStore();
// create importance sampler to importance sample neutrons
// in the importance geometry
fCS_store =
&fImportancedetector->GetCellScorerStore();
fCS_scorer = new G4CellStoreScorer(*fCS_store);
fPmgr = new
G4ParallelImportanceScoreSampler(*fIStore, *fCS_scorer, "neutron");
fPmgr->Initialize();
*/
}
B03AppBase::~B03AppBase(){
delete fPrimary;
delete fPhysics;
delete fDetector;
delete frunMgr;
}
File diff suppressed because it is too large Load Diff
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B03DetectorConstruction.cc,v 1.7 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B03DetectorConstruction.cc,v 1.10 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "g4std/strstream"
@@ -40,21 +40,12 @@
#include "G4Colour.hh"
#include "PhysicalConstants.h"
// for importance biasing
#include "G4IStore.hh"
B03DetectorConstruction::B03DetectorConstruction()
{;}
B03DetectorConstruction::~B03DetectorConstruction()
{;}
G4VIStore* B03DetectorConstruction::GetIStore()
{
if (!fIStore) G4Exception("B03DetectorConstruction::fIStore empty!");
return fIStore;
}
G4VPhysicalVolume* B03DetectorConstruction::Construct()
{
char line[255];
@@ -92,7 +83,6 @@ G4VPhysicalVolume* B03DetectorConstruction::Construct()
A = 28.09*g/mole;
G4Element* elSi = new G4Element(name="Silicon", symbol="Si", Z=14, A);
A = 39.1*g/mole;
G4Element* elK = new G4Element(name="K" ,symbol="K" , Z=19 , A);
@@ -122,119 +112,72 @@ G4VPhysicalVolume* B03DetectorConstruction::Construct()
Concrete->AddElement(elFe , fractionmass= 0.014);
Concrete->AddElement(elC , fractionmass= 0.001);
density = 0.0203*g/cm3;
G4Material* LightConcrete = new G4Material("LightConcrete", density, 10);
LightConcrete->AddElement(elH , fractionmass= 0.01);
LightConcrete->AddElement(elO , fractionmass= 0.529);
LightConcrete->AddElement(elNa , fractionmass= 0.016);
LightConcrete->AddElement(elHg , fractionmass= 0.002);
LightConcrete->AddElement(elAl , fractionmass= 0.034);
LightConcrete->AddElement(elSi , fractionmass= 0.337);
LightConcrete->AddElement(elK , fractionmass= 0.013);
LightConcrete->AddElement(elCa , fractionmass= 0.044);
LightConcrete->AddElement(elFe , fractionmass= 0.014);
LightConcrete->AddElement(elC , fractionmass= 0.001);
G4Material *WorldMaterial = Galactic;
/////////////////////////////
// world cylinder volume
////////////////////////////
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 100*cm;
G4double hightCylinder = 15.001*cm;
G4double outerRadiusCylinder = 101*cm; // dont't have scoring
// cells coinside eith world volume boundary
G4double hightCylinder = 105*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*cm;
G4double spanningAngleCylinder = 360*deg;
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical world
G4LogicalVolume *worldCylinder_log =
new G4LogicalVolume(worldCylinder, WorldMaterial, "worldCylinder_log");
new G4LogicalVolume(worldCylinder, Galactic, "worldCylinder_log");
G4VisAttributes * WorldVisAtt
= new G4VisAttributes(G4Colour(0.0,0.0,1.0));
WorldVisAtt->SetVisibility(true);
worldCylinder_log->SetVisAttributes(WorldVisAtt);
// physical world
name = "shieldWorld";
G4PVPlacement *pWorldVolume = new
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
name = "worldCylinder_phys";
G4VPhysicalVolume* worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
G4std::vector< G4VPhysicalVolume * > physvolumes;
physvolumes.push_back(worldCylinder_phys);
///////////////////////////////////////////////
// shield cylinder for (cells 2-4)
////////////////////////////////////////////////
// creating 1 slobs of 180 cm thick concrete
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
G4double hightShield = 5*cm;
G4double hightShield = 90*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*cm;
G4double spanningAngleShield = 360*deg;
G4Tubs *aShield = new G4Tubs("aShield",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
// logical shield
G4LogicalVolume *aShield_log =
new G4LogicalVolume(aShield, Concrete, "aShield_log");
// physical shield
G4VisAttributes * shieldVisAtt
= new G4VisAttributes(G4Colour(0.0,1.0,1.0));
shieldVisAtt->SetVisibility(true);
shieldVisAtt->SetForceSolid(false);
aShield_log->SetVisAttributes(shieldVisAtt);
// physical shields
// physical shields for cell 2 to 4
for(G4int i=0; i<3; i++) {
if (i+2<10) sprintf(line,"cell: 0%d, shield",i+2);
else sprintf(line,"cell: %d, shield",i+2);
G4String name(line);
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = -10*cm+(10*cm)*i;
physvolumes.
push_back(new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log, name, worldCylinder_log,
false, 0));
}
fIStore = new G4IStore(*worldCylinder_phys);
// for the world volume repnum is -1 !!!!!!!!!!!!!!!!!!!!!!!
G4int n = 0;
for (G4std::vector<G4VPhysicalVolume *>::iterator it = physvolumes.begin();
it != physvolumes.end(); it++) {
G4double i = pow(2., n++);
G4cout << "Going to assign importance: " << i << ", to volume"
<< (*it)->GetName() << G4endl;
if (*it == worldCylinder_phys) {
// repnum -1
fIStore->AddImportanceRegion(i, **it, -1);
}
fIStore->AddImportanceRegion(i, **it);
}
name = "ConcreateBlock";
return worldCylinder_phys;
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = 0*cm;
G4VPhysicalVolume *pvol =
new G4PVPlacement(0,
G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log,
name,
worldCylinder_log,
false,
0);
return pWorldVolume;
}
@@ -0,0 +1,216 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B03ImportanceDetectorConstruction.cc,v 1.2 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "globals.hh"
#include "g4std/strstream"
#include "B03ImportanceDetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
B03ImportanceDetectorConstruction::B03ImportanceDetectorConstruction()
{
Construct();
}
B03ImportanceDetectorConstruction::~B03ImportanceDetectorConstruction()
{;}
void B03ImportanceDetectorConstruction::Construct()
{
G4String name;
G4double A, density, temperature, pressure;
G4int z;
G4Material *Galactic =
new G4Material(name="Galactic", z=1, A=1.01*g/mole, density,
kStateGas,temperature,pressure);
//////////////////////////////////
// parallel world cylinder volume
//////////////////////////////////
// parallel world solid larger than in the mass geometry
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 110*cm;
G4double hightCylinder = 110*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*deg;
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical world
G4LogicalVolume *worldCylinder_log =
new G4LogicalVolume(worldCylinder, Galactic, "worldCylinder_log");
name = "parallelWorld";
fWorldVolume = new
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, -1));
// creating 18 slobs of 10 cm thicknes
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
G4double hightShield = 5*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*deg;
G4Tubs *aShield = new G4Tubs("aShield",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
// logical parallel cells
G4LogicalVolume *aShield_log =
new G4LogicalVolume(aShield, Galactic, "aShield_log");
// physical parallel cells
G4int i = 1;
G4double startz = -85*cm;
for (i=1; i<=18; ++i) {
name = GetCellName(i);
G4double pos_x = 0*cm;
G4double pos_y = 0*cm;
G4double pos_z = startz + (i-1) * (2*hightShield);
G4VPhysicalVolume *pvol =
new G4PVPlacement(0,
G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log,
name,
worldCylinder_log,
false,
0);
G4GeometryCell cell(*pvol, 0);
fPVolumeStore.AddPVolume(cell);
}
// filling the rest of the world volumr behind the concrete with
// another slob which should get the same importance value as the
// last slob
innerRadiusShield = 0*cm;
outerRadiusShield = 110*cm;
hightShield = 10*cm;
startAngleShield = 0*deg;
spanningAngleShield = 360*deg;
G4Tubs *aRest = new G4Tubs("Rest",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *aRest_log =
new G4LogicalVolume(aRest, Galactic, "aRest_log");
name = GetCellName(19);
G4double pos_x = 0*cm;
G4double pos_y = 0*cm;
G4double pos_z = 100*cm;
G4VPhysicalVolume *pvol =
new G4PVPlacement(0,
G4ThreeVector(pos_x, pos_y, pos_z),
aRest_log,
name,
worldCylinder_log,
false,
0);
G4GeometryCell cell(*pvol, 0);
fPVolumeStore.AddPVolume(cell);
}
const G4VPhysicalVolume &B03ImportanceDetectorConstruction::
GetPhysicalVolumeByName(const G4String& name) const {
return *fPVolumeStore.GetPVolume(name);
}
G4String B03ImportanceDetectorConstruction::ListPhysNamesAsG4String(){
G4String names(fPVolumeStore.GetPNames());
return names;
}
G4String B03ImportanceDetectorConstruction::GetCellName(G4int i) {
char st[200];
G4std::ostrstream os(st,200);
os << "cell_";
if (i<10) {
os << "0";
}
os << i
<< '\0';
G4String name(st);
return name;
}
G4GeometryCell B03ImportanceDetectorConstruction::GetGeometryCell(G4int i){
G4String name(GetCellName(i));
const G4VPhysicalVolume *p=0;
p = fPVolumeStore.GetPVolume(name);
if (p) {
return G4GeometryCell(*p,0);
}
else {
G4cout << "B03ImportanceDetectorConstruction::GetGeometryCell: couldn't get G4GeometryCell" << G4endl;
return G4GeometryCell(*fWorldVolume,-2);
}
}
G4VPhysicalVolume &B03ImportanceDetectorConstruction::GetWorldVolume() const{
return *fWorldVolume;
}
@@ -0,0 +1,93 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B03PVolumeStore.cc,v 1.1 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
//
// B03PVolumeStore.cc
//
// ----------------------------------------------------------------------
#include "B03PVolumeStore.hh"
#include "g4std/strstream"
#include "G4VPhysicalVolume.hh"
B03PVolumeStore::B03PVolumeStore(){}
B03PVolumeStore::~B03PVolumeStore(){}
void B03PVolumeStore::AddPVolume(const G4GeometryCell &cell){
B03SetGeometryCell::iterator it =
fSetGeometryCell.find(cell);
if (it != fSetGeometryCell.end()) {
G4cout << "B03PVolumeStore::AddPVolume: cell already stored"
<< G4endl;
return;
}
fSetGeometryCell.insert(cell);
}
const G4VPhysicalVolume *B03PVolumeStore::
GetPVolume(const G4String &name) const {
const G4VPhysicalVolume *pvol = 0;
for (B03SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
it != fSetGeometryCell.end(); ++it) {
const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
if (vol.GetName() == name) {
pvol = &vol;
}
}
if (!pvol) {
G4cout << "B03PVolumeStore::GetPVolume: no physical volume named: "
<< name << ", found" << G4endl;
}
return pvol;
}
G4String B03PVolumeStore::GetPNames() const {
G4String NameString;
for (B03SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
it != fSetGeometryCell.end(); ++it) {
const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
char st[200];
G4std::ostrstream os(st,200);
os << vol.GetName() << "_" << it->GetReplicaNumber()
<< "\n" << '\0';
G4String cellname(st);
// G4String cellname(vol.GetName());
// cellname += G4String("_");
// cellname += G4std::str(it->GetReplicaNumber());
NameString += cellname;
}
return NameString;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B03PhysicsList.cc,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B03PhysicsList.cc,v 1.3 2002/11/08 17:35:19 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "globals.hh"
@@ -45,7 +45,7 @@
#include "G4Material.hh"
#include "G4MaterialTable.hh"
B03PhysicsList::B03PhysicsList(): G4VUserPhysicsList()
B03PhysicsList::B03PhysicsList() : G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B03PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:43 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: B03PrimaryGeneratorAction.cc,v 1.5 2002/11/08 17:35:19 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#include "globals.hh"
@@ -40,7 +40,7 @@ B03PrimaryGeneratorAction::B03PrimaryGeneratorAction()
particleGun = new G4ParticleGun(n_particle);
particleGun->SetParticleDefinition(G4Neutron::NeutronDefinition());
particleGun->SetParticleEnergy(10.0*MeV);
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -15.0005*cm));
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -90.0005*cm));
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
}
-18
View File
@@ -1,18 +0,0 @@
# $Id: GNUmakefile,v 1.1 2002/03/26 16:46:09 dressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleB04
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
CPPFLAGS +=
include $(G4INSTALL)/config/binmake.gmk
@@ -1,140 +0,0 @@
**********************************************
Geant4 version $Name: geant4-04-01 $
(28-Feb-2002)
Copyright : Geant4 Collaboration
**********************************************
phot: Total cross sections from Sandia parametrisation.
B04PhysicsList::SetCuts:CutLength : 1 (mm)
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: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
eBrem: Total cross sections from a NEW parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
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: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
MuIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuBrems: theoretical cross section
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
ProcessName: ParallelImportanceProcess
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
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
LElastic
inelastic
LFission
LCapture
Decay
================================================
WARNING - G4ImportanceAlgorithm::Calculate: ipre_over_ipost ! in [0.25, 4]: ipre_over_ipost = 8
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
ProcessName: ParallelImportanceProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
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 - G4ImportanceAlgorithm::~G4ImportanceAlgorithm: ipre_over_ipost ! in [0.25, 4] seen
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 !
@@ -1,44 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B04DetectorConstruction.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B04DetectorConstruction_hh
#define B04DetectorConstruction_hh B04DetectorConstruction_hh
class G4VPhysicalVolume;
#include "G4VUserDetectorConstruction.hh"
class B04DetectorConstruction : public G4VUserDetectorConstruction
{
public:
B04DetectorConstruction();
~B04DetectorConstruction();
G4VPhysicalVolume* Construct();
};
#endif
@@ -1,63 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B04PhysicsList.hh,v 1.2 2002/04/19 10:54:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B04PhysicsList_h
#define B04PhysicsList_h 1
#include "globals.hh"
#include "G4VUserPhysicsList.hh"
class B04PhysicsList : public G4VUserPhysicsList
{
public:
B04PhysicsList();
virtual ~B04PhysicsList();
protected:
// Construct particle and physics
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void SetCuts();
protected:
// these methods Construct physics processes and register them
virtual void ConstructGeneral();
virtual void ConstructEM();
virtual void ConstructHad();
virtual void ConstructLeptHad();
//
void ConstructAllBosons();
void ConstructAllLeptons();
void ConstructAllMesons();
void ConstructAllBaryons();
void ConstructAllIons();
void ConstructAllShortLiveds();
};
#endif
@@ -1,49 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B04PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B04PrimaryGeneratorAction_hh
#define B04PrimaryGeneratorAction_hh B04PrimaryGeneratorAction_hh
#include "G4VUserPrimaryGeneratorAction.hh"
class G4ParticleGun;
class G4Event;
class B04PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
B04PrimaryGeneratorAction();
~B04PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4ParticleGun* particleGun;
};
#endif
@@ -1,213 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B04DetectorConstruction.cc,v 1.4 2002/04/19 10:54:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "g4std/strstream"
#include "globals.hh"
#include "B04DetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "PhysicalConstants.h"
B04DetectorConstruction::B04DetectorConstruction()
{;}
B04DetectorConstruction::~B04DetectorConstruction()
{;}
G4VPhysicalVolume* B04DetectorConstruction::Construct()
{
char line[255];
G4double pos_x;
G4double pos_y;
G4double pos_z;
G4double density, pressure, temperature;
G4double A;
G4int Z;
G4String name, symbol;
G4double z;
G4double fractionmass;
A = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , Z= 1, A);
A = 12.01*g/mole;
G4Element* elC = new G4Element(name="Carbon" ,symbol="C" , Z = 6, A);
A = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , Z= 8, A);
A = 22.99*g/mole;
G4Element* elNa = new G4Element(name="Natrium" ,symbol="Na" , Z=11 , A);
A = 200.59*g/mole;
G4Element* elHg = new G4Element(name="Hg" ,symbol="Hg" , Z=80, A);
A = 26.98*g/mole;
G4Element* elAl = new G4Element(name="Aluminium" ,symbol="Al" , Z=13, A);
A = 28.09*g/mole;
G4Element* elSi = new G4Element(name="Silicon", symbol="Si", Z=14, A);
A = 39.1*g/mole;
G4Element* elK = new G4Element(name="K" ,symbol="K" , Z=19 , A);
A = 69.72*g/mole;
G4Element* elCa = new G4Element(name="Calzium" ,symbol="Ca" , Z=31 , A);
A = 55.85*g/mole;
G4Element* elFe = new G4Element(name="Iron" ,symbol="Fe", Z=26, A);
density = universe_mean_density; //from PhysicalConstants.h
pressure = 3.e-18*pascal;
temperature = 2.73*kelvin;
G4Material *Galactic =
new G4Material(name="Galactic", z=1., A=1.01*g/mole, density,
kStateGas,temperature,pressure);
density = 2.03*g/cm3;
G4Material* Concrete = new G4Material("Concrete", density, 10);
Concrete->AddElement(elH , fractionmass= 0.01);
Concrete->AddElement(elO , fractionmass= 0.529);
Concrete->AddElement(elNa , fractionmass= 0.016);
Concrete->AddElement(elHg , fractionmass= 0.002);
Concrete->AddElement(elAl , fractionmass= 0.034);
Concrete->AddElement(elSi , fractionmass= 0.337);
Concrete->AddElement(elK , fractionmass= 0.013);
Concrete->AddElement(elCa , fractionmass= 0.044);
Concrete->AddElement(elFe , fractionmass= 0.014);
Concrete->AddElement(elC , fractionmass= 0.001);
density = 0.0203*g/cm3;
G4Material* LightConcrete = new G4Material("LightConcrete", density, 10);
LightConcrete->AddElement(elH , fractionmass= 0.01);
LightConcrete->AddElement(elO , fractionmass= 0.529);
LightConcrete->AddElement(elNa , fractionmass= 0.016);
LightConcrete->AddElement(elHg , fractionmass= 0.002);
LightConcrete->AddElement(elAl , fractionmass= 0.034);
LightConcrete->AddElement(elSi , fractionmass= 0.337);
LightConcrete->AddElement(elK , fractionmass= 0.013);
LightConcrete->AddElement(elCa , fractionmass= 0.044);
LightConcrete->AddElement(elFe , fractionmass= 0.014);
LightConcrete->AddElement(elC , fractionmass= 0.001);
G4Material *WorldMaterial = Galactic;
/////////////////////////////
// world cylinder volume
////////////////////////////
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 100*cm;
G4double hightCylinder = 15.001*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*cm;
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical world
G4LogicalVolume *worldCylinder_log =
new G4LogicalVolume(worldCylinder, WorldMaterial, "worldCylinder_log");
G4VisAttributes * WorldVisAtt
= new G4VisAttributes(G4Colour(0.0,0.0,1.0));
WorldVisAtt->SetVisibility(true);
worldCylinder_log->SetVisAttributes(WorldVisAtt);
// physical world
name = "worldCylinder_phys";
G4VPhysicalVolume* worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
///////////////////////////////////////////////
// shield cylinder for (cells 2-4)
////////////////////////////////////////////////
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
G4double hightShield = 5*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*cm;
G4Tubs *aShield = new G4Tubs("aShield",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
// logical shield
G4LogicalVolume *aShield_log =
new G4LogicalVolume(aShield, Concrete, "aShield_log");
G4VisAttributes * shieldVisAtt
= new G4VisAttributes(G4Colour(0.0,1.0,1.0));
shieldVisAtt->SetVisibility(true);
shieldVisAtt->SetForceSolid(false);
aShield_log->SetVisAttributes(shieldVisAtt);
// physical shields
// physical shields for cell 2 to 4
for(G4int i=0; i<3; i++)
{
if (i+2<10) sprintf(line,"cell: 0%d, shield",i+2);
else sprintf(line,"cell: %d, shield",i+2);
G4String name(line);
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = -10*cm+(10*cm)*i;
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log, name, worldCylinder_log, false, 0);
}
return worldCylinder_phys;
}
@@ -1,189 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B04ImportanceDetectorConstruction.cc,v 1.3 2002/04/19 10:54:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B04ImportanceDetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
#include "G4IStore.hh"
B04ImportanceDetectorConstruction::B04ImportanceDetectorConstruction()
: fIStore(0)
{;}
B04ImportanceDetectorConstruction::~B04ImportanceDetectorConstruction()
{;}
G4VIStore* B04ImportanceDetectorConstruction::GetIStore()
{
if (!fIStore) G4Exception("B04DetectorConstruction::fIStore empty!");
return fIStore;
}
G4VPhysicalVolume* B04ImportanceDetectorConstruction::Construct()
{
///////////////////////////////////////
// world inportance cylinder volume
//////////////////////////////////////
G4String name;
G4double density = universe_mean_density; //from PhysicalConstants.h
G4double pressure = 3.e-18*pascal;
G4double temperature = 2.73*kelvin;
G4double z,A;
G4Material *Galactic =
new G4Material(name="Galactic", z=1., A=1.01*g/mole, density,
kStateGas,temperature,pressure);
G4Material *WorldMaterial = Galactic;
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 101*cm;
G4double hightCylinder = 16*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*cm;
G4Tubs *imp_worldCylinder = new G4Tubs("imp_worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical imp world
G4LogicalVolume *imp_worldCylinder_log =
new G4LogicalVolume(imp_worldCylinder, WorldMaterial, "imp_worldCylinder_log");
// physical world
name = "imp_worldCylinder_phys";
G4VPhysicalVolume* imp_worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), imp_worldCylinder_log,
name, 0, false, 0);
///////////////////////////////////////////////
// imp M1, D1, M2, D2
////////////////////////////////////////////////
///////////////////// M1 ///////////////////////
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 101*cm;
G4double MhightShield = 7.5002*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*cm;
G4Tubs *tube_M = new G4Tubs("tube_M",
innerRadiusShield,
outerRadiusShield,
MhightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *M1_log =
new G4LogicalVolume(tube_M, Galactic, "M1_log");
name = "impcell: M1";
G4double pos_x = 0*cm;
G4double pos_y = 0*cm;
G4double pos_z = -1*MhightShield;
G4VPhysicalVolume *pM1 =
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
M1_log, name, imp_worldCylinder_log, false, 0);
/////////////////// D1 ///////////////////////////
innerRadiusShield = 0*cm;
outerRadiusShield = 101*cm;
G4double DhightShield = 2*cm;
startAngleShield = 0*deg;
spanningAngleShield = 360*cm;
G4Tubs *tube_D = new G4Tubs("tube_D",
innerRadiusShield,
outerRadiusShield,
DhightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *D1_log =
new G4LogicalVolume(tube_D, Galactic, "D1_log");
name ="impcell: D1";
G4VPhysicalVolume *pD1 =
new G4PVPlacement(0, G4ThreeVector(0, 0, 0),
D1_log, name, M1_log, false, 0);
/////////////////////// M2 //////////////////////////////////
G4LogicalVolume *M2_log =
new G4LogicalVolume(tube_M, Galactic, "M2_log");
name = "impcell: M2";
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = MhightShield;
G4VPhysicalVolume *pM2 =
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
M2_log, name, imp_worldCylinder_log, false, 0);
//////////////////// D2 /////////////////////////////////
G4LogicalVolume *D2_log =
new G4LogicalVolume(tube_D, Galactic, "D2_log");
name ="impcell: D2";
G4VPhysicalVolume *pD2 =
new G4PVPlacement(0, G4ThreeVector(0, 0, 0),
D2_log, name, M2_log, false, 0);
/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
fIStore = new G4IStore(*imp_worldCylinder_phys);
// for the world volume repnum is -1 !!!!!!!!!!!!!!!!!!!!!!!
fIStore->AddImportanceRegion(1, *imp_worldCylinder_phys, -1); // repnum -1
fIStore->AddImportanceRegion(2, *pM1);
fIStore->AddImportanceRegion(4, *pD1);
fIStore->AddImportanceRegion(8, *pM2);
fIStore->AddImportanceRegion(16, *pD2);
return imp_worldCylinder_phys;
}
@@ -1,633 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B04PhysicsList.cc,v 1.2 2002/04/19 10:54:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "g4std/iomanip"
#include "B04PhysicsList.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4BosonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
B04PhysicsList::B04PhysicsList(): G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
B04PhysicsList::~B04PhysicsList()
{
}
void B04PhysicsList::ConstructParticle()
{
// In this method, static member functions should be called
// for all particles which you want to use.
// This ensures that objects of these particle types will be
// created in the program.
ConstructAllBosons();
ConstructAllLeptons();
ConstructAllMesons();
ConstructAllBaryons();
ConstructAllIons();
ConstructAllShortLiveds();
}
void B04PhysicsList::ConstructAllBosons()
{
// Construct all bosons
G4BosonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B04PhysicsList::ConstructAllLeptons()
{
// Construct all leptons
G4LeptonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B04PhysicsList::ConstructAllMesons()
{
// Construct all mesons
G4MesonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B04PhysicsList::ConstructAllBaryons()
{
// Construct all barions
G4BaryonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B04PhysicsList::ConstructAllIons()
{
// Construct light ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B04PhysicsList::ConstructAllShortLiveds()
{
// Construct resonaces and quarks
G4ShortLivedConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B04PhysicsList::ConstructProcess()
{
AddTransportation();
ConstructEM();
ConstructLeptHad();
ConstructHad();
ConstructGeneral();
}
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
void B04PhysicsList::ConstructEM()
{
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// gamma
// Construct processes for gamma
pmanager->AddDiscreteProcess(new G4GammaConversion());
pmanager->AddDiscreteProcess(new G4ComptonScattering());
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
} else if (particleName == "e-") {
//electron
// Construct processes for electron
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4eIonisation(),-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
} else if (particleName == "e+") {
//positron
// Construct processes for positron
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4eIonisation(),-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
// Construct processes for muon+
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);
} else if( particleName == "GenericIon" ) {
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(),-1,2,2);
} else {
if ((particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")&&
(!particle->IsShortLived()) ) {
// all others charged particles except geantino
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(),-1,2,2);
}
}
}
}
// Hadron Processes
#include "G4HadronElasticProcess.hh"
#include "G4HadronFissionProcess.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4KaonPlusInelasticProcess.hh"
#include "G4KaonZeroSInelasticProcess.hh"
#include "G4KaonZeroLInelasticProcess.hh"
#include "G4KaonMinusInelasticProcess.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4NeutronInelasticProcess.hh"
#include "G4AntiNeutronInelasticProcess.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4DeuteronInelasticProcess.hh"
#include "G4TritonInelasticProcess.hh"
#include "G4AlphaInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"
// Low-energy Models
#include "G4LElastic.hh"
#include "G4LFission.hh"
#include "G4LCapture.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4LEKaonPlusInelastic.hh"
#include "G4LEKaonZeroSInelastic.hh"
#include "G4LEKaonZeroLInelastic.hh"
#include "G4LEKaonMinusInelastic.hh"
#include "G4LEProtonInelastic.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4LENeutronInelastic.hh"
#include "G4LEAntiNeutronInelastic.hh"
#include "G4LELambdaInelastic.hh"
#include "G4LEAntiLambdaInelastic.hh"
#include "G4LESigmaPlusInelastic.hh"
#include "G4LESigmaMinusInelastic.hh"
#include "G4LEAntiSigmaPlusInelastic.hh"
#include "G4LEAntiSigmaMinusInelastic.hh"
#include "G4LEXiZeroInelastic.hh"
#include "G4LEXiMinusInelastic.hh"
#include "G4LEAntiXiZeroInelastic.hh"
#include "G4LEAntiXiMinusInelastic.hh"
#include "G4LEDeuteronInelastic.hh"
#include "G4LETritonInelastic.hh"
#include "G4LEAlphaInelastic.hh"
#include "G4LEOmegaMinusInelastic.hh"
#include "G4LEAntiOmegaMinusInelastic.hh"
// -- generator models
#include "G4TheoFSGenerator.hh"
#include "G4ExcitationHandler.hh"
#include "G4Evaporation.hh"
#include "G4CompetitiveFission.hh"
#include "G4FermiBreakUp.hh"
#include "G4StatMF.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4Fancy3DNucleus.hh"
#include "G4LEProtonInelastic.hh"
#include "G4StringModel.hh"
#include "G4PreCompoundModel.hh"
#include "G4FTFModel.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
//
// ConstructHad()
//
// Makes discrete physics processes for the hadrons, at present limited
// to those particles with GHEISHA interactions (INTRC > 0).
// The processes are: Elastic scattering, Inelastic scattering,
// Fission (for neutron only), and Capture (neutron).
//
// F.W.Jones 06-JUL-1998
//
void B04PhysicsList::ConstructHad()
{
// this will be the model class for high energies
G4TheoFSGenerator * theTheoModel = new G4TheoFSGenerator;
// all models for treatment of thermal nucleus
G4Evaporation * theEvaporation = new G4Evaporation;
G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
G4StatMF * theMF = new G4StatMF;
// Evaporation logic
G4ExcitationHandler * theHandler = new G4ExcitationHandler;
theHandler->SetEvaporation(theEvaporation);
theHandler->SetFermiModel(theFermiBreakUp);
theHandler->SetMultiFragmentation(theMF);
theHandler->SetMaxAandZForFermiBreakUp(12, 6);
theHandler->SetMinEForMultiFrag(3*MeV);
// Pre equilibrium stage
G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);
// a no-cascade generator-precompound interaface
G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface;
theCascade->SetDeExcitation(thePreEquilib);
// here come the high energy parts
// the string model; still not quite according to design - Explicite use of the forseen interfaces
// will be tested and documented in this program by beta-02 at latest.
G4VPartonStringModel * theStringModel;
theStringModel = new G4FTFModel;
theTheoModel->SetTransport(theCascade);
theTheoModel->SetHighEnergyGenerator(theStringModel);
theTheoModel->SetMinEnergy(19*GeV);
theTheoModel->SetMaxEnergy(100*TeV);
G4VLongitudinalStringDecay * theFragmentation = new G4QGSMFragmentation;
G4ExcitedStringDecay * theStringDecay = new G4ExcitedStringDecay(theFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
// done with the generator model (most of the above is also available as default)
G4HadronElasticProcess* theElasticProcess =
new G4HadronElasticProcess;
G4LElastic* theElasticModel = new G4LElastic;
theElasticProcess->RegisterMe(theElasticModel);
G4HadronElasticProcess* theElasticProcess1 =
new G4HadronElasticProcess;
theParticleIterator->reset();
while ((*theParticleIterator)()) {
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "pi+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4PionPlusInelasticProcess* theInelasticProcess =
new G4PionPlusInelasticProcess("inelastic");
G4LEPionPlusInelastic* theInelasticModel =
new G4LEPionPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "pi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4PionMinusInelasticProcess* theInelasticProcess =
new G4PionMinusInelasticProcess("inelastic");
G4LEPionMinusInelastic* theInelasticModel =
new G4LEPionMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonPlusInelasticProcess* theInelasticProcess =
new G4KaonPlusInelasticProcess("inelastic");
G4LEKaonPlusInelastic* theInelasticModel = new G4LEKaonPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon0S") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonZeroSInelasticProcess* theInelasticProcess =
new G4KaonZeroSInelasticProcess("inelastic");
G4LEKaonZeroSInelastic* theInelasticModel =
new G4LEKaonZeroSInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon0L") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonZeroLInelasticProcess* theInelasticProcess =
new G4KaonZeroLInelasticProcess("inelastic");
G4LEKaonZeroLInelastic* theInelasticModel =
new G4LEKaonZeroLInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonMinusInelasticProcess* theInelasticProcess =
new G4KaonMinusInelasticProcess("inelastic");
G4LEKaonMinusInelastic* theInelasticModel =
new G4LEKaonMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "proton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4ProtonInelasticProcess* theInelasticProcess =
new G4ProtonInelasticProcess("inelastic");
G4LEProtonInelastic* theInelasticModel = new G4LEProtonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_proton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiProtonInelasticProcess* theInelasticProcess =
new G4AntiProtonInelasticProcess("inelastic");
G4LEAntiProtonInelastic* theInelasticModel =
new G4LEAntiProtonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "neutron") {
// elastic scattering
G4LElastic* theElasticModel1 = new G4LElastic;
theElasticProcess1->RegisterMe(theElasticModel1);
pmanager->AddDiscreteProcess(theElasticProcess1);
// inelastic scattering
G4NeutronInelasticProcess* theInelasticProcess =
new G4NeutronInelasticProcess("inelastic");
G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
// fission
G4HadronFissionProcess* theFissionProcess =
new G4HadronFissionProcess;
G4LFission* theFissionModel = new G4LFission;
theFissionProcess->RegisterMe(theFissionModel);
pmanager->AddDiscreteProcess(theFissionProcess);
// capture
G4HadronCaptureProcess* theCaptureProcess =
new G4HadronCaptureProcess;
G4LCapture* theCaptureModel = new G4LCapture;
theCaptureProcess->RegisterMe(theCaptureModel);
pmanager->AddDiscreteProcess(theCaptureProcess);
}
else if (particleName == "anti_neutron") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiNeutronInelasticProcess* theInelasticProcess =
new G4AntiNeutronInelasticProcess("inelastic");
G4LEAntiNeutronInelastic* theInelasticModel =
new G4LEAntiNeutronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "lambda") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4LambdaInelasticProcess* theInelasticProcess =
new G4LambdaInelasticProcess("inelastic");
G4LELambdaInelastic* theInelasticModel = new G4LELambdaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_lambda") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiLambdaInelasticProcess* theInelasticProcess =
new G4AntiLambdaInelasticProcess("inelastic");
G4LEAntiLambdaInelastic* theInelasticModel =
new G4LEAntiLambdaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "sigma+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4SigmaPlusInelasticProcess* theInelasticProcess =
new G4SigmaPlusInelasticProcess("inelastic");
G4LESigmaPlusInelastic* theInelasticModel =
new G4LESigmaPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "sigma-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4SigmaMinusInelasticProcess* theInelasticProcess =
new G4SigmaMinusInelasticProcess("inelastic");
G4LESigmaMinusInelastic* theInelasticModel =
new G4LESigmaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_sigma+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiSigmaPlusInelasticProcess* theInelasticProcess =
new G4AntiSigmaPlusInelasticProcess("inelastic");
G4LEAntiSigmaPlusInelastic* theInelasticModel =
new G4LEAntiSigmaPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_sigma-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiSigmaMinusInelasticProcess* theInelasticProcess =
new G4AntiSigmaMinusInelasticProcess("inelastic");
G4LEAntiSigmaMinusInelastic* theInelasticModel =
new G4LEAntiSigmaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "xi0") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4XiZeroInelasticProcess* theInelasticProcess =
new G4XiZeroInelasticProcess("inelastic");
G4LEXiZeroInelastic* theInelasticModel =
new G4LEXiZeroInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "xi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4XiMinusInelasticProcess* theInelasticProcess =
new G4XiMinusInelasticProcess("inelastic");
G4LEXiMinusInelastic* theInelasticModel =
new G4LEXiMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_xi0") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiXiZeroInelasticProcess* theInelasticProcess =
new G4AntiXiZeroInelasticProcess("inelastic");
G4LEAntiXiZeroInelastic* theInelasticModel =
new G4LEAntiXiZeroInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_xi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiXiMinusInelasticProcess* theInelasticProcess =
new G4AntiXiMinusInelasticProcess("inelastic");
G4LEAntiXiMinusInelastic* theInelasticModel =
new G4LEAntiXiMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "deuteron") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4DeuteronInelasticProcess* theInelasticProcess =
new G4DeuteronInelasticProcess("inelastic");
G4LEDeuteronInelastic* theInelasticModel =
new G4LEDeuteronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "triton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4TritonInelasticProcess* theInelasticProcess =
new G4TritonInelasticProcess("inelastic");
G4LETritonInelastic* theInelasticModel =
new G4LETritonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "alpha") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AlphaInelasticProcess* theInelasticProcess =
new G4AlphaInelasticProcess("inelastic");
G4LEAlphaInelastic* theInelasticModel =
new G4LEAlphaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "omega-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4OmegaMinusInelasticProcess* theInelasticProcess =
new G4OmegaMinusInelasticProcess("inelastic");
G4LEOmegaMinusInelastic* theInelasticModel =
new G4LEOmegaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_omega-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiOmegaMinusInelasticProcess* theInelasticProcess =
new G4AntiOmegaMinusInelasticProcess("inelastic");
G4LEAntiOmegaMinusInelastic* theInelasticModel =
new G4LEAntiOmegaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
}
}
void B04PhysicsList::ConstructLeptHad()
{;}
#include "G4Decay.hh"
void B04PhysicsList::ConstructGeneral()
{
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (theDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(theDecayProcess);
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
void B04PhysicsList::SetCuts()
{
if (verboseLevel >0)
{
G4cout << "B04PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// "G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
@@ -1,55 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B04PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:43 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B04PrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4Neutron.hh"
#include "G4ThreeVector.hh"
B04PrimaryGeneratorAction::B04PrimaryGeneratorAction()
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
particleGun->SetParticleDefinition(G4Neutron::NeutronDefinition());
particleGun->SetParticleEnergy(10.0*MeV);
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -15.0005*cm));
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
}
B04PrimaryGeneratorAction::~B04PrimaryGeneratorAction()
{
delete particleGun;
}
void B04PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}
-18
View File
@@ -1,18 +0,0 @@
# $Id: GNUmakefile,v 1.1 2002/03/27 13:58:02 dressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleB05
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
CPPFLAGS +=
include $(G4INSTALL)/config/binmake.gmk
@@ -1,94 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: exampleB05.cc,v 1.6 2002/05/31 11:46:23 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleB05
//
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#include "g4std/iostream"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "B05DetectorConstruction.hh"
#include "B05PhysicsList.hh"
#include "B05PrimaryGeneratorAction.hh"
// Files specific for biasing and scoring
#include "G4PIScorer.hh"
#include "G4Sigma.hh"
#include "G4MassImportanceScoreSampler.hh"
int main(int argc, char **argv)
{
G4std::ostream *myout = &G4cout;
G4int numberOfEvent = 1000;
G4String random_status_out_file, random_status_in_file;
G4long myseed = 345354;
HepRandom::setTheSeed(myseed);
G4RunManager *runManager = new G4RunManager;
// create the detector ---------------------------
B05DetectorConstruction *detector = new B05DetectorConstruction();
runManager->SetUserInitialization(detector);
// ---------------------------------------------------
runManager->SetUserInitialization(new B05PhysicsList);
runManager->SetUserAction(new B05PrimaryGeneratorAction);
runManager->Initialize();
// the IStore is filled during detector construction
G4VIStore &aIstore = *detector->GetIStore();
// create the importance and scoring sampler for biasing and scoring
// in the tracking world
G4PIScorer aScorer(aIstore);
G4MassImportanceScoreSampler mim(aIstore, aScorer, "neutron");
mim.Initialize();
G4UImanager* UI;
UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/control/execute init.mac");
runManager->BeamOn(numberOfEvent);
// print all the numbers calculated from the scorer
*myout << "output aScorer, tracking geometry, neutron" << G4endl;
*myout << aScorer << G4endl;
*myout << "----------------------------------------------" << G4endl;
return 0;
}
@@ -1,391 +0,0 @@
**********************************************
Geant4 version $Name: geant4-04-01 $
(28-Feb-2002)
Copyright : Geant4 Collaboration
**********************************************
Going to assign importance: 1, to volumeworldCylinder_phys
Going to assign importance: 2, to volumecell: 02, shield
Going to assign importance: 4, to volumecell: 03, shield
Going to assign importance: 8, to volumecell: 04, shield
phot: Total cross sections from Sandia parametrisation.
B05PhysicsList::SetCuts:CutLength : 1 (mm)
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: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
eBrem: Total cross sections from a NEW parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
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: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
MuIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuBrems: theoretical cross section
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
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::G4ProcessPlacer: for: neutron
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
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
================================================
WARNING - G4ImportanceAlgorithm::Calculate: ipre_over_ipost ! in [0.25, 4]: ipre_over_ipost = 8
output aScorer, tracking geometry, neutron
Volume name = worldCylinder_phys, Replica number = -1
WeighteOfHistorysEntering
entries : 356
Sum(w) : 356
Sum(w*x) : 356
Sum(w*x*x) : 356
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 356
Sum(x^2) : 356
HistorysEnteringWeighted
entries : 356
Sum(w) : 356
Sum(w*x) : 356
Sum(w*x*x) : 356
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 356
Sum(x^2) : 356
EnergyEnteringHistoryWeighted
entries : 356
Sum(w) : 356
Sum(w*x) : 2974.88
Sum(w*x*x) : 26871.2
mean=Sum(w*x) / Sum(w) : 8.35641
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 2.37721
Sum(x) : 2974.88
Sum(x^2) : 26871.2
Volume name = cell: 02, shield, Replica number = 0
WeighteOfHistorysEntering
entries : 1146
Sum(w) : 1146
Sum(w*x) : 573
Sum(w*x*x) : 286.5
mean=Sum(w*x) / Sum(w) : 0.5
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 573
Sum(x^2) : 286.5
HistorysEnteringWeighted
entries : 1146
Sum(w) : 573
Sum(w*x) : 573
Sum(w*x*x) : 573
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1146
Sum(x^2) : 1146
EnergyEnteringHistoryWeighted
entries : 1146
Sum(w) : 573
Sum(w*x) : 5518.16
Sum(w*x*x) : 54083.1
mean=Sum(w*x) / Sum(w) : 9.63029
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.28189
Sum(x) : 11036.3
Sum(x^2) : 108166
WeighteOfCollisions
entries : 2685
Sum(w) : 2685
Sum(w*x) : 1342.5
Sum(w*x*x) : 671.25
mean=Sum(w*x) / Sum(w) : 0.5
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1342.5
Sum(x^2) : 671.25
CollisionsWeighted
entries : 2685
Sum(w) : 1342.5
Sum(w*x) : 1342.5
Sum(w*x*x) : 1342.5
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 2685
Sum(x^2) : 2685
Volume name = cell: 03, shield, Replica number = 0
WeighteOfHistorysEntering
entries : 1416
Sum(w) : 1416
Sum(w*x) : 354
Sum(w*x*x) : 88.5
mean=Sum(w*x) / Sum(w) : 0.25
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 354
Sum(x^2) : 88.5
HistorysEnteringWeighted
entries : 1416
Sum(w) : 354
Sum(w*x) : 354
Sum(w*x*x) : 354
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1416
Sum(x^2) : 1416
EnergyEnteringHistoryWeighted
entries : 1416
Sum(w) : 354
Sum(w*x) : 3338.06
Sum(w*x*x) : 32325.3
mean=Sum(w*x) / Sum(w) : 9.42954
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.54859
Sum(x) : 13352.2
Sum(x^2) : 129301
WeighteOfCollisions
entries : 3458
Sum(w) : 3458
Sum(w*x) : 864.5
Sum(w*x*x) : 216.125
mean=Sum(w*x) / Sum(w) : 0.25
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 864.5
Sum(x^2) : 216.125
CollisionsWeighted
entries : 3458
Sum(w) : 864.5
Sum(w*x) : 864.5
Sum(w*x*x) : 864.5
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 3458
Sum(x^2) : 3458
Volume name = cell: 04, shield, Replica number = 0
WeighteOfHistorysEntering
entries : 1522
Sum(w) : 1522
Sum(w*x) : 190.25
Sum(w*x*x) : 23.7812
mean=Sum(w*x) / Sum(w) : 0.125
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 190.25
Sum(x^2) : 23.7812
HistorysEnteringWeighted
entries : 1522
Sum(w) : 190.25
Sum(w*x) : 190.25
Sum(w*x*x) : 190.25
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1522
Sum(x^2) : 1522
EnergyEnteringHistoryWeighted
entries : 1522
Sum(w) : 190.25
Sum(w*x) : 1801.32
Sum(w*x*x) : 17506.7
mean=Sum(w*x) / Sum(w) : 9.46817
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.54053
Sum(x) : 14410.6
Sum(x^2) : 140054
WeighteOfCollisions
entries : 4193
Sum(w) : 4193
Sum(w*x) : 524.125
Sum(w*x*x) : 65.5156
mean=Sum(w*x) / Sum(w) : 0.125
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 524.125
Sum(x^2) : 65.5156
CollisionsWeighted
entries : 4193
Sum(w) : 524.125
Sum(w*x) : 524.125
Sum(w*x*x) : 524.125
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 4193
Sum(x^2) : 4193
----------------------------------------------
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
ProcessName: MScoreProcess, 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
MassImportanceProcess
Transportation
DoIt Vector:
Transportation
MassImportanceProcess
LElastic
inelastic
LFission
LCapture
Decay
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
ProcessName: MassImportanceProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
MassImportanceProcess
Transportation
DoIt Vector:
Transportation
MassImportanceProcess
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 - G4ImportanceAlgorithm::~G4ImportanceAlgorithm: ipre_over_ipost ! in [0.25, 4] seen
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 !
@@ -1,50 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B05DetectorConstruction.hh,v 1.2 2002/04/19 10:54:30 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B03DetectorConstruction_hh
#define B05DetectorConstruction_hh B05DetectorConstruction_hh
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
class G4VIStore;
class B05DetectorConstruction : public G4VUserDetectorConstruction
{
public:
B05DetectorConstruction();
~B05DetectorConstruction();
G4VPhysicalVolume* Construct();
G4VIStore* GetIStore();
private:
G4VIStore *fIStore;
};
#endif
@@ -1,66 +0,0 @@
//
// ********************************************************************
// * 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 B05PhysicsList_h
#define B05PhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
// taken from Tst12PhysicsList
class B05PhysicsList: public G4VUserPhysicsList
{
public:
B05PhysicsList();
virtual ~B05PhysicsList();
protected:
// Construct particle and physics
virtual void ConstructParticle();
virtual void ConstructProcess();
//
virtual void SetCuts();
protected:
// these methods Construct physics processes and register them
virtual void ConstructGeneral();
virtual void ConstructEM();
virtual void ConstructHad();
virtual void ConstructLeptHad();
//
void ConstructAllBosons();
void ConstructAllLeptons();
void ConstructAllMesons();
void ConstructAllBaryons();
void ConstructAllIons();
void ConstructAllShortLiveds();
};
#endif
@@ -1,48 +0,0 @@
//
// ********************************************************************
// * 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 B05PrimaryGeneratorAction_hh
#define B05PrimaryGeneratorAction_hh B05PrimaryGeneratorAction_hh
#include "G4VUserPrimaryGeneratorAction.hh"
class G4ParticleGun;
class G4Event;
class B05PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
B05PrimaryGeneratorAction();
~B05PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4ParticleGun* particleGun;
};
#endif
-5
View File
@@ -1,5 +0,0 @@
/control/verbose 0
/run/verbose 0
/event/verbose 0
/tracking/verbose 0
@@ -1,242 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B05DetectorConstruction.cc,v 1.6 2002/04/19 10:54:30 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "g4std/strstream"
#include "globals.hh"
#include "B05DetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "PhysicalConstants.h"
// for importance biasing
#include "G4IStore.hh"
B05DetectorConstruction::B05DetectorConstruction()
: fIStore(0)
{;}
B05DetectorConstruction::~B05DetectorConstruction()
{;}
G4VIStore* B05DetectorConstruction::GetIStore()
{
if (!fIStore) G4Exception("B05DetectorConstruction::fIStore empty!");
return fIStore;
}
G4VPhysicalVolume* B05DetectorConstruction::Construct()
{
char line[255];
G4double pos_x;
G4double pos_y;
G4double pos_z;
G4double density, pressure, temperature;
G4double A;
G4int Z;
G4String name, symbol;
G4double z;
G4double fractionmass;
A = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , Z= 1, A);
A = 12.01*g/mole;
G4Element* elC = new G4Element(name="Carbon" ,symbol="C" , Z = 6, A);
A = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , Z= 8, A);
A = 22.99*g/mole;
G4Element* elNa = new G4Element(name="Natrium" ,symbol="Na" , Z=11 , A);
A = 200.59*g/mole;
G4Element* elHg = new G4Element(name="Hg" ,symbol="Hg" , Z=80, A);
A = 26.98*g/mole;
G4Element* elAl = new G4Element(name="Aluminium" ,symbol="Al" , Z=13, A);
A = 28.09*g/mole;
G4Element* elSi = new G4Element(name="Silicon", symbol="Si", Z=14, A);
A = 39.1*g/mole;
G4Element* elK = new G4Element(name="K" ,symbol="K" , Z=19 , A);
A = 69.72*g/mole;
G4Element* elCa = new G4Element(name="Calzium" ,symbol="Ca" , Z=31 , A);
A = 55.85*g/mole;
G4Element* elFe = new G4Element(name="Iron" ,symbol="Fe", Z=26, A);
density = universe_mean_density; //from PhysicalConstants.h
pressure = 3.e-18*pascal;
temperature = 2.73*kelvin;
G4Material *Galactic =
new G4Material(name="Galactic", z=1., A=1.01*g/mole, density,
kStateGas,temperature,pressure);
density = 2.03*g/cm3;
G4Material* Concrete = new G4Material("Concrete", density, 10);
Concrete->AddElement(elH , fractionmass= 0.01);
Concrete->AddElement(elO , fractionmass= 0.529);
Concrete->AddElement(elNa , fractionmass= 0.016);
Concrete->AddElement(elHg , fractionmass= 0.002);
Concrete->AddElement(elAl , fractionmass= 0.034);
Concrete->AddElement(elSi , fractionmass= 0.337);
Concrete->AddElement(elK , fractionmass= 0.013);
Concrete->AddElement(elCa , fractionmass= 0.044);
Concrete->AddElement(elFe , fractionmass= 0.014);
Concrete->AddElement(elC , fractionmass= 0.001);
density = 0.0203*g/cm3;
G4Material* LightConcrete = new G4Material("LightConcrete", density, 10);
LightConcrete->AddElement(elH , fractionmass= 0.01);
LightConcrete->AddElement(elO , fractionmass= 0.529);
LightConcrete->AddElement(elNa , fractionmass= 0.016);
LightConcrete->AddElement(elHg , fractionmass= 0.002);
LightConcrete->AddElement(elAl , fractionmass= 0.034);
LightConcrete->AddElement(elSi , fractionmass= 0.337);
LightConcrete->AddElement(elK , fractionmass= 0.013);
LightConcrete->AddElement(elCa , fractionmass= 0.044);
LightConcrete->AddElement(elFe , fractionmass= 0.014);
LightConcrete->AddElement(elC , fractionmass= 0.001);
G4Material *WorldMaterial = Galactic;
/////////////////////////////
// world cylinder volume
////////////////////////////
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 100*cm;
G4double hightCylinder = 15.001*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*cm;
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical world
G4LogicalVolume *worldCylinder_log =
new G4LogicalVolume(worldCylinder, WorldMaterial, "worldCylinder_log");
G4VisAttributes * WorldVisAtt
= new G4VisAttributes(G4Colour(0.0,0.0,1.0));
WorldVisAtt->SetVisibility(true);
worldCylinder_log->SetVisAttributes(WorldVisAtt);
// physical world
name = "worldCylinder_phys";
G4VPhysicalVolume* worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
G4std::vector< G4VPhysicalVolume * > physvolumes;
physvolumes.push_back(worldCylinder_phys);
///////////////////////////////////////////////
// shield cylinder for (cells 2-4)
////////////////////////////////////////////////
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
G4double hightShield = 5*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*cm;
G4Tubs *aShield = new G4Tubs("aShield",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
// logical shield
G4LogicalVolume *aShield_log =
new G4LogicalVolume(aShield, Concrete, "aShield_log");
G4VisAttributes * shieldVisAtt
= new G4VisAttributes(G4Colour(0.0,1.0,1.0));
shieldVisAtt->SetVisibility(true);
shieldVisAtt->SetForceSolid(false);
aShield_log->SetVisAttributes(shieldVisAtt);
// physical shields
// physical shields for cell 2 to 4
for(G4int i=0; i<3; i++) {
if (i+2<10) sprintf(line,"cell: 0%d, shield",i+2);
else sprintf(line,"cell: %d, shield",i+2);
G4String name(line);
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = -10*cm+(10*cm)*i;
physvolumes.
push_back(new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log, name, worldCylinder_log,
false, 0));
}
fIStore = new G4IStore(*worldCylinder_phys);
// for the world volume repnum is -1 !
G4int n = 0;
for (G4std::vector<G4VPhysicalVolume *>::iterator it = physvolumes.begin();
it != physvolumes.end(); it++)
{
G4double i = pow(2., n++);
G4cout << "Going to assign importance: " << i << ", to volume"
<< (*it)->GetName() << G4endl;
if (*it == worldCylinder_phys)
{
// repnum -1
fIStore->AddImportanceRegion(i, **it, -1);
}
fIStore->AddImportanceRegion(i, **it);
}
return worldCylinder_phys;
}
@@ -1,633 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B05PhysicsList.cc,v 1.2 2002/04/19 10:54:30 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "g4std/iomanip"
#include "B05PhysicsList.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4BosonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
B05PhysicsList::B05PhysicsList(): G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
B05PhysicsList::~B05PhysicsList()
{
}
void B05PhysicsList::ConstructParticle()
{
// In this method, static member functions should be called
// for all particles which you want to use.
// This ensures that objects of these particle types will be
// created in the program.
ConstructAllBosons();
ConstructAllLeptons();
ConstructAllMesons();
ConstructAllBaryons();
ConstructAllIons();
ConstructAllShortLiveds();
}
void B05PhysicsList::ConstructAllBosons()
{
// Construct all bosons
G4BosonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B05PhysicsList::ConstructAllLeptons()
{
// Construct all leptons
G4LeptonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B05PhysicsList::ConstructAllMesons()
{
// Construct all mesons
G4MesonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B05PhysicsList::ConstructAllBaryons()
{
// Construct all barions
G4BaryonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B05PhysicsList::ConstructAllIons()
{
// Construct light ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B05PhysicsList::ConstructAllShortLiveds()
{
// Construct resonaces and quarks
G4ShortLivedConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B05PhysicsList::ConstructProcess()
{
AddTransportation();
ConstructEM();
ConstructLeptHad();
ConstructHad();
ConstructGeneral();
}
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
void B05PhysicsList::ConstructEM()
{
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// gamma
// Construct processes for gamma
pmanager->AddDiscreteProcess(new G4GammaConversion());
pmanager->AddDiscreteProcess(new G4ComptonScattering());
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
} else if (particleName == "e-") {
//electron
// Construct processes for electron
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4eIonisation(),-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
} else if (particleName == "e+") {
//positron
// Construct processes for positron
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4eIonisation(),-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
// Construct processes for muon+
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);
} else if( particleName == "GenericIon" ) {
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(),-1,2,2);
} else {
if ((particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")&&
(!particle->IsShortLived()) ) {
// all others charged particles except geantino
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(),-1,2,2);
}
}
}
}
// Hadron Processes
#include "G4HadronElasticProcess.hh"
#include "G4HadronFissionProcess.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4KaonPlusInelasticProcess.hh"
#include "G4KaonZeroSInelasticProcess.hh"
#include "G4KaonZeroLInelasticProcess.hh"
#include "G4KaonMinusInelasticProcess.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4NeutronInelasticProcess.hh"
#include "G4AntiNeutronInelasticProcess.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4DeuteronInelasticProcess.hh"
#include "G4TritonInelasticProcess.hh"
#include "G4AlphaInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"
// Low-energy Models
#include "G4LElastic.hh"
#include "G4LFission.hh"
#include "G4LCapture.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4LEKaonPlusInelastic.hh"
#include "G4LEKaonZeroSInelastic.hh"
#include "G4LEKaonZeroLInelastic.hh"
#include "G4LEKaonMinusInelastic.hh"
#include "G4LEProtonInelastic.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4LENeutronInelastic.hh"
#include "G4LEAntiNeutronInelastic.hh"
#include "G4LELambdaInelastic.hh"
#include "G4LEAntiLambdaInelastic.hh"
#include "G4LESigmaPlusInelastic.hh"
#include "G4LESigmaMinusInelastic.hh"
#include "G4LEAntiSigmaPlusInelastic.hh"
#include "G4LEAntiSigmaMinusInelastic.hh"
#include "G4LEXiZeroInelastic.hh"
#include "G4LEXiMinusInelastic.hh"
#include "G4LEAntiXiZeroInelastic.hh"
#include "G4LEAntiXiMinusInelastic.hh"
#include "G4LEDeuteronInelastic.hh"
#include "G4LETritonInelastic.hh"
#include "G4LEAlphaInelastic.hh"
#include "G4LEOmegaMinusInelastic.hh"
#include "G4LEAntiOmegaMinusInelastic.hh"
// -- generator models
#include "G4TheoFSGenerator.hh"
#include "G4ExcitationHandler.hh"
#include "G4Evaporation.hh"
#include "G4CompetitiveFission.hh"
#include "G4FermiBreakUp.hh"
#include "G4StatMF.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4Fancy3DNucleus.hh"
#include "G4LEProtonInelastic.hh"
#include "G4StringModel.hh"
#include "G4PreCompoundModel.hh"
#include "G4FTFModel.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
//
// ConstructHad()
//
// Makes discrete physics processes for the hadrons, at present limited
// to those particles with GHEISHA interactions (INTRC > 0).
// The processes are: Elastic scattering, Inelastic scattering,
// Fission (for neutron only), and Capture (neutron).
//
// F.W.Jones 06-JUL-1998
//
void B05PhysicsList::ConstructHad()
{
// this will be the model class for high energies
G4TheoFSGenerator * theTheoModel = new G4TheoFSGenerator;
// all models for treatment of thermal nucleus
G4Evaporation * theEvaporation = new G4Evaporation;
G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
G4StatMF * theMF = new G4StatMF;
// Evaporation logic
G4ExcitationHandler * theHandler = new G4ExcitationHandler;
theHandler->SetEvaporation(theEvaporation);
theHandler->SetFermiModel(theFermiBreakUp);
theHandler->SetMultiFragmentation(theMF);
theHandler->SetMaxAandZForFermiBreakUp(12, 6);
theHandler->SetMinEForMultiFrag(3*MeV);
// Pre equilibrium stage
G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);
// a no-cascade generator-precompound interaface
G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface;
theCascade->SetDeExcitation(thePreEquilib);
// here come the high energy parts
// the string model; still not quite according to design - Explicite use of the forseen interfaces
// will be tested and documented in this program by beta-02 at latest.
G4VPartonStringModel * theStringModel;
theStringModel = new G4FTFModel;
theTheoModel->SetTransport(theCascade);
theTheoModel->SetHighEnergyGenerator(theStringModel);
theTheoModel->SetMinEnergy(19*GeV);
theTheoModel->SetMaxEnergy(100*TeV);
G4VLongitudinalStringDecay * theFragmentation = new G4QGSMFragmentation;
G4ExcitedStringDecay * theStringDecay = new G4ExcitedStringDecay(theFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
// done with the generator model (most of the above is also available as default)
G4HadronElasticProcess* theElasticProcess =
new G4HadronElasticProcess;
G4LElastic* theElasticModel = new G4LElastic;
theElasticProcess->RegisterMe(theElasticModel);
G4HadronElasticProcess* theElasticProcess1 =
new G4HadronElasticProcess;
theParticleIterator->reset();
while ((*theParticleIterator)()) {
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "pi+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4PionPlusInelasticProcess* theInelasticProcess =
new G4PionPlusInelasticProcess("inelastic");
G4LEPionPlusInelastic* theInelasticModel =
new G4LEPionPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "pi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4PionMinusInelasticProcess* theInelasticProcess =
new G4PionMinusInelasticProcess("inelastic");
G4LEPionMinusInelastic* theInelasticModel =
new G4LEPionMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonPlusInelasticProcess* theInelasticProcess =
new G4KaonPlusInelasticProcess("inelastic");
G4LEKaonPlusInelastic* theInelasticModel = new G4LEKaonPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon0S") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonZeroSInelasticProcess* theInelasticProcess =
new G4KaonZeroSInelasticProcess("inelastic");
G4LEKaonZeroSInelastic* theInelasticModel =
new G4LEKaonZeroSInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon0L") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonZeroLInelasticProcess* theInelasticProcess =
new G4KaonZeroLInelasticProcess("inelastic");
G4LEKaonZeroLInelastic* theInelasticModel =
new G4LEKaonZeroLInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonMinusInelasticProcess* theInelasticProcess =
new G4KaonMinusInelasticProcess("inelastic");
G4LEKaonMinusInelastic* theInelasticModel =
new G4LEKaonMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "proton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4ProtonInelasticProcess* theInelasticProcess =
new G4ProtonInelasticProcess("inelastic");
G4LEProtonInelastic* theInelasticModel = new G4LEProtonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_proton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiProtonInelasticProcess* theInelasticProcess =
new G4AntiProtonInelasticProcess("inelastic");
G4LEAntiProtonInelastic* theInelasticModel =
new G4LEAntiProtonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "neutron") {
// elastic scattering
G4LElastic* theElasticModel1 = new G4LElastic;
theElasticProcess1->RegisterMe(theElasticModel1);
pmanager->AddDiscreteProcess(theElasticProcess1);
// inelastic scattering
G4NeutronInelasticProcess* theInelasticProcess =
new G4NeutronInelasticProcess("inelastic");
G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
// fission
G4HadronFissionProcess* theFissionProcess =
new G4HadronFissionProcess;
G4LFission* theFissionModel = new G4LFission;
theFissionProcess->RegisterMe(theFissionModel);
pmanager->AddDiscreteProcess(theFissionProcess);
// capture
G4HadronCaptureProcess* theCaptureProcess =
new G4HadronCaptureProcess;
G4LCapture* theCaptureModel = new G4LCapture;
theCaptureProcess->RegisterMe(theCaptureModel);
pmanager->AddDiscreteProcess(theCaptureProcess);
}
else if (particleName == "anti_neutron") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiNeutronInelasticProcess* theInelasticProcess =
new G4AntiNeutronInelasticProcess("inelastic");
G4LEAntiNeutronInelastic* theInelasticModel =
new G4LEAntiNeutronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "lambda") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4LambdaInelasticProcess* theInelasticProcess =
new G4LambdaInelasticProcess("inelastic");
G4LELambdaInelastic* theInelasticModel = new G4LELambdaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_lambda") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiLambdaInelasticProcess* theInelasticProcess =
new G4AntiLambdaInelasticProcess("inelastic");
G4LEAntiLambdaInelastic* theInelasticModel =
new G4LEAntiLambdaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "sigma+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4SigmaPlusInelasticProcess* theInelasticProcess =
new G4SigmaPlusInelasticProcess("inelastic");
G4LESigmaPlusInelastic* theInelasticModel =
new G4LESigmaPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "sigma-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4SigmaMinusInelasticProcess* theInelasticProcess =
new G4SigmaMinusInelasticProcess("inelastic");
G4LESigmaMinusInelastic* theInelasticModel =
new G4LESigmaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_sigma+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiSigmaPlusInelasticProcess* theInelasticProcess =
new G4AntiSigmaPlusInelasticProcess("inelastic");
G4LEAntiSigmaPlusInelastic* theInelasticModel =
new G4LEAntiSigmaPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_sigma-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiSigmaMinusInelasticProcess* theInelasticProcess =
new G4AntiSigmaMinusInelasticProcess("inelastic");
G4LEAntiSigmaMinusInelastic* theInelasticModel =
new G4LEAntiSigmaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "xi0") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4XiZeroInelasticProcess* theInelasticProcess =
new G4XiZeroInelasticProcess("inelastic");
G4LEXiZeroInelastic* theInelasticModel =
new G4LEXiZeroInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "xi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4XiMinusInelasticProcess* theInelasticProcess =
new G4XiMinusInelasticProcess("inelastic");
G4LEXiMinusInelastic* theInelasticModel =
new G4LEXiMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_xi0") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiXiZeroInelasticProcess* theInelasticProcess =
new G4AntiXiZeroInelasticProcess("inelastic");
G4LEAntiXiZeroInelastic* theInelasticModel =
new G4LEAntiXiZeroInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_xi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiXiMinusInelasticProcess* theInelasticProcess =
new G4AntiXiMinusInelasticProcess("inelastic");
G4LEAntiXiMinusInelastic* theInelasticModel =
new G4LEAntiXiMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "deuteron") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4DeuteronInelasticProcess* theInelasticProcess =
new G4DeuteronInelasticProcess("inelastic");
G4LEDeuteronInelastic* theInelasticModel =
new G4LEDeuteronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "triton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4TritonInelasticProcess* theInelasticProcess =
new G4TritonInelasticProcess("inelastic");
G4LETritonInelastic* theInelasticModel =
new G4LETritonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "alpha") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AlphaInelasticProcess* theInelasticProcess =
new G4AlphaInelasticProcess("inelastic");
G4LEAlphaInelastic* theInelasticModel =
new G4LEAlphaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "omega-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4OmegaMinusInelasticProcess* theInelasticProcess =
new G4OmegaMinusInelasticProcess("inelastic");
G4LEOmegaMinusInelastic* theInelasticModel =
new G4LEOmegaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_omega-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiOmegaMinusInelasticProcess* theInelasticProcess =
new G4AntiOmegaMinusInelasticProcess("inelastic");
G4LEAntiOmegaMinusInelastic* theInelasticModel =
new G4LEAntiOmegaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
}
}
void B05PhysicsList::ConstructLeptHad()
{;}
#include "G4Decay.hh"
void B05PhysicsList::ConstructGeneral()
{
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (theDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(theDecayProcess);
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
void B05PhysicsList::SetCuts()
{
if (verboseLevel >0)
{
G4cout << "B05PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// "G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
-18
View File
@@ -1,18 +0,0 @@
# $Id: GNUmakefile,v 1.1 2002/03/27 16:17:43 dressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleB06
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
CPPFLAGS +=
include $(G4INSTALL)/config/binmake.gmk
@@ -1,99 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: exampleB06.cc,v 1.7 2002/05/31 11:46:24 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleB06
//
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#include "g4std/iostream"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "B06DetectorConstruction.hh"
#include "B06PhysicsList.hh"
#include "B06PrimaryGeneratorAction.hh"
#include "B06ImportanceDetectorConstruction.hh"
// Files specific for biasing and scoring
#include "G4ParallelImportanceScoreSampler.hh"
#include "B06Scorer.hh"
#include "G4Sigma.hh"
// class for special output
#include "B06ScorePrinter.hh"
int main(int argc, char **argv)
{
G4std::ostream *myout = &G4cout;
G4int numberOfEvent = 1000;
G4String random_status_out_file, random_status_in_file;
G4long myseed = 345354;
HepRandom::setTheSeed(myseed);
G4RunManager *runManager = new G4RunManager;
// create the "tracking" detector -----------------
runManager->SetUserInitialization(new B06DetectorConstruction);
// ---------------------------------------------------
runManager->SetUserInitialization(new B06PhysicsList);
runManager->SetUserAction(new B06PrimaryGeneratorAction);
runManager->Initialize();
// create the detector for the importances and scoring
B06ImportanceDetectorConstruction importancedetector;
// the IStore is filled during detector construction
G4VIStore &aIstore = *importancedetector.GetIStore();
// create importance sampler to importance sample neutrons
// in the importance geometry
B06Scorer iScorer(aIstore);
G4ParallelImportanceScoreSampler pmgr(aIstore, iScorer, "neutron");
pmgr.Initialize();
runManager->BeamOn(numberOfEvent);
// print all the numbers calculated from the scorer
*myout << "output iScorer, importance geometry, neutron" << G4endl;
*myout << iScorer << G4endl;
*myout << "----------------------------------------------" << G4endl;
// special output
B06ScorePrinter sp;
sp.PrintHeader(myout);
sp.PrintTable(iScorer.GetMapPtkTallys(), myout);
return 0;
}
@@ -1,439 +0,0 @@
**********************************************
Geant4 version $Name: geant4-04-01 $
(28-Feb-2002)
Copyright : Geant4 Collaboration
**********************************************
phot: Total cross sections from Sandia parametrisation.
B06PhysicsList::SetCuts:CutLength : 1 (mm)
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: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
eBrem: Total cross sections from a NEW parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
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: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
MuIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuBrems: theoretical cross section
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
ProcessName: PScoreProcess
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
PScoreProcess
Transportation
DoIt Vector:
Transportation
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
================================================
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
ProcessName: ParallelImportanceProcess
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
PScoreProcess
Transportation
DoIt Vector:
Transportation
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
The final Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
PScoreProcess
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
================================================
WARNING - G4ImportanceAlgorithm::Calculate: ipre_over_ipost ! in [0.25, 4]: ipre_over_ipost = 8
output iScorer, importance geometry, neutron
Volume name = imp_worldCylinder_phys, Replica number = -1
WeighteOfHistorysEntering
entries : 353
Sum(w) : 353
Sum(w*x) : 353
Sum(w*x*x) : 353
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 353
Sum(x^2) : 353
HistorysEnteringWeighted
entries : 353
Sum(w) : 353
Sum(w*x) : 353
Sum(w*x*x) : 353
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 353
Sum(x^2) : 353
EnergyEnteringHistoryWeighted
entries : 353
Sum(w) : 353
Sum(w*x) : 3099.57
Sum(w*x*x) : 28606.1
mean=Sum(w*x) / Sum(w) : 8.78066
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.98425
Sum(x) : 3099.57
Sum(x^2) : 28606.1
Volume name = impcell: M1, Replica number = 0
WeighteOfHistorysEntering
entries : 2646
Sum(w) : 2646
Sum(w*x) : 1323
Sum(w*x*x) : 661.5
mean=Sum(w*x) / Sum(w) : 0.5
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1323
Sum(x^2) : 661.5
HistorysEnteringWeighted
entries : 2646
Sum(w) : 1323
Sum(w*x) : 1323
Sum(w*x*x) : 1323
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 2646
Sum(x^2) : 2646
EnergyEnteringHistoryWeighted
entries : 2646
Sum(w) : 1323
Sum(w*x) : 12647.9
Sum(w*x*x) : 123333
mean=Sum(w*x) / Sum(w) : 9.56003
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.35215
Sum(x) : 25295.8
Sum(x^2) : 246667
WeighteOfCollisions
entries : 2578
Sum(w) : 2578
Sum(w*x) : 1289
Sum(w*x*x) : 644.5
mean=Sum(w*x) / Sum(w) : 0.5
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1289
Sum(x^2) : 644.5
CollisionsWeighted
entries : 2578
Sum(w) : 1289
Sum(w*x) : 1289
Sum(w*x*x) : 1289
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 2578
Sum(x^2) : 2578
Volume name = impcell: D1, Replica number = 0
WeighteOfHistorysEntering
entries : 1757
Sum(w) : 1757
Sum(w*x) : 439.25
Sum(w*x*x) : 109.812
mean=Sum(w*x) / Sum(w) : 0.25
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 439.25
Sum(x^2) : 109.812
HistorysEnteringWeighted
entries : 1757
Sum(w) : 439.25
Sum(w*x) : 439.25
Sum(w*x*x) : 439.25
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1757
Sum(x^2) : 1757
EnergyEnteringHistoryWeighted
entries : 1757
Sum(w) : 439.25
Sum(w*x) : 4228.61
Sum(w*x*x) : 41413.6
mean=Sum(w*x) / Sum(w) : 9.62688
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.26717
Sum(x) : 16914.4
Sum(x^2) : 165654
WeighteOfCollisions
entries : 1935
Sum(w) : 1935
Sum(w*x) : 483.75
Sum(w*x*x) : 120.938
mean=Sum(w*x) / Sum(w) : 0.25
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 483.75
Sum(x^2) : 120.938
CollisionsWeighted
entries : 1935
Sum(w) : 483.75
Sum(w*x) : 483.75
Sum(w*x*x) : 483.75
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1935
Sum(x^2) : 1935
Volume name = impcell: M2, Replica number = 0
WeighteOfHistorysEntering
entries : 3795
Sum(w) : 3795
Sum(w*x) : 474.375
Sum(w*x*x) : 59.2969
mean=Sum(w*x) / Sum(w) : 0.125
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 474.375
Sum(x^2) : 59.2969
HistorysEnteringWeighted
entries : 3795
Sum(w) : 474.375
Sum(w*x) : 474.375
Sum(w*x*x) : 474.375
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 3795
Sum(x^2) : 3795
EnergyEnteringHistoryWeighted
entries : 3795
Sum(w) : 474.375
Sum(w*x) : 4403.73
Sum(w*x*x) : 42370.2
mean=Sum(w*x) / Sum(w) : 9.28322
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.77192
Sum(x) : 35229.8
Sum(x^2) : 338962
WeighteOfCollisions
entries : 5501
Sum(w) : 5501
Sum(w*x) : 687.625
Sum(w*x*x) : 85.9531
mean=Sum(w*x) / Sum(w) : 0.125
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 687.625
Sum(x^2) : 85.9531
CollisionsWeighted
entries : 5501
Sum(w) : 687.625
Sum(w*x) : 687.625
Sum(w*x*x) : 687.625
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 5501
Sum(x^2) : 5501
Volume name = impcell: D2, Replica number = 0
WeighteOfHistorysEntering
entries : 3236
Sum(w) : 3236
Sum(w*x) : 202.25
Sum(w*x*x) : 12.6406
mean=Sum(w*x) / Sum(w) : 0.0625
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 202.25
Sum(x^2) : 12.6406
HistorysEnteringWeighted
entries : 3236
Sum(w) : 202.25
Sum(w*x) : 202.25
Sum(w*x*x) : 202.25
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 3236
Sum(x^2) : 3236
EnergyEnteringHistoryWeighted
entries : 3236
Sum(w) : 202.25
Sum(w*x) : 1888.83
Sum(w*x*x) : 18235
mean=Sum(w*x) / Sum(w) : 9.3391
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.71522
Sum(x) : 30221.3
Sum(x^2) : 291760
WeighteOfCollisions
entries : 3962
Sum(w) : 3962
Sum(w*x) : 247.625
Sum(w*x*x) : 15.4766
mean=Sum(w*x) / Sum(w) : 0.0625
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 247.625
Sum(x^2) : 15.4766
CollisionsWeighted
entries : 3962
Sum(w) : 247.625
Sum(w*x) : 247.625
Sum(w*x*x) : 247.625
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 3962
Sum(x^2) : 3962
----------------------------------------------
Volume name | AV w/Ent.Hi.| sigma | AV w/Coll | sigma | Coll_Ent.Tr| AV E/Track | sigma |
imp_worldCylinder_phys... | 1 | 0 | -1 | -1 | -1 | 8.78066 | 1.98425 |
impcell: M1.............. | 0.5 | 0 | 0.5 | 0 | 0.974301 | 9.56003 | 1.35215 |
impcell: D1.............. | 0.25 | 0 | 0.25 | 0 | 1.10131 | 9.62688 | 1.26717 |
impcell: M2.............. | 0.125 | 0 | 0.125 | 0 | 1.44954 | 9.28322 | 1.77192 |
impcell: D2.............. | 0.0625 | 0 | 0.0625 | 0 | 1.22435 | 9.3391 | 1.71522 |
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
ProcessName: PScoreProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
PScoreProcess
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
The final Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
LElastic
inelastic
LFission
LCapture
Decay
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
ProcessName: ParallelImportanceProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
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 - G4ImportanceAlgorithm::~G4ImportanceAlgorithm: ipre_over_ipost ! in [0.25, 4] seen
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 !
@@ -1,44 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06DetectorConstruction.hh,v 1.2 2002/04/19 10:54:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B06DetectorConstruction_hh
#define B06DetectorConstruction_hh B06DetectorConstruction_hh
class G4VPhysicalVolume;
#include "G4VUserDetectorConstruction.hh"
class B06DetectorConstruction : public G4VUserDetectorConstruction
{
public:
B06DetectorConstruction();
~B06DetectorConstruction();
G4VPhysicalVolume* Construct();
};
#endif
@@ -1,63 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06PhysicsList.hh,v 1.2 2002/04/19 10:54:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B06PhysicsList_h
#define B06PhysicsList_h 1
#include "globals.hh"
#include "G4VUserPhysicsList.hh"
class B06PhysicsList : public G4VUserPhysicsList
{
public:
B06PhysicsList();
virtual ~B06PhysicsList();
protected:
// Construct particle and physics
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void SetCuts();
protected:
// these methods Construct physics processes and register them
virtual void ConstructGeneral();
virtual void ConstructEM();
virtual void ConstructHad();
virtual void ConstructLeptHad();
void ConstructAllBosons();
void ConstructAllLeptons();
void ConstructAllMesons();
void ConstructAllBaryons();
void ConstructAllIons();
void ConstructAllShortLiveds();
};
#endif
@@ -1,49 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B06PrimaryGeneratorAction_hh
#define B06PrimaryGeneratorAction_hh B06PrimaryGeneratorAction_hh
#include "G4VUserPrimaryGeneratorAction.hh"
class G4ParticleGun;
class G4Event;
class B06PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
B06PrimaryGeneratorAction();
~B06PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4ParticleGun* particleGun;
};
#endif
@@ -1,52 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06ScorePrinter.hh,v 1.4 2002/04/19 10:54:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B06ScorePrinter_hh
#define B06ScorePrinter_hh B06ScorePrinter_hh
#include "g4std/iostream"
#include "g4std/iomanip"
#include "globals.hh"
#include "G4PMapPtkTallys.hh"
class B06ScorePrinter
{
public:
B06ScorePrinter();
~B06ScorePrinter(){}
void PrintHeader(G4std::ostream *out);
void PrintTable(const G4PMapPtkTallys &aMapPtkTallys, G4std::ostream *out);
G4std::string FillString(const G4std::string &name,
char c, G4int n, G4bool back = true);
private:
G4int FieldName;
G4int FieldValue;
};
#endif
@@ -1,57 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06Scorer.hh,v 1.3 2002/04/19 10:54:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef G4Pscorer_hh
#define G4Pscorer_hh G4Pscorer_hh
#include "g4std/iostream"
#include "G4VPScorer.hh"
#include "G4PMapPtkTallys.hh"
class G4Step;
class G4PStep;
class G4VIStore;
class B06Scorer : public G4VPScorer
{
public:
B06Scorer(const G4VIStore &IStore);
~B06Scorer();
void Score(const G4Step &aStep, const G4PStep &aPStep);
const G4PMapPtkTallys &GetMapPtkTallys() const { return fPtkTallys; }
G4bool CorrectWeight() const {return fCorrectWeight;}
void ResetCorrectWeight() {fCorrectWeight = true;}
private:
G4PMapPtkTallys fPtkTallys;
const G4VIStore &fIStore;
G4bool fCorrectWeight;
};
G4std::ostream& operator<<(G4std::ostream &out, const B06Scorer &ps);
#endif
@@ -1,211 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06DetectorConstruction.cc,v 1.4 2002/04/19 10:54:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "g4std/strstream"
#include "globals.hh"
#include "B06DetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "PhysicalConstants.h"
B06DetectorConstruction::B06DetectorConstruction()
{;}
B06DetectorConstruction::~B06DetectorConstruction()
{;}
G4VPhysicalVolume* B06DetectorConstruction::Construct()
{
char line[255];
G4double pos_x;
G4double pos_y;
G4double pos_z;
G4double density, pressure, temperature;
G4double A;
G4int Z;
G4String name, symbol;
G4double z;
G4double fractionmass;
A = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , Z= 1, A);
A = 12.01*g/mole;
G4Element* elC = new G4Element(name="Carbon" ,symbol="C" , Z = 6, A);
A = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , Z= 8, A);
A = 22.99*g/mole;
G4Element* elNa = new G4Element(name="Natrium" ,symbol="Na" , Z=11 , A);
A = 200.59*g/mole;
G4Element* elHg = new G4Element(name="Hg" ,symbol="Hg" , Z=80, A);
A = 26.98*g/mole;
G4Element* elAl = new G4Element(name="Aluminium" ,symbol="Al" , Z=13, A);
A = 28.09*g/mole;
G4Element* elSi = new G4Element(name="Silicon", symbol="Si", Z=14, A);
A = 39.1*g/mole;
G4Element* elK = new G4Element(name="K" ,symbol="K" , Z=19 , A);
A = 69.72*g/mole;
G4Element* elCa = new G4Element(name="Calzium" ,symbol="Ca" , Z=31 , A);
A = 55.85*g/mole;
G4Element* elFe = new G4Element(name="Iron" ,symbol="Fe", Z=26, A);
density = universe_mean_density; //from PhysicalConstants.h
pressure = 3.e-18*pascal;
temperature = 2.73*kelvin;
G4Material *Galactic =
new G4Material(name="Galactic", z=1., A=1.01*g/mole, density,
kStateGas,temperature,pressure);
density = 2.03*g/cm3;
G4Material* Concrete = new G4Material("Concrete", density, 10);
Concrete->AddElement(elH , fractionmass= 0.01);
Concrete->AddElement(elO , fractionmass= 0.529);
Concrete->AddElement(elNa , fractionmass= 0.016);
Concrete->AddElement(elHg , fractionmass= 0.002);
Concrete->AddElement(elAl , fractionmass= 0.034);
Concrete->AddElement(elSi , fractionmass= 0.337);
Concrete->AddElement(elK , fractionmass= 0.013);
Concrete->AddElement(elCa , fractionmass= 0.044);
Concrete->AddElement(elFe , fractionmass= 0.014);
Concrete->AddElement(elC , fractionmass= 0.001);
density = 0.0203*g/cm3;
G4Material* LightConcrete = new G4Material("LightConcrete", density, 10);
LightConcrete->AddElement(elH , fractionmass= 0.01);
LightConcrete->AddElement(elO , fractionmass= 0.529);
LightConcrete->AddElement(elNa , fractionmass= 0.016);
LightConcrete->AddElement(elHg , fractionmass= 0.002);
LightConcrete->AddElement(elAl , fractionmass= 0.034);
LightConcrete->AddElement(elSi , fractionmass= 0.337);
LightConcrete->AddElement(elK , fractionmass= 0.013);
LightConcrete->AddElement(elCa , fractionmass= 0.044);
LightConcrete->AddElement(elFe , fractionmass= 0.014);
LightConcrete->AddElement(elC , fractionmass= 0.001);
G4Material *WorldMaterial = Galactic; // tracks entering this are
// killed immediately
/////////////////////////////
// world cylinder volume
////////////////////////////
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 100*cm;
G4double hightCylinder = 15.001*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*cm;
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical world
G4LogicalVolume *worldCylinder_log =
new G4LogicalVolume(worldCylinder, WorldMaterial, "worldCylinder_log");
G4VisAttributes * WorldVisAtt
= new G4VisAttributes(G4Colour(0.0,0.0,1.0));
WorldVisAtt->SetVisibility(true);
worldCylinder_log->SetVisAttributes(WorldVisAtt);
// physical world
name = "worldCylinder_phys";
G4VPhysicalVolume* worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
///////////////////////////////////////////////
// shield cylinder for (cells 2-4)
////////////////////////////////////////////////
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
G4double hightShield = 5*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*cm;
G4Tubs *aShield = new G4Tubs("aShield",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
// logical shield
G4LogicalVolume *aShield_log =
new G4LogicalVolume(aShield, Concrete, "aShield_log");
G4VisAttributes * shieldVisAtt
= new G4VisAttributes(G4Colour(0.0,1.0,1.0));
shieldVisAtt->SetVisibility(true);
shieldVisAtt->SetForceSolid(false);
aShield_log->SetVisAttributes(shieldVisAtt);
// physical shields
// physical shields for cell 2 to 4
for(G4int i=0; i<3; i++)
{
if (i+2<10) sprintf(line,"cell: 0%d, shield",i+2);
else sprintf(line,"cell: %d, shield",i+2);
G4String name(line);
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = -10*cm+(10*cm)*i;
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log, name, worldCylinder_log, false, 0);
}
return worldCylinder_phys;
}
@@ -1,189 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06ImportanceDetectorConstruction.cc,v 1.4 2002/04/19 10:54:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B06ImportanceDetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
#include "G4IStore.hh"
B06ImportanceDetectorConstruction::B06ImportanceDetectorConstruction()
: fIStore(0)
{
Construct();
}
B06ImportanceDetectorConstruction::~B06ImportanceDetectorConstruction()
{;}
G4VIStore* B06ImportanceDetectorConstruction::GetIStore()
{
if (!fIStore) G4Exception("B06DetectorConstruction::fIStore empty!");
return fIStore;
}
void B06ImportanceDetectorConstruction::Construct()
{
///////////////////////////////////////
// world inportance cylinder volume
//////////////////////////////////////
G4String name;
G4double density = universe_mean_density; //from PhysicalConstants.h
G4double pressure = 3.e-18*pascal;
G4double temperature = 2.73*kelvin;
G4double z,A;
G4Material *Galactic =
new G4Material(name="Galactic", z=1., A=1.01*g/mole, density,
kStateGas,temperature,pressure);
G4Material *WorldMaterial = Galactic;
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 101*cm;
G4double hightCylinder = 16*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*cm;
G4Tubs *imp_worldCylinder = new G4Tubs("imp_worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical imp world
G4LogicalVolume *imp_worldCylinder_log =
new G4LogicalVolume(imp_worldCylinder, WorldMaterial, "imp_worldCylinder_log");
// physical world
name = "imp_worldCylinder_phys";
G4VPhysicalVolume* imp_worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), imp_worldCylinder_log,
name, 0, false, 0);
///////////////////////////////////////////////
// imp M1, D1, M2, D2
////////////////////////////////////////////////
///////////////////// M1 ///////////////////////
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 101*cm;
G4double MhightShield = 7.5002*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*cm;
G4Tubs *tube_M = new G4Tubs("tube_M",
innerRadiusShield,
outerRadiusShield,
MhightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *M1_log =
new G4LogicalVolume(tube_M, Galactic, "M1_log");
name = "impcell: M1";
G4double pos_x = 0*cm;
G4double pos_y = 0*cm;
G4double pos_z = -1*MhightShield;
G4VPhysicalVolume *pM1 =
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
M1_log, name, imp_worldCylinder_log, false, 0);
/////////////////// D1 ///////////////////////////
innerRadiusShield = 0*cm;
outerRadiusShield = 101*cm;
G4double DhightShield = 2*cm;
startAngleShield = 0*deg;
spanningAngleShield = 360*cm;
G4Tubs *tube_D = new G4Tubs("tube_D",
innerRadiusShield,
outerRadiusShield,
DhightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *D1_log =
new G4LogicalVolume(tube_D, Galactic, "D1_log");
name ="impcell: D1";
G4VPhysicalVolume *pD1 =
new G4PVPlacement(0, G4ThreeVector(0, 0, 0),
D1_log, name, M1_log, false, 0);
/////////////////////// M2 //////////////////////////////////
G4LogicalVolume *M2_log =
new G4LogicalVolume(tube_M, Galactic, "M2_log");
name = "impcell: M2";
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = MhightShield;
G4VPhysicalVolume *pM2 =
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
M2_log, name, imp_worldCylinder_log, false, 0);
//////////////////// D2 /////////////////////////////////
G4LogicalVolume *D2_log =
new G4LogicalVolume(tube_D, Galactic, "D2_log");
name ="impcell: D2";
G4VPhysicalVolume *pD2 =
new G4PVPlacement(0, G4ThreeVector(0, 0, 0),
D2_log, name, M2_log, false, 0);
/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
fIStore = new G4IStore(*imp_worldCylinder_phys);
// for the world volume repnum is -1 !
fIStore->AddImportanceRegion(1, *imp_worldCylinder_phys, -1); // repnum -1
fIStore->AddImportanceRegion(2, *pM1);
fIStore->AddImportanceRegion(4, *pD1);
fIStore->AddImportanceRegion(8, *pM2);
fIStore->AddImportanceRegion(16, *pD2);
}
@@ -1,633 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06PhysicsList.cc,v 1.2 2002/04/19 10:54:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "g4std/iomanip"
#include "B06PhysicsList.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4BosonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
B06PhysicsList::B06PhysicsList() : G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
B06PhysicsList::~B06PhysicsList()
{
}
void B06PhysicsList::ConstructParticle()
{
// In this method, static member functions should be called
// for all particles which you want to use.
// This ensures that objects of these particle types will be
// created in the program.
ConstructAllBosons();
ConstructAllLeptons();
ConstructAllMesons();
ConstructAllBaryons();
ConstructAllIons();
ConstructAllShortLiveds();
}
void B06PhysicsList::ConstructAllBosons()
{
// Construct all bosons
G4BosonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B06PhysicsList::ConstructAllLeptons()
{
// Construct all leptons
G4LeptonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B06PhysicsList::ConstructAllMesons()
{
// Construct all mesons
G4MesonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B06PhysicsList::ConstructAllBaryons()
{
// Construct all barions
G4BaryonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B06PhysicsList::ConstructAllIons()
{
// Construct light ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B06PhysicsList::ConstructAllShortLiveds()
{
// Construct resonaces and quarks
G4ShortLivedConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B06PhysicsList::ConstructProcess()
{
AddTransportation();
ConstructEM();
ConstructLeptHad();
ConstructHad();
ConstructGeneral();
}
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
void B06PhysicsList::ConstructEM()
{
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// gamma
// Construct processes for gamma
pmanager->AddDiscreteProcess(new G4GammaConversion());
pmanager->AddDiscreteProcess(new G4ComptonScattering());
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
} else if (particleName == "e-") {
//electron
// Construct processes for electron
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4eIonisation(),-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
} else if (particleName == "e+") {
//positron
// Construct processes for positron
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4eIonisation(),-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
// Construct processes for muon+
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);
} else if( particleName == "GenericIon" ) {
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(),-1,2,2);
} else {
if ((particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")&&
(!particle->IsShortLived()) ) {
// all others charged particles except geantino
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(),-1,2,2);
}
}
}
}
// Hadron Processes
#include "G4HadronElasticProcess.hh"
#include "G4HadronFissionProcess.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4KaonPlusInelasticProcess.hh"
#include "G4KaonZeroSInelasticProcess.hh"
#include "G4KaonZeroLInelasticProcess.hh"
#include "G4KaonMinusInelasticProcess.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4NeutronInelasticProcess.hh"
#include "G4AntiNeutronInelasticProcess.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4DeuteronInelasticProcess.hh"
#include "G4TritonInelasticProcess.hh"
#include "G4AlphaInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"
// Low-energy Models
#include "G4LElastic.hh"
#include "G4LFission.hh"
#include "G4LCapture.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4LEKaonPlusInelastic.hh"
#include "G4LEKaonZeroSInelastic.hh"
#include "G4LEKaonZeroLInelastic.hh"
#include "G4LEKaonMinusInelastic.hh"
#include "G4LEProtonInelastic.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4LENeutronInelastic.hh"
#include "G4LEAntiNeutronInelastic.hh"
#include "G4LELambdaInelastic.hh"
#include "G4LEAntiLambdaInelastic.hh"
#include "G4LESigmaPlusInelastic.hh"
#include "G4LESigmaMinusInelastic.hh"
#include "G4LEAntiSigmaPlusInelastic.hh"
#include "G4LEAntiSigmaMinusInelastic.hh"
#include "G4LEXiZeroInelastic.hh"
#include "G4LEXiMinusInelastic.hh"
#include "G4LEAntiXiZeroInelastic.hh"
#include "G4LEAntiXiMinusInelastic.hh"
#include "G4LEDeuteronInelastic.hh"
#include "G4LETritonInelastic.hh"
#include "G4LEAlphaInelastic.hh"
#include "G4LEOmegaMinusInelastic.hh"
#include "G4LEAntiOmegaMinusInelastic.hh"
// -- generator models
#include "G4TheoFSGenerator.hh"
#include "G4ExcitationHandler.hh"
#include "G4Evaporation.hh"
#include "G4CompetitiveFission.hh"
#include "G4FermiBreakUp.hh"
#include "G4StatMF.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4Fancy3DNucleus.hh"
#include "G4LEProtonInelastic.hh"
#include "G4StringModel.hh"
#include "G4PreCompoundModel.hh"
#include "G4FTFModel.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
//
// ConstructHad()
//
// Makes discrete physics processes for the hadrons, at present limited
// to those particles with GHEISHA interactions (INTRC > 0).
// The processes are: Elastic scattering, Inelastic scattering,
// Fission (for neutron only), and Capture (neutron).
//
// F.W.Jones 06-JUL-1998
//
void B06PhysicsList::ConstructHad()
{
// this will be the model class for high energies
G4TheoFSGenerator * theTheoModel = new G4TheoFSGenerator;
// all models for treatment of thermal nucleus
G4Evaporation * theEvaporation = new G4Evaporation;
G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
G4StatMF * theMF = new G4StatMF;
// Evaporation logic
G4ExcitationHandler * theHandler = new G4ExcitationHandler;
theHandler->SetEvaporation(theEvaporation);
theHandler->SetFermiModel(theFermiBreakUp);
theHandler->SetMultiFragmentation(theMF);
theHandler->SetMaxAandZForFermiBreakUp(12, 6);
theHandler->SetMinEForMultiFrag(3*MeV);
// Pre equilibrium stage
G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);
// a no-cascade generator-precompound interaface
G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface;
theCascade->SetDeExcitation(thePreEquilib);
// here come the high energy parts
// the string model; still not quite according to design - Explicite use of the forseen interfaces
// will be tested and documented in this program by beta-02 at latest.
G4VPartonStringModel * theStringModel;
theStringModel = new G4FTFModel;
theTheoModel->SetTransport(theCascade);
theTheoModel->SetHighEnergyGenerator(theStringModel);
theTheoModel->SetMinEnergy(19*GeV);
theTheoModel->SetMaxEnergy(100*TeV);
G4VLongitudinalStringDecay * theFragmentation = new G4QGSMFragmentation;
G4ExcitedStringDecay * theStringDecay = new G4ExcitedStringDecay(theFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
// done with the generator model (most of the above is also available as default)
G4HadronElasticProcess* theElasticProcess =
new G4HadronElasticProcess;
G4LElastic* theElasticModel = new G4LElastic;
theElasticProcess->RegisterMe(theElasticModel);
G4HadronElasticProcess* theElasticProcess1 =
new G4HadronElasticProcess;
theParticleIterator->reset();
while ((*theParticleIterator)()) {
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "pi+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4PionPlusInelasticProcess* theInelasticProcess =
new G4PionPlusInelasticProcess("inelastic");
G4LEPionPlusInelastic* theInelasticModel =
new G4LEPionPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "pi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4PionMinusInelasticProcess* theInelasticProcess =
new G4PionMinusInelasticProcess("inelastic");
G4LEPionMinusInelastic* theInelasticModel =
new G4LEPionMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonPlusInelasticProcess* theInelasticProcess =
new G4KaonPlusInelasticProcess("inelastic");
G4LEKaonPlusInelastic* theInelasticModel = new G4LEKaonPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon0S") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonZeroSInelasticProcess* theInelasticProcess =
new G4KaonZeroSInelasticProcess("inelastic");
G4LEKaonZeroSInelastic* theInelasticModel =
new G4LEKaonZeroSInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon0L") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonZeroLInelasticProcess* theInelasticProcess =
new G4KaonZeroLInelasticProcess("inelastic");
G4LEKaonZeroLInelastic* theInelasticModel =
new G4LEKaonZeroLInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonMinusInelasticProcess* theInelasticProcess =
new G4KaonMinusInelasticProcess("inelastic");
G4LEKaonMinusInelastic* theInelasticModel =
new G4LEKaonMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "proton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4ProtonInelasticProcess* theInelasticProcess =
new G4ProtonInelasticProcess("inelastic");
G4LEProtonInelastic* theInelasticModel = new G4LEProtonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_proton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiProtonInelasticProcess* theInelasticProcess =
new G4AntiProtonInelasticProcess("inelastic");
G4LEAntiProtonInelastic* theInelasticModel =
new G4LEAntiProtonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "neutron") {
// elastic scattering
G4LElastic* theElasticModel1 = new G4LElastic;
theElasticProcess1->RegisterMe(theElasticModel1);
pmanager->AddDiscreteProcess(theElasticProcess1);
// inelastic scattering
G4NeutronInelasticProcess* theInelasticProcess =
new G4NeutronInelasticProcess("inelastic");
G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
// fission
G4HadronFissionProcess* theFissionProcess =
new G4HadronFissionProcess;
G4LFission* theFissionModel = new G4LFission;
theFissionProcess->RegisterMe(theFissionModel);
pmanager->AddDiscreteProcess(theFissionProcess);
// capture
G4HadronCaptureProcess* theCaptureProcess =
new G4HadronCaptureProcess;
G4LCapture* theCaptureModel = new G4LCapture;
theCaptureProcess->RegisterMe(theCaptureModel);
pmanager->AddDiscreteProcess(theCaptureProcess);
}
else if (particleName == "anti_neutron") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiNeutronInelasticProcess* theInelasticProcess =
new G4AntiNeutronInelasticProcess("inelastic");
G4LEAntiNeutronInelastic* theInelasticModel =
new G4LEAntiNeutronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "lambda") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4LambdaInelasticProcess* theInelasticProcess =
new G4LambdaInelasticProcess("inelastic");
G4LELambdaInelastic* theInelasticModel = new G4LELambdaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_lambda") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiLambdaInelasticProcess* theInelasticProcess =
new G4AntiLambdaInelasticProcess("inelastic");
G4LEAntiLambdaInelastic* theInelasticModel =
new G4LEAntiLambdaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "sigma+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4SigmaPlusInelasticProcess* theInelasticProcess =
new G4SigmaPlusInelasticProcess("inelastic");
G4LESigmaPlusInelastic* theInelasticModel =
new G4LESigmaPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "sigma-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4SigmaMinusInelasticProcess* theInelasticProcess =
new G4SigmaMinusInelasticProcess("inelastic");
G4LESigmaMinusInelastic* theInelasticModel =
new G4LESigmaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_sigma+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiSigmaPlusInelasticProcess* theInelasticProcess =
new G4AntiSigmaPlusInelasticProcess("inelastic");
G4LEAntiSigmaPlusInelastic* theInelasticModel =
new G4LEAntiSigmaPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_sigma-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiSigmaMinusInelasticProcess* theInelasticProcess =
new G4AntiSigmaMinusInelasticProcess("inelastic");
G4LEAntiSigmaMinusInelastic* theInelasticModel =
new G4LEAntiSigmaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "xi0") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4XiZeroInelasticProcess* theInelasticProcess =
new G4XiZeroInelasticProcess("inelastic");
G4LEXiZeroInelastic* theInelasticModel =
new G4LEXiZeroInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "xi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4XiMinusInelasticProcess* theInelasticProcess =
new G4XiMinusInelasticProcess("inelastic");
G4LEXiMinusInelastic* theInelasticModel =
new G4LEXiMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_xi0") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiXiZeroInelasticProcess* theInelasticProcess =
new G4AntiXiZeroInelasticProcess("inelastic");
G4LEAntiXiZeroInelastic* theInelasticModel =
new G4LEAntiXiZeroInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_xi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiXiMinusInelasticProcess* theInelasticProcess =
new G4AntiXiMinusInelasticProcess("inelastic");
G4LEAntiXiMinusInelastic* theInelasticModel =
new G4LEAntiXiMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "deuteron") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4DeuteronInelasticProcess* theInelasticProcess =
new G4DeuteronInelasticProcess("inelastic");
G4LEDeuteronInelastic* theInelasticModel =
new G4LEDeuteronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "triton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4TritonInelasticProcess* theInelasticProcess =
new G4TritonInelasticProcess("inelastic");
G4LETritonInelastic* theInelasticModel =
new G4LETritonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "alpha") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AlphaInelasticProcess* theInelasticProcess =
new G4AlphaInelasticProcess("inelastic");
G4LEAlphaInelastic* theInelasticModel =
new G4LEAlphaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "omega-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4OmegaMinusInelasticProcess* theInelasticProcess =
new G4OmegaMinusInelasticProcess("inelastic");
G4LEOmegaMinusInelastic* theInelasticModel =
new G4LEOmegaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_omega-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiOmegaMinusInelasticProcess* theInelasticProcess =
new G4AntiOmegaMinusInelasticProcess("inelastic");
G4LEAntiOmegaMinusInelastic* theInelasticModel =
new G4LEAntiOmegaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
}
}
void B06PhysicsList::ConstructLeptHad()
{;}
#include "G4Decay.hh"
void B06PhysicsList::ConstructGeneral()
{
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (theDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(theDecayProcess);
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
void B06PhysicsList::SetCuts()
{
if (verboseLevel >0)
{
G4cout << "B06PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// "G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
@@ -1,55 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:44 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B06PrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4Neutron.hh"
#include "G4ThreeVector.hh"
B06PrimaryGeneratorAction::B06PrimaryGeneratorAction()
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
particleGun->SetParticleDefinition(G4Neutron::NeutronDefinition());
particleGun->SetParticleEnergy(10.0*MeV);
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -15.0005*cm));
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
}
B06PrimaryGeneratorAction::~B06PrimaryGeneratorAction()
{
delete particleGun;
}
void B06PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}
@@ -1,140 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06ScorePrinter.cc,v 1.5 2002/04/19 10:54:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "B06ScorePrinter.hh"
#include "G4VPhysicalVolume.hh"
#include "G4Sigma.hh"
B06ScorePrinter::B06ScorePrinter()
{
FieldName = 25;
FieldValue = 12;
}
void B06ScorePrinter::PrintHeader(G4std::ostream *out)
{
// head line
G4std::string vname = FillString("Volume name", ' ', FieldName+1);
*out << vname << '|';
vname = FillString("AV w/Ent.Hi.", ' ', FieldValue+1, false);
*out << vname << '|';
vname = FillString(" sigma ", ' ', FieldValue+1, false);
*out << vname << '|';
vname = FillString(" AV w/Coll ", ' ', FieldValue+1, false);
*out << vname << '|';
vname = FillString(" sigma ", ' ', FieldValue+1, false);
*out << vname << '|';
vname = FillString("Coll_Ent.Tr", ' ', FieldValue+1, false);
*out << vname << '|';
vname = FillString(" AV E/Track ", ' ', FieldValue+1, false);
*out << vname << '|';
vname = FillString(" sigma", ' ', FieldValue+1);
*out << vname << '|';
*out << G4endl;
}
void B06ScorePrinter::PrintTable(const G4PMapPtkTallys &aMapPtkTallys,
G4std::ostream *out)
{
for (G4PMapPtkTallys::const_iterator mit = aMapPtkTallys.begin();
mit != aMapPtkTallys.end(); mit++) {
G4PTouchableKey ptk = (*mit).first; // get a key identifying a volume
G4PMapNameTally mtallies = (*mit).second; // get tallies of the volume
G4String name(ptk.fVPhysiclaVolume->GetName()); // print volume name
G4double avW_EntHist = -1;
G4double avW_EntHist_sigma = -1;
G4double avW_Coll = -1;
G4double avW_Coll_sigma = -1;
G4double sumTrWeight = -1;
G4double sumCollWeight = -1;
G4double Coll_Ent_Tr = -1;
G4double meanTrackEnergy = -1, sigmaTrackEnergy = -1;
for (G4PMapNameTally::iterator mt = mtallies.begin();
mt != mtallies.end(); mt++) {
G4String tmp((*mt).first);
if (tmp == "WeighteOfHistorysEntering") {
avW_EntHist = (*mt).second.GetMean();
avW_EntHist_sigma = (*mt).second.GetSigma();
}
if (tmp == "WeighteOfCollisions") {
avW_Coll = (*mt).second.GetMean();
avW_Coll_sigma = (*mt).second.GetSigma();
}
if (tmp == "HistorysEnteringWeighted") {
sumTrWeight = (*mt).second.GetSumOfWeights();
}
if (tmp == "CollisionsWeighted") {
sumCollWeight = (*mt).second.GetSumOfWeights();
}
if (tmp == "EnergyEnteringHistoryWeighted") {
meanTrackEnergy = (*mt).second.GetMean();
sigmaTrackEnergy = (*mt).second.GetSigma();
}
}
if (sumTrWeight!=0.&&sumCollWeight!=-1) {
Coll_Ent_Tr = sumCollWeight / sumTrWeight;
}
// print values
G4std::string fname = FillString(name, '.', FieldName);
*out << fname << " |";
*out << G4std::setw(FieldValue) << avW_EntHist << " |";
*out << G4std::setw(FieldValue) << avW_EntHist_sigma << " |";
*out << G4std::setw(FieldValue) << avW_Coll << " |";
*out << G4std::setw(FieldValue) << avW_Coll_sigma << " |";
*out << G4std::setw(FieldValue) << Coll_Ent_Tr << " |";
*out << G4std::setw(FieldValue) << meanTrackEnergy << " |";
*out << G4std::setw(FieldValue) << sigmaTrackEnergy << " |";
*out << G4endl;
}
}
G4std::string B06ScorePrinter::FillString(const G4std::string &name,
char c, G4int n, G4bool back)
{
G4std::string fname;
G4int k = n - name.size();
if (k > 0) {
if (back) {
fname = name;
fname += G4std::string(k,c);
}
else {
fname = G4std::string(k,c);
fname += name;
}
}
else {
fname = name;
}
return fname;
}
@@ -1,110 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B06Scorer.cc,v 1.3 2002/04/19 10:54:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "B06Scorer.hh"
#include "G4Step.hh"
#include "G4PStep.hh"
#include "G4Sigma.hh"
#include "G4StateManager.hh"
#include "G4PStepStream.hh"
#include "G4VIStore.hh"
B06Scorer::B06Scorer(const G4VIStore &IStore)
: fIStore(IStore), fCorrectWeight(true)
{;}
B06Scorer::~B06Scorer()
{;}
void B06Scorer::Score(const G4Step &aStep, const G4PStep &aPstep)
{
G4Track *track = aStep.GetTrack();
if (track->GetTrackStatus()==fStopAndKill)
{
G4cout << " track status is StopAndKill -> do nothing" << G4endl;
}
// do the scoring
else
{
G4double weight = track->GetWeight();
// check if importances are "correct" -------------------------------
G4double import = fIStore.GetImportance(aPstep.fPostTouchableKey);
G4double i_w =import * weight;
if (i_w != 1.) {
G4StepPoint* prepoint = aStep.GetPreStepPoint();
G4StepPoint* postpoint = aStep.GetPostStepPoint();
G4cout << "B06Scorer::Score:" << G4endl;
G4cout << " Stepnumber = " << aStep.GetTrack()->GetCurrentStepNumber()
<< G4endl;
G4cout << " TrackID = " << aStep.GetTrack()->GetTrackID() << G4endl;
G4cout << " ParentID = " << aStep.GetTrack()->GetParentID() << G4endl;
G4cout << " Track wieght = " << weight << G4endl;
G4cout << " Importance = " << import << G4endl;
G4cout << " i_w = " << i_w << G4endl;
G4cout << " aPstep: " << aPstep << G4endl;
G4cout << " steplength = " << aStep.GetStepLength() << G4endl;
G4cout << " pre_pos = " << prepoint->GetPosition()
<< ", pre_dir = " << prepoint->GetMomentumDirection() << G4endl;
G4cout << " post_pos = " << postpoint->GetPosition()
<< ", post_dir = " << postpoint->GetMomentumDirection() << G4endl;
G4cout << " vxt mom: " << track->GetVertexMomentumDirection() << G4endl;
fCorrectWeight = false;
}
// --------------------------------------------------------------------
// the map fPtkTallys, the map nametallys and the "G4Sigma" will
// be setup the first time they are accesed.
G4PTouchableKey post_ptk(aPstep.fPostTouchableKey);
if (aPstep.fCrossBoundary)
{
// Pstep crosses boundary
fPtkTallys[post_ptk]["WeighteOfHistorysEntering"].Xin(weight);
fPtkTallys[post_ptk]["HistorysEnteringWeighted"].Xin(1,weight);
fPtkTallys[post_ptk]["EnergyEnteringHistoryWeighted"].
Xin(track->GetKineticEnergy(), weight);
}
else
{
// Pstep with both points in the same I volume
if (aStep.GetPostStepPoint()->GetStepStatus() != fGeomBoundary)
{
fPtkTallys[post_ptk]["WeighteOfCollisions"].Xin(weight);
fPtkTallys[post_ptk]["CollisionsWeighted"].Xin(1,weight);
}
}
}
}
G4std::ostream& operator<<(G4std::ostream &out, const B06Scorer &ps)
{
out << ps.GetMapPtkTallys();
return out;
}
-18
View File
@@ -1,18 +0,0 @@
# $Id: GNUmakefile,v 1.1 2002/03/27 16:17:44 dressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleB07
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
CPPFLAGS +=
include $(G4INSTALL)/config/binmake.gmk
-101
View File
@@ -1,101 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: exampleB07.cc,v 1.5 2002/05/31 11:46:24 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleB07
//
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#include "g4std/iostream"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "B07DetectorConstruction.hh"
#include "B07PhysicsList.hh"
#include "B07PrimaryGeneratorAction.hh"
#include "B07ImportanceDetectorConstruction.hh"
// Files specific for biasing and scoring
#include "G4ParallelImportanceScoreSampler.hh"
#include "G4PIScorer.hh"
#include "G4Sigma.hh"
int main(int argc, char **argv)
{
G4std::ostream *myout = &G4cout;
G4int numberOfEvent = 10000;
G4String random_status_out_file, random_status_in_file;
G4long myseed = 345354;
HepRandom::setTheSeed(myseed);
G4RunManager *runManager = new G4RunManager;
// create the "tracking" detector -----------------
runManager->SetUserInitialization(new B07DetectorConstruction);
// ---------------------------------------------------
runManager->SetUserInitialization(new B07PhysicsList);
runManager->SetUserAction(new B07PrimaryGeneratorAction);
runManager->Initialize();
// create the detector for the importances and scoring
B07ImportanceDetectorConstruction importancedetector;
importancedetector.Construct();
// the IStore is filled during detector construction
G4VIStore &aIstore = *importancedetector.GetIStore();
// ceate two scorers
G4PIScorer nScorer(aIstore); // scorer for neutrons
G4PIScorer gScorer(aIstore); // scorer for gammas
// create two importance sampler to importance sample neutrons
// and gammas in the importance geometry
G4ParallelImportanceScoreSampler npmgr(aIstore, nScorer, "neutron");
npmgr.Initialize();
G4ParallelImportanceScoreSampler gpmgr(aIstore, gScorer, "gamma");
gpmgr.Initialize();
runManager->BeamOn(numberOfEvent);
// print all the numbers calculated from the scorer
*myout << "output nScorer, importance geometry, neutron" << G4endl;
*myout << nScorer << G4endl;
*myout << "----------------------------------------------" << G4endl;
// print all the numbers calculated from the scorer
*myout << "output gScorer, importance geometry, gamma" << G4endl;
*myout << gScorer << G4endl;
*myout << "----------------------------------------------" << G4endl;
return 0;
}
@@ -1,721 +0,0 @@
**********************************************
Geant4 version $Name: geant4-04-01 $
(28-Feb-2002)
Copyright : Geant4 Collaboration
**********************************************
phot: Total cross sections from Sandia parametrisation.
B07PhysicsList::SetCuts:CutLength : 1 (mm)
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.
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
ProcessName: PScoreProcess
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
PScoreProcess
Transportation
DoIt Vector:
Transportation
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
================================================
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
ProcessName: ParallelImportanceProcess
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
PScoreProcess
Transportation
DoIt Vector:
Transportation
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
The final Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
PScoreProcess
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
================================================
+++ G4ProcessPlacer::G4ProcessPlacer: for: gamma
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
ProcessName: PScoreProcess
The initial Vectors:
GPIL Vector:
phot
compt
conv
Transportation
DoIt Vector:
Transportation
conv
compt
phot
The final Vectors:
GPIL Vector:
phot
compt
conv
PScoreProcess
Transportation
DoIt Vector:
Transportation
PScoreProcess
conv
compt
phot
================================================
+++ G4ProcessPlacer::G4ProcessPlacer: for: gamma
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
ProcessName: ParallelImportanceProcess
The initial Vectors:
GPIL Vector:
phot
compt
conv
PScoreProcess
Transportation
DoIt Vector:
Transportation
PScoreProcess
conv
compt
phot
The final Vectors:
GPIL Vector:
phot
compt
conv
PScoreProcess
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
PScoreProcess
conv
compt
phot
================================================
WARNING - G4ImportanceAlgorithm::Calculate: ipre_over_ipost ! in [0.25, 4]: ipre_over_ipost = 8
WARNING - G4ImportanceAlgorithm::Calculate: ipre_over_ipost ! in [0.25, 4]: ipre_over_ipost = 8
output nScorer, importance geometry, neutron
Volume name = imp_worldCylinder_phys, Replica number = -1
WeighteOfHistorysEntering
entries : 3493
Sum(w) : 3493
Sum(w*x) : 3493
Sum(w*x*x) : 3493
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 3493
Sum(x^2) : 3493
HistorysEnteringWeighted
entries : 3493
Sum(w) : 3493
Sum(w*x) : 3493
Sum(w*x*x) : 3493
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 3493
Sum(x^2) : 3493
EnergyEnteringHistoryWeighted
entries : 3493
Sum(w) : 3493
Sum(w*x) : 29996.1
Sum(w*x*x) : 273437
mean=Sum(w*x) / Sum(w) : 8.58748
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 2.12993
Sum(x) : 29996.1
Sum(x^2) : 273437
Volume name = impcell: M1, Replica number = 0
WeighteOfHistorysEntering
entries : 26823
Sum(w) : 26823
Sum(w*x) : 13411.5
Sum(w*x*x) : 6705.75
mean=Sum(w*x) / Sum(w) : 0.5
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 13411.5
Sum(x^2) : 6705.75
HistorysEnteringWeighted
entries : 26823
Sum(w) : 13411.5
Sum(w*x) : 13411.5
Sum(w*x*x) : 13411.5
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 26823
Sum(x^2) : 26823
EnergyEnteringHistoryWeighted
entries : 26823
Sum(w) : 13411.5
Sum(w*x) : 127619
Sum(w*x*x) : 1.24148e+06
mean=Sum(w*x) / Sum(w) : 9.51567
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.42145
Sum(x) : 255239
Sum(x^2) : 2.48296e+06
WeighteOfCollisions
entries : 26690
Sum(w) : 26690
Sum(w*x) : 13345
Sum(w*x*x) : 6672.5
mean=Sum(w*x) / Sum(w) : 0.5
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 13345
Sum(x^2) : 6672.5
CollisionsWeighted
entries : 26690
Sum(w) : 13345
Sum(w*x) : 13345
Sum(w*x*x) : 13345
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 26690
Sum(x^2) : 26690
Volume name = impcell: D1, Replica number = 0
WeighteOfHistorysEntering
entries : 17927
Sum(w) : 17927
Sum(w*x) : 4481.75
Sum(w*x*x) : 1120.44
mean=Sum(w*x) / Sum(w) : 0.25
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 4481.75
Sum(x^2) : 1120.44
HistorysEnteringWeighted
entries : 17927
Sum(w) : 4481.75
Sum(w*x) : 4481.75
Sum(w*x*x) : 4481.75
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 17927
Sum(x^2) : 17927
EnergyEnteringHistoryWeighted
entries : 17927
Sum(w) : 4481.75
Sum(w*x) : 42897
Sum(w*x*x) : 418808
mean=Sum(w*x) / Sum(w) : 9.57148
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.35431
Sum(x) : 171588
Sum(x^2) : 1.67523e+06
WeighteOfCollisions
entries : 19976
Sum(w) : 19976
Sum(w*x) : 4994
Sum(w*x*x) : 1248.5
mean=Sum(w*x) / Sum(w) : 0.25
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 4994
Sum(x^2) : 1248.5
CollisionsWeighted
entries : 19976
Sum(w) : 4994
Sum(w*x) : 4994
Sum(w*x*x) : 4994
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 19976
Sum(x^2) : 19976
Volume name = impcell: M2, Replica number = 0
WeighteOfHistorysEntering
entries : 38500
Sum(w) : 38500
Sum(w*x) : 4812.5
Sum(w*x*x) : 601.562
mean=Sum(w*x) / Sum(w) : 0.125
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 4812.5
Sum(x^2) : 601.562
HistorysEnteringWeighted
entries : 38500
Sum(w) : 4812.5
Sum(w*x) : 4812.5
Sum(w*x*x) : 4812.5
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 38500
Sum(x^2) : 38500
EnergyEnteringHistoryWeighted
entries : 38500
Sum(w) : 4812.5
Sum(w*x) : 44401.7
Sum(w*x*x) : 425395
mean=Sum(w*x) / Sum(w) : 9.22632
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.80795
Sum(x) : 355213
Sum(x^2) : 3.40316e+06
WeighteOfCollisions
entries : 56461
Sum(w) : 56461
Sum(w*x) : 7057.62
Sum(w*x*x) : 882.203
mean=Sum(w*x) / Sum(w) : 0.125
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 7057.62
Sum(x^2) : 882.203
CollisionsWeighted
entries : 56461
Sum(w) : 7057.62
Sum(w*x) : 7057.62
Sum(w*x*x) : 7057.62
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 56461
Sum(x^2) : 56461
Volume name = impcell: D2, Replica number = 0
WeighteOfHistorysEntering
entries : 32907
Sum(w) : 32907
Sum(w*x) : 2056.69
Sum(w*x*x) : 128.543
mean=Sum(w*x) / Sum(w) : 0.0625
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 2056.69
Sum(x^2) : 128.543
HistorysEnteringWeighted
entries : 32907
Sum(w) : 2056.69
Sum(w*x) : 2056.69
Sum(w*x*x) : 2056.69
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 32907
Sum(x^2) : 32907
EnergyEnteringHistoryWeighted
entries : 32907
Sum(w) : 2056.69
Sum(w*x) : 19139.6
Sum(w*x*x) : 184265
mean=Sum(w*x) / Sum(w) : 9.30602
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.7295
Sum(x) : 306233
Sum(x^2) : 2.94825e+06
WeighteOfCollisions
entries : 41009
Sum(w) : 41009
Sum(w*x) : 2563.06
Sum(w*x*x) : 160.191
mean=Sum(w*x) / Sum(w) : 0.0625
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 2563.06
Sum(x^2) : 160.191
CollisionsWeighted
entries : 41009
Sum(w) : 2563.06
Sum(w*x) : 2563.06
Sum(w*x*x) : 2563.06
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 41009
Sum(x^2) : 41009
----------------------------------------------
output gScorer, importance geometry, gamma
Volume name = imp_worldCylinder_phys, Replica number = -1
WeighteOfHistorysEntering
entries : 497
Sum(w) : 497
Sum(w*x) : 497
Sum(w*x*x) : 497
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 497
Sum(x^2) : 497
HistorysEnteringWeighted
entries : 497
Sum(w) : 497
Sum(w*x) : 497
Sum(w*x*x) : 497
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 497
Sum(x^2) : 497
EnergyEnteringHistoryWeighted
entries : 497
Sum(w) : 497
Sum(w*x) : 1595.98
Sum(w*x*x) : 9801.21
mean=Sum(w*x) / Sum(w) : 3.21124
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 3.06736
Sum(x) : 1595.98
Sum(x^2) : 9801.21
Volume name = impcell: M1, Replica number = 0
WeighteOfHistorysEntering
entries : 1476
Sum(w) : 1476
Sum(w*x) : 738
Sum(w*x*x) : 369
mean=Sum(w*x) / Sum(w) : 0.5
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 738
Sum(x^2) : 369
HistorysEnteringWeighted
entries : 1476
Sum(w) : 738
Sum(w*x) : 738
Sum(w*x*x) : 738
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1476
Sum(x^2) : 1476
EnergyEnteringHistoryWeighted
entries : 1476
Sum(w) : 738
Sum(w*x) : 2039.2
Sum(w*x*x) : 12544.7
mean=Sum(w*x) / Sum(w) : 2.76314
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 3.05995
Sum(x) : 4078.39
Sum(x^2) : 25089.4
WeighteOfCollisions
entries : 3343
Sum(w) : 3343
Sum(w*x) : 1671.5
Sum(w*x*x) : 835.75
mean=Sum(w*x) / Sum(w) : 0.5
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1671.5
Sum(x^2) : 835.75
CollisionsWeighted
entries : 3343
Sum(w) : 1671.5
Sum(w*x) : 1671.5
Sum(w*x*x) : 1671.5
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 3343
Sum(x^2) : 3343
Volume name = impcell: D1, Replica number = 0
WeighteOfHistorysEntering
entries : 908
Sum(w) : 908
Sum(w*x) : 227
Sum(w*x*x) : 56.75
mean=Sum(w*x) / Sum(w) : 0.25
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 227
Sum(x^2) : 56.75
HistorysEnteringWeighted
entries : 908
Sum(w) : 227
Sum(w*x) : 227
Sum(w*x*x) : 227
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 908
Sum(x^2) : 908
EnergyEnteringHistoryWeighted
entries : 908
Sum(w) : 227
Sum(w*x) : 635.043
Sum(w*x*x) : 3915.2
mean=Sum(w*x) / Sum(w) : 2.79755
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 3.06942
Sum(x) : 2540.17
Sum(x^2) : 15660.8
WeighteOfCollisions
entries : 2791
Sum(w) : 2791
Sum(w*x) : 697.75
Sum(w*x*x) : 174.438
mean=Sum(w*x) / Sum(w) : 0.25
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 697.75
Sum(x^2) : 174.438
CollisionsWeighted
entries : 2791
Sum(w) : 697.75
Sum(w*x) : 697.75
Sum(w*x*x) : 697.75
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 2791
Sum(x^2) : 2791
Volume name = impcell: M2, Replica number = 0
WeighteOfHistorysEntering
entries : 3864
Sum(w) : 3864
Sum(w*x) : 483
Sum(w*x*x) : 60.375
mean=Sum(w*x) / Sum(w) : 0.125
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 483
Sum(x^2) : 60.375
HistorysEnteringWeighted
entries : 3864
Sum(w) : 483
Sum(w*x) : 483
Sum(w*x*x) : 483
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 3864
Sum(x^2) : 3864
EnergyEnteringHistoryWeighted
entries : 3864
Sum(w) : 483
Sum(w*x) : 1389
Sum(w*x*x) : 8564.56
mean=Sum(w*x) / Sum(w) : 2.87578
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 3.07602
Sum(x) : 11112
Sum(x^2) : 68516.5
WeighteOfCollisions
entries : 10651
Sum(w) : 10651
Sum(w*x) : 1331.38
Sum(w*x*x) : 166.422
mean=Sum(w*x) / Sum(w) : 0.125
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1331.38
Sum(x^2) : 166.422
CollisionsWeighted
entries : 10651
Sum(w) : 1331.38
Sum(w*x) : 1331.38
Sum(w*x*x) : 1331.38
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 10651
Sum(x^2) : 10651
Volume name = impcell: D2, Replica number = 0
WeighteOfHistorysEntering
entries : 3084
Sum(w) : 3084
Sum(w*x) : 192.75
Sum(w*x*x) : 12.0469
mean=Sum(w*x) / Sum(w) : 0.0625
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 192.75
Sum(x^2) : 12.0469
HistorysEnteringWeighted
entries : 3084
Sum(w) : 192.75
Sum(w*x) : 192.75
Sum(w*x*x) : 192.75
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 3084
Sum(x^2) : 3084
EnergyEnteringHistoryWeighted
entries : 3084
Sum(w) : 192.75
Sum(w*x) : 551.27
Sum(w*x*x) : 3418.47
mean=Sum(w*x) / Sum(w) : 2.86002
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 3.0912
Sum(x) : 8820.31
Sum(x^2) : 54695.5
WeighteOfCollisions
entries : 8250
Sum(w) : 8250
Sum(w*x) : 515.625
Sum(w*x*x) : 32.2266
mean=Sum(w*x) / Sum(w) : 0.0625
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 515.625
Sum(x^2) : 32.2266
CollisionsWeighted
entries : 8250
Sum(w) : 515.625
Sum(w*x) : 515.625
Sum(w*x*x) : 515.625
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 8250
Sum(x^2) : 8250
----------------------------------------------
+++ G4ProcessPlacer::G4ProcessPlacer: for: gamma
ProcessName: PScoreProcess, will be removed!
The initial Vectors:
GPIL Vector:
phot
compt
conv
PScoreProcess
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
PScoreProcess
conv
compt
phot
The final Vectors:
GPIL Vector:
phot
compt
conv
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
conv
compt
phot
+++ G4ProcessPlacer::G4ProcessPlacer: for: gamma
ProcessName: ParallelImportanceProcess, will be removed!
The initial Vectors:
GPIL Vector:
phot
compt
conv
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
conv
compt
phot
The final Vectors:
GPIL Vector:
phot
compt
conv
Transportation
DoIt Vector:
Transportation
conv
compt
phot
WARNING - G4ImportanceAlgorithm::~G4ImportanceAlgorithm: ipre_over_ipost ! in [0.25, 4] seen
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
ProcessName: PScoreProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
PScoreProcess
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
The final Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
LElastic
inelastic
LFission
LCapture
Decay
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
ProcessName: ParallelImportanceProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
ParallelImportanceProcess
Transportation
DoIt Vector:
Transportation
ParallelImportanceProcess
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 - G4ImportanceAlgorithm::~G4ImportanceAlgorithm: ipre_over_ipost ! in [0.25, 4] seen
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 !
@@ -1,44 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B07DetectorConstruction.hh,v 1.2 2002/04/19 10:54:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B07DetectorConstruction_hh
#define B07DetectorConstruction_hh B07DetectorConstruction_hh
class G4VPhysicalVolume;
#include "G4VUserDetectorConstruction.hh"
class B07DetectorConstruction : public G4VUserDetectorConstruction
{
public:
B07DetectorConstruction();
~B07DetectorConstruction();
G4VPhysicalVolume* Construct();
};
#endif
@@ -1,63 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B07PhysicsList.hh,v 1.2 2002/04/19 10:54:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B07PhysicsList_h
#define B07PhysicsList_h 1
#include "globals.hh"
#include "G4VUserPhysicsList.hh"
class B07PhysicsList : public G4VUserPhysicsList
{
public:
B07PhysicsList();
virtual ~B07PhysicsList();
protected:
// Construct particle and physics
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void SetCuts();
protected:
// these methods Construct physics processes and register them
virtual void ConstructGeneral();
virtual void ConstructEM();
virtual void ConstructHad();
virtual void ConstructLeptHad();
void ConstructAllBosons();
void ConstructAllLeptons();
void ConstructAllMesons();
void ConstructAllBaryons();
void ConstructAllIons();
void ConstructAllShortLiveds();
};
#endif
@@ -1,49 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B07PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B07PrimaryGeneratorAction_hh
#define B07PrimaryGeneratorAction_hh B07PrimaryGeneratorAction_hh
#include "G4VUserPrimaryGeneratorAction.hh"
class G4ParticleGun;
class G4Event;
class B07PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
B07PrimaryGeneratorAction();
~B07PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4ParticleGun* particleGun;
};
#endif
@@ -1,210 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B07DetectorConstruction.cc,v 1.4 2002/04/19 10:54:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "g4std/strstream"
#include "globals.hh"
#include "B07DetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "PhysicalConstants.h"
B07DetectorConstruction::B07DetectorConstruction()
{;}
B07DetectorConstruction::~B07DetectorConstruction()
{;}
G4VPhysicalVolume* B07DetectorConstruction::Construct()
{
char line[255];
G4double pos_x;
G4double pos_y;
G4double pos_z;
G4double density, pressure, temperature;
G4double A;
G4int Z;
G4String name, symbol;
G4double z;
G4double fractionmass;
A = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , Z= 1, A);
A = 12.01*g/mole;
G4Element* elC = new G4Element(name="Carbon" ,symbol="C" , Z = 6, A);
A = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , Z= 8, A);
A = 22.99*g/mole;
G4Element* elNa = new G4Element(name="Natrium" ,symbol="Na" , Z=11 , A);
A = 200.59*g/mole;
G4Element* elHg = new G4Element(name="Hg" ,symbol="Hg" , Z=80, A);
A = 26.98*g/mole;
G4Element* elAl = new G4Element(name="Aluminium" ,symbol="Al" , Z=13, A);
A = 28.09*g/mole;
G4Element* elSi = new G4Element(name="Silicon", symbol="Si", Z=14, A);
A = 39.1*g/mole;
G4Element* elK = new G4Element(name="K" ,symbol="K" , Z=19 , A);
A = 69.72*g/mole;
G4Element* elCa = new G4Element(name="Calzium" ,symbol="Ca" , Z=31 , A);
A = 55.85*g/mole;
G4Element* elFe = new G4Element(name="Iron" ,symbol="Fe", Z=26, A);
density = universe_mean_density; //from PhysicalConstants.h
pressure = 3.e-18*pascal;
temperature = 2.73*kelvin;
G4Material *Galactic =
new G4Material(name="Galactic", z=1., A=1.01*g/mole, density,
kStateGas,temperature,pressure);
density = 2.03*g/cm3;
G4Material* Concrete = new G4Material("Concrete", density, 10);
Concrete->AddElement(elH , fractionmass= 0.01);
Concrete->AddElement(elO , fractionmass= 0.529);
Concrete->AddElement(elNa , fractionmass= 0.016);
Concrete->AddElement(elHg , fractionmass= 0.002);
Concrete->AddElement(elAl , fractionmass= 0.034);
Concrete->AddElement(elSi , fractionmass= 0.337);
Concrete->AddElement(elK , fractionmass= 0.013);
Concrete->AddElement(elCa , fractionmass= 0.044);
Concrete->AddElement(elFe , fractionmass= 0.014);
Concrete->AddElement(elC , fractionmass= 0.001);
density = 0.0203*g/cm3;
G4Material* LightConcrete = new G4Material("LightConcrete", density, 10);
LightConcrete->AddElement(elH , fractionmass= 0.01);
LightConcrete->AddElement(elO , fractionmass= 0.529);
LightConcrete->AddElement(elNa , fractionmass= 0.016);
LightConcrete->AddElement(elHg , fractionmass= 0.002);
LightConcrete->AddElement(elAl , fractionmass= 0.034);
LightConcrete->AddElement(elSi , fractionmass= 0.337);
LightConcrete->AddElement(elK , fractionmass= 0.013);
LightConcrete->AddElement(elCa , fractionmass= 0.044);
LightConcrete->AddElement(elFe , fractionmass= 0.014);
LightConcrete->AddElement(elC , fractionmass= 0.001);
G4Material *WorldMaterial = Galactic;
/////////////////////////////
// world cylinder volume
////////////////////////////
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 100*cm;
G4double hightCylinder = 15.001*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*cm;
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical world
G4LogicalVolume *worldCylinder_log =
new G4LogicalVolume(worldCylinder, WorldMaterial, "worldCylinder_log");
G4VisAttributes * WorldVisAtt
= new G4VisAttributes(G4Colour(0.0,0.0,1.0));
WorldVisAtt->SetVisibility(true);
worldCylinder_log->SetVisAttributes(WorldVisAtt);
// physical world
name = "worldCylinder_phys";
G4VPhysicalVolume* worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
///////////////////////////////////////////////
// shield cylinder for (cells 2-4)
////////////////////////////////////////////////
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
G4double hightShield = 5*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*cm;
G4Tubs *aShield = new G4Tubs("aShield",
innerRadiusShield,
outerRadiusShield,
hightShield,
startAngleShield,
spanningAngleShield);
// logical shield
G4LogicalVolume *aShield_log =
new G4LogicalVolume(aShield, Concrete, "aShield_log");
G4VisAttributes * shieldVisAtt
= new G4VisAttributes(G4Colour(0.0,1.0,1.0));
shieldVisAtt->SetVisibility(true);
shieldVisAtt->SetForceSolid(false);
aShield_log->SetVisAttributes(shieldVisAtt);
// physical shields
// physical shields for cell 2 to 4
for(G4int i=0; i<3; i++)
{
if (i+2<10) sprintf(line,"cell: 0%d, shield",i+2);
else sprintf(line,"cell: %d, shield",i+2);
G4String name(line);
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = -10*cm+(10*cm)*i;
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log, name, worldCylinder_log, false, 0);
}
return worldCylinder_phys;
}
@@ -1,189 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B07ImportanceDetectorConstruction.cc,v 1.5 2002/04/19 12:18:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B07ImportanceDetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
#include "G4IStore.hh"
B07ImportanceDetectorConstruction::B07ImportanceDetectorConstruction()
: fIStore(0)
{;}
B07ImportanceDetectorConstruction::~B07ImportanceDetectorConstruction()
{;}
G4VIStore* B07ImportanceDetectorConstruction::GetIStore()
{
if (!fIStore) G4Exception("B07DetectorConstruction::fIStore empty!");
return fIStore;
}
G4VPhysicalVolume* B07ImportanceDetectorConstruction::Construct()
{
//////////////////////////////////////
// world inportance cylinder volume
////////////////////////////////////
G4String name;
G4double density = universe_mean_density; //from PhysicalConstants.h
G4double pressure = 3.e-18*pascal;
G4double temperature = 2.73*kelvin;
G4double z,A;
G4Material *Galactic =
new G4Material(name="Galactic", z=1., A=1.01*g/mole, density,
kStateGas,temperature,pressure);
G4Material *WorldMaterial = Galactic;
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 101*cm;
G4double hightCylinder = 16*cm;
G4double startAngleCylinder = 0*deg;
G4double spanningAngleCylinder = 360*cm;
G4Tubs *imp_worldCylinder = new G4Tubs("imp_worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical imp world
G4LogicalVolume *imp_worldCylinder_log =
new G4LogicalVolume(imp_worldCylinder, WorldMaterial, "imp_worldCylinder_log");
// physical world
name = "imp_worldCylinder_phys";
G4VPhysicalVolume* imp_worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), imp_worldCylinder_log,
name, 0, false, 0);
///////////////////////////////////////////////
// imp M1, D1, M2, D2
////////////////////////////////////////////////
///////////////////// M1 ///////////////////////
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 101*cm;
G4double MhightShield = 7.5002*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*cm;
G4Tubs *tube_M = new G4Tubs("tube_M",
innerRadiusShield,
outerRadiusShield,
MhightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *M1_log =
new G4LogicalVolume(tube_M, Galactic, "M1_log");
name = "impcell: M1";
G4double pos_x = 0*cm;
G4double pos_y = 0*cm;
G4double pos_z = -1*MhightShield;
G4VPhysicalVolume *pM1 =
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
M1_log, name, imp_worldCylinder_log, false, 0);
/////////////////// D1 ///////////////////////////
innerRadiusShield = 0*cm;
outerRadiusShield = 101*cm;
G4double DhightShield = 2*cm;
startAngleShield = 0*deg;
spanningAngleShield = 360*cm;
G4Tubs *tube_D = new G4Tubs("tube_D",
innerRadiusShield,
outerRadiusShield,
DhightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *D1_log =
new G4LogicalVolume(tube_D, Galactic, "D1_log");
name ="impcell: D1";
G4VPhysicalVolume *pD1 =
new G4PVPlacement(0, G4ThreeVector(0, 0, 0),
D1_log, name, M1_log, false, 0);
/////////////////////// M2 //////////////////////////////////
G4LogicalVolume *M2_log =
new G4LogicalVolume(tube_M, Galactic, "M2_log");
name = "impcell: M2";
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = MhightShield;
G4VPhysicalVolume *pM2 =
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
M2_log, name, imp_worldCylinder_log, false, 0);
//////////////////// D2 /////////////////////////////////
G4LogicalVolume *D2_log =
new G4LogicalVolume(tube_D, Galactic, "D2_log");
name ="impcell: D2";
G4VPhysicalVolume *pD2 =
new G4PVPlacement(0, G4ThreeVector(0, 0, 0),
D2_log, name, M2_log, false, 0);
/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
fIStore = new G4IStore(*imp_worldCylinder_phys);
// for the world volume repnum is -1 !
fIStore->AddImportanceRegion(1, *imp_worldCylinder_phys, -1); // repnum -1
fIStore->AddImportanceRegion(2, *pM1);
fIStore->AddImportanceRegion(4, *pD1);
fIStore->AddImportanceRegion(8, *pM2);
fIStore->AddImportanceRegion(16, *pD2);
return imp_worldCylinder_phys;
}
@@ -1,366 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B07PhysicsList.cc,v 1.2 2002/04/19 10:54:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "g4std/iomanip"
#include "B07PhysicsList.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4BosonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
// only processes for neutrons and gammas
B07PhysicsList::B07PhysicsList() : G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
B07PhysicsList::~B07PhysicsList()
{
}
void B07PhysicsList::ConstructParticle()
{
// In this method, static member functions should be called
// for all particles which you want to use.
// This ensures that objects of these particle types will be
// created in the program.
ConstructAllBosons();
ConstructAllLeptons();
ConstructAllMesons();
ConstructAllBaryons();
ConstructAllIons();
ConstructAllShortLiveds();
}
void B07PhysicsList::ConstructAllBosons()
{
// Construct all bosons
G4BosonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B07PhysicsList::ConstructAllLeptons()
{
// Construct all leptons
G4LeptonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B07PhysicsList::ConstructAllMesons()
{
// Construct all mesons
G4MesonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B07PhysicsList::ConstructAllBaryons()
{
// Construct all barions
G4BaryonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B07PhysicsList::ConstructAllIons()
{
// Construct light ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B07PhysicsList::ConstructAllShortLiveds()
{
// Construct resonaces and quarks
G4ShortLivedConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B07PhysicsList::ConstructProcess()
{
AddTransportation();
ConstructEM();
ConstructLeptHad();
ConstructHad();
ConstructGeneral();
}
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
void B07PhysicsList::ConstructEM()
{
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// gamma
// Construct processes for gamma
pmanager->AddDiscreteProcess(new G4GammaConversion());
pmanager->AddDiscreteProcess(new G4ComptonScattering());
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
}
}
}
// Hadron Processes
#include "G4HadronElasticProcess.hh"
#include "G4HadronFissionProcess.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4KaonPlusInelasticProcess.hh"
#include "G4KaonZeroSInelasticProcess.hh"
#include "G4KaonZeroLInelasticProcess.hh"
#include "G4KaonMinusInelasticProcess.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4NeutronInelasticProcess.hh"
#include "G4AntiNeutronInelasticProcess.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4DeuteronInelasticProcess.hh"
#include "G4TritonInelasticProcess.hh"
#include "G4AlphaInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"
// Low-energy Models
#include "G4LElastic.hh"
#include "G4LFission.hh"
#include "G4LCapture.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4LEKaonPlusInelastic.hh"
#include "G4LEKaonZeroSInelastic.hh"
#include "G4LEKaonZeroLInelastic.hh"
#include "G4LEKaonMinusInelastic.hh"
#include "G4LEProtonInelastic.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4LENeutronInelastic.hh"
#include "G4LEAntiNeutronInelastic.hh"
#include "G4LELambdaInelastic.hh"
#include "G4LEAntiLambdaInelastic.hh"
#include "G4LESigmaPlusInelastic.hh"
#include "G4LESigmaMinusInelastic.hh"
#include "G4LEAntiSigmaPlusInelastic.hh"
#include "G4LEAntiSigmaMinusInelastic.hh"
#include "G4LEXiZeroInelastic.hh"
#include "G4LEXiMinusInelastic.hh"
#include "G4LEAntiXiZeroInelastic.hh"
#include "G4LEAntiXiMinusInelastic.hh"
#include "G4LEDeuteronInelastic.hh"
#include "G4LETritonInelastic.hh"
#include "G4LEAlphaInelastic.hh"
#include "G4LEOmegaMinusInelastic.hh"
#include "G4LEAntiOmegaMinusInelastic.hh"
// -- generator models
#include "G4TheoFSGenerator.hh"
#include "G4ExcitationHandler.hh"
#include "G4Evaporation.hh"
#include "G4CompetitiveFission.hh"
#include "G4FermiBreakUp.hh"
#include "G4StatMF.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4Fancy3DNucleus.hh"
#include "G4LEProtonInelastic.hh"
#include "G4StringModel.hh"
#include "G4PreCompoundModel.hh"
#include "G4FTFModel.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
//
// ConstructHad()
//
// Makes discrete physics processes for the hadrons, at present limited
// to those particles with GHEISHA interactions (INTRC > 0).
// The processes are: Elastic scattering, Inelastic scattering,
// Fission (for neutron only), and Capture (neutron).
//
// F.W.Jones 06-JUL-1998
//
void B07PhysicsList::ConstructHad()
{
// this will be the model class for high energies
G4TheoFSGenerator * theTheoModel = new G4TheoFSGenerator;
// all models for treatment of thermal nucleus
G4Evaporation * theEvaporation = new G4Evaporation;
G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
G4StatMF * theMF = new G4StatMF;
// Evaporation logic
G4ExcitationHandler * theHandler = new G4ExcitationHandler;
theHandler->SetEvaporation(theEvaporation);
theHandler->SetFermiModel(theFermiBreakUp);
theHandler->SetMultiFragmentation(theMF);
theHandler->SetMaxAandZForFermiBreakUp(12, 6);
theHandler->SetMinEForMultiFrag(3*MeV);
// Pre equilibrium stage
G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);
// a no-cascade generator-precompound interaface
G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface;
theCascade->SetDeExcitation(thePreEquilib);
// here come the high energy parts
// the string model; still not quite according to design - Explicite use of the forseen interfaces
// will be tested and documented in this program by beta-02 at latest.
G4VPartonStringModel * theStringModel;
theStringModel = new G4FTFModel;
theTheoModel->SetTransport(theCascade);
theTheoModel->SetHighEnergyGenerator(theStringModel);
theTheoModel->SetMinEnergy(19*GeV);
theTheoModel->SetMaxEnergy(100*TeV);
G4VLongitudinalStringDecay * theFragmentation = new G4QGSMFragmentation;
G4ExcitedStringDecay * theStringDecay = new G4ExcitedStringDecay(theFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
// done with the generator model (most of the above is also available as default)
G4HadronElasticProcess* theElasticProcess =
new G4HadronElasticProcess;
G4LElastic* theElasticModel = new G4LElastic;
theElasticProcess->RegisterMe(theElasticModel);
G4HadronElasticProcess* theElasticProcess1 =
new G4HadronElasticProcess;
theParticleIterator->reset();
while ((*theParticleIterator)()) {
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "neutron") {
// elastic scattering
G4LElastic* theElasticModel1 = new G4LElastic;
theElasticProcess1->RegisterMe(theElasticModel1);
pmanager->AddDiscreteProcess(theElasticProcess1);
// inelastic scattering
G4NeutronInelasticProcess* theInelasticProcess =
new G4NeutronInelasticProcess("inelastic");
G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
// fission
G4HadronFissionProcess* theFissionProcess =
new G4HadronFissionProcess;
G4LFission* theFissionModel = new G4LFission;
theFissionProcess->RegisterMe(theFissionModel);
pmanager->AddDiscreteProcess(theFissionProcess);
// capture
G4HadronCaptureProcess* theCaptureProcess =
new G4HadronCaptureProcess;
G4LCapture* theCaptureModel = new G4LCapture;
theCaptureProcess->RegisterMe(theCaptureModel);
pmanager->AddDiscreteProcess(theCaptureProcess);
}
}
}
void B07PhysicsList::ConstructLeptHad()
{;}
#include "G4Decay.hh"
void B07PhysicsList::ConstructGeneral()
{
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "neutron" ||
particleName == "gamma") {
if (theDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(theDecayProcess);
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
}
void B07PhysicsList::SetCuts()
{
if (verboseLevel >0)
{
G4cout << "B07PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// "G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
@@ -1,55 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: B07PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:45 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B07PrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4Neutron.hh"
#include "G4ThreeVector.hh"
B07PrimaryGeneratorAction::B07PrimaryGeneratorAction()
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
particleGun->SetParticleDefinition(G4Neutron::NeutronDefinition());
particleGun->SetParticleEnergy(10.0*MeV);
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -15.0005*cm));
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
}
B07PrimaryGeneratorAction::~B07PrimaryGeneratorAction()
{
delete particleGun;
}
void B07PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}
@@ -1,44 +0,0 @@
Results from running of: 10 events
results for neutron:
Volume name | Histo. Ent.| sum hi.ent*w| Collisions| sum col*w| AV E/ent.Tr| AV E/col| W*SL| W*SL*E| importance | av w/tr rel.| av w/co rel.|
imp_world_phys........... | 4 | 4 | 0 | 0 | 12.3622 | 0 | 0.05 | 15 | 1 | 1 | -1 |
cell_02.................. | 16 | 16 | 40 | 40 | 190.708 | 17.0003 | 2451.31 | 281918 | 1 | 1 | 1 |
cell_03.................. | 18 | 18 | 67 | 67 | 150.002 | 13.8714 | 3677.08 | 269263 | 1 | 1 | 1 |
cell_04.................. | 20 | 20 | 87 | 87 | 119.229 | 17.2854 | 4439.62 | 262688 | 1 | 1 | 1 |
cell_05.................. | 20 | 20 | 44 | 44 | 111.299 | 13.1956 | 2941.87 | 217783 | 1 | 1 | 1 |
cell_06.................. | 17 | 17 | 47 | 47 | 113.032 | 8.87043 | 1874.43 | 177667 | 1 | 1 | 1 |
cell_07.................. | 13 | 13 | 23 | 23 | 118.009 | 15.0347 | 1048.74 | 153647 | 1 | 1 | 1 |
cell_08.................. | 9 | 9 | 28 | 28 | 169.331 | 1.92869 | 1432.29 | 154720 | 1 | 1 | 1 |
cell_09.................. | 8 | 8 | 6 | 6 | 190.295 | 10.7831 | 732.444 | 153260 | 1 | 1 | 1 |
cell_10.................. | 12 | 12 | 26 | 26 | 128.427 | 5.15175 | 1228.19 | 82952.4 | 1 | 1 | 1 |
cell_11.................. | 11 | 5.5 | 46 | 23 | 138.628 | 14.1481 | 1323.87 | 81482.6 | 2 | 1 | 1 |
cell_12.................. | 27 | 7 | 127 | 33 | 92.8543 | 14.6989 | 1529.88 | 77022.9 | 4 | 1.03704 | 1.03937 |
cell_13.................. | 51 | 6.625 | 267 | 35.125 | 84.4156 | 17.4368 | 1492.75 | 68934.3 | 8 | 1.03922 | 1.05243 |
cell_14.................. | 85 | 5.375 | 516 | 32.5625 | 84.9887 | 15.4597 | 1326.34 | 59237 | 16 | 1.01176 | 1.00969 |
cell_15.................. | 128 | 4.03125 | 812 | 25.625 | 91.6857 | 14.4331 | 1013.31 | 49252.2 | 32 | 1.00781 | 1.00985 |
cell_16.................. | 253 | 3.95312 | 1156 | 18.0625 | 73.6931 | 15.2101 | 843.916 | 37723.9 | 64 | 1 | 1 |
cell_17.................. | 379 | 2.96875 | 1722 | 13.4766 | 82.0268 | 13.8631 | 628.943 | 29957.3 | 128 | 1.00264 | 1.00174 |
cell_18.................. | 570 | 2.24219 | 2919 | 11.5391 | 93.7382 | 16.8961 | 537.232 | 26930.3 | 256 | 1.00702 | 1.01199 |
cell_19.................. | 785 | 1.53711 | 4029 | 7.88867 | 110.746 | 19.8474 | 292.73 | 9339.78 | 512 | 1.00255 | 1.00248 |
results for gamma:
Volume name | Histo. Ent.| sum hi.ent*w| Collisions| sum col*w| AV E/ent.Tr| AV E/col| W*SL| W*SL*E|
imp_world_phys........... | 106 | 1.58594 | 0 | 0 | 4.65191 | 0 | 0 | 0 |
cell_02.................. | 1 | 1 | 0 | 0 | 3.06123 | 0 | 111.575 | 341.558 |
cell_03.................. | 3 | 3 | 6 | 6 | 1.9191 | 0.748427 | 514.375 | 5731.57 |
cell_04.................. | 9 | 9 | 75 | 75 | 7.80747 | 1.27068 | 2434.24 | 9124.82 |
cell_05.................. | 16 | 16 | 76 | 76 | 0.992956 | 0.30196 | 2421.8 | 2185.15 |
cell_06.................. | 4 | 4 | 6 | 6 | 1.28345 | 0.965956 | 362.432 | 486.864 |
cell_07.................. | 2 | 2 | 3 | 3 | 1.89343 | 1.30189 | 208.284 | 375.124 |
cell_08.................. | 4 | 1.03125 | 20 | 9.09375 | 1.45554 | 0.444268 | 289.426 | 175.301 |
cell_09.................. | 10 | 0.382812 | 37 | 1.39844 | 0.609176 | 0.264666 | 32.7521 | 17.5702 |
cell_10.................. | 16 | 1.14844 | 59 | 2.81641 | 0.853161 | 0.524829 | 93.2248 | 84.8939 |
cell_11.................. | 29 | 1.78516 | 114 | 3.63672 | 1.44827 | 0.706989 | 157.761 | 312.212 |
cell_12.................. | 44 | 2.01758 | 285 | 26.9062 | 1.35327 | 1.20924 | 747.747 | 1514.72 |
cell_13.................. | 81 | 3.83594 | 333 | 20.6738 | 3.01119 | 1.09956 | 754.293 | 2025.2 |
cell_14.................. | 105 | 3.3418 | 535 | 16.7441 | 2.54605 | 0.83723 | 627.046 | 4526.08 |
cell_15.................. | 156 | 3.5918 | 903 | 25.7695 | 9.68063 | 1.89446 | 957.292 | 7102.38 |
cell_16.................. | 187 | 4.0957 | 1214 | 29.6875 | 5.23164 | 1.03656 | 954.087 | 3258.49 |
cell_17.................. | 186 | 3.06641 | 977 | 15.1934 | 4.26103 | 1.01616 | 533.467 | 1734.87 |
cell_18.................. | 189 | 2.12109 | 1287 | 9.67383 | 2.11956 | 0.685012 | 387.615 | 1331.31 |
cell_19.................. | 118 | 1.04883 | 1039 | 6.02148 | 5.22935 | 0.998982 | 222.012 | 913.654 |

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