Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -58,6 +58,11 @@ public:
// Definition of the first scattering foil,
// of the Kapton window, of the stopper
void HadrontherapyRangeShifter();
// This defines the "range shifter". Is is a slab
// (usually of PMMA" acting as energy degrader
// of primary beam
void HadrontherapyBeamCollimators();
// Definition of the first collimator, of the range shifter,
// of the second collimator, of the first and second
@@ -66,6 +71,9 @@ public:
void HadrontherapyBeamMonitoring();
// Definition of three monitor chambers
void HadrontherapyMOPIDetector();
// Construct the MOPI on-line detector
void HadrontherapyBeamNozzle();
// Definition of the beam noozle
@@ -103,7 +111,47 @@ public:
// of the range shifter
private:
G4VPhysicalVolume* physiBeamLineSupport;
G4double vacuumZoneXSize;
G4double vacuumZoneYSize;
G4double vacuumZoneZSize;
G4double vacuumZoneXPosition;
G4double firstScatteringFoilXSize;
G4double firstScatteringFoilYSize;
G4double firstScatteringFoilZSize;
G4double firstScatteringFoilXPosition;
G4double kaptonWindowXSize;
G4double kaptonWindowYSize;
G4double kaptonWindowZSize;
G4double kaptonWindowXPosition;
G4double innerRadiusStopper;
G4double heightStopper;
G4double startAngleStopper;
G4double spanningAngleStopper;
G4double stopperXPosition;
G4double stopperYPosition;
G4double stopperZPosition;
G4double outerRadiusStopper;
G4double secondScatteringFoilXSize;
G4double secondScatteringFoilYSize;
G4double secondScatteringFoilZSize;
G4double secondScatteringFoilXPosition;
G4double secondScatteringFoilYPosition;
G4double secondScatteringFoilZPosition;
G4double rangeShifterXSize;
G4double rangeShifterYSize;
G4double rangeShifterZSize;
G4double rangeShifterXPosition;
G4double rangeShifterYPosition;
G4double rangeShifterZPosition;
G4VPhysicalVolume* physiBeamLineSupport;
G4VPhysicalVolume* physiBeamLineCover;
G4VPhysicalVolume* physiBeamLineCover2;
G4Box* firstScatteringFoil;
@@ -120,10 +168,115 @@ private:
G4VPhysicalVolume* physiRangeShifterBox;
G4VPhysicalVolume* physiSecondCollimator;
G4VPhysicalVolume* physiHoleSecondCollimator;
G4VPhysicalVolume* physiFirstCollimatorModulatorBox;
G4VPhysicalVolume* physiFirstCollimatorModulatorBox;
G4VPhysicalVolume* physiHoleFirstCollimatorModulatorBox;
G4VPhysicalVolume* physiSecondCollimatorModulatorBox;
G4VPhysicalVolume* physiHoleSecondCollimatorModulatorBox;
// MOPI Detector
// Mother volume
G4VPhysicalVolume* physiMOPIMotherVolume;
G4LogicalVolume* logicMOPIMotherVolume;
G4Box* solidMOPIMotherVolume;
G4Material* MOPIMotherVolumeMaterial;
G4double MOPIMotherVolumeXSize;
G4double MOPIMotherVolumeYSize;
G4double MOPIMotherVolumeZSize;
G4double MOPIMotherVolumeXPosition;
G4double MOPIMotherVolumeYPosition;
G4double MOPIMotherVolumeZPosition;
// First Kapton layer
G4double MOPIFirstKaptonLayerXSize;
G4double MOPIFirstKaptonLayerYSize;
G4double MOPIFirstKaptonLayerZSize;
G4double MOPIFirstKaptonLayerXPosition;
G4double MOPIFirstKaptonLayerYPosition;
G4double MOPIFirstKaptonLayerZPosition;
G4Box* solidMOPIFirstKaptonLayer;
G4LogicalVolume* logicMOPIFirstKaptonLayer;
G4VPhysicalVolume* physiMOPIFirstKaptonLayer;
// First Aluminum layer
G4double MOPIFirstAluminumLayerXSize;
G4double MOPIFirstAluminumLayerYSize;
G4double MOPIFirstAluminumLayerZSize;
G4double MOPIFirstAluminumLayerXPosition;
G4double MOPIFirstAluminumLayerYPosition;
G4double MOPIFirstAluminumLayerZPosition;
G4Box* solidMOPIFirstAluminumLayer;
G4LogicalVolume* logicMOPIFirstAluminumLayer;
G4VPhysicalVolume* physiMOPIFirstAluminumLayer;
// First Air Gap
G4double MOPIFirstAirGapXSize;
G4double MOPIFirstAirGapYSize;
G4double MOPIFirstAirGapZSize;
G4double MOPIFirstAirGapXPosition;
G4double MOPIFirstAirGapYPosition;
G4double MOPIFirstAirGapZPosition;
G4Box* solidMOPIFirstAirGap;
G4LogicalVolume* logicMOPIFirstAirGap;
G4VPhysicalVolume* physiMOPIFirstAirGap;
// Cathode
G4double MOPICathodeXSize;
G4double MOPICathodeYSize;
G4double MOPICathodeZSize;
G4double MOPICathodeXPosition;
G4double MOPICathodeYPosition;
G4double MOPICathodeZPosition;
G4Box* solidMOPICathode;
G4LogicalVolume* logicMOPICathode;
G4VPhysicalVolume* physiMOPICathode;
// First Air Gap
G4double MOPISecondAirGapXSize;
G4double MOPISecondAirGapYSize;
G4double MOPISecondAirGapZSize;
G4double MOPISecondAirGapXPosition;
G4double MOPISecondAirGapYPosition;
G4double MOPISecondAirGapZPosition;
G4Box* solidMOPISecondAirGap;
G4LogicalVolume* logicMOPISecondAirGap;
G4VPhysicalVolume* physiMOPISecondAirGap;
// First Aluminum layer
G4double MOPISecondAluminumLayerXSize;
G4double MOPISecondAluminumLayerYSize;
G4double MOPISecondAluminumLayerZSize;
G4double MOPISecondAluminumLayerXPosition;
G4double MOPISecondAluminumLayerYPosition;
G4double MOPISecondAluminumLayerZPosition;
G4Box* solidMOPISecondAluminumLayer;
G4LogicalVolume* logicMOPISecondAluminumLayer;
G4VPhysicalVolume* physiMOPISecondAluminumLayer;
// Second Kapton layer
G4double MOPISecondKaptonLayerXSize;
G4double MOPISecondKaptonLayerYSize;
G4double MOPISecondKaptonLayerZSize;
G4double MOPISecondKaptonLayerXPosition;
G4double MOPISecondKaptonLayerYPosition;
G4double MOPISecondKaptonLayerZPosition;
G4Box* solidMOPISecondKaptonLayer;
G4LogicalVolume* logicMOPISecondKaptonLayer;
G4VPhysicalVolume* physiMOPISecondKaptonLayer;
G4double innerRadiusFinalCollimator;
G4VPhysicalVolume* mother;
G4VPhysicalVolume* physiFirstMonitorLayer1;
G4VPhysicalVolume* physiFirstMonitorLayer2;
G4VPhysicalVolume* physiFirstMonitorLayer3;
@@ -132,24 +285,12 @@ private:
G4VPhysicalVolume* physiSecondMonitorLayer2;
G4VPhysicalVolume* physiSecondMonitorLayer3;
G4VPhysicalVolume* physiSecondMonitorLayer4;
G4VPhysicalVolume* physiThirdMonitorLayer1;
G4VPhysicalVolume* physiThirdMonitorLayer2;
G4VPhysicalVolume* physiThirdMonitorLayer3;
G4VPhysicalVolume* physiThirdMonitorLayer4;
G4VPhysicalVolume* physiNozzleSupport;
G4VPhysicalVolume* physiHoleNozzle;
G4VPhysicalVolume* physiHoleNozzleSupport;
G4VPhysicalVolume* physiSecondHoleNozzleSupport;
G4Tubs* solidFinalCollimator;
G4VPhysicalVolume* physiFinalCollimator;
G4double firstScatteringFoilXSize;
G4double outerRadiusStopper;
G4double secondScatteringFoilXSize;
G4double rangeShifterXSize;
G4double rangeShifterXPosition;
G4double innerRadiusFinalCollimator;
G4VPhysicalVolume* mother;
HadrontherapyMaterial* material;
G4Material* RSMat;
};
@@ -46,11 +46,11 @@
class G4VPhysicalVolume;
class G4LogicalVolume;
class HadrontherapyPhantomROGeometry;
class HadrontherapyDetectorROGeometry;
class HadrontherapyBeamLine;
class HadrontherapyDetectorMessenger;
class HadrontherapyModulator;
class HadrontherapyPhantomSD;
class HadrontherapyDetectorSD;
class HadrontherapyMaterial;
class HadrontherapyDetectorConstruction : public G4VUserDetectorConstruction
@@ -69,7 +69,7 @@ private:
// This method allows to define the beam line geometry in the
// experimental set-up
void ConstructPhantom();
void ConstructDetector();
// This method allows to define the phantom geometry in the
// experimental set-up
@@ -109,14 +109,14 @@ public:
// This method allows to change the material
// of the range shifter through UI command.
G4double ComputeVoxelSize() {return phantomSizeX/numberOfVoxelsAlongX;};
G4double ComputeVoxelSize() {return detectorSizeX/numberOfVoxelsAlongX;};
// Returns the size of the voxel along the X axis
private:
HadrontherapyPhantomSD* phantomSD; // Pointer to sensitive detector
HadrontherapyDetectorSD* detectorSD; // Pointer to sensitive detector
HadrontherapyPhantomROGeometry* phantomROGeometry; // Pointer to ROGeometry
HadrontherapyDetectorROGeometry* detectorROGeometry; // Pointer to ROGeometry
HadrontherapyBeamLine* beamLine; // Pointer to the beam line
// geometry component
@@ -126,15 +126,15 @@ private:
G4VPhysicalVolume* physicalTreatmentRoom;
G4VPhysicalVolume* patientPhysicalVolume;
G4LogicalVolume* phantomLogicalVolume;
G4VPhysicalVolume* phantomPhysicalVolume;
G4LogicalVolume* detectorLogicalVolume;
G4VPhysicalVolume* detectorPhysicalVolume;
HadrontherapyDetectorMessenger* detectorMessenger;
HadrontherapyMaterial* material;
G4double phantomSizeX;
G4double phantomSizeY;
G4double phantomSizeZ;
G4double detectorSizeX;
G4double detectorSizeY;
G4double detectorSizeZ;
G4int numberOfVoxelsAlongX;
G4int numberOfVoxelsAlongY;
@@ -23,7 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: HadrontherapyPhantomHit.hh; May 2005
// $Id: HadrontherapyDetectorHit.hh;
// Last modified: G.A.P.Cirrone March 2008;
//
// See more at: http://geant4infn.wikispaces.com/HadrontherapyExample
//
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
@@ -38,24 +42,24 @@
// * cirrone@lns.infn.it
// ----------------------------------------------------------------------------
#ifndef HadrontherapyPhantomHit_h
#define HadrontherapyPhantomHit_h 1
#ifndef HadrontherapyDetectorHit_h
#define HadrontherapyDetectorHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
class HadrontherapyPhantomHit : public G4VHit
class HadrontherapyDetectorHit : public G4VHit
{
public:
HadrontherapyPhantomHit();
~HadrontherapyPhantomHit();
HadrontherapyDetectorHit();
~HadrontherapyDetectorHit();
HadrontherapyPhantomHit(const HadrontherapyPhantomHit &right);
HadrontherapyDetectorHit(const HadrontherapyDetectorHit &right);
const HadrontherapyPhantomHit& operator = (const HadrontherapyPhantomHit &right);
const HadrontherapyDetectorHit& operator = (const HadrontherapyDetectorHit &right);
int operator == (const HadrontherapyPhantomHit &right) const;
int operator == (const HadrontherapyDetectorHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
@@ -94,19 +98,19 @@ public:
}
};
typedef G4THitsCollection<HadrontherapyPhantomHit> HadrontherapyPhantomHitsCollection;
extern G4Allocator<HadrontherapyPhantomHit> HadrontherapyPhantomHitAllocator;
typedef G4THitsCollection<HadrontherapyDetectorHit> HadrontherapyDetectorHitsCollection;
extern G4Allocator<HadrontherapyDetectorHit> HadrontherapyDetectorHitAllocator;
inline void* HadrontherapyPhantomHit::operator new(size_t)
inline void* HadrontherapyDetectorHit::operator new(size_t)
{
void *aHit;
aHit = (void *) HadrontherapyPhantomHitAllocator.MallocSingle();
aHit = (void *) HadrontherapyDetectorHitAllocator.MallocSingle();
return aHit;
}
inline void HadrontherapyPhantomHit::operator delete(void *aHit)
inline void HadrontherapyDetectorHit::operator delete(void *aHit)
{
HadrontherapyPhantomHitAllocator.FreeSingle((HadrontherapyPhantomHit*) aHit);
HadrontherapyDetectorHitAllocator.FreeSingle((HadrontherapyDetectorHit*) aHit);
}
#endif
@@ -23,7 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: HadrontherapyPhantomROGeometry.hh; May 2005
// $Id: HadrontherapyDetectorROGeometry.hh;
// Last modified: G.A.P.Cirrone March 2008;
//
// See more at: http://geant4infn.wikispaces.com/HadrontherapyExample
//
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
@@ -38,39 +42,39 @@
// * cirrone@lns.infn.it
// ----------------------------------------------------------------------------
//The phantom is devided in voxels. the dimension of the voxel is 1 mm
//The detectior is devided in voxels.
//
//
#ifndef HadrontherapyPhantomROGeometry_h
#define HadrontherapyPhantomROGeometry_h
#ifndef HadrontherapyDetectorROGeometry_h
#define HadrontherapyDetectorROGeometry_h
#include "G4VReadOutGeometry.hh"
class HadrontherapyPhantomROGeometry : public G4VReadOutGeometry
class HadrontherapyDetectorROGeometry : public G4VReadOutGeometry
{
public:
HadrontherapyPhantomROGeometry(G4String aString,
G4double phantomDimX,
G4double phantomDimY,
G4double phantomDimZ,
HadrontherapyDetectorROGeometry(G4String aString,
G4double detectorDimX,
G4double detectorDimY,
G4double detectorDimZ,
G4int numberOfVoxelsX,
G4int numberOfVoxelsY,
G4int numberOfVoxelsZ);
~HadrontherapyPhantomROGeometry();
~HadrontherapyDetectorROGeometry();
private:
G4VPhysicalVolume* Build();
private:
const G4double phantomSizeX;
const G4double phantomSizeY;
const G4double phantomSizeZ;
const G4double detectorSizeX;
const G4double detectorSizeY;
const G4double detectorSizeZ;
const G4int numberOfVoxelsAlongX;
const G4int numberOfVoxelsAlongY;
const G4int numberOfVoxelsAlongZ;
G4VPhysicalVolume *ROPhantomZDivisionPhys;
G4VPhysicalVolume *RODetectorZDivisionPhys;
};
#endif
@@ -23,7 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: HadrontherapyPhantomSD.hh; May 2005
// $Id: HadrontherapyDetectorSD.hh;
// Last modified: G.A.P.Cirrone March 2008;
//
// See more at: http://geant4infn.wikispaces.com/HadrontherapyExample
//
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
@@ -38,21 +42,21 @@
// * cirrone@lns.infn.it
// ----------------------------------------------------------------------------
#ifndef HadrontherapyPhantomSD_h
#define HadrontherapyPhantomSD_h 1
#ifndef HadrontherapyDetectorSD_h
#define HadrontherapyDetectorSD_h 1
#include "G4VSensitiveDetector.hh"
#include "HadrontherapyPhantomHit.hh"
#include "HadrontherapyDetectorHit.hh"
#include "globals.hh"
class G4Step;
class G4HCofThisEvent;
class G4TouchableHistory;
class HadrontherapyPhantomSD : public G4VSensitiveDetector
class HadrontherapyDetectorSD : public G4VSensitiveDetector
{
public:
HadrontherapyPhantomSD(G4String name);
~HadrontherapyPhantomSD();
HadrontherapyDetectorSD(G4String name);
~HadrontherapyDetectorSD();
void Initialize(G4HCofThisEvent*);
@@ -61,7 +65,7 @@ public:
void EndOfEvent(G4HCofThisEvent*HCE);
private:
HadrontherapyPhantomHitsCollection *HitsCollection;
HadrontherapyDetectorHitsCollection *HitsCollection;
G4String sensitiveDetectorName;
};
#endif
@@ -60,6 +60,7 @@ private:
G4String drawFlag; //Visualisation flag
G4int hitsCollectionID;
HadrontherapyMatrix *matrix;
G4int printModulo;
};
#endif
@@ -29,7 +29,7 @@
// ----------------------------------------------------------------------------
// Code developed by:
//
// G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
// G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a), M.P. Russo
//
// (a) Laboratori Nazionali del Sud
// of the National Institute for Nuclear Physics, Catania, Italy
@@ -53,6 +53,7 @@ public:
virtual void SetCuts();
void AddPhysicsList(const G4String& name);
void AddPackage(const G4String& name);
private:
G4bool decayIsRegistered;
@@ -23,13 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: HadrontherapyPhisicsListMessenger.hh; May 2005
// $Id: HadrontherapyPhisicsListMessenger.hh; Nov 2008
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
// ----------------------------------------------------------------------------
// Code developed by:
//
// G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
// G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a), M.P. Russo
//
// (a) Laboratori Nazionali del Sud
// of the National Institute for Nuclear Physics, Catania, Italy
@@ -67,6 +67,7 @@ private:
HadrontherapyPhysicsList* physicsList;
G4UIdirectory* listDir;
G4UIcmdWithAString* physicsListCmd;
G4UIcmdWithAString* packageListCmd;
};
#endif