Import Geant4 8.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:44:26 +02:00
parent 8a51e0bc40
commit 216a75eeb1
8717 changed files with 360418 additions and 141343 deletions
+38 -31
View File
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: Brachy.cc
// GEANT4 tag $Name: geant4-08-00 $
// GEANT4 tag $Name: geant4-08-01 $
//
// --------------------------------------------------------------
// GEANT 4 - Brachytherapy example
@@ -38,15 +41,7 @@
// * *
// *******************************
//
// Brachytherapy simulates the energy deposition in a cubic (30*cm)
//
// brachytherapy source.
//
// Simplified gamma generation is used.
// Source axis is oriented along Z axis. The source is in the centre
//of the box.
//default source Ir-192
#include "G4RunManager.hh"
#include "G4UImanager.hh"
@@ -65,7 +60,7 @@
#include "BrachyDetectorConstruction.hh"
#include "BrachyPhysicsList.hh"
#include "BrachyPhantomSD.hh"
#include "BrachyPrimaryGeneratorActionIr.hh"
#include "BrachyPrimaryGeneratorAction.hh"
#include "G4SDManager.hh"
#include "BrachyRunAction.hh"
#include "Randomize.hh"
@@ -85,18 +80,32 @@ int main(int argc ,char ** argv)
G4String sensitiveDetectorName = "Phantom";
// Initialize the physics component
pRunManager -> SetUserInitialization(new BrachyPhysicsList);
// Initialize the detector component
BrachyDetectorConstruction *pDetectorConstruction = new BrachyDetectorConstruction(sensitiveDetectorName);
pRunManager -> SetUserInitialization(pDetectorConstruction);
pRunManager->SetUserInitialization(pDetectorConstruction);
pRunManager->SetUserInitialization(new BrachyPhysicsList);
// Initialize the primary particles
BrachyPrimaryGeneratorAction* primary = new BrachyPrimaryGeneratorAction();
pRunManager -> SetUserAction(primary);
// Initialize Optional User Action
BrachyEventAction *pEventAction = new BrachyEventAction();
pRunManager -> SetUserAction(pEventAction );
BrachyRunAction *pRunAction = new BrachyRunAction();
pRunManager -> SetUserAction(pRunAction);
//// Initialize the Visualization component
#ifdef G4VIS_USE
// visualization manager
// Visualization manager
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
#endif
// output environment variables:
// Output environment variables concerning the analysis:
#ifdef G4ANALYSIS_USE
G4cout << G4endl << G4endl << G4endl
<< " User Environment " << G4endl
@@ -108,18 +117,13 @@ int main(int argc ,char ** argv)
<< G4endl;
#endif
// Initialize the interactive session
G4UIsession* session = 0;
if (argc == 1) // Define UI session for interactive mode.
{
session = new G4UIterminal();
}
BrachyEventAction *pEventAction = new BrachyEventAction();
pRunManager -> SetUserAction(pEventAction );
BrachyRunAction *pRunAction = new BrachyRunAction();
pRunManager -> SetUserAction(pRunAction);
//Initialize G4 kernel
pRunManager -> Initialize();
@@ -139,6 +143,9 @@ int main(int argc ,char ** argv)
UI -> ApplyCommand(command+fileName);
}
// Close the output file containing histograms and n-tuple with the
// results of the simulation.
// Finish the analysis.
#ifdef G4ANALYSIS_USE
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
analysis -> finish();
+14 -1
View File
@@ -1,5 +1,5 @@
-------------------------------------------------------------------
$Id: History,v 1.15 2005/11/22 12:47:35 guatelli Exp $
$Id: History,v 1.18 2006/05/30 12:32:16 guatelli Exp $
-------------------------------------------------------------------
=========================================================
@@ -9,6 +9,19 @@ $Id: History,v 1.15 2005/11/22 12:47:35 guatelli Exp $
Category History file
---------------------
30th May 2006 Susanna Guatelli (brachy-V08-00-02)
- Deleted a warning during compilation
15th May 2006 Susanna Guatelli (brachy-V08-00-01)
- Added comments, deleted a warning during compilation
15th May 2006 Susanna Guatelli (brachy-V08-00-00)
- Hit collection deleted. The energy deposit and position are stored directly
in histograms and ntuples in the BrachyPhantomSD
- Iteration in the management of the primary particles
- More comments explain the code
- README updated
22th November 2005 Susanna Guatelli (brachy-V07-01-00)
- Deleted bug in the RunAction. The results of the simulation
(energy deposit, position) are stored in a hit collection.
@@ -2,6 +2,5 @@
/run/verbose 0
/event/verbose 0
/source/switch Iodium
/run/energy Iodium
/run/initialize
/run/beamOn 5000
/primary/energy Iodium
/run/beamOn 20000
@@ -1,5 +1,8 @@
# The iridium source is the default option
/control/verbose 1
/run/verbose 0
/event/verbose 0
/run/initialize
/run/beamOn 5000
/run/beamOn 20000
@@ -2,5 +2,4 @@
/run/verbose 0
/event/verbose 0
/source/switch Leipzig
/run/initialize
/run/beamOn 5000
/run/beamOn 20000
+2 -2
View File
@@ -66,7 +66,7 @@ idle> exit
|
3) Iodium source:
idle>/source/switch Iodium |
idle>/run/energy Iodium
idle>/primary/energy Iodium
idle>/run/beamOn NumberOfEvents ...and then |
idle>exit
|
@@ -103,4 +103,4 @@ a macro is provided ad example of visualisation: VisualisationMacro.mac|
for comments, advices, doubts and questions: guatelli@ge.infn.it
for more info http://www.ge.infn.it/geant4/examples/index.html
last modified: Susanna Guatelli 30/5/2005
last modified: Susanna Guatelli 15/5/2006
@@ -17,5 +17,9 @@
/tracking/storeTrajectory 1
/vis/scene/endOfEventAction accumulate
/vis/viewer/update
/run/initialize
/vis/scene/transientsAction none
##/primary/energy Iodium
##/source/switch Iodium
/vis/viewer/zoom 5
/run/beamOn 100
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -25,8 +28,8 @@
// S.Guatelli
//
//
// $Id: BrachyAnalysisManager.hh,v 1.9 2004/03/11 15:38:42 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyAnalysisManager.hh,v 1.11 2006/06/29 15:47:08 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// **********************************
// * *
@@ -35,11 +38,11 @@
// **********************************
//
//
// the class Analysis creates and managed histograms and ntuples
// The class BrachyAnalysisManager creates and manages histograms and ntuples
//
#ifdef G4ANALYSIS_USE
#ifndef G4PROCESSTESTANALYSIS_HH
#define G4PROCESSTESTANALYSIS_HH
#ifndef G4BRACHYANALYSISMANAGER_HH
#define G4BRACHYANALYSISMANAGER_HH
#include "globals.hh"
#include <vector>
@@ -63,7 +66,6 @@ private:
BrachyAnalysisManager();
public:
~BrachyAnalysisManager();
static BrachyAnalysisManager* getInstance();
void book();
@@ -73,16 +75,10 @@ public:
void DoseDistribution(G4double,G4double);
void finish();
private:
// G4double xx,zz,yy;
//G4float en;
//G4double x,y,z;
static BrachyAnalysisManager* instance;
private:
AIDA::IAnalysisFactory* aFact;
AIDA::ITree* theTree;
AIDA::IHistogramFactory *histFact;
@@ -1,52 +1,49 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyDetectorConstruction.hh,v 1.15 2003/05/22 17:20:40 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyDetectorConstruction.hh,v 1.17 2006/06/29 15:47:11 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// ****************************************
// * *
// * BrachyDetectorConstruction.hh *
// * *
// ****************************************
// this class manages the geometry of the simulation set up
// This class manages the geometry of the simulation experimental set-up
//
#ifndef BrachyDetectorConstruction_H
#define BrachyDetectorConstruction_H 1
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4LogicalVolume.hh"
class BrachyPhantomSD;
class BrachyDetectorMessenger;
class G4LogicalVolume;
class G4Material;
class G4Tubs;
class G4Box;
class G4Sphere;
class G4Tubs;
class G4Colour;
class G4VPhysicalVolume;
class BrachyPhantomSD;
@@ -54,7 +51,6 @@ class BrachyPhantomROGeometry;
class G4VPhysicalVolume;
class BrachyMaterial;
class BrachyFactory;
class BrachyVoxelParameterisation;
class BrachyDetectorConstruction : public G4VUserDetectorConstruction
{
@@ -71,14 +67,14 @@ public:
void PrintDetectorParameters();
void SetPhantomMaterial(G4String);
const G4double VoxelWidth_X(){return phantomDimensionX/numberOfVoxelsAlongX;}
const G4double VoxelWidth_Z(){return phantomDimensionZ/numberOfVoxelsAlongZ;}
const G4int GetNumVoxelX() {return numberOfVoxelsAlongX;}
const G4int GetNumVoxelZ() {return numberOfVoxelsAlongZ;}
const G4double GetDimX() {return phantomDimensionX;}
const G4double GetBoxDim_Z() {return phantomDimensionZ;}
const G4double VoxelWidth_X(){return phantomSizeX/numberOfVoxelsAlongX;}
const G4double VoxelWidth_Z(){return phantomSizeZ/numberOfVoxelsAlongZ;}
const G4int GetNumVoxelX(){return numberOfVoxelsAlongX;}
const G4int GetNumVoxelZ(){return numberOfVoxelsAlongZ;}
const G4double GetDimX() {return phantomSizeX;}
const G4double GetBoxDim_Z() {return phantomSizeZ;}
void ComputeDimVoxel() {dimVoxel = phantomDimensionX/numberOfVoxelsAlongX;}
void ComputeDimVoxel() {dimVoxel = phantomSizeX/numberOfVoxelsAlongX;}
private:
@@ -98,14 +94,15 @@ private:
G4VPhysicalVolume* PhantomPhys; //pointer to physical phantom
G4Material* phantomAbsorberMaterial;
G4double phantomDimensionX; //Phantom XDimension
G4double phantomDimensionY; //Phantom YDimension
G4double phantomDimensionZ; //Phantom ZDimension
G4double phantomSizeX; //Phantom XSize
G4double phantomSizeY; //Phantom YSize
G4double phantomSizeZ; //Phantom ZSize
G4int numberOfVoxelsAlongX; //Number of voxels along x axis
G4int numberOfVoxelsAlongY; //Number of voxels along y axis
G4int numberOfVoxelsAlongZ; //Number of voxels along z axis
G4double Worldx ; //World XDimension
G4double Worldy ; //World YDimension
G4double Worldz ; //World XDimension
G4double worldSizeX ; //World XSize
G4double worldSizeY ; //World YSize
G4double worldSizeZ ; //World XSize
G4String sensitiveDetectorName;
BrachyDetectorMessenger* detectorMessenger;
BrachyMaterial* pMaterial;
@@ -1,50 +1,45 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyDetectorConstructionI.hh,v 1.3 2003/05/22 17:20:40 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyDetectorConstructionI.hh,v 1.5 2006/06/29 15:47:13 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// ****************************************
// * *
// * BrachyDetectorConstructionI.hh *
// * *
// ****************************************
//Management of the Iodium source
// Model of the Iodium source
//
#ifndef BrachyDetectorConstructionI_H
#define BrachyDetectorConstructionI_H 1
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4LogicalVolume.hh"
class G4LogicalVolume;
class G4Tubs;
class G4Box;
class G4Sphere;
class G4Tubs;
class G4Colour;
class G4VPhysicalVolume;
class G4VPhysicalVolume;
class BrachyMaterial;
@@ -56,29 +51,10 @@ public:
void ConstructIodium(G4VPhysicalVolume*);// Construct iodium source
private:
//air tub ...
G4Tubs* defaultTub;
G4LogicalVolume* defaultTubLog;
G4VPhysicalVolume* defaultTubPhys;
//source titanium capsule ...
G4Tubs* capsule ;
G4LogicalVolume* capsuleLog;
G4VPhysicalVolume* capsulePhys;
G4Sphere* capsuleTip;
G4LogicalVolume* capsuleTipLog;
G4VPhysicalVolume* capsuleTipPhys1;
G4VPhysicalVolume* capsuleTipPhys2;
//radioactive core ...
G4Tubs* iodiumCore;
G4LogicalVolume* iodiumCoreLog;
G4VPhysicalVolume* iodiumCorePhys;
// golden marker ...
G4Tubs* marker;
G4LogicalVolume* markerLog;
G4VPhysicalVolume* markerPhys;
BrachyMaterial* pMaterial;
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyDetectorConstructionIr.hh,v 1.3 2003/05/22 17:20:41 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyDetectorConstructionIr.hh,v 1.5 2006/06/29 15:47:16 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// ****************************************
// * *
@@ -30,7 +33,7 @@
// * *
// ****************************************
//
//Management of the Iridium source
// Management of the Iridium source
//
#ifndef BrachyDetectorConstructionIr_H
@@ -38,26 +41,26 @@
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4LogicalVolume.hh"
class G4LogicalVolume;
class G4Tubs;
class G4Box;
class G4Sphere;
class G4Tubs;
class G4Colour;
class G4VPhysicalVolume;
class G4VPhysicalVolume;
class BrachyMaterial;
class G4VisAttributes;
class BrachyDetectorConstructionIr
{
public:
BrachyDetectorConstructionIr();
~BrachyDetectorConstructionIr();
void ConstructIridium(G4VPhysicalVolume*);
void CleanIridium();
// Model the Iridum source
void CleanIridium();
// Destroy the Iridium source in the experimental set-up
private:
G4Tubs* capsule ;
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyDetectorConstructionLeipzig.hh,v 1.3 2003/05/22 17:20:41 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyDetectorConstructionLeipzig.hh,v 1.5 2006/06/29 15:47:19 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
// ************************************************
@@ -31,23 +34,14 @@
// * *
// ************************************************
//
//Management of Leipzig applicator
// Management of Leipzig applicator
//
#ifndef BrachyDetectorConstructionLeipzig_H
#define BrachyDetectorConstructionLeipzig_H 1
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4LogicalVolume.hh"
class G4LogicalVolume;
class G4Tubs;
class G4Box;
class G4Sphere;
class G4Tubs;
class G4Colour;
class G4VPhysicalVolume;
class G4VPhysicalVolume;
class BrachyMaterial;
@@ -56,27 +50,13 @@ class BrachyDetectorConstructionLeipzig
public:
BrachyDetectorConstructionLeipzig();
~BrachyDetectorConstructionLeipzig();
void ConstructLeipzig(G4VPhysicalVolume*);
void ConstructLeipzig(G4VPhysicalVolume*);
private:
G4Tubs* capsule ;
G4LogicalVolume* capsuleLog;
G4VPhysicalVolume* capsulePhys;
G4Sphere* capsuleTip;
G4LogicalVolume* capsuleTipLog;
G4VPhysicalVolume* capsuleTipPhys;
G4Tubs* iridiumCore;
G4LogicalVolume* iridiumCoreLog;
G4VPhysicalVolume* iridiumCorePhys;
G4Tubs* applicator1;
G4LogicalVolume* applicator1Log ;
G4VPhysicalVolume* applicator1Phys;
G4Tubs* applicator2;
G4LogicalVolume* applicator2Log ;
G4VPhysicalVolume* applicator2Phys;
BrachyMaterial* pMaterial;
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -27,8 +30,8 @@
// * *
// *****************************************
//
// $Id: BrachyDetectorMessenger.hh,v 1.5 2003/05/22 17:20:41 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyDetectorMessenger.hh,v 1.7 2006/06/29 15:47:22 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
#ifndef BrachyDetectorMessenger_h
@@ -38,13 +41,13 @@
#include "G4UImessenger.hh"
class BrachyDetectorConstruction;
class BrachyFactoryIr;
class BrachyRunAction;
//class BrachyFactoryIr;
//class BrachyRunAction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
//class G4UIcmdWithAnInteger;
//class G4UIcmdWithADoubleAndUnit;
//class G4UIcmdWithoutParameter;
class BrachyDetectorMessenger: public G4UImessenger
{
@@ -56,10 +59,10 @@ public:
private:
BrachyDetectorConstruction* detector;//pointer to detector
BrachyDetectorConstruction* detector;// pointer to detector
G4UIdirectory* detectorDir;
G4UIcmdWithAString* phantomMaterialCmd; // change phantom material
G4UIcmdWithAString* sourceCmd; //change brachytherapis source
G4UIcmdWithAString* sourceCmd; // change brachytherapic source
};
#endif
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
// ********************************
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyEventAction.hh,v 1.14 2004/03/11 16:05:02 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyEventAction.hh,v 1.15 2006/06/29 15:47:28 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// Code developed by:
// S.Guatelli
@@ -1,29 +1,32 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
// Code developed by: Susanna Guatelli
//
// $Id: BrachyFactory.hh,v 1.4 2003/05/22 17:20:41 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyFactory.hh,v 1.6 2006/06/29 15:47:30 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// **********************************
// * *
@@ -53,7 +56,7 @@ public:
virtual ~BrachyFactory();
//Source primary particles' management ...
virtual G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction() = 0;
virtual void CreatePrimaryGeneratorAction(G4Event* anEven) = 0;
// ...
// this function manages the creation of the source in terms of
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
// *******************************
@@ -31,8 +34,8 @@
// S.Guatelli
//
//
// $Id: BrachyFactoryI.hh,v 1.5 2003/05/22 17:20:41 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyFactoryI.hh,v 1.7 2006/06/29 15:47:33 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
// --------------------------------------------------------------
@@ -60,11 +63,12 @@ public:
BrachyFactoryI();
~BrachyFactoryI();
G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction();
void CreatePrimaryGeneratorAction(G4Event* anEvent);
void CreateSource(G4VPhysicalVolume*);
void CleanSource();
private:
BrachyDetectorConstructionI* iodiumSource;
BrachyPrimaryGeneratorActionI* iodiumPrimaryParticle;
};
#endif
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyFactoryIr.hh,v 1.4 2003/05/22 17:20:41 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyFactoryIr.hh,v 1.6 2006/06/29 15:47:36 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// **********************************
// * *
@@ -55,11 +58,12 @@ public:
BrachyFactoryIr();
~BrachyFactoryIr();
G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction();
void CreatePrimaryGeneratorAction(G4Event*);
void CreateSource(G4VPhysicalVolume*);
void CleanSource();
private:
BrachyDetectorConstructionIr* iridiumSource;
BrachyPrimaryGeneratorActionIr* iridiumPrimaryParticle;
};
#endif
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyFactoryLeipzig.hh,v 1.4 2003/05/22 17:20:41 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyFactoryLeipzig.hh,v 1.6 2006/06/29 15:47:39 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// **********************************
// * *
@@ -54,11 +57,12 @@ public:
BrachyFactoryLeipzig();
~BrachyFactoryLeipzig();
G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction();
void CreatePrimaryGeneratorAction(G4Event*);
void CreateSource(G4VPhysicalVolume*);
void CleanSource();
private:
BrachyDetectorConstructionLeipzig* leipzigSource;
BrachyPrimaryGeneratorActionIr* iridiumPrimaryParticle;
};
#endif
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyMaterial.hh,v 1.5 2003/05/27 08:37:54 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyMaterial.hh,v 1.7 2006/06/29 15:47:42 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// **********************************
// * *
@@ -32,11 +35,11 @@
//
//Code developed by: Susanna Guatelli
//
//This class manages the elements and materials needed by the simulation
// set-up ...
// This class manages the elements and materials
//
#ifndef BrachyMaterial_H
#define BrachyMaterial_H 1
#include "globals.hh"
class G4Material;
@@ -1,105 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: BrachyPhantomHit.hh,v 1.6 2005/11/22 12:47:35 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ********************************
// * *
// * BrachyPhantomHit.hh *
// * *
// ********************************
//
//Code developed by: S. Guatelli, M.Tropeano
//
// It manages the hits and the enrgy deposit in the phantom associated with
// each hit ...
#ifndef BrachyPhantomHit_h
#define BrachyPhantomHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
class BrachyPhantomHit : public G4VHit
{
public:
BrachyPhantomHit();
~BrachyPhantomHit();
BrachyPhantomHit(const BrachyPhantomHit &right);
const BrachyPhantomHit& operator = (const BrachyPhantomHit &right);
int operator == (const BrachyPhantomHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
void Draw();
void Print();
private:
G4double xHitPosition; // Hit x coordinate
G4double zHitPosition; // Hit z coordinate
G4double yHitPosition; // Hit y coordinate
G4double energyDeposit; // energy deposit associated with the hit
public:
inline G4double GetXID() // Get hit x coordinate
{return xHitPosition;}
inline G4double GetZID() // Get hit z coordinate
{return zHitPosition;}
inline G4double GetYID() // Get hit y coordinate
{return yHitPosition;}
inline void SetEdep(G4double edep) //Set hit energy deposit
{energyDeposit = edep;}
inline G4double GetEdep() // Get energy deposit
{return energyDeposit;}
inline void SetPosition(G4double xx, G4double yy, G4double zz)
// Set hit position
{ xHitPosition = xx; yHitPosition = yy; zHitPosition = zz;}
};
typedef G4THitsCollection<BrachyPhantomHit> BrachyPhantomHitsCollection;
extern G4Allocator<BrachyPhantomHit> BrachyPhantomHitAllocator;
inline void* BrachyPhantomHit::operator new(size_t)
{
void *aHit;
aHit = (void *) BrachyPhantomHitAllocator.MallocSingle();
return aHit;
}
inline void BrachyPhantomHit::operator delete(void *aHit)
{
BrachyPhantomHitAllocator.FreeSingle((BrachyPhantomHit*) aHit);
}
#endif
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyPhantomROGeometry.hh,v 1.5 2003/05/27 08:37:54 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPhantomROGeometry.hh,v 1.7 2006/06/29 15:47:45 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// ************************************
// * *
@@ -30,8 +33,10 @@
// * *
// ************************************
//
//The phantom is devided in voxels. the dimension of the voxel is 1mm
// The phantom is devided in voxels.
// The energy deposit is integrated over the voxels
//
#ifndef BrachyPhantomROGeometry_h
#define BrachyPhantomROGeometry_h
@@ -42,17 +47,23 @@ class BrachyPhantomROGeometry : public G4VReadOutGeometry
public:
BrachyPhantomROGeometry(G4String aString,
G4double phantomDimX,
G4double phantomDimY,
G4double phantomDimZ,
G4int numberOfVoxelsX,
G4int numberOfVoxelsY,
G4int numberOfVoxelsZ);
~BrachyPhantomROGeometry();
private:
G4VPhysicalVolume* Build();
private:
const G4double phantomDimensionX;
const G4double phantomDimensionZ;
const G4double phantomSizeX;
const G4double phantomSizeY;
const G4double phantomSizeZ;
const G4int numberOfVoxelsAlongX;
const G4int numberOfVoxelsAlongY;
const G4int numberOfVoxelsAlongZ;
G4VPhysicalVolume *ROPhantomYDivisionPhys;
};
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyPhantomSD.hh,v 1.7 2005/11/22 12:47:35 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPhantomSD.hh,v 1.10 2006/06/29 15:47:48 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// ********************************
// * *
@@ -34,7 +37,6 @@
#define BrachyPhantomSD_h 1
#include "G4VSensitiveDetector.hh"
#include "BrachyPhantomHit.hh"
class G4Step;
class G4HCofThisEvent;
@@ -54,7 +56,9 @@ public:
void PrintAll();
private:
BrachyPhantomHitsCollection* phantomCollection;
G4double x;
G4double y;
G4double z;
};
#endif
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyPhysicsList.hh,v 1.6 2002/11/18 15:18:36 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPhysicsList.hh,v 1.8 2006/06/29 15:47:51 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// **********************************
// * *
@@ -36,10 +39,8 @@
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class G4LowEnergyIonisation;
class G4LowEnergyPhotoElectric;
class G4LowEnergyBremsstrahlung;
class BrachyPhysicsList: public G4VUserPhysicsList
@@ -54,27 +55,13 @@ class BrachyPhysicsList: public G4VUserPhysicsList
void ConstructProcess();
void SetCuts();
public:
// Set Cuts
void SetGammaCut(G4double);
void SetElectronCut(G4double);
void SetPositronCut(G4double);
void SetGammaLowLimit(G4double);
void SetElectronLowLimit(G4double);
void SetGELowLimit(G4double);
void SetLowEnSecPhotCut(G4double);
void SetLowEnSecElecCut(G4double);
private:
private:
G4double cutForGamma;
G4double cutForElectron;
G4double cutForPositron;
protected:
// these methods Construct particles
void ConstructBosons();
void ConstructLeptons();
@@ -85,7 +72,6 @@ class BrachyPhysicsList: public G4VUserPhysicsList
private:
G4LowEnergyIonisation* loweIon;
G4LowEnergyPhotoElectric* lowePhot;
G4LowEnergyBremsstrahlung* loweBrem;
};
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyPrimaryGeneratorAction.hh,v 1.10 2003/05/22 17:20:42 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPrimaryGeneratorAction.hh,v 1.12 2006/06/29 15:47:54 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// ********************************************
// * *
@@ -41,6 +44,9 @@ class G4ParticleGun;
class G4Run;
class G4Event;
class BrachyAnalysisManager;
class BrachyFactory;
class BrachyPrimaryGeneratorMessenger;
class BrachyPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
@@ -48,7 +54,12 @@ class BrachyPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
~BrachyPrimaryGeneratorAction();
public:
virtual void GeneratePrimaries(G4Event* anEvent) = 0;
void GeneratePrimaries(G4Event* anEvent);
void SwitchEnergy(G4String);
private:
BrachyFactory* factory;
BrachyPrimaryGeneratorMessenger* primaryMessenger;
};
#endif
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyPrimaryGeneratorActionI.hh,v 1.5 2003/06/16 16:45:00 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPrimaryGeneratorActionI.hh,v 1.6 2006/06/29 15:47:57 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
//
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyPrimaryGeneratorActionIr.hh,v 1.5 2003/06/16 16:45:01 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPrimaryGeneratorActionIr.hh,v 1.7 2006/06/29 15:47:59 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// *************************************************
// * *
@@ -59,7 +62,6 @@ public:
G4double GetEnergy(){return primaryParticleEnergy;};
private:
G4ParticleGun* particleGun;
G4double primaryParticleEnergy;
};
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// ************************************************
// * *
// * BrachyPrimaryGeneratorMessenger.hh *
// * *
// ***********************************************
//
// $Id: BrachyPrimaryGeneratorMessenger.hh,v 1.2 2006/06/29 15:48:02 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
#ifndef BrachyPrimaryGeneratorMessenger_h
#define BrachyPrimaryGeneratorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class BrachyPrimaryGeneratorAction;
class G4UIdirectory;
class G4UIcmdWithAString;
class BrachyPrimaryGeneratorMessenger: public G4UImessenger
{
public:
BrachyPrimaryGeneratorMessenger(BrachyPrimaryGeneratorAction* );
~BrachyPrimaryGeneratorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
BrachyPrimaryGeneratorAction* primaryAction;
G4UIdirectory* primaryDir;
G4UIcmdWithAString* primaryParticleEnergySpectrumCmd;
};
#endif
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
// $Id: BrachyRunAction.hh,v 1.9 2005/11/22 11:00:47 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyRunAction.hh,v 1.11 2006/06/29 15:48:04 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
//
@@ -42,9 +45,9 @@
class G4Run;
class BrachyAnalysisManager;
class BrachyRunMessenger;
class BrachyFactory;
class BrachyFactoryIr;
class BrachyFactoryI;
//class BrachyFactory;
//class BrachyFactoryIr;
//class BrachyFactoryI;
class BrachyRunAction : public G4UserRunAction
{
@@ -55,12 +58,12 @@ public:
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run* );
void SelectEnergy(G4int);
//void SelectEnergy(G4int);
private:
BrachyRunMessenger* runMessenger;
BrachyFactory *factory;
G4int sourceChoice; //select primary particle
// BrachyRunMessenger* runMessenger;
//BrachyFactory *factory;
//G4int sourceChoice; //select primary particle
};
#endif
@@ -1,64 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: BrachyRunMessenger.hh,v 1.3 2003/05/22 17:20:42 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
//
//
// ********************************************
// * *
// * BrachyRunMessenger.hh *
// * *
// ********************************************
// This class permits to switch the energy of the gamma delivered from the
//radionuclides (Iodium/Iridium)
//
#ifndef BrachyRunMessenger_h
#define BrachyRunMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class BrachyRunAction;
class BrachyRunAction;
class G4UIdirectory;
class G4UIcmdWithAString;
class BrachyRunMessenger: public G4UImessenger
{
public:
BrachyRunMessenger(BrachyRunAction* );
~BrachyRunMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
G4UIdirectory* runDir;
G4UIcmdWithAString* primaryParticleEnergySpectrumCmd;
BrachyRunAction* runManager;
};
#endif
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
// Code developed by:
@@ -29,8 +32,8 @@
// * *
// *******************************
//
// $Id: BrachyAnalysisManager.cc,v 1.15 2004/11/24 09:53:05 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyAnalysisManager.cc,v 1.18 2006/06/29 15:48:06 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#ifdef G4ANALYSIS_USE
#include <stdlib.h>
@@ -53,16 +56,17 @@
BrachyAnalysisManager* BrachyAnalysisManager::instance = 0;
BrachyAnalysisManager::BrachyAnalysisManager() :
aFact(0), theTree(0), histFact(0), tupFact(0),h1(0),h2(0),ntuple(0)
aFact(0), theTree(0), histFact(0), tupFact(0),h1(0),h2(0),ntuple(0)
{
//build up the factories
// Instantiate the factories
// The factories manage the analysis objects
aFact = AIDA_createAnalysisFactory();
AIDA::ITreeFactory *treeFact = aFact->createTreeFactory();
AIDA::ITreeFactory *treeFact = aFact -> createTreeFactory();
// Definition of the output file
G4String fileName = "brachytherapy.hbk";
theTree = treeFact->create(fileName,"hbook",false, true);
theTree = treeFact -> create(fileName,"hbook",false, true);
delete treeFact;
}
@@ -90,25 +94,31 @@ BrachyAnalysisManager* BrachyAnalysisManager::getInstance()
void BrachyAnalysisManager::book()
{
histFact = aFact->createHistogramFactory( *theTree );
tupFact = aFact->createTupleFactory ( *theTree );
//creating a 1D histogram ...
h1 = histFact->createHistogram2D("10","Energy, pos", //histoID,histo name
300 ,-150.,150., //bins'number,xmin,xmax
300,-150.,150. );//bins'number,ymin,ymax
//creating a 2D histogram ...
h2 = histFact->createHistogram1D("20","Initial Energy", //histoID,histo name
100,0.,1.); //bins' number, xmin, xmax
h3 = histFact->createHistogram1D("30","Dose Distribution",
300,-150.,150.); //bins' number, xmin, xmax
// Instantiate the histogram and ntuple factories
histFact = aFact -> createHistogramFactory( *theTree );
tupFact = aFact -> createTupleFactory ( *theTree );
// Creating a 2D histogram
// Energy deposit in the plane containing the source
h1 = histFact -> createHistogram2D("10","Energy, pos", //histoID,histo name
300 ,-150.,150., //bins'number,xmin,xmax
300,-150.,150.); //bins'number,ymin,ymax
//creating a 1D histograms
// Histogram containing the initial energy (MeV) of the photons delivered by the radioactive core
h2 = histFact -> createHistogram1D("20","Initial Energy", //histoID, histo name
1000,0.,1.); //bins' number, xmin, xmax
// Histogram containing the energy deposit in the plane containing the source, along the axis
// perpendicular to the source main axis
h3 = histFact -> createHistogram1D("30","Energy deposit Distribution",
300,-150.,150.); //bins' number, xmin, xmax
//defining the ntuple columns' name ...
//defining the ntuple columns' name
std::string columnNames = "float energy; float x; float y; float z";
std::string options = "";
//creating a ntuple ...
if (tupFact) ntuple = tupFact->create("1","1",columnNames, options);
//creating a ntuple
if (tupFact) ntuple = tupFact -> create("1","1",columnNames, options);
// check for non-zero ...
if (ntuple) G4cout<<"The Ntuple is non-zero"<<G4endl;
}
@@ -123,15 +133,18 @@ void BrachyAnalysisManager::FillNtupleWithEnergy(G4double xx,
G4cout << "AAAAAAAGH..... The Ntuple is 0" << G4endl;
return;
}
// Fill the ntuple
G4int indexX = ntuple->findColumn( "x" );
G4int indexY = ntuple->findColumn( "y" );
G4int indexZ = ntuple->findColumn( "z" );
G4int indexEnergy = ntuple->findColumn( "energy" );
ntuple->fill(indexEnergy, en);// fill ( int column, double value )
ntuple->fill(indexX, xx);
ntuple->fill(indexY, yy);
ntuple->fill(indexZ, zz);
G4int indexX = ntuple -> findColumn( "x" );
G4int indexY = ntuple -> findColumn( "y" );
G4int indexZ = ntuple -> findColumn( "z" );
G4int indexEnergy = ntuple -> findColumn( "energy" );
ntuple -> fill(indexEnergy, en);// method: fill ( int column, double value )
ntuple -> fill(indexX, xx);
ntuple -> fill(indexY, yy);
ntuple -> fill(indexZ, zz);
ntuple->addRow();
}
@@ -140,28 +153,28 @@ void BrachyAnalysisManager::FillHistogramWithEnergy(G4double x,
G4double z,
G4double energyDeposit)
{
//2DHistrogram: energy deposit in a voxel which center is fixed in position (x,z)
h1->fill(x,z,energyDeposit);
// 2DHistrogram: energy deposit in a voxel which center is fixed in position (x,z)
h1 -> fill(x,z,energyDeposit);
}
void BrachyAnalysisManager::PrimaryParticleEnergySpectrum(G4double primaryParticleEnergy)
{
//1DHisotgram: energy spectrum of primary particles
h2->fill(primaryParticleEnergy);
// 1DHisotgram: energy spectrum of primary particles
h2 -> fill(primaryParticleEnergy);
}
void BrachyAnalysisManager::DoseDistribution(G4double x,G4double energy)
{
//1DHisotgram: energy spectrum of primary particles
h3->fill(x, energy);
// 1DHisotgram: energy spectrum of primary particles
h3 -> fill(x, energy);
}
void BrachyAnalysisManager::finish()
{
// write all histograms to file ...
theTree->commit();
theTree -> commit();
// close (will again commit) ...
theTree->close();
theTree -> close();
}
#endif
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------
@@ -34,47 +37,31 @@
// * *
// ****************************************
//
// $Id: BrachyDetectorConstruction.cc,v 1.26 2004/11/24 09:53:05 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyDetectorConstruction.cc,v 1.29 2006/06/29 15:48:09 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "BrachyPhantomROGeometry.hh"
#include "BrachyPhantomSD.hh"
#include "BrachyDetectorMessenger.hh"
#include "BrachyDetectorConstruction.hh"
#include "G4CSGSolid.hh"
#include "G4Sphere.hh"
#include "G4MaterialPropertyVector.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4RunManager.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4Material.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "globals.hh"
#include "G4MaterialTable.hh"
#include "Randomize.hh"
#include "G4RunManager.hh"
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4PVParameterised.hh"
#include "G4Transform3D.hh"
#include "G4RotationMatrix.hh"
#include "G4FieldManager.hh"
#include "G4TransportationManager.hh"
#include "G4SDManager.hh"
#include "G4Colour.hh"
#include "G4UserLimits.hh"
#include "G4UnionSolid.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "BrachyMaterial.hh"
#include "BrachyFactoryLeipzig.hh"
#include "BrachyFactoryIr.hh"
#include "BrachyFactoryI.hh"
#include "BrachyPhantomROGeometry.hh"
#include "BrachyPhantomSD.hh"
#include "BrachyDetectorMessenger.hh"
#include "BrachyDetectorConstruction.hh"
BrachyDetectorConstruction::BrachyDetectorConstruction(G4String &SDName)
: detectorChoice(0), phantomSD(0), phantomROGeometry(0), factory(0),
@@ -82,29 +69,39 @@ BrachyDetectorConstruction::BrachyDetectorConstruction(G4String &SDName)
Phantom(0), PhantomLog(0), PhantomPhys(0),
phantomAbsorberMaterial(0)
{
phantomDimensionX=15.*cm ;
phantomDimensionY=15.*cm;
phantomDimensionZ=15.*cm;
// Define half size of the phantom along the x, y, z axis
phantomSizeX = 15.*cm ;
phantomSizeY = 15.*cm;
phantomSizeZ = 15.*cm;
numberOfVoxelsAlongX=300;
numberOfVoxelsAlongZ=300;
// Define the number of voxels the phantom is subdivided along the
// three axis
// Each voxel is 1 mm wide
numberOfVoxelsAlongX = 300;
numberOfVoxelsAlongY = 300;
numberOfVoxelsAlongZ = 300;
ComputeDimVoxel();
Worldx = 4.0*m;
Worldy = 4.0*m;
Worldz = 4.0*m;
// Define the sizes of the World volume contaning the phantom
worldSizeX = 4.0*m;
worldSizeY = 4.0*m;
worldSizeZ = 4.0*m;
sensitiveDetectorName = SDName;
// Define the messenger of the Detector component
// It is possible to modify geometrical parameters through UI
detectorMessenger = new BrachyDetectorMessenger(this);
// Define the Iridium source as default source modelled in the geometry
factory = new BrachyFactoryIr();
// BrachyMaterial defined the all the materials necessary
// for the experimental set-up
pMaterial = new BrachyMaterial();
}
BrachyDetectorConstruction::~BrachyDetectorConstruction()
{
delete pMaterial;
@@ -116,8 +113,14 @@ BrachyDetectorConstruction::~BrachyDetectorConstruction()
G4VPhysicalVolume* BrachyDetectorConstruction::Construct()
{
pMaterial -> DefineMaterials();
// Model the phantom (water box)
ConstructPhantom();
// Model the source in the phantom
factory -> CreateSource(PhantomPhys); //Build the source inside the phantom
// Define the sensitive volume: phantom
ConstructSensitiveDetector();
return WorldPhys;
@@ -125,9 +128,10 @@ G4VPhysicalVolume* BrachyDetectorConstruction::Construct()
void BrachyDetectorConstruction::SwitchBrachytherapicSeed()
{
// Change the source in the water phantom
factory -> CleanSource();
delete factory;
switch(detectorChoice)
{
case 1:
@@ -143,6 +147,7 @@ void BrachyDetectorConstruction::SwitchBrachytherapicSeed()
factory = new BrachyFactoryIr();
break;
}
factory -> CreateSource(PhantomPhys);
// Notify run manager that the new geometry has been built
@@ -151,7 +156,7 @@ void BrachyDetectorConstruction::SwitchBrachytherapicSeed()
void BrachyDetectorConstruction::SelectBrachytherapicSeed(G4String val)
{
if(val=="Iodium")
if(val == "Iodium")
{
detectorChoice = 1;
}
@@ -169,11 +174,15 @@ void BrachyDetectorConstruction::SelectBrachytherapicSeed(G4String val)
}
}
}
G4cout << "Now the source is " << val << G4endl;
}
void BrachyDetectorConstruction::ConstructPhantom()
{
// Model the water phantom
// Define the light blue color
G4Colour lblue (0.0, 0.0, .75);
G4Material* air = pMaterial -> GetMat("Air") ;
@@ -182,25 +191,31 @@ void BrachyDetectorConstruction::ConstructPhantom()
ComputeDimVoxel();
// World volume
World = new G4Box("World",Worldx,Worldy,Worldz);
World = new G4Box("World",worldSizeX,worldSizeY,worldSizeZ);
WorldLog = new G4LogicalVolume(World,air,"WorldLog",0,0,0);
WorldPhys = new G4PVPlacement(0,G4ThreeVector(),
"WorldPhys",WorldLog,0,false,0);
// Water Box
Phantom = new G4Box("Phantom",phantomDimensionX,phantomDimensionY,
phantomDimensionZ);
Phantom = new G4Box("Phantom",phantomSizeX,phantomSizeY,
phantomSizeZ);
// Logical volume
PhantomLog = new G4LogicalVolume(Phantom,water,"PhantomLog",0,0,0);
PhantomPhys = new G4PVPlacement(0,G4ThreeVector(),
"PhantomPhys",PhantomLog,
WorldPhys,false,0);
// Physical volume
PhantomPhys = new G4PVPlacement(0,G4ThreeVector(), // Position: rotation and translation
"PhantomPhys", // Name
PhantomLog, // Associated logical volume
WorldPhys, // Mother volume
false,0);
WorldLog -> SetVisAttributes (G4VisAttributes::Invisible);
// Visualization attributes of the phantom
G4VisAttributes* simpleBoxVisAtt = new G4VisAttributes(lblue);
simpleBoxVisAtt -> SetVisibility(true);
simpleBoxVisAtt -> SetForceWireframe(true);
PhantomLog -> SetVisAttributes(simpleBoxVisAtt);
}
@@ -214,11 +229,16 @@ void BrachyDetectorConstruction::ConstructSensitiveDetector()
phantomSD = new BrachyPhantomSD(sensitiveDetectorName);
G4String ROGeometryName = "PhantomROGeometry";
phantomROGeometry = new BrachyPhantomROGeometry(ROGeometryName,
phantomDimensionX,phantomDimensionZ,
numberOfVoxelsAlongX,numberOfVoxelsAlongZ);
phantomSizeX,
phantomSizeY,
phantomSizeZ,
numberOfVoxelsAlongX,
numberOfVoxelsAlongY,
numberOfVoxelsAlongZ);
phantomROGeometry -> BuildROGeometry();
phantomSD -> SetROgeometry(phantomROGeometry);
pSDManager -> AddNewDetector(phantomSD);
PhantomLog -> SetSensitiveDetector(phantomSD);
}
}
@@ -227,29 +247,31 @@ void BrachyDetectorConstruction::PrintDetectorParameters()
{
G4cout << "-----------------------------------------------------------------------"
<< G4endl
<< "the detector is a box whose size is: " << G4endl
<< phantomDimensionX/cm
<< "the phantom is a water box whose size is: " << G4endl
<< phantomSizeX *2./cm
<< " cm * "
<< phantomDimensionY/cm
<< phantomSizeY *2./cm
<< " cm * "
<< phantomDimensionZ/cm
<< phantomSizeZ *2./cm
<< " cm" << G4endl
<< "numVoxel: "
<< "number of Voxel: "
<< numberOfVoxelsAlongX <<G4endl
<< "dim voxel: "
<< dimVoxel/mm
<< "Voxel size: "
<< dimVoxel * 2/mm
<< "mm" << G4endl
<< "material of the box : "
<< phantomAbsorberMaterial->GetName() <<G4endl
<< "the source is at the center of the detector" << G4endl
<< "The phantom is made of "
<< phantomAbsorberMaterial -> GetName() <<G4endl
<< "the source is at the center of the phantom" << G4endl
<< "-------------------------------------------------------------------------"
<< G4endl;
}
void BrachyDetectorConstruction::SetPhantomMaterial(G4String materialChoice)
{
// search the material by its name
// It is possible to change the material of the phantom
// interactively
// Search the material by its name
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
if (pttoMaterial)
{
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -33,45 +36,29 @@
// * *
// ****************************************
//
// $Id: BrachyDetectorConstructionI.cc,v 1.6 2003/12/09 15:29:56 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyDetectorConstructionI.cc,v 1.9 2006/06/29 15:48:11 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "globals.hh"
#include "BrachyDetectorConstructionI.hh"
#include "G4CSGSolid.hh"
#include "G4Sphere.hh"
#include "G4MaterialPropertyVector.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4RunManager.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4Material.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "G4MaterialTable.hh"
#include "Randomize.hh"
#include "G4RunManager.hh"
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4PVParameterised.hh"
#include "G4Transform3D.hh"
#include "G4RotationMatrix.hh"
#include "G4FieldManager.hh"
#include "G4TransportationManager.hh"
#include "G4UnionSolid.hh"
#include "BrachyMaterial.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
BrachyDetectorConstructionI::BrachyDetectorConstructionI()
: defaultTub(0), defaultTubLog(0),defaultTubPhys(0),
capsule(0),capsuleLog(0),capsulePhys(0),
capsuleTip(0),capsuleTipLog(0),capsuleTipPhys1(0),capsuleTipPhys2(0),
iodiumCore(0),iodiumCoreLog(0),iodiumCorePhys(0),
marker(0),markerLog(0),markerPhys(0)
BrachyDetectorConstructionI::BrachyDetectorConstructionI():
capsulePhys(0),capsuleTipPhys1(0),capsuleTipPhys2(0), iodiumCorePhys(0),markerPhys(0)
{
pMaterial = new BrachyMaterial();
}
@@ -86,18 +73,19 @@ void BrachyDetectorConstructionI::ConstructIodium(G4VPhysicalVolume* mother)
// source Bebig Isoseed I-125 ...
//Get materials for source construction ...
G4Material* titanium = pMaterial->GetMat("titanium");
G4Material* air = pMaterial->GetMat("Air");
G4Material* iodium = pMaterial->GetMat("Iodium");
G4Material* gold = pMaterial->GetMat("gold");
G4Material* titanium = pMaterial -> GetMat("titanium");
G4Material* air = pMaterial -> GetMat("Air");
G4Material* iodium = pMaterial -> GetMat("Iodium");
G4Material* gold = pMaterial -> GetMat("gold");
G4Colour red (1.0, 0.0, 0.0) ;
G4Colour magenta (1.0, 0.0, 1.0) ;
G4Colour lblue (0.0, 0.0, .75);
defaultTub = new G4Tubs("DefaultTub",0.*mm,0.40*mm,1.84*mm,0.*deg,360.*deg);
defaultTubLog = new G4LogicalVolume(defaultTub,air,"DefaultTub_Log");
defaultTubPhys = new G4PVPlacement(0,
// Air tub
G4Tubs* defaultTub = new G4Tubs("DefaultTub",0.*mm, 0.40*mm, 1.84*mm, 0.*deg, 360.*deg);
G4LogicalVolume* defaultTubLog = new G4LogicalVolume(defaultTub,air,"DefaultTub_Log");
G4VPhysicalVolume* defaultTubPhys = new G4PVPlacement(0,
G4ThreeVector(),
"defaultTub_Phys",
defaultTubLog,
@@ -105,10 +93,9 @@ void BrachyDetectorConstructionI::ConstructIodium(G4VPhysicalVolume* mother)
false,
0);
// Capsule main body ...
G4double capsuleR = 0.35*mm;
capsule = new G4Tubs("Capsule", capsuleR,0.40*mm,1.84*mm,0.*deg,360.*deg);
capsuleLog = new G4LogicalVolume(capsule,titanium,"CapsuleLog");
G4Tubs* capsule = new G4Tubs("Capsule", capsuleR,0.40*mm,1.84*mm,0.*deg,360.*deg);
G4LogicalVolume* capsuleLog = new G4LogicalVolume(capsule,titanium,"CapsuleLog");
capsulePhys = new G4PVPlacement(0,
G4ThreeVector(),
"CapsulePhys",
@@ -117,15 +104,14 @@ void BrachyDetectorConstructionI::ConstructIodium(G4VPhysicalVolume* mother)
false,
0);
// Capsule tips
capsuleTip = new G4Sphere("CapsuleTip",
G4Sphere* capsuleTip = new G4Sphere("CapsuleTip",
0.*mm,
0.40*mm,
0.*deg,
360.*deg,
0.*deg,
90.*deg);
capsuleTipLog = new G4LogicalVolume(capsuleTip,titanium,"CapsuleTipLog");
G4LogicalVolume* capsuleTipLog = new G4LogicalVolume(capsuleTip,titanium,"CapsuleTipLog");
capsuleTipPhys1 = new G4PVPlacement(0,
G4ThreeVector(0.,0.,1.84*mm),
"CapsuleTipPhys1",
@@ -135,7 +121,7 @@ void BrachyDetectorConstructionI::ConstructIodium(G4VPhysicalVolume* mother)
0);
G4RotationMatrix* rotateMatrix = new G4RotationMatrix();
rotateMatrix->rotateX(180.0*deg);
rotateMatrix -> rotateX(180.0*deg);
capsuleTipPhys2 = new G4PVPlacement(rotateMatrix,
G4ThreeVector(0,0,-1.84*mm),
"CapsuleTipPhys2",
@@ -144,9 +130,9 @@ void BrachyDetectorConstructionI::ConstructIodium(G4VPhysicalVolume* mother)
false,
0);
// radiactive core ...
iodiumCore = new G4Tubs("ICore",0.085*mm,0.35*mm,1.75*mm,0.*deg,360.*deg);
iodiumCoreLog = new G4LogicalVolume(iodiumCore,iodium,"iodiumCoreLog");
// Radiactive core ...
G4Tubs* iodiumCore = new G4Tubs("ICore",0.085*mm,0.35*mm,1.75*mm,0.*deg,360.*deg);
G4LogicalVolume* iodiumCoreLog = new G4LogicalVolume(iodiumCore,iodium,"iodiumCoreLog");
iodiumCorePhys = new G4PVPlacement(0,
G4ThreeVector(0.,0.,0.),
"iodiumCorePhys",
@@ -154,9 +140,9 @@ void BrachyDetectorConstructionI::ConstructIodium(G4VPhysicalVolume* mother)
defaultTubPhys,
false,
0);
// golden marker
marker = new G4Tubs("GoldenMarker",0.*mm,0.085*mm,1.75*mm,0.*deg,360.*deg);
markerLog = new G4LogicalVolume(marker,gold,"MarkerLog");
// Golden marker
G4Tubs* marker = new G4Tubs("GoldenMarker",0.*mm,0.085*mm,1.75*mm,0.*deg,360.*deg);
G4LogicalVolume* markerLog = new G4LogicalVolume(marker,gold,"MarkerLog");
markerPhys = new G4PVPlacement(0,
G4ThreeVector(0.,0.,0.),
"MarkerPhys",
@@ -166,22 +152,22 @@ void BrachyDetectorConstructionI::ConstructIodium(G4VPhysicalVolume* mother)
0);
// Visual attributes ...
G4VisAttributes* simpleMarkerVisAtt= new G4VisAttributes(lblue);
simpleMarkerVisAtt->SetVisibility(true);
simpleMarkerVisAtt->SetForceSolid(true);
markerLog->SetVisAttributes( simpleMarkerVisAtt);
simpleMarkerVisAtt -> SetVisibility(true);
simpleMarkerVisAtt -> SetForceSolid(true);
markerLog -> SetVisAttributes( simpleMarkerVisAtt);
G4VisAttributes* simpleiodiumVisAtt= new G4VisAttributes(magenta);
simpleiodiumVisAtt->SetVisibility(true);
simpleiodiumVisAtt->SetForceWireframe(true);
iodiumCoreLog->SetVisAttributes(simpleiodiumVisAtt);
simpleiodiumVisAtt -> SetVisibility(true);
simpleiodiumVisAtt -> SetForceWireframe(true);
iodiumCoreLog -> SetVisAttributes(simpleiodiumVisAtt);
G4VisAttributes* simpleCapsuleVisAtt= new G4VisAttributes(red);
simpleCapsuleVisAtt->SetVisibility(true);
simpleCapsuleVisAtt->SetForceWireframe(true);
capsuleLog->SetVisAttributes( simpleCapsuleVisAtt);
simpleCapsuleVisAtt -> SetVisibility(true);
simpleCapsuleVisAtt -> SetForceWireframe(true);
capsuleLog -> SetVisAttributes( simpleCapsuleVisAtt);
G4VisAttributes* simpleCapsuleTipVisAtt= new G4VisAttributes(red);
simpleCapsuleTipVisAtt->SetVisibility(true);
simpleCapsuleTipVisAtt->SetForceSolid(true);
capsuleTipLog->SetVisAttributes( simpleCapsuleTipVisAtt);
simpleCapsuleTipVisAtt -> SetVisibility(true);
simpleCapsuleTipVisAtt -> SetForceSolid(true);
capsuleTipLog -> SetVisAttributes( simpleCapsuleTipVisAtt);
}
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -34,43 +37,33 @@
// * *
// ****************************************
//
// $Id: BrachyDetectorConstructionIr.cc,v 1.8 2004/03/11 15:38:42 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyDetectorConstructionIr.cc,v 1.10 2006/06/29 15:48:13 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "globals.hh"
#include "BrachyDetectorConstructionIr.hh"
#include "G4CSGSolid.hh"
#include "G4Sphere.hh"
#include "G4MaterialPropertyVector.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4RunManager.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4Material.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "G4MaterialTable.hh"
#include "Randomize.hh"
#include "G4RunManager.hh"
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4PVParameterised.hh"
#include "G4Transform3D.hh"
#include "G4RotationMatrix.hh"
#include "G4FieldManager.hh"
#include "G4TransportationManager.hh"
#include "G4UnionSolid.hh"
#include "BrachyMaterial.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
BrachyDetectorConstructionIr::BrachyDetectorConstructionIr()
: capsule(0),capsuleLog(0),capsulePhys(0),
capsuleTip(0),capsuleTipLog(0),capsuleTipPhys(0),
iridiumCore(0),iridiumCoreLog(0),iridiumCorePhys(0),
:
capsule(0),capsuleLog(0),
capsulePhys(0),
capsuleTip(0),capsuleTipLog(0),
capsuleTipPhys(0),
iridiumCore(0),iridiumCoreLog(0),
iridiumCorePhys(0),
simpleCapsuleVisAtt(0),simpleCapsuleTipVisAtt(0),simpleIridiumVisAtt(0)
{
pMat = new BrachyMaterial();
@@ -86,13 +79,13 @@ void BrachyDetectorConstructionIr::ConstructIridium(G4VPhysicalVolume* mother)
G4Colour red (1.0, 0.0, 0.0) ;
G4Colour magenta (1.0, 0.0, 1.0) ;
G4Material* capsuleMat = pMat->GetMat("Stainless steel");
G4Material* iridiumMat = pMat->GetMat("Iridium");
G4Material* capsuleMat = pMat -> GetMat("Stainless steel");
G4Material* iridiumMat = pMat -> GetMat("Iridium");
// Capsule main body
capsule = new G4Tubs("Capsule",0,0.55*mm,3.725*mm,0.*deg,360.*deg);
capsuleLog = new G4LogicalVolume(capsule,capsuleMat,"CapsuleLog");
capsulePhys= new G4PVPlacement(0,
capsulePhys = new G4PVPlacement(0,
G4ThreeVector(0,0,-1.975*mm),
"CapsulePhys",
capsuleLog,
@@ -108,6 +101,7 @@ void BrachyDetectorConstructionIr::ConstructIridium(G4VPhysicalVolume* mother)
360.*deg,
0.*deg,
90.*deg);
capsuleTipLog = new G4LogicalVolume(capsuleTip,
capsuleMat,
"CapsuleTipIridumLog");
@@ -120,7 +114,6 @@ void BrachyDetectorConstructionIr::ConstructIridium(G4VPhysicalVolume* mother)
0);
// Iridium core
iridiumCore = new G4Tubs("IrCore",0,0.30*mm,1.75*mm,0.*deg,360.*deg);
iridiumCoreLog = new G4LogicalVolume(iridiumCore,
iridiumMat,
@@ -134,19 +127,19 @@ void BrachyDetectorConstructionIr::ConstructIridium(G4VPhysicalVolume* mother)
0);
simpleCapsuleVisAtt = new G4VisAttributes(red);
simpleCapsuleVisAtt->SetVisibility(true);
simpleCapsuleVisAtt->SetForceWireframe(true);
capsuleLog->SetVisAttributes(simpleCapsuleVisAtt);
simpleCapsuleVisAtt -> SetVisibility(true);
simpleCapsuleVisAtt -> SetForceWireframe(true);
capsuleLog -> SetVisAttributes(simpleCapsuleVisAtt);
simpleCapsuleTipVisAtt = new G4VisAttributes(red);
simpleCapsuleTipVisAtt->SetVisibility(true);
simpleCapsuleTipVisAtt->SetForceSolid(true);
capsuleTipLog->SetVisAttributes(simpleCapsuleTipVisAtt);
simpleCapsuleTipVisAtt -> SetVisibility(true);
simpleCapsuleTipVisAtt -> SetForceSolid(true);
capsuleTipLog -> SetVisAttributes(simpleCapsuleTipVisAtt);
simpleIridiumVisAtt = new G4VisAttributes(magenta);
simpleIridiumVisAtt->SetVisibility(true);
simpleIridiumVisAtt->SetForceWireframe(true);
iridiumCoreLog->SetVisAttributes(simpleIridiumVisAtt);
simpleIridiumVisAtt -> SetVisibility(true);
simpleIridiumVisAtt -> SetForceWireframe(true);
iridiumCoreLog -> SetVisAttributes(simpleIridiumVisAtt);
}
void BrachyDetectorConstructionIr::CleanIridium()
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -35,36 +38,23 @@
// *******************************************
//
//
// $Id: BrachyDetectorConstructionLeipzig.cc,v 1.7 2003/12/09 15:29:58 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyDetectorConstructionLeipzig.cc,v 1.10 2006/06/29 15:48:16 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "globals.hh"
#include "BrachyDetectorConstructionLeipzig.hh"
#include "G4CSGSolid.hh"
#include "G4Sphere.hh"
#include "G4MaterialPropertyVector.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4RunManager.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4Material.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "G4MaterialTable.hh"
#include "Randomize.hh"
#include "G4RunManager.hh"
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4PVParameterised.hh"
#include "G4Transform3D.hh"
#include "G4RotationMatrix.hh"
#include "G4FieldManager.hh"
#include "G4TransportationManager.hh"
#include "G4UnionSolid.hh"
#include "BrachyMaterial.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
@@ -72,11 +62,12 @@
// Leipzig Applicator ...
BrachyDetectorConstructionLeipzig::BrachyDetectorConstructionLeipzig()
: capsule(0),capsuleLog(0),capsulePhys(0),
capsuleTip(0),capsuleTipLog(0),capsuleTipPhys(0),
iridiumCore(0),iridiumCoreLog(0),iridiumCorePhys(0),
applicator1(0),applicator1Log(0),applicator1Phys(0),
applicator2(0),applicator2Log(0),applicator2Phys(0)
:
capsulePhys(0),
capsuleTipPhys(0),
iridiumCorePhys(0),
applicator1Phys(0),
applicator2Phys(0)
{
pMaterial = new BrachyMaterial();
}
@@ -88,16 +79,17 @@ BrachyDetectorConstructionLeipzig::~BrachyDetectorConstructionLeipzig()
void BrachyDetectorConstructionLeipzig::ConstructLeipzig(G4VPhysicalVolume* mother)
{
G4Colour red (1.0, 0.0, 0.0) ;
G4Colour red (1.0, 0.0, 0.0) ;
G4Colour lblue (0.0, 0.0, .75);
G4Material* capsuleMat = pMaterial->GetMat("Stainless steel");
G4Material* iridium = pMaterial->GetMat("Iridium");
G4Material* tungsten =pMaterial->GetMat("Tungsten");
G4Material* capsuleMat = pMaterial -> GetMat("Stainless steel");
G4Material* iridium = pMaterial -> GetMat("Iridium");
G4Material* tungsten =pMaterial -> GetMat("Tungsten");
//Iridium source ...
capsule = new G4Tubs("Capsule",0,0.55*mm,3.725*mm,0.*deg,360.*deg);
capsuleLog = new G4LogicalVolume(capsule,capsuleMat,"CapsuleLog");
G4Tubs* capsule = new G4Tubs("Capsule",0,0.55*mm,3.725*mm,0.*deg,360.*deg);
G4LogicalVolume* capsuleLog = new G4LogicalVolume(capsule,capsuleMat,"CapsuleLog");
capsulePhys = new G4PVPlacement(0,
G4ThreeVector(0,0,-1.975*mm),
"CapsulePhys",
@@ -107,8 +99,8 @@ void BrachyDetectorConstructionLeipzig::ConstructLeipzig(G4VPhysicalVolume* m
0);
// Capsule tip
capsuleTip = new G4Sphere("CapsuleTip",0.*mm,0.55*mm,0.*deg,360.*deg,0.*deg,90.*deg);
capsuleTipLog = new G4LogicalVolume(capsuleTip,capsuleMat,"CapsuleTipLog");
G4Sphere* capsuleTip = new G4Sphere("CapsuleTip",0.*mm,0.55*mm,0.*deg,360.*deg,0.*deg,90.*deg);
G4LogicalVolume* capsuleTipLog = new G4LogicalVolume(capsuleTip,capsuleMat,"CapsuleTipLog");
capsuleTipPhys = new G4PVPlacement(0,
G4ThreeVector(0.,0.,1.75*mm),
"CapsuleTipPhys",
@@ -118,8 +110,8 @@ void BrachyDetectorConstructionLeipzig::ConstructLeipzig(G4VPhysicalVolume* m
0);
// Iridium core
iridiumCore = new G4Tubs("IrCore",0,0.30*mm,1.75*mm,0.*deg,360.*deg);
iridiumCoreLog = new G4LogicalVolume(iridiumCore,
G4Tubs* iridiumCore = new G4Tubs("IrCore",0,0.30*mm,1.75*mm,0.*deg,360.*deg);
G4LogicalVolume* iridiumCoreLog = new G4LogicalVolume(iridiumCore,
iridium,
"IridiumCoreLog");
iridiumCorePhys = new G4PVPlacement(0,
@@ -129,11 +121,11 @@ void BrachyDetectorConstructionLeipzig::ConstructLeipzig(G4VPhysicalVolume* m
capsulePhys,
false,
0);
// Applicator
//Leipzig Applicator is given by two different volumes
applicator1 = new G4Tubs("Appl1",5*mm,10.5*mm,12*mm,0.*deg,360.*deg);
applicator1Log = new G4LogicalVolume(applicator1,tungsten,"Appl1Log");
//Leipzig Applicator is modelled with two different volumes
G4Tubs* applicator1 = new G4Tubs("Appl1",5*mm,10.5*mm,12*mm,0.*deg,360.*deg);
G4LogicalVolume* applicator1Log = new G4LogicalVolume(applicator1,tungsten,"Appl1Log");
applicator1Phys = new G4PVPlacement(0,
G4ThreeVector(0,0,4.0*mm),
"Appl1Phys",
@@ -142,8 +134,8 @@ void BrachyDetectorConstructionLeipzig::ConstructLeipzig(G4VPhysicalVolume* m
false,
0);
applicator2 = new G4Tubs("Appl2",0.55*mm,5.*mm,3.125*mm,0.*deg,360.*deg);
applicator2Log = new G4LogicalVolume(applicator2,tungsten,"Appl2");
G4Tubs* applicator2 = new G4Tubs("Appl2",0.55*mm,5.*mm,3.125*mm,0.*deg,360.*deg);
G4LogicalVolume* applicator2Log = new G4LogicalVolume(applicator2,tungsten,"Appl2");
applicator2Phys = new G4PVPlacement(0,
G4ThreeVector(0,0,-4.875*mm),
"Appl2Phys",
@@ -152,13 +144,19 @@ void BrachyDetectorConstructionLeipzig::ConstructLeipzig(G4VPhysicalVolume* m
false,
0);
G4VisAttributes* simpleCapsuleVisAtt= new G4VisAttributes(red);
simpleCapsuleVisAtt->SetVisibility(true);
simpleCapsuleVisAtt->SetForceSolid(true);
capsuleLog->SetVisAttributes(simpleCapsuleVisAtt);
G4VisAttributes* simpleCapsuleVisAtt = new G4VisAttributes(red);
simpleCapsuleVisAtt -> SetVisibility(true);
simpleCapsuleVisAtt -> SetForceSolid(true);
capsuleLog -> SetVisAttributes(simpleCapsuleVisAtt);
G4VisAttributes* simpleCapsuleTipVisAtt= new G4VisAttributes(red);
simpleCapsuleTipVisAtt->SetVisibility(true);
simpleCapsuleTipVisAtt->SetForceSolid(true);
capsuleTipLog->SetVisAttributes(simpleCapsuleTipVisAtt);
G4VisAttributes* simpleCapsuleTipVisAtt = new G4VisAttributes(red);
simpleCapsuleTipVisAtt -> SetVisibility(true);
simpleCapsuleTipVisAtt -> SetForceSolid(true);
capsuleTipLog -> SetVisAttributes(simpleCapsuleTipVisAtt);
G4VisAttributes* applicatorVisAtt = new G4VisAttributes(lblue);
applicatorVisAtt -> SetVisibility(true);
applicatorVisAtt -> SetForceWireframe(true);
applicator1Log -> SetVisAttributes(applicatorVisAtt);
applicator2Log -> SetVisAttributes(applicatorVisAtt);
}
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -31,37 +34,33 @@
// *********************************
//
//
// $Id: BrachyDetectorMessenger.cc,v 1.9 2004/11/24 09:53:05 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyDetectorMessenger.cc,v 1.12 2006/06/29 15:48:18 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
#include "BrachyDetectorMessenger.hh"
#include "BrachyFactoryIr.hh"
#include "BrachyRunAction.hh"
#include "BrachyDetectorConstruction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithoutParameter.hh"
BrachyDetectorMessenger::BrachyDetectorMessenger( BrachyDetectorConstruction* Det): detector(Det)
{
detectorDir = new G4UIdirectory("/phantom/");
detectorDir->SetGuidance(" phantom control.");
detectorDir -> SetGuidance(" phantom control.");
phantomMaterialCmd = new G4UIcmdWithAString("/phantom/selectMaterial",this);
phantomMaterialCmd->SetGuidance("Select Material of the phantom.");
phantomMaterialCmd->SetParameterName("choice",false);
phantomMaterialCmd->AvailableForStates(G4State_Idle);
phantomMaterialCmd -> SetGuidance("Select Material of the phantom.");
phantomMaterialCmd -> SetParameterName("choice",false);
phantomMaterialCmd -> AvailableForStates(G4State_Idle);
sourceCmd = new G4UIcmdWithAString("/source/switch",this);
sourceCmd->SetGuidance("Assign the selected geometry to G4RunManager.");
sourceCmd->SetParameterName("choice",true);
sourceCmd->SetDefaultValue(" ");
sourceCmd->SetCandidates("Iridium Iodium Leipzig ");
sourceCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
sourceCmd -> SetGuidance("Assign the selected geometry to G4RunManager.");
sourceCmd -> SetParameterName("choice",true);
sourceCmd -> SetDefaultValue(" ");
sourceCmd -> SetCandidates("Iridium Iodium Leipzig ");
sourceCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
}
BrachyDetectorMessenger::~BrachyDetectorMessenger()
@@ -73,15 +72,17 @@ BrachyDetectorMessenger::~BrachyDetectorMessenger()
void BrachyDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
// Change the material of the phantom
if( command == phantomMaterialCmd )
{ detector->SetPhantomMaterial(newValue);}
{ detector -> SetPhantomMaterial(newValue);}
// Switch the source in the phantom
if( command == sourceCmd )
{
if(newValue=="Iodium" || newValue=="Iridium"|| newValue=="Leipzig")
{
detector->SelectBrachytherapicSeed(newValue);
detector->SwitchBrachytherapicSeed();
detector -> SelectBrachytherapicSeed(newValue);
detector -> SwitchBrachytherapicSeed();
}
}
}
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
// Code developed by:
@@ -29,30 +32,16 @@
// * *
// *******************************
//
// $Id: BrachyEventAction.cc,v 1.19 2004/03/11 16:05:03 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyEventAction.cc,v 1.21 2006/06/29 15:48:21 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "BrachyEventAction.hh"
#include "BrachyPhantomHit.hh"
#include "BrachyPhantomSD.hh"
#include "BrachyDetectorConstruction.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4HCofThisEvent.hh"
#include "G4VHitsCollection.hh"
#include "G4TrajectoryContainer.hh"
#include "G4Trajectory.hh"
#include "G4VVisManager.hh"
#include "G4SDManager.hh"
#include "G4UImanager.hh"
#include "G4ios.hh"
#include "G4VVisManager.hh"
#ifdef G4ANALYSIS_USE
#include"BrachyAnalysisManager.hh"
#endif
// Retrieve information about the energy deposit in the phantom ...
BrachyEventAction::BrachyEventAction() :
drawFlag("all" )
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -31,8 +34,10 @@
// * *
// *******************************
//
// $Id: BrachyFactory.cc,v 1.5 2003/12/09 15:29:59 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyFactory.cc,v 1.7 2006/06/29 15:48:23 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// Factory of brachytherapic sources
//
#include"BrachyFactory.hh"
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
// Code developed by:
@@ -29,8 +32,8 @@
// * *
// *******************************
//
// $Id: BrachyFactoryI.cc,v 1.4 2003/05/22 17:20:43 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyFactoryI.cc,v 1.6 2006/06/29 15:48:26 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "BrachyFactoryI.hh"
#include "BrachyPrimaryGeneratorActionI.hh"
@@ -47,6 +50,7 @@
BrachyFactoryI:: BrachyFactoryI()
{
iodiumSource = new BrachyDetectorConstructionI();
iodiumPrimaryParticle = new BrachyPrimaryGeneratorActionI();
}
BrachyFactoryI::~BrachyFactoryI()
@@ -54,16 +58,14 @@ BrachyFactoryI::~BrachyFactoryI()
delete iodiumSource;
}
G4VUserPrimaryGeneratorAction* BrachyFactoryI::CreatePrimaryGeneratorAction()
void BrachyFactoryI::CreatePrimaryGeneratorAction(G4Event* anEvent)
{
G4VUserPrimaryGeneratorAction* iodiumPrimaryParticle =
new BrachyPrimaryGeneratorActionI();
return iodiumPrimaryParticle;
iodiumPrimaryParticle -> GeneratePrimaries(anEvent);
}
void BrachyFactoryI::CreateSource(G4VPhysicalVolume* mother)
{
iodiumSource->ConstructIodium(mother);
iodiumSource -> ConstructIodium(mother);
}
void BrachyFactoryI::CleanSource()
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
// Code developed by:
@@ -29,8 +32,8 @@
// * *
// *******************************
//
// $Id: BrachyFactoryIr.cc,v 1.4 2003/05/22 17:20:43 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyFactoryIr.cc,v 1.6 2006/06/29 15:48:29 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "globals.hh"
#include "BrachyFactoryIr.hh"
@@ -47,18 +50,19 @@
BrachyFactoryIr:: BrachyFactoryIr()
{
iridiumSource=new BrachyDetectorConstructionIr();
iridiumSource = new BrachyDetectorConstructionIr();
iridiumPrimaryParticle = new BrachyPrimaryGeneratorActionIr();
}
BrachyFactoryIr:: ~BrachyFactoryIr()
{
delete iridiumSource;
delete iridiumPrimaryParticle;
}
G4VUserPrimaryGeneratorAction* BrachyFactoryIr::CreatePrimaryGeneratorAction(){
G4VUserPrimaryGeneratorAction* iridiumPrimaryParticle =
new BrachyPrimaryGeneratorActionIr();
return iridiumPrimaryParticle;
void BrachyFactoryIr::CreatePrimaryGeneratorAction(G4Event* anEvent)
{
iridiumPrimaryParticle -> GeneratePrimaries(anEvent);
}
void BrachyFactoryIr::CreateSource(G4VPhysicalVolume* mother)
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
// Code developed by:
@@ -29,8 +32,8 @@
// * *
// *******************************
//
// $Id: BrachyFactoryLeipzig.cc,v 1.4 2003/05/22 17:20:43 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyFactoryLeipzig.cc,v 1.6 2006/06/29 15:48:31 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "globals.hh"
@@ -48,7 +51,8 @@
BrachyFactoryLeipzig:: BrachyFactoryLeipzig()
{
leipzigSource=new BrachyDetectorConstructionLeipzig();
leipzigSource = new BrachyDetectorConstructionLeipzig();
iridiumPrimaryParticle = new BrachyPrimaryGeneratorActionIr();
}
BrachyFactoryLeipzig:: ~BrachyFactoryLeipzig()
@@ -56,11 +60,9 @@ BrachyFactoryLeipzig:: ~BrachyFactoryLeipzig()
delete leipzigSource;
}
G4VUserPrimaryGeneratorAction* BrachyFactoryLeipzig::CreatePrimaryGeneratorAction()
void BrachyFactoryLeipzig::CreatePrimaryGeneratorAction(G4Event* anEvent)
{
G4VUserPrimaryGeneratorAction* iridiumPrimaryParticle =
new BrachyPrimaryGeneratorActionIr();
return iridiumPrimaryParticle;
iridiumPrimaryParticle -> GeneratePrimaries(anEvent);
}
void BrachyFactoryLeipzig::CreateSource(G4VPhysicalVolume* mother)
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
// Code developed by:
@@ -29,8 +32,8 @@
// * *
// *******************************
//
// $Id: BrachyMaterial.cc,v 1.5 2004/03/11 15:38:42 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyMaterial.cc,v 1.7 2006/06/29 15:48:33 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "G4MaterialPropertiesTable.hh"
@@ -232,6 +235,7 @@ void BrachyMaterial::DefineMaterials()
G4Material* BrachyMaterial::GetMat(G4String material)
{
// Returns a material
G4Material* pttoMaterial = G4Material::GetMaterial(material);
return pttoMaterial;
}
@@ -1,78 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// Code developed by:
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
//
// ********************************
// * *
// * BrachyPhantomHit.cc *
// * *
// ********************************
//
// $Id: BrachyPhantomHit.cc,v 1.6 2005/11/22 12:47:35 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "BrachyPhantomHit.hh"
#include "G4ios.hh"
G4Allocator<BrachyPhantomHit> BrachyPhantomHitAllocator;
BrachyPhantomHit::BrachyPhantomHit()
{
}
BrachyPhantomHit::~BrachyPhantomHit()
{
}
BrachyPhantomHit::BrachyPhantomHit(const BrachyPhantomHit &right)
: G4VHit()
{
xHitPosition = right.xHitPosition;
zHitPosition = right.zHitPosition;
yHitPosition = right.yHitPosition;
energyDeposit = right.energyDeposit;
}
const BrachyPhantomHit& BrachyPhantomHit::operator=(const BrachyPhantomHit &right)
{
xHitPosition = right.xHitPosition;
zHitPosition = right.zHitPosition;
yHitPosition = right.yHitPosition;
energyDeposit = right.energyDeposit;
return *this;
}
int BrachyPhantomHit::operator==(const BrachyPhantomHit &right) const
{
return((xHitPosition==right.xHitPosition)&&(zHitPosition==right.zHitPosition)&&(yHitPosition==right.yHitPosition));
}
void BrachyPhantomHit::Draw()
{
}
void BrachyPhantomHit::Print()
{
}
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -30,32 +33,33 @@
// * *
// ************************************
//
// $Id: BrachyPhantomROGeometry.cc,v 1.9 2004/05/13 14:47:46 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPhantomROGeometry.cc,v 1.11 2006/06/29 15:48:36 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "BrachyPhantomROGeometry.hh"
#include "BrachyDummySD.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4PVReplica.hh"
#include "G4SDManager.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4SubtractionSolid.hh"
#include "G4ThreeVector.hh"
#include "G4Material.hh"
BrachyPhantomROGeometry::BrachyPhantomROGeometry(G4String aString,
G4double phantomDimX,
G4double phantomDimY,
G4double phantomDimZ,
G4int numberOfVoxelsX,
G4int numberOfVoxelsY,
G4int numberOfVoxelsZ):
G4VReadOutGeometry(aString),
phantomDimensionX(phantomDimX),
phantomDimensionZ(phantomDimZ),
phantomSizeX(phantomDimX),
phantomSizeY(phantomDimY),
phantomSizeZ(phantomDimZ),
numberOfVoxelsAlongX(numberOfVoxelsX),
numberOfVoxelsAlongY(numberOfVoxelsY),
numberOfVoxelsAlongZ(numberOfVoxelsZ)
{
}
@@ -71,26 +75,27 @@ G4VPhysicalVolume* BrachyPhantomROGeometry::Build()
// (It will be allowed to set a NULL pointer in volumes of such virtual
// division in future, since this material is irrelevant for tracking.)
G4Material* dummyMat = new G4Material(name="dummyMat", 1., 1.*g/mole, 1.*g/cm3);
G4Material* dummyMat = new G4Material(name="dummyMat",
1., 1.*g/mole, 1.*g/cm3);
G4double worldDimensionX = 4.0*m;
G4double worldDimensionY = 4.0*m;
G4double worldDimensionZ = 4.0*m;
G4double worldSizeX = 4.0*m;
G4double worldSizeY = 4.0*m;
G4double worldSizeZ = 4.0*m;
G4double halfPhantomDimensionX = phantomDimensionX;
G4double halfPhantomDimensionZ = phantomDimensionZ;
G4double halfPhantomDimensionY = phantomDimensionX;
G4double halfPhantomSizeX = phantomSizeX;
G4double halfPhantomSizeZ = phantomSizeZ;
G4double halfPhantomSizeY = phantomSizeY;
// variables for x division ...
G4double halfXVoxelDimensionX = halfPhantomDimensionX/numberOfVoxelsAlongX;
G4double halfXVoxelDimensionZ = halfPhantomDimensionZ;
G4double voxelXThickness = 2*halfXVoxelDimensionX;
G4double halfVoxelSize = halfPhantomSizeX/numberOfVoxelsAlongX;
G4double halfSize = halfPhantomSizeZ;
G4double voxelThickness = 2*halfVoxelSize;
// world volume of ROGeometry ...
G4Box *ROWorld = new G4Box("ROWorld",
worldDimensionX,
worldDimensionY,
worldDimensionZ);
worldSizeX,
worldSizeY,
worldSizeZ);
G4LogicalVolume *ROWorldLog = new G4LogicalVolume(ROWorld,
dummyMat,
@@ -103,11 +108,11 @@ G4VPhysicalVolume* BrachyPhantomROGeometry::Build()
ROWorldLog,
0,false,0);
// phantom ROGeometry ...
// Phantom ROGeometry ...
G4Box *ROPhantom = new G4Box("ROPhantom",
halfPhantomDimensionX,
halfPhantomDimensionY,
halfPhantomDimensionZ);
halfPhantomSizeX,
halfPhantomSizeY,
halfPhantomSizeZ);
G4LogicalVolume *ROPhantomLog = new G4LogicalVolume(ROPhantom,
dummyMat,
@@ -121,13 +126,13 @@ G4VPhysicalVolume* BrachyPhantomROGeometry::Build()
ROWorldPhys,
false,0);
// ROGeomtry: Voxel division
// ROGeometry: Voxel division
// X division first...
G4Box *ROPhantomXDivision = new G4Box("ROPhantomXDivision",
halfXVoxelDimensionX,
halfXVoxelDimensionZ,
halfXVoxelDimensionZ);
halfVoxelSize,
halfSize,
halfSize);
G4LogicalVolume *ROPhantomXDivisionLog = new G4LogicalVolume(ROPhantomXDivision,
dummyMat,
@@ -139,13 +144,13 @@ G4VPhysicalVolume* BrachyPhantomROGeometry::Build()
ROPhantomPhys,
kXAxis,
numberOfVoxelsAlongX,
voxelXThickness);
voxelThickness);
// ...then Z division
G4Box *ROPhantomZDivision = new G4Box("ROPhantomZDivision",
halfXVoxelDimensionX,
halfXVoxelDimensionZ,
halfXVoxelDimensionX);
halfVoxelSize,
halfSize,
halfVoxelSize);
G4LogicalVolume *ROPhantomZDivisionLog = new G4LogicalVolume(ROPhantomZDivision,
dummyMat,
@@ -157,13 +162,13 @@ G4VPhysicalVolume* BrachyPhantomROGeometry::Build()
ROPhantomXDivisionPhys,
kZAxis,
numberOfVoxelsAlongZ,
voxelXThickness);
voxelThickness);
// ...then Y division
G4Box *ROPhantomYDivision = new G4Box("ROPhantomYDivision",
halfXVoxelDimensionX,
halfXVoxelDimensionX,
halfXVoxelDimensionX);
halfVoxelSize,
halfVoxelSize,
halfVoxelSize);
G4LogicalVolume *ROPhantomYDivisionLog = new G4LogicalVolume(ROPhantomYDivision,
dummyMat,
@@ -174,8 +179,8 @@ G4VPhysicalVolume* BrachyPhantomROGeometry::Build()
ROPhantomYDivisionLog,
ROPhantomZDivisionPhys,
kYAxis,
numberOfVoxelsAlongZ,
voxelXThickness);
numberOfVoxelsAlongY,
voxelThickness);
BrachyDummySD *dummySD = new BrachyDummySD;
ROPhantomYDivisionLog -> SetSensitiveDetector(dummySD);
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -30,11 +33,10 @@
// * *
// ********************************
//
// $Id: BrachyPhantomSD.cc,v 1.9 2005/11/22 12:47:35 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPhantomSD.cc,v 1.13 2006/06/29 15:48:39 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "BrachyPhantomSD.hh"
#include "BrachyPhantomHit.hh"
#include "BrachyAnalysisManager.hh"
#include "BrachyDetectorConstruction.hh"
#include "G4Track.hh"
@@ -46,13 +48,8 @@
#include "G4SDManager.hh"
#include "G4ParticleDefinition.hh"
//....
BrachyPhantomSD::BrachyPhantomSD(G4String name):G4VSensitiveDetector(name)
{
G4String HCname;
SensitiveDetectorName = name;
collectionName.insert(HCname="phantomCollection");
}
BrachyPhantomSD::~BrachyPhantomSD()
@@ -60,61 +57,68 @@ BrachyPhantomSD::~BrachyPhantomSD()
}
void BrachyPhantomSD::Initialize(G4HCofThisEvent* HCE)
void BrachyPhantomSD::Initialize(G4HCofThisEvent*)
{
phantomCollection = new BrachyPhantomHitsCollection
(SensitiveDetectorName,collectionName[0]);
static G4int HCID = -1;
if(HCID<0)
{ HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]); }
HCE->AddHitsCollection( HCID, phantomCollection );
}
G4bool BrachyPhantomSD::ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist)
{
//
// The energy deposit of the hits is stored in histograms and ntuples
//
if(!ROhist)
return false;
if(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName() != "PhantomPhys")
// Check the volume
if(aStep -> GetPreStepPoint() -> GetPhysicalVolume() ->
GetName() != "PhantomPhys")
return false;
G4double energyDeposit = aStep->GetTotalEnergyDeposit();
G4double energyDeposit = aStep -> GetTotalEnergyDeposit();
// Check that the energy deposit is not null
if(energyDeposit == 0.)
return false;
if(energyDeposit != 0)
{
// Read Voxel indexes: i is the x index, k is the z index
{
// Read Voxel indexes:
// i is the x index,
// j is the y index
// k is the z index
G4int j = ROhist -> GetReplicaNumber();
G4int k = ROhist -> GetReplicaNumber(1);
G4int i = ROhist -> GetReplicaNumber(2);
G4int j = ROhist -> GetReplicaNumber();
G4int numberOfVoxelZ = 300;
G4double voxelWidthZ = 1. *mm;
G4double x = (-numberOfVoxelZ+1+2*i)*voxelWidthZ/2;
G4double y = (- numberOfVoxelZ+1+2*j)*voxelWidthZ/2;
G4double z = (- numberOfVoxelZ+1+2*k)*voxelWidthZ/2;
G4int numberOfVoxel = 300;
G4double voxelWidth = 1. *mm;
// Retrieve the coordinates of the center of the voxel where
// the energy deposit is located
x = ( - numberOfVoxel + 1+ 2*i )* voxelWidth/2;
y = ( - numberOfVoxel + 1+ 2*j )* voxelWidth/2;
z = ( - numberOfVoxel + 1+ 2*k )* voxelWidth/2;
#ifdef G4ANALYSIS_USE
BrachyAnalysisManager* analysis =
BrachyAnalysisManager::getInstance();
analysis -> FillNtupleWithEnergy(x,y,z,energyDeposit);
if (y<0.8*mm && y> -0.8*mm)
// Fill the ntuple with position and energy deposit in the phantom
analysis -> FillNtupleWithEnergy(x,y,z,energyDeposit/MeV);
if (y < 0.8 * mm && y > -0.8 * mm)
{
// Fill a 2D histogram with the energy deposit in the plane
// containing the source
analysis -> FillHistogramWithEnergy(x,z,energyDeposit/MeV);
if (z<0.8*mm && z> -0.8*mm)
// Fill 1D histogram with the energy deposit
// along the axis perpendicular to the main axis of the source
if (z < 0.8 * mm && z > -0.8 * mm)
analysis -> DoseDistribution(x,energyDeposit/MeV);
}
#endif
// Store the energy deposit and position in a Hit collection
BrachyPhantomHit* newHit = new BrachyPhantomHit();
newHit -> SetEdep(energyDeposit);
newHit -> SetPosition(x,y,z);
phantomCollection -> insert( newHit );
}
return true;
}
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -30,8 +33,8 @@
// * *
// **********************************
//
// $Id: BrachyPhysicsList.cc,v 1.10 2004/01/08 17:25:13 silvarod Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPhysicsList.cc,v 1.12 2006/06/29 15:48:42 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "BrachyPhysicsList.hh"
@@ -47,6 +50,9 @@
BrachyPhysicsList::BrachyPhysicsList(): G4VUserPhysicsList()
{
// The production threshold is fixed to 0.1 mm for all the particles
// Secondary particles with a range bigger than 0.1 mm
// are generated; otherwise their energy is considered deposited locally
defaultCutValue = 0.1*mm;
cutForGamma = defaultCutValue;
cutForElectron = defaultCutValue;
@@ -107,37 +113,38 @@ void BrachyPhysicsList::ConstructProcess()
void BrachyPhysicsList::ConstructEM()
{
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
G4ParticleDefinition* particle = theParticleIterator -> value();
G4ProcessManager* pmanager = particle -> GetProcessManager();
G4String particleName = particle -> GetParticleName();
//processes
if (particleName == "gamma") {
//gamma
lowePhot = new G4LowEnergyPhotoElectric("LowEnPhotoElec");
pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh);
pmanager->AddDiscreteProcess(lowePhot);
pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion);
//gamma
pmanager -> AddDiscreteProcess(new G4LowEnergyRayleigh);
pmanager -> AddDiscreteProcess(new G4LowEnergyPhotoElectric);
pmanager -> AddDiscreteProcess(new G4LowEnergyCompton);
pmanager -> AddDiscreteProcess(new G4LowEnergyGammaConversion);
} else if (particleName == "e-") {
//electron
loweIon = new G4LowEnergyIonisation("LowEnergyIoni");
loweBrem = new G4LowEnergyBremsstrahlung("LowEnBrem");
loweBrem->SetAngularGenerator("tsai");
loweBrem -> SetAngularGenerator("tsai");
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(loweIon, -1, 2,2);
pmanager->AddProcess(loweBrem, -1,-1,3);
pmanager -> AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager -> AddProcess(loweIon, -1, 2,2);
pmanager -> AddProcess(loweBrem, -1,-1,3);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1,-1,3);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
pmanager -> AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager -> AddProcess(new G4eIonisation, -1, 2,2);
pmanager -> AddProcess(new G4eBremsstrahlung, -1,-1,3);
pmanager -> AddProcess(new G4eplusAnnihilation, 0,-1,4);
}
}
@@ -156,60 +163,3 @@ void BrachyPhysicsList::SetCuts()
if (verboseLevel>0) DumpCutValuesTable();
}
void BrachyPhysicsList::SetGammaLowLimit(G4double lowcut)
{
SetGELowLimit(lowcut);
}
void BrachyPhysicsList::SetElectronLowLimit(G4double lowcut)
{
SetGELowLimit(lowcut);
}
void BrachyPhysicsList::SetGELowLimit(G4double lowcut)
{
if (verboseLevel >0){
G4cout << "BrachyPhysicsList::SetCuts:";
G4cout << "Gamma and Electron cut in energy: " << lowcut*MeV << " (MeV)" << G4endl;
}
G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(lowcut,1e5);
}
void BrachyPhysicsList::SetGammaCut(G4double val)
{
ResetCuts();
cutForGamma = val;
}
void BrachyPhysicsList::SetElectronCut(G4double val)
{
cutForElectron = val;
}
void BrachyPhysicsList::SetPositronCut(G4double val)
{
cutForPositron = val;
}
void BrachyPhysicsList::SetLowEnSecPhotCut(G4double cut)
{
G4cout<<"Low energy secondary photons cut is now set to: "
<<cut*MeV
<<" (MeV)"<<G4endl;
G4cout<<"for processes LowEnergyPhotoElectric, LowEnergyBremsstrahlung, LowEnergyIonisation"<<G4endl;
lowePhot->SetCutForLowEnSecPhotons(cut);
loweIon->SetCutForLowEnSecPhotons(cut);
loweBrem->SetCutForLowEnSecPhotons(cut);
}
void BrachyPhysicsList::SetLowEnSecElecCut(G4double cut)
{
G4cout<<"Low energy secondary electrons cut is now set to: "
<<cut*MeV
<<" (MeV)"<<G4endl;
G4cout<<"for processes LowEnergyIonisation"<<G4endl;
loweIon->SetCutForLowEnSecElectrons(cut);
}
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -34,8 +37,8 @@
// * *
// ********************************************
//
// $Id: BrachyPrimaryGeneratorAction.cc,v 1.16 2003/12/09 15:30:00 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPrimaryGeneratorAction.cc,v 1.18 2006/06/29 15:48:45 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "globals.hh"
#include "BrachyPrimaryGeneratorAction.hh"
@@ -47,12 +50,47 @@
#include "G4IonTable.hh"
#include "G4UImanager.hh"
#include "G4RunManager.hh"
#include "BrachyFactory.hh"
#include "BrachyFactoryLeipzig.hh"
#include "BrachyFactoryIr.hh"
#include "BrachyFactoryI.hh"
#include "BrachyPrimaryGeneratorMessenger.hh"
BrachyPrimaryGeneratorAction::BrachyPrimaryGeneratorAction()
{;}
{
primaryMessenger = new BrachyPrimaryGeneratorMessenger(this);
// Default source: iridium source
factory = new BrachyFactoryIr();
}
BrachyPrimaryGeneratorAction::~BrachyPrimaryGeneratorAction()
{;}
{
delete factory;
delete primaryMessenger;
}
void BrachyPrimaryGeneratorAction::GeneratePrimaries(G4Event*)
{;}
void BrachyPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
factory -> CreatePrimaryGeneratorAction(anEvent);
}
void BrachyPrimaryGeneratorAction::SwitchEnergy(G4String sourceChoice)
{
G4int flag = 0;
// Switch the energy spectrum of the photons delivered by the radiative source
if (sourceChoice == "Iodium")
{
flag=1;
if (factory) delete factory;
}
switch(flag)
{
case 1:
factory = new BrachyFactoryI;
break;
default:
factory = new BrachyFactoryIr;
}
}
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -34,8 +37,8 @@
// * *
// ********************************************
//
// $Id: BrachyPrimaryGeneratorActionI.cc,v 1.8 2005/06/27 15:27:18 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPrimaryGeneratorActionI.cc,v 1.10 2006/06/29 15:48:48 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "BrachyPrimaryGeneratorActionI.hh"
@@ -48,7 +51,7 @@
#include "Randomize.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4IonTable.hh"
//#include "G4IonTable.hh"
#include "G4UImanager.hh"
#include "G4RunManager.hh"
@@ -59,6 +62,7 @@ BrachyPrimaryGeneratorActionI::BrachyPrimaryGeneratorActionI()
particleGun = new G4ParticleGun(numberParticles);
// Gamma energy spectrum ...
// Fill a vector with the energy probabilities
energySpectrum.push_back(0.783913);
energySpectrum.push_back(0.170416);
energySpectrum.push_back(0.045671);
@@ -76,11 +80,12 @@ void BrachyPrimaryGeneratorActionI::GeneratePrimaries(G4Event* anEvent)
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
#endif
// Define the primary particle type
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4String ParticleName = "gamma";
G4ParticleDefinition* particle = particleTable->FindParticle(ParticleName);
G4ParticleDefinition* particle = particleTable -> FindParticle(ParticleName);
particleGun->SetParticleDefinition(particle);
particleGun -> SetParticleDefinition(particle);
// Random generation of gamma source point inside the Iodium core ...
G4double x,y,z;
@@ -95,7 +100,7 @@ void BrachyPrimaryGeneratorActionI::GeneratePrimaries(G4Event* anEvent)
z = (G4UniformRand()-0.5)*1.75*mm/0.5 ;
G4ThreeVector position(x,y,z);
particleGun->SetParticlePosition(position);
particleGun -> SetParticlePosition(position);
// Random generation of the impulse direction of primary particles ...
G4double a,b,c;
@@ -112,8 +117,9 @@ void BrachyPrimaryGeneratorActionI::GeneratePrimaries(G4Event* anEvent)
c /= n;
G4ThreeVector direction(a,b,c);
particleGun->SetParticleMomentumDirection(direction);
particleGun -> SetParticleMomentumDirection(direction);
// Generate the primary particles with a defined energy spectrum
G4double random = G4UniformRand();
G4double sum = 0;
G4int i = 0;
@@ -126,12 +132,13 @@ void BrachyPrimaryGeneratorActionI::GeneratePrimaries(G4Event* anEvent)
if(i==2){primaryParticleEnergy = 31.4*keV;}
else {primaryParticleEnergy = 35.5*keV;}}
particleGun->SetParticleEnergy(primaryParticleEnergy);
particleGun -> SetParticleEnergy(primaryParticleEnergy);
// Fill 1D histogram with gamma energy spectrum ...
#ifdef G4ANALYSIS_USE
analysis-> PrimaryParticleEnergySpectrum(primaryParticleEnergy);
analysis -> PrimaryParticleEnergySpectrum(primaryParticleEnergy);
#endif
// generate primary particle
particleGun->GeneratePrimaryVertex(anEvent);
}
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -34,8 +37,8 @@
// * *
// ********************************************
//
// $Id: BrachyPrimaryGeneratorActionIr.cc,v 1.9 2005/06/27 15:27:21 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyPrimaryGeneratorActionIr.cc,v 1.11 2006/06/29 15:48:51 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "BrachyPrimaryGeneratorActionIr.hh"
@@ -48,7 +51,7 @@
#include "Randomize.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4IonTable.hh"
//#include "G4IonTable.hh"
#include "G4UImanager.hh"
#include "G4RunManager.hh"
@@ -70,14 +73,15 @@ void BrachyPrimaryGeneratorActionIr::GeneratePrimaries(G4Event* anEvent)
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
#endif
// Define primary particle type
G4ParticleTable* pParticleTable = G4ParticleTable::GetParticleTable();
G4String ParticleName = "gamma";
G4ParticleDefinition* pParticle = pParticleTable->FindParticle(ParticleName);
particleGun->SetParticleDefinition(pParticle);
G4ParticleDefinition* pParticle = pParticleTable -> FindParticle(ParticleName);
particleGun -> SetParticleDefinition(pParticle);
// Random generation of gamma source point inside the Iodium core
// Random generation of gamma source point inside the Iridium core
G4double x,y,z;
G4double radius= 0.30*mm;
G4double radius = 0.30*mm;
do{
x = (G4UniformRand()-0.5)*(radius)/0.5;
y = (G4UniformRand()-0.5)*(radius)/0.5;
@@ -86,7 +90,8 @@ void BrachyPrimaryGeneratorActionIr::GeneratePrimaries(G4Event* anEvent)
z = (G4UniformRand()-0.5)*1.75*mm/0.5 -1.975*mm ;
G4ThreeVector position(x,y,z);
particleGun->SetParticlePosition(position);
particleGun -> SetParticlePosition(position);
// Random generation of the impulse direction
G4double a,b,c;
G4double n;
@@ -104,13 +109,16 @@ void BrachyPrimaryGeneratorActionIr::GeneratePrimaries(G4Event* anEvent)
G4ThreeVector direction(a,b,c);
particleGun->SetParticleMomentumDirection(direction);
primaryParticleEnergy = 356*keV;
// Primary particle energy
primaryParticleEnergy = 356.*keV;
particleGun->SetParticleEnergy(primaryParticleEnergy);
//1D Histogram of primary particle energy ...
#ifdef G4ANALYSIS_USE
analysis->PrimaryParticleEnergySpectrum(primaryParticleEnergy);
analysis -> PrimaryParticleEnergySpectrum(primaryParticleEnergy);
#endif
particleGun->GeneratePrimaryVertex(anEvent);
// Generate a primary particle
particleGun -> GeneratePrimaryVertex(anEvent);
}
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// Code developed by:
// S.Guatelli
//
// *****************************************
// * *
// * BrachyPrimaryGeneratorMessenger.cc *
// * *
// *****************************************
//
//
// $Id: BrachyPrimaryGeneratorMessenger.cc,v 1.3 2006/06/29 15:48:54 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
#include "BrachyPrimaryGeneratorMessenger.hh"
#include "BrachyPrimaryGeneratorAction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
BrachyPrimaryGeneratorMessenger::BrachyPrimaryGeneratorMessenger(BrachyPrimaryGeneratorAction* primary):
primaryAction(primary)
{
primaryDir = new G4UIdirectory("/primary/");
primaryDir -> SetGuidance("primary particles control.");
// Define interactive command
primaryParticleEnergySpectrumCmd =
new G4UIcmdWithAString("/primary/energy",this);
primaryParticleEnergySpectrumCmd -> SetGuidance("Select the energy of gamma emitted by the source.");
primaryParticleEnergySpectrumCmd -> SetGuidance("Iodium: Iodium Source");
primaryParticleEnergySpectrumCmd -> SetGuidance("Iridium: Iridium Source");
primaryParticleEnergySpectrumCmd -> SetParameterName("choice",true);
primaryParticleEnergySpectrumCmd -> SetDefaultValue("Iridium");
primaryParticleEnergySpectrumCmd -> SetCandidates("Iridium / Iodium");
primaryParticleEnergySpectrumCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
}
BrachyPrimaryGeneratorMessenger::~BrachyPrimaryGeneratorMessenger()
{
delete primaryParticleEnergySpectrumCmd;
delete primaryDir;
}
void BrachyPrimaryGeneratorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
// Change the energy of the emitted photons (iridium - iodium source)
if(command == primaryParticleEnergySpectrumCmd)
primaryAction -> SwitchEnergy(newValue);
}
@@ -1,23 +1,26 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and Disclaimer *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * 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. *
// * 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 intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// * 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. *
// ********************************************************************
//
//
@@ -35,12 +38,11 @@
// * *
// *******************************
//
// $Id: BrachyRunAction.cc,v 1.16 2005/11/22 11:00:47 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: BrachyRunAction.cc,v 1.18 2006/06/29 15:48:57 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
#include "BrachyRunAction.hh"
#include "BrachyEventAction.hh"
#ifdef G4ANALYSIS_USE
#include "BrachyAnalysisManager.hh"
@@ -50,23 +52,14 @@
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4ios.hh"
#include "BrachyRunMessenger.hh"
#include "G4SDManager.hh"
#include "G4Timer.hh"
#include "BrachyFactoryIr.hh"
#include "BrachyFactoryI.hh"
#include "BrachyFactory.hh"
#include "BrachyRunAction.hh"
BrachyRunAction::BrachyRunAction()
{
runMessenger = new BrachyRunMessenger(this);
}
BrachyRunAction::~BrachyRunAction()
{
delete runMessenger;
}
void BrachyRunAction::BeginOfRunAction(const G4Run* aRun)
{
@@ -82,36 +75,11 @@ void BrachyRunAction::BeginOfRunAction(const G4Run* aRun)
else { G4cout << "The results of Run:"<< runNb << " are summed to the" <<
" results of the previous Run in brachytherapy.hbk" << G4endl;}
#endif
G4RunManager* runManager = G4RunManager::GetRunManager();
if(runManager)
{ switch(sourceChoice)
{
case 1:
factory = new BrachyFactoryI;
break;
default:
factory = new BrachyFactoryIr;
}
G4VUserPrimaryGeneratorAction* sourcePrimaryParicle =
factory->CreatePrimaryGeneratorAction();
if(sourcePrimaryParicle)runManager->SetUserAction(sourcePrimaryParicle);
}
}
void BrachyRunAction::SelectEnergy(G4int choice)
{
sourceChoice = choice;
if (sourceChoice == 1)factory = new BrachyFactoryI;
else factory = new BrachyFactoryIr;
}
void BrachyRunAction::EndOfRunAction(const G4Run* aRun)
{
G4cout << "number of event = " << aRun->GetNumberOfEvent() << G4endl;
delete factory;
G4cout << "number of events = " << aRun->GetNumberOfEvent() << G4endl;
}
@@ -1,73 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Code developed by:
// S.Guatelli
//
// $Id: BrachyRunMessenger.cc,v 1.4 2003/05/22 17:20:44 guatelli Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
//
// *******************************
// * *
// * BrachyRunMessenger.cc *
// * *
// *******************************
#include "BrachyRunMessenger.hh"
#include "BrachyRunAction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
BrachyRunMessenger::BrachyRunMessenger( BrachyRunAction* pBrachyRun):
runManager(pBrachyRun)
{
runDir = new G4UIdirectory("/run/");
runDir->SetGuidance("Control gamma energy.");
primaryParticleEnergySpectrumCmd =
new G4UIcmdWithAString("/run/energy",this);
primaryParticleEnergySpectrumCmd->SetGuidance("Select the energy of gamma emitted by the source.");
primaryParticleEnergySpectrumCmd->SetGuidance(" Iodium: Iodium Source ");
primaryParticleEnergySpectrumCmd->SetGuidance(" Iridium: Iridium Source " );
primaryParticleEnergySpectrumCmd->SetParameterName("choice",true);
primaryParticleEnergySpectrumCmd->SetDefaultValue("Iridium");
primaryParticleEnergySpectrumCmd->SetCandidates("Iridium / Iodium");
primaryParticleEnergySpectrumCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
}
BrachyRunMessenger::~BrachyRunMessenger()
{
delete primaryParticleEnergySpectrumCmd;
delete runDir;
}
void BrachyRunMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if(command == primaryParticleEnergySpectrumCmd)
{
if (newValue == "Iodium") runManager->SelectEnergy(1);
else runManager->SelectEnergy(0);
}
}