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
@@ -1,24 +1,28 @@
//
// ********************************************************************
// * 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: HadrontherapyPrimaryGeneratorMessenger.cc; May 2005
// ----------------------------------------------------------------------------
// GEANT 4 - Hadrontherapy example
@@ -37,7 +41,6 @@
#include "HadrontherapyPrimaryGeneratorMessenger.hh"
#include "HadrontherapyPrimaryGeneratorAction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithADouble.hh"
@@ -45,6 +48,10 @@ HadrontherapyPrimaryGeneratorMessenger::HadrontherapyPrimaryGeneratorMessenger(
HadrontherapyPrimaryGeneratorAction* HadrontherapyGun)
:HadrontherapyAction(HadrontherapyGun)
{
//
// Definition of the interactive commands to modify the parameters of the
// generation of primary particles
//
beamParametersDir = new G4UIdirectory("/beam/");
beamParametersDir -> SetGuidance("set parameters of beam");
@@ -62,64 +69,59 @@ HadrontherapyPrimaryGeneratorMessenger::HadrontherapyPrimaryGeneratorMessenger(
sigmaMomentumYCmd -> SetParameterName("momentum",false);
sigmaMomentumYCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
sigmaMomentumZCmd = new G4UIcmdWithADouble("/beam/momentum/sigmaZ",this);
sigmaMomentumZCmd -> SetGuidance("set sigma momentum z");
sigmaMomentumZCmd -> SetParameterName("momentum",false);
sigmaMomentumZCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
meanKineticEnergyCmd = new G4UIcmdWithADoubleAndUnit("/beam/energy/meanEnergy",this);
meanKineticEnergyCmd->SetGuidance("set mean Kinetic energy");
meanKineticEnergyCmd->SetParameterName("Energy",false);
meanKineticEnergyCmd->SetDefaultUnit("MeV");
meanKineticEnergyCmd->SetUnitCandidates("eV keV MeV GeV TeV");
meanKineticEnergyCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
meanKineticEnergyCmd -> SetGuidance("set mean Kinetic energy");
meanKineticEnergyCmd -> SetParameterName("Energy",false);
meanKineticEnergyCmd -> SetDefaultUnit("MeV");
meanKineticEnergyCmd -> SetUnitCandidates("eV keV MeV GeV TeV");
meanKineticEnergyCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
sigmaEnergyCmd = new G4UIcmdWithADoubleAndUnit("/beam/energy/sigmaEnergy",this);
sigmaEnergyCmd->SetGuidance("set sigma energy");
sigmaEnergyCmd->SetParameterName("Energy",false);
sigmaEnergyCmd->SetDefaultUnit("keV");
sigmaEnergyCmd->SetUnitCandidates("eV keV MeV GeV TeV");
sigmaEnergyCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
sigmaEnergyCmd -> SetGuidance("set sigma energy");
sigmaEnergyCmd -> SetParameterName("Energy",false);
sigmaEnergyCmd -> SetDefaultUnit("keV");
sigmaEnergyCmd -> SetUnitCandidates("eV keV MeV GeV TeV");
sigmaEnergyCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
XpositionCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Xposition",this);
XpositionCmd->SetGuidance("set x coordinate of particle");
XpositionCmd->SetParameterName("position",false);
XpositionCmd->SetDefaultUnit("mm");
XpositionCmd->SetUnitCandidates("mm cm m");
XpositionCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
XpositionCmd -> SetGuidance("set x coordinate of particle");
XpositionCmd -> SetParameterName("position",false);
XpositionCmd -> SetDefaultUnit("mm");
XpositionCmd -> SetUnitCandidates("mm cm m");
XpositionCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
YpositionCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Yposition",this);
YpositionCmd->SetGuidance("set y coordinate of particle");
YpositionCmd->SetParameterName("position",false);
YpositionCmd->SetDefaultUnit("mm");
YpositionCmd->SetUnitCandidates("mm cm m");
YpositionCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
YpositionCmd -> SetGuidance("set y coordinate of particle");
YpositionCmd -> SetParameterName("position",false);
YpositionCmd -> SetDefaultUnit("mm");
YpositionCmd -> SetUnitCandidates("mm cm m");
YpositionCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
sigmaYCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Yposition/sigmaY",this);
sigmaYCmd->SetGuidance("set sigma y");
sigmaYCmd->SetParameterName("position",false);
sigmaYCmd->SetDefaultUnit("mm");
sigmaYCmd->SetUnitCandidates("mm cm m");
sigmaYCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
sigmaYCmd -> SetGuidance("set sigma y");
sigmaYCmd -> SetParameterName("position",false);
sigmaYCmd -> SetDefaultUnit("mm");
sigmaYCmd -> SetUnitCandidates("mm cm m");
sigmaYCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
ZpositionCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Zposition",this);
ZpositionCmd->SetGuidance("set z coordinate of particle");
ZpositionCmd->SetParameterName("position",false);
ZpositionCmd->SetDefaultUnit("mm");
ZpositionCmd->SetUnitCandidates("mm cm m");
ZpositionCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
ZpositionCmd -> SetGuidance("set z coordinate of particle");
ZpositionCmd -> SetParameterName("position",false);
ZpositionCmd -> SetDefaultUnit("mm");
ZpositionCmd -> SetUnitCandidates("mm cm m");
ZpositionCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
sigmaZCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Zposition/sigmaZ",this);sigmaZCmd->SetGuidance("set sigma z");
sigmaZCmd->SetParameterName("position",false);
sigmaZCmd->SetDefaultUnit("mm");
sigmaZCmd->SetUnitCandidates("mm cm m");
sigmaZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
sigmaZCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Zposition/sigmaZ",this);
sigmaZCmd -> SetGuidance("set sigma z");
sigmaZCmd -> SetParameterName("position",false);
sigmaZCmd -> SetDefaultUnit("mm");
sigmaZCmd -> SetUnitCandidates("mm cm m");
sigmaZCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
}
HadrontherapyPrimaryGeneratorMessenger::~HadrontherapyPrimaryGeneratorMessenger()
@@ -143,35 +145,35 @@ void HadrontherapyPrimaryGeneratorMessenger::SetNewValue(G4UIcommand* command,G4
{
if ( command == meanKineticEnergyCmd )
{ HadrontherapyAction -> SetmeanKineticEnergy(meanKineticEnergyCmd
->GetNewDoubleValue(newValue));}
-> GetNewDoubleValue(newValue));}
if ( command == sigmaEnergyCmd )
{ HadrontherapyAction -> SetsigmaEnergy(sigmaEnergyCmd
->GetNewDoubleValue(newValue));}
-> GetNewDoubleValue(newValue));}
if ( command == XpositionCmd )
{ HadrontherapyAction -> SetXposition(XpositionCmd
->GetNewDoubleValue(newValue));}
-> GetNewDoubleValue(newValue));}
if ( command == YpositionCmd )
{ HadrontherapyAction -> SetYposition(YpositionCmd
->GetNewDoubleValue(newValue));}
-> GetNewDoubleValue(newValue));}
if ( command == ZpositionCmd )
{ HadrontherapyAction -> SetZposition(ZpositionCmd
->GetNewDoubleValue(newValue));}
-> GetNewDoubleValue(newValue));}
if ( command == sigmaYCmd )
{ HadrontherapyAction -> SetsigmaY(sigmaYCmd
->GetNewDoubleValue(newValue));}
-> GetNewDoubleValue(newValue));}
if ( command == sigmaZCmd )
{ HadrontherapyAction -> SetsigmaZ(sigmaZCmd
->GetNewDoubleValue(newValue));}
-> GetNewDoubleValue(newValue));}
if ( command == sigmaMomentumYCmd )
{ HadrontherapyAction -> SetsigmaMomentumY(sigmaMomentumYCmd
->GetNewDoubleValue(newValue));}
-> GetNewDoubleValue(newValue));}
if ( command == sigmaMomentumZCmd )
{ HadrontherapyAction -> SetsigmaMomentumZ(sigmaMomentumZCmd
->GetNewDoubleValue(newValue));}
-> GetNewDoubleValue(newValue));}
}