Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
+7 -3
View File
@@ -8,10 +8,14 @@ https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
History file of the Hadrontherapy application
====================================================
06.03.2020 G.A.P. Cirrone; Tag: hadrontherapy-V10-06-00
- Many osolete macro files were deleted
- Code cleaning; removed ROOT script folder, other cosmetics
19.11.2019 G. Folger Tag: hadrontherapy-V10-05-02
- remove using namespace std from header files:
HadrontherapyElectricTabulatedField3D.hh and HadrontherapyMagneticField3D.hh
put the using into the .cc file, and make use of endl consistent with g4cout or std::cout
- remove using namespace std from header files:
HadrontherapyElectricTabulatedField3D.hh and HadrontherapyMagneticField3D.hh
put the using into the .cc file, and make use of endl consistent with g4cout or std::cout
30.10.2019, S. Guatelli, Tag: hadrontherapy-V10-05-01
- namespace std deleted
@@ -1,41 +0,0 @@
The Root scripts (files with extension .C) contained in this directory, when executed with ROOT program
(with the command .x scriptName.C) perform a comparison beetween the experimental data files and simulation output.
Each subdirectory (proton, etc) contains a specific ROOT script.
--> proton/BraggPeak
comparison.C performs a comparison beetwen non modulated Bragg peaks
comparison_ascii.C performs a comparisin between non modulated Bragg peaks, reading simulated data from ASCII file
All the scripts in the iaeaBenchmark/ -directory apply to results produced using the IAEA geometry
-->iaeaBenchmark/braggPeak.C
carbon-12 bragg peak plot
--> iaeaBenchmark/checkBeam.C
Macro for checking beam FWHM
--> iaeaBenchmark/fragmentAngularDistribution.C
Produces a histogram of the angular distribution of a certain type of charged fragment (default Z=1) interactively
--> iaeaBenchmark/fragmentAngularDistributionGM.C
Produces a histogram of the angular distribution of a certain type of charged fragment (default Z=1) interactively
--> iaeaBenchmark/fragmentAngularDistributionHistogram.C
Produces a histogram of the angular distribution of a certain type of charged fragment (default Z=1) interactively
--> iaeaBenchmark/fragmentEnergy.C
Plot fragment energy distributions
--> iaeaBenchmark/fragmentEnergyDistributionDifferentAngles.C
Plot fragment energy distributions
--> iaeaBenchmark/fragmentYields.C
Produces the yield calculations for fragments below the angle of 10 degrees
--> iaeaBenchmark/fragmentYieldsPlot.C
Produces the yield calculations for fragments below the angle of 10 degrees and compares to data
--> iaeaBenchmark/readExfor.C
Example script for reading datafile
--> iaeaBenchmark/rootlogon.C
Plotting style definition
@@ -1,71 +0,0 @@
// G.A.P.Cirrone (2009)
// Comparison beetwen experimental and simulated non modulated Bragg Peak
// Remember to run this file only if simulation has been run with the
// proton_therapy.mac file
{
gROOT->Reset();
#include "Riostream.h"
ifstream in;
// LOAD THE EXPERIMENTAL DATA FILE
// CONTAINED IN THE DIRECTORY
// hadrontherapy/experimentalData/proton/BraggPeak
TFile *experimentalFile = new TFile("../../../experimentalData/proton/BraggPeak/62MeVInWater.root","READ");
// HERE THE ROOT FILE IS INTERPRETED AS A TREE
TTree *experimentalTree = (TTree*)experimentalFile -> Get("Experimental62MeVInWater");
Float_t depthExp, EdepExp;
experimentalTree -> SetBranchAddress("EdepExp", &EdepExp);
experimentalTree -> SetBranchAddress("depthExp", &depthExp);
// CREATION AND NORMALISATION TO THE FIRST POINT OF AN NTUPLE CONTAINING THE EXPERIMENTAL DATA
TNtuple *ntupleExperimental = new TNtuple("ntupleExperimental","Protons, exp. data", "depthExp:EdepExp");
Int_t nentries = (Int_t)experimentalTree -> GetEntries();
for (Int_t i = 0; i<nentries; i++)
{
experimentalTree -> GetEntry(0);
Float_t normFactor = EdepExp;
experimentalTree -> GetEntry(i);
ntupleExperimental -> Fill(depthExp, EdepExp/normFactor);
}
// LOAD THE SIMULATION RESULT FILE
// CONTAINED IN THE DIRECTORY
// hadrontherapy/simulationResults/proton/BraggPeak
TFile *simulationFile = new TFile("../../../SimulationOutputs/proton/BraggPeak/protonBraggPeak.root","READ");
// EXTRACTION, FROM THE SIMULATION FILE OF THE INTERESTING HISTOGRAMS
TH1D *simulatedPeak = (TH1D*) simulationFile -> Get("braggPeak");
Float_t simulationNormalisationFactor = simulatedPeak -> GetBinContent(1);
simulatedPeak -> Scale(1/simulationNormalisationFactor);
TCanvas *c1 = new TCanvas ("c1","c1",200,10,600,400);
// PLOT
ntupleExperimental -> SetMarkerStyle(4);
simulatedPeak -> SetMarkerSize(2);
ntupleExperimental -> Draw("EdepExp:depthExp");
simulatedPeak-> Draw("same");
// LEGEND
leg = new TLegend(0.50,0.60,0.20,0.70);
leg -> SetTextSize(0.035);
leg -> SetFillColor(0);
leg -> AddEntry(ntupleExperimental, "Experiment","P");
leg -> AddEntry(simulatedPeak, "Simulation");
leg -> Draw();
};
@@ -1,140 +0,0 @@
{
#include <vector>
gROOT->Reset();
ifstream in;
TFile * file = new TFile("Dose.root","RECREATE");
// LOAD THE EXPERIMENTAL DATA FILE
// CONTAINED IN THE DIRECTORY
// hadrontherapy/experimentalData/proton/BraggPeak
TNtuple *ntupleExperimental = new TNtuple("ntupleExperimental","Protons, exp. data", "depthExp:EdepExp");
vector <Float_t> vec_dose, vec_iX;
TString doseFileExp = "../../../experimentalData/proton/BraggPeak/62MeVInWater.out";
cout << "Reading file \" " << doseFileExp << "\" ... ";
Long64_t nlines = ntupleExperimental -> ReadFile(doseFileExp, "depthExp:EdepExp");
if (nlines <=0){cout << "Error: Check file \"" << doseFileExp << "\"\n"; return;}
printf("%d Experimental points found\n", nlines);
Float_t depthExp, EdepExp;
ntupleExperimental -> SetBranchAddress("EdepExp", &EdepExp);
ntupleExperimental -> SetBranchAddress("depthExp", &depthExp);
// CREATION AND NORMALISATION TO THE FIRST POINT OF AN NTUPLE CONTAINING THE EXPERIMENTAL DATA
Int_t nentries = (Int_t)ntupleExperimental -> GetEntries();
ntupleExperimental -> GetEntry(0);
Float_t normFactor = EdepExp;
for (Int_t l = 0; l<nentries; l++)
{
ntupleExperimental -> GetEntry(l);
vec_dose.push_back(EdepExp);
vec_iX.push_back(depthExp);
}
ntupleExperimental->Reset();
for (Int_t l=0;l<vec_dose.size();l++)
{
depthExp = vec_iX[l];
EdepExp = vec_dose[l]/normFactor;
ntupleExperimental -> Fill(depthExp, EdepExp);
}
//*****************************************************************************
// Load Simulation file
TString doseFileSim = "../../../SimulationOutputs/proton/BraggPeak/Dose.out";
TNtuple *TNtupleSim = new TNtuple("SimTree","dose from ascii file", "iX:jY:kZ:dose");
in.open(doseFileSim);
if (!in.is_open()){cout << "Error: Check file \"" << doseFileSim << "\"\n"; return;}
Char_t n[5];
Float_t f1, f2, f3, f4;
nlines = 0;
cout << "Reading file \" " << doseFileSim << "\" ... ";
// Skip j,j,k,Dose strings
in >> n >> n >> n >> n;
do{
in >> f1 >> f2 >> f3 >> f4;
nlines++;
TNtupleSim -> Fill(f1, f2, f3, f4);
nlines++;}
while(in.good());
if (nlines <= 0){cout << "\nNo data found! Check file \"" << doseFileSim << "\"\n"; return;}
in.close();
Float_t iX, dose, sumDose = 0., norm = 0. ;
TNtupleSim -> SetBranchAddress("dose", &dose);
TNtupleSim -> SetBranchAddress("iX", &iX);
// Normalize data to 1 at the entry!
nentries = (Int_t)TNtupleSim -> GetEntries();
TNtupleSim -> GetEntry(0);
Int_t oldX = iX;
vec_iX.clear();
vec_dose.clear();
// Sum dose along X --> i
for (Int_t l = 0; l<nentries; l++)
{
TNtupleSim -> GetEntry(l);
if (iX==oldX){ sumDose+=dose;}
else
{
vec_dose.push_back(sumDose);
vec_iX.push_back(oldX);
sumDose = dose;
oldX = iX;
}
}
printf("%d Simulated points found\n", vec_iX.size());
// Mean over the first points
for (Int_t l=0; l<5; l++)
{
norm +=vec_dose[l];
}
norm /=l;
TNtupleSim -> Reset();
// Fill with normalized values. I suppose that slabs/voxel are 0.2 mm depth
for (Int_t l=0;l<vec_dose.size();l++)
{
// Slabs (voxels) are 0.2 mm depth
iX = 0.1 + (vec_iX[l]*0.2);
dose = vec_dose[l]/norm;
TNtupleSim -> Fill(iX, 0, 0, dose);
}
TCanvas *c1 = new TCanvas ("c1","c1",200,10,600,400);
// Triangle
TNtupleSim-> SetMarkerStyle(26);
TNtupleSim-> SetMarkerSize(0.8);
// Square
//TNtupleSim-> SetMarkerStyle(25);
// Star
//TNtupleSim-> SetMarkerStyle(3);
// circle
ntupleExperimental -> SetMarkerStyle(4);
ntupleExperimental -> SetMarkerColor(2);
ntupleExperimental -> SetMarkerSize(0.8);
ntupleExperimental -> Draw("EdepExp:depthExp");
TNtupleSim -> Draw("dose:iX","","same");
// LEGEND
leg = new TLegend(0.50,0.60,0.20,0.70);
leg -> SetTextSize(0.035);
leg -> SetFillColor(0);
leg -> AddEntry(ntupleExperimental, "Experiment", "P");
leg -> AddEntry(TNtupleSim, "Simulation", "P");
leg -> Draw();
//c1->SaveAs("braggPeakComparison.pdf");
}
@@ -1,203 +0,0 @@
2.83000 1.19127052
3.13302 1.19605815
3.43223 1.20025793
3.73195 1.20083716
4.03218 1.20716685
4.33266 1.21503907
4.63289 1.21565336
4.93236 1.22036277
5.23233 1.22640181
5.53231 1.23277227
5.83279 1.23215461
6.13302 1.24313161
6.43248 1.24596279
6.73220 1.25513042
7.03294 1.26001301
7.33291 1.26463577
7.63289 1.27339981
7.93261 1.27515311
8.23283 1.28398706
8.53306 1.28821428
8.83278 1.30024836
9.13225 1.30344739
9.43248 1.31579891
9.73270 1.31956695
10.03268 1.32434253
10.33265 1.33155068
10.63288 1.33944766
10.93311 1.35157211
11.23283 1.35285381
11.53280 1.36276550
11.83303 1.36561297
12.13300 1.37302473
12.43298 1.38263799
12.73270 1.38867732
12.83252 1.38054150
13.03267 1.39479438
13.23308 1.40177768
13.43298 1.40642523
13.63287 1.41399200
13.83277 1.41480223
14.03267 1.42004773
14.23308 1.42990268
14.43272 1.42072265
14.63313 1.43836504
14.83277 1.44989982
15.03267 1.45164569
15.23282 1.46184596
15.43246 1.45760482
15.63287 1.46750956
15.83302 1.47462666
16.03317 1.48009552
16.23282 1.48796321
16.43297 1.49513778
16.63261 1.50246608
16.83302 1.51185142
17.03317 1.51802306
17.23307 1.52801534
17.43297 1.53525124
17.63287 1.54418982
17.83276 1.54492472
18.03317 1.56420970
18.23307 1.57171670
18.43297 1.57647357
18.63286 1.58998638
18.83276 1.59989980
19.03291 1.60548658
19.23281 1.61980560
19.43296 1.62816070
19.63312 1.62944882
19.83301 1.64849308
20.03317 1.64996817
20.23306 1.66863824
20.43271 1.67764099
20.63311 1.69094464
20.83301 1.69526655
21.03316 1.71848564
21.23306 1.72911076
21.43296 1.74527996
21.63311 1.75340963
21.83276 1.77348753
22.03316 1.79104759
22.23128 1.80249281
22.43296 1.82429050
22.63311 1.84183067
22.83250 1.85321256
22.93258 1.86545342
23.03316 1.87446186
23.13273 1.88472760
23.23280 1.89372611
23.33313 1.89757601
23.43296 1.90990539
23.53252 1.92118614
23.63311 1.93062526
23.73217 1.94360545
23.83301 1.95330159
23.93283 1.96520631
24.03290 1.97618096
24.13247 1.98479106
24.23229 2.00200671
24.33288 2.01672462
24.43270 2.02298059
24.53278 2.04096272
24.63311 2.05395612
24.73217 2.06500870
24.83275 2.07972031
24.93283 2.09309829
25.03290 2.10789938
25.13298 2.12531626
25.23204 2.13764160
25.33288 2.15467386
25.43244 2.17851852
25.53303 2.19319304
25.63260 2.21371490
25.73267 2.23175362
25.83275 2.24818581
25.93257 2.26679014
26.03290 2.28681139
26.13196 2.30670460
26.23254 2.32851515
26.33287 2.34634619
26.43270 2.36599401
26.53277 2.39151846
26.63310 2.41427921
26.73242 2.44757978
26.83275 2.47402597
26.93308 2.50065524
27.03315 2.52998366
27.13272 2.56235662
27.23229 2.59075696
27.33262 2.62659453
27.43295 2.66052686
27.53226 2.69742151
27.63158 2.73333509
27.73292 2.77261216
27.83249 2.81621375
27.93307 2.85576240
28.03290 2.90265440
28.13297 2.94925613
28.23279 2.99109855
28.33312 3.03626471
28.43218 3.08289835
28.53302 3.14701438
28.63284 3.21113110
28.73267 3.27978980
28.83223 3.35854342
28.93282 3.43154626
29.03289 3.52010630
29.13272 3.62501730
29.23254 3.74397380
29.33312 3.87054638
29.43269 4.01363438
29.53251 4.18010753
29.63284 4.35492033
29.73241 4.54544455
29.83299 4.74712893
29.93307 4.95624315
30.03238 5.16575517
30.13297 5.16691417
30.23279 5.18690693
30.33287 5.01038238
30.53302 4.81064279
30.63284 4.29339952
30.73266 3.71160520
30.83223 3.10374924
30.93281 2.46022989
31.03314 1.86821525
31.13271 1.31102022
31.23279 0.89458176
31.33286 0.54620642
31.43243 0.32023949
31.53200 0.17508132
31.63309 0.08822773
31.73317 0.04228641
31.83299 0.01774494
31.93281 0.00717772
32.03314 0.00287175
32.13271 0.00133736
32.23253 0.00002863
32.33235 0.00000000
32.43294 0.00000000
32.53251 0.00000000
32.63207 0.00000000
32.73215 0.00000000
32.83223 0.00000000
32.93281 0.00000000
33.03289 0.00000000
33.13271 0.00000000
33.23202 0.00000000
33.33286 -0.00002873
33.43192 -0.00002983
33.53276 0.00000000
33.63258 -0.00002894
33.73266 0.00000000
33.83299 0.00000000
33.93230 0.00000000
34.03263 0.00000000
34.13271 0.00000000
34.23278 0.00000000
34.33286 0.00000000
34.43293 0.00000000
34.53276 0.00000000
34.63283 0.00000000
34.73291 0.00000000
@@ -4,10 +4,10 @@ README file relative to proton experimental Bragg peaks
Description of experimental data file provided and of the
corresponding simulation configuration to use for the comparison
--> 62MeVInWater.root
Bragg peak acquired in the CATANA protontherapy facility at INFN-LNS (I).
It can be reproduce with the complete passive beam line of Hadrontherapy.
This file contains one ntuple with two columns:
the depth in water (expressed in millimiter) and the energy deposited (expressed in arbitrary units).
Use the proton_therapy.mac file to perform a simulation whose result can be compared with this file.
The .out file contains the same data in ASCII format.
--> experimental62MeVProtonBraggPeak.out
This is a two columns file reresenting an experimental proton Bragg peak acquired
at the INFN-LNS proton therapy facility and generated by a 62 MeV proton beam penetrating
a water tank.
The first column represent the depth in millimeters of water;
The second column represent the energy deposited per millimeter as measured by an
ionisation chamber moving in water.
@@ -35,15 +35,15 @@
//
// ACTUAL CONTRIBUTORS
// ====================
// G.A.P. Cirrone(a), Z. Mei(i), L. Pandola(a), G. Petringa(a), F. Romano (a,g)
// G.A.P. Cirrone(a), L. Pandola(a), G. Petringa(a)
//
//
// ==========> PAST CONTRIBUTORS <==========
//
// R. Calcagno(a), G.Danielsen (b), F.Di Rosa(a),
// S.Guatelli(c), A.Heikkinen(b), P.Kaitaniemi(b),
// A.Lechner(d), S.E.Mazzaglia(a), M.G.Pia(e),
// G.Russo(a,h), M.Russo(a), A. Tramontana (a),
// A.Lechner(d), S.E.Mazzaglia(a), Z. Mei(h), M.G.Pia(e),
// F.Romano(a), G.Russo(a,g), M.Russo(a), A. Tramontana (a),
// A.Varisano(a)
//
// (a) Laboratori Nazionali del Sud of INFN, Catania, Italy
@@ -52,9 +52,8 @@
// (d) CERN, Geneve, Switzwerland
// (e) INFN Section of Genova, Genova, Italy
// (f) Physics and Astronomy Department, Univ. of Catania, Catania, Italy
// (g) National Physics Laboratory, Teddington, UK
// (h) CNR-IBFM, Italy
// (i) Institute of Applied Electromagnetic Engineering(IAEE)
// (g) CNR-IBFM, Italy
// (h) Institute of Applied Electromagnetic Engineering(IAEE)
// Huazhong University of Science and Technology(HUST), Wuhan, China
//
//
@@ -1,602 +0,0 @@
############################################
!!! WARNING - FPE detection is activated !!!
############################################
**************************************************************
Geant4 version Name: geant4-10-06-patch-02 (29-May-2020)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
: NIM A 835 (2016), 186-225
WWW : http://geant4.org/
**************************************************************
Activating geometry default
Going to register Parallel world...... done
Using HadrontherapyPhysicsList()
Using Csv
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
OpenGLImmediateXm (OGLIXm, OGLI)
OpenGLStoredXm (OGLSXm, OGL, OGLS)
OpenGLImmediateX (OGLIX, OGLIXm_FALLBACK)
OpenGLStoredX (OGLSX, OGLSXm_FALLBACK)
RayTracerX (RayTracerX)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByAttribute
drawByCharge
drawByOriginVolume
drawByParticleID
drawByEncounteredVolume
Registered filter factories:
attributeFilter
chargeFilter
originVolumeFilter
particleFilter
encounteredVolumeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
"/vis/list" to see available colours.
/tracking/verbose 0
/run/verbose 1
/event/verbose 0
/Physics/addPhysics standard_opt4
THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option4
/run/initialize
/run/geometryModified
HadrontherapyMatrix: Memory space to store physical dose into 200 voxels has been allocated
/run/geometryModified
The (X,Y,Z) dimensions of the phantom are : (40 cm ,40 cm ,40 cm )
The (X,Y,Z) dimensions of the detector are : (40 cm ,40 cm ,40 cm )
Displacement between Phantom and World is: DX= 20 cm DY= 0 fm DZ= 0 fm
The (X,Y,Z) sizes of the Voxels are: (200 um ,4 cm ,4 cm )
The number of Voxels along (X,Y,Z) is: (200,1,1)
--- G4CoupledTransportation is used
Warning : Region <DetectorLog> does not have specific production cuts,
even though it appears in the current tracking world.
Default cuts are used for this region.
/gps/pos/shape Circle
/gps/pos/centre -310. 0. 0. cm
/gps/pos/radius 0. mm
/gps/pos/sigma_r 2. mm
/gps/particle proton
/gps/pos/type Beam
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/ang/type beam1d
/gps/ang/sigma_r 0. deg
/gps/ene/type Gauss
/gps/ene/mono 62 MeV
/gps/ene/sigma 0.3 MeV
/Step/waterPhantomStepMax 1 mm
/changePhantom/size 40 40 40 cm
/changePhantom/position 20 0 0 cm
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize 1 40 40 mm
/changeDetector/displacement 0 18 18 cm
/changePhantom/update
HadrontherapyMatrix: Memory space to store physical dose into 40 voxels has been allocated
/run/geometryModified
The (X,Y,Z) dimensions of the phantom are : (40 cm ,40 cm ,40 cm )
The (X,Y,Z) dimensions of the detector are : (4 cm ,4 cm ,4 cm )
Displacement between Phantom and World is: DX= 20 cm DY= 0 fm DZ= 0 fm
The (X,Y,Z) sizes of the Voxels are: (1 mm ,4 cm ,4 cm )
The number of Voxels along (X,Y,Z) is: (40,1,1)
/event/printEventNumber 100
/run/beamOn 500
### === Deexcitation model UAtomDeexcitation is activated for 2 regions:
DefaultRegionForTheWorld 1 0 0
DetectorLog 1 0 0
### === Ignore cuts flag: 0
phot: for gamma SubType=12 BuildTable=0
LambdaPrime table from 200 keV to 100 TeV in 174 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermorePhElectric : Emin= 0 eV Emax= 100 TeV SauterGavrila Fluo
compt: for gamma SubType=13 BuildTable=1
Lambda table from 100 eV to 1 MeV, 20 bins/decade, spline: 1
LambdaPrime table from 1 MeV to 100 TeV in 160 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LowEPComptonModel : Emin= 0 eV Emax= 20 MeV Fluo
KleinNishina : Emin= 20 MeV Emax= 100 TeV Fluo
conv: for gamma SubType=14 BuildTable=1
Lambda table from 1.022 MeV to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
BetheHeitler5D : Emin= 0 eV Emax= 100 TeV ModifiedTsai
Rayl: for gamma SubType=11 BuildTable=1
Lambda table from 100 eV to 100 keV, 20 bins/decade, spline: 0
LambdaPrime table from 100 keV to 100 TeV in 180 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermoreRayleigh : Emin= 0 eV Emax= 100 TeV CullenGenerator
msc: for e- SubType= 10
RangeFactor= 0.08, stepLimType: 2, latDisp: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
GoudsmitSaunderson : Emin= 0 eV Emax= 100 MeV Nbins=120 100 eV - 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Nbins=120 100 MeV - 100 TeV
eIoni: for e- SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.2, 0.01 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
LowEnergyIoni : Emin= 0 eV Emax= 100 keV deltaVI
MollerBhabha : Emin= 100 keV Emax= 100 TeV deltaVI
eBrem: for e- SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV AngularGen2BS
eBremLPM : Emin= 1 GeV Emax= 100 TeV AngularGen2BS
ePairProd: for e- SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
ePairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for e-, integral:1 SubType=1 BuildTable=1
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
msc: for e+ SubType= 10
RangeFactor= 0.08, stepLimType: 2, latDisp: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
GoudsmitSaunderson : Emin= 0 eV Emax= 100 MeV Nbins=120 100 eV - 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Nbins=120 100 MeV - 100 TeV
eIoni: for e+ SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.2, 0.01 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
PenIoni : Emin= 0 eV Emax= 100 keV
MollerBhabha : Emin= 100 keV Emax= 100 TeV deltaVI
eBrem: for e+ SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV AngularGen2BS
eBremLPM : Emin= 1 GeV Emax= 100 TeV AngularGen2BS
ePairProd: for e+ SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
ePairProd : Emin= 0 eV Emax= 100 TeV
annihil: for e+, integral:1 SubType=5 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplus2gg : Emin= 0 eV Emax= 100 TeV
CoulombScat: for e+, integral:1 SubType=1 BuildTable=1
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
msc: for proton SubType= 10
RangeFactor= 0.2, stepLimType: 0, latDisp: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
hIoni: for proton SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 2 MeV deltaVI
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
hBrems: for proton SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for proton SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for proton, integral:1 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for GenericIon SubType= 10
RangeFactor= 0.2, stepLimType: 0, latDisp: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV
ionIoni: for GenericIon SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.001 mm), integ: 1, fluct: 1, linLossLim= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
ParamICRU73 : Emin= 0 eV Emax= 100 TeV deltaVI
nuclearStopping: for GenericIon SubType=8 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for alpha SubType= 10
RangeFactor= 0.2, stepLimType: 0, latDisp: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
ionIoni: for alpha SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax=7.9452 MeV deltaVI
BetheBloch : Emin=7.9452 MeV Emax= 100 TeV deltaVI
nuclearStopping: for alpha SubType=8 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for anti_proton SubType= 10
RangeFactor= 0.2, stepLimType: 0, latDisp: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
hIoni: for anti_proton SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 2 MeV deltaVI
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
hBrems: for anti_proton SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for anti_proton SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for anti_proton, integral:1 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for kaon+ SubType= 10
RangeFactor= 0.2, stepLimType: 0, latDisp: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
hIoni: for kaon+ SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax=1.05231 MeV deltaVI
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
hBrems: for kaon+ SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for kaon+ SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for kaon+, integral:1 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for kaon- SubType= 10
RangeFactor= 0.2, stepLimType: 0, latDisp: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
hIoni: for kaon- SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax=1.05231 MeV deltaVI
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
hBrems: for kaon- SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for kaon- SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for kaon-, integral:1 SubType=1 BuildTable=1
Used Lambda table of kaon+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for mu+ SubType= 10
RangeFactor= 0.2, stepLimType: 0, latDisp: 1, polarAngLim(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
muIoni: for mu+ SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 200 keV deltaVI
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
muBrems: for mu+ SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV
muPairProd: for mu+ SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 21x1001 from 1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for mu+, integral:1 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for mu- SubType= 10
RangeFactor= 0.2, stepLimType: 0, latDisp: 1, polarAngLim(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
muIoni: for mu- SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 200 keV deltaVI
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
muBrems: for mu- SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV
muPairProd: for mu- SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 21x1001 from 1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for mu-, integral:1 SubType=1 BuildTable=1
Used Lambda table of mu+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for pi+ SubType= 10
RangeFactor= 0.2, stepLimType: 0, latDisp: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
hIoni: for pi+ SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax=297.505 keV deltaVI
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
hBrems: for pi+ SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for pi+ SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for pi+, integral:1 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for pi- SubType= 10
RangeFactor= 0.2, stepLimType: 0, latDisp: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
hIoni: for pi- SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax=297.505 keV deltaVI
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
hBrems: for pi- SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for pi- SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
Used Lambda table of pi+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes
Material : G4_AIR
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes
Material : G4_Al
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 6.90363 keV e- 598.345 keV e+ 570.85 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 2 used in the geometry : Yes
Material : G4_Galactic
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 3 used in the geometry : Yes
Material : G4_Ta
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 101.501 keV e- 2.01928 MeV e+ 1.88805 MeV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 4 used in the geometry : Yes
Material : G4_KAPTON
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 2.98035 keV e- 419.056 keV e+ 405.209 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 5 used in the geometry : Yes
Material : Brass
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 24.2568 keV e- 1.32231 MeV e+ 1.24471 MeV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 6 used in the geometry : Yes
Material : G4_PLEXIGLASS
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 2.78665 keV e- 389.196 keV e+ 376.336 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 7 used in the geometry : Yes
Material : G4_Cu
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 24.7508 keV e- 1.39534 MeV e+ 1.31345 MeV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 8 used in the geometry : Yes
Material : G4_MYLAR
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 3.02067 keV e- 419.056 keV e+ 405.209 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 9 used in the geometry : Yes
Material : G4_WATER
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 2.94056 keV e- 351.877 keV e+ 342.545 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
DetectorLog
====================================================================
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
### Run 0 starts.
Run 0 starts ...
Run terminated.
Run Summary
Number of events processed : 500
User=5.620000s Real=5.686506s Sys=0.050000s
... write Csv file : Hadrontherapy_h1_Ekin.csv - done
... write Csv file : Hadrontherapy_h1_Edep.csv - done
... write Csv files : - done
Graphics systems deleted.
Visualization Manager deleting...
The simulation took: 9.80263 s to run (real time)
Dose is being written to Dose.out
G4 kernel has come to Quit state.
================== Deleting memory pools ===================
Number of memory pools allocated: 12 of which, static: 0
Dynamic pools deleted: 12 / Total memory freed: 0.39 MB
============================================================
RunManagerKernel is deleted. Good bye :)
@@ -35,6 +35,7 @@
class G4Step;
class G4HCofThisEvent;
class G4TouchableHistory;
class HadrontherapyRBEAccumulable;
class HadrontherapyDetectorSD : public G4VSensitiveDetector
{
public:
@@ -52,6 +53,7 @@ public:
private:
HadrontherapyDetectorHitsCollection *HitsCollection;
G4String sensitiveDetectorName;
HadrontherapyRBEAccumulable* fRBEAccumulable{ nullptr };
};
#endif
@@ -1,143 +0,0 @@
# G.A.P.Cirrone
#
# Default macro file. It is called if no argument is provided at run
#
# i.e. simply typing $G4WORKDIR/bin/Linux-++/Hadrontherapy <no argument here!>
#
# This macro can be used for a proton beam in water. Both electrmagnetic and
# hadronic models are swiched on
#########################
# Set of the verboses
#
/control/verbose 1
/tracking/verbose 0
/run/verbose 1
/event/verbose 0
##########################
# Set of the physic models
#
/Physics/addPhysics QGSP_BIC_EMY
/run/numberOfThreads 4
##########################
# INFN-LNS transport beam line,
# normally used for interdisciplinary
# researches with carbon and
# and other ion beams is activated
# with the following command
#
/geometrySetup/selectGeometry Carbon
##########################
# Initialisation procedure
#
/run/initialize
##########################
# Visualisation
#
#/vis/open OGLI 600x600-0+0
# Disable auto refresh and quieten vis messages whilst scene and
# trajectories are established:
#/vis/viewer/set/autoRefresh false
#/vis/verbose errors
#/vis/drawVolume
#/vis/viewer/set/viewpointThetaPhi 30 140 deg
#/vis/viewer/zoom 1
#/vis/viewer/pan -10 0 cm
#/vis/scene/add/trajectories smooth
#/vis/scene/endOfEventAction accumulate
#/vis/viewer/set/autoRefresh true
#/vis/verbose warnings
##########################
# Set here the cut and the step max for the tracking.
# Suggested values of cut and step:
# Set cuts OUTSIDE the detector
/run/setCut 10 mm
# Set cuts ONLY inside the detector
#
/run/setCutForRegion DetectorLog 0.1 mm
/Step/waterPhantomStepMax 0.1 mm
##########################################################################################################
# PRIMARY PARTICLES
# the beam spot is centered at the origin and is
# of 1d gaussian shape with a 3mm central plateau
#
#---------------------------gps-----------------
/gps/pos/shape Circle
/gps/pos/centre -80. 0. 0. mm
/gps/pos/radius 0. mm
/gps/pos/sigma_r 2. mm
/gps/particle ion
/gps/ion 6 12 6
/gps/pos/type Beam
# the incident surface is in the y-z plane
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
# the beam is travelling along the x-axis without any angular dispersion (angular despersion set to 0.0)
#
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/ang/type beam1d
/gps/ang/sigma_r 0. deg
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/ene/mono 744 MeV
/gps/ene/sigma 0.740 MeV
# Voxelised detector
/changePhantom/size 40 40 40 cm
/changePhantom/position 20 0 0 cm
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize .1 40 40 mm
# Put the detector in the lower left corner of the phantom
/changeDetector/displacement 0 18 18 cm
/changePhantom/update
/changeTheSource/VirtualLayer true
/changeTheSource/VirtualLayerPosition -4 0 0 cm
/primaryParticleData/NewSource true
/primaryParticleData/calculatedPhaseSpaceFileIN Layer_TuttaLinea.txt
#########################
# Display the event number
# during the run
#
/run/printProgress 1000
# Compute Dose and Fluence for secondary
#/analysis/secondary true
#########################
# Start of the run
#
#########################
/run/beamOn 1
@@ -1,39 +0,0 @@
/Physics/addPhysics QGSP_BIC_EMY
/geometrySetup/selectGeometry Carbon
/run/initialize
/run/setCut 1 mm
/run/setCutForRegion DetectorLog 1 km
/Step/waterPhantomStepMax 10 um
/gps/particle ion
/gps/ion 6 12 6
/gps/position 0. 0. 0. cm
/gps/ene/type Gauss
/gps/ene/mono 2244 MeV
/gps/direction 1 0 0
/changePhantom/size 40 40 40 cm
/changePhantom/position 20 0 0 cm
/changePhantom/material G4_WATER
/changeDetector/voxelSize .02 40 40 mm
/changeDetector/size 120 40 40 mm
/changeDetector/displacement 0 18 18 cm # With respect to the phantom
/changePhantom/update
/event/printEventNumber 100
### RBE (CHO cell line)
/rbe/calculation 1
/rbe/verbose 2
/rbe/loadLemTable data/rbe/CHOScholz1997_LEM.csv
/rbe/cellLine CHO
/rbe/doseScale 320000
# Dose scale should be: 2e7 / nEvents * voxelSizeInCm2
/run/printProgress 100
/run/beamOn 1000
@@ -1,3 +0,0 @@
# macro to be run in loop
/modulator/angle 1 deg
/run/beamOn 100
@@ -1,89 +0,0 @@
/Physics/addPhysics QGSP_BIC_EMY
# /geometrySetup/selectGeometry Carbon
/run/initialize
/run/setCut 1 mm
/run/setCutForRegion DetectorLog 1 km
/Step/waterPhantomStepMax 10 um
# /gps/particle proton
# /gps/pos/centre 0. 0. 0. cm
# /gps/pos/type Beam
# /gps/pos/rot1 0 1 0
# /gps/pos/rot2 0 0 1
# /gps/ene/type Gauss
# /gps/ene/mono 62 MeV
# /gps/direction 1 0 0
#---------------------------gps-----------------
/gps/pos/shape Circle
/gps/pos/centre -310. 0. 0. cm
/gps/pos/radius 0. mm
/gps/pos/sigma_r 2.5 mm
/gps/particle proton
/gps/pos/type Beam
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/ang/type beam1d
/gps/ang/sigma_r 0. deg
/gps/ene/type Gauss
/gps/ene/mono 62 MeV
/gps/ene/sigma 0.3 MeV
#--------------detector and phantom-----------------
/changePhantom/size 40 40 40 cm
/changePhantom/position 20 0 0 cm
/changePhantom/material G4_WATER
/changeDetector/voxelSize .02 40 40 mm
/changeDetector/size 120 40 40 mm
/changeDetector/displacement 0 18 18 cm # With respect to the phantom
/changePhantom/update
# /score/create/boxMesh boxMesh_1
# /score/mesh/translate/xyz 60. 20. 20. mm
# /score/mesh/boxSize 60. 20. 20. mm
# /score/mesh/nBin 6000 1 1
# /score/quantity/doseDeposit dose
# /score/close
/event/printEventNumber 100
### RBE
/rbe/verbose 2
/rbe/loadLemTable data/rbe/lem1.csv
/rbe/calculation 1
/rbe/accumulate 1
## U87
#/rbe/dcut 8.0 gray
#/rbe/alphaX 0.11 gray(-1)
#/rbe/betaX 0.06 gray(-2)
#/rbe/lemTable data/rbe/U87_LEM.dat
/rbe/cellLine U87
## AG01522
#/rbe/dcut 9.5 gray
#/rbe/alphaX 0.54 gray(-1)
#/rbe/betaX 0.062 gray(-2)
#/rbe/lemTable data/rbe/AG01522_LEM.dat
/rbe/doseScale 7777770
# Dose scale should be: 2e7 / nEvents * voxelSizeInCm2
/modulator/ReadData Modulators/Modulator010.txt
/modulator/RMWMat G4_PLEXIGLASS
/modulator/position -2160.5 30 50 mm
/modulator/innerRadius 2.5 cm
/modulator/outRadius 9.5 cm
# Running in loop
/control/alias initialValue 0
/control/alias finalValue 360
/control/alias stepSize 1
/control/loop macro/RBE-62MeV-proton-modulator.loop counterName {initialValue} {finalValue} {stepSize}
@@ -1,223 +0,0 @@
# A: Tramontana
# tramontana@lns.infn.it
#
# Macro file recommended for the use with laser-driven beam line and built-in physic list.
# This macro uses the physics list already contained in the Geant4 distribution
#######################
# Set of the verboses #
#######################
#
/control/verbose 1
/tracking/verbose 0
/run/verbose 1
/event/verbose 0
###########################################################################################################
# ACTIVATED PHYSICS MODELS
/Physics/addPhysics standard_opt4
/geometrySetup/selectGeometry LaserDriven
# Initialize geometry and physic
/run/initialize
##########################################################################################################
############### Define the entrance beam: TARANIS angular distribution
## beam->1-2
#/gps/verbose 2
/gps/source/intensity 3.6
/gps/particle proton
/gps/pos/type Beam
/gps/pos/shape Circle
/gps/pos/centre -171.3 0.0 0.0 cm
/gps/pos/radius 0.007 mm
/gps/pos/sigma_r 0. mm
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/pos/rot1 0 0 1
/gps/pos/rot2 0 1 0
/gps/ang/type iso
/gps/ang/mintheta 0 deg
/gps/ang/maxtheta 26.69 deg
/gps/ene/type Arb
/gps/hist/type arb
/gps/hist/point 1.1 3.5
/gps/hist/point 3.1399999999999999 1.2
/gps/hist/inter Exp
## beam->2-3
#/gps/verbose 2
/gps/source/add 0.98
/gps/particle proton
/gps/pos/type Beam
/gps/pos/shape Circle
/gps/pos/centre -171.3 0.0 0.0 cm
/gps/pos/radius 0.007 mm
/gps/pos/sigma_r 0. mm
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/pos/rot1 0 0 1
/gps/pos/rot2 0 1 0
/gps/ang/type iso
/gps/ang/mintheta 0 deg
/gps/ang/maxtheta 23.49 deg
/gps/ene/type Arb
/gps/hist/type arb
/gps/hist/point 3.14 0.98899
/gps/hist/point 4.4499999999999999999 0.5382
/gps/hist/inter Exp
## beam->3-4
#/gps/verbose 2
/gps/source/add 0.50003
/gps/particle proton
/gps/pos/type Beam
/gps/pos/shape Circle
/gps/pos/centre -171.3 0.0 0.0 cm
/gps/pos/radius 0.007 mm
/gps/pos/sigma_r 0. mm
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/pos/rot1 0 0 1
/gps/pos/rot2 0 1 0
/gps/ang/type iso
/gps/ang/mintheta 0 deg
/gps/ang/maxtheta 19.8 deg
/gps/ene/type Arb
/gps/hist/type arb
/gps/hist/point 4.45 1.0
/gps/hist/point 5.4999999999999999 0.59
/gps/hist/inter Exp
## beam->4-5
#/gps/verbose 2
/gps/source/add 0.25041
/gps/particle proton
/gps/pos/type Beam
/gps/pos/shape Circle
/gps/pos/centre -171.3 0.0 0.0 cm
/gps/pos/radius 0.007 mm
/gps/pos/sigma_r 0. mm
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/pos/rot1 0 0 1
/gps/pos/rot2 0 1 0
/gps/ang/type iso
/gps/ang/mintheta 0 deg
/gps/ang/maxtheta 16.03 deg
/gps/ene/type Arb
/gps/hist/type arb
/gps/hist/point 5.5 1.0
/gps/hist/point 6.419999999999999999 0.60093
/gps/hist/inter Exp
## beam->5-6
#/gps/verbose 2
/gps/source/add 0.140041
/gps/particle proton
/gps/pos/type Beam
/gps/pos/shape Circle
/gps/pos/centre -171.3 0.0 0.0 cm
/gps/pos/radius 0.007 mm
/gps/pos/sigma_r 0. mm
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/pos/rot1 0 0 1
/gps/pos/rot2 0 1 0
/gps/ang/type iso
/gps/ang/mintheta 0 deg
/gps/ang/maxtheta 12.93 deg
/gps/ene/type Arb
/gps/hist/type arb
/gps/hist/point 6.42 1.2
/gps/hist/point 7.249999999999999999 0.670093
/gps/hist/inter Exp
## beam->3
#/gps/verbose 2
/gps/source/add 0.120094
/gps/particle proton
/gps/pos/type Beam
/gps/pos/shape Circle
/gps/pos/centre -171.3 0.0 0.0 cm
/gps/pos/radius 0.007 mm
/gps/pos/sigma_r 0. mm
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/pos/rot1 0 0 1
/gps/pos/rot2 0 1 0
/gps/ang/type iso
/gps/ang/mintheta 0 deg
/gps/ang/maxtheta 9.45 deg
/gps/ene/type Arb
/gps/hist/type arb
/gps/hist/point 7.25 1.4
/gps/hist/point 8.3 0.630513
/gps/hist/inter Exp
######################################################################
#/gps/direction 1 0 0
######################################################################
# TARANIS energy spectrum without angular dipendence: exp(-.44E) for energy between 1. to 12 MeV
###/gps/ene/type Exp
###/gps/ene/min 1. MeV
###/gps/ene/max 12. MeV
###/gps/ene/ezero 2.272727273
######################################################################
/vis/scene/create
/vis/open OGL
/vis/viewer/set/background white
/vis/viewer/set/viewpointThetaPhi 60 130
/vis/viewer/zoom 1.0
/vis/viewer/panTo -.27 -.0
/vis/scene/add/axes 0 0 0 1 m
/vis/scene/add/trajectories
/vis/scene/endOfRunAction accumulate
/vis/modeling/trajectories/create/drawByCharge
/vis/scene/endOfEventAction accumulate -1
/vis/viewer/update
################# change first collimator #################
##/LaserDriven/EnergySelector/FirstCollimator/Radius 10.0 mm
##/LaserDriven/EnergySelector/FirstCollimator/Thickness 20.0 mm
##/LaserDriven/EnergySelector/FirstCollimator/zPosizion 42. mm
################# change second collimator #################
#/LaserDriven/EnergySelector/SecondCollimator/Radius 20.0 mm
#/LaserDriven/EnergySelector/SecondCollimator/Thickness 20.0 mm
#/LaserDriven/EnergySelector/SecondCollimator/zPosizion 42. mm
######################## change slit ########################
##/LaserDriven/EnergySelector/Slit/thickness 0.1 mm
/LaserDriven/EnergySelector/Slit/HoleDimensionY 6. mm
/LaserDriven/EnergySelector/Slit/HoleDimensionZ 3. mm
/LaserDriven/EnergySelector/Slit/HolePositionZ 27.7 mm
#Slit position
# -0.5 mm -> 37.8 mm (4MeV)
#-9.5 mm -> 27.7 mm (7MeV)
#/LaserDriven/EnergySelector/Disable
#/LaserDriven/Quadrupoles/DisableQuad4
#####################################################################################################################
##########################################################################################################
# CUT AND STEP MAX
# Suggested values of cut and step:
# Set cuts OUTSIDE the detector
#/run/setCut 1 mm
# Set cuts ONLY inside the detector
#/run/setCutForRegion DetectorLog 0.1 mm
/Step/waterPhantomStepMax 1 mm
##############################################################################################################################
# DETECTOR DESCRIPTION
###################################################
# USE THE FOLLOWING FOR A VOXELLIZED DETECTOR
###################################################
#
/changePhantom/position 100 100 0 cm
/changePhantom/size 40 40 40 cm
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize 1 40 40 mm
# Put the detector in the lower left corner of the phantom
#
/changeDetector/displacement 0 18 18 cm
/changePhantom/update
/event/printEventNumber 100
/run/beamOn 2000
@@ -1,10 +1,7 @@
# G.A.P.Cirrone,
# pablo.cirrone@lns.infn.it
# G.A.P.Cirrone, pablo.cirrone@lns.infn.it
#
# Default macro file with visualisation. It is called if no argument is provided at run
#
# Default macro file. It is called if no argument is provided at run
# and when the PHYSLIST enviroment variable is OFF
# i.e. simply typing $G4WORKDIR/bin/Linux-++/Hadrontherapy <no argument here!>
#########################
# Set of the verboses
#
@@ -19,7 +16,7 @@
#/Physics/addPhysics QGSP_BIC_EMY
/Physics/addPhysics HADRONTHERAPY_1
/run/numberOfThreads 1
/run/numberOfThreads 10
##########################
# Initialisation procedure
@@ -66,7 +63,6 @@
# the beam is travelling along the x-axis without any angular dispersion (angular despersion set to 0.0)
#
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/ang/type beam1d
@@ -75,8 +71,8 @@
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/ene/mono 60.0 MeV
#/gps/ene/sigma 0.25 MeV
/gps/ene/mono 62.3 MeV
/gps/ene/sigma 0.25 MeV
#/gps/ene/mono 744 MeV
#/gps/ene/sigma 0.740 MeV
@@ -104,12 +100,6 @@
/changeDetector/displacement 0 18 18 cm
/changePhantom/update
#########################
# Display the event number
# during the run
#
/event/printEventNumber 100
#########################
# Start of the run
#
@@ -117,9 +107,33 @@
/analysis/secondary true
/analysis/computeLet
### RBE
/rbe/verbose 2
/rbe/loadLemTable data/rbe/lem1.csv
/rbe/calculation 1
/rbe/accumulate 1
## U87
#/rbe/dcut 8.0 gray
#/rbe/alphaX 0.11 gray(-1)
#/rbe/betaX 0.06 gray(-2)
#/rbe/lemTable data/rbe/U87_LEM.dat
/rbe/cellLine U87
## AG01522
#/rbe/dcut 9.5 gray
#/rbe/alphaX 0.54 gray(-1)
#/rbe/betaX 0.062 gray(-2)
#/rbe/lemTable data/rbe/AG01522_LEM.dat
/rbe/doseScale 7777770
# Dose scale should be: 2e7 / nEvents * voxelSizeInCm2
# Default material is water liquid
/changePhantom/material G4_WATER
/run/printProgress 1000
/run/beamOn 1000
/tracking/verbose 0
/run/beamOn 50000
@@ -1,124 +0,0 @@
# G.A.P.Cirrone,
# pablo.cirronelns.infn.it
#
# This default macro file is called when:
# 1.- No macro file is provided at the application launch
# 2.- The PHYSLIST enviroment variable is set to one of the
# predifined reference Physics Lists
#
# The the complete list of the Reference Physiscs Lists can be found inside:
# $G4INSTALL/source/physics_lists/lists/include
#########################
# Set of the verboses
#
/control/verbose 1
/tracking/verbose 0
/run/verbose 1
/event/verbose 0
##########################
# Initialisation procedure
#
/run/initialize
##########################
# Visualisation
#
/vis/scene/create
/vis/open OGL
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 30 140 deg
/vis/viewer/zoom 1
/vis/viewer/pan -10 0 cm
/vis/scene/add/trajectories
/vis/scene/endOfEventAction accumulate
####################################################
# Set here the CUT and the STEP MAX for the tracking.
# Suggested values of cut and step
#
# Set cuts OUTSIDE the detector
#
/run/setCut 1 mm
# Set cuts ONLY inside the detector
#
/run/setCutForRegion DetectorLog 0.1 mm
#/Step/waterPhantomStepMax 0.1 mm
#########################
# Set the primary particle type,
# energy and position along the X direction
#
/gps/pos/shape Circle
/gps/pos/centre -310. 0. 0. cm
/gps/pos/radius 0. mm
/gps/pos/sigma_r 2. mm
/gps/particle proton
/gps/pos/type Beam
# the incident surface is in the y-z plane
#
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
# the beam is travelling along the x-axis without any angular dispersion (angular despersion set to 0.0)
#
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/ang/type beam1d
/gps/ang/sigma_r 0.1 deg
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/ene/mono 62 MeV
/gps/ene/sigma 0.3 MeV
########################################################
# DETECTOR DESCRIPTION
########################################################
# USE THE FOLLOWING FOUR LINES FOR DEFINITION OF PHANTOM
#
#/changePhantom/position 20. 0. 0. cm
#/changePhantom/update
/changePhantom/size 40 40 40 cm
/changePhantom/position 20 0 0 cm
###################################################
# USE THE FOLLOWING FOR A VOXELLIZED DETECTOR
#
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize .1 40 40 mm
# Put the detector in the lower left corner of the phantom
#
/changeDetector/displacement 0 18 18 cm
/changePhantom/update
#########################
# Display the event number
# during the run
#
/event/printEventNumber 100
#########################
# Start of the run
#
# If secondary particles dose & fluence are needed
#/analysis/secondary true
# Default material is water liquid
#/changePhantom/material G4_PLEXIGLASS
/run/beamOn 10
/control/shell mkdir -p SimulationOutputs/proton/BraggPeak
/control/shell mv DoseDistribution.root SimulationOutputs/proton/BraggPeak/protonBraggPeak.root
@@ -1,151 +0,0 @@
# G.A.P.Cirrone
# cirrone@lns.infn.it
#
# Macro file recommended for the use with proton beams and built-in physic list.
# This macro uses the physics list already contained in the Geant4 distribution
#
# The 'Reference Physics Lists' can be activated setting a specific enviroment variable to the name
# of the physics. For example if the QGSP_BIC Reference Physics Lists must be activated the User
# must set export PHYSLIST=QGSP_BIC (or setenv PHYSLIST QGSP_BIC).
# A 'Reference Physics Lists' contains all the physics process necessary to a particle transport
# If the User set the PHYSLIST variable Hadrontherapy will start with the defaultMacroWithReferencePhysicsList.mac
# macro. See this macro file for more details
#########################
# Set of the verboses
#
/control/verbose 1
/tracking/verbose 0
/run/verbose 1
/event/verbose 0
##########################
# Set of the physic models
#
/Physics/addPhysics QGSP_BIC_EMY
##########################
# Initialisation procedure
#
/run/initialize
#########################
# Set the primary particle type,
# energy and position along the X direction
#
#---------------------------gps-----------------
/gps/pos/shape Circle
/gps/pos/centre -310. 0. 0. cm
/gps/pos/radius 0. mm
/gps/pos/sigma_r 2. mm
/gps/particle proton
/gps/pos/type Beam
# the incident surface is in the y-z plane
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
# the beam is travelling along the x-axis without any angular dispersion (angular despersion set to 0.0)
#
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/ang/type beam1d
/gps/ang/sigma_r 0. deg
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/ene/mono 62 MeV
/gps/ene/sigma 0.3 MeV
#/beamLine/RangeShifter/RSMat G4_PLEXIGLASS
#/beamLine/RangeShifter/thickness 13 mm
/beamLine/FinalCollimator/halfInnerRad 12.5 mm
##########################
# Set here the cut and the step max for the tracking.
# Suggested values of cut and step:
# Set cuts OUTSIDE the detector
#
/run/setCut 1 mm
# Set cuts ONLY inside the detector
#
/run/setCutForRegion DetectorLog 0.05 mm
/Step/waterPhantomStepMax 1 mm
#########################
##############################################################################################################################
# DETECTOR DESCRIPTION
###################################################
# USE THE FOLLOWING FOUR LINES FOR DEFINITION OF PHANTOM
###################################################
#
#/changePhantom/position 20. 0. 0. cm
#/changePhantom/update
/changePhantom/size 40 40 40 cm
/changePhantom/position 20 0 0 cm
###################################################
# USE THE FOLLOWING FOR A VOXELLIZED DETECTOR
###################################################
#
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize .1 40 40 mm
# Put the detector in the lower left corner of the phantom
#
/changeDetector/displacement 0 18 18 cm
/changePhantom/update
# Visualisation
#
/vis/scene/create
/vis/open OGL
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 30 140 deg
/vis/viewer/zoomTo 1
#/vis/viewer/panTo 100 20 cm
/vis/viewer/panTo -10 0 cm
/vis/scene/add/trajectories
/tracking/storeTrajectory 1
/vis/scene/endOfEventAction accumulate -1
/vis/viewer/update
#########################
# Display the event number
# during the run
#
/event/printEventNumber 1
# Default material is liquid water (G4_WATER)
#/changePhantom/material G4_Pb
# For dose/fleunce computation of primary and secondary particles
#/analysis/secondary true
# For dose average LET computations of primary and secondary particles
#/analysis/computeLet
/run/beamOn 10
#########################
# Move the generated .root & .out
# files into the
# "SimulationOutputs" folder
# if this folder has been created
/control/shell mv DoseDistribution.root experimentalData/proton/BraggPeak/protonBraggPeak.root
/control/shell mv Dose.out experimentalData/proton/BraggPeak/Dose.out
@@ -1,130 +0,0 @@
#######################
# Set of the verboses #
#######################
#
/control/verbose 1
/tracking/verbose 0
/run/verbose 1
/event/verbose 0
###########################################################################################################
# ACTIVATED PHYSICS MODELS
/Physics/addPhysics standard_opt4
/geometrySetup/selectGeometry LaserDriven
# Initialize geometry and physic
/run/initialize
##########################################################################################################
##########Cut ##########
/run/setCut 0.01 mm
# Set cuts ONLY inside the detector
#
#/run/setCutForRegion DetectorLog 0.1 mm
/Step/waterPhantomStepMax 1 mm
############### Input proton beam at the entrance of Faraday Cup after ESS
/gps/particle proton
/gps/pos/type Beam
/gps/pos/shape Circle
/gps/pos/centre -175. 0.0 0.0 mm
/gps/pos/radius 1.5 mm
#/gps/ang/rot1 0 0 1
#/gps/ang/rot2 0 1 0
#/gps/pos/rot1 0 0 1
#/gps/pos/rot2 0 1 0
########### The beam axis after the ESS final collimator is at 1.5 deg respect to the x-axis in the z direction ###########
/gps/ang/rot1 -0.0261 0 0.999
/gps/ang/rot2 0 0.999 -0.0261
/gps/pos/rot1 -0.026 0 0.999
/gps/pos/rot2 0 0.999 -0.026
############################### Input after last collimator 4 MeV ###############################
/gps/ang/type iso
/gps/ang/mintheta 0 deg
/gps/ang/maxtheta 0.7 deg
/gps/ene/type Arb
/gps/hist/type arb
/gps/hist/point 3.93962 0.149951784
/gps/hist/point 4.02586 0.486981678
/gps/hist/point 4.1121 0.870781099
/gps/hist/point 4.19834 0.949373192
/gps/hist/point 4.28458 0.910318226
/gps/hist/point 4.37082 0.864995178
/gps/hist/point 4.45706 1
/gps/hist/point 4.5433 0.884763742
/gps/hist/point 4.62954 0.467213115
/gps/hist/point 4.71578 0.141755063
/gps/hist/inter Lin
################################################################################################
############################### Input after last collimator 7 MeV ###############################
#/gps/ang/type iso
#/gps/ang/mintheta 0 deg
#/gps/ang/maxtheta 0.7 deg
#/gps/ene/type Arb
#/gps/hist/type arb
#/gps/hist/point 6.04803 0.075220186
#/gps/hist/point 6.22209 0.309688169
#/gps/hist/point 6.39615 0.675791478
#/gps/hist/point 6.57021 1
#/gps/hist/point 6.74427 0.8543204
#/gps/hist/point 6.91833 0.759581052
#/gps/hist/point 7.09239 0.59604856
#/gps/hist/point 7.26645 0.711259224
#/gps/hist/point 7.44051 0.501309212
#/gps/hist/point 7.61457 0.130445132
#/gps/hist/inter Lin
##################################################################################################
##############################################
/vis/scene/create
/vis/open OGL
/vis/viewer/set/background white
/vis/viewer/set/viewpointThetaPhi 60 130
/vis/viewer/zoom 1.0
/vis/viewer/panTo -.27 -.0
/vis/scene/add/axes 0 0 0 1 m
/vis/scene/add/trajectories
/vis/scene/endOfRunAction accumulate
/vis/modeling/trajectories/create/drawByCharge
/vis/scene/endOfEventAction accumulate -1
/vis/viewer/update
###################################################
#
/changePhantom/position 100 100 0 cm
/changePhantom/size 40 40 40 cm
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize 1 40 40 mm
/changeDetector/displacement 0 18 18 cm
/changePhantom/update
/event/printEventNumber 10
/run/beamOn 100
@@ -77,6 +77,33 @@
/vis/scene/endOfEventAction accumulate -1
/vis/viewer/update
##########################################################################################################
############### Define the entrance beam: TARANIS angular distribution
## beam->1-2
#/gps/verbose 2
#/gps/source/intensity 3.6
#/gps/particle proton
#/gps/pos/type Beam
#/gps/pos/shape Circle
#/gps/pos/centre -171.3 0.0 0.0 cm
#/gps/pos/radius 0.007 mm
#/gps/pos/sigma_r 0. mm
#/gps/ang/rot1 0 0 1
#/gps/ang/rot2 0 1 0
#/gps/pos/rot1 0 0 1
#/gps/pos/rot2 0 1 0
#/gps/ang/type iso
#/gps/ang/mintheta 0 deg
#/gps/ang/maxtheta 26.69 deg
#/gps/ene/type Arb
#/gps/hist/type arb
#/gps/hist/point 1.1 3.5
#/gps/hist/point 3.1399999999999999 1.2
#/gps/hist/inter Exp
################# change first collimator #################
#/LaserDriven/EnergySelector/FirstCollimator/Radius 10.0 mm
##/LaserDriven/EnergySelector/FirstCollimator/Thickness 20.0 mm
@@ -1,97 +0,0 @@
# S.E. Mazzaglia May 4 2010
# Example macro file to show how to change geometric properties and voxelization of the phantom/detector
#######################
# Set of the verboses #
#######################
#
/control/verbose 1
/tracking/verbose 0
/run/verbose 1
/event/verbose 0
##########################
# Set of the physic models
#
/Physics/addPhysics QGSP_BIC_EMY
# Initialize geometry and Physics
/run/initialize
#############################
# Initialize graphic system #
#############################
#
/vis/scene/create
/vis/open OGL
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 30 140 deg
/tracking/storeTrajectory 1
/vis/scene/endOfEventAction accumulate -1 # this accumulate infinite tracks
# zoom to phantom...
/vis/viewer/panTo 1.5 0.5
/vis/viewer/zoomTo 3
##########################
# Set here the cut and the step max for the tracking.
# Suggested values of cut and step:
#
# Set cuts OUTSIDE the detector
/run/setCut 0.01 mm
# Set cuts ONLY inside the detector
/run/setCutForRegion DetectorLog 0.01 mm
/Step/waterPhantomStepMax 0.01 mm
#########################
#########################
# Set the primary particle type,
# energy and position along the X direction
#
#---------------------------gps-----------------
/gps/pos/shape Circle
/gps/pos/centre -310. 0. 0. cm ##-270
/gps/pos/radius 0. mm
/gps/pos/sigma_r 2. mm ##3
/gps/particle proton
/gps/pos/type Beam
# the incident surface is in the y-z plane
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/energy 62 MeV
/gps/ene/sigma 300 keV
/gps/direction 1 0 0
# Copy & Paste in a new macro the previous and ONE of the following groups of commands
# in order to change the Phantom & Detector geometry!
######################################
# Change Phantom & Detector geometry #
######################################
##########################################################################################
# Cut & paste the following commands in order to create,
# a Phantom with a detector divided by 40 slabs
# Each slab is 0.1 mm along the X direction, 40 mm along the Y and Z.
#/changePhantom/material G4_PLEXIGLASS # in case you do not want the default phantom made of liquid water
/changePhantom/size 40 40 40 cm
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize 0.1 40 40 mm
/changePhantom/update # update geometry!
/run/beamOn 1000
@@ -1,96 +0,0 @@
# S.E. Mazzaglia May 4 2010
# Example macro file to show how to change geometric properties and voxelization of the phantom/detector
#######################
# Set of the verboses #
#######################
#
/control/verbose 1
/tracking/verbose 0
/run/verbose 1
/event/verbose 0
##########################
# Set of the physic models
#
/Physics/addPhysics QGSP_BIC_EMY
# Initialize geometry and physic
/run/initialize
#############################
# Initialize graphic system #
#############################
#
/vis/scene/create
/vis/open OGL
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 30 140 deg
/tracking/storeTrajectory 1
/vis/scene/endOfEventAction accumulate -1 # this accumulate infinite tracks
# zoom to phantom...
/vis/viewer/panTo 1.5 0.5
/vis/viewer/zoomTo 3
##########################
# Set here the cut and the step max for the tracking.
# Suggested values of cut and step:
# Set cuts OUTSIDE the detector
/run/setCut 0.01 mm
# Set cuts ONLY inside the detector
/run/setCutForRegion DetectorLog 0.01 mm
/Step/waterPhantomStepMax 0.01 mm
#########################
#########################
# Set the primary particle type,
# energy and position along the X direction
#
#---------------------------gps-----------------
/gps/pos/shape Circle
/gps/pos/centre -310. 0. 0. cm
/gps/pos/radius 0. mm
/gps/pos/sigma_r 2. mm
/gps/particle proton
/gps/pos/type Beam
# the incident surface is in the y-z plane
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/energy 62 MeV
/gps/ene/sigma 300 keV
/gps/direction 1 0 0
# Copy & Paste in a new macro the previous and ONE of the following groups of commands
# in order to change the Phantom & Detector geometry!
######################################
# Change Phantom & Detector geometry #
######################################
##########################################################################################
# Cut & paste the following commands in order to create,
# a Phantom with a detector divided by one only slab
# 1 mm along the X direction, 400 mm along the Y and Z.
#/changePhantom/material G4_PLEXIGLASS # in case you do not want the default phantom made of liquid water
/changeDetector/displacement 0 0 0 mm
/changePhantom/size 1 400 400 mm
/changeDetector/size 1 400 400 mm
/changeDetector/voxelSize 1 400 400 mm
/changePhantom/update # update geometry!
/run/beamOn 1000
@@ -1,88 +0,0 @@
# G.A.P.Cirrone
#
# Default macro file. It is called if no argument is provided at run
#
# i.e. simply typing $G4WORKDIR/bin/Linux-++/Hadrontherapy <no argument here!>
#
# This macro can be used for a proton beam in water. Both electrmagnetic and
# hadronic models are swiched on
#########################
# Set of the verboses
#
/control/verbose 1
/tracking/verbose 0
/run/verbose 1
/event/verbose 0
##########################
# Set of the physic models
#
/Physics/addPhysics QGSP_BIC_EMY
/Physics/addPhysics radioactive_decay
##########################
# Initialisation procedure
#
/run/initialize
##########################
# Visualisation
#
/vis/scene/create
/vis/open OGL
#/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 30 140 deg
/vis/viewer/zoom 1
/vis/viewer/pan -10 0 cm
/vis/scene/add/trajectories
/vis/scene/endOfEventAction accumulate
/vis/viewer/update
##########################
# Set here the cut and the step max for the tracking.
# Suggested values of cut and step:
# Set cuts OUTSIDE the detector
/run/setCut 1 mm
# Set cuts ONLY inside the detector
#/run/setCutForRegion DetectorLog 0.5 mm
/Step/waterPhantomStepMax 1 mm
#########################
# Set the primary particle type,
# energy and position along the X direction
#
#---------------------------gps-----------------
/gps/pos/shape Circle
/gps/pos/centre -310. 0. 0. cm
/gps/pos/radius 0. mm
/gps/pos/sigma_r 2. mm
/gps/particle proton
/gps/pos/type Beam
# the incident surface is in the y-z plane
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/energy 62 MeV
/gps/ene/sigma 300 keV
/gps/direction 1 0 0
#########################
# Display the event number
# during the run
#
/event/printEventNumber 10
#########################
# Start of the run
#
/run/beamOn 100
@@ -1,89 +0,0 @@
# S.E. Mazzaglia May 4 2010
# Example macro file to show how to change geometric properties and voxelization of the phantom/detector
#######################
# Set of the verboses #
#######################
#
/control/verbose 1
/tracking/verbose 0
/run/verbose 1
/event/verbose 0
##########################
# Set of the physic models
#
/Physics/addPhysics QGSP_BIC_EMY
# Initialize geometry and physic
/run/initialize
#############################
# Initialize graphic system #
#############################
#
/vis/scene/create
/vis/open OGL
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 30 140 deg
/tracking/storeTrajectory 1
/vis/scene/endOfEventAction accumulate -1 # this accumulate infinite tracks
# zoom to phantom...
/vis/viewer/panTo 1.5 0.5
/vis/viewer/zoomTo 3
##########################
# Set here the cut and the step max for the tracking.
# Suggested values of cut and step:
#
# Set cuts OUTSIDE the detector
/run/setCut 0.01 mm
# Set cuts ONLY inside the detector
/run/setCutForRegion DetectorLog 0.01 mm
/Step/waterPhantomStepMax 1 mm
#########################
#########################
# Set the primary particle type,
# energy and position along the X direction
#
#---------------------------gps-----------------
/gps/pos/shape Circle
/gps/pos/centre -310. 0. 0. cm
/gps/pos/radius 0. mm
/gps/pos/sigma_r 2. mm
/gps/particle proton
/gps/pos/type Beam
# the incident surface is in the y-z plane
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/energy 62 MeV
/gps/ene/sigma 300 keV
/gps/direction 1 0 0
####################################
# Change Phantom/Detector geometry #
####################################
##########################################################################################
# Cut & paste the following commands in order to create, starting from the default sizes,
# a full voxellized (40 by 40 by 40) detector
/changePhantom/size 4 4 4 cm
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize 1 1 1 mm
# Put the detector in the lower left corner of the phantom
/changeDetector/displacement 0 0 0
/changePhantom/update
##########################################################################################
/run/beamOn 1000
@@ -56,6 +56,8 @@
#include "G4VSensitiveDetector.hh"
#include "HadrontherapyRunAction.hh"
#include "G4SystemOfUnits.hh"
#include "HadrontherapyRBE.hh"
#include <G4AccumulableManager.hh>
/////////////////////////////////////////////////////////////////////////////
@@ -91,7 +93,7 @@ G4bool HadrontherapyDetectorSD::ProcessHits(G4Step* aStep, G4TouchableHistory* )
// Get kinetic energy
G4Track * theTrack = aStep -> GetTrack();
G4double kineticEnergy = theTrack->GetKineticEnergy();
G4ParticleDefinition *particleDef = theTrack -> GetDefinition();
//Get particle name
G4String particleName = particleDef -> GetParticleName();
@@ -119,9 +121,7 @@ G4bool HadrontherapyDetectorSD::ProcessHits(G4Step* aStep, G4TouchableHistory* )
G4VPhysicalVolume* volumePre = touchPreStep->GetVolume();
G4String namePre = volumePre->GetName();
HadrontherapyMatrix* matrix = HadrontherapyMatrix::GetInstance();
HadrontherapyLet* let = HadrontherapyLet::GetInstance();
@@ -219,6 +219,23 @@ G4bool HadrontherapyDetectorSD::ProcessHits(G4Step* aStep, G4TouchableHistory* )
HitsCollection -> insert(detectorHit);
}
}
auto rbe = HadrontherapyRBE::GetInstance();
if (rbe->IsCalculationEnabled())
{
if (!fRBEAccumulable)
{
fRBEAccumulable = dynamic_cast<HadrontherapyRBEAccumulable*>(G4AccumulableManager::Instance()->GetAccumulable("RBE"));
if (!fRBEAccumulable)
{
G4Exception("HadrontherapyDetectorSD::ProcessHits", "NoAccumulable", FatalException, "Accumulable RBE not found.");
}
}
fRBEAccumulable->Accumulate(kineticEnergy / A, energyDeposit, DX, Z, i, j, k);
}
return true;
}
@@ -58,8 +58,8 @@ HadrontherapyAnalysis::~HadrontherapyAnalysis()
/////////////////////////////////////////////////////////////////////////////
HadrontherapyAnalysis* HadrontherapyAnalysis::GetInstance(){
if (instance == 0) instance = new HadrontherapyAnalysis;
if (instance == 0) instance = new HadrontherapyAnalysis;
return instance;
}
@@ -86,8 +86,8 @@ HadrontherapyMatrix* HadrontherapyMatrix::GetInstance(G4int voxelX, G4int voxelY
/////////////////////////////////////////////////////////////////////////////
HadrontherapyMatrix::HadrontherapyMatrix(G4int voxelX, G4int voxelY, G4int voxelZ, G4double mass):
stdFile("Dose.out"),
doseUnit(gray)
stdFile("Dose.out"),
doseUnit(gray)
{
// Number of the voxels of the phantom
// For Y = Z = 1 the phantom is divided in slices (and not in voxels)
@@ -96,25 +96,24 @@ doseUnit(gray)
numberOfVoxelAlongY = voxelY;
numberOfVoxelAlongZ = voxelZ;
massOfVoxel = mass;
// Create the dose matrix
matrix = new G4double[numberOfVoxelAlongX*numberOfVoxelAlongY*numberOfVoxelAlongZ];
if (matrix)
{
G4cout << "HadrontherapyMatrix: Memory space to store physical dose into " <<
numberOfVoxelAlongX*numberOfVoxelAlongY*numberOfVoxelAlongZ <<
" voxels has been allocated " << G4endl;
numberOfVoxelAlongX*numberOfVoxelAlongY*numberOfVoxelAlongZ <<
" voxels has been allocated " << G4endl;
}
else G4Exception("HadrontherapyMatrix::HadrontherapyMatrix()", "Hadrontherapy0005", FatalException, "Can't allocate memory to store physical dose!");
// Hit voxel (TrackID) marker
// This array mark the status of voxel, if a hit occur, with the trackID of the particle
// Must be initialized
hitTrack = new G4int[numberOfVoxelAlongX*numberOfVoxelAlongY*numberOfVoxelAlongZ];
ClearHitTrack();
}
@@ -172,15 +171,12 @@ void HadrontherapyMatrix::ClearHitTrack()
for(G4int i=0; i<numberOfVoxelAlongX*numberOfVoxelAlongY*numberOfVoxelAlongZ; i++) hitTrack[i] = 0;
}
// Return Hit status
G4int* HadrontherapyMatrix::GetHitTrack(G4int i, G4int j, G4int k)
{
return &(hitTrack[Index(i,j,k)]);
}
/////////////////////////////////////////////////////////////////////////////
// Dose methods...
// Fill DOSE/fluence matrix for secondary particles:
@@ -193,41 +189,38 @@ G4bool HadrontherapyMatrix::Fill(G4int trackID,
G4double energyDeposit,
G4bool fluence)
{
if ( (energyDeposit <=0. && !fluence) || !secondary) return false;
// Get Particle Data Group particle ID
G4int PDGencoding = particleDef -> GetPDGEncoding();
PDGencoding -= PDGencoding%10;
// Search for already allocated data...
for (size_t l=0; l < ionStore.size(); l++)
{
if (ionStore[l].PDGencoding == PDGencoding )
{ // Is it a primary or a secondary particle?
if ( (trackID ==1 && ionStore[l].isPrimary) || (trackID !=1 && !ionStore[l].isPrimary))
{
if (energyDeposit > 0.)
ionStore[l].dose[Index(i, j, k)] += energyDeposit;
// Fill a matrix per each ion with the fluence
if (fluence) ionStore[l].fluence[Index(i, j, k)]++;
return true;
}
}
}
G4int Z = particleDef-> GetAtomicNumber();
G4int A = particleDef-> GetAtomicMass();
G4String fullName = particleDef -> GetParticleName();
G4String name = fullName.substr (0, fullName.find("[") ); // cut excitation energy
// Let's put a new particle in our store...
ion newIon =
{
(trackID == 1) ? true:false,
@@ -239,8 +232,8 @@ G4bool HadrontherapyMatrix::Fill(G4int trackID,
new G4double[numberOfVoxelAlongX * numberOfVoxelAlongY * numberOfVoxelAlongZ],
new unsigned int[numberOfVoxelAlongX * numberOfVoxelAlongY * numberOfVoxelAlongZ]
};
// Initialize data
if (newIon.dose && newIon.fluence)
{
@@ -249,20 +242,19 @@ G4bool HadrontherapyMatrix::Fill(G4int trackID,
newIon.dose[q] = 0.;
newIon.fluence[q] = 0;
}
if (energyDeposit > 0.) newIon.dose[Index(i, j, k)] += energyDeposit;
if (fluence) newIon.fluence[Index(i, j, k)]++;
ionStore.push_back(newIon);
return true;
}
else // XXX Out of memory! XXX
{
return false;
}
}
/////////////////////////////////////////////////////////////////////////////
@@ -284,25 +276,23 @@ void HadrontherapyMatrix::StoreMatrix(G4String file, void* data, size_t psize)
for(G4int k = 0; k < numberOfVoxelAlongZ; k++)
{
G4int n = Index(i, j, k);
if (psize == sizeof(unsigned int))
{
unsigned int* pdata = (unsigned int*)data;
if (pdata[n])
ofs << i << '\t' << j << '\t' << k << '\t' << pdata[n] << G4endl;
}
else if (psize == sizeof(G4double))
{
G4double* pdata = (G4double*)data;
if (pdata[n]) ofs << i << '\t' << j << '\t' << k << '\t' << pdata[n] << G4endl;
}
}
ofs.close();
}
}
@@ -321,88 +311,92 @@ void HadrontherapyMatrix::StoreFluenceData()
// Store dose per single ion in multiple files
void HadrontherapyMatrix::StoreDoseData()
{
for (size_t i=0; i < ionStore.size(); i++){
StoreMatrix(ionStore[i].name + "_Dose.out", ionStore[i].dose, sizeof(G4double));
}
}
////////////////////////////////////////////////////////////////////////
// Store dose into a single file
// or in histograms. Please note that this function is called via
// or in histograms. Please, note that this function is called via
// messenger commands
// defined in the HadrontherapyAnalysisFileMessenger.cc class file
void HadrontherapyMatrix::StoreDoseFluenceAscii(G4String file)
{
#define width 15L
filename = (file=="") ? stdFile:file;
// Sort like periodic table
std::sort(ionStore.begin(), ionStore.end());
G4cout << "Dose is being written to " << filename << G4endl;
ofs.open(filename, std::ios::out);
if (ofs.is_open())
{
// Write the voxels index and the list of particles/ions
ofs << std::setprecision(6) << std::left <<
"i\tj\tk\t";
//ofs << std::setprecision(6) << std::left << "i\tj\tk\t";
ofs << "i" << '\t' << "j" << '\t' << "k";
G4cout << "i" << '\t' << "j" << '\t' << "k";
// Total dose
ofs << std::setw(width) << "Dose(Gy)";
ofs <<'\t' <<"Dose(Gy)";
//ofs << std::setw(width) << "Dose(Gy)";
G4cout << '\t' << "Dose(Gy)";
G4String fluence = "_f";
if (secondary)
{
for (size_t l=0; l < ionStore.size(); l++)
{
G4String a = (ionStore[l].isPrimary) ? "_1":""; // is it a primary?
ofs << std::setw(width) << ionStore[l].name + a <<
std::setw(width) << ionStore[l].name + a;
G4String a = (ionStore[l].isPrimary) ? "_1":""; // is it a primary?
// ofs << std::setw(width) << ionStore[l].name + a <<
// std::setw(width) << ionStore[l].name + a + fluence;
ofs << '\t' << ionStore[l].name + a <<
'\t' << ionStore[l].name + a + fluence;
G4cout << '\t' << ionStore[l].name + a <<
'\t' << ionStore[l].name + a + fluence;
}
ofs << G4endl;
//ofs << G4endl;
}
// Write data
for(G4int i = 0; i < numberOfVoxelAlongX; i++)
for(G4int j = 0; j < numberOfVoxelAlongY; j++)
for(G4int k = 0; k < numberOfVoxelAlongZ; k++)
{
G4int n = Index(i, j, k);
if (matrix[n])
{
ofs << G4endl;
ofs << i << '\t' << j << '\t' << k << '\t';
// Total dose
ofs << std::setw(width) << (matrix[n]/massOfVoxel)/doseUnit;
//ofs << std::setw(width) << (matrix[n]/massOfVoxel)/doseUnit;
ofs << (matrix[n]/massOfVoxel)/doseUnit;
if (secondary)
{
for (size_t l=0; l < ionStore.size(); l++)
{
// Fill ASCII file rows
ofs << std::setw(width) << ionStore[l].dose[n]/massOfVoxel/doseUnit <<
std::setw(width) << ionStore[l].fluence[n];
//ofs << std::setw(width) << ionStore[l].dose[n]/massOfVoxel/doseUnit <<
// std::setw(width) << ionStore[l].fluence[n];
ofs << '\t' << ionStore[l].dose[n]/massOfVoxel/doseUnit <<
'\t' << ionStore[l].fluence[n];
}
}
}
}
ofs.close();
}
}
//////////////////////////////////////////////////////////////////////////////
void HadrontherapyMatrix::Fill(G4int i, G4int j, G4int k,
@@ -410,9 +404,9 @@ void HadrontherapyMatrix::Fill(G4int i, G4int j, G4int k,
{
if (matrix)
matrix[Index(i,j,k)] += energyDeposit;
// Store the energy deposit in the matrix element corresponding
// to the phantom voxel
// Store the energy deposit in the matrix element corresponding
// to the phantom voxel
}
@@ -50,48 +50,17 @@ HadrontherapyRunAction::HadrontherapyRunAction()
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
accumulableManager->RegisterAccumulable(&fRBEAccumulable);
// Create analysis manager
// The choice of analysis technology is done via selectin of a namespace
// in Analysis.hh
auto analysisManager =G4AnalysisManager::Instance();
G4cout << "Using " << analysisManager -> GetType() << G4endl;
analysisManager->SetVerboseLevel(1);
analysisManager->SetFirstHistoId(1);
// Comment out the following line to generate an N-tuple
analysisManager-> SetFirstNtupleId(2);
// Creating the histograms of primary kinetic
// energy (Ekin) and of the energy deposited (Edep)
// in the first voxel/slice of the water phantom
analysisManager -> CreateH1("Ekin","Ekin the voxel", 400,20*MeV, 60*MeV);
analysisManager -> CreateH1("Edep","Edep the voxel", 200, -10, 10*MeV);
// Example of how to create an Ntuple (comment-out, if needed)
//analysisManager->CreateNtuple("NYUPLA", "Edep and TrackL");
//analysisManager->CreateNtupleDColumn("Ekin");
}
/////////////////////////////////////////////////////////////////////////////
HadrontherapyRunAction::~HadrontherapyRunAction()
{
delete G4AnalysisManager::Instance();
//delete G4AnalysisManager::Instance();
}
/////////////////////////////////////////////////////////////////////////////
void HadrontherapyRunAction::BeginOfRunAction(const G4Run* aRun)
{
// Get analysis manager
auto analysisManager = G4AnalysisManager::Instance();
// Open an output file
//
G4String fileName = "Hadrontherapy";
analysisManager->OpenFile(fileName);
{
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
accumulableManager->Reset();
@@ -112,12 +81,7 @@ void HadrontherapyRunAction::BeginOfRunAction(const G4Run* aRun)
void HadrontherapyRunAction::EndOfRunAction(const G4Run*)
{
auto analysisManager = G4AnalysisManager::Instance();
//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;
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
accumulableManager->Merge();