Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -23,21 +23,21 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02DetectorConstruction.cc
/// \brief Implementation of the RE02DetectorConstruction class
//
// $Id: RE02DetectorConstruction.cc,v 1.5 2010-12-07 15:17:13 stesting Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
#include "RE02DetectorConstruction.hh"
#include "G4MultiFunctionalDetector.hh"
#include "RE02PSEnergyDeposit.hh"
#include "RE02PSNofStep.hh"
#include "RE02PSCellFlux.hh"
#include "RE02PSPassageCellFlux.hh"
#include "RE02PSFlatSurfaceFlux.hh"
#include "RE02PSFlatSurfaceCurrent.hh"
#include "G4PSEnergyDeposit3D.hh"
#include "G4PSNofStep3D.hh"
#include "G4PSCellFlux3D.hh"
#include "G4PSPassageCellFlux3D.hh"
#include "G4PSFlatSurfaceFlux3D.hh"
#include "G4PSFlatSurfaceCurrent3D.hh"
#include "G4SDParticleWithEnergyFilter.hh"
#include "G4SDParticleFilter.hh"
@@ -56,6 +56,7 @@
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "G4SystemOfUnits.hh"
#include "G4ios.hh"
//=======================================================================
@@ -68,14 +69,16 @@
// [Geometry]
// The world volume is defined as 200 cm x 200 cm x 200 cm box with Air.
// Water phantom is defined as 200 mm x 200 mm x 400 mm box with Water.
// The water phantom is divided into 100 segments in x,y plane using replication,
// The water phantom is divided into 100 segments in x,y plane using
// replication,
// and then divided into 200 segments perpendicular to z axis using nested
// parameterised volume.
// These values are defined at constructor,
// e.g. the size of water phantom (fphantomSize), and number of segmentation
// e.g. the size of water phantom (fPhantomSize), and number of segmentation
// of water phantom (fNx, fNy, fNz).
//
// By default, lead plates are inserted into the position of even order segments.
// By default, lead plates are inserted into the position of even order
// segments.
// NIST database is used for materials.
//
//
@@ -99,21 +102,22 @@
//
//=======================================================================
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02DetectorConstruction::RE02DetectorConstruction()
{
// Default size of water phantom,and segmentation.
fphantomSize.setX(200.*mm);
fphantomSize.setY(200.*mm);
fphantomSize.setZ(400.*mm);
fPhantomSize.setX(200.*mm);
fPhantomSize.setY(200.*mm);
fPhantomSize.setZ(400.*mm);
fNx = fNy = fNz = 100;
fInsertLead = TRUE;
}
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02DetectorConstruction::~RE02DetectorConstruction()
{;}
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* RE02DetectorConstruction::Construct()
{
//=====================
@@ -124,16 +128,15 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
// Material Information imported from NIST database.
//
G4NistManager* NISTman = G4NistManager::Instance();
G4Material* Air = NISTman->FindOrBuildMaterial("G4_AIR");
G4Material* H2O = NISTman->FindOrBuildMaterial("G4_WATER");
G4Material* LEAD = NISTman->FindOrBuildMaterial("G4_Pb");
G4Material* air = NISTman->FindOrBuildMaterial("G4_AIR");
G4Material* water = NISTman->FindOrBuildMaterial("G4_WATER");
G4Material* lead = NISTman->FindOrBuildMaterial("G4_Pb");
//
// Print all the materials defined.
G4cout << G4endl << "The materials defined are : " << G4endl << G4endl;
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
//============================================================================
// Definitions of Solids, Logical Volumes, Physical Volumes
//============================================================================
@@ -147,19 +150,19 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
G4Box * solidWorld
= new G4Box("world", worldSize.x()/2., worldSize.y()/2., worldSize.z()/2.);
G4LogicalVolume * logicWorld
= new G4LogicalVolume(solidWorld, Air, "World", 0, 0, 0);
= new G4LogicalVolume(solidWorld, air, "World", 0, 0, 0);
//
// Must place the World Physical volume unrotated at (0,0,0).
G4VPhysicalVolume * physiWorld
= new G4PVPlacement(0, // no rotation
G4ThreeVector(), // at (0,0,0)
logicWorld, // its logical volume
"World", // its name
0, // its mother volume
false, // no boolean operations
0); // copy number
G4ThreeVector(), // at (0,0,0)
logicWorld, // its logical volume
"World", // its name
0, // its mother volume
false, // no boolean operations
0); // copy number
//---------------
// Water Phantom
//---------------
@@ -169,35 +172,36 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
//................................
//-- Default size of water phantom is defined at constructor.
G4ThreeVector phantomSize = fphantomSize;
G4ThreeVector phantomSize = fPhantomSize;
G4Box * solidPhantom
= new G4Box("phantom",
phantomSize.x()/2., phantomSize.y()/2., phantomSize.z()/2.);
phantomSize.x()/2., phantomSize.y()/2., phantomSize.z()/2.);
G4LogicalVolume * logicPhantom
= new G4LogicalVolume(solidPhantom, H2O, "Phantom", 0, 0, 0);
= new G4LogicalVolume(solidPhantom, water, "Phantom", 0, 0, 0);
G4RotationMatrix* rot=new G4RotationMatrix();
G4RotationMatrix* rot = new G4RotationMatrix();
//rot->rotateY(30.*deg);
G4ThreeVector positionPhantom;
//G4VPhysicalVolume * physiPhantom =
new G4PVPlacement(rot, // no rotation
positionPhantom, // at (x,y,z)
logicPhantom, // its logical volume
"Phantom", // its name
logicWorld, // its mother volume
false, // no boolean operations
0); // copy number
positionPhantom, // at (x,y,z)
logicPhantom, // its logical volume
"Phantom", // its name
logicWorld, // its mother volume
false, // no boolean operations
0); // copy number
//..............................................
// Phantom segmentation using Parameterisation
//..............................................
//
G4cout << "<-- RE02DetectorConstruction::Construct-------" <<G4endl;
G4cout << " Water Phantom Size " << fphantomSize/mm << G4endl;
G4cout << " Segmentation ("<< fNx<<","<<fNy<<","<<fNz<<")"<<G4endl;
G4cout << " Lead plate at even copy # (0-False,1-True): " << IsLeadSegment() <<G4endl;
G4cout << "<---------------------------------------------"<<G4endl;
G4cout << " Water Phantom Size " << fPhantomSize/mm << G4endl;
G4cout << " Segmentation ("<< fNx<<","<<fNy<<","<<fNz<<")"<< G4endl;
G4cout << " Lead plate at even copy # (0-False,1-True): " << IsLeadSegment()
<< G4endl;
G4cout << "<---------------------------------------------"<< G4endl;
// Number of segmentation.
// - Default number of segmentation is defined at constructor.
G4int nxCells = fNx;
@@ -217,7 +221,7 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
G4VSolid* solYRep =
new G4Box(yRepName,phantomSize.x()/2.,sensSize.y()/2.,phantomSize.z()/2.);
G4LogicalVolume* logYRep =
new G4LogicalVolume(solYRep,H2O,yRepName);
new G4LogicalVolume(solYRep,water,yRepName);
//G4PVReplica* yReplica =
new G4PVReplica(yRepName,logYRep,logicPhantom,kYAxis,fNy,sensSize.y());
// X Slice
@@ -225,11 +229,10 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
G4VSolid* solXRep =
new G4Box(xRepName,sensSize.x()/2.,sensSize.y()/2.,phantomSize.z()/2.);
G4LogicalVolume* logXRep =
new G4LogicalVolume(solXRep,H2O,xRepName);
new G4LogicalVolume(solXRep,water,xRepName);
//G4PVReplica* xReplica =
new G4PVReplica(xRepName,logXRep,logYRep,kXAxis,fNx,sensSize.x());
//
//
//
//..................................
// Voxel solid and logical volumes
@@ -238,24 +241,24 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
G4String zVoxName("phantomSens");
G4VSolid* solVoxel =
new G4Box(zVoxName,sensSize.x()/2.,sensSize.y()/2.,sensSize.z()/2.);
G4LogicalVolume* logicPhantomSens = new G4LogicalVolume(solVoxel,H2O,zVoxName);
G4LogicalVolume* logicPhantomSens = new G4LogicalVolume(solVoxel,water,zVoxName);
//
//
std::vector<G4Material*> phantomMat(2,H2O);
if ( IsLeadSegment() ) phantomMat[1]=LEAD;
std::vector<G4Material*> phantomMat(2,water);
if ( IsLeadSegment() ) phantomMat[1]=lead;
//
// Parameterisation for transformation of voxels.
// (voxel size is fixed in this example.
// e.g. nested parameterisation handles material and transfomation of voxels.)
// e.g. nested parameterisation handles material and transfomation of voxels.)
RE02NestedPhantomParameterisation* paramPhantom
= new RE02NestedPhantomParameterisation(sensSize/2.,nzCells,phantomMat);
//G4VPhysicalVolume * physiPhantomSens =
new G4PVParameterised("PhantomSens", // their name
logicPhantomSens, // their logical volume
logXRep, // Mother logical volume
kUndefined, // Are placed along this axis
nzCells, // Number of cells
paramPhantom); // Parameterisation.
logicPhantomSens, // their logical volume
logXRep, // Mother logical volume
kUndefined, // Are placed along this axis
nzCells, // Number of cells
paramPhantom); // Parameterisation.
// Optimization flag is avaiable for,
// kUndefined, kXAxis, kYAxis, kZAxis.
//
@@ -265,7 +268,7 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
//================================================
//
// Sensitive Detector Manager.
G4SDManager* SDman = G4SDManager::GetSDMpointer();
G4SDManager* pSDman = G4SDManager::GetSDMpointer();
//
// Sensitive Detector Name
G4String phantomSDname = "PhantomSD";
@@ -275,9 +278,10 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
//------------------------
//
// Define MultiFunctionalDetector with name.
G4MultiFunctionalDetector* MFDet = new G4MultiFunctionalDetector(phantomSDname);
SDman->AddNewDetector( MFDet ); // Register SD to SDManager.
logicPhantomSens->SetSensitiveDetector(MFDet); // Assign SD to the logical volume.
G4MultiFunctionalDetector* mFDet
= new G4MultiFunctionalDetector(phantomSDname);
pSDman->AddNewDetector( mFDet ); // Register SD to SDManager.
logicPhantomSens->SetSensitiveDetector(mFDet); // Assign SD to the logical volume.
//---------------------------------------
// SDFilter : Sensitive Detector Filters
@@ -312,23 +316,26 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
//-- Primitive Scorer for Energy Deposit.
// Total, by protons, by electrons.
G4String psName;
G4PSEnergyDeposit* scorer0 = new RE02PSEnergyDeposit(psName="totalEDep",fNx,fNy,fNz);
G4PSEnergyDeposit* scorer1 = new RE02PSEnergyDeposit(psName="protonEDep",fNx,fNy,fNz);
G4PSEnergyDeposit3D * scorer0 = new G4PSEnergyDeposit3D(psName="totalEDep",
fNx,fNy,fNz);
G4PSEnergyDeposit3D * scorer1 = new G4PSEnergyDeposit3D(psName="protonEDep",
fNx,fNy,fNz);
scorer1->SetFilter(protonFilter);
//
//-- Number of Steps for protons
G4PSNofStep* scorer2 = new RE02PSNofStep(psName="protonNStep",fNx,fNy,fNz);
G4PSNofStep3D * scorer2 =
new G4PSNofStep3D(psName="protonNStep",fNx,fNy,fNz);
scorer2->SetFilter(protonFilter);
//
//-- CellFlux for charged particles
G4PSPassageCellFlux* scorer3 = new RE02PSPassageCellFlux(psName="chargedPassCellFlux",
fNx,fNy,fNz);
G4PSCellFlux* scorer4 = new RE02PSCellFlux(psName="chargedCellFlux",
fNx,fNy,fNz);
G4PSFlatSurfaceFlux* scorer5 = new RE02PSFlatSurfaceFlux(psName="chargedSurfFlux",
fFlux_InOut,fNx,fNy,fNz);
G4PSPassageCellFlux3D * scorer3 =
new G4PSPassageCellFlux3D(psName="chargedPassCellFlux", fNx,fNy,fNz);
G4PSCellFlux3D * scorer4 =
new G4PSCellFlux3D(psName="chargedCellFlux", fNx,fNy,fNz);
G4PSFlatSurfaceFlux3D * scorer5 =
new G4PSFlatSurfaceFlux3D(psName="chargedSurfFlux", fFlux_InOut,fNx,fNy,fNz);
scorer3->SetFilter(chargedFilter);
scorer4->SetFilter(chargedFilter);
scorer5->SetFilter(chargedFilter);
@@ -337,13 +344,12 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
//------------------------------------------------------------
// Register primitive scorers to MultiFunctionalDetector
//------------------------------------------------------------
MFDet->RegisterPrimitive(scorer0);
MFDet->RegisterPrimitive(scorer1);
MFDet->RegisterPrimitive(scorer2);
MFDet->RegisterPrimitive(scorer3);
MFDet->RegisterPrimitive(scorer4);
MFDet->RegisterPrimitive(scorer5);
mFDet->RegisterPrimitive(scorer0);
mFDet->RegisterPrimitive(scorer1);
mFDet->RegisterPrimitive(scorer2);
mFDet->RegisterPrimitive(scorer3);
mFDet->RegisterPrimitive(scorer4);
mFDet->RegisterPrimitive(scorer5);
//========================
// More additional Primitive Scoreres
@@ -365,14 +371,14 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
G4double kmax = std::pow(10.,(G4double)(i+1))*keV;
//-- Particle with kinetic energy filter.
G4SDParticleWithEnergyFilter* pkinEFilter =
new G4SDParticleWithEnergyFilter(fltName="gammaE filter",kmin,kmax);
new G4SDParticleWithEnergyFilter(fltName="gammaE filter",kmin,kmax);
pkinEFilter->add("gamma"); // Accept only gamma.
pkinEFilter->show(); // Show accepting condition to stdout.
//-- Surface Current Scorer which scores number of tracks in unit area.
G4PSFlatSurfaceCurrent* scorer =
new RE02PSFlatSurfaceCurrent(psgName,fCurrent_InOut,fNx,fNy,fNz);
G4PSFlatSurfaceCurrent3D * scorer =
new G4PSFlatSurfaceCurrent3D(psgName,fCurrent_InOut,fNx,fNy,fNz);
scorer->SetFilter(pkinEFilter); // Assign filter.
MFDet->RegisterPrimitive(scorer); // Register it to MultiFunctionalDetector.
mFDet->RegisterPrimitive(scorer); // Register it to MultiFunctionalDetector.
}
//
@@ -380,19 +386,19 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
// Visualization attributes
//===============================
G4VisAttributes* BoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
logicWorld ->SetVisAttributes(BoxVisAtt);
G4VisAttributes* boxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
logicWorld ->SetVisAttributes(boxVisAtt);
//logicWorld->SetVisAttributes(G4VisAttributes::Invisible);
// Mother volume of WaterPhantom
G4VisAttributes* PhantomVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
logicPhantom->SetVisAttributes(PhantomVisAtt);
G4VisAttributes* phantomVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
logicPhantom->SetVisAttributes(phantomVisAtt);
// Replica
G4VisAttributes* YRepVisAtt = new G4VisAttributes(G4Colour(0.0,1.0,0.0));
logYRep->SetVisAttributes(YRepVisAtt);
G4VisAttributes* XRepVisAtt = new G4VisAttributes(G4Colour(0.0,1.0,0.0));
logXRep->SetVisAttributes(XRepVisAtt);
G4VisAttributes* yRepVisAtt = new G4VisAttributes(G4Colour(0.0,1.0,0.0));
logYRep->SetVisAttributes(yRepVisAtt);
G4VisAttributes* xRepVisAtt = new G4VisAttributes(G4Colour(0.0,1.0,0.0));
logXRep->SetVisAttributes(xRepVisAtt);
// Skip the visualization for those voxels.
logicPhantomSens->SetVisAttributes(G4VisAttributes::Invisible);
@@ -23,26 +23,29 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RE02EMPhysics.cc,v 1.3 2010-04-07 01:29:00 asaim Exp $
/// \file runAndEvent/RE02/src/RE02EMPhysics.cc
/// \brief Implementation of the RE02EMPhysics class
//
// $Id$
// --------------------------------------------------------------
//
//
// 09-Oct-2003 Change gamma, electron, positorn process T. Koi
// 10-Jan-2004 Add Brems. of AlongStepDoIt for e+- T. Koi
#include "RE02EMPhysics.hh"
#include "globals.hh"
#include "G4ios.hh"
#include <iomanip>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02EMPhysics::RE02EMPhysics(const G4String& name)
: G4VPhysicsConstructor(name)
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02EMPhysics::~RE02EMPhysics()
{
}
@@ -60,6 +63,7 @@ RE02EMPhysics::~RE02EMPhysics()
#include "G4ProcessManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE02EMPhysics::ConstructProcess()
{
G4ProcessManager * pManager = 0;
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02EventAction.cc
/// \brief Implementation of the RE02EventAction class
//
// $Id: RE02EventAction.cc,v 1.3 2006-11-18 01:37:24 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
#include "RE02EventAction.hh"
@@ -35,19 +37,19 @@
#include "G4TrajectoryContainer.hh"
#include "G4Trajectory.hh"
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02EventAction::RE02EventAction()
{}
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02EventAction::~RE02EventAction()
{}
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE02EventAction::BeginOfEventAction(const G4Event*)
{}
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE02EventAction::EndOfEventAction(const G4Event* evt)
{
G4int event_id = evt->GetEventID();
@@ -23,11 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RE02GeneralPhysics.cc,v 1.2 2006-06-29 17:45:16 gunter Exp $
/// \file runAndEvent/RE02/src/RE02GeneralPhysics.cc
/// \brief Implementation of the RE02GeneralPhysics class
//
// $Id$
// --------------------------------------------------------------
//
// 22-Nov-2004 Construt ALL Particles by T. Koi
// 22-Nov-2004 Construct ALL Particles by T. Koi
#include "RE02GeneralPhysics.hh"
@@ -35,11 +37,13 @@
#include "G4ios.hh"
#include <iomanip>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02GeneralPhysics::RE02GeneralPhysics(const G4String& name)
: G4VPhysicsConstructor(name)
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02GeneralPhysics::~RE02GeneralPhysics()
{
}
@@ -51,6 +55,7 @@ RE02GeneralPhysics::~RE02GeneralPhysics()
#include "G4MesonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE02GeneralPhysics::ConstructParticle()
{
// In Alphabetical Order
@@ -81,7 +86,8 @@ void RE02GeneralPhysics::ConstructParticle()
delete mesonConstructor;
// Construct resonaces and quarks
G4ShortLivedConstructor* shortLivedConstructor = new G4ShortLivedConstructor();
G4ShortLivedConstructor* shortLivedConstructor =
new G4ShortLivedConstructor();
shortLivedConstructor -> ConstructParticle();
delete shortLivedConstructor;
@@ -91,10 +97,11 @@ void RE02GeneralPhysics::ConstructParticle()
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE02GeneralPhysics::ConstructProcess()
{
// Add Decay Process
G4Decay* theDecayProcess = new G4Decay();
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
@@ -23,7 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RE02HadronPhysics.cc,v 1.3 2010-04-07 01:29:00 asaim Exp $
/// \file runAndEvent/RE02/src/RE02HadronPhysics.cc
/// \brief Implementation of the RE02HadronPhysics class
//
// $Id$
// --------------------------------------------------------------
//
// 09-Oct-2003 Hadron Physics List with Parameterization Model by T. Koi
@@ -36,15 +39,17 @@
#include "RE02HadronPhysics.hh"
#include "globals.hh"
#include "G4SystemOfUnits.hh"
#include "G4ios.hh"
#include <iomanip>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02HadronPhysics::RE02HadronPhysics(const G4String& name)
: G4VPhysicsConstructor(name)
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02HadronPhysics::~RE02HadronPhysics()
{
}
@@ -54,6 +59,7 @@ RE02HadronPhysics::~RE02HadronPhysics()
#include "G4ProcessManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE02HadronPhysics::ConstructProcess()
{
G4ProcessManager * pManager = 0;
@@ -62,14 +68,13 @@ void RE02HadronPhysics::ConstructProcess()
pManager = G4PionPlus::PionPlus()->GetProcessManager();
// add processes
G4HadronElasticProcess* theppElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* theppElasticProcess = new G4HadronElasticProcess();
G4LElastic* theppElasticModel = new G4LElastic();
theppElasticProcess->RegisterMe(theppElasticModel);
pManager->AddDiscreteProcess(theppElasticProcess);
G4PionPlusInelasticProcess* thePionPlusInelasticProcess
= new G4PionPlusInelasticProcess();
G4PionPlusInelasticProcess* thePionPlusInelasticProcess =
new G4PionPlusInelasticProcess();
G4LEPionPlusInelastic* thePionPlusLEPModel = new G4LEPionPlusInelastic();
G4HEPionPlusInelastic* thePionPlusHEPModel = new G4HEPionPlusInelastic();
@@ -78,31 +83,29 @@ void RE02HadronPhysics::ConstructProcess()
pManager->AddDiscreteProcess(thePionPlusInelasticProcess);
G4VProcess* theppMultipleScattering = new G4hMultipleScattering();
G4VProcess* theppIonisation = new G4hIonisation();
G4VProcess* theppIonisation = new G4hIonisation();
//
pManager->AddProcess(theppIonisation);
pManager->AddProcess(theppMultipleScattering);
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(theppMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(theppIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(theppIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(theppMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(theppIonisation, idxPostStep,2);
pManager->SetProcessOrdering(theppIonisation, idxPostStep,2);
// Pi- Physics
pManager = G4PionMinus::PionMinus()->GetProcessManager();
G4HadronElasticProcess* thepmElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thepmElasticProcess = new G4HadronElasticProcess();
G4LElastic* thepmElasticModel = new G4LElastic();
thepmElasticProcess->RegisterMe(thepmElasticModel);
pManager->AddDiscreteProcess(thepmElasticProcess);
G4PionMinusInelasticProcess* thePionMinusInelasticProcess
= new G4PionMinusInelasticProcess();
G4PionMinusInelasticProcess* thePionMinusInelasticProcess =
new G4PionMinusInelasticProcess();
G4LEPionMinusInelastic* thePionMinusLEPModel = new G4LEPionMinusInelastic();
G4HEPionMinusInelastic* thePionMinusHEPModel = new G4HEPionMinusInelastic();
@@ -111,7 +114,7 @@ void RE02HadronPhysics::ConstructProcess()
pManager->AddDiscreteProcess(thePionMinusInelasticProcess);
G4VProcess* thepmMultipleScattering = new G4hMultipleScattering();
G4VProcess* thepmIonisation = new G4hIonisation();
G4VProcess* thepmIonisation = new G4hIonisation();
//
// add processes
pManager->AddProcess(thepmIonisation);
@@ -119,24 +122,22 @@ void RE02HadronPhysics::ConstructProcess()
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thepmMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thepmIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thepmIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thepmMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thepmIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thepmIonisation, idxPostStep,2);
// K+ Physics
pManager = G4KaonPlus::KaonPlus()->GetProcessManager();
G4HadronElasticProcess* thekpElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thekpElasticProcess = new G4HadronElasticProcess();
G4LElastic* thekpElasticModel = new G4LElastic();
thekpElasticProcess->RegisterMe(thekpElasticModel);
pManager->AddDiscreteProcess(thekpElasticProcess);
G4KaonPlusInelasticProcess* theKaonPlusInelasticProcess
= new G4KaonPlusInelasticProcess();
G4KaonPlusInelasticProcess* theKaonPlusInelasticProcess =
new G4KaonPlusInelasticProcess();
G4LEKaonPlusInelastic* theKaonPlusLEPModel = new G4LEKaonPlusInelastic();
G4HEKaonPlusInelastic* theKaonPlusHEPModel = new G4HEKaonPlusInelastic();
@@ -145,7 +146,7 @@ void RE02HadronPhysics::ConstructProcess()
pManager->AddDiscreteProcess(theKaonPlusInelasticProcess);
G4VProcess* thekpMultipleScattering = new G4hMultipleScattering();
G4VProcess* thekpIonisation = new G4hIonisation();
G4VProcess* thekpIonisation = new G4hIonisation();
//
// add processes
pManager->AddProcess(thekpIonisation);
@@ -153,25 +154,23 @@ void RE02HadronPhysics::ConstructProcess()
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thekpMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thekpIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thekpIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thekpMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thekpIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thekpIonisation, idxPostStep,2);
// K- Physics
pManager = G4KaonMinus::KaonMinus()->GetProcessManager();
// add processes
G4HadronElasticProcess* thekmElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thekmElasticProcess = new G4HadronElasticProcess();
G4LElastic* thekmElasticModel = new G4LElastic();
thekmElasticProcess->RegisterMe(thekmElasticModel);
pManager->AddDiscreteProcess(thekmElasticProcess);
G4KaonMinusInelasticProcess* theKaonMinusInelasticProcess
= new G4KaonMinusInelasticProcess();
G4KaonMinusInelasticProcess* theKaonMinusInelasticProcess =
new G4KaonMinusInelasticProcess();
G4LEKaonMinusInelastic* theKaonMinusLEPModel = new G4LEKaonMinusInelastic();
G4HEKaonMinusInelastic* theKaonMinusHEPModel = new G4HEKaonMinusInelastic();
@@ -180,31 +179,29 @@ void RE02HadronPhysics::ConstructProcess()
pManager->AddDiscreteProcess(theKaonMinusInelasticProcess);
G4VProcess* thekmMultipleScattering = new G4hMultipleScattering();
G4VProcess* thekmIonisation = new G4hIonisation();
G4VProcess* thekmIonisation = new G4hIonisation();
pManager->AddProcess(thekmIonisation);
pManager->AddProcess(thekmMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thekmMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thekmIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thekmIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thekmMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thekmIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thekmIonisation, idxPostStep,2);
// Kaon0L Phsics
// Kaon0L Physics
pManager = G4KaonZeroLong::KaonZeroLong()->GetProcessManager();
G4HadronElasticProcess* thek0lElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thek0lElasticProcess = new G4HadronElasticProcess();
G4LElastic* thek0lElasticModel = new G4LElastic();
thek0lElasticProcess->RegisterMe(thek0lElasticModel);
pManager->AddDiscreteProcess(thek0lElasticProcess);
G4KaonZeroLInelasticProcess* theKaonZeroLInelasticProcess
= new G4KaonZeroLInelasticProcess();
G4KaonZeroLInelasticProcess* theKaonZeroLInelasticProcess =
new G4KaonZeroLInelasticProcess();
G4LEKaonZeroLInelastic* theKaonZeroLLEPModel = new G4LEKaonZeroLInelastic();
G4HEKaonZeroInelastic* theKaonZerolHEPModel = new G4HEKaonZeroInelastic();
@@ -212,18 +209,16 @@ void RE02HadronPhysics::ConstructProcess()
theKaonZeroLInelasticProcess->RegisterMe(theKaonZerolHEPModel);
pManager->AddDiscreteProcess(theKaonZeroLInelasticProcess);
// Kaon0S Phsics
// Kaon0S Physics
pManager = G4KaonZeroShort::KaonZeroShort()->GetProcessManager();
G4HadronElasticProcess* thek0sElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thek0sElasticProcess = new G4HadronElasticProcess();
G4LElastic* thek0sElasticModel = new G4LElastic();
thek0sElasticProcess->RegisterMe(thek0sElasticModel);
pManager->AddDiscreteProcess(thek0sElasticProcess);
G4KaonZeroSInelasticProcess* theKaonZeroSInelasticProcess
= new G4KaonZeroSInelasticProcess();
G4KaonZeroSInelasticProcess* theKaonZeroSInelasticProcess =
new G4KaonZeroSInelasticProcess();
G4LEKaonZeroSInelastic* theKaonZeroSLEPModel = new G4LEKaonZeroSInelastic();
G4HEKaonZeroInelastic* theKaonZerosHEPModel = new G4HEKaonZeroInelastic();
@@ -231,19 +226,17 @@ void RE02HadronPhysics::ConstructProcess()
theKaonZeroSInelasticProcess->RegisterMe(theKaonZerosHEPModel);
pManager->AddDiscreteProcess(theKaonZeroSInelasticProcess);
// Proton Physics
pManager = G4Proton::Proton()->GetProcessManager();
// add process
G4HadronElasticProcess* thepElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thepElasticProcess = new G4HadronElasticProcess();
G4LElastic* thepElasticModel = new G4LElastic();
thepElasticProcess->RegisterMe(thepElasticModel);
pManager->AddDiscreteProcess(thepElasticProcess);
G4ProtonInelasticProcess* theProtonInelasticProcess
= new G4ProtonInelasticProcess();
G4ProtonInelasticProcess* theProtonInelasticProcess =
new G4ProtonInelasticProcess();
G4BinaryCascade* theProtonBCModel = new G4BinaryCascade();
theProtonBCModel->SetMaxEnergy(6.*GeV);
@@ -256,70 +249,68 @@ void RE02HadronPhysics::ConstructProcess()
pManager->AddDiscreteProcess(theProtonInelasticProcess);
G4VProcess* thepMultipleScattering = new G4hMultipleScattering();
G4VProcess* thepIonisation = new G4hIonisation();
G4VProcess* thepIonisation = new G4hIonisation();
pManager->AddProcess(thepIonisation);
pManager->AddProcess(thepMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thepMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thepIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thepIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thepMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thepIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thepIonisation, idxPostStep,2);
// anti-proton Physics
pManager = G4AntiProton::AntiProton()->GetProcessManager();
// add process
G4HadronElasticProcess* theapElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* theapElasticProcess = new G4HadronElasticProcess();
G4LElastic* theapElasticModel = new G4LElastic();
theapElasticProcess->RegisterMe(theapElasticModel);
pManager->AddDiscreteProcess(theapElasticProcess);
G4AntiProtonInelasticProcess* theAntiProtonInelasticProcess
= new G4AntiProtonInelasticProcess();
G4AntiProtonInelasticProcess* theAntiProtonInelasticProcess =
new G4AntiProtonInelasticProcess();
G4LEAntiProtonInelastic* theAntiProtonLEPModel = new G4LEAntiProtonInelastic();
G4HEAntiProtonInelastic* theAntiProtonHEPModel = new G4HEAntiProtonInelastic();
G4LEAntiProtonInelastic* theAntiProtonLEPModel =
new G4LEAntiProtonInelastic();
G4HEAntiProtonInelastic* theAntiProtonHEPModel =
new G4HEAntiProtonInelastic();
theAntiProtonInelasticProcess->RegisterMe(theAntiProtonLEPModel);
theAntiProtonInelasticProcess->RegisterMe(theAntiProtonHEPModel);
pManager->AddDiscreteProcess(theAntiProtonInelasticProcess);
G4AntiProtonAnnihilationAtRest* theAntiProtonAnnihilation
= new G4AntiProtonAnnihilationAtRest();
G4AntiProtonAnnihilationAtRest* theAntiProtonAnnihilation =
new G4AntiProtonAnnihilationAtRest();
pManager->AddRestProcess(theAntiProtonAnnihilation);
G4VProcess* theapMultipleScattering = new G4hMultipleScattering();
G4VProcess* theapIonisation = new G4hIonisation();
G4VProcess* theapIonisation = new G4hIonisation();
pManager->AddProcess(theapIonisation);
pManager->AddProcess(theapMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(theapMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(theapIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(theapIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(theapMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(theapIonisation, idxPostStep,2);
pManager->SetProcessOrdering(theapIonisation, idxPostStep,2);
// neutron Physics
pManager = G4Neutron::Neutron()->GetProcessManager();
// add process
G4HadronElasticProcess* thenElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thenElasticProcess = new G4HadronElasticProcess();
G4LElastic* thenElasticModel = new G4LElastic();
thenElasticProcess->RegisterMe(thenElasticModel);
pManager->AddDiscreteProcess(thenElasticProcess);
G4NeutronInelasticProcess* theNeutronInelasticProcess
= new G4NeutronInelasticProcess();
G4NeutronInelasticProcess* theNeutronInelasticProcess =
new G4NeutronInelasticProcess();
G4BinaryCascade* theNeutronBCModel = new G4BinaryCascade();
theNeutronBCModel->SetMaxEnergy(6.*GeV);
@@ -331,56 +322,51 @@ void RE02HadronPhysics::ConstructProcess()
theNeutronInelasticProcess->RegisterMe(theNeutronHEPModel);
pManager->AddDiscreteProcess(theNeutronInelasticProcess);
G4HadronFissionProcess* thenFission
= new G4HadronFissionProcess();
G4HadronFissionProcess* thenFission = new G4HadronFissionProcess();
G4LFission* thenFissionModel = new G4LFission();
thenFission->RegisterMe(thenFissionModel);
pManager->AddDiscreteProcess(thenFission);
G4HadronCaptureProcess* thenCapture
= new G4HadronCaptureProcess();
G4HadronCaptureProcess* thenCapture = new G4HadronCaptureProcess();
G4LCapture* thenCaptureModel = new G4LCapture();
thenCapture->RegisterMe(thenCaptureModel);
pManager->AddDiscreteProcess(thenCapture);
// anti-neutron Physics
pManager = G4AntiNeutron::AntiNeutron()->GetProcessManager();
// add process
G4HadronElasticProcess* theanElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* theanElasticProcess = new G4HadronElasticProcess();
G4LElastic* theanElasticModel = new G4LElastic();
theanElasticProcess->RegisterMe(theanElasticModel);
pManager->AddDiscreteProcess(theanElasticProcess);
G4AntiNeutronInelasticProcess* theAntiNeutronInelasticProcess
= new G4AntiNeutronInelasticProcess();
G4AntiNeutronInelasticProcess* theAntiNeutronInelasticProcess =
new G4AntiNeutronInelasticProcess();
G4LEAntiNeutronInelastic* theAntiNeutronLEPModel = new G4LEAntiNeutronInelastic();
G4HEAntiNeutronInelastic* theAntiNeutronHEPModel = new G4HEAntiNeutronInelastic();
G4LEAntiNeutronInelastic* theAntiNeutronLEPModel =
new G4LEAntiNeutronInelastic();
G4HEAntiNeutronInelastic* theAntiNeutronHEPModel =
new G4HEAntiNeutronInelastic();
theAntiNeutronInelasticProcess->RegisterMe(theAntiNeutronLEPModel);
theAntiNeutronInelasticProcess->RegisterMe(theAntiNeutronHEPModel);
pManager->AddDiscreteProcess(theAntiNeutronInelasticProcess);
G4AntiNeutronAnnihilationAtRest* theAntiNeutronAnnihilation
= new G4AntiNeutronAnnihilationAtRest();
G4AntiNeutronAnnihilationAtRest* theAntiNeutronAnnihilation =
new G4AntiNeutronAnnihilationAtRest();
pManager->AddRestProcess(theAntiNeutronAnnihilation);
// Lambda Physics
pManager = G4Lambda::Lambda()->GetProcessManager();
// add process
G4HadronElasticProcess* thel0ElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thel0ElasticProcess = new G4HadronElasticProcess();
G4LElastic* thel0ElasticModel = new G4LElastic();
thel0ElasticProcess->RegisterMe(thel0ElasticModel);
pManager->AddDiscreteProcess(thel0ElasticProcess);
G4LambdaInelasticProcess* theLambdaInelasticProcess
= new G4LambdaInelasticProcess();
G4LambdaInelasticProcess* theLambdaInelasticProcess =
new G4LambdaInelasticProcess();
G4LELambdaInelastic* theLambdaLEPModel = new G4LELambdaInelastic();
G4HELambdaInelastic* theLambdaHEPModel = new G4HELambdaInelastic();
@@ -388,39 +374,37 @@ void RE02HadronPhysics::ConstructProcess()
theLambdaInelasticProcess->RegisterMe(theLambdaHEPModel);
pManager->AddDiscreteProcess(theLambdaInelasticProcess);
// Anti-Labda Physics
pManager = G4AntiLambda::AntiLambda()->GetProcessManager();
// add process
G4HadronElasticProcess* theal0ElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* theal0ElasticProcess = new G4HadronElasticProcess();
G4LElastic* theal0ElasticModel = new G4LElastic();
theal0ElasticProcess->RegisterMe(theal0ElasticModel);
pManager->AddDiscreteProcess(theal0ElasticProcess);
G4AntiLambdaInelasticProcess* theAntiLambdaInelasticProcess
= new G4AntiLambdaInelasticProcess();
G4AntiLambdaInelasticProcess* theAntiLambdaInelasticProcess =
new G4AntiLambdaInelasticProcess();
G4LEAntiLambdaInelastic* theAntiLambdaLEPModel = new G4LEAntiLambdaInelastic();
G4HEAntiLambdaInelastic* theAntiLambdaHEPModel = new G4HEAntiLambdaInelastic();
G4LEAntiLambdaInelastic* theAntiLambdaLEPModel =
new G4LEAntiLambdaInelastic();
G4HEAntiLambdaInelastic* theAntiLambdaHEPModel =
new G4HEAntiLambdaInelastic();
theAntiLambdaInelasticProcess->RegisterMe(theAntiLambdaLEPModel);
theAntiLambdaInelasticProcess->RegisterMe(theAntiLambdaHEPModel);
pManager->AddDiscreteProcess(theAntiLambdaInelasticProcess);
// Sigma+ Physics
pManager = G4SigmaPlus::SigmaPlus()->GetProcessManager();
// add process
G4HadronElasticProcess* thespElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thespElasticProcess = new G4HadronElasticProcess();
G4LElastic* thespElasticModel = new G4LElastic();
thespElasticProcess->RegisterMe(thespElasticModel);
pManager->AddDiscreteProcess(thespElasticProcess);
G4SigmaPlusInelasticProcess* theSigmaPlusInelasticProcess
= new G4SigmaPlusInelasticProcess();
G4SigmaPlusInelasticProcess* theSigmaPlusInelasticProcess =
new G4SigmaPlusInelasticProcess();
G4LESigmaPlusInelastic* theSigmaPlusLEPModel = new G4LESigmaPlusInelastic();
G4HESigmaPlusInelastic* theSigmaPlusHEPModel = new G4HESigmaPlusInelastic();
@@ -429,134 +413,132 @@ void RE02HadronPhysics::ConstructProcess()
pManager->AddDiscreteProcess(theSigmaPlusInelasticProcess);
G4VProcess* thespMultipleScattering = new G4hMultipleScattering();
G4VProcess* thespIonisation = new G4hIonisation();
G4VProcess* thespIonisation = new G4hIonisation();
pManager->AddProcess(thespIonisation);
pManager->AddProcess(thespMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thespMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thespIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thespIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thespMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thespIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thespIonisation, idxPostStep,2);
// anti-Sigma+ Physics
pManager = G4AntiSigmaPlus::AntiSigmaPlus()->GetProcessManager();
// add process
G4HadronElasticProcess* theaspElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* theaspElasticProcess = new G4HadronElasticProcess();
G4LElastic* theaspElasticModel = new G4LElastic();
theaspElasticProcess->RegisterMe(theaspElasticModel);
pManager->AddDiscreteProcess(theaspElasticProcess);
G4AntiSigmaPlusInelasticProcess* theAntiSigmaPlusInelasticProcess
= new G4AntiSigmaPlusInelasticProcess();
G4AntiSigmaPlusInelasticProcess* theAntiSigmaPlusInelasticProcess =
new G4AntiSigmaPlusInelasticProcess();
G4LEAntiSigmaPlusInelastic* theAntiSigmaPlusLEPModel = new G4LEAntiSigmaPlusInelastic();
G4HEAntiSigmaPlusInelastic* theAntiSigmaPlusHEPModel = new G4HEAntiSigmaPlusInelastic();
G4LEAntiSigmaPlusInelastic* theAntiSigmaPlusLEPModel =
new G4LEAntiSigmaPlusInelastic();
G4HEAntiSigmaPlusInelastic* theAntiSigmaPlusHEPModel =
new G4HEAntiSigmaPlusInelastic();
theAntiSigmaPlusInelasticProcess->RegisterMe(theAntiSigmaPlusLEPModel);
theAntiSigmaPlusInelasticProcess->RegisterMe(theAntiSigmaPlusHEPModel);
pManager->AddDiscreteProcess(theAntiSigmaPlusInelasticProcess);
G4VProcess* theaspMultipleScattering = new G4hMultipleScattering();
G4VProcess* theaspIonisation = new G4hIonisation();
G4VProcess* theaspIonisation = new G4hIonisation();
pManager->AddProcess(theaspIonisation);
pManager->AddProcess(theaspMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(theaspMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(theaspIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(theaspIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(theaspMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(theaspIonisation, idxPostStep,2);
pManager->SetProcessOrdering(theaspIonisation, idxPostStep,2);
// Sigma- Physics
pManager = G4SigmaMinus::SigmaMinus()->GetProcessManager();
// add process
G4HadronElasticProcess* thesmElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thesmElasticProcess = new G4HadronElasticProcess();
G4LElastic* thesmElasticModel = new G4LElastic();
thesmElasticProcess->RegisterMe(thesmElasticModel);
pManager->AddDiscreteProcess(thesmElasticProcess);
G4SigmaMinusInelasticProcess* theSigmaMinusInelasticProcess
= new G4SigmaMinusInelasticProcess();
G4SigmaMinusInelasticProcess* theSigmaMinusInelasticProcess =
new G4SigmaMinusInelasticProcess();
G4LESigmaMinusInelastic* theSigmaMinusLEPModel = new G4LESigmaMinusInelastic();
G4HESigmaMinusInelastic* theSigmaMinusHEPModel = new G4HESigmaMinusInelastic();
G4LESigmaMinusInelastic* theSigmaMinusLEPModel =
new G4LESigmaMinusInelastic();
G4HESigmaMinusInelastic* theSigmaMinusHEPModel =
new G4HESigmaMinusInelastic();
theSigmaMinusInelasticProcess->RegisterMe(theSigmaMinusLEPModel);
theSigmaMinusInelasticProcess->RegisterMe(theSigmaMinusHEPModel);
pManager->AddDiscreteProcess(theSigmaMinusInelasticProcess);
G4VProcess* thesmMultipleScattering = new G4hMultipleScattering();
G4VProcess* thesmIonisation = new G4hIonisation();
G4VProcess* thesmIonisation = new G4hIonisation();
pManager->AddProcess(thesmIonisation);
pManager->AddProcess(thesmMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thesmMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thesmIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thesmIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thesmMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thesmIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thesmIonisation, idxPostStep,2);
// anti-Sigma- Physics
pManager = G4AntiSigmaMinus::AntiSigmaMinus()->GetProcessManager();
// add process
G4HadronElasticProcess* theasmElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* theasmElasticProcess = new G4HadronElasticProcess();
G4LElastic* theasmElasticModel = new G4LElastic();
theasmElasticProcess->RegisterMe(theasmElasticModel);
pManager->AddDiscreteProcess(theasmElasticProcess);
G4AntiSigmaMinusInelasticProcess* theAntiSigmaMinusInelasticProcess
= new G4AntiSigmaMinusInelasticProcess();
G4AntiSigmaMinusInelasticProcess* theAntiSigmaMinusInelasticProcess =
new G4AntiSigmaMinusInelasticProcess();
G4LEAntiSigmaMinusInelastic* theAntiSigmaMinusLEPModel = new G4LEAntiSigmaMinusInelastic();
G4HEAntiSigmaMinusInelastic* theAntiSigmaMinusHEPModel = new G4HEAntiSigmaMinusInelastic();
G4LEAntiSigmaMinusInelastic* theAntiSigmaMinusLEPModel =
new G4LEAntiSigmaMinusInelastic();
G4HEAntiSigmaMinusInelastic* theAntiSigmaMinusHEPModel =
new G4HEAntiSigmaMinusInelastic();
theAntiSigmaMinusInelasticProcess->RegisterMe(theAntiSigmaMinusLEPModel);
theAntiSigmaMinusInelasticProcess->RegisterMe(theAntiSigmaMinusHEPModel);
pManager->AddDiscreteProcess(theAntiSigmaMinusInelasticProcess);
G4VProcess* theasmMultipleScattering = new G4hMultipleScattering();
G4VProcess* theasmIonisation = new G4hIonisation();
G4VProcess* theasmIonisation = new G4hIonisation();
pManager->AddProcess(theasmIonisation);
pManager->AddProcess(theasmMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(theasmMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(theasmIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(theasmIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(theasmMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(theasmIonisation, idxPostStep,2);
pManager->SetProcessOrdering(theasmIonisation, idxPostStep,2);
// Xi0 Physics
pManager = G4XiZero::XiZero()->GetProcessManager();
// add process
G4HadronElasticProcess* thex0ElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thex0ElasticProcess = new G4HadronElasticProcess();
G4LElastic* thex0ElasticModel = new G4LElastic();
thex0ElasticProcess->RegisterMe(thex0ElasticModel);
pManager->AddDiscreteProcess(thex0ElasticProcess);
G4XiZeroInelasticProcess* theXiZeroInelasticProcess
= new G4XiZeroInelasticProcess();
G4XiZeroInelasticProcess* theXiZeroInelasticProcess =
new G4XiZeroInelasticProcess();
G4LEXiZeroInelastic* theXiZeroLEPModel = new G4LEXiZeroInelastic();
G4HEXiZeroInelastic* theXiZeroHEPModel = new G4HEXiZeroInelastic();
@@ -564,39 +546,37 @@ void RE02HadronPhysics::ConstructProcess()
theXiZeroInelasticProcess->RegisterMe(theXiZeroHEPModel);
pManager->AddDiscreteProcess(theXiZeroInelasticProcess);
// Anti-Xi0 Physics
pManager = G4AntiXiZero::AntiXiZero()->GetProcessManager();
// add process
G4HadronElasticProcess* theax0ElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* theax0ElasticProcess = new G4HadronElasticProcess();
G4LElastic* theax0ElasticModel = new G4LElastic();
theax0ElasticProcess->RegisterMe(theax0ElasticModel);
pManager->AddDiscreteProcess(theax0ElasticProcess);
G4AntiXiZeroInelasticProcess* theAntiXiZeroInelasticProcess
= new G4AntiXiZeroInelasticProcess();
G4AntiXiZeroInelasticProcess* theAntiXiZeroInelasticProcess =
new G4AntiXiZeroInelasticProcess();
G4LEAntiXiZeroInelastic* theAntiXiZeroLEPModel = new G4LEAntiXiZeroInelastic();
G4HEAntiXiZeroInelastic* theAntiXiZeroHEPModel = new G4HEAntiXiZeroInelastic();
G4LEAntiXiZeroInelastic* theAntiXiZeroLEPModel =
new G4LEAntiXiZeroInelastic();
G4HEAntiXiZeroInelastic* theAntiXiZeroHEPModel =
new G4HEAntiXiZeroInelastic();
theAntiXiZeroInelasticProcess->RegisterMe(theAntiXiZeroLEPModel);
theAntiXiZeroInelasticProcess->RegisterMe(theAntiXiZeroHEPModel);
pManager->AddDiscreteProcess(theAntiXiZeroInelasticProcess);
// Xi- Physics
pManager = G4XiMinus::XiMinus()->GetProcessManager();
// add process
G4HadronElasticProcess* thexmElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* thexmElasticProcess = new G4HadronElasticProcess();
G4LElastic* thexmElasticModel = new G4LElastic();
thexmElasticProcess->RegisterMe(thexmElasticModel);
pManager->AddDiscreteProcess(thexmElasticProcess);
G4XiMinusInelasticProcess* theXiMinusInelasticProcess
= new G4XiMinusInelasticProcess();
G4XiMinusInelasticProcess* theXiMinusInelasticProcess =
new G4XiMinusInelasticProcess();
G4LEXiMinusInelastic* theXiMinusLEPModel = new G4LEXiMinusInelastic();
G4HEXiMinusInelastic* theXiMinusHEPModel = new G4HEXiMinusInelastic();
@@ -605,119 +585,119 @@ void RE02HadronPhysics::ConstructProcess()
pManager->AddDiscreteProcess(theXiMinusInelasticProcess);
G4VProcess* thexmMultipleScattering = new G4hMultipleScattering();
G4VProcess* thexmIonisation = new G4hIonisation();
G4VProcess* thexmIonisation = new G4hIonisation();
pManager->AddProcess(thexmIonisation);
pManager->AddProcess(thexmMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thexmMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thexmIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thexmIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thexmMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thexmIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thexmIonisation, idxPostStep,2);
// anti-Xi- Physics
pManager = G4AntiXiMinus::AntiXiMinus()->GetProcessManager();
// add process
G4HadronElasticProcess* theaxmElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* theaxmElasticProcess = new G4HadronElasticProcess();
G4LElastic* theaxmElasticModel = new G4LElastic();
theaxmElasticProcess->RegisterMe(theaxmElasticModel);
pManager->AddDiscreteProcess(theaxmElasticProcess);
G4AntiXiMinusInelasticProcess* theAntiXiMinusInelasticProcess
= new G4AntiXiMinusInelasticProcess();
G4AntiXiMinusInelasticProcess* theAntiXiMinusInelasticProcess =
new G4AntiXiMinusInelasticProcess();
G4LEAntiXiMinusInelastic* theAntiXiMinusLEPModel = new G4LEAntiXiMinusInelastic();
G4HEAntiXiMinusInelastic* theAntiXiMinusHEPModel = new G4HEAntiXiMinusInelastic();
G4LEAntiXiMinusInelastic* theAntiXiMinusLEPModel =
new G4LEAntiXiMinusInelastic();
G4HEAntiXiMinusInelastic* theAntiXiMinusHEPModel =
new G4HEAntiXiMinusInelastic();
theAntiXiMinusInelasticProcess->RegisterMe(theAntiXiMinusLEPModel);
theAntiXiMinusInelasticProcess->RegisterMe(theAntiXiMinusHEPModel);
pManager->AddDiscreteProcess(theAntiXiMinusInelasticProcess);
G4VProcess* theaxmMultipleScattering = new G4hMultipleScattering();
G4VProcess* theaxmIonisation = new G4hIonisation();
G4VProcess* theaxmIonisation = new G4hIonisation();
pManager->AddProcess(theaxmIonisation);
pManager->AddProcess(theaxmMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(theaxmMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(theaxmIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(theaxmIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(theaxmMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(theaxmIonisation, idxPostStep,2);
pManager->SetProcessOrdering(theaxmIonisation, idxPostStep,2);
// Omega- Physics
pManager = G4OmegaMinus::OmegaMinus()->GetProcessManager();
// add process
G4HadronElasticProcess* theomElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* theomElasticProcess = new G4HadronElasticProcess();
G4LElastic* theomElasticModel = new G4LElastic();
theomElasticProcess->RegisterMe(theomElasticModel);
pManager->AddDiscreteProcess(theomElasticProcess);
G4OmegaMinusInelasticProcess* theOmegaMinusInelasticProcess
= new G4OmegaMinusInelasticProcess();
G4OmegaMinusInelasticProcess* theOmegaMinusInelasticProcess =
new G4OmegaMinusInelasticProcess();
G4LEOmegaMinusInelastic* theOmegaMinusLEPModel = new G4LEOmegaMinusInelastic();
G4HEOmegaMinusInelastic* theOmegaMinusHEPModel = new G4HEOmegaMinusInelastic();
G4LEOmegaMinusInelastic* theOmegaMinusLEPModel =
new G4LEOmegaMinusInelastic();
G4HEOmegaMinusInelastic* theOmegaMinusHEPModel =
new G4HEOmegaMinusInelastic();
theOmegaMinusInelasticProcess->RegisterMe(theOmegaMinusLEPModel);
theOmegaMinusInelasticProcess->RegisterMe(theOmegaMinusHEPModel);
pManager->AddDiscreteProcess(theOmegaMinusInelasticProcess);
G4VProcess* theomMultipleScattering = new G4hMultipleScattering();
G4VProcess* theomIonisation = new G4hIonisation();
G4VProcess* theomIonisation = new G4hIonisation();
pManager->AddProcess(theomIonisation);
pManager->AddProcess(theomMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(theomMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(theomIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(theomIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(theomMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(theomIonisation, idxPostStep,2);
pManager->SetProcessOrdering(theomIonisation, idxPostStep,2);
// anti-Omega- Physics
pManager = G4AntiOmegaMinus::AntiOmegaMinus()->GetProcessManager();
// add process
G4HadronElasticProcess* theaomElasticProcess
= new G4HadronElasticProcess();
G4HadronElasticProcess* theaomElasticProcess = new G4HadronElasticProcess();
G4LElastic* theaomElasticModel = new G4LElastic();
theaomElasticProcess->RegisterMe(theaomElasticModel);
pManager->AddDiscreteProcess(theaomElasticProcess);
G4AntiOmegaMinusInelasticProcess* theAntiOmegaMinusInelasticProcess
= new G4AntiOmegaMinusInelasticProcess();
G4AntiOmegaMinusInelasticProcess* theAntiOmegaMinusInelasticProcess =
new G4AntiOmegaMinusInelasticProcess();
G4LEAntiOmegaMinusInelastic* theAntiOmegaMinusLEPModel = new G4LEAntiOmegaMinusInelastic();
G4HEAntiOmegaMinusInelastic* theAntiOmegaMinusHEPModel = new G4HEAntiOmegaMinusInelastic();
G4LEAntiOmegaMinusInelastic* theAntiOmegaMinusLEPModel =
new G4LEAntiOmegaMinusInelastic();
G4HEAntiOmegaMinusInelastic* theAntiOmegaMinusHEPModel =
new G4HEAntiOmegaMinusInelastic();
theAntiOmegaMinusInelasticProcess->RegisterMe(theAntiOmegaMinusLEPModel);
theAntiOmegaMinusInelasticProcess->RegisterMe(theAntiOmegaMinusHEPModel);
pManager->AddDiscreteProcess(theAntiOmegaMinusInelasticProcess);
G4VProcess* theaomMultipleScattering = new G4hMultipleScattering();
G4VProcess* theaomIonisation = new G4hIonisation();
G4VProcess* theaomIonisation = new G4hIonisation();
pManager->AddProcess(theaomIonisation);
pManager->AddProcess(theaomMultipleScattering);
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(theaomMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(theaomIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(theaomIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(theaomMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(theaomIonisation, idxPostStep,2);
pManager->SetProcessOrdering(theaomIonisation, idxPostStep,2);
}
@@ -23,7 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RE02IonPhysics.cc,v 1.3 2010-04-07 01:29:00 asaim Exp $
/// \file runAndEvent/RE02/src/RE02IonPhysics.cc
/// \brief Implementation of the RE02IonPhysics class
//
// $Id$
// --------------------------------------------------------------
//
// 13-Oct-2003 Add Comment for Ionisation of Generic Ion by T. Koi
@@ -38,12 +41,13 @@
#include "G4ios.hh"
#include <iomanip>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02IonPhysics::RE02IonPhysics(const G4String& name)
: G4VPhysicsConstructor(name)
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02IonPhysics::~RE02IonPhysics()
{
}
@@ -52,13 +56,13 @@ RE02IonPhysics::~RE02IonPhysics()
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
#include "G4HadronElastic.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE02IonPhysics::ConstructProcess()
{
G4ProcessManager * pManager = 0;
// Generic Ion
pManager = G4GenericIon::GenericIon()->GetProcessManager();
@@ -87,132 +91,116 @@ void RE02IonPhysics::ConstructProcess()
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thegionMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thegionIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thegionIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thegionMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thegionIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thegionIonisation, idxPostStep,2);
// Deuteron
pManager = G4Deuteron::Deuteron()->GetProcessManager();
// add process
G4HadronElasticProcess* thedueElasticProcess
= new G4HadronElasticProcess();
G4LElastic* thedueElasticModel = new G4LElastic();
thedueElasticProcess->RegisterMe(thedueElasticModel);
G4HadronElasticProcess* thedueElasticProcess = new G4HadronElasticProcess();
thedueElasticProcess->RegisterMe(new G4HadronElastic());
pManager->AddDiscreteProcess(thedueElasticProcess);
G4DeuteronInelasticProcess* theDeuteronInelasticProcess
= new G4DeuteronInelasticProcess();
G4DeuteronInelasticProcess* theDeuteronInelasticProcess =
new G4DeuteronInelasticProcess();
G4LEDeuteronInelastic* theDeuteronLEPModel = new G4LEDeuteronInelastic();
theDeuteronInelasticProcess->RegisterMe(theDeuteronLEPModel);
pManager->AddDiscreteProcess(theDeuteronInelasticProcess);
G4VProcess* thedueMultipleScattering = new G4hMultipleScattering();
G4VProcess* thedueIonisation = new G4hIonisation();
G4VProcess* thedueIonisation = new G4hIonisation();
//
pManager->AddProcess(thedueIonisation);
pManager->AddProcess(thedueMultipleScattering);
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thedueMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thedueIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thedueIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thedueMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thedueIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thedueIonisation, idxPostStep,2);
// Triton
pManager = G4Triton::Triton()->GetProcessManager();
// add process
G4HadronElasticProcess* thetriElasticProcess
= new G4HadronElasticProcess();
G4LElastic* thetriElasticModel = new G4LElastic();
thetriElasticProcess->RegisterMe(thetriElasticModel);
G4HadronElasticProcess* thetriElasticProcess = new G4HadronElasticProcess();
thetriElasticProcess->RegisterMe(new G4HadronElastic());
pManager->AddDiscreteProcess(thetriElasticProcess);
G4TritonInelasticProcess* theTritonInelasticProcess
= new G4TritonInelasticProcess();
G4TritonInelasticProcess* theTritonInelasticProcess =
new G4TritonInelasticProcess();
G4LETritonInelastic* theTritonLEPModel = new G4LETritonInelastic();
theTritonInelasticProcess->RegisterMe(theTritonLEPModel);
pManager->AddDiscreteProcess(theTritonInelasticProcess);
G4VProcess* thetriMultipleScattering = new G4hMultipleScattering();
G4VProcess* thetriIonisation = new G4hIonisation();
G4VProcess* thetriIonisation = new G4hIonisation();
//
pManager->AddProcess(thetriIonisation);
pManager->AddProcess(thetriMultipleScattering);
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thetriMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thetriIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thetriIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thetriMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thetriIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thetriIonisation, idxPostStep,2);
// Alpha
pManager = G4Alpha::Alpha()->GetProcessManager();
// add processes
G4HadronElasticProcess* thealElasticProcess
= new G4HadronElasticProcess();
G4LElastic* thealElasticModel = new G4LElastic();
thealElasticProcess->RegisterMe(thealElasticModel);
G4HadronElasticProcess* thealElasticProcess = new G4HadronElasticProcess();
thealElasticProcess->RegisterMe(new G4HadronElastic());
pManager->AddDiscreteProcess(thealElasticProcess);
G4AlphaInelasticProcess* theAlphaInelasticProcess
= new G4AlphaInelasticProcess();
G4AlphaInelasticProcess* theAlphaInelasticProcess =
new G4AlphaInelasticProcess();
G4LEAlphaInelastic* theAlphaLEPModel = new G4LEAlphaInelastic();
theAlphaInelasticProcess->RegisterMe(theAlphaLEPModel);
pManager->AddDiscreteProcess(theAlphaInelasticProcess);
G4VProcess* thealpMultipleScattering = new G4hMultipleScattering();
G4VProcess* thealpIonisation = new G4hIonisation();
G4VProcess* thealpIonisation = new G4hIonisation();
//
pManager->AddProcess(thealpIonisation);
pManager->AddProcess(thealpMultipleScattering);
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thealpMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thealpIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thealpIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thealpMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thealpIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thealpIonisation, idxPostStep,2);
// He3
pManager = G4He3::He3()->GetProcessManager();
// add processes
G4HadronElasticProcess* thehe3ElasticProcess
= new G4HadronElasticProcess();
G4LElastic* thehe3ElasticModel = new G4LElastic();
thehe3ElasticProcess->RegisterMe(thehe3ElasticModel);
pManager->AddDiscreteProcess(thehe3ElasticProcess);
G4VProcess* thehe3MultipleScattering = new G4hMultipleScattering();
G4VProcess* thehe3Ionisation = new G4hIonisation();
G4VProcess* thehe3Ionisation = new G4hIonisation();
//
pManager->AddProcess(thehe3Ionisation);
pManager->AddProcess(thehe3MultipleScattering);
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thehe3MultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thehe3Ionisation, idxAlongStep,2);
pManager->SetProcessOrdering(thehe3Ionisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thehe3MultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thehe3Ionisation, idxPostStep,2);
pManager->SetProcessOrdering(thehe3Ionisation, idxPostStep,2);
}
@@ -23,7 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RE02MuonPhysics.cc,v 1.3 2010-04-07 01:29:00 asaim Exp $
/// \file runAndEvent/RE02/src/RE02MuonPhysics.cc
/// \brief Implementation of the RE02MuonPhysics class
//
// $Id$
// --------------------------------------------------------------
//
// 09-Oct-2003 mu+- tau+- processes are changed by T. Koi
@@ -35,12 +38,13 @@
#include "G4ios.hh"
#include <iomanip>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02MuonPhysics::RE02MuonPhysics(const G4String& name)
: G4VPhysicsConstructor(name)
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02MuonPhysics::~RE02MuonPhysics()
{
}
@@ -55,6 +59,7 @@ RE02MuonPhysics::~RE02MuonPhysics()
#include "G4ProcessManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE02MuonPhysics::ConstructProcess()
{
G4ProcessManager * pManager = 0;
@@ -64,7 +69,7 @@ void RE02MuonPhysics::ConstructProcess()
G4VProcess* thempMultipleScattering = new G4MuMultipleScattering();
G4VProcess* thempBremsstrahlung = new G4MuBremsstrahlung();
G4VProcess* thempPairProduction = new G4MuPairProduction();
G4VProcess* thempIonisation = new G4MuIonisation();
G4VProcess* thempIonisation = new G4MuIonisation();
//
// add processes
pManager->AddProcess(thempIonisation);
@@ -74,13 +79,13 @@ void RE02MuonPhysics::ConstructProcess()
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thempMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thempIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thempIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thempBremsstrahlung, idxAlongStep,3);
pManager->SetProcessOrdering(thempPairProduction, idxAlongStep,4);
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thempMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thempIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thempIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thempBremsstrahlung, idxPostStep,3);
pManager->SetProcessOrdering(thempPairProduction, idxPostStep,4);
@@ -89,7 +94,7 @@ void RE02MuonPhysics::ConstructProcess()
G4VProcess* themmMultipleScattering = new G4MuMultipleScattering();
G4VProcess* themmBremsstrahlung = new G4MuBremsstrahlung();
G4VProcess* themmPairProduction = new G4MuPairProduction();
G4VProcess* themmIonisation = new G4MuIonisation();
G4VProcess* themmIonisation = new G4MuIonisation();
//
// add processes
pManager->AddProcess(themmIonisation);
@@ -99,19 +104,19 @@ void RE02MuonPhysics::ConstructProcess()
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(themmMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(themmIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(themmIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(themmBremsstrahlung, idxAlongStep,3);
pManager->SetProcessOrdering(themmPairProduction, idxAlongStep,4);
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(themmMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(themmIonisation, idxPostStep,2);
pManager->SetProcessOrdering(themmIonisation, idxPostStep,2);
pManager->SetProcessOrdering(themmBremsstrahlung, idxPostStep,3);
pManager->SetProcessOrdering(themmPairProduction, idxPostStep,4);
// Tau+ Physics
pManager = G4TauPlus::TauPlus()->GetProcessManager();
G4VProcess* thetpMultipleScattering = new G4hMultipleScattering();
G4VProcess* thetpIonisation = new G4hIonisation();
G4VProcess* thetpIonisation = new G4hIonisation();
//
// add processes
pManager->AddProcess(thetpIonisation);
@@ -119,16 +124,16 @@ void RE02MuonPhysics::ConstructProcess()
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thetpMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thetpIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thetpIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thetpMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thetpIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thetpIonisation, idxPostStep,2);
// Tau- Physics
pManager = G4TauMinus::TauMinus()->GetProcessManager();
G4VProcess* thetmMultipleScattering = new G4hMultipleScattering();
G4VProcess* thetmIonisation = new G4hIonisation();
G4VProcess* thetmIonisation = new G4hIonisation();
//
// add processes
pManager->AddProcess(thetmIonisation);
@@ -136,10 +141,10 @@ void RE02MuonPhysics::ConstructProcess()
//
// set ordering for AlongStepDoIt
pManager->SetProcessOrdering(thetmMultipleScattering, idxAlongStep,1);
pManager->SetProcessOrdering(thetmIonisation, idxAlongStep,2);
pManager->SetProcessOrdering(thetmIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pManager->SetProcessOrdering(thetmMultipleScattering, idxPostStep,1);
pManager->SetProcessOrdering(thetmIonisation, idxPostStep,2);
pManager->SetProcessOrdering(thetmIonisation, idxPostStep,2);
}
@@ -23,6 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02NestedPhantomParameterisation.cc
/// \brief Implementation of the RE02NestedPhantomParameterisation class
//
// $Id: $
//
///////////////////////////////////////////////////////////////////////////////
#include "RE02NestedPhantomParameterisation.hh"
@@ -43,16 +48,20 @@
// T.Aso Created. Nov.2007.
//
////////////////////////////////////////////////////////////////////
RE02NestedPhantomParameterisation::RE02NestedPhantomParameterisation(
const G4ThreeVector& voxelSize,
G4int nz,
std::vector<G4Material*>& mat):
G4VNestedParameterisation(),fdX(voxelSize.x()),fdY(voxelSize.y()),fdZ(voxelSize.z()),
fNz(nz),fmat(mat)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02NestedPhantomParameterisation
::RE02NestedPhantomParameterisation(const G4ThreeVector& voxelSize,
G4int nz,
std::vector<G4Material*>& mat):
G4VNestedParameterisation(),
fdX(voxelSize.x()),fdY(voxelSize.y()),fdZ(voxelSize.z()),
fNz(nz),fMat(mat)
{
// Position of voxels.
// x and y positions are already defined in DetectorConstruction
// by using replicated volume. Here only we need to define is z positions of voxles.
// by using replicated volume. Here only we need to define is z positions
// of voxles.
fpZ.clear();
G4double zp;
for ( G4int iz = 0; iz < fNz; iz++){
@@ -62,18 +71,21 @@ RE02NestedPhantomParameterisation::RE02NestedPhantomParameterisation(
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02NestedPhantomParameterisation::~RE02NestedPhantomParameterisation(){
fpZ.clear();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// Material assignment to geometry.
//
G4Material* RE02NestedPhantomParameterisation::ComputeMaterial(G4VPhysicalVolume* /*currentVol*/,
const G4int copyNo,
const G4VTouchable* parentTouch)
G4Material* RE02NestedPhantomParameterisation
::ComputeMaterial(G4VPhysicalVolume* /*currentVol*/, const G4int copyNo,
const G4VTouchable* parentTouch)
{
if(parentTouch==0) return fmat[0]; // protection for initialization and vis at idle state
if(parentTouch==0) return fMat[0]; // protection for initialization and
// vis at idle state
// Copy number of voxels.
// Copy number of X and Y are obtained from replication number.
// Copy nymber of Z is the copy number of current voxel.
@@ -82,43 +94,46 @@ G4Material* RE02NestedPhantomParameterisation::ComputeMaterial(G4VPhysicalVolume
G4int iz = copyNo;
// For demonstration purpose,a couple of materials are chosen alternately.
G4Material* mat=0;
if ( ix%2 == 0 && iy%2 == 0 && iz%2 == 0 ) mat = fmat[0];
else mat = fmat[1];
if ( ix%2 == 0 && iy%2 == 0 && iz%2 == 0 ) mat = fMat[0];
else mat = fMat[1];
return mat;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// Number of Materials
// Material scanner is required for preparing physics tables and so on before
// stating simulation, so that G4 has to know number of materials.
G4int RE02NestedPhantomParameterisation::GetNumberOfMaterials() const{
return fmat.size();
G4int RE02NestedPhantomParameterisation::GetNumberOfMaterials() const{
return fMat.size();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// GetMaterial
// This is needed for material scanner and realizing geometry.
//
G4Material* RE02NestedPhantomParameterisation::GetMaterial(G4int i) const{
return fmat[i];
return fMat[i];
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// Transformation of voxels.
//
void RE02NestedPhantomParameterisation::ComputeTransformation(const G4int copyNo,
G4VPhysicalVolume* physVol)const{
void RE02NestedPhantomParameterisation
::ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const{
G4ThreeVector position(0.,0.,fpZ[copyNo]);
physVol->SetTranslation(position);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// Dimensions are always same in this RE02 example.
//
void RE02NestedPhantomParameterisation::ComputeDimensions(G4Box& box,
const G4int ,
const G4VPhysicalVolume* ) const{
void RE02NestedPhantomParameterisation
::ComputeDimensions(G4Box& box, const G4int, const G4VPhysicalVolume* ) const{
box.SetXHalfLength(fdX);
box.SetYHalfLength(fdY);
box.SetZHalfLength(fdZ);
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02PSCellFlux.cc
/// \brief Implementation of the RE02PSCellFlux class
//
// $Id: RE02PSCellFlux.cc,v 1.3 2007-05-18 18:16:28 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
// RE02PSCellFlux
#include "RE02PSCellFlux.hh"
@@ -55,13 +57,16 @@
//
///////////////////////////////////////////////////////////////////////////////
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSCellFlux::RE02PSCellFlux(G4String name,G4int nx, G4int ny, G4int nz)
:G4PSCellFlux(name),fNx(nx),fNy(ny),fNz(nz)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSCellFlux::~RE02PSCellFlux()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4int RE02PSCellFlux::GetIndex(G4Step* aStep)
{
const G4VTouchable* touchable = aStep->GetPreStepPoint()->GetTouchable();
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02PSEnergyDeposit.cc
/// \brief Implementation of the RE02PSEnergyDeposit class
//
// $Id: RE02PSEnergyDeposit.cc,v 1.3 2007-05-18 18:16:28 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
// RE02PSEnergyDeposit
#include "RE02PSEnergyDeposit.hh"
@@ -55,13 +57,17 @@
//
///////////////////////////////////////////////////////////////////////////////
RE02PSEnergyDeposit::RE02PSEnergyDeposit(G4String name,G4int nx, G4int ny, G4int nz)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSEnergyDeposit::RE02PSEnergyDeposit(G4String name,
G4int nx, G4int ny, G4int nz)
:G4PSEnergyDeposit(name),fNx(nx),fNy(ny),fNz(nz)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSEnergyDeposit::~RE02PSEnergyDeposit()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4int RE02PSEnergyDeposit::GetIndex(G4Step* aStep)
{
const G4VTouchable* touchable = aStep->GetPreStepPoint()->GetTouchable();
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02PSFlatSurfaceCurrent.cc
/// \brief Implementation of the RE02PSFlatSurfaceCurrent class
//
// $Id: RE02PSFlatSurfaceCurrent.cc,v 1.3 2007-05-18 18:16:28 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
// RE02PSFlatSurfaceCurrent
#include "RE02PSFlatSurfaceCurrent.hh"
@@ -55,14 +57,18 @@
//
///////////////////////////////////////////////////////////////////////////////
RE02PSFlatSurfaceCurrent::RE02PSFlatSurfaceCurrent(G4String name, G4int direction,
G4int nx, G4int ny, G4int nz)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSFlatSurfaceCurrent::RE02PSFlatSurfaceCurrent(G4String name,
G4int direction,
G4int nx, G4int ny, G4int nz)
:G4PSFlatSurfaceCurrent(name,direction),fNx(nx),fNy(ny),fNz(nz)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSFlatSurfaceCurrent::~RE02PSFlatSurfaceCurrent()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4int RE02PSFlatSurfaceCurrent::GetIndex(G4Step* aStep)
{
const G4VTouchable* touchable = aStep->GetPreStepPoint()->GetTouchable();
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02PSFlatSurfaceFlux.cc
/// \brief Implementation of the RE02PSFlatSurfaceFlux class
//
// $Id: RE02PSFlatSurfaceFlux.cc,v 1.3 2007-05-18 18:16:28 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
// RE02PSFlatSurfaceFlux
#include "RE02PSFlatSurfaceFlux.hh"
@@ -55,14 +57,17 @@
//
///////////////////////////////////////////////////////////////////////////////
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSFlatSurfaceFlux::RE02PSFlatSurfaceFlux(G4String name, G4int direction,
G4int nx, G4int ny, G4int nz)
G4int nx, G4int ny, G4int nz)
:G4PSFlatSurfaceFlux(name,direction),fNx(nx),fNy(ny),fNz(nz)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSFlatSurfaceFlux::~RE02PSFlatSurfaceFlux()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4int RE02PSFlatSurfaceFlux::GetIndex(G4Step* aStep)
{
const G4VTouchable* touchable = aStep->GetPreStepPoint()->GetTouchable();
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02PSNofStep.cc
/// \brief Implementation of the RE02PSNofStep class
//
// $Id: RE02PSNofStep.cc,v 1.3 2007-05-18 18:16:28 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
// RE02PSNofStep
#include "RE02PSNofStep.hh"
@@ -55,13 +57,16 @@
//
///////////////////////////////////////////////////////////////////////////////
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSNofStep::RE02PSNofStep(G4String name,G4int nx, G4int ny, G4int nz)
:G4PSNofStep(name),fNx(nx),fNy(ny),fNz(nz)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSNofStep::~RE02PSNofStep()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4int RE02PSNofStep::GetIndex(G4Step* aStep)
{
const G4VTouchable* touchable = aStep->GetPreStepPoint()->GetTouchable();
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02PSPassageCellFlux.cc
/// \brief Implementation of the RE02PSPassageCellFlux class
//
// $Id: RE02PSPassageCellFlux.cc,v 1.3 2007-05-18 18:16:28 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
// RE02PSPassageCellFlux
#include "RE02PSPassageCellFlux.hh"
@@ -55,13 +57,17 @@
//
///////////////////////////////////////////////////////////////////////////////
RE02PSPassageCellFlux::RE02PSPassageCellFlux(G4String name,G4int nx, G4int ny, G4int nz)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSPassageCellFlux::RE02PSPassageCellFlux(G4String name,
G4int nx, G4int ny, G4int nz)
:G4PSPassageCellFlux(name),fNx(nx),fNy(ny),fNz(nz)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PSPassageCellFlux::~RE02PSPassageCellFlux()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4int RE02PSPassageCellFlux::GetIndex(G4Step* aStep)
{
const G4VTouchable* touchable = aStep->GetPreStepPoint()->GetTouchable();
@@ -23,7 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RE02PhysicsList.cc,v 1.2 2006-06-29 17:45:29 gunter Exp $
/// \file runAndEvent/RE02/src/RE02PhysicsList.cc
/// \brief Implementation of the RE02PhysicsList class
//
// $Id$
// --------------------------------------------------------------
//
// 28-Jan-04 Add QGSP_BERT and QGSP_BIC for hadronic lists. T. Koi
@@ -34,6 +37,7 @@
#include "RE02PhysicsList.hh"
#include "globals.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
@@ -55,24 +59,28 @@
//#include "HadronPhysicsQGSP_BERT.hh"
//#include "HadronPhysicsQGSP_BIC.hh"
RE02PhysicsList::RE02PhysicsList(): G4VModularPhysicsList()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PhysicsList::RE02PhysicsList() : G4VModularPhysicsList()
{
G4cout << "You are using the RE02PhysicsList" << G4endl;
G4cout << "This PhysicsList originally comes from "<<G4endl;
G4cout << "example/extended/analysis/A01, and is modified "<<G4endl;
G4cout << "in Hadron Physics in order to involve Binary Cascade" << G4endl;
G4cout << "at low energy region and inelastic process for generic ions. "<<G4endl;
G4cout << "Full set of particles (barions bosons and mesons) will be created and" << G4endl;
G4cout << "Standard EM Physics and Low & High Energy parameterized models will be applied." << G4endl;
G4cout << "RE02PhysicsList is optimized for robustness" << G4endl;
G4cout << "and not for any particular usage." << G4endl;
G4cout << "For the hadronic physics, educated guesses of physics list are prepared for various use cases." << G4endl;
G4cout << "When you will start REAL calculations for your own interest," << G4endl;
G4cout << "please consider the usage of hadronic_lists instead of RE02PhysicsLists." << G4endl;
G4cout << "More information can also be found from the Geant4 HyperNews." << G4endl;
G4cout << "http://geant4-hn.slac.stanford.edu:5090/Geant4-HyperNews/index" << G4endl;
G4cout << "" << G4endl;
G4cout
<< "You are using the RE02PhysicsList\n"
<< "This PhysicsList originally comes from example/extended/analysis/A01,\n"
<< "and is modified in Hadron Physics in order to involve Binary Cascade\n"
<< "at low energy region and inelastic process for generic ions.\n"
<< "Full set of particles (barions bosons and mesons) will be created and\n"
<< "Standard EM Physics and Low & High Energy parameterized models will be "
<< "applied.\n"
<< "RE02PhysicsList is optimized for robustness and not for any particular "
<< "usage.\n"
<< "For the hadronic physics, educated guesses of physics list are "
<< "prepared\n"
<< "for various use cases.\n"
<< "When you will start REAL calculations for your own interest, please\n"
<< "consider the usage of hadronic_lists instead of RE02PhysicsLists.\n"
<< "More information can also be found from the Geant4 HyperNews.\n"
<< "http://geant4-hn.slac.stanford.edu:5090/Geant4-HyperNews/index\n"
<< G4endl;
// default cut value (1.0mm)
defaultCutValue = 1.0*mm;
@@ -89,7 +97,7 @@ RE02PhysicsList::RE02PhysicsList(): G4VModularPhysicsList()
// Hadron Physics ( Apply related processes to hadrons )
RegisterPhysics( new RE02HadronPhysics("hadron"));
// We do not use hadronic lists since v7.
// We do not use hadronic lists since v7.
//RegisterPhysics( new HadronPhysicsQGSP_BERT("hadron"));
//RegisterPhysics( new HadronPhysicsQGSP_BIC("hadron"));
@@ -98,10 +106,12 @@ RE02PhysicsList::RE02PhysicsList(): G4VModularPhysicsList()
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE02PhysicsList::~RE02PhysicsList()
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE02PhysicsList::SetCuts()
{
// " G4VUserPhysicsList::SetCutsWithDefault" method sets
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02PrimaryGeneratorAction.cc
/// \brief Implementation of the RE02PrimaryGeneratorAction class
//
// $Id: RE02PrimaryGeneratorAction.cc,v 1.3 2006-11-18 01:37:24 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
#include "RE02PrimaryGeneratorAction.hh"
@@ -36,45 +38,50 @@
#include "G4ParticleDefinition.hh"
#include "Randomize.hh"
#include "globals.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
RE02PrimaryGeneratorAction::RE02PrimaryGeneratorAction()
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
fParticleGun = new G4ParticleGun(n_particle);
// default particle
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4ParticleDefinition* particle = particleTable->FindParticle("proton");
particleGun->SetParticleDefinition(particle);
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0,0.0,1.));
particleGun->SetParticleEnergy(150.0*MeV);
fParticleGun->SetParticleDefinition(particle);
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.0,0.0,1.));
fParticleGun->SetParticleEnergy(150.0*MeV);
//
// default beam position
G4double position = -200./2.*cm;
//
// Initial beam spot size in sigma.; This is not a part of ParticleGun.
fsigmaPosition = 10.* mm;
fSigmaPosition = 10.* mm;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
particleGun->SetParticlePosition(G4ThreeVector(0.*cm, 0.*cm, position));
fParticleGun->SetParticlePosition(G4ThreeVector(0.*cm, 0.*cm, position));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
RE02PrimaryGeneratorAction::~RE02PrimaryGeneratorAction()
{
delete particleGun;
delete fParticleGun;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
void RE02PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
G4ThreeVector position = particleGun->GetParticlePosition();
G4double dx = (G4UniformRand()-0.5)*fsigmaPosition;
G4double dy = (G4UniformRand()-0.5)*fsigmaPosition;
G4ThreeVector position = fParticleGun->GetParticlePosition();
G4double dx = (G4UniformRand()-0.5)*fSigmaPosition;
G4double dy = (G4UniformRand()-0.5)*fSigmaPosition;
position.setX(dx);
position.setY(dy);
particleGun->SetParticlePosition(position);
particleGun->GeneratePrimaryVertex(anEvent);
fParticleGun->SetParticlePosition(position);
fParticleGun->GeneratePrimaryVertex(anEvent);
}
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02Run.cc
/// \brief Implementation of the RE02Run class
//
// $Id: RE02Run.cc,v 1.3 2006-11-18 01:37:24 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
//=====================================================================
@@ -46,9 +48,9 @@
//
// The resultant information is kept inside RE02Run objects as
// data members.
// std::vector<G4String> theCollName; // Collection Name,
// std::vector<G4int> theCollID; // Collection ID,
// std::vector<G4THitsMap<G4double>*> theRunMap; // HitsMap for RUN.
// std::vector<G4String> fCollName; // Collection Name,
// std::vector<G4int> fCollID; // Collection ID,
// std::vector<G4THitsMap<G4double>*> fRunMap; // HitsMap for RUN.
//
// The resualtant HitsMap objects are obtain using access method,
// GetHitsMap(..).
@@ -61,65 +63,70 @@
#include "G4MultiFunctionalDetector.hh"
#include "G4VPrimitiveScorer.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// Constructor.
// (The vector of MultiFunctionalDetector name has to given.)
RE02Run::RE02Run(const std::vector<G4String> mfdName): G4Run()
RE02Run::RE02Run(const std::vector<G4String> mfdName) : G4Run()
{
G4SDManager* SDman = G4SDManager::GetSDMpointer();
G4SDManager* pSDman = G4SDManager::GetSDMpointer();
//=================================================
// Initalize RunMaps for accumulation.
// Get CollectionIDs for HitCollections.
//=================================================
G4int Nmfd = mfdName.size();
for ( G4int idet = 0; idet < Nmfd ; idet++){ // Loop for all MFD.
G4int nMfd = mfdName.size();
for ( G4int idet = 0; idet < nMfd ; idet++){ // Loop for all MFD.
G4String detName = mfdName[idet];
//--- Seek and Obtain MFD objects from SDmanager.
G4MultiFunctionalDetector* mfd =
(G4MultiFunctionalDetector*)(SDman->FindSensitiveDetector(detName));
(G4MultiFunctionalDetector*)(pSDman->FindSensitiveDetector(detName));
//
if ( mfd ){
//--- Loop over the registered primitive scorers.
for (G4int icol = 0; icol < mfd->GetNumberOfPrimitives(); icol++){
// Get Primitive Scorer object.
G4VPrimitiveScorer* scorer=mfd->GetPrimitive(icol);
// collection name and collectionID for HitsCollection,
// where type of HitsCollection is G4THitsMap in case of primitive scorer.
// The collection name is given by <MFD name>/<Primitive Scorer name>.
G4String collectionName = scorer->GetName();
G4String fullCollectionName = detName+"/"+collectionName;
G4int collectionID = SDman->GetCollectionID(fullCollectionName);
//
if ( collectionID >= 0 ){
G4cout << "++ "<<fullCollectionName<< " id " << collectionID << G4endl;
// Store obtained HitsCollection information into data members.
// And, creates new G4THitsMap for accumulating quantities during RUN.
theCollName.push_back(fullCollectionName);
theCollID.push_back(collectionID);
theRunMap.push_back(new G4THitsMap<G4double>(detName,collectionName));
}else{
G4cout << "** collection " << fullCollectionName << " not found. "<<G4endl;
}
}
//--- Loop over the registered primitive scorers.
for (G4int icol = 0; icol < mfd->GetNumberOfPrimitives(); icol++){
// Get Primitive Scorer object.
G4VPrimitiveScorer* scorer=mfd->GetPrimitive(icol);
// collection name and collectionID for HitsCollection,
// where type of HitsCollection is G4THitsMap in case of primitive
// scorer.
// The collection name is given by <MFD name>/<Primitive Scorer name>.
G4String collectionName = scorer->GetName();
G4String fullCollectionName = detName+"/"+collectionName;
G4int collectionID = pSDman->GetCollectionID(fullCollectionName);
//
if ( collectionID >= 0 ){
G4cout << "++ "<<fullCollectionName<< " id " << collectionID << G4endl;
// Store obtained HitsCollection information into data members.
// And, creates new G4THitsMap for accumulating quantities during RUN.
fCollName.push_back(fullCollectionName);
fCollID.push_back(collectionID);
fRunMap.push_back(new G4THitsMap<G4double>(detName,collectionName));
}else{
G4cout << "** collection " << fullCollectionName << " not found. "
<< G4endl;
}
}
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// Destructor
// clear all data members.
RE02Run::~RE02Run()
{
//--- Clear HitsMap for RUN
G4int Nmap = theRunMap.size();
for ( G4int i = 0; i < Nmap; i++){
if(theRunMap[i] ) theRunMap[i]->clear();
G4int nMap = fRunMap.size();
for ( G4int i = 0; i < nMap; i++){
if(fRunMap[i] ) fRunMap[i]->clear();
}
theCollName.clear();
theCollID.clear();
theRunMap.clear();
fCollName.clear();
fCollID.clear();
fRunMap.clear();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// RecordEvent is called at end of event.
// For scoring purpose, the resultant quantity in a event,
@@ -131,54 +138,59 @@ void RE02Run::RecordEvent(const G4Event* aEvent)
//=============================
// HitsCollection of This Event
//============================
G4HCofThisEvent* HCE = aEvent->GetHCofThisEvent();
if (!HCE) return;
G4HCofThisEvent* pHCE = aEvent->GetHCofThisEvent();
if (!pHCE) return;
//=======================================================
// Sum up HitsMap of this Event into HitsMap of this RUN
//=======================================================
G4int Ncol = theCollID.size();
for ( G4int i = 0; i < Ncol ; i++ ){ // Loop over HitsCollection
G4THitsMap<G4double>* EvtMap=0;
if ( theCollID[i] >= 0 ){ // Collection is attached to HCE
EvtMap = (G4THitsMap<G4double>*)(HCE->GetHC(theCollID[i]));
G4int nCol = fCollID.size();
for ( G4int i = 0; i < nCol ; i++ ){ // Loop over HitsCollection
G4THitsMap<G4double>* evtMap=0;
if ( fCollID[i] >= 0 ){ // Collection is attached to pHCE
evtMap = (G4THitsMap<G4double>*)(pHCE->GetHC(fCollID[i]));
}else{
G4cout <<" Error EvtMap Not Found "<< i << G4endl;
G4cout <<" Error evtMap Not Found "<< i << G4endl;
}
if ( EvtMap ) {
if ( evtMap ) {
//=== Sum up HitsMap of this event to HitsMap of RUN.===
*theRunMap[i] += *EvtMap;
*fRunMap[i] += *evtMap;
//======================================================
}
}
}
//=================================================================
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// Access method for HitsMap of the RUN
//
//-----
// Access HitsMap.
// By MultiFunctionalDetector name and Collection Name.
G4THitsMap<G4double>* RE02Run::GetHitsMap(const G4String& detName,
const G4String& colName){
const G4String& colName){
G4String fullName = detName+"/"+colName;
return GetHitsMap(fullName);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
//-----
// Access HitsMap.
// By full description of collection name, that is
// <MultiFunctional Detector Name>/<Primitive Scorer Name>
G4THitsMap<G4double>* RE02Run::GetHitsMap(const G4String& fullName){
G4int Ncol = theCollName.size();
for ( G4int i = 0; i < Ncol; i++){
if ( theCollName[i] == fullName ){
return theRunMap[i];
}
G4int nCol = fCollName.size();
for ( G4int i = 0; i < nCol; i++){
if ( fCollName[i] == fullName ){
return fRunMap[i];
}
}
return NULL;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
//-----
// - Dump All HitsMap of this RUN. (for debuging and monitoring of quantity).
// This method calls G4THisMap::PrintAll() for individual HitsMap.
@@ -188,16 +200,16 @@ void RE02Run::DumpAllScorer(){
G4int n = GetNumberOfHitsMap();
// - GetHitsMap and dump values.
for ( G4int i = 0; i < n ; i++ ){
G4THitsMap<G4double>* RunMap =GetHitsMap(i);
if ( RunMap ) {
G4THitsMap<G4double>* runMap =GetHitsMap(i);
if ( runMap ) {
G4cout << " PrimitiveScorer RUN "
<< RunMap->GetSDname() <<","<< RunMap->GetName() << G4endl;
G4cout << " Number of entries " << RunMap->entries() << G4endl;
std::map<G4int,G4double*>::iterator itr = RunMap->GetMap()->begin();
for(; itr != RunMap->GetMap()->end(); itr++) {
G4cout << " copy no.: " << itr->first
<< " Run Value : " << *(itr->second)
<< G4endl;
<< runMap->GetSDname() <<","<< runMap->GetName() << G4endl;
G4cout << " Number of entries " << runMap->entries() << G4endl;
std::map<G4int,G4double*>::iterator itr = runMap->GetMap()->begin();
for(; itr != runMap->GetMap()->end(); itr++) {
G4cout << " copy no.: " << itr->first
<< " Run Value : " << *(itr->second)
<< G4endl;
}
}
}
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE02/src/RE02RunAction.cc
/// \brief Implementation of the RE02RunAction class
//
// $Id: RE02RunAction.cc,v 1.3 2006-11-18 01:37:24 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
#include "RE02RunAction.hh"
#include "RE02Run.hh"
@@ -36,51 +38,58 @@
#include "G4THitsMap.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
#include <fstream>
//=======================================================================
// RE02RunAction
//
//
//
//=======================================================================
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Constructor
RE02RunAction::RE02RunAction()
: fNx(0), fNy(0), fNz(0)
{
// - Prepare data member for RE02Run.
// vector represents a list of MultiFunctionalDetector names.
theSDName.push_back(G4String("PhantomSD"));
fSDName.push_back(G4String("PhantomSD"));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Destructor.
RE02RunAction::~RE02RunAction()
{
theSDName.clear();
fSDName.clear();
}
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//==
G4Run* RE02RunAction::GenerateRun()
{
// Generate new RUN object, which is specially
// dedicated for MultiFunctionalDetector scheme.
// Detail description can be found in RE02Run.hh/cc.
return new RE02Run(theSDName);
return new RE02Run(fSDName);
}
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//==
void RE02RunAction::BeginOfRunAction(const G4Run* aRun)
{
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
}
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//==
void RE02RunAction::EndOfRunAction(const G4Run* aRun)
{
//- RE02Run object.
RE02Run* re02Run = (RE02Run*)aRun;
//--- Dump all socred quantities involved in RE02Run.
// re02Run->DumpAllScorer();
re02Run->DumpAllScorer();
//---
//
@@ -91,37 +100,45 @@ void RE02RunAction::EndOfRunAction(const G4Run* aRun)
(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
detector->GetNumberOfSegmentsInPhantom(fNx,fNy,fNz); //Fill fNx,y,z.
//---------------------------------------------
// Dump accumulated quantities for this RUN.
// (Display only central region of x-y plane)
//---------------------------------------------
G4THitsMap<G4double>* totEdep = re02Run->GetHitsMap("PhantomSD/totalEDep");
G4THitsMap<G4double>* proEdep = re02Run->GetHitsMap("PhantomSD/protonEDep");
G4THitsMap<G4double>* proNstep= re02Run->GetHitsMap("PhantomSD/protonNStep");
G4THitsMap<G4double>* passCFx = re02Run->GetHitsMap("PhantomSD/chargedPassCellFlux");
G4THitsMap<G4double>* CFx = re02Run->GetHitsMap("PhantomSD/chargedCellFlux");
G4THitsMap<G4double>* surfFx = re02Run->GetHitsMap("PhantomSD/chargedSurfFlux");
G4THitsMap<G4double>* gCurr00 = re02Run->GetHitsMap("PhantomSD/gammaSurfCurr000");
G4THitsMap<G4double>* gCurr01 = re02Run->GetHitsMap("PhantomSD/gammaSurfCurr001");
G4THitsMap<G4double>* gCurr02 = re02Run->GetHitsMap("PhantomSD/gammaSurfCurr002");
G4THitsMap<G4double>* gCurr03 = re02Run->GetHitsMap("PhantomSD/gammaSurfCurr003");
G4THitsMap<G4double>* totEdep = re02Run->GetHitsMap("PhantomSD/totalEDep");
G4THitsMap<G4double>* proEdep = re02Run->GetHitsMap("PhantomSD/protonEDep");
G4THitsMap<G4double>* proNstep = re02Run->GetHitsMap("PhantomSD/protonNStep");
G4THitsMap<G4double>* passCFx =
re02Run->GetHitsMap("PhantomSD/chargedPassCellFlux");
G4THitsMap<G4double>* cFx =
re02Run->GetHitsMap("PhantomSD/chargedCellFlux");
G4THitsMap<G4double>* surfFx =
re02Run->GetHitsMap("PhantomSD/chargedSurfFlux");
G4THitsMap<G4double>* gCurr00 =
re02Run->GetHitsMap("PhantomSD/gammaSurfCurr000");
G4THitsMap<G4double>* gCurr01 =
re02Run->GetHitsMap("PhantomSD/gammaSurfCurr001");
G4THitsMap<G4double>* gCurr02 =
re02Run->GetHitsMap("PhantomSD/gammaSurfCurr002");
G4THitsMap<G4double>* gCurr03 =
re02Run->GetHitsMap("PhantomSD/gammaSurfCurr003");
G4cout << "=============================================================" <<G4endl;
G4cout << "============================================================="
<< G4endl;
G4cout << " Number of event processed : "<< aRun->GetNumberOfEvent() << G4endl;
G4cout << "=============================================================" <<G4endl;
G4cout << std::setw( 8) << "#Z Cell#"
<< std::setw(16) << totEdep->GetName()
<< std::setw(16) << proEdep->GetName()
<< std::setw(12) << proNstep->GetName()
<< std::setw(21) << passCFx->GetName()
<< std::setw(20) << CFx->GetName()
<< std::setw(20) << surfFx->GetName()
<< std::setw(20) << gCurr00->GetName()
<< std::setw(20) << gCurr01->GetName()
<< std::setw(20) << gCurr02->GetName()
<< std::setw(20) << gCurr03->GetName()
<< G4endl;
G4cout << "============================================================="
<< G4endl;
G4cout << std::setw( 8) << "#Z Cell#";
G4cout << std::setw(16) << totEdep->GetName();
G4cout << std::setw(16) << proEdep->GetName();
G4cout << std::setw(12) << proNstep->GetName();
G4cout << std::setw(21) << passCFx->GetName();
G4cout << std::setw(20) << cFx->GetName();
G4cout << std::setw(20) << surfFx->GetName();
G4cout << std::setw(20) << gCurr00->GetName();
G4cout << std::setw(20) << gCurr01->GetName();
G4cout << std::setw(20) << gCurr02->GetName();
G4cout << std::setw(20) << gCurr03->GetName()
<< G4endl;
G4int ix = fNx/2;
G4int iy = fNy/2;
G4int iz;
@@ -131,7 +148,7 @@ void RE02RunAction::EndOfRunAction(const G4Run* aRun)
G4double* proED = (*proEdep)[CopyNo(ix,iy,iz)];
G4double* proNS = (*proNstep)[CopyNo(ix,iy,iz)];
G4double* pasCF = (*passCFx)[CopyNo(ix,iy,iz)];
G4double* CF = (*CFx)[CopyNo(ix,iy,iz)];
G4double* cF = (*cFx)[CopyNo(ix,iy,iz)];
G4double* sfx = (*surfFx)[CopyNo(ix,iy,iz)];
G4double* gcur0 = (*gCurr00)[CopyNo(ix,iy,iz)];
G4double* gcur1 = (*gCurr01)[CopyNo(ix,iy,iz)];
@@ -141,27 +158,39 @@ void RE02RunAction::EndOfRunAction(const G4Run* aRun)
if ( !proED ) proED = new G4double(0.0);
if ( !proNS ) proNS = new G4double(0.0);
if ( !pasCF ) pasCF = new G4double(0.0);
if ( !CF ) CF = new G4double(0.0);
if ( !cF ) cF = new G4double(0.0);
if ( !sfx ) sfx = new G4double(0.0);
if ( !gcur0 ) gcur0 = new G4double(0.0);
if ( !gcur1 ) gcur1 = new G4double(0.0);
if ( !gcur2 ) gcur2 = new G4double(0.0);
if ( !gcur3 ) gcur3 = new G4double(0.0);
G4cout << std::setw( 6) << iz << " "
<< std::setw(12) << G4BestUnit(*totED,"Energy")
<< std::setw(12) << G4BestUnit(*proED,"Energy")
<< std::setw(12) << (*proNS) << " "
<< std::setw(13) << (*pasCF)*cm*cm <<" /cm2"
<< std::setw(15) << (*CF)*cm*cm <<" /cm2"
<< std::setw(15) << (*sfx)*cm*cm <<" /cm2"
<< std::setw(15) << (*gcur0)*cm*cm <<" /cm2"
<< std::setw(15) << (*gcur1)*cm*cm <<" /cm2"
<< std::setw(15) << (*gcur2)*cm*cm <<" /cm2"
<< std::setw(15) << (*gcur3)*cm*cm <<" /cm2"
<< G4endl;
<< std::setw(12) << G4BestUnit(*totED,"Energy")
<< std::setw(12) << G4BestUnit(*proED,"Energy")
<< std::setw(12) << (*proNS) << " "
<< std::setw(13) << (*pasCF)*cm*cm <<" /cm2"
<< std::setw(15) << (*cF)*cm*cm <<" /cm2"
<< std::setw(15) << (*sfx)*cm*cm <<" /cm2"
<< std::setw(15) << (*gcur0)*cm*cm <<" /cm2"
<< std::setw(15) << (*gcur1)*cm*cm <<" /cm2"
<< std::setw(15) << (*gcur2)*cm*cm <<" /cm2"
<< std::setw(15) << (*gcur3)*cm*cm <<" /cm2"
<< G4endl;
}
G4cout << "============================================="<<G4endl;
std::ofstream file("totED.txt");
for ( iz = 0; iz < fNz; iz++){
for ( iy = 0; iy < fNy; iy++){
for ( ix = 0; ix < fNx; ix++){
G4double* totED = (*totEdep)[CopyNo(ix,iy,iz)];
if ( !totED ) totED = new G4double(0.0);
file << ix << " "<<iy<<" "<<iz<<" "<< *totED/MeV << G4endl;
}
}
}
file.close();
}
//
// --