Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -23,7 +23,7 @@
//
// $Id: Em1DetectorConstruction.cc,v 1.9 2002/05/31 17:10:35 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em1DetectorMessenger.cc,v 1.4 2001/10/26 12:51:25 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em1DetectorMessenger.cc,v 1.6 2002/12/11 14:19:23 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -42,33 +42,33 @@
Em1DetectorMessenger::Em1DetectorMessenger(Em1DetectorConstruction * Em1Det)
:Em1Detector(Em1Det)
{
Em1detDir = new G4UIdirectory("/calor/");
Em1detDir->SetGuidance("Em1 detector control.");
testemDir = new G4UIdirectory("/testem/");
testemDir->SetGuidance("commands specific to this example");
MaterCmd = new G4UIcmdWithAString("/calor/setMat",this);
MaterCmd = new G4UIcmdWithAString("/testem/det/setMat",this);
MaterCmd->SetGuidance("Select material of the box.");
MaterCmd->SetParameterName("choice",false);
MaterCmd->AvailableForStates(PreInit,Idle);
MaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
SizeCmd = new G4UIcmdWithADoubleAndUnit("/calor/setSize",this);
SizeCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setSize",this);
SizeCmd->SetGuidance("Set size of the box");
SizeCmd->SetParameterName("Size",false);
SizeCmd->SetRange("Size>0.");
SizeCmd->SetUnitCategory("Length");
SizeCmd->AvailableForStates(PreInit,Idle);
SizeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/calor/setField",this);
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
MagFieldCmd->SetGuidance("Define magnetic field.");
MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
MagFieldCmd->SetParameterName("Bz",false);
MagFieldCmd->SetUnitCategory("Magnetic flux density");
MagFieldCmd->AvailableForStates(PreInit,Idle);
MagFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/calor/update",this);
UpdateCmd = new G4UIcmdWithoutParameter("/testem/det/update",this);
UpdateCmd->SetGuidance("Update calorimeter geometry.");
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
UpdateCmd->AvailableForStates(Idle);
UpdateCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -79,7 +79,7 @@ Em1DetectorMessenger::~Em1DetectorMessenger()
delete SizeCmd;
delete MagFieldCmd;
delete UpdateCmd;
delete Em1detDir;
delete testemDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: Em1EventAction.cc,v 1.6 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em1EventActionMessenger.cc,v 1.4 2001/10/26 12:51:25 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em1EventActionMessenger.cc,v 1.6 2002/12/11 14:19:23 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -41,19 +41,19 @@
Em1EventActionMessenger::Em1EventActionMessenger(Em1EventAction* EvAct)
:eventAction(EvAct)
{
DrawCmd = new G4UIcmdWithAString("/event/drawTracks",this);
DrawCmd = new G4UIcmdWithAString("/testem/event/drawTracks",this);
DrawCmd->SetGuidance("Draw the tracks in the event");
DrawCmd->SetGuidance(" Choice : none,charged, all");
DrawCmd->SetParameterName("choice",true);
DrawCmd->SetDefaultValue("all");
DrawCmd->SetCandidates("none charged all");
DrawCmd->AvailableForStates(Idle);
DrawCmd->AvailableForStates(G4State_Idle);
PrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this);
PrintCmd = new G4UIcmdWithAnInteger("/testem/event/printModulo",this);
PrintCmd->SetGuidance("Print events modulo n");
PrintCmd->SetParameterName("EventNb",false);
PrintCmd->SetRange("EventNb>0");
PrintCmd->AvailableForStates(Idle);
PrintCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: Em1PhysicsList.cc,v 1.6 2002/03/08 13:43:29 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsListMessenger.cc,v 1.6 2002/03/08 13:43:30 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em1PhysicsListMessenger.cc,v 1.8 2002/12/11 14:19:24 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -40,33 +40,33 @@
Em1PhysicsListMessenger::Em1PhysicsListMessenger(Em1PhysicsList* EvAct)
:physList(EvAct)
{
cutGCmd = new G4UIcmdWithADoubleAndUnit("/run/particle/setGCut",this);
cutGCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setGCut",this);
cutGCmd->SetGuidance("Set gamma cut.");
cutGCmd->SetParameterName("Gcut",false);
cutGCmd->SetRange("Gcut>0.");
cutGCmd->SetUnitCategory("Length");
cutGCmd->AvailableForStates(PreInit,Idle);
cutGCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
cutECmd = new G4UIcmdWithADoubleAndUnit("/run/particle/setECut",this);
cutECmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setECut",this);
cutECmd->SetGuidance("Set electron cut");
cutECmd->SetParameterName("Ecut",false);
cutECmd->SetRange("Ecut>0.");
cutECmd->SetUnitCategory("Length");
cutECmd->AvailableForStates(PreInit,Idle);
cutECmd->AvailableForStates(G4State_PreInit,G4State_Idle);
cutPCmd = new G4UIcmdWithADoubleAndUnit("/run/particle/setPCut",this);
cutPCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setPCut",this);
cutPCmd->SetGuidance("Set proton cut.");
cutPCmd->SetParameterName("Pcut",false);
cutPCmd->SetRange("Pcut>0.");
cutPCmd->SetUnitCategory("Length");
cutPCmd->AvailableForStates(PreInit,Idle);
cutPCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
rCmd = new G4UIcmdWithADoubleAndUnit("/run/particle/getRange",this);
rCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/getRange",this);
rCmd->SetGuidance("get the electron cut for the current material.");
rCmd->SetParameterName("energy",false);
rCmd->SetRange("energy>0.");
rCmd->SetUnitCategory("Energy");
rCmd->AvailableForStates(Idle);
rCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: Em1PrimaryGeneratorAction.cc,v 1.5 2001/12/07 11:49:09 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em1PrimaryGeneratorMessenger.cc,v 1.1 2001/12/07 11:49:10 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em1PrimaryGeneratorMessenger.cc,v 1.3 2002/12/11 14:19:24 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -41,19 +41,19 @@ Em1PrimaryGeneratorMessenger::Em1PrimaryGeneratorMessenger(
Em1PrimaryGeneratorAction* Em1Gun)
:Em1Action(Em1Gun)
{
DefaultCmd = new G4UIcmdWithAnInteger("/gun/setDefault",this);
DefaultCmd = new G4UIcmdWithAnInteger("/testem/gun/setDefault",this);
DefaultCmd->SetGuidance("set/reset kinematic defined in PrimaryGenerator");
DefaultCmd->SetGuidance("0=boxCenter, else=frontFace");
DefaultCmd->SetParameterName("position",true);
DefaultCmd->SetDefaultValue(0);
DefaultCmd->AvailableForStates(PreInit,Idle);
DefaultCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
RndmCmd = new G4UIcmdWithADouble("/gun/rndm",this);
RndmCmd = new G4UIcmdWithADouble("/testem/gun/rndm",this);
RndmCmd->SetGuidance("random lateral extension on the beam");
RndmCmd->SetGuidance("in fraction of 0.5*sizeYZ");
RndmCmd->SetParameterName("rBeam",false);
RndmCmd->SetRange("rBeam>=0.&&rBeam<=1.");
RndmCmd->AvailableForStates(Idle);
RndmCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em1RunAction.cc,v 1.16 2002/06/03 13:49:28 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em1RunAction.cc,v 1.18 2002/12/11 14:19:24 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -43,15 +43,7 @@
#include "Randomize.hh"
#ifndef G4NOHIST
#include "AIDA/IAnalysisFactory.h"
#include "AIDA/ITreeFactory.h"
#include "AIDA/ITree.h"
#include "AIDA/IHistogramFactory.h"
#include "AIDA/IHistogram1D.h"
#include "AIDA/IAxis.h"
#include "AIDA/IAnnotation.h"
#include "AIDA/ITupleFactory.h"
#include "AIDA/ITuple.h"
#include "AIDA/AIDA.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -73,24 +65,26 @@ void Em1RunAction::bookHisto()
{
#ifndef G4NOHIST
// Creating the analysis factory
IAnalysisFactory* af = AIDA_createAnalysisFactory();
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
// Creating the tree factory
ITreeFactory* tf = af->createTreeFactory();
AIDA::ITreeFactory* tf = af->createTreeFactory();
// Creating a tree mapped to an hbook file.
tree = tf->create("testem1.paw", false, false, "hbook");
G4bool readOnly = false;
G4bool createNew = true;
tree = tf->create("testem1.paw", "hbook", readOnly, createNew);
// Creating a histogram factory, whose histograms will be handled by the tree
IHistogramFactory* hf = af->createHistogramFactory(*tree);
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
// booking histograms
histo[0] = hf->create1D("1","track length (mm) of a charged particle",
histo[0] = hf->createHistogram1D("1","track length (mm) of a charged particle",
100,0.,50*cm);
histo[1] = hf->create1D("2","Nb of steps per track (charged particle)",
histo[1] = hf->createHistogram1D("2","Nb of steps per track (charged particle)",
100,0.,100.);
histo[2] = hf->create1D("3","step length (mm) charged particle",
histo[2] = hf->createHistogram1D("3","step length (mm) charged particle",
100,0.,10*mm);
delete hf;
@@ -154,8 +148,14 @@ void Em1RunAction::EndOfRunAction(const G4Run* aRun)
{ //nb of tracks and steps per event
G4double dNbOfEvents = double(NbOfEvents);
G4long oldform = G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
G4int oldprec = G4cout.precision(4);
#ifdef G4USE_STD_NAMESPACE
G4std::ios::fmtflags mode = G4cout.flags();
G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
#else
G4long mode = G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
#endif
G4int prec = G4cout.precision(4);
G4cout << "\n nb tracks/event"
<< " neutral: " << G4std::setw(10) << NbOfTraks0/dNbOfEvents
@@ -176,8 +176,8 @@ void Em1RunAction::EndOfRunAction(const G4Run* aRun)
/dNbOfEvents;
G4cout << G4endl;
G4cout.setf(oldform,G4std::ios::floatfield);
G4cout.precision(oldprec);
G4cout.setf(mode,G4std::ios::floatfield);
G4cout.precision(prec);
}
// delete and remove all contents in ProcCounter
@@ -22,7 +22,7 @@
//
//
// $Id: Em1SteppingAction.cc,v 1.8 2002/05/31 17:10:35 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em1SteppingVerbose.cc,v 1.8 2001/10/26 12:51:26 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
//
// $Id: Em1TrackingAction.cc,v 1.8 2002/05/31 17:10:35 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
+5 -3
View File
@@ -21,10 +21,10 @@
// ********************************************************************
//
//
// $Id: Em1VisManager.cc,v 1.6 2001/11/15 13:09:44 johna Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em1VisManager.cc,v 1.7 2002/11/13 21:39:42 duns Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//
// John Allison 24th January 1998.
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,6 +41,7 @@
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4HepRep.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
@@ -97,6 +98,7 @@ void Em1VisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4HepRep);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);