Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
+18 -8
View File
@@ -1,18 +1,22 @@
# $Id: GNUmakefile,v 1.20 2000/06/21 11:02:54 johna Exp $
# $Id: GNUmakefile,v 1.25 2000/12/13 08:25:34 gcosmo Exp $
# -----------------------------------------------------------------
# "gmake" makes default libraries for each subdomain.
# "gmake glob" makes global libraries for each subdomain.
# Composite libraries are built.
# "gmake vis" makes global libraries and default (separate) visualization.
# "gmake total" makes everything, including the BREPS and the STEP code.
# "gmake global" makes global libraries for each subdomain.
# Composite libraries are built.
# "gmake includes" places header files .h/.hh in $G4INCLUDE
# "gmake libmap" forces rebuilding of map-file for granular libraries.
# "gmake clean_libs" removes just archive (.a) and shared (.so) libraries
# of current platform installation.
# "gmake clean" removes installation of current platform.
# "gmake clean_all" removes all platforms installations.
#
# (The .o files(s) are made by implicit rules.)
MAKEFLAGS= --no-print-directory
SUBDIR1 = global particles processes geometry digits+hits
SUBDIR2 = event tracking track materials run graphics_reps intercoms readout
SUBDIR3 = g3tog4 interfaces visualization
SUBDIR2 = event tracking track materials run graphics_reps intercoms parameterisations readout
SUBDIR3 = analysis g3tog4 interfaces visualization
SUBDIR4 = persistency
ifndef G4INSTALL
@@ -25,7 +29,7 @@ G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
G4TMPDIR := $(G4TMP)/$(G4SYSTEM)
unique := $(shell echo $$$$)
.PHONY: all glob global libmap clean_libs clean clean_all
.PHONY: all glob global libmap includes clean_libs clean clean_all
all:
ifdef G4USE_HEPODBMS
@@ -102,6 +106,12 @@ $(G4LIBDIR)/liblist: $(G4INSTALL)/config/liblist.c
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
$(CC) $(CCFLAGS) -o $(G4LIBDIR)/liblist $(G4INSTALL)/config/liblist.c
includes:
@echo Installing includes files in $(G4INCLUDE) ...
@for dir in $(SUBDIR1); do (cd $$dir && $(MAKE) $@); done
@for dir in $(SUBDIR2); do (cd $$dir && $(MAKE) $@); done
@for dir in $(SUBDIR3); do (cd $$dir && $(MAKE) $@); done
clean_libs:
@echo Removing all libraries ...
@for dir in $(SUBDIR1); do (cd $$dir && $(MAKE) clean_libs); done
+51
View File
@@ -0,0 +1,51 @@
# $Id: GNUmakefile,v 1.4 2000/12/12 16:29:24 gunter Exp $
# -----------------------------------------------------------------------
# GNUmakefile for visualization and modeling. John Allison, 5/7/95.
# Modeling is always made. Others by environment. John Allison 4/7/98.
# -----------------------------------------------------------------------
MAKEFLAGS= --no-print-directory
name := G4analysis
ifndef G4INSTALL
G4INSTALL = ../..
endif
include $(G4INSTALL)/config/architecture.gmk
include $(G4INSTALL)/config/analysis.gmk
G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(name)
SUBDIRS += management
SUBLIBS += G4analysis_management
ifdef G4ANALYSIS_BUILD_LIZARD
SUBDIRS += Lizard
SUBLIBS += G4Lizard
endif
ifdef G4ANALYSIS_BUILD_JAS
SUBDIRS += jas
SUBLIBS += G4jas
endif
ifdef G4ANALYSIS_BUILD_LAB
SUBDIRS += Lab
SUBLIBS += G4Lab
endif
.PHONY: granular glob global clean
granular:
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE)); done
includes:
@for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@ ); done
glob global:
@echo "ERROR: The global target not relevant for the analysis category."
clean:
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) clean); done
+19
View File
@@ -0,0 +1,19 @@
# $Id: GNUmakefile,v 1.1.1.1 2000/11/07 14:31:38 barrand Exp $
name := G4Lab
ifndef G4INSTALL
G4INSTALL = ../../..
endif
include $(G4INSTALL)/config/architecture.gmk
include $(G4INSTALL)/config/analysis.gmk
include $(G4INSTALL)/config/interactivity.gmk
CPPFLAGS += -I$(G4BASE)/global/management/include
ifdef G4ANALYSIS_BUILD_OPEN_SCIENTIST
# CPPFLAGS +=
endif
include $(G4INSTALL)/config/common.gmk
@@ -0,0 +1,55 @@
// 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: G4LabSystem.hh,v 1.2 2000/11/16 13:44:38 barrand Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Guy Barrand 14 September 2000
#ifndef G4LABSYSTEM_H
#define G4LABSYSTEM_H
#if defined(G4ANALYSIS_BUILD_LAB) || defined(G4ANALYSIS_USE_LAB)
#include "G4VAnalysisSystem.hh"
class IHistogramManager;
class IStorageSystemManager;
class ICloud;
class ICloudFactory;
class ICloudManager;
class ITuple;
class ITupleManager;
class ISession;
class G4LabSystem : public G4VAnalysisSystem {
public: // I methods :
virtual const G4String& GetName() const;
virtual IHistogramFactory* GetHistogramFactory();
virtual ICloudFactory* GetCloudFactory();
virtual ITuple* CreateTuple(const G4String&,const G4String&);
//
virtual void Store(IHistogram* = 0,const G4String& = "");
virtual void Plot(IHistogram*);
virtual void Plot(ICloud*);
public:
G4LabSystem(const G4String& name = "Lab");
virtual ~G4LabSystem();
private:
G4String fName;
IStorageSystemManager* fStorageManager;
IHistogramManager* fHistogramManager;
ICloudManager* fCloudManager;
ITupleManager* fTupleManager;
ISession* fSession;
};
#endif
#endif
+167
View File
@@ -0,0 +1,167 @@
// 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: G4LabSystem.cc,v 1.2 2000/11/16 13:44:41 barrand Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Guy Barrand 14 September 2000
#ifdef G4ANALYSIS_BUILD_LAB
#include <Lab/Analysis.h>
#include "G4ios.hh"
#include "G4LabSystem.hh"
#ifdef G4ANALYSIS_LAB_VISUALIZATION
#include <ISession.h>
#include <IUI.h>
#include <IViewer.h>
#include <Lib/Compiler.h>
BegNameSpace(Lib)
#include <Lib/Memory.h>
EndNameSpace
BegNameSpace(OnX)
#include <OnX/Interpreters.h>
#include <OnX/Session.h>
#include <OnX/XmUI.h>
EndNameSpace
#endif
G4LabSystem::G4LabSystem (
const G4String& aName
)
:fName(aName)
,fStorageManager(0)
,fHistogramManager(0)
,fCloudManager(0)
,fTupleManager(0)
,fSession(0)
{
#ifdef G4ANALYSIS_LAB_VISUALIZATION
fSession = new OnX::Session;
if(fSession) {
OnX::XmUI* gui = new OnX::XmUI(fSession,0,0);
if(gui) {
fSession->addManager(gui);
gui->executeCreateCallbacks();
//gui->steer();
}
}
fHistogramManager =
(IHistogramManager*)fSession->findManager("HistogramManager");
if(!fHistogramManager) {
G4cout << "Can't find the histogram manager" << G4std::endl;
}
fCloudManager =
(ICloudManager*)fSession->findManager("CloudManager");
if(!fCloudManager) {
G4cout << "Can't find the cloud manager" << G4std::endl;
}
fTupleManager =
(ITupleManager*)fSession->findManager("TupleManager");
if(!fTupleManager) {
G4cout << "Can't find the tuple manager" << G4std::endl;
}
fStorageManager =
(IStorageSystemManager*)fSession->findManager("StorageManager");
if(!fStorageManager) {
G4cout << "Can't find the storage manager" << G4std::endl;
}
#else
fHistogramManager = new Lab::HistogramManager();
fCloudManager = new Lab::CloudManager();
fTupleManager = new Lab::TupleManager();
fStorageManager = new Lab::StorageManager();
#endif
}
G4LabSystem::~G4LabSystem (){
#ifdef G4ANALYSIS_LAB_VISUALIZATION
delete fSession; // Will delete the gui object and the managers.
#else
delete fHistogramManager;
delete fCloudManager;
delete fTupleManager;
delete fStorageManager;
#endif
Lib::Memory::dump();
}
const G4String& G4LabSystem::GetName() const {
return fName;
}
IHistogramFactory* G4LabSystem::GetHistogramFactory() {
return fHistogramManager;
}
ICloudFactory* G4LabSystem::GetCloudFactory() {
return fCloudManager;
}
ITuple* G4LabSystem::CreateTuple(
const G4String& aStorage
,const G4String& aSID
){
if(!fTupleManager) return 0;
Lab::RioStorage* storageRio = new Lab::RioStorage(aStorage,
"RECREATE",
fStorageManager);
return new Lab::RioTuple(storageRio,aSID,fTupleManager);
}
void G4LabSystem::Store(IHistogram*,const G4String&){
if(!fHistogramManager) return;
Lab::RioStorage* storage = new Lab::RioStorage("g4osc.root","RECREATE");
//rioDB->createDirectory("histograms");
//rioDB->cd("histograms");
int number = fHistogramManager->size();
for(int count=0;count<number;count++) {
IHistogram* histo = (*fHistogramManager)[count];
const char* title = histo->title().c_str();
//G4cout << "G4Lab : store : " << title << G4std::endl;
fHistogramManager->store(histo,storage,title);
}
storage->commit();
delete storage;
//if(verboseLevel>1) G4cout << "Analysis is deleting." << G4endl;
//clear();
}
void G4LabSystem::Plot(IHistogram* aHistogram){
if(!fHistogramManager) return;
#ifdef G4ANALYSIS_LAB_VISUALIZATION
if(fSession) {
IUI* ui = (IUI*)fSession->findManager("UI_Manager");
if(ui) {
IViewer* viewer = ui->getCurrentViewer();
if(viewer) {
viewer->erase("region");
fHistogramManager->visualize(aHistogram,viewer);
viewer->next();
ui->synchronize();
}
}
}
#endif
}
void G4LabSystem::Plot(ICloud* aCloud){
if(!fCloudManager) return;
#ifdef G4ANALYSIS_LAB_VISUALIZATION
if(fSession) {
IUI* ui = (IUI*)fSession->findManager("UI_Manager");
if(ui) {
IViewer* viewer = ui->getCurrentViewer();
if(viewer) {
viewer->erase("region");
fCloudManager->visualize(aCloud,viewer);
viewer->next();
ui->synchronize();
}
}
}
#endif
}
#endif
+18
View File
@@ -0,0 +1,18 @@
# $Id: GNUmakefile,v 1.1.1.1 2000/10/31 21:42:25 barrand Exp $
name := G4Lizard
ifndef G4INSTALL
G4INSTALL = ../../..
endif
include $(G4INSTALL)/config/architecture.gmk
include $(G4INSTALL)/config/analysis.gmk
CPPFLAGS += -I$(G4BASE)/global/management/include
ifdef G4ANALYSIS_BUILD_LIZARD
# CPPFLAGS +=
endif
include $(G4INSTALL)/config/common.gmk
@@ -0,0 +1,45 @@
// 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: G4LizardSystem.hh,v 1.5 2000/11/16 13:44:41 barrand Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Guy Barrand 14 September 2000
#ifndef G4LIZARDSYSTEM_H
#define G4LIZARDSYSTEM_H
#if defined(G4ANALYSIS_BUILD_LIZARD) || defined(G4ANALYSIS_USE_LIZARD)
#include "G4VAnalysisSystem.hh"
class IHistogramFactory;
class IVectorFactory;
class IPlotter;
class G4LizardSystem : public G4VAnalysisSystem {
public: // I methods :
virtual const G4String& GetName() const;
virtual IHistogramFactory* GetHistogramFactory();
//
virtual void Store(IHistogram* = 0,const G4String& = "");
virtual void Plot(IHistogram*);
public:
G4LizardSystem(const G4String& name = "Lizard");
virtual ~G4LizardSystem();
private:
G4String fName;
IHistogramFactory* fHistogramFactory;
IVectorFactory* fVectorFactory;
IPlotter* fPlotter;
};
#endif
#endif
@@ -0,0 +1,128 @@
// 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: G4LizardSystem.cc,v 1.8 2000/11/17 08:16:45 barrand Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Guy Barrand 14 September 2000
#ifdef G4ANALYSIS_BUILD_LIZARD
#include <IHistogram1D.h>
#include <IHistogram2D.h>
//#include <IHistogramFactory.h>
#ifdef AIDA_DONT_USE_STD
#define AIDA_STD
#else
#define AIDA_STD std
#endif
// Lizard :
#include <AIDAHistogramFactory.h>
#include "AIDA_Plotter/AIDAPlotter.h"
#include "Interfaces/IVector.h"
#include "Interfaces/IVectorFactory.h"
#include "G4ios.hh"
#include "G4LizardSystem.hh"
G4LizardSystem::G4LizardSystem (
const G4String& aName
)
:fName(aName)
,fHistogramFactory(0)
,fVectorFactory(0)
,fPlotter(0)
{
fHistogramFactory = createIHistogramFactory();
if (fHistogramFactory == 0) {
G4cout << "Can't find the histogram factory." << G4std::endl;
}
fVectorFactory = createIVectorFactory();
if (fVectorFactory == 0) {
G4cout << "Can't find the vector factory." << G4std::endl;
}
fPlotter = createIPlotter(); // create plotter with 1 zone
if (fPlotter == 0) {
G4cout << "Can't create a plotter." << G4std::endl;
}
}
G4LizardSystem::~G4LizardSystem (){
delete fHistogramFactory;
}
const G4String& G4LizardSystem::GetName() const {
return fName;
}
IHistogramFactory* G4LizardSystem::GetHistogramFactory() {
return fHistogramFactory;
}
void G4LizardSystem::Store(IHistogram* aHistogram,const G4String& aStorageID){
if (!aHistogram) return;
if (aStorageID == "") return;
if (aHistogram->dimensions()==1) {
IVector* v =
fVectorFactory->from1D(dynamic_cast<IHistogram1D*>(aHistogram));
if (v == 0) {
G4cerr << "G4LizardSystem::Store> ERROR: could not create vector !" <<
G4std::endl;
return;
}
v->toAscii(aStorageID.c_str());
delete v; // don't forget this !
}
if(aHistogram->dimensions()==2) {
IVector* v =
fVectorFactory->from2D(dynamic_cast<IHistogram2D*>(aHistogram));
if (v == 0) {
G4cerr << "G4LizardSystem::Store> ERROR: could not create vector !" <<
G4std::endl;
return;
}
v->toAscii(aStorageID.c_str());
delete v; // don't forget this !
}
}
void G4LizardSystem::Plot(IHistogram* aHistogram){
if(!fVectorFactory) return;
if(!fPlotter) return;
if(!aHistogram) return;
if(aHistogram->dimensions()==1) {
IVector* v =
fVectorFactory->from1D(dynamic_cast<IHistogram1D*>(aHistogram));
if (v == 0) {
G4cerr << "ERROR: could not create vector !" << G4std::endl;
return;
}
fPlotter->plot(v);
fPlotter->refresh();
delete v; // don't forget this !
}
if(aHistogram->dimensions()==2) {
IVector* v =
fVectorFactory->from2D(dynamic_cast<IHistogram2D*>(aHistogram));
if (v == 0) {
G4cerr << "ERROR: could not create vector !" << G4std::endl;
return;
}
fPlotter->plot(v);
fPlotter->refresh();
delete v; // don't forget this !
}
//fPlotter->psPrint("posplot.ps");
}
#endif
+18
View File
@@ -0,0 +1,18 @@
# $Id: GNUmakefile,v 1.2 2000/09/14 12:42:32 barrand Exp $
name := G4jas
ifndef G4INSTALL
G4INSTALL = ../../..
endif
include $(G4INSTALL)/config/architecture.gmk
include $(G4INSTALL)/config/analysis.gmk
CPPFLAGS += -I$(G4BASE)/global/management/include
ifdef G4ANALYSIS_BUILD_JAS
# CPPFLAGS +=
endif
include $(G4INSTALL)/config/common.gmk
@@ -0,0 +1,42 @@
// 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: G4JasSystem.hh,v 1.8 2000/11/16 13:44:43 barrand Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Guy Barrand 14 September 2000
#ifndef G4JASSYSTEM_H
#define G4JASSYSTEM_H
#if defined(G4ANALYSIS_BUILD_JAS) || defined(G4ANALYSIS_USE_JAS)
#include "G4VAnalysisSystem.hh"
class IHistogramManager;
class JasHistogramFactory;
class G4JasSystem : public G4VAnalysisSystem {
public: // I methods :
virtual const G4String& GetName() const;
virtual IHistogramFactory* GetHistogramFactory();
//
virtual void Store(IHistogram* = 0,const G4String& = "");
virtual void Plot(IHistogram*);
public:
G4JasSystem(const G4String& name = "jas");
virtual ~G4JasSystem();
private:
G4String fName;
JasHistogramFactory* fHistogramFactory;
};
#endif
#endif
+24
View File
@@ -0,0 +1,24 @@
#ifndef JASAXIS_H
#define JASAXIS_H
#if defined(G4ANALYSIS_BUILD_JAS)
#include <IAxis.h>
class JasAxis : public IAxis {
public:
virtual ~JasAxis() {}
public:
virtual double lowerEdge() const;
virtual double upperEdge() const;
virtual int bins() const;
virtual double binLowerEdge(int) const;
virtual double binUpperEdge(int) const;
virtual double binWidth(int) const;
virtual double binCentre(int) const;
virtual int coordToIndex(double) const;
};
#endif
#endif
@@ -0,0 +1,59 @@
#ifndef JASHISTOGRAM1D_H
#define JASHISTOGRAM1D_H
#if defined(G4ANALYSIS_BUILD_JAS)
#include <IHistogram1D.h>
#include "JasAxis.h"
class JasHistogramFactory;
class JasHistogram1D : public IHistogram1D {
public: // IHistogram IMethods :
virtual std_string title() const;
virtual int dimensions() const;
virtual int entries() const;
virtual int allEntries() const;
virtual int extraEntries() const;
virtual double equivalentBinEntries() const;
virtual double sumBinHeights() const;
virtual double sumAllBinHeights() const;
virtual double sumExtraBinHeights() const;
virtual double minBinHeight() const;
virtual double maxBinHeight() const;
virtual void reset();
virtual IAnnotation* annotation();
public: // IHistogram1D IMethods :
// The fill :
virtual void fill(double,double = 1.0);
// Partition :
virtual int minBin() const;
virtual int maxBin() const;
virtual int coordToIndex(double) const;
virtual double mean() const;
virtual double rms() const;
// Bins :
virtual int binEntries(int) const;
virtual double binHeight(int) const;
virtual double binError(int) const;
// Axis :
virtual const IAxis& xAxis() const;
public:
JasHistogram1D(JasHistogramFactory *factory, const char *title);
virtual ~JasHistogram1D();
private:
jmethodID fillMethod;
jobject fJasHist;
JNIEnv* fEnv;
JasAxis fAxis;
std_string fTitle;
};
#endif
#endif
@@ -0,0 +1,67 @@
#ifndef JASHISTOGRAM2D_H
#define JASHISTOGRAM2D_H
#if defined(G4ANALYSIS_BUILD_JAS)
#include <IHistogram2D.h>
#include "JasAxis.h"
class JasHistogramFactory;
class JasHistogram2D : public IHistogram2D {
public: // IHistogram IMethods :
virtual std_string title() const;
virtual int dimensions() const;
virtual int entries() const;
virtual int allEntries() const;
virtual int extraEntries() const;
virtual double equivalentBinEntries() const;
virtual double sumBinHeights() const;
virtual double sumAllBinHeights() const;
virtual double sumExtraBinHeights() const;
virtual double minBinHeight() const;
virtual double maxBinHeight() const;
virtual void reset();
virtual IAnnotation* annotation();
public: // IHistogram2D IMethods :
virtual void fill( double x, double y, double weight = 1 );
virtual int binEntries( int indexX, int indexY ) const;
virtual int binEntriesX( int indexX ) const;
virtual int binEntriesY( int indexY ) const;
virtual double binHeight( int indexX, int indexY ) const;
virtual double binHeightX( int indexX ) const;
virtual double binHeightY( int indexY ) const;
virtual double binError( int indexX, int indexY ) const;
virtual double meanX() const;
virtual double meanY() const;
virtual double rmsX() const;
virtual double rmsY() const;
virtual int minBinX() const;
virtual int minBinY() const;
virtual int maxBinX() const;
virtual int maxBinY() const;
virtual const IAxis& xAxis() const;
virtual const IAxis& yAxis() const;
virtual int coordToIndexX( double coordX ) const;
virtual int coordToIndexY( double coordY ) const;
virtual IHistogram1D* projectionX() const;
virtual IHistogram1D* projectionY() const;
virtual IHistogram1D* sliceX( int indexY ) const;
virtual IHistogram1D* sliceY( int indexX ) const;
virtual IHistogram1D* sliceX( int indexY1, int indexY2 ) const;
virtual IHistogram1D* sliceY( int indexX1, int indexX2 ) const;
public:
JasHistogram2D(JasHistogramFactory *factory, const char *title);
virtual ~JasHistogram2D();
private:
jmethodID fillMethod;
jobject fJasHist;
JNIEnv* fEnv;
JasAxis fAxis;
std_string fTitle;
};
#endif
#endif
@@ -0,0 +1,37 @@
// JHistogramFactory.h: interface for the JHistogramFactory class.
//////////////////////////////////////////////////////////////////////
#ifndef JASHISTOGRAMFACTORY
#define JASHISTOGRAMFACTORY
#if defined(G4ANALYSIS_BUILD_JAS)
#include <jni.h>
#include <IHistogramFactory.h>
class JasHistogramFactory
: public IHistogramFactory
{
public: // IMethods :
virtual IHistogram1D* create1D(const std_string&,
int=0,double=0,double=0,
int=0);
virtual IHistogram2D* create2D(const std_string&,
int=0,double=0,double=0,
int=0,double=0,double=0,
int=0);
virtual void destroy(IHistogram*);
public:
JasHistogramFactory();
virtual ~JasHistogramFactory();
JNIEnv* getEnv();
void error(const char* message);
private:
jobject fJob;
void createJVM();
void destroyJVM();
};
#endif
#endif
+49
View File
@@ -0,0 +1,49 @@
// 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: G4JasSystem.cc,v 1.8 2000/11/16 13:44:43 barrand Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Guy Barrand 14 September 2000
#ifdef G4ANALYSIS_BUILD_JAS
#include "JasHistogramFactory.h"
#include "G4ios.hh"
#include "G4JasSystem.hh"
G4JasSystem::G4JasSystem (
const G4String& aName
)
:fName(aName)
,fHistogramFactory(0)
{
}
G4JasSystem::~G4JasSystem (
)
{
delete fHistogramFactory;
}
const G4String& G4JasSystem::GetName() const {
return fName;
}
IHistogramFactory* G4JasSystem::GetHistogramFactory() {
if(!fHistogramFactory) {
G4cout << "Activate jas analysis system" << G4std::endl;
fHistogramFactory = new JasHistogramFactory();
}
return fHistogramFactory;
}
void G4JasSystem::Store(IHistogram*,const G4String&) {
}
void G4JasSystem::Plot(IHistogram*) {
}
#endif
+15
View File
@@ -0,0 +1,15 @@
#ifdef G4ANALYSIS_BUILD_JAS
#include "JasAxis.h"
double JasAxis::lowerEdge() const {return 0;}
double JasAxis::upperEdge() const { return 0;}
int JasAxis::bins() const { return 0;}
double JasAxis::binLowerEdge(int) const { return 0;}
double JasAxis::binUpperEdge(int) const { return 0;}
double JasAxis::binWidth(int) const { return 0;}
double JasAxis::binCentre(int) const { return 0;}
int JasAxis::coordToIndex(double) const { return 0;}
#endif
+89
View File
@@ -0,0 +1,89 @@
// JasHistogram.cpp: implementation of the JasHistogram1D class.
//////////////////////////////////////////////////////////////////////
#ifdef G4ANALYSIS_BUILD_JAS
#include <jni.h>
#include <string.h>
#include <stdlib.h>
#include "JasHistogram1D.h"
#include "JasHistogramFactory.h"
JasHistogram1D::JasHistogram1D(JasHistogramFactory* factory, const char* title)
:fillMethod(NULL)
,fJasHist(NULL)
,fEnv(NULL)
{
fEnv = factory->getEnv();
if(fEnv==NULL) return;
// Create the corresponding Java histogram
jclass cls = fEnv->FindClass("hep/analysis/Histogram");
if (cls == NULL) {
factory->error("Could not create hep.analysis.Histogram");
fEnv = 0;
return;
}
jmethodID constructor =
fEnv->GetMethodID(cls, "<init>", "(Ljava/lang/String;)V");
if (constructor == NULL) {
factory->error("Could not find constructor for hep.analysis.Histogram");
fEnv = 0;
return;
}
fillMethod = fEnv->GetMethodID(cls,"fill","(D)V");
if (fillMethod == NULL) {
factory->error("Could not find fill method for hep.analysis.Histogram");
fEnv = 0;
return;
}
jstring jtitle = fEnv->NewStringUTF(title);
fJasHist = fEnv->NewObject(cls,constructor,jtitle);
}
JasHistogram1D::~JasHistogram1D()
{
if(fEnv==NULL) return;
fEnv->DeleteLocalRef(fJasHist);
}
void JasHistogram1D::fill(double value,double)
{
if(fEnv==NULL) return;
fEnv->CallVoidMethod(fJasHist,fillMethod,value);
}
// Today dummy methods....
#define IWeight double
#define ICoordinate double
#define ISize int
#define IBin int
// IHistogram :
std_string JasHistogram1D::title() const {return fTitle;}
int JasHistogram1D::dimensions() const {return 1;}
ISize JasHistogram1D::entries() const {return 0;}
ISize JasHistogram1D::allEntries() const {return 0;}
ISize JasHistogram1D::extraEntries() const {return 0;}
IWeight JasHistogram1D::equivalentBinEntries() const {return 0;}
IWeight JasHistogram1D::sumBinHeights() const {return 0;}
IWeight JasHistogram1D::sumAllBinHeights() const {return 0;}
IWeight JasHistogram1D::sumExtraBinHeights() const {return 0;}
IWeight JasHistogram1D::minBinHeight() const {return 0;}
IWeight JasHistogram1D::maxBinHeight() const {return 0;}
void JasHistogram1D::reset() {}
IAnnotation* JasHistogram1D::annotation() {return 0;}
// IHistogram1D :
IBin JasHistogram1D::minBin() const {return 0;}
IBin JasHistogram1D::maxBin() const {return 0;}
IBin JasHistogram1D::coordToIndex(ICoordinate) const {return 0;}
ICoordinate JasHistogram1D::mean() const {return 0;}
ICoordinate JasHistogram1D::rms() const {return 0;}
// Bins :
ISize JasHistogram1D::binEntries(IBin) const {return 0;}
IWeight JasHistogram1D::binHeight(IBin) const {return 0;}
IWeight JasHistogram1D::binError(IBin) const {return 0;}
const IAxis& JasHistogram1D::xAxis() const {return fAxis;}
#endif
+98
View File
@@ -0,0 +1,98 @@
// JasHistogram.cpp: implementation of the JasHistogram2D class.
//////////////////////////////////////////////////////////////////////
#ifdef G4ANALYSIS_BUILD_JAS
#include <jni.h>
#include <string.h>
#include <stdlib.h>
#include "JasHistogram2D.h"
#include "JasHistogramFactory.h"
JasHistogram2D::JasHistogram2D(JasHistogramFactory* factory, const char* title)
:fillMethod(NULL)
,fJasHist(NULL)
,fEnv(NULL)
{
fEnv = factory->getEnv();
if(fEnv==NULL) return;
// Create the corresponding Java histogram
jclass cls = fEnv->FindClass("hep/analysis/Histogram");
if (cls == NULL) {
factory->error("Could not create hep.analysis.Histogram");
fEnv = 0;
return;
}
jmethodID constructor =
fEnv->GetMethodID(cls, "<init>", "(Ljava/lang/String;)V");
if (constructor == NULL) {
factory->error("Could not find constructor for hep.analysis.Histogram");
fEnv = 0;
return;
}
fillMethod = fEnv->GetMethodID(cls,"fill","(D)V");
if (fillMethod == NULL) {
factory->error("Could not find fill method for hep.analysis.Histogram");
fEnv = 0;
return;
}
jstring jtitle = fEnv->NewStringUTF(title);
fJasHist = fEnv->NewObject(cls,constructor,jtitle);
}
JasHistogram2D::~JasHistogram2D()
{
if(fEnv==NULL) return;
fEnv->DeleteLocalRef(fJasHist);
}
void JasHistogram2D::fill(double x,double y, double w)
{
if(fEnv==NULL) return;
fEnv->CallVoidMethod(fJasHist,fillMethod,x);
}
// IHistogram :
std_string JasHistogram2D::title() const {return fTitle;}
int JasHistogram2D::dimensions() const {return 1;}
int JasHistogram2D::entries() const {return 0;}
int JasHistogram2D::allEntries() const {return 0;}
int JasHistogram2D::extraEntries() const {return 0;}
double JasHistogram2D::equivalentBinEntries() const {return 0;}
double JasHistogram2D::sumBinHeights() const {return 0;}
double JasHistogram2D::sumAllBinHeights() const {return 0;}
double JasHistogram2D::sumExtraBinHeights() const {return 0;}
double JasHistogram2D::minBinHeight() const {return 0;}
double JasHistogram2D::maxBinHeight() const {return 0;}
void JasHistogram2D::reset() {}
IAnnotation* JasHistogram2D::annotation() {return 0;}
// IHistogram2D :
int JasHistogram2D::binEntries( int indexX, int indexY ) const {return 0;}
int JasHistogram2D::binEntriesX( int indexX ) const {return 0;}
int JasHistogram2D::binEntriesY( int indexY ) const {return 0;}
double JasHistogram2D::binHeight( int indexX, int indexY ) const {return 0;}
double JasHistogram2D::binHeightX( int indexX ) const {return 0;}
double JasHistogram2D::binHeightY( int indexY ) const {return 0;}
double JasHistogram2D::binError( int indexX, int indexY ) const {return 0;}
double JasHistogram2D::meanX() const {return 0;}
double JasHistogram2D::meanY() const {return 0;}
double JasHistogram2D::rmsX() const {return 0;}
double JasHistogram2D::rmsY() const {return 0;}
int JasHistogram2D::minBinX() const {return 0;}
int JasHistogram2D::minBinY() const {return 0;}
int JasHistogram2D::maxBinX() const {return 0;}
int JasHistogram2D::maxBinY() const {return 0;}
const IAxis& JasHistogram2D::xAxis() const {return fAxis;}
const IAxis& JasHistogram2D::yAxis() const {return fAxis;}
int JasHistogram2D::coordToIndexX( double coordX ) const {return 0;}
int JasHistogram2D::coordToIndexY( double coordY ) const {return 0;}
IHistogram1D* JasHistogram2D::projectionX() const {return 0;}
IHistogram1D* JasHistogram2D::projectionY() const {return 0;}
IHistogram1D* JasHistogram2D::sliceX( int indexY ) const {return 0;}
IHistogram1D* JasHistogram2D::sliceY( int indexX ) const {return 0;}
IHistogram1D* JasHistogram2D::sliceX( int indexY1, int indexY2 ) const {return 0;}
IHistogram1D* JasHistogram2D::sliceY( int indexX1, int indexX2 ) const {return 0;}
#endif
@@ -0,0 +1,119 @@
// JasHistogramFactory.cpp: implementation of the JasHistogramFactory class.
//
//////////////////////////////////////////////////////////////////////
#ifdef G4ANALYSIS_BUILD_JAS
#include <jni.h>
#include <string.h>
#include <stdlib.h>
#include "G4ios.hh"
#include "JasHistogramFactory.h"
#include "JasHistogram1D.h"
static JNIEnv* env = 0;
static JavaVM* jvm = 0;
JasHistogramFactory::JasHistogramFactory()
:fJob(NULL)
{
createJVM();
if(env==NULL) return;
const char* title = "G4Job";
// Create a Job to encapsulate the histograms
jclass cls = env->FindClass("jas/server/HistogramServer");
if (cls == NULL) {
error("Could not find class jas.server.HistogramServer");
return;
}
jmethodID constructor =
env->GetMethodID(cls,"<init>","(Ljava/lang/String;)V");
if (constructor == NULL) {
error("Could not find constructor");
return;
}
jstring jtitle = env->NewStringUTF(title);
fJob = env->NewObject(cls,constructor,jtitle);
if (fJob == NULL) {
error("Could not create job");
return;
}
}
JasHistogramFactory::~JasHistogramFactory()
{
destroyJVM();
}
IHistogram1D* JasHistogramFactory::create1D(
const std_string& name
,int,double,double
,int
)
{
return new JasHistogram1D(this,name.c_str());
}
IHistogram2D* JasHistogramFactory::create2D(
const std_string& name
,int,double,double
,int,double,double
,int
)
{
return 0;
}
void JasHistogramFactory::error(const char* msg)
{
G4cerr << "G4 JasHistogramFactory : Error: " << msg << G4std::endl;
//exit(1);
}
JNIEnv* JasHistogramFactory::getEnv()
{
return env;
}
void JasHistogramFactory::createJVM()
{
JavaVMInitArgs vm_args;
JavaVMOption options[2];
char* cp = getenv("CLASSPATH");
if(cp==NULL) {
error("env variable CLASSPATH not setted");
return;
}
//char* cp ="c:\\program files\\java analysis studio\\lib\\hep.jar";
char* opt = new char[strlen(cp)+100];
strcpy(opt,"-Djava.class.path=");
strcat(opt,cp);
G4cout << "cp=" << opt <<G4std::endl;
options[0].optionString = opt;
options[1].optionString = "-verbose";
vm_args.version = JNI_VERSION_1_2;
vm_args.options = options;
vm_args.nOptions = 1;
vm_args.ignoreUnrecognized = 1;
int rc = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args);
delete [] opt;
if (rc < 0) {
error("Failed to create Java VM");
return;
}
}
void JasHistogramFactory::destroy(IHistogram*){}
void JasHistogramFactory::destroyJVM()
{
if(jvm) jvm->DestroyJavaVM();
jvm = 0;
env = 0;
fJob = 0;
}
#endif
+18
View File
@@ -0,0 +1,18 @@
# $Id: GNUmakefile,v 1.1.1.1 2000/06/21 12:36:24 barrand Exp $
# -------------------------------------------------------------
# GNUmakefile for visualization library. John Allison, 5/7/95.
name := G4analysis_management
ifndef G4INSTALL
G4INSTALL = ../../..
endif
include $(G4INSTALL)/config/architecture.gmk
include $(G4INSTALL)/config/analysis.gmk
G4TMPDIR = $(G4TMP)/$(G4SYSTEM)/$(name)
CPPFLAGS += -I$(G4BASE)/global/management/include
include $(G4INSTALL)/config/common.gmk
@@ -0,0 +1,53 @@
// 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: G4AnalysisManager.hh,v 1.8 2000/11/16 13:44:45 barrand Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Guy Barrand 20th Mai 2000
//
// Class description
//
// Base class for the analysis manager proxy mechanism.
//
#ifndef G4ANALYSIS_HH
#define G4ANALYSIS_HH
#if defined(G4ANALYSIS_BUILD) || defined(G4ANALYSIS_USE)
#include "globals.hh"
#include "g4std/vector"
#include "G4VAnalysisManager.hh"
class G4AnalysisManager : public G4VAnalysisManager {
public: // I methods :
G4bool RegisterAnalysisSystem(G4VAnalysisSystem*);
IHistogramFactory* GetHistogramFactory(const G4String&);
//
virtual void Store(IHistogram* = 0,const G4String& = "");
virtual void Plot(IHistogram*);
public:
G4AnalysisManager();
virtual ~G4AnalysisManager();
private:
G4VAnalysisSystem* FindSystem(const G4String&);
G4std::vector<G4VAnalysisSystem*> fSystems;
G4VAnalysisSystem* fCurrentSystem;
//
#ifdef G4ANALYSIS_NON_AIDA
public:
ICloudFactory* GetCloudFactory(const G4String&);
virtual void Plot(ICloud*);
ITuple* CreateTuple(const G4String&,const G4String&,const G4String&);
#endif
};
#endif
#endif
@@ -0,0 +1,57 @@
// 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: G4VAnalysisManager.hh,v 1.5 2000/11/16 13:44:46 barrand Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// Guy Barrand 20th Mai 2000
//
// Class description
//
// Abstract base class for the analysis manager proxy mechanism.
//
#ifndef G4VANALYSIS_HH
#define G4VANALYSIS_HH
#if defined(G4ANALYSIS_BUILD) || defined(G4ANALYSIS_USE)
#include "globals.hh"
class IHistogram;
class IHistogramFactory;
#ifdef G4ANALYSIS_NON_AIDA
class ICloudFactory;
class ICloud;
class ITuple;
#endif
class G4VAnalysisSystem;
class G4VAnalysisManager {
public:
virtual ~G4VAnalysisManager() {}
virtual G4bool RegisterAnalysisSystem(G4VAnalysisSystem*) = 0;
//
// Get the factories :
virtual IHistogramFactory* GetHistogramFactory(const G4String&) = 0;
//
// Access to facilites methods :
virtual void Store(IHistogram* = 0,const G4String& = "") = 0;
virtual void Plot(IHistogram*) = 0;
//
#ifdef G4ANALYSIS_NON_AIDA
virtual ICloudFactory* GetCloudFactory(const G4String&) = 0;
virtual ITuple* CreateTuple(const G4String&,const G4String&,const G4String&) = 0;
virtual void Plot(ICloud*) = 0;
#endif
};
#endif
#endif
@@ -0,0 +1,47 @@
// 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: G4VAnalysisSystem.hh,v 1.8 2000/11/16 13:44:46 barrand Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
#ifndef G4VANALYSISSYSTEM_HH
#define G4VANALYSISSYSTEM_HH
#ifdef G4ANALYSIS_BUILD
#include "g4rw/cstring.h"
class IHistogram;
class IHistogramFactory;
#ifdef G4ANALYSIS_NON_AIDA
class ICloudFactory;
class ICloud;
class ITuple;
#endif
class G4VAnalysisSystem {
public:
virtual ~G4VAnalysisSystem() {}
virtual const G4String& GetName() const = 0;
virtual IHistogramFactory* GetHistogramFactory() = 0;
//
virtual void Store(IHistogram* = 0,const G4String& = "") = 0;
virtual void Plot(IHistogram*) = 0;
//
#ifdef G4ANALYSIS_NON_AIDA
virtual ICloudFactory* GetCloudFactory() = 0;
virtual void Plot(ICloud*) = 0;
virtual ITuple* CreateTuple(const G4String&,const G4String&) = 0;
#endif
};
#endif
#endif
@@ -0,0 +1,105 @@
// 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: G4AnalysisManager.cc,v 1.10 2000/11/21 15:41:25 barrand Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// Guy Barrand 20th Mai 2000
//
// Class description
//
// This class is a plug-in for various analysis systems
// that follow the AIDA/Histogramming conventions.
//
#ifdef G4ANALYSIS_BUILD
#include "globals.hh"
#include "G4ios.hh"
#include "G4VAnalysisSystem.hh"
#include "G4AnalysisManager.hh"
G4AnalysisManager::G4AnalysisManager(){}
G4AnalysisManager::~G4AnalysisManager(){
int number = fSystems.size();
for(int count=0;count<number;count++) {
delete fSystems[count];
}
}
G4bool G4AnalysisManager::RegisterAnalysisSystem(
G4VAnalysisSystem* aSystem
){
fSystems.push_back(aSystem);
return true;
}
G4VAnalysisSystem* G4AnalysisManager::FindSystem(const G4String& aName) {
int number = fSystems.size();
for(int count=0;count<number;count++) {
if(aName==fSystems[count]->GetName()) return fSystems[count];
}
return 0;
}
IHistogramFactory* G4AnalysisManager::GetHistogramFactory(
const G4String& aSystem
){
G4VAnalysisSystem* analysisSystem = FindSystem(aSystem);
if(!analysisSystem) {
G4cerr << "G4AnalysisManager : " << G4std::endl;
G4cerr << " " << aSystem << " unknown analysis system." << G4std::endl;
return 0;
}
// Set it as current system.
fCurrentSystem = analysisSystem;
return analysisSystem->GetHistogramFactory();
}
void G4AnalysisManager::Store(IHistogram* aHistogram,const G4String& aSID){
if(!fCurrentSystem) return;
fCurrentSystem->Store(aHistogram,aSID);
}
void G4AnalysisManager::Plot(IHistogram* aHistogram){
if(!fCurrentSystem) return;
fCurrentSystem->Plot(aHistogram);
}
// Non AIDA things :
#ifdef G4ANALYSIS_NON_AIDA
ITuple* G4AnalysisManager::CreateTuple(
const G4String& aSystem
,const G4String& aStorage
,const G4String& aSID
){
G4VAnalysisSystem* analysisSystem = FindSystem(aSystem);
if(!analysisSystem) {
G4cerr << "G4AnalysisManager : " << G4std::endl;
G4cerr << " " << aSystem << " unknown analysis system." << G4std::endl;
return 0;
}
// Set it as current system.
fCurrentSystem = analysisSystem;
return analysisSystem->CreateTuple(aStorage,aSID);
}
ICloudFactory* G4AnalysisManager::GetCloudFactory(
const G4String& aSystem
){
G4VAnalysisSystem* analysisSystem = FindSystem(aSystem);
if(!analysisSystem) {
G4cerr << "G4AnalysisManager : " << G4std::endl;
G4cerr << " " << aSystem << " unknown analysis system." << G4std::endl;
return 0;
}
// Set it as current system.
fCurrentSystem = analysisSystem;
return analysisSystem->GetCloudFactory();
}
void G4AnalysisManager::Plot(ICloud* aCloud){
if(!fCurrentSystem) return;
fCurrentSystem->Plot(aCloud);
}
#endif
#endif
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HCtable.hh,v 1.2.2.1.2.1 1999/12/07 20:47:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4HCtable_H
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SDManager.hh,v 1.2.4.1 1999/12/07 20:47:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4SDManager_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SDStructure.hh,v 1.2.2.1.2.1 1999/12/07 20:47:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4SDStructure_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SDmessenger.hh,v 1.2.4.1 1999/12/07 20:47:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4SDmessenger_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SensitiveVolumeList.hh,v 1.2.2.1.2.1 1999/12/07 20:47:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file --- Copyright CERN 1996
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SensitiveVolumeList.icc,v 1.1.8.1.2.1 1999/12/07 20:47:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// -----------------------------------------------------------
// Inline functions of GEANT 4 class header file.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VReadOutGeometry.hh,v 1.1.10.1 1999/12/07 20:47:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VSensitiveDetector.hh,v 1.2.2.1.2.1 1999/12/07 20:47:43 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4VSensitiveDetector_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HCtable.cc,v 1.1.8.1.2.1 1999/12/07 20:47:44 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4HCtable.hh"
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SDManager.cc,v 1.1.10.1.2.1 1999/12/08 17:33:16 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4SDManager.hh"
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SDStructure.cc,v 1.1.8.1.2.1.2.1 1999/12/08 17:33:17 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// G4SDStructure
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SDmessenger.cc,v 1.1.10.1 1999/12/07 20:47:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ---------------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4SensitiveVolumeList.cc,v 1.1.10.1 1999/12/07 20:47:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VReadOutGeometry.cc,v 1.2.6.1 1999/12/07 20:47:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4VReadOutGeometry.hh"
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VSensitiveDetector.cc,v 1.1.8.1.2.1 1999/12/07 20:47:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// G4VSensitiveDetector
#include "G4VSensitiveDetector.hh"
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4DCofThisEvent.hh,v 1.2.2.1.2.1 1999/12/07 20:47:46 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4DCofThisEvent_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4TDigiCollection.hh,v 1.5.2.1.2.1 1999/12/07 20:47:46 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4TDigiCollection_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VDigi.hh,v 1.4.4.1 1999/12/07 20:47:46 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4VDigi_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VDigiCollection.hh,v 1.4.4.1 1999/12/07 20:47:46 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4VDigiCollection_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4DCofThisEvent.cc,v 1.1.8.1.2.1 1999/12/07 20:47:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4DCofThisEvent.hh"
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4TDigiCollection.cc,v 1.1.10.1 1999/12/07 20:47:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4TDigiCollection.hh"
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VDigi.cc,v 1.3.4.1 1999/12/07 20:47:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// G4VDigi
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VDigiCollection.cc,v 1.3.4.1 1999/12/07 20:47:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// G4VDigiCollection
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HCofThisEvent.hh,v 1.2.2.1.2.1 1999/12/07 20:47:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4HCofThisEvent_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4THitsCollection.hh,v 1.4.2.1.2.1 1999/12/07 20:47:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4THitsCollection_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VHit.hh,v 1.3.4.1 1999/12/07 20:47:48 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4VHit_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VHitsCollection.hh,v 1.3.4.1 1999/12/07 20:47:48 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4VHitsCollection_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HCofThisEvent.cc,v 1.1.8.1.2.1 1999/12/07 20:47:48 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4HCofThisEvent.hh"
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4THitsCollection.cc,v 1.1.10.1 1999/12/07 20:47:48 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4THitsCollection.hh"
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VHit.cc,v 1.1.10.1 1999/12/07 20:47:48 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// G4VHit
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VHitsCollection.cc,v 1.1.10.1 1999/12/07 20:47:49 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// G4VHitsCollection
+2 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.2 1999/10/04 18:58:33 johna Exp $
# $Id: GNUmakefile,v 1.3 2000/10/31 10:34:39 flei Exp $
# ------------------------------------------------------------
# GNUmakefile for events library. Makoto Asai, 5/9/95.
# ------------------------------------------------------------
@@ -15,6 +15,7 @@ CPPFLAGS += \
-I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPRandom/include \
-I$(G4BASE)/global/HEPGeometry/include \
-I$(G4BASE)/global/HEPNumerics/include \
-I$(G4BASE)/track/include \
-I$(G4BASE)/tracking/include \
-I$(G4BASE)/processes/management/include \
+49 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.9 2000/01/26 06:42:14 asaim Exp $
$Id: History,v 1.16 2000/11/20 15:39:53 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,54 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Nov 20 2000, G.Cosmo (event-V02-00-04)
- Removed data-logs from test directory.
Nov 13 2000, M.Asai (event-V02-00-03)
Nov 10 2000, F.Lei
- Adding src and include sub-directory and files to test/GeneralParticleSource
- Improving the speed in G4GeneralParticleSource::GenerateIsotropicFlux() and
G4GeneralParticleSource::GenerateCoslawFlux()
- some bug fixing:
i) dclared ' G4int count' in all ****Interpolation functions
ii) added ' return (0.) ' to GenerateUserDefTheta and GenerateUserDefPhi
as default.
iii) changed
#include <iostream.h>
to #include "g4std/fstream"
in G4GeneralParicleSourceMessenger.cc
Nov 9 2000, M.Asai (tag event-V02-00-02)
- Adding /source/event/test and GeneralParticleSource sub-directory.
Oct 31 2000, F.Lei
G4GeneralParticleSource:
G4GeneralParticleSourceMessenger:
G4GeneralParticleSource is an alternative primary source
generator to G4ParticleGun. It has all the functions of
G4ParticleGun plus many options for specifing the primary
event particle and vertex.
- added -I$(G4BASE)/global/HEPNumerics/include \
to GNUMakefile
Oct 19 2000, M.Asai (tag event-V02-00-01)
G4ParticleGun : Add Set/GetParticleCharge methods for ions.
G4ParticleGunMessenger : Add new command of /gun/ion
: Modify command of /gun/particle
G4PrimaryParticle : Add Set/GetCharge methods
: Add weight
G4PrimaryVertex : Add weight
G4PrimaryTransformer : Use G4PrimaryParticle::GetCharge to give dynamic charge
in G4DynamicParticle
: Set weight of G4Track
July 22 2000, M.Asai (tag event-V02-00-00)
- Adding some new Set methods to G4PrimaryVertex and G4PrimaryParticle
classes.
Jan 26, 00, M.Asai (tag event-V01-00-01)
- Corrections for trajectories of suspended tracks
- This tag requires tracking-V01-00-01
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4ClassificationOfNewTrack.hh,v 1.3 1999/12/15 14:49:38 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4EvManMessenger.hh,v 1.3 1999/12/15 14:49:38 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4EvManMessenger_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4Event.hh,v 1.3 1999/12/15 14:49:38 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4Event_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4EventManager.hh,v 1.5 2000/01/12 01:29:50 asaim Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -0,0 +1,616 @@
///////////////////////////////////////////////////////////////////////////////
//
// MODULE: G4GeneralParticleSource.hh
//
// Version: 1.1
// Date: 18/10/00
// Author: C Ferguson, F Lei & P Truscott
// Organisation: University of Southampton / DERA
// Customer: ESA/ESTEC
//
///////////////////////////////////////////////////////////////////////////////
//
// DESCRIPTION
// -----------
// The General Particle Source is designed to extend the functionality of the
// G4ParticleGun class. It is designed to allow specification of input
// particles in terms of position, direction (or angular) and energy
// distributions. This class is derived from G4VPrimaryGenerator.
//
///////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
//
// Version 1.0, 28 February 2000, C Ferguson, Created.
//
// Version 1.1, 18 October 2000, Modified to inherit from G4VPrimaryGenerator.
// New name at the request of M. Asai.
//
///////////////////////////////////////////////////////////////////////////////
//
// MEMBER FUNCTIONS
// ----------------
//
// G4GeneralParticleSource ()
// Constructor: Initializes variables and instantiates the
// Messenger and Navigator classes
//
// ~G4GeneralParticleSource ()
// Destructor: deletes Messenger and prints out run information.
//
// void GeneratePrimaryVertex(G4Event *evt)
// Generate the particles initial parameters.
//
// void SetPosDisType(G4String)
// Allows user to choose Point, Plane, Surface or Volume source
// position distributions.
//
// void SetPosDisShape(G4String)
// Allows the user to choose the particular shape they wish for the
// position distribution. Choices are Square, Circle, Ellipse, Rectangle,
// Sphere, Ellipsoid, Cylinder, Parallelepiped.
//
// void SetCentreCoords(G4ThreeVector)
// Sets the co-ordinates of the centre of the position distribution.
//
// void SetPosRot1(G4ThreeVector)
// Used to specify the co-ordinate system for the position distribution
// along with SetPosRot2. SetPosRot1 sets the vector x' and need not be
// a unit vector.
//
// void SetPosRot2(G4ThreeVector)
// Used in connection with SetPosRot1. This sets a vector in the plane
// x'y'. By a series of cross products x', y', z' are generated. Again
// need not be a unit vector.
//
// void SetHalfX(G4double)
// Sets the half length in x.
//
// void SetHalfY(G4double)
// Sets the half length in y.
//
// void SetHalfZ(G4double)
// Sets the half length in z.
//
// void SetRadius(G4double)
// Sets the radius where appropriate for source distribution shapes.
//
// void SetRadius0(G4double)
// Sets the inner radius where appropriate for source distribution shapes.
//
// void SetParAlpha(G4double)
// Sets the angle Alpha in the Parallelepiped shapes.
//
// void SetParTheta(G4double)
// Sets the angle Theta in the Parallelepiped shapes.
//
// void SetParPhi(G4double)
// Sets the angle Phi in the Parallelepiped shapes.
//
// void ConfineSourceToVolume(G4String)
// Used to confine the start positions to a particular volume.
//
// void GenerateRotationMatrices()
// This is used to calculate the cross products and determine the
// vectors x', y', z' for the position distribution.
//
// void GeneratePointSource()
// Generates a point source.
//
// void GeneratePointsInPlane()
// Generates starting positions confined to a plane source.
//
// void GeneratePointsOnSurface()
// Generates starting positions confined to the surface of a shape.
//
// void GeneratePointsInVolume()
// Generates starting positions within the volume of a shape.
//
// G4bool IsSourceConfined()
// Checks the source is confined to the requested volume.
//
// Angular Distribution Methods:
//
// void SetAngDistType(G4String)
// Used to set the type of angular distribution wanted. Arguments
// are iso, cos and user for isotropic, cosine-law and user-defined
// respectively.
//
// void DefineAngRefAxes(G4String, G4ThreeVector)
// DefineAngRefAxes is used in a similar way as SetPosRot to
// define vectors, one x' and one in the plane x'y', to create
// a rotated set of axes for the angular distribution.
//
// void SetMinTheta(G4double)
// Sets the minimum value for the angle theta.
//
// void SetMinPhi(G4double)
// Sets the minimum value for phi.
//
// void SetMaxTheta(G4double)
// Sets the maximum value for theta.
//
// void SetMaxPhi(G4double)
// Sets the maximum value for phi.
//
// void UserDefAngTheta(G4ThreeVector)
// This method allows the user to define a histogram in Theta.
//
// void UserDefAngPhi(G4ThreeVector)
// This method allows the user to define a histogram in phi.
//
// void GenerateIsotropicFlux()
// This method generates momentum vectors for particles according
// to an isotropic distribution.
//
// void GenerateCosineLawFlux()
// This method generates momentum vectors for particles according
// to a cosine-law distribution.
//
// void GenerateUserDefFlux()
// Controls generation of momentum vectors according to user-defined
// distributions.
//
// G4double GenerateUserDefTheta()
// Generates the theta angle according to a user-defined distribution.
//
// G4double GenerateUserDefPhi()
// Generates phi according to a user-defined distribution.
//
// void SetUserWRTSurface(G4bool)
// Allows user to have user-defined spectra either with respect to the
// co-ordinate system (default) or with respect to the surface normal.
//
// Energy Distribution methods:
//
// void SetEnergyDisType(G4String)
// Allows the user to choose the energy distribution type. The arguments
// are Mono (mono-energetic), Lin (linear), Pow (power-law), Exp
// (exponential), Brem (bremsstrahlung), BBody (black-body), Cdg
// (cosmic diffuse gamma-ray), User (user-defined), Arb (arbitrary
// point-wise), Epn (energy per nucleon).
//
// void SetEmin(G4double)
// Sets the minimum energy.
//
// void SetEmax(G4double)
// Sets the maximum energy.
//
// void SetMonoEnergy(G4double)
// Sets energy for mono-energetic distribution.
//
// void SetAlpha(G4double)
// Sets alpha for a power-law distribution.
//
// void SetTemp(G4double)
// Sets Temperature for a Brem or BBody distributions.
//
// void SetEzero(G4double)
// Sets Ezero for an exponential distribution.
//
// void SetGradient(G4double)
// Sets gradient for a linear distribution.
//
// void SetInterCept(G4double)
// Sets intercept for a linear distribution.
//
// void UserEnergyHisto(G4ThreeVector)
// Allows user to defined a histogram for the energy distribution.
//
// void ArbEnergyHisto(G4ThreeVector)
// Allows the user to define an Arbitrary set of points for the
// energy distribution.
//
// void EpnEnergyHisto(G4ThreeVector)
// Allows the user to define an Energy per nucleon histogram.
//
// void Calculate()
// Controls the calculation of Integral PDF for the Cdg and BBody
// distributions.
//
// void CalculateCdgSpectrum()
// Calculates the integral PDF for the Cdg distribution.
//
// void CalculateBbodySpectrum()
// Calculates the Integral PDF for the Bbody distribution.
//
// void InputEnergySpectra(G4bool)
// Allows the user to choose between momentum and energy histograms
// for user-defined histograms and arbitrary point-wise spectr.
// The default is true (energy).
//
// void InputDifferentialSpectra(G4bool)
// Allows the user to choose between integral and differential
// distributions when using the arbitrary point-wise option.
//
// void ArbInterpolate(G4String)
// ArbInterpolate allows the user to specify the type of function to
// interpolate the Arbitrary points spectrum with.
//
// void LinearInterpolation()
// Interpolates arbitrary points with a series of line segments.
//
// void LogInterpolation()
// Interpolates arbitrary points with a series of power-laws.
//
// void ExpInterpolation()
// Interpolates arbitrary points with a series of exponentials.
//
// void SplineInterpolation()
// Interpolates arbitrary points using cubic splines.
//
// void GenerateMonoEnergetic()
// Generates a mono-energetic source.
//
// void GenerateLinearEnergies()
// Generates particle energies according to a linear distribution.
//
// void GeneratePowEnergies()
// Generates particle energies according to a power-law distribution.
//
// void GenerateExpEnergies()
// Generates particle energies according to an exponential distribution.
//
// void GenerateBremEnergies()
// Generates particle energies according to a bremsstrahlung distribution.
//
// void GenerateBbodyEnergies()
// Generates particle energies according to a black-body distribution.
//
// void GenerateCdgEnergies()
// Generates particle energies according to a Cdg distribution.
//
// void GenUserHistEnergies()
// Generates particle energies according to a user-defined distribution.
//
// void GenEpnHistEnergies()
// Generates particle energies according to a energy per nucleon
// distribution.
//
// void GenArbPointEnergies()
// Generates particle energies according to an arbitrary point-wise
// spectrum.
//
// void ConvertEPNToEnergy()
// Converts energy per nucleon histograms to energy histograms.
//
// Biasing Methods:
//
// void SetXBias(G4ThreeVector)
// Allows the user to re-distribute the random
// numbers used to generate x co-ordinates.
//
// void SetYBias(G4ThreeVector)
// Allows the user to re-distribute the random
// numbers used to generate y co-ordinates.
//
// void SetZBias(G4ThreeVector)
// Allows the user to re-distribute the random
// numbers used to generate z co-ordinates.
//
// void SetThetaBias(G4ThreeVector)
// Allows the user to re-distribute the random
// numbers used to generate values of theta.
//
// void SetPhiBias(G4ThreeVector)
// Allows the user to re-distribute the random
// numbers used to generate values of phi.
//
// void SetEnergyBias(G4ThreeVector)
// Allows the user to re-distribute the random
// numbers used to generate the energies.
//
// G4double GenRandX()
// Generates the random number for x, with or without biasing.
//
// G4double GenRandY()
// Generates the random number for y, with or without biasing.
//
// G4double GenRandZ()
// Generates the random number for z, with or without biasing.
//
// G4double GenRandTheta()
// Generates the random number for theta, with or without biasing.
//
// G4double GenRandPhi()
// Generates the random number for phi, with or without biasing.
//
// G4double GenRandEnergy()
// Generates the random number for energy, with or without biasing.
//
// void SetVerbosity(G4int)
// Sets the verbosity level.
//
///////////////////////////////////////////////////////////////////////////////
//
#include "G4VPrimaryGenerator.hh"
#include "G4Navigator.hh"
#include "G4PhysicsOrderedFreeVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4ParticleDefinition.hh"
#include "G4DataInterpolation.hh"
#include "G4GeneralParticleSourceMessenger.hh"
class G4GeneralParticleSource : public G4VPrimaryGenerator
{
public:
G4GeneralParticleSource ();
~G4GeneralParticleSource ();
void GeneratePrimaryVertex(G4Event *evt);
// methods to create source position dist.
void SetPosDisType(G4String); // Point, Plane, Surface, Volume
inline G4String GetPosDisType()
{ return SourcePosType; }
void SetPosDisShape(G4String);
inline G4String GetPosDisShape()
{ return Shape; }
// SetPosDisShape - Square, Circle, Annulus, Ellipse, Rectangle, Sphere,
// Ellipsoid, Cylinder, Right (parallelepiped).
void SetCentreCoords(G4ThreeVector);
inline G4ThreeVector GetCentreCoords()
{ return CentreCoords; }
void SetPosRot1(G4ThreeVector);
void SetPosRot2(G4ThreeVector);
void SetHalfX(G4double);
inline G4double GetHalfX()
{ return halfx; }
void SetHalfY(G4double);
inline G4double GetHalfY()
{ return halfy; }
void SetHalfZ(G4double);
inline G4double GetHalfZ()
{ return halfz; }
void SetRadius(G4double);
inline G4double GetRadius()
{ return Radius; }
void SetRadius0(G4double);
void SetParAlpha(G4double);
void SetParTheta(G4double);
void SetParPhi(G4double);
void ConfineSourceToVolume(G4String);
void GenerateRotationMatrices();
// the following routines generate the source position
void GeneratePointSource();
void GeneratePointsInPlane();
void GeneratePointsOnSurface();
void GeneratePointsInVolume();
G4bool IsSourceConfined();
// Angular Distribution Methods
void SetAngDistType(G4String);
void DefineAngRefAxes(G4String, G4ThreeVector);
void SetMinTheta(G4double);
void SetMinPhi(G4double);
void SetMaxTheta(G4double);
void SetMaxPhi(G4double);
void UserDefAngTheta(G4ThreeVector);
void UserDefAngPhi(G4ThreeVector);
// These methods generate the momentum vectors for the particles.
void GenerateIsotropicFlux();
void GenerateCosineLawFlux();
void GenerateUserDefFlux();
G4double GenerateUserDefTheta();
G4double GenerateUserDefPhi();
void SetUserWRTSurface(G4bool);
// Energy Distribution methods
void SetEnergyDisType(G4String);
inline G4String GetEnergyDisType()
{return EnergyDisType;}
void SetEmin(G4double);
inline G4double GetEmin()
{return Emin;}
inline G4double GetArbEmin()
{return ArbEmin;}
void SetEmax(G4double);
inline G4double GetEmax()
{return Emax;}
inline G4double GetArbEmax()
{return ArbEmax;}
void SetMonoEnergy(G4double);
void SetAlpha(G4double);
void SetTemp(G4double);
void SetEzero(G4double);
void SetGradient(G4double);
void SetInterCept(G4double);
void UserEnergyHisto(G4ThreeVector);
void ArbEnergyHisto(G4ThreeVector);
void EpnEnergyHisto(G4ThreeVector);
void Calculate();
void CalculateCdgSpectrum();
void CalculateBbodySpectrum();
void InputEnergySpectra(G4bool);
void InputDifferentialSpectra(G4bool);
void ArbInterpolate(G4String);
inline G4String GetIntType()
{return IntType;}
void LinearInterpolation();
void LogInterpolation();
void ExpInterpolation();
void SplineInterpolation();
// The following methods generate energies according to the spectral
// parameters defined above.
void GenerateMonoEnergetic();
void GenerateLinearEnergies();
void GeneratePowEnergies();
void GenerateExpEnergies();
void GenerateBremEnergies();
void GenerateBbodyEnergies();
void GenerateCdgEnergies();
void GenUserHistEnergies();
void GenEpnHistEnergies();
void GenArbPointEnergies();
// converts energy per nucleon to energy.
void ConvertEPNToEnergy();
// Biasing Methods
void SetXBias(G4ThreeVector);
void SetYBias(G4ThreeVector);
void SetZBias(G4ThreeVector);
void SetThetaBias(G4ThreeVector);
void SetPhiBias(G4ThreeVector);
void SetEnergyBias(G4ThreeVector);
G4double GenRandX();
G4double GenRandY();
G4double GenRandZ();
G4double GenRandTheta();
G4double GenRandPhi();
G4double GenRandEnergy();
// Set the verbosity level.
void SetVerbosity(G4int);
// Set the particle species
void SetParticleDefinition (G4ParticleDefinition * aParticleDefinition);
inline G4ParticleDefinition * GetParticleDefinition ()
{return particle_definition;}
// SR1.3 - allowing user to define an isotope by A,Z,energy.
// void SetNucleus(Nucleus theIon1); // Sets the isotope.
//inline Nucleus GetNucleus() {return theIon;} // Returns the isotope.
inline void SetParticleCharge(G4double aCharge)
{ particle_charge = aCharge; }
// Set polarization
inline void SetParticlePolarization (G4ThreeVector aVal)
{particle_polarization = aVal;}
inline G4ThreeVector GetParticlePolarization ()
{return particle_polarization;}
// Set Time.
inline void SetParticleTime(G4double aTime)
{ particle_time = aTime; }
inline G4double GetParticleTime()
{ return particle_time; }
inline void SetNumberOfParticles(G4int i)
{ NumberOfParticlesToBeGenerated = i; }
inline G4int GetNumberOfParticles()
{ return NumberOfParticlesToBeGenerated; }
inline G4ThreeVector GetParticlePosition()
{ return particle_position;}
inline G4ThreeVector GetParticleMomentumDirection()
{ return particle_momentum_direction;}
inline G4double GetTheta()
{ return Theta;}
inline G4double GetPhi()
{ return Phi;}
inline G4double GetParticleEnergy()
{return particle_energy;}
private:
// Position distribution Variables
G4String SourcePosType; //Point,Plane,Surface,Volume
G4String Shape; //Circle,Square,Rectangle etc..
G4double halfx, halfy, halfz; //half lengths
G4double Radius; //Radius for circles or spheres
G4double Radius0; // The inner radius of an annulus
G4ThreeVector CentreCoords; // Coords of centre of input shape
G4ThreeVector Rotx, Roty, Rotz; // Unit vectors defining rotation matrix
G4double ParAlpha, ParTheta, ParPhi; //Angle for Right Parallellepipeds
G4bool Confine; //If true confines source distribution to VolName
G4String VolName;
G4ThreeVector SideRefVec1,SideRefVec2,SideRefVec3; //Side rotation matrices
// Angular distribution variables.
G4String AngDistType; // String to hold Ang dist type iso, cos, user
G4ThreeVector AngRef1, AngRef2, AngRef3; // Reference axes for ang dist
G4double MinTheta, MaxTheta, MinPhi, MaxPhi; // min/max theta/phi
G4double Theta, Phi; // Store these for use with DEBUG
G4bool IPDFThetaExist, IPDFPhiExist; // tell whether IPDF histos exist
G4PhysicsOrderedFreeVector UDefThetaH; // Theta histo data
G4PhysicsOrderedFreeVector IPDFThetaH; //Cumulative Theta histogram.
G4PhysicsOrderedFreeVector UDefPhiH; // Phi histo bins
G4PhysicsOrderedFreeVector IPDFPhiH; // Cumulative phi histogram.
G4String UserDistType; //String to hold user distributions
G4bool UserWRTSurface; // G4bool to tell whether user wants distribution wrt
// surface normals or co-ordinate system
// Energy Distribution variables
G4String EnergyDisType; // energy dis type Variable - Mono,Lin,Exp,etc
G4double MonoEnergy; //Mono-energteic energy
G4double Emin, Emax; // emin and emax
G4double alpha, Ezero, Temp; // alpha (pow), E0 (exp) and Temp (bbody,brem)
G4double grad, cept; // gradient and intercept for linear spectra
G4bool EnergySpec; // true - energy spectra, false - momentum spectra
G4bool DiffSpec; // true - differential spec, false integral spec
G4bool ApplyRig; // false no rigidity cutoff, true then apply one
G4double ERig; // energy of rigidity cutoff
G4PhysicsOrderedFreeVector UDefEnergyH; // energy hist data
G4PhysicsOrderedFreeVector IPDFEnergyH;
G4bool IPDFEnergyExist, IPDFArbExist, Epnflag;
G4PhysicsOrderedFreeVector ArbEnergyH; // Arb x,y histogram
G4PhysicsOrderedFreeVector IPDFArbEnergyH; // IPDF for Arb
G4PhysicsOrderedFreeVector EpnEnergyH;
G4double CDGhist[3]; // cumulative histo for cdg
G4double BBHist[10001], Bbody_x[10001];
G4String IntType; // Interpolation type
G4double Arb_grad[256], Arb_cept[256]; // grad and cept for 256 segments
G4double Arb_alpha[256], Arb_Const[256]; // alpha and constants
G4double Arb_ezero[256]; // ezero
G4double ArbEmin, ArbEmax; // Emin and Emax for the whole arb distribution
//use primarily for debug.
// Bias variables
G4bool XBias, IPDFXBias;
G4PhysicsOrderedFreeVector XBiasH;
G4PhysicsOrderedFreeVector IPDFXBiasH;
G4bool YBias, IPDFYBias;
G4PhysicsOrderedFreeVector YBiasH;
G4PhysicsOrderedFreeVector IPDFYBiasH;
G4bool ZBias, IPDFZBias;
G4PhysicsOrderedFreeVector ZBiasH;
G4PhysicsOrderedFreeVector IPDFZBiasH;
G4bool ThetaBias, IPDFThetaBias;
G4PhysicsOrderedFreeVector ThetaBiasH;
G4PhysicsOrderedFreeVector IPDFThetaBiasH;
G4bool PhiBias, IPDFPhiBias;
G4PhysicsOrderedFreeVector PhiBiasH;
G4PhysicsOrderedFreeVector IPDFPhiBiasH;
G4bool EnergyBias, IPDFEnergyBias;
G4PhysicsOrderedFreeVector EnergyBiasH;
G4PhysicsOrderedFreeVector IPDFEnergyBiasH;
G4double bweights[6], bweight; //record x,y,z,theta,phi,energy weights
// Other particle properties
G4int NumberOfParticlesToBeGenerated;
G4ParticleDefinition * particle_definition;
G4ParticleMomentum particle_momentum_direction;
G4double particle_energy;
G4double particle_charge;
G4ThreeVector particle_position;
G4double particle_time;
G4ThreeVector particle_polarization;
// Verbosity
G4int verbosityLevel;
private:
G4DataInterpolation *SplineInt; // holds Spline stuff
G4GeneralParticleSourceMessenger *theMessenger;
G4Navigator *gNavigator;
// Nucleus theIon;
};
@@ -0,0 +1,151 @@
#ifndef G4GeneralParticleSourceMessenger_h
#define G4GeneralParticleSourceMessenger_h 1
///////////////////////////////////////////////////////////////////////////////
//
// MODULE: G4GeneralParticleSourceMessenger.hh
//
// Version: 1.1
// Date: 19/10/00
// Author: C Ferguson, F Lei and P Truscott
// Organisation: University of Southampton / DERA
// Customer: ESA/ESTEC
//
///////////////////////////////////////////////////////////////////////////////
//
// DESCRIPTION
// -----------
//
// The function of the G4GeneralParticleSourceMessenger is to allow the user to
// enter commands either in interactive command line mode or through macros to
// control the G4GeneralParticleSource. The G4GeneralParticleSourceMessenger
// class is based on G4ParticleGunMessenger.
//
///////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
//
// Version 1.0, 28 February 2000, C Ferguson, Created.
//
// Version 1.1, 19 October 2000, Modified to inherit from G4VPrimaryGenerator.
// New name at the request of M. Asai.
//
///////////////////////////////////////////////////////////////////////////////
//
// MEMBER FUNCTIONS
// ----------------
//
// G4GeneralParticleSourceMessenger(G4GeneralParticleSource *fPtclGun)
// Constructor: Sets up commands.
//
// ~G4GeneralParticleSourceMessenger()
// Destructor: Deletes commands.
//
// void SetNewValue(G4UIcommand *command, G4String newValues)
// Uses the appropriate methods in the G4GeneralParticleSource to carry out
// the user commands.
//
// G4String GetCurrentValue(G4UIcommand *command)
// Allows the user to retrieve the current values of parameters.
// Not implemented yet.
//
///////////////////////////////////////////////////////////////////////////////
#include "G4UImessenger.hh"
#include "globals.hh"
//#include "UIcmdWithNucleusAndUnit.hh"
class G4ParticleTable;
class G4UIcommand;
class G4UIdirectory;
class G4UIcmdWithoutParameter;
class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWith3Vector;
class G4UIcmdWith3VectorAndUnit;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADouble;
class G4UIcmdWithABool;
class G4UIcmdWithoutParameter;
class G4GeneralParticleSource;
class G4GeneralParticleSourceMessenger: public G4UImessenger
{
public:
G4GeneralParticleSourceMessenger(G4GeneralParticleSource *fPtclGun);
~G4GeneralParticleSourceMessenger();
void SetNewValue(G4UIcommand *command, G4String newValues);
// Identifies the command which has been invoked by the user, extracts the
// parameters associated with that command (held in newValues), and uses
// these values with the appropriate member function of G4GeneralParticleSource.
G4String GetCurrentValue(G4UIcommand *command);
private:
G4GeneralParticleSource *fParticleGun;
G4ParticleTable *particleTable;
G4String histtype;
private: //commands
G4UIdirectory *gpsDirectory;
G4UIcmdWithAString *typeCmd;
G4UIcmdWithAString *shapeCmd;
G4UIcmdWith3VectorAndUnit *centreCmd;
G4UIcmdWith3Vector *posrot1Cmd;
G4UIcmdWith3Vector *posrot2Cmd;
G4UIcmdWithADoubleAndUnit *halfxCmd;
G4UIcmdWithADoubleAndUnit *halfyCmd;
G4UIcmdWithADoubleAndUnit *halfzCmd;
G4UIcmdWithADoubleAndUnit *radiusCmd;
G4UIcmdWithADoubleAndUnit *radius0Cmd;
G4UIcmdWithADoubleAndUnit *paralpCmd;
G4UIcmdWithADoubleAndUnit *partheCmd;
G4UIcmdWithADoubleAndUnit *parphiCmd;
G4UIcmdWithAString *confineCmd;
G4UIcmdWithAString *angtypeCmd;
G4UIcmdWith3Vector *angrot1Cmd;
G4UIcmdWith3Vector *angrot2Cmd;
G4UIcmdWithADoubleAndUnit *minthetaCmd;
G4UIcmdWithADoubleAndUnit *maxthetaCmd;
G4UIcmdWithADoubleAndUnit *minphiCmd;
G4UIcmdWithADoubleAndUnit *maxphiCmd;
G4UIcmdWithABool *surfnormCmd;
G4UIcmdWithAString *energytypeCmd;
G4UIcmdWithADoubleAndUnit *eminCmd;
G4UIcmdWithADoubleAndUnit *emaxCmd;
G4UIcmdWithADoubleAndUnit *monoenergyCmd;
G4UIcmdWithADouble *alphaCmd;
G4UIcmdWithADouble *tempCmd;
G4UIcmdWithADouble *ezeroCmd;
G4UIcmdWithADouble *gradientCmd;
G4UIcmdWithADouble *interceptCmd;
G4UIcmdWithoutParameter *calculateCmd;
G4UIcmdWithABool *energyspecCmd;
G4UIcmdWithABool *diffspecCmd;
G4UIcmdWith3Vector *histpointCmd;
G4UIcmdWithAString *histnameCmd;
G4UIcmdWithAString *arbintCmd;
G4UIcmdWithAnInteger *verbosityCmd;
G4UIcommand *ionCmd;
G4UIcmdWithAString *particleCmd;
G4UIcmdWithADoubleAndUnit *timeCmd;
G4UIcmdWith3Vector *polCmd;
G4UIcmdWithAnInteger *numberCmd;
private: // for ion shooting
G4bool fShootIon;
G4int fAtomicNumber;
G4int fAtomicMass;
G4int fIonCharge;
G4double fIonExciteEnergy;
};
#endif
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEPEvtInterface.hh,v 1.4 1999/12/15 14:49:38 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4HEPEvtInterface_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEPEvtParticle.hh,v 1.3 1999/12/15 14:49:38 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
+9 -5
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ParticleGun.hh,v 1.3 1999/12/15 14:49:38 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4ParticleGun.hh,v 1.4 2000/10/18 12:41:21 kurasige Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4ParticleGun_h
@@ -68,9 +68,8 @@ class G4ParticleGun:public G4VPrimaryGenerator
// By using SetParticleMomentum(), both particle_momentum_direction and
// particle_energy(Kinetic Energy) are set.
//
inline void SetParticleDefinition
(G4ParticleDefinition * aParticleDefinition)
{ particle_definition = aParticleDefinition; }
void SetParticleDefinition
(G4ParticleDefinition * aParticleDefinition);
void SetParticleMomentum(G4ParticleMomentum aMomentum);
inline void SetParticleMomentumDirection
(G4ParticleMomentum aMomentumDirection)
@@ -81,6 +80,8 @@ class G4ParticleGun:public G4VPrimaryGenerator
{ particle_position = aPosition; }
inline void SetParticleTime(G4double aTime)
{ particle_time = aTime; }
inline void SetParticleCharge(G4double aCharge)
{ particle_charge = aCharge; }
inline void SetParticlePolarization(G4ThreeVector aVal)
{ particle_polarization = aVal; }
inline void SetNumberOfParticles(G4int i)
@@ -93,6 +94,8 @@ class G4ParticleGun:public G4VPrimaryGenerator
{ return particle_momentum_direction; }
inline G4double GetParticleEnergy()
{ return particle_energy; }
inline G4double GetParticleCharge()
{ return particle_charge; }
inline G4ThreeVector GetParticlePosition()
{ return particle_position; }
inline G4double GetParticleTime()
@@ -109,6 +112,7 @@ class G4ParticleGun:public G4VPrimaryGenerator
G4ParticleDefinition* particle_definition;
G4ParticleMomentum particle_momentum_direction;
G4double particle_energy;
G4double particle_charge;
G4ThreeVector particle_position;
G4double particle_time;
G4ThreeVector particle_polarization;
+12 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ParticleGunMessenger.hh,v 1.3 1999/12/15 14:49:39 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4ParticleGunMessenger.hh,v 1.5 2000/10/19 13:29:18 kurasige Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -43,10 +43,11 @@ class G4ParticleGunMessenger: public G4UImessenger
void SetNewValue(G4UIcommand * command,G4String newValues);
G4String GetCurrentValue(G4UIcommand * command);
private:
G4ParticleGun * fParticleGun;
G4ParticleTable * particleTable;
private: //commands
G4UIdirectory * gunDirectory;
G4UIcmdWithoutParameter * listCmd;
@@ -58,6 +59,14 @@ class G4ParticleGunMessenger: public G4UImessenger
G4UIcmdWith3Vector * polCmd;
G4UIcmdWithAnInteger * numberCmd;
G4UIcommand * ionCmd;
private: // for ion shooting
G4bool fShootIon;
G4int fAtomicNumber;
G4int fAtomicMass;
G4int fIonCharge;
G4double fIonExciteEnergy;
};
#endif
+13 -5
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PrimaryParticle.hh,v 1.3 1999/12/15 14:49:39 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4PrimaryParticle.hh,v 1.6 2000/10/19 15:19:36 asaim Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -83,10 +83,11 @@ class G4PrimaryParticle
G4double mass; // This is just for book keeping.
// This will not be used but the mass in
// G4ParticleDefinition will be used.
G4double charge;
G4double polX;
G4double polY;
G4double polZ;
G4double Weight0;
public: // with description
// followings are get methods available.
@@ -114,13 +115,18 @@ class G4PrimaryParticle
{ return trackID; }
inline G4double GetMass() const
{ return mass; }
inline G4double GetCharge() const
{ return charge; }
inline G4ThreeVector GetPolarization() const
{ return G4ThreeVector(polX,polY,polZ); }
inline G4double GetPolX() const { return polX; }
inline G4double GetPolY() const { return polY; }
inline G4double GetPolZ() const { return polZ; }
inline G4double GetWeight() const { return Weight0; }
inline void SetWeight(G4double w) { Weight0 = w; }
public:
public: // with description
// Followings are available Set methods.
void SetPDGcode(G4int Pcode);
void SetG4code(G4ParticleDefinition * Gcode);
inline void SetMomentum(G4double px, G4double py, G4double pz)
@@ -147,7 +153,9 @@ class G4PrimaryParticle
{ trackID = id; }
inline void SetMass(G4double mas)
{ mass = mas; }
inline void SetPolarization(G4double px,G4double py,G4double pz)
inline void SetCharge(G4double chg)
{ charge = chg; }
inline void SetPolarization(G4double px,G4double py,G4double pz)
{
polX = px;
polY = py;
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PrimaryTransformer.hh,v 1.3 1999/12/15 14:49:39 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4PrimaryTransformer.hh,v 1.4 2000/10/19 15:19:36 asaim Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4PromaryTransformer_h
@@ -45,7 +45,7 @@ class G4PrimaryTransformer
private:
void GenerateTracks(G4PrimaryVertex* primaryVertex);
void GenerateSingleTrack(G4PrimaryParticle* primaryParticle,
G4double x0,G4double y0,G4double z0,G4double t0);
G4double x0,G4double y0,G4double z0,G4double t0,G4double wv);
void SetDecayProducts(G4PrimaryParticle* mother,
G4DynamicParticle* motherDP);
inline G4ParticleDefinition* GetDefinition(G4PrimaryParticle*pp)
+11 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PrimaryVertex.hh,v 1.3 1999/12/15 14:49:39 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4PrimaryVertex.hh,v 1.5 2000/10/19 15:19:36 asaim Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -52,10 +52,13 @@ class G4PrimaryVertex
G4PrimaryParticle * theTail;
G4PrimaryVertex* nextVertex;
G4int numberOfParticle;
G4double Weight0;
public:
inline G4ThreeVector GetPosition() const
{ return G4ThreeVector(X0,Y0,Z0); }
inline void SetPosition(G4double x0,G4double y0,G4double z0)
{ X0 = x0; Y0 = y0; Z0 = z0; }
inline G4double GetX0() const
{ return X0; }
inline G4double GetY0() const
@@ -64,6 +67,8 @@ class G4PrimaryVertex
{ return Z0; }
inline G4double GetT0() const
{ return T0; }
inline void SetT0(G4double t0)
{ T0 = t0; }
inline G4int GetNumberOfParticle() const
{ return numberOfParticle; }
inline void SetPrimary(G4PrimaryParticle * pp)
@@ -106,6 +111,10 @@ class G4PrimaryVertex
}
inline G4PrimaryVertex* GetNext() const
{ return nextVertex; }
inline G4double GetWeight() const
{ return Weight0; }
inline void SetWeight(G4double w)
{ Weight0 = w; }
};
extern G4Allocator<G4PrimaryVertex> aPrimaryVertexAllocator;
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4StackManager.hh,v 1.5 2000/01/26 06:42:14 asaim Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4StackedTrack.hh,v 1.4 2000/01/26 06:42:15 asaim Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Last Modification : 02/Feb/96 M.Asai
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4StackingMessenger.hh,v 1.3 1999/12/15 14:49:39 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4StackingMessenger_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4TrackStack.hh,v 1.3 1999/12/15 14:49:39 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Last Modification : 09/Dec/96 M.Asai
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4TrajectoryContainer.hh,v 1.5 1999/12/15 14:49:39 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// G4TrajectoryContainer
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UserEventAction.hh,v 1.4 1999/12/15 14:49:39 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
//
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UserStackingAction.hh,v 1.4 1999/12/15 14:49:39 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4UserStackingAction_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VPrimaryGenerator.hh,v 1.3 1999/12/15 14:49:39 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4VPrimaryGenerator_h
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: eventgendefs.hh,v 1.2 1999/12/15 14:49:40 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef EventGenerator_DEBUG
#define EventGenerator_DEBUG
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: evmandefs.hh,v 1.2 1999/12/15 14:49:40 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
///#define G4EVENTMANAGER_DEBUG 1
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: trajectoryControl.hh,v 1.2 1999/12/15 14:49:40 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
////#define G4_STORE_TRAJECTORY 1
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4EvManMessenger.cc,v 1.2 1999/12/15 14:49:40 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// --------------------------------------------------------------------
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4Event.cc,v 1.2 1999/12/15 14:49:40 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// G4Event
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4EventManager.cc,v 1.5 2000/01/26 06:42:15 asaim Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
//
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,664 @@
///////////////////////////////////////////////////////////////////////////////
//
// MODULE: G4GeneralParticleSourceMessenger.cc
//
// Version: 1.
// Date: 28/02/00
// Author: C Ferguson, F Lei and P Truscott
// Organisation: University of Southampton / DERA
// Customer: ESA/ESTEC
//
///////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
//
// 10-Nov-2000 F. Lei
// changed
// #include <iostream.h>
// to
// #include "g4std/fstream"
//
// Version 1.1, 18 October 2000, Modified to inherit from G4VPrimaryGenerator.
// New name at the request of M. Asai.
//
// Version 1.0, 28 February 2000, C Ferguson, Created.
//
//
///////////////////////////////////////////////////////////////////////////////
//
#include "G4Geantino.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleTable.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithoutParameter.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWith3Vector.hh"
#include "G4UIcmdWith3VectorAndUnit.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADouble.hh"
#include "G4UIcmdWithABool.hh"
#include "G4ios.hh"
//#include <iostream.h>
#include "g4std/fstream"
#include "g4std/iomanip"
#include "g4rw/ctoken.h"
#include "g4rw/rstream.h"
#include "g4std/strstream"
#include "G4GeneralParticleSourceMessenger.hh"
#include "G4GeneralParticleSource.hh"
///////////////////////////////////////////////////////////////////////////////
//
G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger
(G4GeneralParticleSource *fPtclGun)
: fParticleGun(fPtclGun),fShootIon(false)
{
particleTable = G4ParticleTable::GetParticleTable();
histtype = "biasx";
gpsDirectory = new G4UIdirectory("/gps/");
gpsDirectory->SetGuidance("General Paricle Source control commands.");
typeCmd = new G4UIcmdWithAString("/gps/type",this);
typeCmd->SetGuidance("Sets source distribution type.");
typeCmd->SetGuidance("Either Point, Plane, Surface or Volume");
typeCmd->SetParameterName("DisType",true,true);
typeCmd->SetDefaultValue("Point");
typeCmd->SetCandidates("Point Plane Surface Volume");
shapeCmd = new G4UIcmdWithAString("/gps/shape",this);
shapeCmd->SetGuidance("Sets source shape type.");
shapeCmd->SetParameterName("Shape",true,true);
shapeCmd->SetDefaultValue("NULL");
shapeCmd->SetCandidates("Circle Annulus Ellipse Square Rectangle Sphere Ellipsoid Cylinder Para");
centreCmd = new G4UIcmdWith3VectorAndUnit("/gps/centre",this);
centreCmd->SetGuidance("Set centre coordinates of source.");
centreCmd->SetParameterName("X","Y","Z",true,true);
centreCmd->SetDefaultUnit("cm");
centreCmd->SetUnitCandidates("micron mm cm m km");
posrot1Cmd = new G4UIcmdWith3Vector("/gps/posrot1",this);
posrot1Cmd->SetGuidance("Set rotation matrix of x'.");
posrot1Cmd->SetGuidance("Posrot1 does not need to be a unit vector.");
posrot1Cmd->SetParameterName("R1x","R1y","R1z",true,true);
posrot1Cmd->SetRange("R1x != 0 || R1y != 0 || R1z != 0");
posrot2Cmd = new G4UIcmdWith3Vector("/gps/posrot2",this);
posrot2Cmd->SetGuidance("Set rotation matrix of y'.");
posrot2Cmd->SetGuidance("Posrot2 does not need to be a unit vector.");
posrot2Cmd->SetParameterName("R2x","R2y","R2z",true,true);
posrot2Cmd->SetRange("R2x != 0 || R2y != 0 || R2z != 0");
halfxCmd = new G4UIcmdWithADoubleAndUnit("/gps/halfx",this);
halfxCmd->SetGuidance("Set x half length of source.");
halfxCmd->SetParameterName("Halfx",true,true);
halfxCmd->SetDefaultUnit("cm");
halfxCmd->SetUnitCandidates("micron mm cm m km");
halfyCmd = new G4UIcmdWithADoubleAndUnit("/gps/halfy",this);
halfyCmd->SetGuidance("Set y half length of source.");
halfyCmd->SetParameterName("Halfy",true,true);
halfyCmd->SetDefaultUnit("cm");
halfyCmd->SetUnitCandidates("micron mm cm m km");
halfzCmd = new G4UIcmdWithADoubleAndUnit("/gps/halfz",this);
halfzCmd->SetGuidance("Set z half length of source.");
halfzCmd->SetParameterName("Halfz",true,true);
halfzCmd->SetDefaultUnit("cm");
halfzCmd->SetUnitCandidates("micron mm cm m km");
radiusCmd = new G4UIcmdWithADoubleAndUnit("/gps/radius",this);
radiusCmd->SetGuidance("Set radius of source.");
radiusCmd->SetParameterName("Radius",true,true);
radiusCmd->SetDefaultUnit("cm");
radiusCmd->SetUnitCandidates("micron mm cm m km");
radius0Cmd = new G4UIcmdWithADoubleAndUnit("/gps/radius0",this);
radius0Cmd->SetGuidance("Set inner radius of source.");
radius0Cmd->SetParameterName("Radius0",true,true);
radius0Cmd->SetDefaultUnit("cm");
radius0Cmd->SetUnitCandidates("micron mm cm m km");
paralpCmd = new G4UIcmdWithADoubleAndUnit("/gps/paralp",this);
paralpCmd->SetGuidance("Angle from y-axis of y' in Para");
paralpCmd->SetParameterName("paralp",true,true);
paralpCmd->SetDefaultUnit("rad");
paralpCmd->SetUnitCandidates("rad deg");
partheCmd = new G4UIcmdWithADoubleAndUnit("/gps/parthe",this);
partheCmd->SetGuidance("Polar angle through centres of z faces");
partheCmd->SetParameterName("parthe",true,true);
partheCmd->SetDefaultUnit("rad");
partheCmd->SetUnitCandidates("rad deg");
parphiCmd = new G4UIcmdWithADoubleAndUnit("/gps/parphi",this);
parphiCmd->SetGuidance("Azimuth angle through centres of z faces");
parphiCmd->SetParameterName("parphi",true,true);
parphiCmd->SetDefaultUnit("rad");
parphiCmd->SetUnitCandidates("rad deg");
confineCmd = new G4UIcmdWithAString("/gps/confine",this);
confineCmd->SetGuidance("Confine source to volume (NULL to unset).");
confineCmd->SetGuidance("usage: confine VolName");
confineCmd->SetParameterName("VolName",true,true);
confineCmd->SetDefaultValue("NULL");
// Angular distribution commands
angtypeCmd = new G4UIcmdWithAString("/gps/angtype",this);
angtypeCmd->SetGuidance("Sets angular source distribution type");
angtypeCmd->SetGuidance("Possible variables are: iso, cos or user");
angtypeCmd->SetParameterName("AngDis",true,true);
angtypeCmd->SetDefaultValue("iso");
angtypeCmd->SetCandidates("iso cos user");
angrot1Cmd = new G4UIcmdWith3Vector("/gps/angrot1",this);
angrot1Cmd->SetGuidance("Sets the x' vector for angular distribution");
angrot1Cmd->SetGuidance("Need not be a unit vector");
angrot1Cmd->SetParameterName("AR1x","AR1y","AR1z",true,true);
angrot1Cmd->SetRange("AR1x != 0 || AR1y != 0 || AR1z != 0");
angrot2Cmd = new G4UIcmdWith3Vector("/gps/angrot2",this);
angrot2Cmd->SetGuidance("Sets the y' vector for angular distribution");
angrot2Cmd->SetGuidance("Need not be a unit vector");
angrot2Cmd->SetParameterName("AR2x","AR2y","AR2z",true,true);
angrot2Cmd->SetRange("AR2x != 0 || AR2y != 0 || AR2z != 0");
minthetaCmd = new G4UIcmdWithADoubleAndUnit("/gps/mintheta",this);
minthetaCmd->SetGuidance("Set minimum theta");
minthetaCmd->SetParameterName("MinTheta",true,true);
minthetaCmd->SetDefaultUnit("rad");
minthetaCmd->SetUnitCandidates("rad deg");
maxthetaCmd = new G4UIcmdWithADoubleAndUnit("/gps/maxtheta",this);
maxthetaCmd->SetGuidance("Set maximum theta");
maxthetaCmd->SetParameterName("MaxTheta",true,true);
maxthetaCmd->SetDefaultValue(3.1416);
maxthetaCmd->SetDefaultUnit("rad");
maxthetaCmd->SetUnitCandidates("rad deg");
minphiCmd = new G4UIcmdWithADoubleAndUnit("/gps/minphi",this);
minphiCmd->SetGuidance("Set minimum phi");
minphiCmd->SetParameterName("MinPhi",true,true);
minphiCmd->SetDefaultUnit("rad");
minphiCmd->SetUnitCandidates("rad deg");
maxphiCmd = new G4UIcmdWithADoubleAndUnit("/gps/maxphi",this);
maxphiCmd->SetGuidance("Set maximum phi");
maxphiCmd->SetParameterName("MaxPhi",true,true);
maxphiCmd->SetDefaultUnit("rad");
maxphiCmd->SetUnitCandidates("rad deg");
surfnormCmd = new G4UIcmdWithABool("/gps/surfnorm",this);
surfnormCmd->SetGuidance("Makes a user-defined distribution with respect to surface normals rather than x,y,z axes.");
surfnormCmd->SetGuidance("Default is false");
surfnormCmd->SetParameterName("surfnorm",true);
surfnormCmd->SetDefaultValue(false);
// Energy
energytypeCmd = new G4UIcmdWithAString("/gps/energytype",this);
energytypeCmd->SetGuidance("Sets energy distribution type");
energytypeCmd->SetParameterName("EnergyDis",true,true);
energytypeCmd->SetDefaultValue("Mono");
energytypeCmd->SetCandidates("Mono Lin Pow Exp Brem Bbody Cdg User Arb Epn");
eminCmd = new G4UIcmdWithADoubleAndUnit("/gps/emin",this);
eminCmd->SetGuidance("Sets Emin");
eminCmd->SetParameterName("emin",true,true);
eminCmd->SetDefaultUnit("keV");
eminCmd->SetUnitCandidates("eV keV MeV GeV TeV PeV");
emaxCmd = new G4UIcmdWithADoubleAndUnit("/gps/emax",this);
emaxCmd->SetGuidance("Sets Emax");
emaxCmd->SetParameterName("emax",true,true);
emaxCmd->SetDefaultUnit("keV");
emaxCmd->SetUnitCandidates("eV keV MeV GeV TeV PeV");
monoenergyCmd = new G4UIcmdWithADoubleAndUnit("/gps/monoenergy",this);
monoenergyCmd->SetGuidance("Sets Monoenergy");
monoenergyCmd->SetParameterName("monoenergy",true,true);
monoenergyCmd->SetDefaultUnit("keV");
monoenergyCmd->SetUnitCandidates("eV keV MeV GeV TeV PeV");
alphaCmd = new G4UIcmdWithADouble("/gps/alpha",this);
alphaCmd->SetGuidance("Sets Alpha");
alphaCmd->SetParameterName("alpha",true,true);
tempCmd = new G4UIcmdWithADouble("/gps/temp",this);
tempCmd->SetGuidance("Sets the temperature for Brem and BBody");
tempCmd->SetParameterName("temp",true,true);
ezeroCmd = new G4UIcmdWithADouble("/gps/ezero",this);
ezeroCmd->SetGuidance("Sets ezero exponential distributions");
ezeroCmd->SetParameterName("ezero",true,true);
gradientCmd = new G4UIcmdWithADouble("/gps/gradient",this);
gradientCmd->SetGuidance("Sets the gradient for Lin distributions");
gradientCmd->SetParameterName("gradient",true,true);
interceptCmd = new G4UIcmdWithADouble("/gps/intercept",this);
interceptCmd->SetGuidance("Sets the intercept for Lin distributions");
interceptCmd->SetParameterName("intercept",true,true);
calculateCmd = new G4UIcmdWithoutParameter("/gps/calculate",this);
calculateCmd->SetGuidance("Calculates distributions for Cdg and BBody");
energyspecCmd = new G4UIcmdWithABool("/gps/energyspec",this);
energyspecCmd->SetGuidance("Toggles between energy and momentum spectra");
energyspecCmd->SetParameterName("energyspec",true);
energyspecCmd->SetDefaultValue(true);
diffspecCmd = new G4UIcmdWithABool("/gps/diffspec",this);
diffspecCmd->SetGuidance("Toggles between differential and integral spectra");
diffspecCmd->SetParameterName("diffspec",true,true);
diffspecCmd->SetDefaultValue(true);
// Biasing + histograms in general
histnameCmd = new G4UIcmdWithAString("/gps/histname",this);
histnameCmd->SetGuidance("Sets histogram type");
histnameCmd->SetParameterName("HistType",true,true);
histnameCmd->SetDefaultValue("biasx");
histnameCmd->SetCandidates("biasx biasy biasz biast biasp biase theta phi energy arb epn");
histpointCmd = new G4UIcmdWith3Vector("/gps/histpoint",this);
histpointCmd->SetGuidance("Allows user to define a histogram");
histpointCmd->SetGuidance("Enter: Ehi Weight");
histpointCmd->SetParameterName("Ehi","Weight","Junk",true,true);
histpointCmd->SetRange("Ehi >= 0. && Weight >= 0.");
arbintCmd = new G4UIcmdWithAString("/gps/arbint",this);
arbintCmd->SetGuidance("Sets Arbitrary Interpolation type.");
arbintCmd->SetParameterName("int",true,true);
arbintCmd->SetDefaultValue("NULL");
arbintCmd->SetCandidates("Lin Log Exp Spline");
// verbosity
verbosityCmd = new G4UIcmdWithAnInteger("/gps/verbose",this);
verbosityCmd->SetGuidance("Set Verbose level for GPS");
verbosityCmd->SetGuidance(" 0 : Silent");
verbosityCmd->SetGuidance(" 1 : Limited information");
verbosityCmd->SetGuidance(" 2 : Detailed information");
verbosityCmd->SetParameterName("level",false);
verbosityCmd->SetRange("level>=0 && level <=2");
particleCmd = new G4UIcmdWithAString("/gps/particle",this);
particleCmd->SetGuidance("Set particle to be generated.");
particleCmd->SetGuidance(" (geantino is default)");
particleCmd->SetGuidance(" (ion can be specified for shooting ions)");
particleCmd->SetParameterName("particleName",true);
particleCmd->SetDefaultValue("geantino");
G4String candidateList;
G4int nPtcl = particleTable->entries();
for(G4int i=0;i<nPtcl;i++)
{
candidateList += particleTable->GetParticleName(i);
candidateList += " ";
}
candidateList += "ion ";
particleCmd->SetCandidates(candidateList);
// SR1.3
// ionCmd = new UIcmdWithNucleusAndUnit("/gps/ion",this);
//ionCmd->SetGuidance("define the primary ion (a,z,e)");
//ionCmd->SetParameterName("A","Z","E",true);
//ionCmd->SetDefaultUnit("keV");
//ionCmd->SetUnitCandidates("keV MeV");
ionCmd = new G4UIcommand("/gps/ion",this);
ionCmd->SetGuidance("Set properties of ion to be generated.");
ionCmd->SetGuidance("[usage] /gun/ion Z A Q E");
ionCmd->SetGuidance(" Z:(int) AtomicNumber");
ionCmd->SetGuidance(" A:(int) AtomicMass");
ionCmd->SetGuidance(" Q:(int) Charge of Ion (in unit of e)");
ionCmd->SetGuidance(" E:(double) Excitation energy (in keV)");
G4UIparameter* param;
param = new G4UIparameter("Z",'i',false);
param->SetDefaultValue("1");
ionCmd->SetParameter(param);
param = new G4UIparameter("A",'i',false);
param->SetDefaultValue("1");
ionCmd->SetParameter(param);
param = new G4UIparameter("Q",'i',true);
param->SetDefaultValue("0");
ionCmd->SetParameter(param);
param = new G4UIparameter("E",'d',true);
param->SetDefaultValue("0.0");
ionCmd->SetParameter(param);
timeCmd = new G4UIcmdWithADoubleAndUnit("/gps/time",this);
timeCmd->SetGuidance("Set initial time of the particle.");
timeCmd->SetParameterName("t0",true,true);
timeCmd->SetDefaultUnit("ns");
//timeCmd->SetUnitCategory("Time");
//timeCmd->SetUnitCandidates("ns ms s");
polCmd = new G4UIcmdWith3Vector("/gps/polarization",this);
polCmd->SetGuidance("Set polarization.");
polCmd->SetParameterName("Px","Py","Pz",true,true);
polCmd->SetRange("Px>=-1.&&Px<=1.&&Py>=-1.&&Py<=1.&&Pz>=-1.&&Pz<=1.");
numberCmd = new G4UIcmdWithAnInteger("/gps/number",this);
numberCmd->SetGuidance("Set number of particles to be generated.");
numberCmd->SetParameterName("N",true,true);
numberCmd->SetRange("N>0");
}
G4GeneralParticleSourceMessenger::~G4GeneralParticleSourceMessenger()
{
delete typeCmd;
delete shapeCmd;
delete centreCmd;
delete posrot1Cmd;
delete posrot2Cmd;
delete halfxCmd;
delete halfyCmd;
delete halfzCmd;
delete radiusCmd;
delete radius0Cmd;
delete paralpCmd;
delete partheCmd;
delete parphiCmd;
delete confineCmd;
delete angtypeCmd;
delete angrot1Cmd;
delete angrot2Cmd;
delete minthetaCmd;
delete maxthetaCmd;
delete minphiCmd;
delete maxphiCmd;
delete surfnormCmd;
delete energytypeCmd;
delete eminCmd;
delete emaxCmd;
delete monoenergyCmd;
delete alphaCmd;
delete tempCmd;
delete ezeroCmd;
delete gradientCmd;
delete interceptCmd;
delete calculateCmd;
delete energyspecCmd;
delete diffspecCmd;
delete histnameCmd;
delete histpointCmd;
delete arbintCmd;
delete verbosityCmd;
delete ionCmd;
delete particleCmd;
delete timeCmd;
delete polCmd;
delete numberCmd;
delete gpsDirectory;
}
void G4GeneralParticleSourceMessenger::SetNewValue(G4UIcommand *command, G4String newValues)
{
if(command == typeCmd)
{
fParticleGun->SetPosDisType(newValues);
}
else if(command == shapeCmd)
{
fParticleGun->SetPosDisShape(newValues);
}
else if(command == centreCmd)
{
fParticleGun->SetCentreCoords(centreCmd->GetNew3VectorValue(newValues));
}
else if(command == posrot1Cmd)
{
fParticleGun->SetPosRot1(posrot1Cmd->GetNew3VectorValue(newValues));
}
else if(command == posrot2Cmd)
{
fParticleGun->SetPosRot2(posrot2Cmd->GetNew3VectorValue(newValues));
}
else if(command == halfxCmd)
{
fParticleGun->SetHalfX(halfxCmd->GetNewDoubleValue(newValues));
}
else if(command == halfyCmd)
{
fParticleGun->SetHalfY(halfyCmd->GetNewDoubleValue(newValues));
}
else if(command == halfzCmd)
{
fParticleGun->SetHalfZ(halfzCmd->GetNewDoubleValue(newValues));
}
else if(command == radiusCmd)
{
fParticleGun->SetRadius(radiusCmd->GetNewDoubleValue(newValues));
}
else if(command == radius0Cmd)
{
fParticleGun->SetRadius0(radius0Cmd->GetNewDoubleValue(newValues));
}
else if(command == paralpCmd)
{
fParticleGun->SetParAlpha(paralpCmd->GetNewDoubleValue(newValues));
}
else if(command == partheCmd)
{
fParticleGun->SetParTheta(partheCmd->GetNewDoubleValue(newValues));
}
else if(command == parphiCmd)
{
fParticleGun->SetParPhi(parphiCmd->GetNewDoubleValue(newValues));
}
else if(command == confineCmd)
{
fParticleGun->ConfineSourceToVolume(newValues);
}
else if(command == angtypeCmd)
{
fParticleGun->SetAngDistType(newValues);
}
else if(command == angrot1Cmd)
{
G4String a = "angref1";
fParticleGun->DefineAngRefAxes(a,angrot1Cmd->GetNew3VectorValue(newValues));
}
else if(command == angrot2Cmd)
{
G4String a = "angref2";
fParticleGun->DefineAngRefAxes(a,angrot2Cmd->GetNew3VectorValue(newValues));
}
else if(command == minthetaCmd)
{
fParticleGun->SetMinTheta(minthetaCmd->GetNewDoubleValue(newValues));
}
else if(command == minphiCmd)
{
fParticleGun->SetMinPhi(minphiCmd->GetNewDoubleValue(newValues));
}
else if(command == maxthetaCmd)
{
fParticleGun->SetMaxTheta(maxthetaCmd->GetNewDoubleValue(newValues));
}
else if(command == maxphiCmd)
{
fParticleGun->SetMaxPhi(maxphiCmd->GetNewDoubleValue(newValues));
}
else if(command == surfnormCmd)
{
fParticleGun->SetUserWRTSurface(surfnormCmd->GetNewBoolValue(newValues));
}
else if(command == energytypeCmd)
{
fParticleGun->SetEnergyDisType(newValues);
}
else if(command == eminCmd)
{
fParticleGun->SetEmin(eminCmd->GetNewDoubleValue(newValues));
}
else if(command == emaxCmd)
{
fParticleGun->SetEmax(emaxCmd->GetNewDoubleValue(newValues));
}
else if(command == monoenergyCmd)
{
fParticleGun->SetMonoEnergy(monoenergyCmd->GetNewDoubleValue(newValues));
}
else if(command == alphaCmd)
{
fParticleGun->SetAlpha(alphaCmd->GetNewDoubleValue(newValues));
}
else if(command == tempCmd)
{
fParticleGun->SetTemp(tempCmd->GetNewDoubleValue(newValues));
}
else if(command == ezeroCmd)
{
fParticleGun->SetEzero(ezeroCmd->GetNewDoubleValue(newValues));
}
else if(command == gradientCmd)
{
fParticleGun->SetGradient(gradientCmd->GetNewDoubleValue(newValues));
}
else if(command == interceptCmd)
{
fParticleGun->SetInterCept(interceptCmd->GetNewDoubleValue(newValues));
}
else if(command == calculateCmd)
{
fParticleGun->Calculate();
}
else if(command == energyspecCmd)
{
G4cout << "here in energyspecCmd" << G4endl;
fParticleGun->InputEnergySpectra(energyspecCmd->GetNewBoolValue(newValues));
}
else if(command == diffspecCmd)
{
fParticleGun->InputDifferentialSpectra(diffspecCmd->GetNewBoolValue(newValues));
}
else if(command == histnameCmd)
{
histtype = newValues;
}
else if(command == histpointCmd)
{
if(histtype == "biasx")
fParticleGun->SetXBias(histpointCmd->GetNew3VectorValue(newValues));
if(histtype == "biasy")
fParticleGun->SetYBias(histpointCmd->GetNew3VectorValue(newValues));
if(histtype == "biasz")
fParticleGun->SetZBias(histpointCmd->GetNew3VectorValue(newValues));
if(histtype == "biast")
fParticleGun->SetThetaBias(histpointCmd->GetNew3VectorValue(newValues));
if(histtype == "biasp")
fParticleGun->SetPhiBias(histpointCmd->GetNew3VectorValue(newValues));
if(histtype == "biase")
fParticleGun->SetEnergyBias(histpointCmd->GetNew3VectorValue(newValues));
if(histtype == "theta")
fParticleGun->UserDefAngTheta(histpointCmd->GetNew3VectorValue(newValues));
if(histtype == "phi")
fParticleGun->UserDefAngPhi(histpointCmd->GetNew3VectorValue(newValues));
if(histtype == "energy")
fParticleGun->UserEnergyHisto(histpointCmd->GetNew3VectorValue(newValues));
if(histtype == "arb")
fParticleGun->ArbEnergyHisto(histpointCmd->GetNew3VectorValue(newValues));
if(histtype == "epn")
fParticleGun->EpnEnergyHisto(histpointCmd->GetNew3VectorValue(newValues));
}
else if(command == arbintCmd)
{
fParticleGun->ArbInterpolate(newValues);
}
else if(command == verbosityCmd)
{
fParticleGun->SetVerbosity(verbosityCmd->GetNewIntValue(newValues));
}
else if( command==particleCmd )
{
if (newValues =="ion") {
fShootIon = true;
} else {
fShootIon = false;
G4ParticleDefinition* pd = particleTable->FindParticle(newValues);
if(pd != NULL)
{ fParticleGun->SetParticleDefinition( pd ); }
}
}
// else if(command == ionCmd)
// {
// fParticleGun->SetNucleus(ionCmd->GetNewNucleusValue(newValues));
// }
else if( command==timeCmd )
{ fParticleGun->SetParticleTime(timeCmd->GetNewDoubleValue(newValues)); }
else if( command==polCmd )
{ fParticleGun->SetParticlePolarization(polCmd->GetNew3VectorValue(newValues)); }
else if( command==numberCmd )
{ fParticleGun->SetNumberOfParticles(numberCmd->GetNewIntValue(newValues)); }
else if( command==ionCmd )
{
if (fShootIon) {
G4Tokenizer next( newValues );
// check argument
fAtomicNumber = StoI(next());
fAtomicMass = StoI(next());
G4String sQ = next();
if (sQ.isNull()) {
fIonCharge = fAtomicNumber;
} else {
fIonCharge = StoI(sQ);
sQ = next();
if (sQ.isNull()) {
fIonExciteEnergy = 0.0;
} else {
fIonExciteEnergy = StoD(sQ) * keV;
}
}
G4ParticleDefinition* ion;
ion = particleTable->GetIon( fAtomicNumber, fAtomicMass, fIonExciteEnergy);
if (ion==0) {
G4cout << "Ion with Z=" << fAtomicNumber;
G4cout << " A=" << fAtomicMass << "is not be defined" << G4endl;
} else {
fParticleGun->SetParticleDefinition(ion);
fParticleGun->SetParticleCharge(fIonCharge*eplus);
}
} else {
G4cout << "Set /gps/particle to ion before using /gps/ion command";
G4cout << G4endl;
}
}
else
{
G4cout << "Error entering command" << G4endl;
}
}
G4String G4GeneralParticleSourceMessenger::GetCurrentValue(G4UIcommand * command)
{
G4String cv;
// if( command==directionCmd )
// { cv = directionCmd->ConvertToString(fParticleGun->GetParticleMomentumDirection()); }
// else if( command==energyCmd )
// { cv = energyCmd->ConvertToString(fParticleGun->GetParticleEnergy(),"GeV"); }
// else if( command==positionCmd )
// { cv = positionCmd->ConvertToString(fParticleGun->GetParticlePosition(),"cm"); }
// else if( command==timeCmd )
// { cv = timeCmd->ConvertToString(fParticleGun->GetParticleTime(),"ns"); }
// else if( command==polCmd )
// { cv = polCmd->ConvertToString(fParticleGun->GetParticlePolarization()); }
// else if( command==numberCmd )
// { cv = numberCmd->ConvertToString(fParticleGun->GetNumberOfParticles()); }
cv = "Not implemented yet";
return cv;
}
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEPEvtInterface.cc,v 1.3 1999/12/15 14:49:40 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------------
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEPEvtParticle.cc,v 1.2 1999/12/15 14:49:40 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
+11 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ParticleGun.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4ParticleGun.cc,v 1.3 2000/10/18 12:41:25 kurasige Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// G4ParticleGun
@@ -45,6 +45,7 @@ void G4ParticleGun::SetInitialValues()
particle_position = zero;
particle_time = 0.0;
particle_polarization = zero;
particle_charge = 0.0;
theMessenger = new G4ParticleGunMessenger(this);
}
@@ -53,6 +54,13 @@ G4ParticleGun::~G4ParticleGun()
delete theMessenger;
}
void G4ParticleGun::SetParticleDefinition
(G4ParticleDefinition * aParticleDefinition)
{
particle_definition = aParticleDefinition;
particle_charge = particle_definition->GetPDGCharge();
}
void G4ParticleGun::SetParticleMomentum(G4ParticleMomentum aMomentum)
{
if(particle_definition==NULL)
@@ -101,6 +109,7 @@ void G4ParticleGun::GeneratePrimaryVertex(G4Event* evt)
G4PrimaryParticle* particle =
new G4PrimaryParticle(particle_definition,px,py,pz);
particle->SetMass( mass );
particle->SetCharge( particle_charge );
particle->SetPolarization(particle_polarization.x(),
particle_polarization.y(),
particle_polarization.z());
+85 -7
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ParticleGunMessenger.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4ParticleGunMessenger.cc,v 1.4 2000/10/19 13:29:38 kurasige Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4ParticleGunMessenger.hh"
@@ -14,6 +14,7 @@
#include "G4Geantino.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithoutParameter.hh"
#include "G4UIcmdWithAString.hh"
@@ -23,8 +24,13 @@
#include "G4UIcmdWithAnInteger.hh"
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4rw/ctoken.h"
#include "g4rw/rstream.h"
#include "g4std/strstream"
G4ParticleGunMessenger::G4ParticleGunMessenger(G4ParticleGun * fPtclGun)
:fParticleGun(fPtclGun)
:fParticleGun(fPtclGun),fShootIon(false)
{
particleTable = G4ParticleTable::GetParticleTable();
@@ -38,6 +44,7 @@ G4ParticleGunMessenger::G4ParticleGunMessenger(G4ParticleGun * fPtclGun)
particleCmd = new G4UIcmdWithAString("/gun/particle",this);
particleCmd->SetGuidance("Set particle to be generated.");
particleCmd->SetGuidance(" (geantino is default)");
particleCmd->SetGuidance(" (ion can be specified for shooting ions)");
particleCmd->SetParameterName("particleName",true);
particleCmd->SetDefaultValue("geantino");
G4String candidateList;
@@ -47,6 +54,7 @@ G4ParticleGunMessenger::G4ParticleGunMessenger(G4ParticleGun * fPtclGun)
candidateList += particleTable->GetParticleName(i);
candidateList += " ";
}
candidateList += "ion ";
particleCmd->SetCandidates(candidateList);
directionCmd = new G4UIcmdWith3Vector("/gun/direction",this);
@@ -85,6 +93,28 @@ G4ParticleGunMessenger::G4ParticleGunMessenger(G4ParticleGun * fPtclGun)
numberCmd->SetGuidance("Set number of particles to be generated.");
numberCmd->SetParameterName("N",true,true);
numberCmd->SetRange("N>0");
ionCmd = new G4UIcommand("/gun/ion",this);
ionCmd->SetGuidance("Set properties of ion to be generated.");
ionCmd->SetGuidance("[usage] /gun/ion Z A Q");
ionCmd->SetGuidance(" Z:(int) AtomicNumber");
ionCmd->SetGuidance(" A:(int) AtomicMass");
ionCmd->SetGuidance(" Q:(int) Charge of Ion (in unit of e)");
ionCmd->SetGuidance(" E:(double) Excitation energy (in keV)");
G4UIparameter* param;
param = new G4UIparameter("Z",'i',false);
param->SetDefaultValue("1");
ionCmd->SetParameter(param);
param = new G4UIparameter("A",'i',false);
param->SetDefaultValue("1");
ionCmd->SetParameter(param);
param = new G4UIparameter("Q",'i',true);
param->SetDefaultValue("0");
ionCmd->SetParameter(param);
param = new G4UIparameter("E",'d',true);
param->SetDefaultValue("0.0");
ionCmd->SetParameter(param);
// set initial value to G4ParticleGun
fParticleGun->SetParticleDefinition( G4Geantino::Geantino() );
@@ -113,9 +143,14 @@ void G4ParticleGunMessenger::SetNewValue(G4UIcommand * command,G4String newValue
{ particleTable->DumpTable(); }
else if( command==particleCmd )
{
G4ParticleDefinition* pd = particleTable->FindParticle(newValues);
if(pd != NULL)
{ fParticleGun->SetParticleDefinition( pd ); }
if (newValues =="ion") {
fShootIon = true;
} else {
fShootIon = false;
G4ParticleDefinition* pd = particleTable->FindParticle(newValues);
if(pd != NULL)
{ fParticleGun->SetParticleDefinition( pd ); }
}
}
else if( command==directionCmd )
{ fParticleGun->SetParticleMomentumDirection(directionCmd->GetNew3VectorValue(newValues)); }
@@ -129,6 +164,40 @@ void G4ParticleGunMessenger::SetNewValue(G4UIcommand * command,G4String newValue
{ fParticleGun->SetParticlePolarization(polCmd->GetNew3VectorValue(newValues)); }
else if( command==numberCmd )
{ fParticleGun->SetNumberOfParticles(numberCmd->GetNewIntValue(newValues)); }
else if( command==ionCmd )
{
if (fShootIon) {
G4Tokenizer next( newValues );
// check argument
fAtomicNumber = StoI(next());
fAtomicMass = StoI(next());
G4String sQ = next();
if (sQ.isNull()) {
fIonCharge = fAtomicNumber;
} else {
fIonCharge = StoI(sQ);
sQ = next();
if (sQ.isNull()) {
fIonExciteEnergy = 0.0;
} else {
fIonExciteEnergy = StoD(sQ) * keV;
}
}
G4ParticleDefinition* ion;
ion = particleTable->GetIon( fAtomicNumber, fAtomicMass, fIonExciteEnergy);
if (ion==0) {
G4cout << "Ion with Z=" << fAtomicNumber;
G4cout << " A=" << fAtomicMass << "is not be defined" << G4endl;
} else {
fParticleGun->SetParticleDefinition(ion);
fParticleGun->SetParticleCharge(fIonCharge*eplus);
}
} else {
G4cout << "Set /gun/particle to ion before using /gun/ion command";
G4cout << G4endl;
}
}
}
G4String G4ParticleGunMessenger::GetCurrentValue(G4UIcommand * command)
@@ -149,7 +218,16 @@ G4String G4ParticleGunMessenger::GetCurrentValue(G4UIcommand * command)
{ cv = polCmd->ConvertToString(fParticleGun->GetParticlePolarization()); }
else if( command==numberCmd )
{ cv = numberCmd->ConvertToString(fParticleGun->GetNumberOfParticles()); }
else if( command==ionCmd )
{
if (fShootIon) {
cv = ItoS(fAtomicNumber) + " " + ItoS(fAtomicMass) + " ";
cv += ItoS(fIonCharge);
} else {
cv = "";
}
}
return cv;
}
+8 -7
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PrimaryParticle.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4PrimaryParticle.cc,v 1.3 2000/10/19 15:19:37 asaim Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4PrimaryParticle.hh"
@@ -19,33 +19,33 @@ G4Allocator<G4PrimaryParticle> aPrimaryParticleAllocator;
G4PrimaryParticle::G4PrimaryParticle()
:PDGcode(0),G4code(NULL),Px(0.),Py(0.),Pz(0.),
nextParticle(NULL),daughterParticle(NULL),trackID(-1),
mass(0.),polX(0.),polY(0.),polZ(0.)
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0)
{;}
G4PrimaryParticle::G4PrimaryParticle(G4int Pcode)
:PDGcode(Pcode),Px(0.),Py(0.),Pz(0.),
nextParticle(NULL),daughterParticle(NULL),trackID(-1),
mass(0.),polX(0.),polY(0.),polZ(0.)
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0)
{ G4code = G4ParticleTable::GetParticleTable()->FindParticle(Pcode); }
G4PrimaryParticle::G4PrimaryParticle(G4int Pcode,
G4double px,G4double py,G4double pz)
:PDGcode(Pcode),Px(px),Py(py),Pz(pz),
nextParticle(NULL),daughterParticle(NULL),trackID(-1),
mass(0.),polX(0.),polY(0.),polZ(0.)
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0)
{ G4code = G4ParticleTable::GetParticleTable()->FindParticle(Pcode); }
G4PrimaryParticle::G4PrimaryParticle(G4ParticleDefinition* Gcode)
:G4code(Gcode),Px(0.),Py(0.),Pz(0.),
nextParticle(NULL),daughterParticle(NULL),trackID(-1),
mass(0.),polX(0.),polY(0.),polZ(0.)
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0)
{ PDGcode = Gcode->GetPDGEncoding(); }
G4PrimaryParticle::G4PrimaryParticle(G4ParticleDefinition* Gcode,
G4double px,G4double py,G4double pz)
:G4code(Gcode),Px(px),Py(py),Pz(pz),
nextParticle(NULL),daughterParticle(NULL),trackID(-1),
mass(0.),polX(0.),polY(0.),polZ(0.)
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0)
{ PDGcode = Gcode->GetPDGEncoding(); }
G4PrimaryParticle::~G4PrimaryParticle()
@@ -86,6 +86,7 @@ void G4PrimaryParticle::Print() const
G4cout << " Momentum ( " << Px << ", " << Py << ", " << Pz << " )" << G4endl;
G4cout << " Polarization ( " << polX << ", " << polY << ", "
<< polZ << " )" << G4endl;
G4cout << " Weight : " << Weight0 << G4endl;
if(daughterParticle != NULL)
{
G4cout << ">>>> Daughters" << G4endl;
+13 -6
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PrimaryTransformer.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4PrimaryTransformer.cc,v 1.5 2000/10/19 15:19:37 asaim Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4PrimaryTransformer.hh"
@@ -44,6 +44,7 @@ void G4PrimaryTransformer::GenerateTracks(G4PrimaryVertex* primaryVertex)
G4double Y0 = primaryVertex->GetY0();
G4double Z0 = primaryVertex->GetZ0();
G4double T0 = primaryVertex->GetT0();
G4double WV = primaryVertex->GetWeight();
#ifdef G4VERBOSE
if(verboseLevel>1)
@@ -59,14 +60,14 @@ void G4PrimaryTransformer::GenerateTracks(G4PrimaryVertex* primaryVertex)
G4PrimaryParticle* primaryParticle = primaryVertex->GetPrimary();
while( primaryParticle != NULL )
{
GenerateSingleTrack( primaryParticle, X0, Y0, Z0, T0 );
GenerateSingleTrack( primaryParticle, X0, Y0, Z0, T0, WV );
primaryParticle = primaryParticle->GetNext();
}
}
void G4PrimaryTransformer::GenerateSingleTrack
(G4PrimaryParticle* primaryParticle,
G4double x0,G4double y0,G4double z0,G4double t0)
G4double x0,G4double y0,G4double z0,G4double t0,G4double wv)
{
G4ParticleDefinition* partDef = GetDefinition(primaryParticle);
if((!partDef)||partDef->IsShortLived())
@@ -82,7 +83,7 @@ void G4PrimaryTransformer::GenerateSingleTrack
G4PrimaryParticle* daughter = primaryParticle->GetDaughter();
while(daughter)
{
GenerateSingleTrack(daughter,x0,y0,z0,t0);
GenerateSingleTrack(daughter,x0,y0,z0,t0,wv);
daughter = daughter->GetNext();
}
}
@@ -104,12 +105,18 @@ void G4PrimaryTransformer::GenerateSingleTrack
DP->SetPolarization(primaryParticle->GetPolX(),
primaryParticle->GetPolY(),
primaryParticle->GetPolZ());
// Set Charge
if (abs(primaryParticle->GetCharge()-DP->GetCharge())>eplus) {
DP->SetCharge(primaryParticle->GetCharge());
}
// Set decay products to the DynamicParticle
SetDecayProducts( primaryParticle, DP );
// Create G4Track object
G4Track* track = new G4Track(DP,t0,G4ThreeVector(x0,y0,z0));
// Set parentID to 0 as a primary particle
track->SetParentID(0);
// Set weight ( vertex weight * particle weight )
track->SetWeight(wv*(primaryParticle->GetWeight()));
// Store it to G4TrackVector
TV.insert( track );
}
@@ -120,7 +127,7 @@ void G4PrimaryTransformer::SetDecayProducts
{
G4PrimaryParticle* daughter = mother->GetDaughter();
if(!daughter) return;
G4DecayProducts* decayProducts = motherDP->GetPreAssignedDecayProducts();
G4DecayProducts* decayProducts = (G4DecayProducts*)(motherDP->GetPreAssignedDecayProducts() );
if(!decayProducts)
{
decayProducts = new G4DecayProducts(*motherDP);
+7 -6
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PrimaryVertex.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4PrimaryVertex.cc,v 1.3 2000/10/19 15:19:37 asaim Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4PrimaryVertex.hh"
@@ -16,18 +16,18 @@ G4Allocator<G4PrimaryVertex> aPrimaryVertexAllocator;
G4PrimaryVertex::G4PrimaryVertex()
:X0(0.),Y0(0.),Z0(0.),T0(0.),numberOfParticle(0),nextVertex(NULL),
theParticle(NULL),theTail(NULL)
theParticle(NULL),theTail(NULL),Weight0(1.0)
{;}
G4PrimaryVertex::G4PrimaryVertex(
G4double x0,G4double y0,G4double z0,G4double t0)
:X0(x0),Y0(y0),Z0(z0),T0(t0),numberOfParticle(0),nextVertex(NULL),
theParticle(NULL),theTail(NULL)
theParticle(NULL),theTail(NULL),Weight0(1.0)
{;}
G4PrimaryVertex::G4PrimaryVertex(G4ThreeVector xyz0,G4double t0)
:T0(t0),numberOfParticle(0),nextVertex(NULL),
theParticle(NULL),theTail(NULL)
theParticle(NULL),theTail(NULL),Weight0(1.0)
{
X0=xyz0.x();
Y0=xyz0.y();
@@ -53,7 +53,8 @@ int G4PrimaryVertex::operator!=(const G4PrimaryVertex &right) const
void G4PrimaryVertex::Print() const
{
G4cout << "Vertex ( "
<< X0 << ", " << Y0 << ", " << Z0 << ", " << T0 << " )" << G4endl;
<< X0 << ", " << Y0 << ", " << Z0 << ", " << T0 << " )"
<< " Weight " << Weight0 << G4endl;
G4cout << "#### Primary particles" << G4endl;
G4PrimaryParticle* aPrim = theParticle;
if(aPrim != NULL)
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4StackManager.cc,v 1.3 2000/01/26 06:42:16 asaim Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Last Modification : 09/Dec/96 M.Asai
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4StackedTrack.cc,v 1.3 2000/01/26 06:42:16 asaim Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Last Modification : 02/Feb/96 M.Asai
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4StackingMessenger.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// --------------------------------------------------------------------
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4TrackStack.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// Last Modification : 09/Dec/96 M.Asai
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UserEventAction.cc,v 1.3 1999/12/15 14:49:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4UserEventAction.hh"
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4UserStackingAction.cc,v 1.3 1999/12/15 14:49:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#include "G4UserStackingAction.hh"
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VPrimaryGenerator.cc,v 1.2 1999/12/15 14:49:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// G4VPrimaryGenerator

Some files were not shown because too many files have changed in this diff Show More