Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
@@ -40,15 +40,59 @@
HadrontherapyAnalysisManager* HadrontherapyAnalysisManager::instance = 0;
HadrontherapyAnalysisManager::HadrontherapyAnalysisManager() :
aFact(0), theTree(0), histFact(0), tupFact(0), h1(0), ntuple(0)
aFact(0), theTree(0), histFact(0), tupFact(0), h1(0), h2(0), h3(0),
h4(0), h5(0), h6(0), h7(0), h8(0), h9(0), h10(0), h11(0), h12(0), h13(0), h14(0), ntuple(0),
ionTuple(0)
{
}
HadrontherapyAnalysisManager::~HadrontherapyAnalysisManager()
{
delete ionTuple;
ionTuple = 0;
delete ntuple;
ntuple = 0;
delete h14;
h14 = 0;
delete h13;
h13 = 0;
delete h12;
h12 = 0;
delete h11;
h11 = 0;
delete h10;
h10 = 0;
delete h9;
h9 = 0;
delete h8;
h8 = 0;
delete h7;
h7 = 0;
delete h6;
h6 = 0;
delete h5;
h5 = 0;
delete h4;
h4 = 0;
delete h3;
h3 = 0;
delete h2;
h2 = 0;
delete h1;
h1 = 0;
@@ -86,13 +130,44 @@ void HadrontherapyAnalysisManager::book()
histFact = aFact -> createHistogramFactory(*theTree);
tupFact = aFact -> createTupleFactory(*theTree);
// Create the histogram
// Create the histograms with the enrgy deposit along the X axis
h1 = histFact -> createHistogram1D("10","slice, energy", 80, 0., 80. );
h2 = histFact -> createHistogram1D("20","Secondary protons - slice, energy", 80, 0., 80. );
h3 = histFact -> createHistogram1D("30","Secondary neutrons - slice, energy", 80, 0., 80. );
h4 = histFact -> createHistogram1D("40","Secondary alpha - slice, energy", 80, 0., 80. );
h5 = histFact -> createHistogram1D("50","Secondary gamma - slice, energy", 80, 0., 80. );
h6 = histFact -> createHistogram1D("60","Secondary electron - slice, energy", 80, 0., 80. );
h7 = histFact -> createHistogram1D("70","Secondary triton - slice, energy", 80, 0., 80. );
h8 = histFact -> createHistogram1D("80","Secondary deuteron - slice, energy", 80, 0., 80. );
h9 = histFact -> createHistogram1D("90","Secondary pion - slice, energy", 80, 0., 80. );
h10 = histFact -> createHistogram1D("100","Energy distribution of secondary electrons", 70, 0., 70. );
h11 = histFact -> createHistogram1D("110","Energy distribution of secondary photons", 70, 0., 70. );
h12 = histFact -> createHistogram1D("120","Energy distribution of secondary deuterons", 70, 0., 70. );
h13 = histFact -> createHistogram1D("130","Energy distribution of secondary tritons", 70, 0., 70. );
h14 = histFact -> createHistogram1D("140","Energy distribution of secondary alpha particles", 70, 0., 70. );
// Create the ntuple
G4String columnNames = "int i; int j; int k; double energy;";
G4String options = "";
if (tupFact) ntuple = tupFact->create("1","1",columnNames, options);
if (tupFact) ntuple = tupFact -> create("1","1",columnNames, options);
// Create the ntuple
G4String columnNames2 = "int a; double z; int occupancy; double energy;";
G4String options2 = "";
if (tupFact) ionTuple = tupFact -> create("2","2", columnNames2, options2);
}
void HadrontherapyAnalysisManager::FillEnergyDeposit(G4int i,
@@ -121,13 +196,98 @@ void HadrontherapyAnalysisManager::BraggPeak(G4int slice, G4double energy)
h1 -> fill(slice,energy);
}
void HadrontherapyAnalysisManager::SecondaryProtonEnergyDeposit(G4int slice, G4double energy)
{
h2 -> fill(slice,energy);
}
void HadrontherapyAnalysisManager::SecondaryNeutronEnergyDeposit(G4int slice, G4double energy)
{
h3 -> fill(slice,energy);
}
void HadrontherapyAnalysisManager::SecondaryAlphaEnergyDeposit(G4int slice, G4double energy)
{
h4 -> fill(slice,energy);
}
void HadrontherapyAnalysisManager::SecondaryGammaEnergyDeposit(G4int slice, G4double energy)
{
h5 -> fill(slice,energy);
}
void HadrontherapyAnalysisManager::SecondaryElectronEnergyDeposit(G4int slice, G4double energy)
{
h6 -> fill(slice,energy);
}
void HadrontherapyAnalysisManager::SecondaryTritonEnergyDeposit(G4int slice, G4double energy)
{
h7 -> fill(slice,energy);
}
void HadrontherapyAnalysisManager::SecondaryDeuteronEnergyDeposit(G4int slice, G4double energy)
{
h8 -> fill(slice,energy);
}
void HadrontherapyAnalysisManager::SecondaryPionEnergyDeposit(G4int slice, G4double energy)
{
h9 -> fill(slice,energy);
}
void HadrontherapyAnalysisManager::electronEnergyDistribution(G4double energy)
{
h10 -> fill(energy);
}
void HadrontherapyAnalysisManager::gammaEnergyDistribution(G4double energy)
{
h11 -> fill(energy);
}
void HadrontherapyAnalysisManager::deuteronEnergyDistribution(G4double energy)
{
h12 -> fill(energy);
}
void HadrontherapyAnalysisManager::tritonEnergyDistribution(G4double energy)
{
h13 -> fill(energy);
}
void HadrontherapyAnalysisManager::alphaEnergyDistribution(G4double energy)
{
h14 -> fill(energy);
}
void HadrontherapyAnalysisManager::genericIonInformation(G4int a,
G4double z,
G4int electronOccupancy,
G4double energy)
{
if (ionTuple)
{
G4int aIndex = ionTuple -> findColumn("a");
G4int zIndex = ionTuple -> findColumn("z");
G4int electronIndex = ionTuple -> findColumn("occupancy");
G4int energyIndex = ionTuple -> findColumn("energy");
ionTuple -> fill(aIndex,a);
ionTuple -> fill(zIndex,z);
ionTuple -> fill(electronIndex, electronOccupancy);
ionTuple -> fill(energyIndex, energy);
}
ionTuple -> addRow();
}
void HadrontherapyAnalysisManager::finish()
{
// Write all histograms to file
theTree -> commit();
// Write all histograms to file
theTree -> commit();
// Close (will again commit)
theTree ->close();
// Close (will again commit)
theTree ->close();
}
#endif
@@ -55,13 +55,14 @@ void HadrontherapyDecay::ConstructProcess()
{
G4ParticleDefinition* particle = theParticleIterator -> value();
G4ProcessManager* pmanager = particle -> GetProcessManager();
if (theDecayProcess -> IsApplicable(*particle))
if (theDecayProcess -> IsApplicable(*particle) && !particle->IsShortLived())
{
G4String name = particle -> GetParticleName();
pmanager -> AddProcess(theDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager -> SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager -> SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
@@ -72,9 +72,9 @@ HadrontherapyDetectorConstruction::HadrontherapyDetectorConstruction()
phantomSizeZ = 20.*mm;
// Number of the phantom voxels
numberOfVoxelsAlongX = 80;
numberOfVoxelsAlongY = 80;
numberOfVoxelsAlongZ = 80;
numberOfVoxelsAlongX = 200;
numberOfVoxelsAlongY = 200;
numberOfVoxelsAlongZ = 200;
}
HadrontherapyDetectorConstruction::~HadrontherapyDetectorConstruction()
@@ -91,7 +91,7 @@ void HadrontherapyEventAction::EndOfEventAction(const G4Event* evt)
G4int j = ((*CHC)[h]) -> GetYID();
G4int k = ((*CHC)[h]) -> GetZID();
G4double energyDeposit = ((*CHC)[h]) -> GetEdep();
matrix -> Fill(i, j, k, energyDeposit);
matrix -> Fill(i, j, k, energyDeposit/MeV);
}
}
}
@@ -59,22 +59,17 @@ void HadrontherapyIonLowE::ConstructProcess()
G4ProcessManager* manager = particle -> GetProcessManager();
G4String particleName = particle -> GetParticleName();
G4double charge = particle -> GetPDGCharge();
// protons, ions, alpha, pions, kaons, generic ion.....
if (( charge != 0. ) && particleName != "e+" && particleName != "mu+" &&
if (( charge != 0. ) && particleName != "e+" && particleName != "mu+" &&
particleName != "e-" && particleName != "mu-")
{
if((!particle -> IsShortLived()) &&
(particle -> GetParticleName() != "chargedgeantino"))
{
G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
ionisation -> SetNuclearStoppingPowerModel("ICRU_R49") ; // ICRU49 models for nuclear SP
// ICRU49 parameterisation is the default one
G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
ionisation -> SetNuclearStoppingOn() ;
// Switch off the Barkas and Bloch corrections
ionisation -> SetBarkasOn();
G4VProcess* multipleScattering = new G4MultipleScattering();
manager -> AddProcess(multipleScattering, -1,1,1);
manager -> AddProcess(ionisation, -1,2,2);
@@ -0,0 +1,99 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
// $Id: HadrontherapyIonLowE.cc; May 2005
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
// Code developed by:
//
// G.A.P. Cirrone(a)*, G. Candiano, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
//
// (a) Laboratori Nazionali del Sud
// of the National Institute for Nuclear Physics, Catania, Italy
// (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
//
// * cirrone@lns.infn.it
// --------------------------------------------------------------
#include "HadrontherapyIonLowEZiegler1977.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleDefinition.hh"
#include "G4MultipleScattering.hh"
#include "G4hLowEnergyIonisation.hh"
#include "G4hIonisation.hh"
#include "G4hLowEnergyLoss.hh"
#include "G4StepLimiter.hh"
#include "G4hZiegler1977p.hh"
HadrontherapyIonLowEZiegler1977::HadrontherapyIonLowEZiegler1977(const G4String& name): G4VPhysicsConstructor(name)
{ }
HadrontherapyIonLowEZiegler1977::~HadrontherapyIonLowEZiegler1977()
{ }
void HadrontherapyIonLowEZiegler1977::ConstructProcess()
{
theParticleIterator -> reset();
while( (*theParticleIterator)() )
{
G4ParticleDefinition* particle = theParticleIterator -> value();
G4ProcessManager* manager = particle -> GetProcessManager();
G4String particleName = particle -> GetParticleName();
G4double charge = particle -> GetPDGCharge();
// protons
if (particleName == "proton")
{
G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
// Electronic Stopping Power: Ziegler 1977 parameterisation
// Nuclear stopping power: Ziegler 1977
ionisation -> SetElectronicStoppingPowerModel(particle, "Ziegler1977p");
ionisation -> SetNuclearStoppingPowerModel("Ziegler1977");
ionisation -> SetNuclearStoppingOn();
G4VProcess* multipleScattering = new G4MultipleScattering();
manager -> AddProcess(multipleScattering, -1,1,1);
manager -> AddProcess(ionisation, -1,2,2);
manager -> AddProcess(new G4StepLimiter(),-1,-1, 3);
}
// ions, alpha, pions, kaons, generic ion.....
if (( charge != 0. ) && particleName != "e+" && particleName != "mu+" &&
particleName != "e-" && particleName != "mu-" && particleName != "proton")
{
if((!particle -> IsShortLived()) &&
(particle -> GetParticleName() != "chargedgeantino"))
{
G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
ionisation -> SetNuclearStoppingOn() ;
G4VProcess* multipleScattering = new G4MultipleScattering();
manager -> AddProcess(multipleScattering, -1,1,1);
manager -> AddProcess(ionisation, -1,2,2);
manager -> AddProcess(new G4StepLimiter(),-1,-1, 3);
}
}
}
}
@@ -0,0 +1,100 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
// $Id: HadrontherapyIonLowEZiegler1985.cc; May 2005
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
// Code developed by:
//
// G.A.P. Cirrone(a)*, G. Candiano, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
//
// (a) Laboratori Nazionali del Sud
// of the National Institute for Nuclear Physics, Catania, Italy
// (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
//
// * cirrone@lns.infn.it
// --------------------------------------------------------------
#include "HadrontherapyIonLowEZiegler1985.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleDefinition.hh"
#include "G4MultipleScattering.hh"
#include "G4hLowEnergyIonisation.hh"
#include "G4hIonisation.hh"
#include "G4hLowEnergyLoss.hh"
#include "G4StepLimiter.hh"
#include "G4hZiegler1985p.hh"
HadrontherapyIonLowEZiegler1985::HadrontherapyIonLowEZiegler1985(const G4String& name): G4VPhysicsConstructor(name)
{ }
HadrontherapyIonLowEZiegler1985::~HadrontherapyIonLowEZiegler1985()
{ }
void HadrontherapyIonLowEZiegler1985::ConstructProcess()
{
theParticleIterator -> reset();
while( (*theParticleIterator)() )
{
G4ParticleDefinition* particle = theParticleIterator -> value();
G4ProcessManager* manager = particle -> GetProcessManager();
G4String particleName = particle -> GetParticleName();
G4double charge = particle -> GetPDGCharge();
// protons
if (particleName == "proton")
{
G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
// Electronic Stopping Power: Ziegler 1985 parameterisation
// Nuclear stopping power: Ziegler 1985 parameterisation
ionisation -> SetElectronicStoppingPowerModel(particle, "Ziegler1985p");
ionisation -> SetNuclearStoppingPowerModel("Ziegler1985");
ionisation -> SetNuclearStoppingOn() ;
G4VProcess* multipleScattering = new G4MultipleScattering();
manager -> AddProcess(multipleScattering, -1,1,1);
manager -> AddProcess(ionisation, -1,2,2);
manager -> AddProcess(new G4StepLimiter(),-1,-1, 3);
}
// ions, alpha, pions, kaons, generic ions.....
if (( charge != 0. ) && (particleName != "e+") && (particleName != "mu+") &&
(particleName != "e-") && (particleName != "mu-") && (particleName != "proton"))
{
if((!particle -> IsShortLived()) &&
(particle -> GetParticleName() != "chargedgeantino"))
{
G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
ionisation -> SetNuclearStoppingOn() ;
G4VProcess* multipleScattering = new G4MultipleScattering();
manager -> AddProcess(multipleScattering, -1,1,1);
manager -> AddProcess(ionisation, -1,2,2);
manager -> AddProcess(new G4StepLimiter(),-1,-1, 3);
}
}
}
}
@@ -0,0 +1,96 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
// $Id: HadrontherapyIonLowE.cc; May 2005
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
// Code developed by:
//
// G.A.P. Cirrone(a)*, G. Candiano, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
//
// (a) Laboratori Nazionali del Sud
// of the National Institute for Nuclear Physics, Catania, Italy
// (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
//
// * cirrone@lns.infn.it
// --------------------------------------------------------------
#include "HadrontherapyIonLowEZiegler2000.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleDefinition.hh"
#include "G4MultipleScattering.hh"
#include "G4hLowEnergyIonisation.hh"
#include "G4hIonisation.hh"
#include "G4hLowEnergyLoss.hh"
#include "G4StepLimiter.hh"
#include "G4hSRIM2000p.hh"
HadrontherapyIonLowEZiegler2000::HadrontherapyIonLowEZiegler2000(const G4String& name): G4VPhysicsConstructor(name)
{ }
HadrontherapyIonLowEZiegler2000::~HadrontherapyIonLowEZiegler2000()
{ }
void HadrontherapyIonLowEZiegler2000::ConstructProcess()
{
theParticleIterator -> reset();
while( (*theParticleIterator)() )
{
G4ParticleDefinition* particle = theParticleIterator -> value();
G4ProcessManager* manager = particle -> GetProcessManager();
G4String particleName = particle -> GetParticleName();
G4double charge = particle -> GetPDGCharge();
// protons
if (particleName == "proton")
{
G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
// Electronic Stopping Power: SRIM 2000 parameterisation
// Nuclear stopping power: ICRU 49
ionisation -> SetElectronicStoppingPowerModel(particle, "SRIM2000p");
ionisation -> SetNuclearStoppingOn() ;
G4VProcess* multipleScattering = new G4MultipleScattering();
manager -> AddProcess(multipleScattering, -1,1,1);
manager -> AddProcess(ionisation, -1,2,2);
manager -> AddProcess(new G4StepLimiter(),-1,-1, 3);
}
// ions, alpha, pions, kaons, generic ion.....
if (( charge != 0. ) && particleName != "e+" && particleName != "mu+" &&
particleName != "e-" && particleName != "mu-" && particleName != "proton")
{
if((!particle -> IsShortLived()) &&
(particle -> GetParticleName() != "chargedgeantino"))
{
G4hLowEnergyIonisation* ionisation = new G4hLowEnergyIonisation();
ionisation -> SetNuclearStoppingOn() ;
G4VProcess* multipleScattering = new G4MultipleScattering();
manager -> AddProcess(multipleScattering, -1,1,1);
manager -> AddProcess(ionisation, -1,2,2);
manager -> AddProcess(new G4StepLimiter(),-1,-1, 3);
}
}
}
}
@@ -39,6 +39,7 @@
#include "G4ParticleDefinition.hh"
#include "G4MultipleScattering.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4MultipleScattering.hh"
#include "G4StepLimiter.hh"
@@ -58,10 +59,19 @@ void HadrontherapyIonStandard::ConstructProcess()
G4ProcessManager* manager = particle -> GetProcessManager();
G4String particleName = particle -> GetParticleName();
G4double charge = particle -> GetPDGCharge();
if (particleName == "GenericIon")
{
G4ionIonisation* ionisation = new G4ionIonisation();
G4VProcess* multipleScattering = new G4MultipleScattering();
manager -> AddProcess(multipleScattering, -1,1,1);
manager -> AddProcess(ionisation, -1,2,2);
manager -> AddProcess(new G4StepLimiter(),-1,-1, 3);
// protons, ions, pions, kaons, etc.
}
//protons and generic hadrons
if (( charge != 0. ) && particleName != "e+" && particleName != "mu+" &&
particleName != "e-" && particleName != "mu-")
particleName != "e-" && particleName != "mu-" && particleName !="GenericIon")
{
if((!particle -> IsShortLived()) &&
(particle -> GetParticleName() != "chargedgeantino"))
@@ -37,13 +37,14 @@
#include "HadrontherapyMatrix.hh"
#include "HadrontherapyAnalysisManager.hh"
#include "globals.hh"
#include <fstream>
HadrontherapyMatrix::HadrontherapyMatrix()
{
// Number of the voxels of the phantom
numberVoxelX = 80;
numberVoxelY = 80;
numberVoxelZ = 80;
numberVoxelX = 200;
numberVoxelY = 200;
numberVoxelZ = 200;
// Create the matrix
matrix = new G4double[numberVoxelX*numberVoxelY*numberVoxelZ];
@@ -86,33 +87,32 @@ void HadrontherapyMatrix::TotalEnergyDeposit()
G4int k;
G4int j;
G4int i;
if (matrix)
{
for(G4int l = 0; l < numberVoxelZ; l++)
{
k = l;
for(G4int m = 0; m < numberVoxelY; m++)
{
j = m * numberVoxelZ + k;
for(G4int n = 0; n < numberVoxelX; n++)
{
i = n* numberVoxelZ * numberVoxelY + j;
if(matrix[i] != 0)
{
#ifdef G4ANALYSIS_USE
HadrontherapyAnalysisManager* analysis =
HadrontherapyAnalysisManager::getInstance();
analysis -> FillEnergyDeposit(n, m, k, matrix[i]);
analysis -> BraggPeak(n, matrix[i]);
#endif
}
}
for(G4int l = 0; l < numberVoxelZ; l++)
{
k = l;
}
}
for(G4int m = 0; m < numberVoxelY; m++)
{
j = m * numberVoxelZ + k;
for(G4int n = 0; n < numberVoxelX; n++)
{
i = n* numberVoxelZ * numberVoxelY + j;
if(matrix[i] != 0)
{
#ifdef G4ANALYSIS_USE
HadrontherapyAnalysisManager* analysis =
HadrontherapyAnalysisManager::getInstance();
analysis -> FillEnergyDeposit(n, m, k, matrix[i]);
analysis -> BraggPeak(n, matrix[i]);
#endif
}
}
}
}
}
}
@@ -1,4 +1,3 @@
//
// ********************************************************************
// * DISCLAIMER *
@@ -53,7 +52,6 @@
#include "G4Transform3D.hh"
#include "G4ios.hh"
#include <fstream>
#include <strstream>
#include "G4RunManager.hh"
HadrontherapyModulator::HadrontherapyModulator():physiMotherMod(0),
@@ -65,7 +65,8 @@ void HadrontherapyMuonStandard::ConstructProcess()
G4String particleName = particle -> GetParticleName();
if(( particleName == "mu+")|| (particleName == "mu-" ))
{//muon
{
//muon
G4VProcess* aMultipleScattering = new G4MultipleScattering();
G4VProcess* aBremsstrahlung = new G4MuBremsstrahlung();
G4VProcess* aPairProduction = new G4MuPairProduction();
@@ -94,4 +95,5 @@ void HadrontherapyMuonStandard::ConstructProcess()
pmanager -> AddProcess(new G4MuonMinusCaptureAtRest(), 0,-1,-1);
}
}
G4cout << "muon processed loaded"<<G4endl;
}
@@ -37,6 +37,12 @@
#include "G4ParticleDefinition.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4LeptonConstructor.hh"
#include "G4BosonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4IonConstructor.hh"
HadrontherapyParticles::HadrontherapyParticles(const G4String& name)
: G4VPhysicsConstructor(name)
@@ -46,45 +52,22 @@ HadrontherapyParticles::~HadrontherapyParticles()
{}
void HadrontherapyParticles::ConstructParticle()
{
G4Gamma::GammaDefinition();
{
G4LeptonConstructor lepton;
lepton.ConstructParticle();
G4BosonConstructor boson;
boson.ConstructParticle();
// *******//
// leptons//
// *******//
G4MesonConstructor meson;
meson.ConstructParticle();
G4Electron::ElectronDefinition();
G4Positron::PositronDefinition();
G4MuonPlus::MuonPlusDefinition();
G4MuonMinus::MuonMinusDefinition();
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
G4BaryonConstructor baryon;
baryon.ConstructParticle();
// ********//
// mesons //
// ********//
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4PionZero::PionZeroDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
G4ShortLivedConstructor shortLived;
shortLived.ConstructParticle();
// **********//
// barions //
// **********//
G4Proton::ProtonDefinition();
G4AntiProton::AntiProtonDefinition();
G4Neutron::NeutronDefinition();
G4AntiNeutron::AntiNeutronDefinition();
// ******//
// ions //
// ******//
G4Deuteron::DeuteronDefinition();
G4Triton::TritonDefinition();
G4He3::He3Definition();
G4Alpha::AlphaDefinition();
G4GenericIon::GenericIonDefinition();
G4IonConstructor ion;
ion.ConstructParticle();
}
@@ -35,6 +35,7 @@
// ----------------------------------------------------------------------------
#include "HadrontherapyPhantomSD.hh"
#include "HadrontherapyAnalysisManager.hh"
#include "HadrontherapyPhantomHit.hh"
#include "G4Step.hh"
#include "G4VTouchable.hh"
@@ -78,6 +79,9 @@ G4bool HadrontherapyPhantomSD::ProcessHits(G4Step* aStep, G4TouchableHistory* RO
G4int k = ROhist -> GetReplicaNumber(0);
G4int i = ROhist -> GetReplicaNumber(2);
G4int j = ROhist -> GetReplicaNumber(1);
G4String particleName = aStep -> GetTrack() -> GetDynamicParticle() ->
GetDefinition() -> GetParticleName();
if(energyDeposit != 0)
{
@@ -86,7 +90,45 @@ G4bool HadrontherapyPhantomSD::ProcessHits(G4Step* aStep, G4TouchableHistory* RO
phantomHit -> SetEdepAndPosition(i, j, k, energyDeposit);
HitsCollection -> insert(phantomHit);
}
// Energy deposit of secondary particles along X (integrated on Y and Z)
#ifdef G4ANALYSIS_USE
HadrontherapyAnalysisManager* analysis =
HadrontherapyAnalysisManager::getInstance();
if(energyDeposit != 0)
{
if(aStep -> GetTrack() -> GetTrackID()!= 1)
{
if (particleName == "proton")
analysis -> SecondaryProtonEnergyDeposit(i, energyDeposit/MeV);
if (particleName == "neutron")
analysis -> SecondaryNeutronEnergyDeposit(i, energyDeposit/MeV);
if (particleName == "alpha")
analysis -> SecondaryAlphaEnergyDeposit(i, energyDeposit/MeV);
if (particleName == "gamma")
analysis -> SecondaryGammaEnergyDeposit(i, energyDeposit/MeV);
if (particleName == "e-")
analysis -> SecondaryElectronEnergyDeposit(i, energyDeposit/MeV);
if (particleName == "triton")
analysis -> SecondaryTritonEnergyDeposit(i, energyDeposit/MeV);
if (particleName == "deuteron")
analysis -> SecondaryDeuteronEnergyDeposit(i, energyDeposit/MeV);
if (particleName == "pi+" || particleName == "pi-" || particleName == "pi0")
analysis -> SecondaryPionEnergyDeposit(i, energyDeposit/MeV);
}
}
#endif
return true;
}
@@ -50,17 +50,27 @@
#include "HadrontherapyPositronStandard.hh"
#include "HadrontherapyPositronPenelope.hh"
#include "HadrontherapyIonLowE.hh"
#include "HadrontherapyIonLowEZiegler1977.hh"
#include "HadrontherapyIonLowEZiegler1985.hh"
#include "HadrontherapyIonLowEZiegler2000.hh"
#include "HadrontherapyIonStandard.hh"
#include "HadrontherapyProtonPrecompound.hh"
#include "HadrontherapyProtonPrecompoundFermi.hh"
#include "HadrontherapyProtonPrecompoundGEM.hh"
#include "HadrontherapyProtonPrecompoundGEMFermi.hh"
#include "HadrontherapyProtonBinary.hh"
#include "HadrontherapyMuonStandard.hh"
#include "HadrontherapyDecay.hh"
#include "HadrontherapyParticles.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
HadrontherapyPhysicsList::HadrontherapyPhysicsList(): G4VModularPhysicsList(),
electronIsRegistered(false),
positronIsRegistered(false),
photonIsRegistered(false),
ionIsRegistered(false),
protonPrecompoundIsRegistered(false),
protonHadronicIsRegistered(false),
muonIsRegistered(false),
decayIsRegistered(false)
{
@@ -69,6 +79,8 @@ HadrontherapyPhysicsList::HadrontherapyPhysicsList(): G4VModularPhysicsList(),
defaultCutValue = 10. * mm;
messenger = new HadrontherapyPhysicsListMessenger(this);
SetVerboseLevel(1);
RegisterPhysics( new HadrontherapyParticles("particles") );
}
HadrontherapyPhysicsList::~HadrontherapyPhysicsList()
@@ -218,7 +230,7 @@ void HadrontherapyPhysicsList::AddPhysicsList(const G4String& name)
if (positronIsRegistered)
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " cannot be registered ---- positron List already existing" << G4endl;
<< " cannot be registered ---- positron List already existing" << G4endl;
}
else
{
@@ -228,9 +240,10 @@ void HadrontherapyPhysicsList::AddPhysicsList(const G4String& name)
positronIsRegistered = true;
}
}
// Register Low Energy ICRU processes for protons and ions
// Register Low Energy processes for protons and ions
// Stopping power parameterisation: ICRU49 (default model)
if (name == "ion-LowE")
{
if (ionIsRegistered)
@@ -248,6 +261,65 @@ void HadrontherapyPhysicsList::AddPhysicsList(const G4String& name)
}
}
// Register Low Energy processes for protons and ions
// Stopping power parameterisation: Ziegler 1977
if (name == "ion-LowE-ziegler1977")
{
if (ionIsRegistered)
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " cannot be registered ---- proton List already existing"
<< G4endl;
}
else
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " is registered" << G4endl;
RegisterPhysics( new HadrontherapyIonLowEZiegler1977(name) );
ionIsRegistered = true;
}
}
// Register Low Energy processes for protons and ions
// Stopping power parameterisation: Ziegler 1985
if (name == "ion-LowE-ziegler1985")
{
if (ionIsRegistered)
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " cannot be registered ---- proton List already existing"
<< G4endl;
}
else
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " is registered" << G4endl;
RegisterPhysics( new HadrontherapyIonLowEZiegler1985(name) );
ionIsRegistered = true;
}
}
// Register Low Energy processes for protons and ions
// Stopping power parameterisation: SRIM2000
if (name == "ion-LowE-ziegler2000")
{
if (ionIsRegistered)
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " cannot be registered ---- proton List already existing"
<< G4endl;
}
else
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " is registered" << G4endl;
RegisterPhysics( new HadrontherapyIonLowEZiegler2000(name) );
ionIsRegistered = true;
}
}
// Register Standard processes for protons and ions
if (name == "ion-standard")
@@ -302,14 +374,20 @@ void HadrontherapyPhysicsList::AddPhysicsList(const G4String& name)
decayIsRegistered = true;
}
}
//
//
// Register the hadronic physics for protons, neutrons, ions
//
//
//--------------------------------------------------------------------------------------------
//Begin Hadronic Precompound models
//--------------------------------------------------------------------------------------------
//
// Register the hadronic physics for protons, neutrons, ions
//
//Precompound Default Evaporation
if (name == "proton-precompound")
{
if (protonPrecompoundIsRegistered)
if (protonHadronicIsRegistered)
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " cannot be registered ---- decay List already existing"
@@ -320,10 +398,103 @@ void HadrontherapyPhysicsList::AddPhysicsList(const G4String& name)
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " is registered" << G4endl;
RegisterPhysics( new HadrontherapyProtonPrecompound(name) );
protonPrecompoundIsRegistered = true;
protonHadronicIsRegistered = true;
}
}
//Precompond Default Evaporation + Fermi Breck-up Model
if (name == "proton-precompoundFermi")
{
if (protonHadronicIsRegistered)
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " cannot be registered ---- decay List already existing"
<< G4endl;
}
else
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " is registered" << G4endl;
RegisterPhysics( new HadrontherapyProtonPrecompoundFermi(name) );
protonHadronicIsRegistered = true;
}
}
//Precompound GEM Evaporation
if (name == "proton-precompoundGEM")
{
if (protonHadronicIsRegistered)
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " cannot be registered ---- decay List already existing"
<< G4endl;
}
else
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " is registered" << G4endl;
RegisterPhysics( new HadrontherapyProtonPrecompoundGEM(name) );
protonHadronicIsRegistered = true;
}
}
//Precompound GEM Evaporation + Fermi Breck-up Model
if (name == "proton-precompoundGEMFermi")
{
if (protonHadronicIsRegistered)
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " cannot be registered ---- decay List already existing"
<< G4endl;
}
else
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " is registered" << G4endl;
RegisterPhysics( new HadrontherapyProtonPrecompoundGEMFermi(name) );
protonHadronicIsRegistered = true;
}
}
//-------------------------------------------------------------------------------------------------
// End Hadronic Precompound models
//-------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------
//Begin Hadronic Binary models
//--------------------------------------------------------------------------------------------
// Binary cascade model with the default precompound
if (name == "proton-precompound-binary")
{
if (protonHadronicIsRegistered)
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " cannot be registered ---- decay List already existing"
<< G4endl;
}
else
{
G4cout << "HadrontherapyPhysicsList::AddPhysicsList: " << name
<< " is registered" << G4endl;
RegisterPhysics( new HadrontherapyProtonBinary(name) );
protonHadronicIsRegistered = true;
}
}
//--------------------------------------------------------------------------------------------
// End Hadronic Binary models
//--------------------------------------------------------------------------------------------
if (electronIsRegistered && positronIsRegistered && photonIsRegistered &&
ionIsRegistered)
{
@@ -331,10 +502,11 @@ void HadrontherapyPhysicsList::AddPhysicsList(const G4String& name)
"Electromagnetic physics is registered for electron, positron, photons, protons"
<< G4endl;
}
if (protonPrecompoundIsRegistered && muonIsRegistered && decayIsRegistered)
{
G4cout << " Hadronic physics is registered" << G4endl;
}
if (protonHadronicIsRegistered && muonIsRegistered && decayIsRegistered)
{
G4cout << " Hadronic physics is registered" << G4endl;
}
}
void HadrontherapyPhysicsList::SetCuts()
@@ -353,6 +525,8 @@ void HadrontherapyPhysicsList::SetCuts()
cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("gamma"));
cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("e-"));
cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("e+"));
cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("proton"));
cuts -> SetProductionCut(regionCut,G4ProductionCuts::GetIndex("genericIons"));
region -> SetProductionCuts(cuts);
if (verboseLevel>0) DumpCutValuesTable();
@@ -0,0 +1,268 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
// $Id: HadrontherapyProtonBinary.cc; May 2005
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
// Code developed by:
//
// G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
//
// (a) Laboratori Nazionali del Sud
// of the National Institute for Nuclear Physics, Catania, Italy
// (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
//
// * cirrone@lns.infn.it
// ----------------------------------------------------------------------------
#include "HadrontherapyProtonBinary.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4LElastic.hh"
#include "G4BinaryCascade.hh"
#include "G4CascadeInterface.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4HEPionPlusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
#include "G4PiMinusAbsorptionAtRest.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4HEAntiProtonInelastic.hh"
#include "G4AntiProtonAnnihilationAtRest.hh"
// BINARY + PRECOMPOUND PHYSICS LIST
//
// BINARY + PRECOMPOUND + EVAPORATION(DEFAULT EVAPORATION) NO FERMI BREAK-UP FOR PROTONS, NEUTRONS AND PIONS
//
// LEP MODEL UP TO 100 MEV AND BINARY ION MODEL BETWEEN 80 MEV AND 40. GEV
// FOR DEUTERON, TRITON, HE3, ALPHA
//
//FISSION AND HADRON CAPTURE FOR NEUTRONS BETWEEN 0. MEV AND 100. TEV
//
HadrontherapyProtonBinary::HadrontherapyProtonBinary(const G4String& name):
G4VPhysicsConstructor(name)
{
// Energy limits of the model for ions
binaryLightIonLowLimit = 80.*MeV;
binaryLightIonHighLimit = 40.*GeV;
LEPHighLimit = 100.*MeV;
// Energy limits for protons, neutrons and pions
precompoundLowLimit = 100.*MeV;
precompoundHighLimit = 300.*MeV;
neutronLowLimit = 0.*TeV;
neutronHighLimit = 100.*TeV;
binaryLowLimit = 0.*MeV;
binaryHighLimit = 300.*MeV;
}
HadrontherapyProtonBinary::~HadrontherapyProtonBinary()
{}
void HadrontherapyProtonBinary::ConstructProcess()
{
// ELASTIC SCATTERING FOR PROTON, NEUTRON, IONS
G4LElastic* elastic_Model = new G4LElastic();
G4HadronElasticProcess* elastic = new G4HadronElasticProcess();
elastic -> RegisterMe(elastic_Model);
// PRECOMPOUND MODEL
G4PreCompoundModel* thePreEquilib = new G4PreCompoundModel(&theHandler);
thePreEquilib -> SetMinEnergy(precompoundLowLimit);
thePreEquilib -> SetMaxEnergy(precompoundHighLimit);
/////////////////////////////////////////////////////////////////////////////
// HADRONIC PHYSICS FOR PROTONS
G4ParticleDefinition* particle = 0;
G4ProcessManager* pmanager = 0;
particle = G4Proton::Proton();
pmanager = particle -> GetProcessManager();
// INELASTIC SCATTERING:
//BINARY - PRECOMPOUND + DEFAULT EVAPORATION NO FERMI BREAK-UP
G4BinaryCascade* thePBC = new G4BinaryCascade();
thePBC -> SetMinEnergy(binaryLowLimit);
thePBC -> SetMaxEnergy(binaryHighLimit);
theIPProton.RegisterMe(thePBC);
theIPProton.RegisterMe(thePreEquilib);
theIPProton.AddDataSet(&thePXSec);
pmanager -> AddDiscreteProcess(&theIPProton);
// ELASTIC SCATTERING
pmanager -> AddDiscreteProcess(elastic); //ELASIC SCATTERING
/////////////////////////////////////////////////////////////////////////////
////////// VERIFICARE LA POSSIBILITA' DEL BINARY PER PIONI
/////////////////////////////////////////////////////////////////////////////
// HADRONIC PHYSICS FOR PION PLUS
particle = G4PionPlus::PionPlus();
// ELASTIC SCATTERING
pmanager -> AddDiscreteProcess(elastic);
// INELASTIC SCATTERING: BINARY - PRECOMPOUND + DEFAULT EVAPORATION NO FERMI BREAK-UP
pmanager -> AddDiscreteProcess(elastic);
G4PionPlusInelasticProcess* thePionPlusInelasticProcess = new G4PionPlusInelasticProcess("inelastic");
G4PreCompoundModel* theLEPionPlusInelasticModel = new G4PreCompoundModel(&theHandler);
thePionPlusInelasticProcess -> RegisterMe(theLEPionPlusInelasticModel);
pmanager -> AddDiscreteProcess(thePionPlusInelasticProcess);
/////////////////////////////////////////////////////////////////////////////
//HADRONIC PHYSICS FOR PION MINUS
particle = G4PionMinus::PionMinus();
// ELASTIC SCATTERING
pmanager -> AddDiscreteProcess(elastic);
// INELASTIC SCATTERING: BINARY - PRECOMPOUND + DEFAULT EVAPORATION NO FERMI BREAK-UP
G4PionMinusInelasticProcess* thePionMinusInelasticProcess = new G4PionMinusInelasticProcess("inelastic");
G4PreCompoundModel* theLEPionMinusInelasticModel = new G4PreCompoundModel(&theHandler);
thePionMinusInelasticProcess -> RegisterMe(theLEPionMinusInelasticModel);
pmanager -> AddDiscreteProcess(thePionMinusInelasticProcess);
/////////////////////////////////////////////////////////////////////////////
// Neutron
particle = G4Neutron::Neutron();
pmanager = particle->GetProcessManager();
thePreEquilib -> SetMinEnergy(precompoundLowLimit);
thePreEquilib -> SetMaxEnergy(precompoundHighLimit);
G4BinaryCascade* theNBC = new G4BinaryCascade();
theNBC->SetMinEnergy(binaryLowLimit);
theNBC->SetMaxEnergy(binaryHighLimit);
theIPNeutron.RegisterMe(theNBC);
theIPNeutron.RegisterMe(thePreEquilib);
theIPNeutron.AddDataSet(&theNXSec);
pmanager -> AddDiscreteProcess(&theIPNeutron);
pmanager -> AddDiscreteProcess(elastic); // ELASTIC SCATTERING
//Hadron Capture
G4HadronCaptureProcess* neutronCapture = new G4HadronCaptureProcess();
G4LCapture* capture_model = new G4LCapture();
capture_model -> SetMinEnergy(neutronLowLimit);
capture_model -> SetMaxEnergy(neutronHighLimit);
neutronCapture -> RegisterMe(capture_model);
pmanager -> AddDiscreteProcess(neutronCapture);
//Fission
G4HadronFissionProcess* fission = new G4HadronFissionProcess();
G4LFission* fission_model = new G4LFission();
fission_model -> SetMinEnergy(neutronLowLimit);
fission_model -> SetMaxEnergy(neutronHighLimit);
fission -> RegisterMe(fission_model);
pmanager -> AddDiscreteProcess(fission);
/////////////////////////////////////////////////////////////////////////////
// ION HADRONIC PHYSICS LIST
G4TripathiCrossSection * TripathiCrossSection= new G4TripathiCrossSection;
G4IonsShenCrossSection * aShen = new G4IonsShenCrossSection;
// INELASTIC SCATTERING FOR IONS
G4BinaryLightIonReaction* theBC = new G4BinaryLightIonReaction();
theBC -> SetMinEnergy(binaryLightIonLowLimit);
theBC -> SetMaxEnergy(binaryLightIonHighLimit);
/////////////////////////////////////////////////////////////////////////////
// deuteron
particle = G4Deuteron::Deuteron();
pmanager = particle -> GetProcessManager();
// INELASTIC SCATTERING
G4LEDeuteronInelastic* theDIModel = new G4LEDeuteronInelastic;
theDIModel -> SetMaxEnergy(LEPHighLimit);
theIPdeuteron.AddDataSet(TripathiCrossSection);
theIPdeuteron.AddDataSet(aShen);
theIPdeuteron.RegisterMe(theDIModel);
theIPdeuteron.RegisterMe(theBC);
pmanager -> AddDiscreteProcess(&theIPdeuteron);
//ELASTIC SCATTERING
pmanager -> AddDiscreteProcess(elastic);
/////////////////////////////////////////////////////////////////////////////
// triton
particle = G4Triton::Triton();
pmanager = particle->GetProcessManager();
// INELASTIC SCATTERING
G4LETritonInelastic* theTIModel = new G4LETritonInelastic;
theTIModel -> SetMaxEnergy(LEPHighLimit);
theIPtriton.AddDataSet(TripathiCrossSection);
theIPtriton.AddDataSet(aShen);
theIPtriton.RegisterMe(theTIModel);
theIPtriton.RegisterMe(theBC);
pmanager -> AddDiscreteProcess(&theIPtriton);
//ELASTIC SCATTERING
pmanager -> AddDiscreteProcess(elastic); //ELASTIC SCATTERING
/////////////////////////////////////////////////////////////////////////////
// alpha
particle = G4Alpha::Alpha();
pmanager = particle->GetProcessManager();
// INELASTIC SCATTERING
G4LEAlphaInelastic* theAIModel = new G4LEAlphaInelastic;
theAIModel -> SetMaxEnergy(LEPHighLimit);
theIPalpha.AddDataSet(TripathiCrossSection);
theIPalpha.AddDataSet(aShen);
theIPalpha.RegisterMe(theAIModel);
theIPalpha.RegisterMe(theBC);
pmanager -> AddDiscreteProcess(&theIPalpha);
//ELASTIC SCATTERING
pmanager -> AddDiscreteProcess(elastic); //ELASTIC SCATTERING
/////////////////////////////////////////////////////////////////////////////
// He3
particle = G4He3::He3();
pmanager = particle->GetProcessManager();
G4BinaryLightIonReaction * theGenIonBC= new G4BinaryLightIonReaction;
G4HadronInelasticProcess* theIPHe3 =
new G4HadronInelasticProcess("He3Inelastic",particle);
theIPHe3 -> AddDataSet(TripathiCrossSection);
theIPHe3 -> AddDataSet(aShen);
theIPHe3 -> RegisterMe(theGenIonBC);
pmanager -> AddDiscreteProcess(theIPHe3);
pmanager -> AddDiscreteProcess(elastic); //ELASTIC SCATTERING
}
@@ -100,249 +100,186 @@ HadrontherapyProtonPrecompound::~HadrontherapyProtonPrecompound()
void HadrontherapyProtonPrecompound::ConstructProcess()
{
G4ParticleDefinition* particle = 0;
G4ProcessManager* pmanager = 0;
G4ParticleDefinition* particle = 0;
G4ProcessManager* pmanager = 0;
// Elastic scattering
// for protons, neutrons, pions, ions
// LOW ENERGY ELASTIC SCATTERING
// FOR PROTON, NEUTRON, IONS
G4LElastic* elastic_Model = new G4LElastic();
G4HadronElasticProcess* elastic = new G4HadronElasticProcess();
elastic -> RegisterMe(elastic_Model);
// Activation of Precompound model + evaporation (default evaporation)
// The Fermi break-up is not active (default condition)
// for protons, pions and neutrons
G4PreCompoundModel* preEquilibrium = new G4PreCompoundModel(&theHandler);
preEquilibrium -> SetMinEnergy(precompoundLowLimit);
preEquilibrium -> SetMaxEnergy(precompoundHighLimit);
// INELASTIC SCATTERING
// Binary Cascade
G4BinaryLightIonReaction* theBC = new G4BinaryLightIonReaction();
// Set the min and max energy for the Binary Cascade
theBC -> SetMinEnergy(binaryLightIonLowLimit);
theBC -> SetMaxEnergy(binaryLightIonHighLimit);
// TRIPATHI CROSS SECTION
// Implementation of formulas in analogy to NASA technical paper 3621 by
// Tripathi, et al. Cross-sections for ion ion scattering
G4TripathiCrossSection* TripathiCrossSection = new G4TripathiCrossSection;
// IONS SHEN CROSS SECTION
// Implementation of formulas
// Shen et al. Nuc. Phys. A 491 130 (1989)
// Total Reaction Cross Section for Heavy-Ion Collisions
G4IonsShenCrossSection* aShen = new G4IonsShenCrossSection;
//----------//
// Protons //
//----------//
//--------------------------------------------------------------------------------------
// Inelastic process for protons
// Proton PRECOMPOUND + EVAPORATION(DEFAULT EVAPORATION)+ FERMI BREAK-UP
particle = G4Proton::Proton();
pmanager = particle -> GetProcessManager();
pmanager = particle->GetProcessManager();
// Activation of the Precompound model for the proton
// inelastic process
//G4ProtonInelasticProcess protonInelasticScattering;
protonInelasticScattering.RegisterMe(preEquilibrium);
// Set the cross section for the proton inelastic process
//G4ProtonInelasticCrossSection protonInelasticCrossSection;
protonInelasticScattering.AddDataSet(&protonInelasticCrossSection);
G4PreCompoundModel* thePreEquilib = new G4PreCompoundModel(&theHandler);
// Set the range of minimum and maximum energy value
thePreEquilib -> SetMinEnergy(precompoundLowLimit);
thePreEquilib -> SetMaxEnergy(precompoundHighLimit);
// Model Registration
theIPProton.RegisterMe(thePreEquilib);
// Active the Cross-sections for proton nuclear scattering up to 20 GeV
theIPProton.AddDataSet(&thePXSec);
// Active the proton inelastic scattering using the precompound model
pmanager -> AddDiscreteProcess(&theIPProton);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// Set the proton hadronic processes: inelastic and elastic scattering
pmanager -> AddDiscreteProcess(&protonInelasticScattering);
pmanager -> AddDiscreteProcess(elastic);
//----------//
// Neutrons //
//----------//
// Inelastic process for neutrons
particle = G4Neutron::Neutron();
pmanager = particle -> GetProcessManager();
// Activation of the Precompound model for the neutrons
// inelastic process
neutronInelasticScattering.RegisterMe(preEquilibrium);
// Set the cross section for the neutron inelastic process
neutronInelasticScattering.AddDataSet(&neutronInelasticCrossSection);
// Set the neutron hadronic processes: inelastic and elastic scattering
pmanager -> AddDiscreteProcess(&neutronInelasticScattering);
pmanager -> AddDiscreteProcess(elastic);
//----------//
// Pions //
//----------//
// Inelastic process for pions
// Pions plus
particle = G4PionPlus::PionPlus();
pmanager = particle -> GetProcessManager();
// Activation of the Precompound model for the pion plus
// inelastic process
pionPlusInelasticScattering.RegisterMe(preEquilibrium);
// Set the cross section for the pion inelastic process
pionPlusInelasticScattering.AddDataSet(&pionPlusInelasticCrossSection);
// Set the pion plus hadronic processes: inelastic and elastic scattering
pmanager -> AddDiscreteProcess(&pionPlusInelasticScattering);
pmanager -> AddDiscreteProcess(elastic);
// Pions minus
particle = G4PionMinus::PionMinus();
pmanager = particle -> GetProcessManager();
// Activation of the Precompound model for the pion minus
// inelastic process
pionMinusInelasticScattering.RegisterMe(preEquilibrium);
// Set the cross section for the pion minus inelastic process
pionMinusInelasticScattering.AddDataSet(&pionMinusInelasticCrossSection);
// Set the pion minus hadronic processes: inelastic and elastic scattering
pmanager -> AddDiscreteProcess(&pionMinusInelasticScattering);
pmanager -> AddDiscreteProcess(elastic);
pmanager -> AddRestProcess(new G4PiMinusAbsorptionAtRest, ordDefault);
//------------------//
//d, t, 3He, alpha //
//------------------//
//Inelastic scattering for d, t, 3He, alpha
//Activation of the Low Energy Parameterised (LEP) model and binary ion model
// for the inelastic scattering
G4BinaryLightIonReaction* binaryIonCascade = new G4BinaryLightIonReaction();
binaryIonCascade -> SetMinEnergy(binaryLightIonLowLimit);
binaryIonCascade -> SetMaxEnergy(binaryLightIonHighLimit);
// Set the cross section for the inelastic scattering
TripathiCrossSection = new G4TripathiCrossSection;
ShenCrossSection = new G4IonsShenCrossSection;
// Deuteron
// deuteron
particle = G4Deuteron::Deuteron();
pmanager = particle -> GetProcessManager();
// Activate the LEP model for the d inelastic scattering
G4LEDeuteronInelastic* deuteronLEPModel = new G4LEDeuteronInelastic;
deuteronLEPModel -> SetMaxEnergy(LEPHighLimit);
// Final state production model for Deuteron inelastic scattering below 100 MeV
G4LEDeuteronInelastic* theDIModel = new G4LEDeuteronInelastic;
// Set the maximum energy for LEP model
theDIModel -> SetMaxEnergy(LEPHighLimit);
// Active the Tripathi and aShen Cross Section
theIPdeuteron.AddDataSet(TripathiCrossSection);
theIPdeuteron.AddDataSet(aShen);
// Register the Deuteron Inelastic and Binary Cascade Model
theIPdeuteron.RegisterMe(theDIModel);
theIPdeuteron.RegisterMe(theBC);
// Active the deuteron inelastic scattering using the deuteron inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPdeuteron);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// Activate the binary ion model model for the d inelastic scattering
deuteronInelasticScattering.RegisterMe(deuteronLEPModel);
deuteronInelasticScattering.RegisterMe(binaryIonCascade);
// Definition of the the deuteron inelastic scattering cross section
deuteronInelasticScattering.AddDataSet(TripathiCrossSection);
deuteronInelasticScattering.AddDataSet(ShenCrossSection);
// Set the deuteron hadronic processes: inelastic and elastic scattering
pmanager -> AddDiscreteProcess(&deuteronInelasticScattering);
pmanager -> AddDiscreteProcess(elastic);
// Triton
// triton
particle = G4Triton::Triton();
pmanager = particle -> GetProcessManager();
// Activate the LEP model for the t inelastic scattering
G4LETritonInelastic* tritonLEPModel = new G4LETritonInelastic;
tritonLEPModel -> SetMaxEnergy(LEPHighLimit);
// Activate the binary ion model model for the t inelastic scattering
tritonInelasticScattering.RegisterMe(tritonLEPModel);
tritonInelasticScattering.RegisterMe(binaryIonCascade);
// Definition of the the triton inelastic scattering cross section
tritonInelasticScattering.AddDataSet(TripathiCrossSection);
tritonInelasticScattering.AddDataSet(ShenCrossSection);
// Set the triton hadronic processes: inelastic and elastic scattering
pmanager -> AddDiscreteProcess(&tritonInelasticScattering);
pmanager -> AddDiscreteProcess(elastic);
pmanager = particle->GetProcessManager();
// Final state production model for Triton inelastic scattering below 100 MeV
G4LETritonInelastic* theTIModel = new G4LETritonInelastic;
// Set the maximum energy for LEP model
theTIModel -> SetMaxEnergy(LEPHighLimit);
// Active the Tripathi and aShen Cross Section
theIPtriton.AddDataSet(TripathiCrossSection);
theIPtriton.AddDataSet(aShen);
// Register the Triton Inelastic and Binary Cascade Model
theIPtriton.RegisterMe(theTIModel);
theIPtriton.RegisterMe(theBC);
// Active the triton inelastic scattering using the triton inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPtriton);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// alpha
particle = G4Alpha::Alpha();
pmanager = particle->GetProcessManager();
// Final state production model for Alpha inelastic scattering below 20 GeV
G4LEAlphaInelastic* theAIModel = new G4LEAlphaInelastic;
// Set the maximum energy for LEP model
theAIModel -> SetMaxEnergy(LEPHighLimit);
// Register the Triton Inelastic and Binary Cascade Model
theIPalpha.AddDataSet(TripathiCrossSection);
theIPalpha.AddDataSet(aShen);
// Register the Alpha Inelastic and Binary Cascade Model
theIPalpha.RegisterMe(theAIModel);
theIPalpha.RegisterMe(theBC);
// Active the alpha inelastic scattering using the alpha inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPalpha);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// He3
particle = G4He3::He3();
pmanager = particle->GetProcessManager();
// Binary Cascade inelastic scattering for ions
G4BinaryLightIonReaction * theGenIonBC= new G4BinaryLightIonReaction;
// Inelastic Scattering for ions
G4HadronInelasticProcess* theIPHe3 = new G4HadronInelasticProcess("He3Inelastic",particle);
// Active the Tripathi and aShen Cross Section
theIPHe3 -> AddDataSet(TripathiCrossSection);
theIPHe3 -> AddDataSet(aShen);
// Register the Alpha Binary Cascade Model
theIPHe3 -> RegisterMe(theGenIonBC);
// Active the Inelastic Process for He3
pmanager -> AddDiscreteProcess(theIPHe3);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// Neutron
particle = G4Neutron::Neutron();
pmanager = particle->GetProcessManager();
// Register the Precompound model
theIPNeutron.RegisterMe(thePreEquilib);
// Active the Cross-sections for neutron nuclear scattering from 14 MeV up to 20 GeV
theIPNeutron.AddDataSet(&theNXSec);
// Active the neutron inelastic process
pmanager -> AddDiscreteProcess(&theIPNeutron);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// Pions plus
particle = G4PionPlus::PionPlus();
pmanager = particle -> GetProcessManager();
// Define the inelastic process for pions plus
G4PionPlusInelasticProcess* thePionPlusInelasticProcess = new G4PionPlusInelasticProcess("inelastic");
// Register the Low Energy Inelastic Model for pions plus
thePionPlusInelasticProcess -> RegisterMe(thePreEquilib);
// Active the inelastic process for pions plus
pmanager->AddDiscreteProcess(thePionPlusInelasticProcess);
pmanager -> AddDiscreteProcess(elastic);
// Activate the LEP model for the alpha inelastic scattering
G4LEAlphaInelastic* alphaLEPModel = new G4LEAlphaInelastic;
alphaLEPModel -> SetMaxEnergy(LEPHighLimit);
// Activate the binary ion model model for the alpha inelastic scattering
alphaInelasticScattering.RegisterMe(alphaLEPModel);
alphaInelasticScattering.RegisterMe(binaryIonCascade);
// Definition of the alpha inelastic scattering cross section
alphaInelasticScattering.AddDataSet(TripathiCrossSection);
alphaInelasticScattering.AddDataSet(ShenCrossSection);
// Set the alpha hadronic processes: inelastic and elastic scattering
pmanager -> AddDiscreteProcess(&alphaInelasticScattering);
pmanager -> AddDiscreteProcess(elastic);
/////////////////////////////////////////////////////////////////////////////
// NEW HE3
/////////////////////////////////////////////////////////////////////////////
//TripathiCrossSection = new G4TripathiCrossSection;
//ShenCrossSection = new G4IonsShenCrossSection;
pmanager->AddDiscreteProcess(elastic);
He3InelasticProcess = new G4HadronInelasticProcess
("He3Inelastic", G4He3::He3());
He3InelasticProcess->AddDataSet(TripathiCrossSection);
He3InelasticProcess->AddDataSet(ShenCrossSection);
He3InelasticProcess->RegisterMe(binaryIonCascade);
pmanager->AddDiscreteProcess(He3InelasticProcess);
// // He3
// particle = G4He3::He3();
// pmanager = particle -> GetProcessManager();
// // Only Binary Ion model activated
// // LEP model is not availaboe for 3He
// G4HadronInelasticProcess* He3InelasticScattering =
// new G4HadronInelasticProcess("Inelastic scattering", particle);
// // Change the binary ion model limits because the LEP is not available
// //
// binaryIonCascade -> SetMinEnergy(0.*MeV);
// binaryIonCascade -> SetMaxEnergy(binaryLightIonHighLimit);
// // Definition of the 3He inelastic scattering cross section
// He3InelasticScattering -> AddDataSet(TripathiCrossSection);
// He3InelasticScattering -> AddDataSet(aShen);
// He3InelasticScattering -> RegisterMe(binaryIonCascade);
// // Set the He3 hadronic processes: inelastic and elastic scattering
// pmanager -> AddDiscreteProcess(He3InelasticScattering);
// pmanager -> AddDiscreteProcess(elastic);
// Other neutron processes
//Hadron Capture
// Pion Minus
particle = G4PionMinus::PionMinus();
pmanager = particle -> GetProcessManager();
// Define the inelastic process for pions minus
G4PionMinusInelasticProcess* thePionMinusInelasticProcess = new G4PionMinusInelasticProcess("inelastic");
// Register the inelastic model for pion minus
thePionMinusInelasticProcess -> RegisterMe(thePreEquilib);
// Active the inelastic process for pion minus
pmanager -> AddDiscreteProcess(thePionMinusInelasticProcess);
// Active Absorption process for pion minus
pmanager -> AddRestProcess(new G4PiMinusAbsorptionAtRest, ordDefault);
pmanager -> AddDiscreteProcess(elastic);
//HADRON CAPTURE
// Process for capture of neutral hadrons
G4HadronCaptureProcess* neutronCapture = new G4HadronCaptureProcess();
// Final state production model for capture of neutral hadrons in nuclei
G4LCapture* capture_model = new G4LCapture();
// Set the energy range for the capture model
capture_model -> SetMinEnergy(neutronLowLimit);
capture_model -> SetMaxEnergy(neutronHighLimit);
// Register the capture model
neutronCapture -> RegisterMe(capture_model);
// Active the neutron capture process
pmanager -> AddDiscreteProcess(neutronCapture);
//Fission
//FISSION
// Process for induced fission
G4HadronFissionProcess* fission = new G4HadronFissionProcess();
//Final state production model for induced fission
G4LFission* fission_model = new G4LFission();
// Set the energy range for the fission model
fission_model -> SetMinEnergy(neutronLowLimit);
fission_model -> SetMaxEnergy(neutronHighLimit);
// Register the fission model
fission -> RegisterMe(fission_model);
pmanager -> AddDiscreteProcess(fission);
// Active the fission process
pmanager -> AddDiscreteProcess(fission);
}
@@ -0,0 +1,298 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
// $Id: HadrontherapyProtonPrecompoundFermi.cc; May 2005
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
// Code developed by:
//
// G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
//
// (a) Laboratori Nazionali del Sud
// of the National Institute for Nuclear Physics, Catania, Italy
// (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
//
// * cirrone@lns.infn.it
// ----------------------------------------------------------------------------
#include "HadrontherapyProtonPrecompoundFermi.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4LElastic.hh"
#include "G4BinaryCascade.hh"
#include "G4CascadeInterface.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4HEPionPlusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
#include "G4PiMinusAbsorptionAtRest.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4HEAntiProtonInelastic.hh"
#include "G4AntiProtonAnnihilationAtRest.hh"
#include "G4FermiBreakUp.hh"
#include "G4PiNuclearCrossSection.hh"
//
//
// PRECOMPOUND + FERMI BREAKUP PHYSICS LIST
//
// ELASTIC SCATTERING FOR ALL THE HADRONS AND IONS
// INELASTIC SCATTERING:
// * PRECOMPOUND PHYSICS LIST with DEFAULT EVAPORATION MODEL + FERMI BREAK-UP
// * PRECOMPOUND + EVAPORATION + FERMI BREAK-UP FOR PROTONS, NEUTRONS AND PIONS
// * LEP MODEL UP TO 100 MEV AND BINARY ION MODEL BETWEEN 80 MEV AND 40. GEV
// FOR DEUTERON, TRITON, HE3, ALPHA
// * FISSION AND HADRON CAPTURE FOR NEUTRONS BETWEEN 0. MEV AND 100. TEV
//
//
HadrontherapyProtonPrecompoundFermi::HadrontherapyProtonPrecompoundFermi(const G4String& name):
G4VPhysicsConstructor(name)
{
// Inelastic process, energy limits
// Protons, neutrons and pions
// Energy limit of the precompound model
precompoundLowLimit = 0.*MeV;
precompoundHighLimit = 300.*MeV;
// Energy limit of the neutron fission and capture
neutronLowLimit = 0.*TeV;
neutronHighLimit = 100.*TeV;
// Ions
// Energy limit of the binary ion model
binaryLightIonLowLimit = 80.*MeV;
binaryLightIonHighLimit = 40.*GeV;
// Energy limit of the LEP model for ions
LEPHighLimit = 100.*MeV;
//targetZ should vary between 1 and 8
targetZ = 1;
targetA = 2 * targetZ;
}
HadrontherapyProtonPrecompoundFermi::~HadrontherapyProtonPrecompoundFermi()
{}
void HadrontherapyProtonPrecompoundFermi::ConstructProcess()
{
G4ParticleDefinition* particle = 0;
G4ProcessManager* pmanager = 0;
// LOW ENERGY ELASTIC SCATTERING
// FOR PROTON, NEUTRON, IONS
G4LElastic* elastic_Model = new G4LElastic();
G4HadronElasticProcess* elastic = new G4HadronElasticProcess();
elastic -> RegisterMe(elastic_Model);
// FERMI BREAK-UP MODEL
G4FermiBreakUp* breakup = new G4FermiBreakUp();
// Set the Fermi break up model
theHandler.SetFermiModel(breakup);
// fix the target A and Z;
theHandler.SetMaxAandZForFermiBreakUp(targetA,targetZ);
// INELASTIC SCATTERING
// Binary Cascade
G4BinaryLightIonReaction* theBC = new G4BinaryLightIonReaction();
// Set the min and max energy for the Binary Cascade
theBC -> SetMinEnergy(binaryLightIonLowLimit);
theBC -> SetMaxEnergy(binaryLightIonHighLimit);
// TRIPATHI CROSS SECTION
// Implementation of formulas in analogy to NASA technical paper 3621 by
// Tripathi, et al. Cross-sections for ion ion scattering
G4TripathiCrossSection* TripathiCrossSection = new G4TripathiCrossSection;
// IONS SHEN CROSS SECTION
// Implementation of formulas
// Shen et al. Nuc. Phys. A 491 130 (1989)
// Total Reaction Cross Section for Heavy-Ion Collisions
G4IonsShenCrossSection* aShen = new G4IonsShenCrossSection;
//--------------------------------------------------------------------------------------
// Proton PRECOMPOUND + EVAPORATION(DEFAULT EVAPORATION)+ FERMI BREAK-UP
particle = G4Proton::Proton();
pmanager = particle->GetProcessManager();
G4PreCompoundModel* thePreEquilib = new G4PreCompoundModel(&theHandler);
// Set the range of minimum and maximum energy value
thePreEquilib -> SetMinEnergy(precompoundLowLimit);
thePreEquilib -> SetMaxEnergy(precompoundHighLimit);
// Model Registration
theIPProton.RegisterMe(thePreEquilib);
// Active the Cross-sections for proton nuclear scattering up to 20 GeV
theIPProton.AddDataSet(&thePXSec);
// Active the proton inelastic scattering using the precompound model
pmanager -> AddDiscreteProcess(&theIPProton);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// deuteron
particle = G4Deuteron::Deuteron();
pmanager = particle -> GetProcessManager();
// Final state production model for Deuteron inelastic scattering below 100 MeV
G4LEDeuteronInelastic* theDIModel = new G4LEDeuteronInelastic;
// Set the maximum energy for LEP model
theDIModel -> SetMaxEnergy(LEPHighLimit);
// Active the Tripathi and aShen Cross Section
theIPdeuteron.AddDataSet(TripathiCrossSection);
theIPdeuteron.AddDataSet(aShen);
// Register the Deuteron Inelastic and Binary Cascade Model
theIPdeuteron.RegisterMe(theDIModel);
theIPdeuteron.RegisterMe(theBC);
// Active the deuteron inelastic scattering using the deuteron inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPdeuteron);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// triton
particle = G4Triton::Triton();
pmanager = particle->GetProcessManager();
// Final state production model for Triton inelastic scattering below 100 MeV
G4LETritonInelastic* theTIModel = new G4LETritonInelastic;
// Set the maximum energy for LEP model
theTIModel -> SetMaxEnergy(LEPHighLimit);
// Active the Tripathi and aShen Cross Section
theIPtriton.AddDataSet(TripathiCrossSection);
theIPtriton.AddDataSet(aShen);
// Register the Triton Inelastic and Binary Cascade Model
theIPtriton.RegisterMe(theTIModel);
theIPtriton.RegisterMe(theBC);
// Active the triton inelastic scattering using the triton inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPtriton);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// alpha
particle = G4Alpha::Alpha();
pmanager = particle->GetProcessManager();
// Final state production model for Alpha inelastic scattering below 20 GeV
G4LEAlphaInelastic* theAIModel = new G4LEAlphaInelastic;
// Set the maximum energy for LEP model
theAIModel -> SetMaxEnergy(LEPHighLimit);
// Register the Triton Inelastic and Binary Cascade Model
theIPalpha.AddDataSet(TripathiCrossSection);
theIPalpha.AddDataSet(aShen);
// Register the Alpha Inelastic and Binary Cascade Model
theIPalpha.RegisterMe(theAIModel);
theIPalpha.RegisterMe(theBC);
// Active the alpha inelastic scattering using the alpha inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPalpha);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// He3
particle = G4He3::He3();
pmanager = particle->GetProcessManager();
// Binary Cascade inelastic scattering for ions
G4BinaryLightIonReaction * theGenIonBC= new G4BinaryLightIonReaction;
// Inelastic Scattering for ions
G4HadronInelasticProcess* theIPHe3 = new G4HadronInelasticProcess("He3Inelastic",particle);
// Active the Tripathi and aShen Cross Section
theIPHe3 -> AddDataSet(TripathiCrossSection);
theIPHe3 -> AddDataSet(aShen);
// Register the Alpha Binary Cascade Model
theIPHe3 -> RegisterMe(theGenIonBC);
// Active the Inelastic Process for He3
pmanager -> AddDiscreteProcess(theIPHe3);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// Neutron
particle = G4Neutron::Neutron();
pmanager = particle->GetProcessManager();
// Register the Precompound model
theIPNeutron.RegisterMe(thePreEquilib);
// Active the Cross-sections for neutron nuclear scattering from 14 MeV up to 20 GeV
theIPNeutron.AddDataSet(&theNXSec);
// Active the neutron inelastic process
pmanager -> AddDiscreteProcess(&theIPNeutron);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// Pions plus
particle = G4PionPlus::PionPlus();
pmanager = particle -> GetProcessManager();
// Define the inelastic process for pions plus
G4PionPlusInelasticProcess* thePionPlusInelasticProcess = new G4PionPlusInelasticProcess("inelastic");
// Register the Low Energy Inelastic Model for pions plus
thePionPlusInelasticProcess -> RegisterMe(thePreEquilib);
// Active the inelastic process for pions plus
pmanager->AddDiscreteProcess(thePionPlusInelasticProcess);
pmanager -> AddDiscreteProcess(elastic);
// Pion Minus
particle = G4PionMinus::PionMinus();
pmanager = particle -> GetProcessManager();
// Define the inelastic process for pions minus
G4PionMinusInelasticProcess* thePionMinusInelasticProcess = new G4PionMinusInelasticProcess("inelastic");
// Register the inelastic model for pion minus
thePionMinusInelasticProcess -> RegisterMe(thePreEquilib);
// Active the inelastic process for pion minus
pmanager -> AddDiscreteProcess(thePionMinusInelasticProcess);
// Active Absorption process for pion minus
pmanager -> AddRestProcess(new G4PiMinusAbsorptionAtRest, ordDefault);
pmanager -> AddDiscreteProcess(elastic);
//HADRON CAPTURE
// Process for capture of neutral hadrons
G4HadronCaptureProcess* neutronCapture = new G4HadronCaptureProcess();
// Final state production model for capture of neutral hadrons in nuclei
G4LCapture* capture_model = new G4LCapture();
// Set the energy range for the capture model
capture_model -> SetMinEnergy(neutronLowLimit);
capture_model -> SetMaxEnergy(neutronHighLimit);
// Register the capture model
neutronCapture -> RegisterMe(capture_model);
// Active the neutron capture process
pmanager -> AddDiscreteProcess(neutronCapture);
//FISSION
// Process for induced fission
G4HadronFissionProcess* fission = new G4HadronFissionProcess();
//Final state production model for induced fission
G4LFission* fission_model = new G4LFission();
// Set the energy range for the fission model
fission_model -> SetMinEnergy(neutronLowLimit);
fission_model -> SetMaxEnergy(neutronHighLimit);
// Register the fission model
fission -> RegisterMe(fission_model);
// Active the fission process
pmanager -> AddDiscreteProcess(fission);
}
@@ -0,0 +1,291 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
// $Id: HadrontherapyProtonPrecompoundGEM.cc; May 2005
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
// Code developed by:
//
// G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
//
// (a) Laboratori Nazionali del Sud
// of the National Institute for Nuclear Physics, Catania, Italy
// (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
//
// * cirrone@lns.infn.it
// ----------------------------------------------------------------------------
#include "HadrontherapyProtonPrecompoundGEM.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4LElastic.hh"
#include "G4BinaryCascade.hh"
#include "G4CascadeInterface.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4HEPionPlusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
#include "G4PiMinusAbsorptionAtRest.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4HEAntiProtonInelastic.hh"
#include "G4AntiProtonAnnihilationAtRest.hh"
#include "G4Evaporation.hh"
#include "G4ExcitationHandler.hh"
//
//
// HADRONIC PHYSICS LIST
//
// - ELASTIC SCATTERING FOR ALL THE HADRONS AND IONS
// - INELASTIC SCATTERING:
// * PRECOMPOUND PHYSICS LIST with GEM EVAPORATION MODEL
// * PRECOMPOUND + EVAPORATION(GEM MODEL) NO FERMI BREAK-UP FOR PROTONS, NEUTRONS AND PIONS
// * LEP MODEL UP TO 100 MEV AND BINARY ION MODEL BETWEEN 80 MEV AND 40. GEV
// FOR DEUTERON, TRITON, HE3, ALPHA
// * FISSION AND HADRON CAPTURE FOR NEUTRONS BETWEEN 0. MEV AND 100. TEV
//
//
HadrontherapyProtonPrecompoundGEM::HadrontherapyProtonPrecompoundGEM(const G4String& name):
G4VPhysicsConstructor(name)
{
// Inelastic process, energy limits
// Protons, neutrons and pions
// Energy limit of the precompound model
precompoundLowLimit = 0.*MeV;
precompoundHighLimit = 300.*MeV;
// Energy limit of the neutron fission and capture
neutronLowLimit = 0.*TeV;
neutronHighLimit = 100.*TeV;
// Ions
// Energy limit of the binary ion model
binaryLightIonLowLimit = 80.*MeV;
binaryLightIonHighLimit = 40.*GeV;
// Energy limit of the LEP model for ions
LEPHighLimit = 100.*MeV;
}
HadrontherapyProtonPrecompoundGEM::~HadrontherapyProtonPrecompoundGEM()
{}
void HadrontherapyProtonPrecompoundGEM::ConstructProcess()
{
G4ParticleDefinition* particle = 0;
G4ProcessManager* pmanager = 0;
// LOW ENERGY ELASTIC SCATTERING
// FOR PROTON, NEUTRON, IONS
G4LElastic* elastic_Model = new G4LElastic();
G4HadronElasticProcess* elastic = new G4HadronElasticProcess();
elastic -> RegisterMe(elastic_Model);
// GEM EVAPORATION MODEL
G4Evaporation* evaporation = new G4Evaporation();
evaporation -> SetGEMChannel();
theHandler.SetEvaporation(evaporation);
// INELASTIC SCATTERING
// Binary Cascade
G4BinaryLightIonReaction* theBC = new G4BinaryLightIonReaction();
// Set the min and max energy for the Binary Cascade
theBC -> SetMinEnergy(binaryLightIonLowLimit);
theBC -> SetMaxEnergy(binaryLightIonHighLimit);
// TRIPATHI CROSS SECTION
// Implementation of formulas in analogy to NASA technical paper 3621 by
// Tripathi, et al. Cross-sections for ion ion scattering
G4TripathiCrossSection* TripathiCrossSection = new G4TripathiCrossSection;
// IONS SHEN CROSS SECTION
// Implementation of formulas
// Shen et al. Nuc. Phys. A 491 130 (1989)
// Total Reaction Cross Section for Heavy-Ion Collisions
G4IonsShenCrossSection* aShen = new G4IonsShenCrossSection;
//--------------------------------------------------------------------------------------
// Proton PRECOMPOUND + EVAPORATION(DEFAULT EVAPORATION)+ FERMI BREAK-UP
particle = G4Proton::Proton();
pmanager = particle->GetProcessManager();
G4PreCompoundModel* thePreEquilib = new G4PreCompoundModel(&theHandler);
// Set the range of minimum and maximum energy value
thePreEquilib -> SetMinEnergy(precompoundLowLimit);
thePreEquilib -> SetMaxEnergy(precompoundHighLimit);
// Model Registration
theIPProton.RegisterMe(thePreEquilib);
// Active the Cross-sections for proton nuclear scattering up to 20 GeV
theIPProton.AddDataSet(&thePXSec);
// Active the proton inelastic scattering using the precompound model
pmanager -> AddDiscreteProcess(&theIPProton);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// deuteron
particle = G4Deuteron::Deuteron();
pmanager = particle -> GetProcessManager();
// Final state production model for Deuteron inelastic scattering below 100 MeV
G4LEDeuteronInelastic* theDIModel = new G4LEDeuteronInelastic;
// Set the maximum energy for LEP model
theDIModel -> SetMaxEnergy(LEPHighLimit);
// Active the Tripathi and aShen Cross Section
theIPdeuteron.AddDataSet(TripathiCrossSection);
theIPdeuteron.AddDataSet(aShen);
// Register the Deuteron Inelastic and Binary Cascade Model
theIPdeuteron.RegisterMe(theDIModel);
theIPdeuteron.RegisterMe(theBC);
// Active the deuteron inelastic scattering using the deuteron inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPdeuteron);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// triton
particle = G4Triton::Triton();
pmanager = particle->GetProcessManager();
// Final state production model for Triton inelastic scattering below 100 MeV
G4LETritonInelastic* theTIModel = new G4LETritonInelastic;
// Set the maximum energy for LEP model
theTIModel -> SetMaxEnergy(LEPHighLimit);
// Active the Tripathi and aShen Cross Section
theIPtriton.AddDataSet(TripathiCrossSection);
theIPtriton.AddDataSet(aShen);
// Register the Triton Inelastic and Binary Cascade Model
theIPtriton.RegisterMe(theTIModel);
theIPtriton.RegisterMe(theBC);
// Active the triton inelastic scattering using the triton inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPtriton);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// alpha
particle = G4Alpha::Alpha();
pmanager = particle->GetProcessManager();
// Final state production model for Alpha inelastic scattering below 20 GeV
G4LEAlphaInelastic* theAIModel = new G4LEAlphaInelastic;
// Set the maximum energy for LEP model
theAIModel -> SetMaxEnergy(LEPHighLimit);
// Register the Triton Inelastic and Binary Cascade Model
theIPalpha.AddDataSet(TripathiCrossSection);
theIPalpha.AddDataSet(aShen);
// Register the Alpha Inelastic and Binary Cascade Model
theIPalpha.RegisterMe(theAIModel);
theIPalpha.RegisterMe(theBC);
// Active the alpha inelastic scattering using the alpha inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPalpha);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// He3
particle = G4He3::He3();
pmanager = particle->GetProcessManager();
// Binary Cascade inelastic scattering for ions
G4BinaryLightIonReaction * theGenIonBC= new G4BinaryLightIonReaction;
// Inelastic Scattering for ions
G4HadronInelasticProcess* theIPHe3 = new G4HadronInelasticProcess("He3Inelastic",particle);
// Active the Tripathi and aShen Cross Section
theIPHe3 -> AddDataSet(TripathiCrossSection);
theIPHe3 -> AddDataSet(aShen);
// Register the Alpha Binary Cascade Model
theIPHe3 -> RegisterMe(theGenIonBC);
// Active the Inelastic Process for He3
pmanager -> AddDiscreteProcess(theIPHe3);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// Neutron
particle = G4Neutron::Neutron();
pmanager = particle->GetProcessManager();
// Register the Precompound model
theIPNeutron.RegisterMe(thePreEquilib);
// Active the Cross-sections for neutron nuclear scattering from 14 MeV up to 20 GeV
theIPNeutron.AddDataSet(&theNXSec);
// Active the neutron inelastic process
pmanager -> AddDiscreteProcess(&theIPNeutron);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// Pions plus
particle = G4PionPlus::PionPlus();
pmanager = particle -> GetProcessManager();
// Define the inelastic process for pions plus
G4PionPlusInelasticProcess* thePionPlusInelasticProcess = new G4PionPlusInelasticProcess("inelastic");
// Register the Low Energy Inelastic Model for pions plus
thePionPlusInelasticProcess -> RegisterMe(thePreEquilib);
// Active the inelastic process for pions plus
pmanager->AddDiscreteProcess(thePionPlusInelasticProcess);
pmanager -> AddDiscreteProcess(elastic);
// Pion Minus
particle = G4PionMinus::PionMinus();
pmanager = particle -> GetProcessManager();
// Define the inelastic process for pions minus
G4PionMinusInelasticProcess* thePionMinusInelasticProcess = new G4PionMinusInelasticProcess("inelastic");
// Register the inelastic model for pion minus
thePionMinusInelasticProcess -> RegisterMe(thePreEquilib);
// Active the inelastic process for pion minus
pmanager -> AddDiscreteProcess(thePionMinusInelasticProcess);
// Active Absorption process for pion minus
pmanager -> AddRestProcess(new G4PiMinusAbsorptionAtRest, ordDefault);
pmanager -> AddDiscreteProcess(elastic);
//HADRON CAPTURE
// Process for capture of neutral hadrons
G4HadronCaptureProcess* neutronCapture = new G4HadronCaptureProcess();
// Final state production model for capture of neutral hadrons in nuclei
G4LCapture* capture_model = new G4LCapture();
// Set the energy range for the capture model
capture_model -> SetMinEnergy(neutronLowLimit);
capture_model -> SetMaxEnergy(neutronHighLimit);
// Register the capture model
neutronCapture -> RegisterMe(capture_model);
// Active the neutron capture process
pmanager -> AddDiscreteProcess(neutronCapture);
//FISSION
// Process for induced fission
G4HadronFissionProcess* fission = new G4HadronFissionProcess();
//Final state production model for induced fission
G4LFission* fission_model = new G4LFission();
// Set the energy range for the fission model
fission_model -> SetMinEnergy(neutronLowLimit);
fission_model -> SetMaxEnergy(neutronHighLimit);
// Register the fission model
fission -> RegisterMe(fission_model);
// Active the fission process
pmanager -> AddDiscreteProcess(fission);
}
@@ -0,0 +1,304 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
// $Id: HadrontherapyProtonPrecompoundGEMFermi.cc; May 2005
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
// Code developed by:
//
// G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
//
// (a) Laboratori Nazionali del Sud
// of the National Institute for Nuclear Physics, Catania, Italy
// (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
//
// * cirrone@lns.infn.it
// ----------------------------------------------------------------------------
#include "HadrontherapyProtonPrecompoundGEMFermi.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4LElastic.hh"
#include "G4BinaryCascade.hh"
#include "G4CascadeInterface.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4HEPionPlusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4HEPionMinusInelastic.hh"
#include "G4PiMinusAbsorptionAtRest.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4HEAntiProtonInelastic.hh"
#include "G4AntiProtonAnnihilationAtRest.hh"
#include "G4Evaporation.hh"
#include "G4ExcitationHandler.hh"
#include "G4FermiBreakUp.hh"
//
//
// HADRONIC PHYSICS LIST
//
// - ELASTIC SCATTERING FOR ALL THE HADRONS AND IONS
// - INELASTIC SCATTERING:
// * PRECOMPOUND PHYSICS LIST with GEM EVAPORATION MODEL + FERMI BREAKUP
// * PRECOMPOUND + GEM EVAPORATION MODEL + FERMI BREAK-UP FOR PROTONS, NEUTRONS AND PIONS
// * LEP MODEL UP TO 100 MEV AND BINARY ION MODEL BETWEEN 80 MEV AND 40. GEV
// FOR DEUTERON, TRITON, HE3, ALPHA
// * FISSION AND HADRON CAPTURE FOR NEUTRONS BETWEEN 0. MEV AND 100. TEV
//
//
HadrontherapyProtonPrecompoundGEMFermi::HadrontherapyProtonPrecompoundGEMFermi(const G4String& name):
G4VPhysicsConstructor(name)
{
// Inelastic process, energy limits
// Protons, neutrons and pions
// Energy limit of the precompound model
precompoundLowLimit = 0.*MeV;
precompoundHighLimit = 300.*MeV;
// Energy limit of the neutron fission and capture
neutronLowLimit = 0.*TeV;
neutronHighLimit = 100.*TeV;
// Ions
// Energy limit of the binary ion model
binaryLightIonLowLimit = 80.*MeV;
binaryLightIonHighLimit = 40.*GeV;
// Energy limit of the LEP model for ions
LEPHighLimit = 100.*MeV;
//targetZ should vary between 1 and 8
targetZ = 1;
targetA = 2 * targetZ;
}
HadrontherapyProtonPrecompoundGEMFermi::~HadrontherapyProtonPrecompoundGEMFermi()
{}
void HadrontherapyProtonPrecompoundGEMFermi::ConstructProcess()
{
G4ParticleDefinition* particle = 0;
G4ProcessManager* pmanager = 0;
// LOW ENERGY ELASTIC SCATTERING
// FOR PROTON, NEUTRON, IONS
G4LElastic* elastic_Model = new G4LElastic();
G4HadronElasticProcess* elastic = new G4HadronElasticProcess();
elastic -> RegisterMe(elastic_Model);
// GEM EVAPORATION MODEL
G4Evaporation* evaporation = new G4Evaporation();
evaporation -> SetGEMChannel();
theHandler.SetEvaporation(evaporation);
// FERMI BREAK-UP MODEL
G4FermiBreakUp* breakup = new G4FermiBreakUp();
// Set the Fermi break up model
theHandler.SetFermiModel(breakup);
// fix the target A and Z;
theHandler.SetMaxAandZForFermiBreakUp(targetA,targetZ);
// INELASTIC SCATTERING
// Binary Cascade
G4BinaryLightIonReaction* theBC = new G4BinaryLightIonReaction();
// Set the min and max energy for the Binary Cascade
theBC -> SetMinEnergy(binaryLightIonLowLimit);
theBC -> SetMaxEnergy(binaryLightIonHighLimit);
// TRIPATHI CROSS SECTION
// Implementation of formulas in analogy to NASA technical paper 3621 by
// Tripathi, et al. Cross-sections for ion ion scattering
G4TripathiCrossSection* TripathiCrossSection = new G4TripathiCrossSection;
// IONS SHEN CROSS SECTION
// Implementation of formulas
// Shen et al. Nuc. Phys. A 491 130 (1989)
// Total Reaction Cross Section for Heavy-Ion Collisions
G4IonsShenCrossSection* aShen = new G4IonsShenCrossSection;
//--------------------------------------------------------------------------------------
// Proton PRECOMPOUND + EVAPORATION(DEFAULT EVAPORATION)+ FERMI BREAK-UP
particle = G4Proton::Proton();
pmanager = particle->GetProcessManager();
G4PreCompoundModel* thePreEquilib = new G4PreCompoundModel(&theHandler);
// Set the range of minimum and maximum energy value
thePreEquilib -> SetMinEnergy(precompoundLowLimit);
thePreEquilib -> SetMaxEnergy(precompoundHighLimit);
// Model Registration
theIPProton.RegisterMe(thePreEquilib);
// Active the Cross-sections for proton nuclear scattering up to 20 GeV
theIPProton.AddDataSet(&thePXSec);
// Active the proton inelastic scattering using the precompound model
pmanager -> AddDiscreteProcess(&theIPProton);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// deuteron
particle = G4Deuteron::Deuteron();
pmanager = particle -> GetProcessManager();
// Final state production model for Deuteron inelastic scattering below 100 MeV
G4LEDeuteronInelastic* theDIModel = new G4LEDeuteronInelastic;
// Set the maximum energy for LEP model
theDIModel -> SetMaxEnergy(LEPHighLimit);
// Active the Tripathi and aShen Cross Section
theIPdeuteron.AddDataSet(TripathiCrossSection);
theIPdeuteron.AddDataSet(aShen);
// Register the Deuteron Inelastic and Binary Cascade Model
theIPdeuteron.RegisterMe(theDIModel);
theIPdeuteron.RegisterMe(theBC);
// Active the deuteron inelastic scattering using the deuteron inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPdeuteron);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// triton
particle = G4Triton::Triton();
pmanager = particle->GetProcessManager();
// Final state production model for Triton inelastic scattering below 100 MeV
G4LETritonInelastic* theTIModel = new G4LETritonInelastic;
// Set the maximum energy for LEP model
theTIModel -> SetMaxEnergy(LEPHighLimit);
// Active the Tripathi and aShen Cross Section
theIPtriton.AddDataSet(TripathiCrossSection);
theIPtriton.AddDataSet(aShen);
// Register the Triton Inelastic and Binary Cascade Model
theIPtriton.RegisterMe(theTIModel);
theIPtriton.RegisterMe(theBC);
// Active the triton inelastic scattering using the triton inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPtriton);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// alpha
particle = G4Alpha::Alpha();
pmanager = particle->GetProcessManager();
// Final state production model for Alpha inelastic scattering below 20 GeV
G4LEAlphaInelastic* theAIModel = new G4LEAlphaInelastic;
// Set the maximum energy for LEP model
theAIModel -> SetMaxEnergy(LEPHighLimit);
// Register the Triton Inelastic and Binary Cascade Model
theIPalpha.AddDataSet(TripathiCrossSection);
theIPalpha.AddDataSet(aShen);
// Register the Alpha Inelastic and Binary Cascade Model
theIPalpha.RegisterMe(theAIModel);
theIPalpha.RegisterMe(theBC);
// Active the alpha inelastic scattering using the alpha inelastic and binary cascade model
pmanager -> AddDiscreteProcess(&theIPalpha);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// He3
particle = G4He3::He3();
pmanager = particle->GetProcessManager();
// Binary Cascade inelastic scattering for ions
G4BinaryLightIonReaction * theGenIonBC= new G4BinaryLightIonReaction;
// Inelastic Scattering for ions
G4HadronInelasticProcess* theIPHe3 = new G4HadronInelasticProcess("He3Inelastic",particle);
// Active the Tripathi and aShen Cross Section
theIPHe3 -> AddDataSet(TripathiCrossSection);
theIPHe3 -> AddDataSet(aShen);
// Register the Alpha Binary Cascade Model
theIPHe3 -> RegisterMe(theGenIonBC);
// Active the Inelastic Process for He3
pmanager -> AddDiscreteProcess(theIPHe3);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// Neutron
particle = G4Neutron::Neutron();
pmanager = particle->GetProcessManager();
// Register the Precompound model
theIPNeutron.RegisterMe(thePreEquilib);
// Active the Cross-sections for neutron nuclear scattering from 14 MeV up to 20 GeV
theIPNeutron.AddDataSet(&theNXSec);
// Active the neutron inelastic process
pmanager -> AddDiscreteProcess(&theIPNeutron);
// Active the Hadron Elastic Process
pmanager -> AddDiscreteProcess(elastic);
// Pions plus
particle = G4PionPlus::PionPlus();
pmanager = particle -> GetProcessManager();
// Define the inelastic process for pions plus
G4PionPlusInelasticProcess* thePionPlusInelasticProcess = new G4PionPlusInelasticProcess("inelastic");
// Register the Low Energy Inelastic Model for pions plus
thePionPlusInelasticProcess -> RegisterMe(thePreEquilib);
// Active the inelastic process for pions plus
pmanager->AddDiscreteProcess(thePionPlusInelasticProcess);
pmanager -> AddDiscreteProcess(elastic);
// Pion Minus
particle = G4PionMinus::PionMinus();
pmanager = particle -> GetProcessManager();
// Define the inelastic process for pions minus
G4PionMinusInelasticProcess* thePionMinusInelasticProcess = new G4PionMinusInelasticProcess("inelastic");
// Register the inelastic model for pion minus
thePionMinusInelasticProcess -> RegisterMe(thePreEquilib);
// Active the inelastic process for pion minus
pmanager -> AddDiscreteProcess(thePionMinusInelasticProcess);
// Active Absorption process for pion minus
pmanager -> AddRestProcess(new G4PiMinusAbsorptionAtRest, ordDefault);
pmanager -> AddDiscreteProcess(elastic);
//HADRON CAPTURE
// Process for capture of neutral hadrons
G4HadronCaptureProcess* neutronCapture = new G4HadronCaptureProcess();
// Final state production model for capture of neutral hadrons in nuclei
G4LCapture* capture_model = new G4LCapture();
// Set the energy range for the capture model
capture_model -> SetMinEnergy(neutronLowLimit);
capture_model -> SetMaxEnergy(neutronHighLimit);
// Register the capture model
neutronCapture -> RegisterMe(capture_model);
// Active the neutron capture process
pmanager -> AddDiscreteProcess(neutronCapture);
//FISSION
// Process for induced fission
G4HadronFissionProcess* fission = new G4HadronFissionProcess();
//Final state production model for induced fission
G4LFission* fission_model = new G4LFission();
// Set the energy range for the fission model
fission_model -> SetMinEnergy(neutronLowLimit);
fission_model -> SetMaxEnergy(neutronHighLimit);
// Register the fission model
fission -> RegisterMe(fission_model);
// Active the fission process
pmanager -> AddDiscreteProcess(fission);
}
@@ -53,13 +53,30 @@ HadrontherapyRunAction::~HadrontherapyRunAction()
{
}
void HadrontherapyRunAction::BeginOfRunAction(const G4Run*)
void HadrontherapyRunAction::BeginOfRunAction(const G4Run* aRun)
{
G4RunManager::GetRunManager()->SetRandomNumberStore(true);
G4cout << "Run " << aRun -> GetRunID() << " starts ..." << G4endl;
electromagnetic = 0;
hadronic = 0;
}
void HadrontherapyRunAction::EndOfRunAction(const G4Run*)
void HadrontherapyRunAction::EndOfRunAction(const G4Run* aRun)
{
G4cout << " Summary of Run " << aRun -> GetRunID() <<" :"<< G4endl;
G4cout << "Number of electromagnetic processes of primary particles in the phantom:"
<< electromagnetic << G4endl;
G4cout << "Number of hadronic processes of primary particles in the phantom:"
<< hadronic << G4endl;
}
void HadrontherapyRunAction::AddEMProcess()
{
electromagnetic += 1;
}
void HadrontherapyRunAction::AddHadronicProcess()
{
hadronic += 1;
}
@@ -34,30 +34,111 @@
// * cirrone@lns.infn.it
// ----------------------------------------------------------------------------
#include "HadrontherapyDetectorConstruction.hh"
#include "G4EnergyLossTables.hh"
#include "G4SteppingManager.hh"
#include "G4TrackVector.hh"
#include "HadrontherapySteppingAction.hh"
#include "HadrontherapyPrimaryGeneratorAction.hh"
#include "HadrontherapyEventAction.hh"
#include "HadrontherapyRunAction.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4ios.hh"
#include <iomanip.h>
#include "G4UImanager.hh"
#include "G4SteppingManager.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4StepPoint.hh"
#include "G4TrackStatus.hh"
#include "G4TrackVector.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTypes.hh"
HadrontherapySteppingAction::HadrontherapySteppingAction()
#ifdef G4ANALYSIS_USE
#include "HadrontherapyAnalysisManager.hh"
#endif
#include "HadrontherapyRunAction.hh"
HadrontherapySteppingAction::HadrontherapySteppingAction( HadrontherapyRunAction* run)
{
runAction = run;
}
HadrontherapySteppingAction::~HadrontherapySteppingAction()
{
}
void HadrontherapySteppingAction::UserSteppingAction(const G4Step*)
void HadrontherapySteppingAction::UserSteppingAction(const G4Step* aStep)
{
// Electromagnetic and hadronic processes of primary particles in the phantom
if ((aStep -> GetTrack() -> GetTrackID() == 1) &&
(aStep -> GetTrack() -> GetVolume() -> GetName() == "PhantomPhys") &&
(aStep -> GetPostStepPoint() -> GetProcessDefinedStep() != NULL))
{
G4String process = aStep -> GetPostStepPoint() ->
GetProcessDefinedStep() -> GetProcessName();
if ((process == "Transportation") || (process == "StepLimiter")) {;}
else {
if ((process == "msc") || (process == "hLowEIoni") || (process == "hIoni"))
{
runAction -> AddEMProcess();
}
else
{
runAction -> AddHadronicProcess();
if ( (process != "LElastic") && (process != "ProtonInelastic"))
G4cout << "Warning! Unknown proton process: "<< process << G4endl;
}
}
}
// Retrieve information about the secondaries originated in the phantom
#ifdef G4ANALYSIS_USE
G4SteppingManager* steppingManager = fpSteppingManager;
G4Track* theTrack = aStep -> GetTrack();
// check if it is alive
if(theTrack-> GetTrackStatus() == fAlive) { return; }
// Retrieve the secondary particles
G4TrackVector* fSecondary = steppingManager -> GetfSecondary();
for(size_t lp1=0;lp1<(*fSecondary).size(); lp1++)
{
G4String volumeName = (*fSecondary)[lp1] -> GetVolume() -> GetName();
if (volumeName == "PhantomPhys")
{
G4String secondaryParticleName = (*fSecondary)[lp1]->GetDefinition() -> GetParticleName();
G4double secondaryParticleKineticEnergy = (*fSecondary)[lp1] -> GetKineticEnergy();
HadrontherapyAnalysisManager* analysis = HadrontherapyAnalysisManager::getInstance();
if (secondaryParticleName == "e-")
analysis -> electronEnergyDistribution(secondaryParticleKineticEnergy/MeV);
if (secondaryParticleName == "gamma")
analysis -> gammaEnergyDistribution(secondaryParticleKineticEnergy/MeV);
if (secondaryParticleName == "deuteron")
analysis -> deuteronEnergyDistribution(secondaryParticleKineticEnergy/MeV);
if (secondaryParticleName == "triton")
analysis -> tritonEnergyDistribution(secondaryParticleKineticEnergy/MeV);
if (secondaryParticleName == "alpha")
analysis -> alphaEnergyDistribution(secondaryParticleKineticEnergy/MeV);
G4double z = (*fSecondary)[lp1]-> GetDynamicParticle() -> GetDefinition() -> GetPDGCharge();
if (z > 0.)
{
G4int a = (*fSecondary)[lp1]-> GetDynamicParticle() -> GetDefinition() -> GetBaryonNumber();
G4int electronOccupancy = (*fSecondary)[lp1] -> GetDynamicParticle() -> GetTotalOccupancy();
// If a generic ion is originated in the phantom, its baryonic number, PDG charge,
// total number of electrons in the orbitals are stored in a ntuple
analysis -> genericIonInformation(a, z, electronOccupancy, secondaryParticleKineticEnergy/MeV);
}
}
}
#endif
}