Import Geant4 4.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:39:52 +02:00
parent 921d3b1cda
commit 330b82b769
4524 changed files with 178689 additions and 43575 deletions
+18
View File
@@ -0,0 +1,18 @@
# $Id: GNUmakefile,v 1.1 2002/03/26 16:46:08 dressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleB01
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
CPPFLAGS +=
include $(G4INSTALL)/config/binmake.gmk
+167
View File
@@ -0,0 +1,167 @@
//
// ********************************************************************
// * 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: exampleB01.cc,v 1.10 2002/05/31 11:46:23 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleB01
//
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#include "g4std/set"
#include "g4std/iomanip"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "B01DetectorConstruction.hh"
#include "B01PhysicsList.hh"
#include "B01PrimaryGeneratorAction.hh"
// Files specific for scoring
#include "B01Scorer.hh"
#include "G4Sigma.hh"
#include "G4MassScoreSampler.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;
G4String random_status_out_file, random_status_in_file;
G4long myseed = 345354;
HepRandom::setTheSeed(myseed);
G4RunManager *runManager = new G4RunManager;
// create the detector ---------------------------
runManager->SetUserInitialization(new B01DetectorConstruction);
// ---------------------------------------------------
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()
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;
}
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;
}
@@ -0,0 +1,247 @@
**********************************************
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 !
@@ -0,0 +1,47 @@
//
// ********************************************************************
// * 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: B01DetectorConstruction.hh,v 1.2 2002/04/19 10:54:24 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B01DetectorConstruction_hh
#define B01DetectorConstruction_hh B01DetectorConstruction_hh
class G4VPhysicalVolume;
#include "G4VUserDetectorConstruction.hh"
class B01DetectorConstruction : public G4VUserDetectorConstruction
{
public:
B01DetectorConstruction();
~B01DetectorConstruction();
G4VPhysicalVolume* Construct();
G4VPhysicalVolume* GetWorldVolume(){return fWorldVolume;}
private:
G4VPhysicalVolume* fWorldVolume;
};
#endif
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * 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: 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
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
// taken from Tst12PhysicsList
class B01PhysicsList: public G4VUserPhysicsList
{
public:
B01PhysicsList();
virtual ~B01PhysicsList();
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
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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: 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
#include "G4VUserPrimaryGeneratorAction.hh"
class G4ParticleGun;
class G4Event;
class B01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
B01PrimaryGeneratorAction();
~B01PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4ParticleGun* particleGun;
};
#endif
@@ -0,0 +1,53 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,217 @@
//
// ********************************************************************
// * 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: B01DetectorConstruction.cc,v 1.4 2002/04/19 10:54:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "B01DetectorConstruction.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 "g4std/strstream"
#include "PhysicalConstants.h"
#include "globals.hh"
B01DetectorConstruction::B01DetectorConstruction()
: fWorldVolume(0)
{;}
B01DetectorConstruction::~B01DetectorConstruction()
{;}
G4VPhysicalVolume* B01DetectorConstruction::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*deg;
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*deg;
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);
}
fWorldVolume = worldCylinder_phys;
return worldCylinder_phys;
}
@@ -0,0 +1,632 @@
//
// ********************************************************************
// * 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: B01PhysicsList.cc,v 1.2 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "g4std/iomanip"
#include "B01PhysicsList.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"
B01PhysicsList::B01PhysicsList() : G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
B01PhysicsList::~B01PhysicsList()
{
}
void B01PhysicsList::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 B01PhysicsList::ConstructAllBosons()
{
// Construct all bosons
G4BosonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B01PhysicsList::ConstructAllLeptons()
{
// Construct all leptons
G4LeptonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B01PhysicsList::ConstructAllMesons()
{
// Construct all mesons
G4MesonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B01PhysicsList::ConstructAllBaryons()
{
// Construct all barions
G4BaryonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B01PhysicsList::ConstructAllIons()
{
// Construct light ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B01PhysicsList::ConstructAllShortLiveds()
{
// Construct resonaces and quarks
G4ShortLivedConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B01PhysicsList::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 B01PhysicsList::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 B01PhysicsList::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 B01PhysicsList::ConstructLeptHad()
{;}
#include "G4Decay.hh"
void B01PhysicsList::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 B01PhysicsList::SetCuts()
{
if (verboseLevel >0)
{
G4cout << "B01PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// "G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: B01PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:42 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B01PrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4Neutron.hh"
#include "G4ThreeVector.hh"
B01PrimaryGeneratorAction::B01PrimaryGeneratorAction()
{
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));
}
B01PrimaryGeneratorAction::~B01PrimaryGeneratorAction()
{
delete particleGun;
}
void B01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}
@@ -0,0 +1,65 @@
//
// ********************************************************************
// * 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.cc,v 1.3 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "B01Scorer.hh"
#include "G4Step.hh"
#include "G4PStep.hh"
#include "G4Sigma.hh"
#include "G4StateManager.hh"
B01Scorer::B01Scorer(){}
B01Scorer::~B01Scorer(){}
void B01Scorer::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 {
fPtkTallys[post_ptk]["Collisions"].Xin(1);
}
}
}
G4std::ostream& operator<<(G4std::ostream &out, const B01Scorer &ps) {
out << ps.GetMapPtkTallys();
return out;
}
+18
View File
@@ -0,0 +1,18 @@
# $Id: GNUmakefile,v 1.1 2002/03/26 16:46:08 dressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleB02
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
CPPFLAGS +=
include $(G4INSTALL)/config/binmake.gmk
+170
View File
@@ -0,0 +1,170 @@
//
// ********************************************************************
// * 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: exampleB02.cc,v 1.9 2002/05/31 11:46:23 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleB02
//
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#include "g4std/set"
#include "g4std/iomanip"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "B02DetectorConstruction.hh"
#include "B02PhysicsList.hh"
#include "B02PrimaryGeneratorAction.hh"
#include "B02ScoringDetectorConstruction.hh"
// 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;
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);
// ---------------------------------------------------
runManager->SetUserInitialization(new B02PhysicsList);
runManager->SetUserAction(new B02PrimaryGeneratorAction);
runManager->Initialize();
// create the detector for scoring
B02ScoringDetectorConstruction scoringdetector;
// create scorer and sampler to score neutrons in the "scoring" detector
B02Scorer pScorer;
G4ParallelScoreSampler pmgr(*(scoringdetector.Construct()),
"neutron", pScorer);
pmgr.Initialize();
runManager->BeamOn(numberOfEvent);
// ======= after running ============================
// print all the numbers calculated from the scorer
*myout << "output pScorer, scoring detector, neutron" << G4endl;
*myout << pScorer << 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 = 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;
}
@@ -0,0 +1,319 @@
**********************************************
Geant4 version $Name: geant4-04-01 $
(28-Feb-2002)
Copyright : Geant4 Collaboration
**********************************************
phot: Total cross sections from Sandia parametrisation.
B02PhysicsList::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::AddProcessAsSecondDoIt ===
ProcessName: ParallelTransport
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
ParallelTransport
Transportation
DoIt Vector:
Transportation
ParallelTransport
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
================================================
output pScorer, scoring detector, neutron
Volume name = score_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 = scorecell: M1, Replica number = 0
HistorysEntering
entries : 1794
Sum(w) : 1794
Sum(w*x) : 1794
Sum(w*x*x) : 1794
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1794
Sum(x^2) : 1794
EnergyEnteringHistory
entries : 1794
Sum(w) : 1794
Sum(w*x) : 17426.6
Sum(w*x*x) : 171284
mean=Sum(w*x) / Sum(w) : 9.71383
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.05729
Sum(x) : 17426.6
Sum(x^2) : 171284
Collisions
entries : 1263
Sum(w) : 1263
Sum(w*x) : 1263
Sum(w*x*x) : 1263
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 1263
Sum(x^2) : 1263
Volume name = scorecell: D1, Replica number = 0
HistorysEntering
entries : 858
Sum(w) : 858
Sum(w*x) : 858
Sum(w*x*x) : 858
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 858
Sum(x^2) : 858
EnergyEnteringHistory
entries : 858
Sum(w) : 858
Sum(w*x) : 8292.88
Sum(w*x*x) : 81250.1
mean=Sum(w*x) / Sum(w) : 9.66536
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.13047
Sum(x) : 8292.88
Sum(x^2) : 81250.1
Collisions
entries : 512
Sum(w) : 512
Sum(w*x) : 512
Sum(w*x*x) : 512
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 512
Sum(x^2) : 512
Volume name = scorecell: M2, Replica number = 0
HistorysEntering
entries : 845
Sum(w) : 845
Sum(w*x) : 845
Sum(w*x*x) : 845
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 845
Sum(x^2) : 845
EnergyEnteringHistory
entries : 845
Sum(w) : 845
Sum(w*x) : 7918.1
Sum(w*x*x) : 76692.5
mean=Sum(w*x) / Sum(w) : 9.37053
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.71858
Sum(x) : 7918.1
Sum(x^2) : 76692.5
Collisions
entries : 696
Sum(w) : 696
Sum(w*x) : 696
Sum(w*x*x) : 696
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 696
Sum(x^2) : 696
Volume name = scorecell: D2, Replica number = 0
HistorysEntering
entries : 392
Sum(w) : 392
Sum(w*x) : 392
Sum(w*x*x) : 392
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 392
Sum(x^2) : 392
EnergyEnteringHistory
entries : 392
Sum(w) : 392
Sum(w*x) : 3630.15
Sum(w*x*x) : 34992.4
mean=Sum(w*x) / Sum(w) : 9.26058
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 1.87297
Sum(x) : 3630.15
Sum(x^2) : 34992.4
Collisions
entries : 233
Sum(w) : 233
Sum(w*x) : 233
Sum(w*x*x) : 233
mean=Sum(w*x) / Sum(w) : 1
sigma=sqrt(Sum(w*x*x)/Sum(w)-mean^2): 0
Sum(x) : 233
Sum(x^2) : 233
----------------------------------------------
Volume name | AV E/Track | sigma | Coll_Ent.Tr|
score_worldCylinder_phys. | 8.66714 | 1.96678 | 0 |
scorecell: M1............ | 9.71383 | 1.05729 | 0.704013 |
scorecell: D1............ | 9.66536 | 1.13047 | 0.596737 |
scorecell: M2............ | 9.37053 | 1.71858 | 0.823669 |
scorecell: D2............ | 9.26058 | 1.87297 | 0.594388 |
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
ProcessName: PScoreProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
PScoreProcess
ParallelTransport
Transportation
DoIt Vector:
Transportation
ParallelTransport
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
The final Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
ParallelTransport
Transportation
DoIt Vector:
Transportation
ParallelTransport
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 !
@@ -0,0 +1,47 @@
//
// ********************************************************************
// * 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: B02DetectorConstruction.hh,v 1.2 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B02DetectorConstruction_hh
#define B02DetectorConstruction_hh B02DetectorConstruction_hh
class G4VPhysicalVolume;
#include "G4VUserDetectorConstruction.hh"
class B02DetectorConstruction : public G4VUserDetectorConstruction
{
public:
B02DetectorConstruction();
~B02DetectorConstruction();
G4VPhysicalVolume* Construct();
G4VPhysicalVolume* GetWorldVolume(){return fWorldVolume;}
private:
G4VPhysicalVolume* fWorldVolume;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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: 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"
class B02PhysicsList : public G4VUserPhysicsList
{
public:
B02PhysicsList();
virtual ~B02PhysicsList();
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
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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: 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
#include "G4VUserPrimaryGeneratorAction.hh"
class G4ParticleGun;
class G4Event;
class B02PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
B02PrimaryGeneratorAction();
~B02PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4ParticleGun* particleGun;
};
#endif
@@ -0,0 +1,53 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,45 @@
//
// ********************************************************************
// * 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: B02ScoringDetectorConstruction.hh,v 1.2 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B02ScoringDetectorConstruction_hh
#define B02ScoringDetectorConstruction_hh B02ScoringDetectorConstruction_hh
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
class B02ScoringDetectorConstruction : public G4VUserDetectorConstruction
{
public:
B02ScoringDetectorConstruction(){}
~B02ScoringDetectorConstruction(){}
G4VPhysicalVolume* Construct();
};
#endif
@@ -0,0 +1,214 @@
//
// ********************************************************************
// * 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: B02DetectorConstruction.cc,v 1.4 2002/04/19 10:54:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "g4std/strstream"
#include "B02DetectorConstruction.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"
B02DetectorConstruction::B02DetectorConstruction()
: fWorldVolume(0)
{;}
B02DetectorConstruction::~B02DetectorConstruction()
{;}
G4VPhysicalVolume* B02DetectorConstruction::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*deg;
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 1-2)
////////////////////////////////////////////////
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 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);
}
fWorldVolume = worldCylinder_phys;
return worldCylinder_phys;
}
@@ -0,0 +1,632 @@
//
// ********************************************************************
// * 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: B02PhysicsList.cc,v 1.2 2002/04/19 10:54:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "g4std/iomanip"
#include "B02PhysicsList.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"
B02PhysicsList::B02PhysicsList() : G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
B02PhysicsList::~B02PhysicsList()
{
}
void B02PhysicsList::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 B02PhysicsList::ConstructAllBosons()
{
// Construct all bosons
G4BosonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B02PhysicsList::ConstructAllLeptons()
{
// Construct all leptons
G4LeptonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B02PhysicsList::ConstructAllMesons()
{
// Construct all mesons
G4MesonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B02PhysicsList::ConstructAllBaryons()
{
// Construct all barions
G4BaryonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B02PhysicsList::ConstructAllIons()
{
// Construct light ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B02PhysicsList::ConstructAllShortLiveds()
{
// Construct resonaces and quarks
G4ShortLivedConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B02PhysicsList::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 B02PhysicsList::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 B02PhysicsList::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 B02PhysicsList::ConstructLeptHad()
{;}
#include "G4Decay.hh"
void B02PhysicsList::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 B02PhysicsList::SetCuts()
{
if (verboseLevel >0){
G4cout << "B02PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// " G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: B02PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:43 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B02PrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4Neutron.hh"
#include "G4ThreeVector.hh"
B02PrimaryGeneratorAction::B02PrimaryGeneratorAction()
{
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));
}
B02PrimaryGeneratorAction::~B02PrimaryGeneratorAction()
{
delete particleGun;
}
void B02PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,170 @@
//
// ********************************************************************
// * 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: B02ScoringDetectorConstruction.cc,v 1.4 2002/04/19 12:01:46 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B02ScoringDetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
{
/////////////////////////////
// world score cylinder volume
////////////////////////////
G4String name;
G4double density = universe_mean_density;
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*deg;
G4Tubs *score_worldCylinder = new G4Tubs("score_worldCylinder",
innerRadiusCylinder,
outerRadiusCylinder,
hightCylinder,
startAngleCylinder,
spanningAngleCylinder);
// logical score world
G4LogicalVolume *score_worldCylinder_log =
new G4LogicalVolume(score_worldCylinder, WorldMaterial, "score_worldCylinder_log");
// physical world
name = "score_worldCylinder_phys";
G4VPhysicalVolume* score_worldCylinder_phys =
new G4PVPlacement(0, G4ThreeVector(0,0,0), score_worldCylinder_log,
name, 0, false, 0);
///////////////////////////////////////////////
// score 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*deg;
G4Tubs *tube_M = new G4Tubs("tube_M",
innerRadiusShield,
outerRadiusShield,
MhightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *M1_log =
new G4LogicalVolume(tube_M, Galactic, "M1_log");
name = "scorecell: 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, score_worldCylinder_log, false, 0);
/////////////////// D1 ///////////////////////////
innerRadiusShield = 0*cm;
outerRadiusShield = 101*cm;
G4double DhightShield = 2*cm;
startAngleShield = 0*deg;
spanningAngleShield = 360*deg;
G4Tubs *tube_D = new G4Tubs("tube_D",
innerRadiusShield,
outerRadiusShield,
DhightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *D1_log =
new G4LogicalVolume(tube_D, Galactic, "D1_log");
name ="scorecell: 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 = "scorecell: 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, score_worldCylinder_log, false, 0);
//////////////////// D2 /////////////////////////////////
G4LogicalVolume *D2_log =
new G4LogicalVolume(tube_D, Galactic, "D2_log");
name ="scorecell: D2";
// G4VPhysicalVolume *pD2 =
new G4PVPlacement(0, G4ThreeVector(0, 0, 0),
D2_log, name, M2_log, false, 0);
/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
return score_worldCylinder_phys;
}
+18
View File
@@ -0,0 +1,18 @@
# $Id: GNUmakefile,v 1.1 2002/03/26 16:46:08 dressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleB03
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
CPPFLAGS +=
include $(G4INSTALL)/config/binmake.gmk
@@ -0,0 +1,82 @@
//
// ********************************************************************
// * 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: exampleB03.cc,v 1.6 2002/05/31 11:46:23 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleB03
//
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#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"
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);
return 0;
}
@@ -0,0 +1,144 @@
**********************************************
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.
B03PhysicsList::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: MassImportanceProcess
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
MassImportanceProcess
Transportation
DoIt Vector:
Transportation
MassImportanceProcess
LElastic
inelastic
LFission
LCapture
Decay
================================================
WARNING - G4ImportanceAlgorithm::Calculate: ipre_over_ipost ! in [0.25, 4]: ipre_over_ipost = 8
+++ 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 !
@@ -0,0 +1,50 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: B03DetectorConstruction.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B03DetectorConstruction_hh
#define B03DetectorConstruction_hh B03DetectorConstruction_hh
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
class G4VIStore;
class B03DetectorConstruction : public G4VUserDetectorConstruction
{
public:
B03DetectorConstruction();
~B03DetectorConstruction();
G4VPhysicalVolume* Construct();
G4VIStore* GetIStore();
private:
G4VIStore *fIStore;
};
#endif
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: B03PhysicsList.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B03PhysicsList_h
#define B03PhysicsList_h 1
#include "globals.hh"
#include "G4VUserPhysicsList.hh"
class B03PhysicsList : public G4VUserPhysicsList
{
public:
B03PhysicsList();
virtual ~B03PhysicsList();
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
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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: B03PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B03PrimaryGeneratorAction_hh
#define B03PrimaryGeneratorAction_hh B03PrimaryGeneratorAction_hh
#include "G4VUserPrimaryGeneratorAction.hh"
class G4ParticleGun;
class G4Event;
class B03PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
B03PrimaryGeneratorAction();
~B03PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4ParticleGun* particleGun;
};
#endif
+4
View File
@@ -0,0 +1,4 @@
/control/verbose 0
/run/verbose 0
/event/verbose 0
/tracking/verbose 0
@@ -0,0 +1,240 @@
//
// ********************************************************************
// * 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: B03DetectorConstruction.cc,v 1.7 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "g4std/strstream"
#include "globals.hh"
#include "B03DetectorConstruction.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"
B03DetectorConstruction::B03DetectorConstruction()
{;}
B03DetectorConstruction::~B03DetectorConstruction()
{;}
G4VIStore* B03DetectorConstruction::GetIStore()
{
if (!fIStore) G4Exception("B03DetectorConstruction::fIStore empty!");
return fIStore;
}
G4VPhysicalVolume* B03DetectorConstruction::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;
}
@@ -0,0 +1,633 @@
//
// ********************************************************************
// * 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: B03PhysicsList.cc,v 1.2 2002/04/19 10:54:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "g4std/iomanip"
#include "B03PhysicsList.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"
B03PhysicsList::B03PhysicsList(): G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
B03PhysicsList::~B03PhysicsList()
{
}
void B03PhysicsList::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 B03PhysicsList::ConstructAllBosons()
{
// Construct all bosons
G4BosonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B03PhysicsList::ConstructAllLeptons()
{
// Construct all leptons
G4LeptonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B03PhysicsList::ConstructAllMesons()
{
// Construct all mesons
G4MesonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B03PhysicsList::ConstructAllBaryons()
{
// Construct all barions
G4BaryonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B03PhysicsList::ConstructAllIons()
{
// Construct light ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B03PhysicsList::ConstructAllShortLiveds()
{
// Construct resonaces and quarks
G4ShortLivedConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B03PhysicsList::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 B03PhysicsList::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 B03PhysicsList::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 B03PhysicsList::ConstructLeptHad()
{;}
#include "G4Decay.hh"
void B03PhysicsList::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 B03PhysicsList::SetCuts()
{
if (verboseLevel >0)
{
G4cout << "B03PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// "G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: B03PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:43 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B03PrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4Neutron.hh"
#include "G4ThreeVector.hh"
B03PrimaryGeneratorAction::B03PrimaryGeneratorAction()
{
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));
}
B03PrimaryGeneratorAction::~B03PrimaryGeneratorAction()
{
delete particleGun;
}
void B03PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}
+18
View File
@@ -0,0 +1,18 @@
# $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
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * 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: exampleB04.cc,v 1.5 2002/05/31 11:46:23 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleB04
//
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "B04DetectorConstruction.hh"
#include "B04PhysicsList.hh"
#include "B04PrimaryGeneratorAction.hh"
#include "B04ImportanceDetectorConstruction.hh"
// Files specific for biasing
#include "G4ParallelImportanceSampler.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 "tracking" detector -----------------
runManager->SetUserInitialization(new B04DetectorConstruction);
// ---------------------------------------------------
runManager->SetUserInitialization(new B04PhysicsList);
runManager->SetUserAction(new B04PrimaryGeneratorAction);
runManager->Initialize();
// create the detector for the importances
B04ImportanceDetectorConstruction importancedetector;
importancedetector.Construct();
// 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;
}
@@ -0,0 +1,140 @@
**********************************************
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 !
@@ -0,0 +1,44 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * 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.hh,v 1.2 2002/04/19 10:54:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B04ImportanceDetectorConstruction_hh
#define B04ImportanceDetectorConstruction_hh B04ImportanceDetectorConstruction_hh
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
class G4VIStore;
class B04ImportanceDetectorConstruction : public G4VUserDetectorConstruction
{
public:
B04ImportanceDetectorConstruction();
~B04ImportanceDetectorConstruction();
G4VPhysicalVolume* Construct();
G4VIStore* GetIStore();
private:
G4VIStore *fIStore;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,213 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,189 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,633 @@
//
// ********************************************************************
// * 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();
}
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $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
@@ -0,0 +1,18 @@
# $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
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,391 @@
**********************************************
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 !
@@ -0,0 +1,50 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $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
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,48 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
#ifndef 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
@@ -0,0 +1,5 @@
/control/verbose 0
/run/verbose 0
/event/verbose 0
/tracking/verbose 0
@@ -0,0 +1,242 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,633 @@
//
// ********************************************************************
// * 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();
}
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: B05PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:44 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B05PrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4Neutron.hh"
#include "G4ThreeVector.hh"
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));
}
B05PrimaryGeneratorAction::~B05PrimaryGeneratorAction()
{
delete particleGun;
}
void B05PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}
+18
View File
@@ -0,0 +1,18 @@
# $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
@@ -0,0 +1,99 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,439 @@
**********************************************
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 !
@@ -0,0 +1,44 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,50 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: B06ImportanceDetectorConstruction.hh,v 1.3 2002/04/19 10:54:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B06ImportanceDetectorConstruction_hh
#define B06ImportanceDetectorConstruction_hh B06ImportanceDetectorConstruction_hh
#include "globals.hh"
class G4VPhysicalVolume;
class G4VIStore;
class B06ImportanceDetectorConstruction
{
public:
B06ImportanceDetectorConstruction();
~B06ImportanceDetectorConstruction();
G4VIStore* GetIStore();
private:
void Construct();
G4VIStore *fIStore;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,52 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,57 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $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
@@ -0,0 +1,211 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,189 @@
//
// ********************************************************************
// * 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);
}
@@ -0,0 +1,633 @@
//
// ********************************************************************
// * 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();
}
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $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);
}
@@ -0,0 +1,140 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,110 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,18 @@
# $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
@@ -0,0 +1,101 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,721 @@
**********************************************
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 !
@@ -0,0 +1,44 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * 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.hh,v 1.4 2002/04/19 12:13:23 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B07ImportanceDetectorConstruction_hh
#define B07ImportanceDetectorConstruction_hh B07ImportanceDetectorConstruction_hh
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
class G4VIStore;
class B07ImportanceDetectorConstruction : public G4VUserDetectorConstruction
{
public:
B07ImportanceDetectorConstruction();
~B07ImportanceDetectorConstruction();
G4VPhysicalVolume* Construct();
G4VIStore* GetIStore();
private:
G4VIStore *fIStore;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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
@@ -0,0 +1,210 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,189 @@
//
// ********************************************************************
// * 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;
}
@@ -0,0 +1,366 @@
//
// ********************************************************************
// * 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();
}
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $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);
}
@@ -0,0 +1,44 @@
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 |
+18
View File
@@ -0,0 +1,18 @@
# $Id: GNUmakefile,v 1.1 2002/06/04 11:14:51 dressel Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleB08
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
CPPFLAGS +=
include $(G4INSTALL)/config/binmake.gmk
+178
View File
@@ -0,0 +1,178 @@
//
// ********************************************************************
// * 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: exampleB08.cc,v 1.1 2002/06/04 11:14:51 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleB08
//
// --------------------------------------------------------------
// Comments
// This example demonstrates how to use the importance sampling
// and weight window samling together with scoring in a parallel
// geometry.
// The example for weight window sampling is somewhat artificial
// since no other weight changing
// process than the importance sampling is used.
// Therefore high particle energys are choosen (for which importance
// sampling would not be neccessary). That way
// secondaries with enough energy to create neutrons are
// produced. Since the secondaries are not importance sampled
// they may create neutrons with a weight not coresponding to
// the importance of a cell. In this case the weight window
// algorithm can be demonstrated: If the upper and lower limit
// is set to 1 it corrects the weight to exactly the inverse
// of the importance.
// The init.mac file is used to set the upper and lower limit and the
// importances (See init.mac).
//
// --------------------------------------------------------------
#include "g4std/iostream"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "B08DetectorConstruction.hh"
#include "B08PhysicsList.hh"
#include "B08ImportanceDetectorConstruction.hh"
#include "B08PrimaryGeneratorAction.hh"
#include "G4VIStore.hh"
#include "G4Sigma.hh"
#include "G4WeightWindowAlgorithm.hh"
#include "G4PImportanceWWindowScoreSampler.hh"
#include "G4ParallelScoreSampler.hh"
#include "B08Scorer.hh"
#include "B08ScorePrinter.hh"
#include "B08MainMessenger.hh"
int main(int argc, char **argv)
{
G4long myseed = 345354;
HepRandom::setTheSeed(myseed);
G4RunManager *runManager = new G4RunManager;
// create the "tracking" detector -----------------
runManager->SetUserInitialization(new B08DetectorConstruction);
// ---------------------------------------------------
runManager->SetUserInitialization(new B08PhysicsList);
runManager->SetUserAction(new B08PrimaryGeneratorAction);
runManager->Initialize();
////////////////////////////////////////////////////////////////
// create a messanger reading an initialication script to specify:
// - the umber of events to be processed
// - name of the outptfile
// - upper limit and
// - lower limit for the weight window sampling
G4int numberOfEvent = 10;
B08MainMessenger mess;
// create the detector for the importances and scoring
// this object also creates a messanger for the importance values
B08ImportanceDetectorConstruction importancedetector;
// read the init.mac file
G4UImanager *UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/control/execute init.mac");
numberOfEvent = mess.GetNumberOfEvents();
G4String resultsfilename = mess.GetResultsFileName();
G4std::ofstream of(resultsfilename);
//////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// setting up importance asmpling and scoring for neutrons and gammas
// the IStore is filled during detector construction
G4VIStore &aIstore = *importancedetector.GetIStore();
// create scorers for neutrons and gammas
B08Scorer nScorer;
B08Scorer gScorer;
// create the weight window algorithm
G4WeightWindowAlgorithm wwalg;
wwalg.SetUpperLimit(mess.GetUpperLimit());
wwalg.SetLowerLimit(mess.GetLowerLimit());
// create the sampler for importance nad weight window sampling
// of neutron
G4PImportanceWWindowScoreSampler nwwsampler(aIstore,
nScorer,
"neutron",
wwalg);
nwwsampler.Initialize();
// create the sampler for scoring gammas
G4ParallelScoreSampler gsamp(*importancedetector.GetWorldVolume(),
"gamma",
gScorer);
gsamp.Initialize();
/////////////////////////////////////////////////////////////////
// running
runManager->BeamOn(numberOfEvent);
/////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
// create ouput
of << "Results from running of: " << numberOfEvent << " events" << G4endl;
of << "results for neutron:" << G4endl;
B08ScorePrinter nsp(&aIstore);
nsp.PrintHeader(&of);
nsp.PrintTable(nScorer.GetMapPtkTallys(), &of);
of << G4endl;
of << "results for gamma:" << G4endl;
B08ScorePrinter sp;
sp.PrintHeader(&of);
sp.PrintTable(gScorer.GetMapPtkTallys(), &of);
return 0;
}
@@ -0,0 +1,391 @@
**********************************************
Geant4 version $Name: geant4-04-01 $
(28-Feb-2002)
Copyright : Geant4 Collaboration
**********************************************
phot: Total cross sections from Sandia parametrisation.
B08PhysicsList::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
================================================
=== G4ProcessPlacer::AddProcessAsSecondDoIt ===
ProcessName: ParallelWeightWindowProcess
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
PScoreProcess
ParallelImportanceProcess
ParallelWeightWindowProcess
Transportation
DoIt Vector:
Transportation
ParallelWeightWindowProcess
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::AddProcessAsSecondDoIt ===
ProcessName: ParallelTransport
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
ParallelTransport
Transportation
DoIt Vector:
Transportation
ParallelTransport
PScoreProcess
conv
compt
phot
================================================
WARNING - G4ImportanceAlgorithm::Calculate: ipre_over_ipost ! in [0.25, 4]: ipre_over_ipost = 512
+++ G4ProcessPlacer::G4ProcessPlacer: for: gamma
ProcessName: PScoreProcess, will be removed!
The initial Vectors:
GPIL Vector:
phot
compt
conv
PScoreProcess
ParallelTransport
Transportation
DoIt Vector:
Transportation
ParallelTransport
PScoreProcess
conv
compt
phot
The final Vectors:
GPIL Vector:
phot
compt
conv
ParallelTransport
Transportation
DoIt Vector:
Transportation
ParallelTransport
conv
compt
phot
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
ProcessName: PScoreProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
PScoreProcess
ParallelImportanceProcess
ParallelWeightWindowProcess
Transportation
DoIt Vector:
Transportation
ParallelWeightWindowProcess
ParallelImportanceProcess
PScoreProcess
LElastic
inelastic
LFission
LCapture
Decay
The final Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
ParallelImportanceProcess
ParallelWeightWindowProcess
Transportation
DoIt Vector:
Transportation
ParallelWeightWindowProcess
ParallelImportanceProcess
LElastic
inelastic
LFission
LCapture
Decay
+++ G4ProcessPlacer::G4ProcessPlacer: for: neutron
ProcessName: ParallelWeightWindowProcess, will be removed!
The initial Vectors:
GPIL Vector:
Decay
LCapture
LFission
inelastic
LElastic
ParallelImportanceProcess
ParallelWeightWindowProcess
Transportation
DoIt Vector:
Transportation
ParallelWeightWindowProcess
ParallelImportanceProcess
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
@@ -0,0 +1,44 @@
//
// ********************************************************************
// * 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: B08DetectorConstruction.hh,v 1.1 2002/06/04 11:14:51 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B08DetectorConstruction_hh
#define B08DetectorConstruction_hh B08DetectorConstruction_hh
class G4VPhysicalVolume;
#include "G4VUserDetectorConstruction.hh"
class B08DetectorConstruction : public G4VUserDetectorConstruction
{
public:
B08DetectorConstruction();
~B08DetectorConstruction();
G4VPhysicalVolume* Construct();
};
#endif
@@ -0,0 +1,53 @@
//
// ********************************************************************
// * 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: B08ImportanceDetectorConstruction.hh,v 1.1 2002/06/04 11:14:51 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B08ImportanceDetectorConstruction_hh
#define B08ImportanceDetectorConstruction_hh B08ImportanceDetectorConstruction_hh
#include "globals.hh"
class G4VPhysicalVolume;
class G4VIStore;
class B08ImportanceDetectorConstruction
{
public:
B08ImportanceDetectorConstruction();
~B08ImportanceDetectorConstruction();
G4VIStore* GetIStore();
G4VPhysicalVolume *GetWorldVolume();
private:
void Construct();
G4VIStore *fnIStore;
G4VPhysicalVolume *fWorldVolume;
};
#endif
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * 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: B08ImportanceMessenger.hh,v 1.1 2002/06/04 11:14:51 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B08ImportanceMessenger_hh
#define B08ImportanceMessenger_hh B08ImportanceMessenger_hh
#include "G4UImessenger.hh"
#include "globals.hh"
#include "g4std/map"
class G4VIStore;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADouble;
class G4UIcommand;
class G4VPhysicalVolume;
class B08BaseExp {
public:
B08BaseExp(G4double b = 1, G4double e = 1) : fBase(b), fExp(e){}
void SetBase(G4double b){fBase = b;}
void SetExponent(G4double e){fExp = e;}
G4double GetImportance() const {return pow(fBase, fExp);}
private:
G4double fBase;
G4double fExp;
};
class B08ImportanceMessenger: public G4UImessenger{
public:
B08ImportanceMessenger(G4VIStore &istore);
~B08ImportanceMessenger(){}
void SetNewValue(G4UIcommand* pCmd,G4String szValue);
void AddCell(const G4String &cellname, G4VPhysicalVolume *p);
void SetImportanceBase(const G4String &cellname, G4double base);
void SetImportanceExponent(const G4String &cellname, G4double exp);
typedef G4std::map<G4UIcmdWithADouble *, G4VPhysicalVolume *> B08BaseMap;
typedef G4std::map<G4UIcmdWithADouble *, G4VPhysicalVolume *> B08ExpMap;
typedef G4std::map<G4VPhysicalVolume *, B08BaseExp> B08BaseExpMap;
typedef G4std::map<G4String, G4VPhysicalVolume *> B08CellVolMap;
private:
G4VIStore &fIStore;
B08BaseMap fBaseMap;
B08ExpMap fExpMap;
B08BaseExpMap fBaseExpMap;
B08CellVolMap fCellVolMap;
};
#endif
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: B08MainMessenger.hh,v 1.1 2002/06/04 11:14:51 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B08MainMessenger_hh
#define B08MainMessenger_hh B08MainMessenger_hh
#include "G4UImessenger.hh"
#include "globals.hh"
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADouble;
class G4UIcommand;
class B08MainMessenger: public G4UImessenger{
public:
B08MainMessenger();
~B08MainMessenger(){}
void SetNewValue(G4UIcommand* pCmd,G4String szValue);
G4String GetResultsFileName() const {return fResultsFileName;}
G4int GetNumberOfEvents() const {return fNumberOfEvents;}
G4double GetUpperLimit() const {return fUpper;}
G4double GetLowerLimit() const {return fLower;}
private:
G4String fResultsFileName;
G4int fNumberOfEvents;
G4double fUpper;
G4double fLower;
G4UIcmdWithAString *fCmdFn;
G4UIcmdWithAnInteger *fCmdEv;
G4UIcmdWithADouble *fCmdUpper;
G4UIcmdWithADouble *fCmdLower;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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: B08PhysicsList.hh,v 1.1 2002/06/04 11:14:51 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B08PhysicsList_h
#define B08PhysicsList_h 1
#include "globals.hh"
#include "G4VUserPhysicsList.hh"
class B08PhysicsList : public G4VUserPhysicsList
{
public:
B08PhysicsList();
virtual ~B08PhysicsList();
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
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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: B08PrimaryGeneratorAction.hh,v 1.1 2002/06/04 11:14:52 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B08PrimaryGeneratorAction_hh
#define B08PrimaryGeneratorAction_hh B08PrimaryGeneratorAction_hh
#include "G4VUserPrimaryGeneratorAction.hh"
class G4ParticleGun;
class G4Event;
class B08PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
B08PrimaryGeneratorAction();
~B08PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
private:
G4ParticleGun* particleGun;
};
#endif
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * 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: B08ScorePrinter.hh,v 1.1 2002/06/04 11:14:52 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#ifndef B08ScorePrinter_hh
#define B08ScorePrinter_hh B08ScorePrinter_hh
#include "g4std/iostream"
#include "g4std/iomanip"
#include "globals.hh"
#include "G4PMapPtkTallys.hh"
class G4VIStore;
class B08ScorePrinter
{
public:
B08ScorePrinter(const G4VIStore *aIStore = 0);
~B08ScorePrinter(){}
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:
const G4VIStore *fIStore;
G4int FieldName;
G4int FieldValue;
};
#endif
@@ -0,0 +1,53 @@
//
// ********************************************************************
// * 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: B08Scorer.hh,v 1.1 2002/06/04 11:14:52 dressel 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 B08Scorer : public G4VPScorer
{
public:
B08Scorer();
~B08Scorer();
void Score(const G4Step &aStep, const G4PStep &aPStep);
const G4PMapPtkTallys &GetMapPtkTallys() const { return fPtkTallys; }
private:
G4PMapPtkTallys fPtkTallys;
};
G4std::ostream& operator<<(G4std::ostream &out, const B08Scorer &ps);
#endif
+69
View File
@@ -0,0 +1,69 @@
# number of events and ouput file
/B08/nevents 10
/B08/resultsfile B08ScoreResults.txt
# set the upper and lower limit for the weight window sampling
# if both are set to 1 the scores "av w/tr rel." and
# "av w/co rel" should be 1.
/B08/upperlimit 5
/B08/lowerlimit 0.2
# paricle energy, only for higher energies a particle may create
# neutrons with weight not according to the importance values.
/gun/energy 300.0 MeV
#
# setting of the importance values = pow(base,exp)
#
/B08/importance/cell_02/base 1
/B08/importance/cell_02/exp 0
#
/B08/importance/cell_03/base 1
/B08/importance/cell_03/exp 1
#
/B08/importance/cell_04/base 1
/B08/importance/cell_04/exp 2
#
/B08/importance/cell_05/base 1
/B08/importance/cell_05/exp 3
#
/B08/importance/cell_06/base 1
/B08/importance/cell_06/exp 4
#
/B08/importance/cell_07/base 1
/B08/importance/cell_07/exp 5
#
/B08/importance/cell_08/base 1
/B08/importance/cell_08/exp 6
#
/B08/importance/cell_09/base 1
/B08/importance/cell_09/exp 7
#
/B08/importance/cell_10/base 1
/B08/importance/cell_10/exp 8
#
/B08/importance/cell_11/base 2
/B08/importance/cell_11/exp 1
#
/B08/importance/cell_12/base 2
/B08/importance/cell_12/exp 2
#
/B08/importance/cell_13/base 2
/B08/importance/cell_13/exp 3
#
/B08/importance/cell_14/base 2
/B08/importance/cell_14/exp 4
#
/B08/importance/cell_15/base 2
/B08/importance/cell_15/exp 5
#
/B08/importance/cell_16/base 2
/B08/importance/cell_16/exp 6
#
/B08/importance/cell_17/base 2
/B08/importance/cell_17/exp 7
#
/B08/importance/cell_18/base 2
/B08/importance/cell_18/exp 8
#
/B08/importance/cell_19/base 2
/B08/importance/cell_19/exp 9
#
@@ -0,0 +1,171 @@
//
// ********************************************************************
// * 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: B08DetectorConstruction.cc,v 1.1 2002/06/04 11:14:52 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "g4std/strstream"
#include "globals.hh"
#include "B08DetectorConstruction.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"
B08DetectorConstruction::B08DetectorConstruction()
{;}
B08DetectorConstruction::~B08DetectorConstruction()
{;}
G4VPhysicalVolume* B08DetectorConstruction::Construct()
{
G4double pos_x;
G4double pos_y;
G4double pos_z;
G4double density, pressure, temperature;
G4double A;
G4String name, symbol;
G4double z;
G4Element *pElementH = new G4Element("Hydro","H",1.,1.0079*g/mole);
G4Element *pElementO = new G4Element("Oxy","O",8.,15.999*g/mole);
G4Element *pElementFe = new G4Element("Ferrum","Fe",26.,55.845*g/mole);
G4Element *pElementNa = new G4Element("Natri","Na",11.,22.98977*g/mole);
G4Element *pElementMg = new G4Element("Magn","Mg",12.,24.305*g/mole);
G4Element *pElementAl = new G4Element("Alu","Al",13.,26.981538*g/mole);
G4Element *pElementSi = new G4Element("Sili","Si",14.,28.0854*g/mole);
G4Element *pElementK = new G4Element("Pota","K",19.,39.0983*g/mole);
G4Element *pElementCa = new G4Element("Calc","Ca",20.,40.078*g/mole);
G4Material *pMaterialConcrete = new G4Material("Concrete",2.31*g/cm3,9);
pMaterialConcrete->AddElement(pElementH,/*0.18957226*/0.010853422);
pMaterialConcrete->AddElement(pElementO, /*0.52999241*/0.48165594);
pMaterialConcrete->AddElement(pElementNa,/*0.01556568*/0.020327181);
pMaterialConcrete->AddElement(pElementMg,/*0.0078461149*/0.010832401);
pMaterialConcrete->AddElement(pElementAl,/*0.039483675*/0.060514396);
pMaterialConcrete->AddElement(pElementSi,/*0.14047077*/0.22409956);
pMaterialConcrete->AddElement(pElementK, /*0.0048089091*/0.010680188);
pMaterialConcrete->AddElement(pElementCa,/*0.054416603*/0.12388306);
pMaterialConcrete->AddElement(pElementFe,/*0.017843584*/0.056603178);
G4Material* Concrete = pMaterialConcrete;
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);
G4Material *WorldMaterial = Galactic; // tracks entering this are
// killed immediately
/////////////////////////////
// world cylinder volume
////////////////////////////
// world solid
G4double innerRadiusCylinder = 0*cm;
G4double outerRadiusCylinder = 100*cm;
G4double hightCylinder = 100*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);
///////////////////////////////////////////////
// the concreate block
////////////////////////////////////////////////
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 100*cm;
G4double hightShield = 90*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
name = "ConcreateBlock";
pos_x = 0*cm;
pos_y = 0*cm;
pos_z = 0*cm;
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
aShield_log, name, worldCylinder_log, false, 0);
return worldCylinder_phys;
}
@@ -0,0 +1,168 @@
//
// ********************************************************************
// * 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: B08ImportanceDetectorConstruction.cc,v 1.1 2002/06/04 11:14:52 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B08ImportanceDetectorConstruction.hh"
#include "G4Material.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
#include "G4IStore.hh"
#include "G4Pstring.hh"
#include "B08ImportanceMessenger.hh"
B08ImportanceDetectorConstruction::B08ImportanceDetectorConstruction()
: fnIStore(0),
fWorldVolume(0)
{
Construct();
}
B08ImportanceDetectorConstruction::~B08ImportanceDetectorConstruction()
{;}
G4VIStore* B08ImportanceDetectorConstruction::GetIStore()
{
if (!fnIStore) G4Exception("B08DetectorConstruction::fnIStore empty!");
return fnIStore;
}
G4VPhysicalVolume *B08ImportanceDetectorConstruction::GetWorldVolume(){
if (!fWorldVolume)
G4Exception("B08DetectorConstruction::fWorldVolume empty!");
return fWorldVolume;
}
void B08ImportanceDetectorConstruction::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 = 110*cm;
G4double hightCylinder = 110*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_world_phys";
fWorldVolume =
new G4PVPlacement(0, G4ThreeVector(0,0,0), imp_worldCylinder_log,
name, 0, false, 0);
// create importance store
fnIStore = new G4IStore(*fWorldVolume);
// for the world volume repnum is -1 !
fnIStore->AddImportanceRegion(1, *fWorldVolume, -1);
// repnum -1
///////////////////////////////////////////////
//
////////////////////////////////////////////////
G4double innerRadiusShield = 0*cm;
G4double outerRadiusShield = 110*cm;
G4double MhightShield = 5*cm;
G4double startAngleShield = 0*deg;
G4double spanningAngleShield = 360*cm;
G4Tubs *tube_M = new G4Tubs("tube",
innerRadiusShield,
outerRadiusShield,
MhightShield,
startAngleShield,
spanningAngleShield);
G4LogicalVolume *M1_log =
new G4LogicalVolume(tube_M, Galactic, "tune_log");
B08ImportanceMessenger *imess = new B08ImportanceMessenger(*fnIStore);
for (G4int cellnum = 2; cellnum < 20; cellnum++) {
name = "cell_";
if (cellnum<10) name += "0";
name+=str(cellnum);
G4double pos_x = 0*cm;
G4double pos_y = 0*cm;
G4double pos_z = -90*cm+MhightShield+
2*(cellnum-2)*MhightShield;
G4VPhysicalVolume *p =
new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
M1_log, name, imp_worldCylinder_log, false, 0);
// set importances
imess->AddCell(name, p);
if (cellnum < 8 ) {
imess->SetImportanceBase(name, 2);
imess->SetImportanceExponent(name, (cellnum-2));
}
else if (cellnum < 13) {
imess->SetImportanceBase(name, 2.15);
imess->SetImportanceExponent(name, (cellnum-2));
}
else {
imess->SetImportanceBase(name, 2.3);
imess->SetImportanceExponent(name, (cellnum-2));
}
}
}
@@ -0,0 +1,118 @@
//
// ********************************************************************
// * 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: B08ImportanceMessenger.cc,v 1.1 2002/06/04 11:14:52 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "B08ImportanceMessenger.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADouble.hh"
#include "G4UIcommand.hh"
#include "B08Scorer.hh"
#include "B08ScorePrinter.hh"
#include "G4VIStore.hh"
#include "G4Pstring.hh"
B08ImportanceMessenger::
B08ImportanceMessenger(G4VIStore &aIStore) :
fIStore(aIStore)
{}
void B08ImportanceMessenger::AddCell(const G4String &cellname,
G4VPhysicalVolume *p){
fCellVolMap[cellname] = p;
G4String command = "/B08/importance/" + cellname + "/base";
G4UIcmdWithADouble *base_cmd =
new G4UIcmdWithADouble(command, this);
fBaseMap[base_cmd] = p;
command = "/B08/importance/" + cellname + "/exp";
G4UIcmdWithADouble *expo_cmd =
new G4UIcmdWithADouble(command, this);
fExpMap[expo_cmd] = p;
// create an element in the =base exponent map
fBaseExpMap[p];
fIStore.AddImportanceRegion(fBaseExpMap[p].GetImportance(), *p);
}
void B08ImportanceMessenger::
SetImportanceBase(const G4String &cellname, G4double base){
G4VPhysicalVolume *p = fCellVolMap[cellname];
B08BaseExp &be = fBaseExpMap[p];
be.SetBase(base);
fIStore.ChangeImportance(be.GetImportance(), *p);
}
void B08ImportanceMessenger::
SetImportanceExponent(const G4String &cellname, G4double exp){
G4VPhysicalVolume *p = fCellVolMap[cellname];
B08BaseExp &be = fBaseExpMap[p];
be.SetExponent(exp);
fIStore.ChangeImportance(be.GetImportance(), *p);
}
void B08ImportanceMessenger::SetNewValue(G4UIcommand* pCmd,G4String szValue){
for (B08BaseMap::iterator itbase = fBaseMap.begin();
itbase != fBaseMap.end(); itbase++){
if (pCmd == itbase->first){
B08BaseExpMap::iterator curent = fBaseExpMap.find(itbase->second);
if (curent==fBaseExpMap.end()) {
G4Exception("B08ImportanceMessenger: volume not found in BaseExpMap");
}
curent->second.SetBase(itbase->first->GetNewDoubleValue(szValue));
fIStore.ChangeImportance(curent->second.GetImportance(),
*(itbase->second));
return;
}
}
for (B08ExpMap::iterator itexp = fExpMap.begin();
itexp != fExpMap.end(); itexp++){
if (pCmd == itexp->first){
B08BaseExpMap::iterator curent = fBaseExpMap.find(itexp->second);
if (curent==fBaseExpMap.end()) {
G4Exception("B08ImportanceMessenger: volume not found in BaseExpMap");
}
curent->second.SetExponent(itexp->first->GetNewDoubleValue(szValue));
fIStore.ChangeImportance(curent->second.GetImportance(),
*(itexp->second));
return;
}
}
}
@@ -0,0 +1,83 @@
//
// ********************************************************************
// * 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: B08MainMessenger.cc,v 1.1 2002/06/04 11:14:52 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "B08MainMessenger.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADouble.hh"
#include "G4UIcommand.hh"
#include "B08Scorer.hh"
#include "B08ScorePrinter.hh"
#include "G4VIStore.hh"
B08MainMessenger::
B08MainMessenger() :
fResultsFileName("test.txt"),
fNumberOfEvents(10),
fUpper(1.),
fLower(1.)
{
fCmdFn = new G4UIcmdWithAString("/B08/resultsfile", this);
fCmdFn->SetGuidance("set file name for output file");
fCmdFn->SetParameterName("Messege",true);
fCmdFn->SetDefaultValue("test.txt");
fCmdEv = new G4UIcmdWithAnInteger("/B08/nevents", this);
fCmdEv->SetGuidance("set number of events");
fCmdEv->SetParameterName("Messege",true);
fCmdEv->SetDefaultValue(10);
fCmdUpper = new G4UIcmdWithADouble("/B08/upperlimit", this);
fCmdUpper->SetGuidance("sets the upper limit for the weight window algorithm");
fCmdUpper->SetParameterName("Messege",true);
fCmdUpper->SetDefaultValue(1.);
fCmdLower = new G4UIcmdWithADouble("/B08/lowerlimit", this);
fCmdLower->SetGuidance("sets the lower limit for the weight window algorithm");
fCmdLower->SetParameterName("Messege",true);
fCmdLower->SetDefaultValue(1.);
}
void B08MainMessenger::SetNewValue(G4UIcommand* pCmd,G4String szValue){
if(pCmd==fCmdFn){
fResultsFileName = szValue;
}
if(pCmd==fCmdEv){
fNumberOfEvents = atoi(szValue);
}
if(pCmd==fCmdUpper){
fUpper = fCmdUpper->GetNewDoubleValue(szValue);
}
if(pCmd==fCmdLower){
fLower = fCmdLower->GetNewDoubleValue(szValue);
}
}
@@ -0,0 +1,633 @@
//
// ********************************************************************
// * 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: B08PhysicsList.cc,v 1.1 2002/06/04 11:14:52 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "g4std/iomanip"
#include "B08PhysicsList.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"
B08PhysicsList::B08PhysicsList() : G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
B08PhysicsList::~B08PhysicsList()
{
}
void B08PhysicsList::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 B08PhysicsList::ConstructAllBosons()
{
// Construct all bosons
G4BosonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B08PhysicsList::ConstructAllLeptons()
{
// Construct all leptons
G4LeptonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B08PhysicsList::ConstructAllMesons()
{
// Construct all mesons
G4MesonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B08PhysicsList::ConstructAllBaryons()
{
// Construct all barions
G4BaryonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B08PhysicsList::ConstructAllIons()
{
// Construct light ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B08PhysicsList::ConstructAllShortLiveds()
{
// Construct resonaces and quarks
G4ShortLivedConstructor pConstructor;
pConstructor.ConstructParticle();
}
void B08PhysicsList::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 B08PhysicsList::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 B08PhysicsList::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 B08PhysicsList::ConstructLeptHad()
{;}
#include "G4Decay.hh"
void B08PhysicsList::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 B08PhysicsList::SetCuts()
{
if (verboseLevel >0)
{
G4cout << "B08PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// "G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: B08PrimaryGeneratorAction.cc,v 1.1 2002/06/04 11:14:52 dressel Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
#include "globals.hh"
#include "B08PrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4Neutron.hh"
#include "G4ThreeVector.hh"
B08PrimaryGeneratorAction::B08PrimaryGeneratorAction()
{
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, -90.0005*cm));
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
}
B08PrimaryGeneratorAction::~B08PrimaryGeneratorAction()
{
delete particleGun;
}
void B08PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}

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