Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
+12
View File
@@ -7,6 +7,18 @@ http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy
====================================================
History file of the Hadrontherapy application
====================================================
19.11.2016 A.Dotti Tag: hadrontherapy-V10-02-05
- explicit set of SD to manager
07.11.2016 G.Folger Tag: hadrontherapy-V10-02-04
- Remove direct use of theParticleIterator, and use GetParticleIterator() method.
03.11.2016 L. Pandola and J. Pipek. Tag: hadrontherapy-V10-02-03
- Fixed Bugzilla #1879
22.09.2016 GAP Cirrone Tag: hadrontherapy-V10-02-02
- Updated and improved the main file
- Coorected an overlap in the geometry of the passive beamline
- Code cleaning
19.05.2016 F. Romano, B. Jia Tag: hadrontherapy-V10-02-00
- new modulator class implemented
31.10.2015 F. Romano, J. Pipek Tag: hadrontherapy-V10-01-03
@@ -0,0 +1,247 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
//
// MAIN AUTHORS
// ====================
// G.A.P. Cirrone(a)*, F.Romano(a)
//
// *Corresponding author, email to pablo.cirrone@lns.infn.it
//
// WEB
// ===========
// http://www.lns.infn.it/link/Hadrontherapy
//
//
// ==========> 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), M.Russo(a), A. Tramontana (a),
// A.Varisano(a)
//
// (a) Laboratori Nazionali del Sud of INFN, Catania, Italy
// (b) Helsinki Institute of Physics, Helsinki, Finland
// (c) University of Wallongong, Australia
// (d) CERN, Geneve, Switzwerland
// (e) INFN Section of Genova, Genova, Italy
// (f) Physics and Astronomy Department, Univ. of Catania, Catania, Italy
//
//
// ----------------------------------------------------------------------------
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4PhysListFactory.hh"
#include "G4VModularPhysicsList.hh"
#include "HadrontherapyEventAction.hh"
#include "HadrontherapyPhysicsList.hh"
#include "HadrontherapyDetectorSD.hh"
#include "HadrontherapyPrimaryGeneratorAction.hh"
#include "HadrontherapyRunAction.hh"
#include "HadrontherapyMatrix.hh"
#include "Randomize.hh"
#include "G4UImessenger.hh"
#include "globals.hh"
#include "HadrontherapySteppingAction.hh"
#include "HadrontherapyAnalysisManager.hh"
#include "HadrontherapyGeometryController.hh"
#include "HadrontherapyGeometryMessenger.hh"
#include "HadrontherapyInteractionParameters.hh"
#include "HadrontherapyLet.hh"
#include "G4ScoringManager.hh"
#include "G4ParallelWorldPhysics.hh"
#include <time.h>
//************************MT*********************
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "HadrontherapyActionInitialization.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
//////////////////////////////////////////////////////////////////////////////////////////////
int main(int argc ,char ** argv)
{
// Set the Random engine
CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine());
// Only if an initial random seed is needed
//G4int seed =1414159599;// time(0);
//CLHEP::HepRandom::setTheSeed(seed);
// G4cout << "******************************************************************"<< seed << G4endl;
//************************MT*********************
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = new G4MTRunManager;
//runManager->SetNumberOfThreads(2); // Is equal to 2 by default, it can be setted also with the macro command: /run/numberOfThread 2
#else
G4RunManager* runManager = new G4RunManager;
#endif
// Geometry controller is responsible for instantiating the
// geometries. All geometry specific setup tasks are now in class
// HadrontherapyGeometryController.
HadrontherapyGeometryController *geometryController = new HadrontherapyGeometryController();
// Connect the geometry controller to the G4 user interface
HadrontherapyGeometryMessenger *geometryMessenger = new HadrontherapyGeometryMessenger(geometryController);
G4ScoringManager *scoringManager = G4ScoringManager::GetScoringManager();
scoringManager->SetVerboseLevel(1);
// Initialize the default Hadrontherapy geometry
geometryController->SetGeometry("default");
// Initialize command based scoring
G4ScoringManager::GetScoringManager();
// Initialize the physics
G4PhysListFactory factory;
G4VModularPhysicsList* phys = 0;
G4String physName = "";
// Physics List name defined via environment variable
char* path = getenv("PHYSLIST");
if (path) { physName = G4String(path); }
if(physName != "" && factory.IsReferencePhysList(physName))
{
phys = factory.GetReferencePhysList(physName);
}
if (phys)
{
G4cout << "Going to register G4ParallelWorldPhysics" << G4endl;
phys->RegisterPhysics(new G4ParallelWorldPhysics("DetectorROGeometry"));
}
else
{
G4cout << "Using HadrontherapyPhysicsList()" << G4endl;
phys = new HadrontherapyPhysicsList();
}
runManager->SetUserInitialization(phys);
//************************MT
runManager->SetUserInitialization(new HadrontherapyActionInitialization);
// Interaction data: stopping powers
HadrontherapyInteractionParameters* pInteraction = new HadrontherapyInteractionParameters(true);
// Initialize analysis
HadrontherapyAnalysisManager* analysis = HadrontherapyAnalysisManager::GetInstance();
#ifdef G4ANALYSIS_USE_ROOT
analysis -> book();
#endif
// Get the pointer to the visualization manager
#ifdef G4VIS_USE
G4VisManager* visManager = new G4VisExecutive;
visManager -> Initialize();
#endif
// Get the pointer to the User Interface manager
G4UImanager* UImanager = G4UImanager::GetUIpointer();
if (argc == 1) // Define UI session for interactive mode.
{
#ifdef G4UI_USE
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
G4cout << " UI session starts ..." << G4endl;
UImanager -> ApplyCommand("/control/execute macro/defaultMacro.mac");
ui -> SessionStart();
delete ui;
#endif
}
else // Batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager -> ApplyCommand(command+fileName);
}
// Job termination
// Store dose & fluence data to ASCII & ROOT files
if ( HadrontherapyMatrix * pMatrix = HadrontherapyMatrix::GetInstance() )
{
pMatrix -> TotalEnergyDeposit();
pMatrix -> StoreDoseFluenceAscii();
#ifdef G4ANALYSIS_USE_ROOT
pMatrix -> StoreDoseFluenceRoot();
#endif
}
if (HadrontherapyLet *let = HadrontherapyLet::GetInstance())
if(let -> doCalculation)
{
let -> LetOutput(); // Calculate let
let -> StoreLetAscii(); // Store it
#ifdef G4ANALYSIS_USE_ROOT
let -> StoreLetRoot();
#endif
}
#ifdef G4ANALYSIS_USE_ROOT
if (analysis -> IsTheTFile()) analysis -> flush(); // Finalize & write the root file
#endif
#ifdef G4VIS_USE
delete visManager;
#endif
delete geometryMessenger;
delete geometryController;
delete pInteraction;
delete runManager;
delete analysis;
return 0;
}
@@ -0,0 +1,623 @@
############################################
!!! WARNING - FPE detection is activated !!!
############################################
*************************************************************
Geant4 version Name: geant4-10-03 (9-December-2016)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Activating geometry default
Going to register Parallel world...... done
Using HadrontherapyPhysicsList()
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)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
OpenGLImmediateXm (OGLIXm, OGLIQt_FALLBACK)
OpenGLStoredXm (OGLSXm, OGLSQt_FALLBACK)
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK, OGLIXm_FALLBACK)
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, 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.
Available colours:
black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow
/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
Checking overlaps for volume BrassTube2 ... OK!
/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 : (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: (200 um ,4 cm ,4 cm )
The number of Voxels along (X,Y,Z) is: (200,1,1)
G4PhysicsListHelper::AddTransportation()--- G4CoupledTransportation is used
### G4EmConfigurator::AddModels n= 0
PhysicsList::SetCuts:CutLength : 1 mm
/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 1 0
DetectorLog 1 1 0
### === Auger cascade flag: 1
### === Ignore cuts flag: 1
phot: for gamma SubType= 12 BuildTable= 0
LambdaPrime table from 200 keV to 10 TeV in 154 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermorePhElectric : Emin= 0 eV Emax= 10 TeV AngularGenSauterGavrila FluoActive
compt: for gamma SubType= 13 BuildTable= 1
Lambda table from 100 eV to 1 MeV, 20 bins per decade, spline: 1
LambdaPrime table from 1 MeV to 10 TeV in 140 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LowEPComptonModel : Emin= 0 eV Emax= 20 MeV FluoActive
KleinNishina : Emin= 20 MeV Emax= 10 TeV FluoActive
conv: for gamma SubType= 14 BuildTable= 1
Lambda table from 1.022 MeV to 10 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
PenConversion : Emin= 0 eV Emax= 80 GeV
BetheHeitlerLPM : Emin= 80 GeV Emax= 10 TeV
Rayl: for gamma SubType= 11 BuildTable= 1
Lambda table from 100 eV to 100 keV, 20 bins per decade, spline: 0
LambdaPrime table from 100 keV to 10 TeV in 160 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermoreRayleigh : Emin= 0 eV Emax= 10 TeV CullenGenerator
msc: for e- SubType= 10
RangeFactor= 0.02, stepLimitType: 3, latDisplacement: 1, skin= 1, geomFactor= 2.5
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 120 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 100 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
PenIoni : Emin= 0 eV Emax= 1 MeV
MollerBhabha : Emin= 1 MeV Emax= 10 TeV deltaVI
eBrem: for e- SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per 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= 10 TeV AngularGen2BS
ePairProd: for e- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
Sampling table 21x1001 from 0.1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for e-, integral: 1 SubType= 1 BuildTable= 1
Lambda table from 100 MeV to 10 TeV, 20 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 10 TeV
msc: for e+ SubType= 10
RangeFactor= 0.02, stepLimitType: 3, latDisplacement: 1, skin= 1, geomFactor= 2.5
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 120 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 100 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
PenIoni : Emin= 0 eV Emax= 1 MeV
MollerBhabha : Emin= 1 MeV Emax= 10 TeV deltaVI
eBrem: for e+ SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per 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= 10 TeV AngularGen2BS
ePairProd: for e+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
Sampling table 21x1001 from 0.1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplus2gg : Emin= 0 eV Emax= 10 TeV
CoulombScat: for e+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from 100 MeV to 10 TeV, 20 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 10 TeV
msc: for proton SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 220 bins Emin= 100 eV Emax= 10 TeV
hIoni: for proton SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.02, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 2 MeV deltaVI
BetheBloch : Emin= 2 MeV Emax= 10 TeV deltaVI
hBrems: for proton SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for proton, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of anti_proton
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
nuclearStopping: for proton SubType= 8 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for GenericIon SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 10 TeV
ionIoni: for GenericIon SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.001, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
ParamICRU73 : Emin= 0 eV Emax= 10 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, stepLimitType: 0, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 10 TeV Table with 220 bins Emin= 100 eV Emax= 10 TeV
ionIoni: for alpha SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 7.9452 MeV deltaVI
BetheBloch : Emin= 7.9452 MeV Emax= 10 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, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 220 bins Emin= 100 eV Emax= 10 TeV
hIoni: for anti_proton SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.02, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 2 MeV deltaVI
BetheBloch : Emin= 2 MeV Emax= 10 TeV deltaVI
hBrems: for anti_proton SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for anti_proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for anti_proton, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 10 TeV, 20 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
nuclearStopping: for anti_proton SubType= 8 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for kaon+ SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 220 bins Emin= 100 eV Emax= 10 TeV
hIoni: for kaon+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.05, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 1.05231 MeV deltaVI
BetheBloch : Emin= 1.05231 MeV Emax= 10 TeV deltaVI
hBrems: for kaon+ SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for kaon+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for kaon+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 10 TeV, 20 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for kaon- SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 220 bins Emin= 100 eV Emax= 10 TeV
hIoni: for kaon- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.05, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 1.05231 MeV deltaVI
BetheBloch : Emin= 1.05231 MeV Emax= 10 TeV deltaVI
hBrems: for kaon- SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for kaon- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for kaon-, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of kaon+
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for mu+ SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 220 bins Emin= 100 eV Emax= 10 TeV
muIoni: for mu+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.05, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 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= 10 TeV
muBrems: for mu+ SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 10 TeV
muPairProd: for mu+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for mu+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 10 TeV, 20 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for mu- SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 220 bins Emin= 100 eV Emax= 10 TeV
muIoni: for mu- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.05, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 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= 10 TeV
muBrems: for mu- SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 10 TeV
muPairProd: for mu- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for mu-, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of mu+
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for pi+ SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 220 bins Emin= 100 eV Emax= 10 TeV
hIoni: for pi+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.05, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 297.505 keV deltaVI
BetheBloch : Emin= 297.505 keV Emax= 10 TeV deltaVI
hBrems: for pi+ SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for pi+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for pi+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 10 TeV, 20 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for pi- SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 220 bins Emin= 100 eV Emax= 10 TeV
hIoni: for pi- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.05, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 297.505 keV deltaVI
BetheBloch : Emin= 297.505 keV Emax= 10 TeV deltaVI
hBrems: for pi- SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for pi- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 220 bins
Lambda tables from threshold to 10 TeV, 20 bins per decade, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of pi+
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 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
Index : 10 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 :
DetectorLog
====================================================================
### Run 0 starts.
Run 0 starts ...
---> Begin of Event: 0
---> Begin of Event: 100
---> Begin of Event: 200
---> Begin of Event: 300
---> Begin of Event: 400
Run terminated.
Run Summary
Number of events processed : 500
User=7.9s Real=7.96s Sys=0.04s
Dose is being written to Dose.out
Graphics systems deleted.
Visualization Manager deleting...
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.38 MB
============================================================
RunManagerKernel is deleted. Good bye :)
@@ -18,7 +18,7 @@
##########################
# Set of the physic models
#
/Physics/addPhysics QGSP_BIC_EMY
/Physics/addPhysics HADRONTHERAPY_1
##########################
@@ -39,7 +39,7 @@
# Visualisation
#
/vis/scene/create
/vis/open OGL
/vis/open OGLI
#/vis/viewer/set/background white
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 30 140 deg
@@ -72,7 +72,7 @@
#---------------------------gps-----------------
/gps/pos/shape Circle
/gps/pos/centre -187. 0. 0. cm
/gps/pos/centre -10. 0. 0. cm
/gps/pos/radius 0. mm
/gps/pos/sigma_r 2. mm
/gps/particle ion
@@ -97,7 +97,7 @@
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/ene/mono 744 MeV
/gps/ene/mono 3240 MeV
/gps/ene/sigma 0.744 MeV
@@ -106,12 +106,12 @@
/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/size 20 20 20 cm
/changeDetector/voxelSize .2 20 20 cm
# Put the detector in the lower left corner of the phantom
/changeDetector/displacement 0 18 18 cm
/changeDetector/displacement 0 8 8 cm
/changePhantom/update
#########################
@@ -129,6 +129,6 @@
#
#########################
/run/beamOn 4
/run/beamOn 2000
@@ -26,16 +26,25 @@
##########################
# Visualisation
#
/vis/open OGL 600x600-0+0
/vis/scene/create
/vis/open OGLI
/vis/viewer/flush
# 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
/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
@@ -55,7 +64,6 @@
# energy and position along the X direction
#
#---------------------------gps-----------------
/gps/pos/shape Circle
/gps/pos/centre -310. 0. 0. cm
@@ -80,7 +88,7 @@
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/ene/mono 62 MeV
/gps/ene/mono 63.5 MeV
/gps/ene/sigma 0.3 MeV
@@ -101,7 +109,7 @@
###################################################
#
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize .4 40 40 mm
/changeDetector/voxelSize .1 40 40 mm
# Put the detector in the lower left corner of the phantom
#
@@ -124,7 +132,9 @@
# Default material is water liquid
#/changePhantom/material G4_PLEXIGLASS
/run/beamOn 10
/run/printProgress 10
/run/beamOn 1
/control/shell mkdir -p SimulationOutputs/proton/BraggPeak
/control/shell mv DoseDistribution.root SimulationOutputs/proton/BraggPeak/protonBraggPeak.root
@@ -324,7 +324,7 @@ void HadrontherapyDetectorROGeometry::ConstructSD()
G4String sensitiveDetectorName = "RODetector";
HadrontherapyDetectorSD* detectorSD = new HadrontherapyDetectorSD(sensitiveDetectorName);
G4SDManager::GetSDMpointer()->AddNewDetector(detectorSD);
SetSensitiveDetector(sensitiveLogicalVolume,detectorSD);
@@ -40,8 +40,8 @@ HadrontherapyElectricTabulatedField3D::HadrontherapyElectricTabulatedField3D( co
G4double ElenUnit= cm;
G4double EfieldUnit= volt/m;
G4cout << "\n-----------------------------------------------------------"
<< "\n Electric field"
<< "\n-----------------------------------------------------------";
<< "\n Electric field"
<< "\n-----------------------------------------------------------";
G4cout << "\n ---> " "Reading the field grid from " << filename << " ... " << endl;
G4AutoLock lock(&MyHadrontherapyLockEField);
@@ -143,9 +143,9 @@ void HadrontherapyElectricTabulatedField3D::GetFieldValue(const G4double Epoint[
G4double z1 = Epoint[2] + feZoffset;
// Check that the point is within the defined region
if ( x1>=Eminx && x1<Emaxx &&
y1>=Eminy && y1<Emaxy &&
z1>=Eminz && z1<Emaxz ) {
if ( x1>Eminx && x1<Emaxx &&
y1>Eminy && y1<Emaxy &&
z1>Eminz && z1<Emaxz ) {
// Position of given point within region, normalized to the range
// [0,1]
@@ -169,9 +169,9 @@ void HadrontherapyElectricTabulatedField3D::GetFieldValue(const G4double Epoint[
// The indices of the nearest tabulated point whose coordinates
// are all less than those of the given point
G4int exindex = static_cast<G4int>(exdindex);
G4int eyindex = static_cast<G4int>(eydindex);
G4int ezindex = static_cast<G4int>(ezdindex);
G4int exindex = static_cast<G4int>(std::floor(exdindex));
G4int eyindex = static_cast<G4int>(std::floor(eydindex));
G4int ezindex = static_cast<G4int>(std::floor(ezdindex));
/*
#ifdef DEBUG_G4intERPOLATING_FIELD
@@ -43,7 +43,7 @@
/////////////////////////////////////////////////////////////////////////////
HadrontherapyEventAction::HadrontherapyEventAction() :
drawFlag("all" ),printModulo(1000), pointerEventMessenger(0)
drawFlag("all" ),printModulo(10), pointerEventMessenger(0)
{
hitsCollectionID = -1;
pointerEventMessenger = new HadrontherapyEventActionMessenger(this);
@@ -53,13 +53,12 @@ HadrontherapyEventAction::HadrontherapyEventAction() :
HadrontherapyEventAction::~HadrontherapyEventAction()
{
delete pointerEventMessenger;
}
}
/////////////////////////////////////////////////////////////////////////////
void HadrontherapyEventAction::BeginOfEventAction(const G4Event* evt)
{
G4int evtNb = evt->GetEventID();
//printing survey
if (evtNb%printModulo == 0)
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
@@ -142,9 +142,9 @@ void HadrontherapyMagneticField3D::GetFieldValue(const double point[4],
double z = point[2];
// Check that the point is within the defined region
if ( x>=minx && x<maxx &&
y>=miny && y<maxy &&
z>=minz && z<maxz ) {
if ( x>minx && x<maxx &&
y>miny && y<maxy &&
z>minz && z<maxz ) {
// Position of given point within region, normalized to the range
// [0,1]
double xfraction = (x - minx) / dx;
@@ -167,9 +167,9 @@ void HadrontherapyMagneticField3D::GetFieldValue(const double point[4],
// The indices of the nearest tabulated point whose coordinates
// are all less than those of the given point
int xindex = static_cast<int>(xdindex);
int yindex = static_cast<int>(ydindex);
int zindex = static_cast<int>(zdindex);
int xindex = static_cast<int>(std::floor(xdindex));
int yindex = static_cast<int>(std::floor(ydindex));
int zindex = static_cast<int>(std::floor(zdindex));
#ifdef DEBUG_INTERPOLATING_FIELD
@@ -469,12 +469,12 @@ for (G4int i=1;i<StepNumbers;i++)
G4VisAttributes * red = new G4VisAttributes( G4Colour(1. ,0. ,0.));
red-> SetVisibility(true);
red-> SetForceSolid(true);
logicMotherMod -> SetVisAttributes(G4VisAttributes::Invisible);
logicMotherMod -> SetVisAttributes(G4VisAttributes::GetInvisible());
logicMod1 ->SetVisAttributes(G4VisAttributes::Invisible);
logicMod2 ->SetVisAttributes(G4VisAttributes::Invisible);
logicMod3 ->SetVisAttributes(G4VisAttributes::Invisible);
logicMod4 ->SetVisAttributes(G4VisAttributes::Invisible);
logicMod1 ->SetVisAttributes(G4VisAttributes::GetInvisible());
logicMod2 ->SetVisAttributes(G4VisAttributes::GetInvisible());
logicMod3 ->SetVisAttributes(G4VisAttributes::GetInvisible());
logicMod4 ->SetVisAttributes(G4VisAttributes::GetInvisible());
for (G4int i=1;i<StepNumbers;i++)
{
@@ -280,9 +280,10 @@ void HadrontherapyPhysicsList::AddStepMax()
HadrontherapyStepMax* stepMaxProcess = new HadrontherapyStepMax();
G4AutoDelete::Register( stepMaxProcess );
theParticleIterator->reset();
while ((*theParticleIterator)()){
G4ParticleDefinition* particle = theParticleIterator->value();
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while ((*particleIterator)()){
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (stepMaxProcess->IsApplicable(*particle) && pmanager)
@@ -727,7 +727,7 @@ void LaserDrivenBeamLine::ConstructLaserDrivenBeamLine()
// The treatment room is invisible in the Visualisation
logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::Invisible);
logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::GetInvisible());
// The various components of the energyselector are constructed calling
// the following methods
@@ -1049,7 +1049,7 @@ G4double VirtualLateralPosX=GuardRingPosX+GuardRingThickness/2+1*cm+(FaradayCupB
logicVirtualWindow,
physicVirtualMag,
true,0);
logicVirtualWindow->SetVisAttributes (G4VisAttributes::Invisible);
logicVirtualWindow->SetVisAttributes (G4VisAttributes::GetInvisible());
///// GuardRing /////
@@ -1094,7 +1094,7 @@ G4double VirtualLateralPosX=GuardRingPosX+GuardRingThickness/2+1*cm+(FaradayCupB
physicVirtualMag,
true,0);
logicVirtualMiddle->SetVisAttributes (G4VisAttributes::Invisible);
logicVirtualMiddle->SetVisAttributes (G4VisAttributes::GetInvisible());
///// FaradayCupBottom /////
@@ -1135,7 +1135,7 @@ G4double VirtualLateralPosX=GuardRingPosX+GuardRingThickness/2+1*cm+(FaradayCupB
physicVirtualMag,
true,0);
logicVirtualBottom->SetVisAttributes (G4VisAttributes::Invisible);
logicVirtualBottom->SetVisAttributes (G4VisAttributes::GetInvisible());
///// Cup /////
@@ -1177,7 +1177,7 @@ G4double VirtualLateralPosX=GuardRingPosX+GuardRingThickness/2+1*cm+(FaradayCupB
physicVirtualMag,
true,0);
logicVirtualOverBottom->SetVisAttributes (G4VisAttributes::Invisible);
logicVirtualOverBottom->SetVisAttributes (G4VisAttributes::GetInvisible());
///// Virtual Lateral /////
@@ -1202,7 +1202,7 @@ logicVirtualLateral=new G4LogicalVolume( VirtualLateral,
logicVirtualLateral->SetVisAttributes (G4VisAttributes::Invisible);
logicVirtualLateral->SetVisAttributes (G4VisAttributes::GetInvisible());
}
/////////////////////////////////////////////////////////////////////////////
@@ -349,7 +349,7 @@ void PassiveCarbonBeamLine::ConstructPassiveCarbonBeamLine()
// The treatment room is invisible in the Visualisation
logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::Invisible);
logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::GetInvisible());
// Components of the Passive Carbon Beam Line
HadrontherapyBeamLineSupport();
@@ -571,7 +571,7 @@ void PassiveProtonBeamLine::ConstructPassiveProtonBeamLine()
// The treatment room is invisible in the Visualisation
logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::Invisible);
logicTreatmentRoom -> SetVisAttributes (G4VisAttributes::GetInvisible());
// Components of the Passive Proton Beam Line
HadrontherapyBeamLineSupport();
@@ -1370,6 +1370,7 @@ void PassiveProtonBeamLine::HadrontherapyBeamNozzle()
logicHoleNozzleSupport -> SetVisAttributes(darkOrange3);
// ---------------------------------//
// BRASS TUBE 1 (phantom side) //
// ---------------------------------//
@@ -1404,6 +1405,7 @@ void PassiveProtonBeamLine::HadrontherapyBeamNozzle()
0);
logicBrassTube -> SetVisAttributes(darkOrange3);
// ----------------------------------------------//
// BRASS TUBE 2 (inside the PMMA support) //
@@ -1427,20 +1429,21 @@ void PassiveProtonBeamLine::HadrontherapyBeamNozzle()
brassTube2Material,
"BrassTube2",
0, 0, 0);
physiBrassTube2 = new G4PVPlacement(G4Transform3D(rm,
G4ThreeVector(0,
0.,
0.)),
"BrassTube2",
logicBrassTube2,
physiNozzleSupport,
false,
0);
G4bool checkOverlaps = true;
new G4PVPlacement(0,
G4ThreeVector(),
logicBrassTube2,
"BrassTube2",
logicHoleNozzleSupport,
false,
0,
checkOverlaps);
logicBrassTube2 -> SetVisAttributes(darkOrange3);
// --------------------------------------//
// BRASS TUBE 3 (beam line side) //
// -------------------------------------//