Import Geant4 9.0.0 source tree
This commit is contained in:
@@ -1,94 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B03AppBase.cc,v 1.3 2006/06/29 16:35:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
#include "B03AppBase.hh"
|
||||
#include <iostream>
|
||||
|
||||
#include "CLHEP/Random/Random.h"
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "B03DetectorConstruction.hh"
|
||||
#include "B03PhysicsList.hh"
|
||||
#include "B03PrimaryGeneratorAction.hh"
|
||||
|
||||
|
||||
B03AppBase *B03AppBase::fB03AppBase = 0;
|
||||
B03AppBase &B03AppBase::GetB03AppBase() {
|
||||
if (!fB03AppBase) {
|
||||
fB03AppBase = new B03AppBase;
|
||||
}
|
||||
return *fB03AppBase;
|
||||
}
|
||||
|
||||
B03AppBase::B03AppBase(){
|
||||
G4long myseed = 345354;
|
||||
|
||||
CLHEP::HepRandom::setTheSeed(myseed);
|
||||
|
||||
frunMgr = new G4RunManager;
|
||||
|
||||
// create the "tracking" detector -----------------
|
||||
fDetector = new B03DetectorConstruction;
|
||||
frunMgr->SetUserInitialization(fDetector);
|
||||
// ---------------------------------------------------
|
||||
fPhysics = new B03PhysicsList;
|
||||
frunMgr->SetUserInitialization(fPhysics);
|
||||
fPrimary = new B03PrimaryGeneratorAction;
|
||||
frunMgr->SetUserAction(fPrimary);
|
||||
// frunMgr->Initialize();
|
||||
|
||||
/*
|
||||
// create the detector for the importances and scoring
|
||||
fImportancedetector
|
||||
= new B03ImportanceDetectorConstruction();
|
||||
// the IStore is filled during detector construction
|
||||
|
||||
fIStore = fImportancedetector->GetIStore();
|
||||
|
||||
// create importance sampler to importance sample neutrons
|
||||
// in the importance geometry
|
||||
fCS_store =
|
||||
&fImportancedetector->GetCellScorerStore();
|
||||
fCS_scorer = new G4CellStoreScorer(*fCS_store);
|
||||
fPmgr = new
|
||||
G4ParallelImportanceScoreSampler(*fIStore, *fCS_scorer, "neutron");
|
||||
fPmgr->Initialize();
|
||||
*/
|
||||
}
|
||||
|
||||
B03AppBase::~B03AppBase(){
|
||||
delete fPrimary;
|
||||
delete fPhysics;
|
||||
delete fDetector;
|
||||
delete frunMgr;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03DetectorConstruction.cc,v 1.15 2006/06/29 16:35:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
|
||||
#include "G4Types.hh"
|
||||
#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"
|
||||
|
||||
B03DetectorConstruction::B03DetectorConstruction()
|
||||
{;}
|
||||
|
||||
B03DetectorConstruction::~B03DetectorConstruction()
|
||||
{;}
|
||||
|
||||
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);
|
||||
|
||||
/////////////////////////////
|
||||
// world cylinder volume
|
||||
////////////////////////////
|
||||
|
||||
|
||||
G4double innerRadiusCylinder = 0*cm;
|
||||
G4double outerRadiusCylinder = 101*cm; // dont't have scoring
|
||||
// cells coinside eith world volume boundary
|
||||
G4double hightCylinder = 105*cm;
|
||||
G4double startAngleCylinder = 0*deg;
|
||||
G4double spanningAngleCylinder = 360*deg;
|
||||
|
||||
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
|
||||
innerRadiusCylinder,
|
||||
outerRadiusCylinder,
|
||||
hightCylinder,
|
||||
startAngleCylinder,
|
||||
spanningAngleCylinder);
|
||||
|
||||
// logical world
|
||||
|
||||
G4LogicalVolume *worldCylinder_log =
|
||||
new G4LogicalVolume(worldCylinder, Galactic, "worldCylinder_log");
|
||||
|
||||
name = "shieldWorld";
|
||||
G4PVPlacement *pWorldVolume = new
|
||||
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
|
||||
name, 0, false, 0);
|
||||
|
||||
|
||||
// creating 1 slobs of 180 cm thick concrete
|
||||
|
||||
G4double innerRadiusShield = 0*cm;
|
||||
G4double outerRadiusShield = 100*cm;
|
||||
G4double hightShield = 90*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");
|
||||
|
||||
// physical shield
|
||||
|
||||
|
||||
name = "ConcreateBlock";
|
||||
|
||||
pos_x = 0*cm;
|
||||
pos_y = 0*cm;
|
||||
pos_z = 0*cm;
|
||||
G4VPhysicalVolume *pvol =
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldCylinder_log,
|
||||
false,
|
||||
0);
|
||||
|
||||
return pWorldVolume;
|
||||
}
|
||||
@@ -1,218 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03ImportanceDetectorConstruction.cc,v 1.8 2006/06/29 16:35:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Types.hh"
|
||||
#include <sstream>
|
||||
|
||||
#include "B03ImportanceDetectorConstruction.hh"
|
||||
|
||||
#include "G4Material.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
|
||||
|
||||
B03ImportanceDetectorConstruction::B03ImportanceDetectorConstruction()
|
||||
{
|
||||
Construct();
|
||||
}
|
||||
|
||||
B03ImportanceDetectorConstruction::~B03ImportanceDetectorConstruction()
|
||||
{;}
|
||||
|
||||
void B03ImportanceDetectorConstruction::Construct()
|
||||
{
|
||||
G4String name;
|
||||
G4double A, density, temperature, pressure;
|
||||
G4int z;
|
||||
|
||||
G4Material *Galactic =
|
||||
new G4Material(name="Galactic", z=1, A=1.01*g/mole, density,
|
||||
kStateGas,temperature,pressure);
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
// parallel world cylinder volume
|
||||
//////////////////////////////////
|
||||
|
||||
// parallel world solid larger than in the mass geometry
|
||||
|
||||
G4double innerRadiusCylinder = 0*cm;
|
||||
G4double outerRadiusCylinder = 110*cm;
|
||||
G4double hightCylinder = 110*cm;
|
||||
G4double startAngleCylinder = 0*deg;
|
||||
G4double spanningAngleCylinder = 360*deg;
|
||||
|
||||
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
|
||||
innerRadiusCylinder,
|
||||
outerRadiusCylinder,
|
||||
hightCylinder,
|
||||
startAngleCylinder,
|
||||
spanningAngleCylinder);
|
||||
|
||||
// logical world
|
||||
|
||||
G4LogicalVolume *worldCylinder_log =
|
||||
new G4LogicalVolume(worldCylinder, Galactic, "worldCylinder_log");
|
||||
|
||||
name = "parallelWorld";
|
||||
fWorldVolume = new
|
||||
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
|
||||
name, 0, false, 0);
|
||||
|
||||
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, 0));
|
||||
|
||||
|
||||
|
||||
|
||||
// creating 18 slobs of 10 cm thicknes
|
||||
|
||||
G4double innerRadiusShield = 0*cm;
|
||||
G4double outerRadiusShield = 100*cm;
|
||||
G4double hightShield = 5*cm;
|
||||
G4double startAngleShield = 0*deg;
|
||||
G4double spanningAngleShield = 360*deg;
|
||||
|
||||
G4Tubs *aShield = new G4Tubs("aShield",
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
hightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
|
||||
// logical parallel cells
|
||||
|
||||
G4LogicalVolume *aShield_log =
|
||||
new G4LogicalVolume(aShield, Galactic, "aShield_log");
|
||||
|
||||
// physical parallel cells
|
||||
|
||||
G4int i = 1;
|
||||
G4double startz = -85*cm;
|
||||
for (i=1; i<=18; ++i) {
|
||||
|
||||
name = GetCellName(i);
|
||||
|
||||
G4double pos_x = 0*cm;
|
||||
G4double pos_y = 0*cm;
|
||||
G4double pos_z = startz + (i-1) * (2*hightShield);
|
||||
G4VPhysicalVolume *pvol =
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldCylinder_log,
|
||||
false,
|
||||
0);
|
||||
G4GeometryCell cell(*pvol, 0);
|
||||
fPVolumeStore.AddPVolume(cell);
|
||||
}
|
||||
|
||||
// filling the rest of the world volumr behind the concrete with
|
||||
// another slob which should get the same importance value as the
|
||||
// last slob
|
||||
innerRadiusShield = 0*cm;
|
||||
outerRadiusShield = 110*cm;
|
||||
hightShield = 10*cm;
|
||||
startAngleShield = 0*deg;
|
||||
spanningAngleShield = 360*deg;
|
||||
|
||||
G4Tubs *aRest = new G4Tubs("Rest",
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
hightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
|
||||
G4LogicalVolume *aRest_log =
|
||||
new G4LogicalVolume(aRest, Galactic, "aRest_log");
|
||||
name = GetCellName(19);
|
||||
|
||||
G4double pos_x = 0*cm;
|
||||
G4double pos_y = 0*cm;
|
||||
G4double pos_z = 100*cm;
|
||||
G4VPhysicalVolume *pvol =
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aRest_log,
|
||||
name,
|
||||
worldCylinder_log,
|
||||
false,
|
||||
0);
|
||||
G4GeometryCell cell(*pvol, 0);
|
||||
fPVolumeStore.AddPVolume(cell);
|
||||
|
||||
}
|
||||
|
||||
const G4VPhysicalVolume &B03ImportanceDetectorConstruction::
|
||||
GetPhysicalVolumeByName(const G4String& name) const {
|
||||
return *fPVolumeStore.GetPVolume(name);
|
||||
}
|
||||
|
||||
|
||||
G4String B03ImportanceDetectorConstruction::ListPhysNamesAsG4String(){
|
||||
G4String names(fPVolumeStore.GetPNames());
|
||||
return names;
|
||||
}
|
||||
|
||||
|
||||
G4String B03ImportanceDetectorConstruction::GetCellName(G4int i) {
|
||||
std::ostringstream os;
|
||||
os << "cell_";
|
||||
if (i<10) {
|
||||
os << "0";
|
||||
}
|
||||
os << i
|
||||
<< '\0';
|
||||
G4String name = os.str();
|
||||
return name;
|
||||
}
|
||||
|
||||
G4GeometryCell B03ImportanceDetectorConstruction::GetGeometryCell(G4int i){
|
||||
G4String name(GetCellName(i));
|
||||
const G4VPhysicalVolume *p=0;
|
||||
p = fPVolumeStore.GetPVolume(name);
|
||||
if (p) {
|
||||
return G4GeometryCell(*p,0);
|
||||
}
|
||||
else {
|
||||
G4cout << "B03ImportanceDetectorConstruction::GetGeometryCell: couldn't get G4GeometryCell" << G4endl;
|
||||
return G4GeometryCell(*fWorldVolume,-2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
G4VPhysicalVolume &B03ImportanceDetectorConstruction::GetWorldVolume() const{
|
||||
return *fWorldVolume;
|
||||
}
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03PVolumeStore.cc,v 1.4 2006/06/29 16:35:19 gunter Exp $
|
||||
// GEANT4 tag
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// B03PVolumeStore.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "B03PVolumeStore.hh"
|
||||
#include <sstream>
|
||||
|
||||
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
B03PVolumeStore::B03PVolumeStore(){}
|
||||
B03PVolumeStore::~B03PVolumeStore(){}
|
||||
|
||||
void B03PVolumeStore::AddPVolume(const G4GeometryCell &cell){
|
||||
|
||||
B03SetGeometryCell::iterator it =
|
||||
fSetGeometryCell.find(cell);
|
||||
if (it != fSetGeometryCell.end()) {
|
||||
G4cout << "B03PVolumeStore::AddPVolume: cell already stored"
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
fSetGeometryCell.insert(cell);
|
||||
|
||||
|
||||
}
|
||||
|
||||
const G4VPhysicalVolume *B03PVolumeStore::
|
||||
GetPVolume(const G4String &name) const {
|
||||
const G4VPhysicalVolume *pvol = 0;
|
||||
for (B03SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
|
||||
it != fSetGeometryCell.end(); ++it) {
|
||||
const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
|
||||
if (vol.GetName() == name) {
|
||||
pvol = &vol;
|
||||
}
|
||||
}
|
||||
if (!pvol) {
|
||||
G4cout << "B03PVolumeStore::GetPVolume: no physical volume named: "
|
||||
<< name << ", found" << G4endl;
|
||||
}
|
||||
return pvol;
|
||||
}
|
||||
|
||||
G4String B03PVolumeStore::GetPNames() const {
|
||||
G4String NameString;
|
||||
for (B03SetGeometryCell::const_iterator it = fSetGeometryCell.begin();
|
||||
it != fSetGeometryCell.end(); ++it) {
|
||||
const G4VPhysicalVolume &vol = it->GetPhysicalVolume();
|
||||
std::ostringstream os;
|
||||
os << vol.GetName() << "_" << it->GetReplicaNumber()
|
||||
<< "\n" << '\0';
|
||||
G4String cellname = os.str();
|
||||
|
||||
// G4String cellname(vol.GetName());
|
||||
// cellname += G4String("_");
|
||||
// cellname += std::str(it->GetReplicaNumber());
|
||||
|
||||
NameString += cellname;
|
||||
}
|
||||
return NameString;
|
||||
}
|
||||
@@ -1,636 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03PhysicsList.cc,v 1.5 2006/06/29 16:35:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
#include <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();
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03PrimaryGeneratorAction.cc,v 1.6 2006/06/29 16:35:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
|
||||
#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, -90.0005*cm));
|
||||
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
|
||||
}
|
||||
|
||||
B03PrimaryGeneratorAction::~B03PrimaryGeneratorAction()
|
||||
{
|
||||
delete particleGun;
|
||||
}
|
||||
|
||||
void B03PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
Reference in New Issue
Block a user