Import Geant4 5.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:15:15 +02:00
parent 37fff30d2e
commit fbd4999cf7
4396 changed files with 56662 additions and 52446 deletions
Binary file not shown.
+7 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.2 2002/11/26 19:43:24 duns Exp $
$Id: History,v 1.5 2003/04/04 17:29:39 duns Exp $
-------------------------------------------------------------------
=========================================================
@@ -10,6 +10,12 @@ $Id: History,v 1.2 2002/11/26 19:43:24 duns Exp $
----------------------------------------------------------
---------------------------------------------------------------------------
3rd April 2003 Mark Donszelmann (examples-analysis-A01-V05-00-00)
- Added 2 more histograms to the example
- Fixed NullPointerException by letting SDManager delete the detectors created in
DetectorConstruction.cc
- Added comment when quitting Geant4 that JAS window still needs closing.
26th November 2002 Mark Donszelmann
- Fixed DrifChamberHit to have a reasonable screensize (2) rather than 0.1
- Fixed minimum value for EmCalHit color to be visible (0.4).
+14
View File
@@ -0,0 +1,14 @@
A01 Example
-----------
By default (without sourcing setup-analysis) the compilation
will link in a DummyAnalysisFactory which will not produce
anything for analysis.
The default graphics drivers are always linked in and can be used
to generate event output.
You can link this example with a specific AIDA compliant
analysis implementation. See other READMEs.
README.JAIDA for linking JAS-AIDA to Geant4.
http://java.freehep.org/jaida/RelatedProjects.html
@@ -0,0 +1,18 @@
JAIDA-Geant4
============
http://java.freehep.org/lib/freehep/doc/aida/geant4.html
-----------
Ported to: Linux-g++, WIN32-VC, SUN-CC, Darwin-g++, Darwin-g++
To link with JAIDA and JAS, make sure you have:
1. JDK_HOME set to your Java Standard Development Kit (1.4.x or up).
2. the JAIDA-x.x.x-Geant4.x.x tar or zip file overlayed on geant4.
3. GEANT4_HOME set to your geant4 directory.
now execute:
source setup-analysis (.csh, .sh, .win32)
gmake
+2 -2
View File
@@ -5,12 +5,12 @@
#
# Create empty scene ("world" is default)
#
/vis/scene/create
/vis/scene/create G4Output
#
# Create a scene handler for a specific graphics system
# Edit the next line(s) to choose another graphic system
#
/vis/open HepRep
/vis/open HepRepXML
/vis/viewer/set/culling global false
#/vis/scene/endOfEventAction accumulate
#
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01DetectorConstruction.hh,v 1.3 2002/12/13 11:34:28 gunter Exp $
// $Id: A01DetectorConstruction.hh,v 1.4 2002/12/20 21:40:29 duns Exp $
// --------------------------------------------------------------
//
@@ -66,15 +66,6 @@ class A01DetectorConstruction : public G4VUserDetectorConstruction
G4Material* lead;
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
G4VSensitiveDetector* hodoscope1;
G4VSensitiveDetector* hodoscope2;
G4VSensitiveDetector* chamber1;
G4VSensitiveDetector* chamber2;
G4VSensitiveDetector* EMcalorimeter;
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
G4VSensitiveDetector* HadCalorimeter;
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
G4VisAttributes* worldVisAtt;
G4VisAttributes* magneticVisAtt;
G4VisAttributes* armVisAtt;
@@ -1,36 +1,76 @@
#
# Change this to point to your Java installation
#
setenv JDK_HOME /usr/java/jdk1.4.1
if (! -e $JDK_HOME/bin/java) then
echo "You need to install Java and/or modify script to set JDK_HOME correctly"
goto end
endif
setenv G4ANALYSIS_USE 1
setenv G4ANALYSIS_AIDA_CONFIG_LIBS "-lAIDAJNI -lFHJNI -L$JDK_HOME/jre/lib/i386/client -ljvm"
touch src/DummyAnalysisFactory.cc
setenv JVM_ARGS "-Dhep.aida.IAnalysisFactory=jas.aida.gui.JASGUIAnalysisFactory"
setenv LD_LIBRARY_PATH $JDK_HOME/jre/lib/i386/client:$JDK_HOME/jre/lib/i386
setenv JLIBPATH $G4INSTALL/lib/java
if (! -e $JLIBPATH/aida.jar) then
echo "The AIDA.jar files seem to be missing, make sure JAIDA-G4 patch has been applied"
echo "and that G4INSTALL is set correctly"
goto end
endif
setenv CLASSPATH "$JLIBPATH/JASAIDA.jar"
setenv CLASSPATH "$CLASSPATH:$JLIBPATH/aida.jar"
setenv CLASSPATH "$CLASSPATH:$JLIBPATH/aida-dev.jar"
setenv CLASSPATH "$CLASSPATH:$JLIBPATH/freehep-hep.jar"
setenv CLASSPATH "$CLASSPATH:$JLIBPATH/freehep-base.jar"
setenv CLASSPATH "$CLASSPATH:$JLIBPATH/openide-lookup.jar"
setenv CLASSPATH "$CLASSPATH:$JLIBPATH/jas.jar"
setenv CLASSPATH "$CLASSPATH:$JLIBPATH/jel.jar"
echo "JDK_HOME set to $JDK_HOME"
echo "JVM_ARGS set to $JVM_ARGS"
echo "CLASSPATH set to $CLASSPATH"
echo "LD_LIBRARY_PATH set to $LD_LIBRARY_PATH"
echo "G4ANALYSIS_AIDA_CONFIG_LIBS set to $G4ANALYSIS_AIDA_CONFIG_LIBS"
end:
#
# Setup for Unix (Linux, Solaris, MacOS X)
#
#
# Change this to point to your Java installation
#
#setenv JDK_HOME "/usr/java/jdk1.4.1"
#
#
# No User Configuration below.
#
if (! $?JDK_HOME) then
setenv JDK_HOME /usr/java/jdk1.4.1
endif
if (! -e $JDK_HOME/bin/java) then
echo "You need to install Java and/or modify script to set JDK_HOME correctly"
goto end
endif
if (! $?GEANT4_HOME ) then
if (! $?G4INSTALL ) then
setenv GEANT4_HOME "../../../.."
else
setenv GEANT4_HOME $G4INSTALL
endif
endif
setenv JLIBPATH "$GEANT4_HOME/extlib/java"
if (! -e $JLIBPATH/aida.jar) then
echo "The AIDA.jar files seem to be missing, make sure JAIDA-Geant4 patch has been applied"
echo "and that GEANT4_HOME is set correctly"
goto end
endif
setenv G4ANALYSIS_USE 1
setenv G4ANALYSIS_AIDA_CONFIG_LIBS "-L$GEANT4_HOME/extlib/$G4SYSTEM -lAIDAJNI -lFHJNI"
touch src/DummyAnalysisFactory.cc
setenv JVM_ARGS "-Dhep.aida.IAnalysisFactory=jas.aida.gui.JASGUIAnalysisFactory"
switch ($G4SYSTEM)
case "Linux*":
setenv LD_LIBRARY_PATH $JDK_HOME/jre/lib/i386:${LD_LIBRARY_PATH}
setenv LD_LIBRARY_PATH $JDK_HOME/jre/lib/i386/client:${LD_LIBRARY_PATH}
setenv LD_LIBRARY_PATH ${GEANT4_HOME}/extlib/${G4SYSTEM}:${LD_LIBRARY_PATH}
setenv G4ANALYSIS_AIDA_CONFIG_LIBS "$G4ANALYSIS_AIDA_CONFIG_LIBS -L$JDK_HOME/jre/lib/i386/client -ljvm"
breaksw
case "SUN*":
setenv LD_LIBRARY_PATH $JDK_HOME/jre/lib/sparc:${LD_LIBRARY_PATH}
setenv LD_LIBRARY_PATH $JDK_HOME/jre/lib/sparc/client:${LD_LIBRARY_PATH}
setenv LD_LIBRARY_PATH ${GEANT4_HOME}/extlib/${G4SYSTEM}:${LD_LIBRARY_PATH}
setenv G4ANALYSIS_AIDA_CONFIG_LIBS "$G4ANALYSIS_AIDA_CONFIG_LIBS -L$JDK_HOME/jre/lib/sparc -ljvm"
breaksw
case "Darwin*":
setenv G4ANALYSIS_AIDA_CONFIG_LIBS "$G4ANALYSIS_AIDA_CONFIG_LIBS -framework JavaVM"
breaksw
default:
breaksw
endsw
setenv CLASSPATH "$JLIBPATH/JASAIDA.jar"
setenv CLASSPATH "${CLASSPATH}:$JLIBPATH/aida.jar"
setenv CLASSPATH "${CLASSPATH}:$JLIBPATH/aida-dev.jar"
setenv CLASSPATH "${CLASSPATH}:$JLIBPATH/freehep-hep.jar"
setenv CLASSPATH "${CLASSPATH}:$JLIBPATH/freehep-base.jar"
setenv CLASSPATH "${CLASSPATH}:$JLIBPATH/openide-lookup.jar"
setenv CLASSPATH "${CLASSPATH}:$JLIBPATH/jas.jar"
setenv CLASSPATH "${CLASSPATH}:$JLIBPATH/jel.jar"
echo "JDK_HOME set to $JDK_HOME"
echo "JVM_ARGS set to $JVM_ARGS"
echo "CLASSPATH set to $CLASSPATH"
if ( $?LD_LIBRARY_PATH ) then
echo "LD_LIBRARY_PATH set to $LD_LIBRARY_PATH"
endif
echo "G4ANALYSIS_AIDA_CONFIG_LIBS set to $G4ANALYSIS_AIDA_CONFIG_LIBS"
end:
@@ -1,37 +1,83 @@
#
# Change this to point to your Java installation
#
export JDK_HOME=/usr/java/jdk1.4.1
if ! test -e $JDK_HOME/bin/java
then
echo "You need to install Java and/or modify script to set JDK_HOME correctly"
return
fi
export G4ANALYSIS_USE=1
export G4ANALYSIS_AIDA_CONFIG_LIBS="-lFREEHEP -L$JDK_HOME/jre/lib/i386/client -ljvm"
touch src/DummyAnalysisFactory.cc
export JVM_ARGS="-Dhep.aida.IAnalysisFactory=jas.aida.gui.JASGUIAnalysisFactory"
export LD_LIBRARY_PATH=$JDK_HOME/jre/lib/i386/client:$JDK_HOME/jre/lib/i386
export JLIBPATH=$G4INSTALL/lib/java
if ! test -e $JLIBPATH/aida.jar
then
echo "The AIDA.jar files seem to be missing, make sure JAIDA-G4 patch has been applied"
echo "and that G4INSTALL is set correctly"
return
fi
export CLASSPATH="$JLIBPATH/JASAIDA.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/aida.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/aida-dev.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/freehep-hep.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/freehep-base.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/openide-lookup.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/jas.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/jel.jar"
echo "JDK_HOME set to $JDK_HOME"
echo "JVM_ARGS set to $JVM_ARGS"
echo "CLASSPATH set to $CLASSPATH"
echo "LD_LIBRARY_PATH set to $LD_LIBRARY_PATH"
echo "G4ANALYSIS_AIDA_CONFIG_LIBS set to $G4ANALYSIS_AIDA_CONFIG_LIBS"
#
# Setup for Unix (Linux, Solaris, MacOS X)
#
#
# Change this to point to your Java installation
#
#export JDK_HOME="/usr/java/jdk1.4.1"
#
#
# No User Configuration below.
#
if test ! "${JDK_HOME:+x}"
then
export JDK_HOME=/usr/java/jdk1.4.1
fi
if ! test -e $JDK_HOME/bin/java
then
echo "You need to install Java and/or modify script to set JDK_HOME correctly"
return
fi
if test ! "${GEANT4_HOME:+x}"
then
if test ! "${G4INSTALL:+x}"
then
GEANT4_HOME="../../../.."
else
GEANT4_HOME=$G4INSTALL
fi
fi
export JLIBPATH=$GEANT4_HOME/extlib/java
if ! test -e $JLIBPATH/aida.jar
then
echo "The AIDA.jar files seem to be missing, make sure JAIDA-Geant4 patch has been applied"
echo "and that GEANT4_HOME is set correctly"
return
fi
export G4ANALYSIS_USE=1
export G4ANALYSIS_AIDA_CONFIG_LIBS="-L$GEANT4_HOME/extlib/$G4SYSTEM -lAIDAJNI -lFHJNI"
touch src/DummyAnalysisFactory.cc
export JVM_ARGS="-Dhep.aida.IAnalysisFactory=jas.aida.gui.JASGUIAnalysisFactory"
case $G4SYSTEM in
Linux*)
LD_LIBRARY_PATH=$JDK_HOME/jre/lib/i386:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$JDK_HOME/jre/lib/i386/client:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$GEANT4_HOME/extlib/$G4SYSTEM:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
G4ANALYSIS_AIDA_CONFIG_LIBS="$G4ANALYSIS_AIDA_CONFIG_LIBS -L$JDK_HOME/jre/lib/i386/client -ljvm"
;;
SUN*)
LD_LIBRARY_PATH=$JDK_HOME/jre/lib/sparc:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$JDK_HOME/jre/lib/sparc/client:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$GEANT4_HOME/extlib/$G4SYSTEM:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
G4ANALYSIS_AIDA_CONFIG_LIBS="$G4ANALYSIS_AIDA_CONFIG_LIBS -L$JDK_HOME/jre/lib/sparc -ljvm"
;;
Darwin*)
G4ANALYSIS_AIDA_CONFIG_LIBS="$G4ANALYSIS_AIDA_CONFIG_LIBS -framework JavaVM"
;;
*)
break
esac
export CLASSPATH="$JLIBPATH/JASAIDA.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/aida.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/aida-dev.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/freehep-hep.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/freehep-base.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/openide-lookup.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/jas.jar"
CLASSPATH="$CLASSPATH:$JLIBPATH/jel.jar"
echo "JDK_HOME set to $JDK_HOME"
echo "JVM_ARGS set to $JVM_ARGS"
echo "CLASSPATH set to $CLASSPATH"
if test "${GEANT4_HOME:+x}"
then
echo "LD_LIBRARY_PATH set to $LD_LIBRARY_PATH"
fi
echo "G4ANALYSIS_AIDA_CONFIG_LIBS set to $G4ANALYSIS_AIDA_CONFIG_LIBS"
@@ -1,37 +1,61 @@
#
# Change this to point to your Java installation
#
export JDK_HOME="/cygdrive/c/java/j2sdk1.4.1"
if ! test -e $JDK_HOME/bin/java
then
echo "You need to install Java and/or modify script to set JDK_HOME correctly"
return
fi
export G4ANALYSIS_USE=1
export G4ANALYSIS_AIDA_CONFIG_LIBS="-lAIDAJNI -lFHJNI -ljvm"
touch src/DummyAnalysisFactory.cc
export JVM_ARGS="-Dhep.aida.IAnalysisFactory=jas.aida.gui.JASGUIAnalysisFactory"
export PATH=$PATH:$JDK_HOME/jre/bin/hotspot:$JDK_HOME/jre/bin/client
export JLIBPATH=$G4INSTALL/lib/java
if ! test -e $JLIBPATH/aida.jar
then
echo "The AIDA.jar files seem to be missing, make sure JAIDA-G4 patch has been applied"
echo "and that G4INSTALL is set correctly"
return
fi
export CLASSPATH="$JLIBPATH/JASAIDA.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/aida.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/aida-dev.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/freehep-hep.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/freehep-base.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/openide-lookup.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/jas.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/jel.jar"
echo "JDK_HOME set to $JDK_HOME"
echo "JVM_ARGS set to $JVM_ARGS"
echo "CLASSPATH set to $CLASSPATH"
echo "PATH set to $PATH"
echo "G4ANALYSIS_AIDA_CONFIG_LIBS set to $G4ANALYSIS_AIDA_CONFIG_LIBS"
#
# Setup for Windows
#
#
# Change this to point to your Java installation
#
#export JDK_HOME="/cygdrive/c/java/j2sdk1.4.1"
#
#
# No User Configuration below.
#
if test ! "${JDK_HOME:+x}"
then
export JDK_HOME="/cygdrive/c/java/j2sdk1.4.1"
fi
if ! test -e $JDK_HOME/bin/java
then
echo "You need to install Java and/or modify script to set JDK_HOME correctly"
return
fi
if test ! "${GEANT4_HOME:+x}"
then
if test ! "${G4INSTALL:+x}"
then
GEANT4_HOME="../../../.."
else
GEANT4_HOME=$G4INSTALL
fi
fi
export JLIBPATH=$GEANT4_HOME/extlib/java
if ! test -e $JLIBPATH/aida.jar
then
echo "The AIDA.jar files seem to be missing, make sure JAIDA-Geant4 patch has been applied"
echo "and that GEANT4_HOME is set correctly"
return
fi
export G4ANALYSIS_USE=1
cp $JDK_HOME/lib/jvm.lib $GEANT4_HOME/extlib/$G4SYSTEM
export G4ANALYSIS_AIDA_CONFIG_LIBS="'-libpath:'$GEANT4_HOME/extlib/$G4SYSTEM AIDAJNI.lib FHJNI.lib jvm.lib"
touch src/DummyAnalysisFactory.cc
export JVM_ARGS="-Dhep.aida.IAnalysisFactory=jas.aida.gui.JASGUIAnalysisFactory"
export PATH=$PATH:$JDK_HOME/jre/bin/client
export CLASSPATH="$JLIBPATH/JASAIDA.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/aida.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/aida-dev.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/freehep-hep.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/freehep-base.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/openide-lookup.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/jas.jar"
CLASSPATH="$CLASSPATH;$JLIBPATH/jel.jar"
echo "JDK_HOME set to $JDK_HOME"
echo "JVM_ARGS set to $JVM_ARGS"
echo "CLASSPATH set to $CLASSPATH"
echo "PATH set to $PATH"
echo "G4ANALYSIS_AIDA_CONFIG_LIBS set to $G4ANALYSIS_AIDA_CONFIG_LIBS"
@@ -104,6 +104,7 @@ A01AnalysisManager::~A01AnalysisManager()
delete tree;
delete tFactory;
delete hFactory;
G4cout << "Warning: Geant4 will NOT exit unless you close the JAS-AIDA window." << G4endl;
delete analysisFactory;
}
}
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01DetectorConstruction.cc,v 1.4 2002/12/13 11:34:33 gunter Exp $
// $Id: A01DetectorConstruction.cc,v 1.5 2002/12/20 21:40:30 duns Exp $
// --------------------------------------------------------------
//
@@ -63,8 +63,7 @@
A01DetectorConstruction::A01DetectorConstruction()
: air(0), argonGas(0), scintillator(0), CsI(0), lead(0),
hodoscope1(0), hodoscope2(0), chamber1(0), chamber2(0),
EMcalorimeter(0), HadCalorimeter(0), worldVisAtt(0), magneticVisAtt(0),
worldVisAtt(0), magneticVisAtt(0),
armVisAtt(0), hodoscopeVisAtt(0), chamberVisAtt(0),
wirePlaneVisAtt(0), EMcalorimeterVisAtt(0), cellVisAtt(0),
HadCalorimeterVisAtt(0), HadCalorimeterCellVisAtt(0),
@@ -84,13 +83,6 @@ A01DetectorConstruction::~A01DetectorConstruction()
DestroyMaterials();
delete hodoscope1;
delete hodoscope2;
delete chamber1;
delete chamber2;
delete EMcalorimeter;
delete HadCalorimeter;
delete worldVisAtt;
delete magneticVisAtt;
delete armVisAtt;
@@ -105,6 +97,16 @@ A01DetectorConstruction::~A01DetectorConstruction()
G4VPhysicalVolume* A01DetectorConstruction::Construct()
{
// All managed (deleted) by SDManager
G4VSensitiveDetector* hodoscope1;
G4VSensitiveDetector* hodoscope2;
G4VSensitiveDetector* chamber1;
G4VSensitiveDetector* chamber2;
G4VSensitiveDetector* EMcalorimeter;
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
G4VSensitiveDetector* HadCalorimeter;
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ConstructMaterials();
// Magnetic field ----------------------------------------------------------
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01EventAction.cc,v 1.3 2002/12/13 11:34:34 gunter Exp $
// $Id: A01EventAction.cc,v 1.4 2002/12/20 21:40:30 duns Exp $
// --------------------------------------------------------------
//
@@ -87,11 +87,12 @@ A01EventAction::A01EventAction()
plotter = analysisManager->createPlotter();
if (plotter)
{
plotter->createRegions(2,2);
plotter->createRegions(3,2);
plotter->region(0)->plot(*dc1Hits);
plotter->region(1)->plot(*dc2Hits);
plotter->region(2)->plot(*dc1XY);
plotter->region(3)->plot(*evstof);
plotter->region(3)->plot(*dc2XY);
plotter->region(4)->plot(*evstof);
plotter->show();
}
}
@@ -166,7 +167,6 @@ void A01EventAction::EndOfEventAction(const G4Event* evt)
}
}
// Fill the tuple
if (tuple)
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01.cc,v 1.8 2001/11/16 14:35:10 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// --------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01AnalysisManager.hh,v 1.5 2001/11/16 14:30:50 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01CalorHit.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01CalorimeterSD.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01DetectorConstruction.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01DetectorMessenger.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01EventAction.hh,v 1.4 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01PhysicsList.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01PrimaryGeneratorAction.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01PrimaryGeneratorMessenger.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01RunAction.hh,v 1.4 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01SteppingAction.hh,v 1.4 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01SteppingVerbose.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01VisManager.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01AnalysisManager.cc,v 1.11 2001/11/16 14:31:11 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// Guy Barrand 14th Septembre 2000.
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01CalorHit.cc,v 1.3 2001/11/16 14:31:11 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01CalorimeterSD.cc,v 1.3 2001/11/16 14:31:12 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01DetectorConstruction.cc,v 1.3 2001/11/16 14:31:12 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01DetectorMessenger.cc,v 1.4 2002/12/05 00:24:22 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01EventAction.cc,v 1.5 2001/11/16 14:31:12 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01PhysicsList.cc,v 1.3 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01PrimaryGeneratorAction.cc,v 1.3 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01PrimaryGeneratorMessenger.cc,v 1.4 2002/12/05 00:24:22 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01RunAction.cc,v 1.5 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01SteppingAction.cc,v 1.5 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01SteppingVerbose.cc,v 1.4 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: AnaEx01VisManager.cc,v 1.5 2002/11/13 20:59:45 duns Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// John Allison 24th January 1998.
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: exampleB01.cc,v 1.16 2002/11/07 13:50:29 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// --------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: B01DetectorConstruction.hh,v 1.5 2002/11/07 13:47:59 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B01DetectorConstruction_hh
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B01DetectorConstruction.cc,v 1.7 2002/11/22 17:47:57 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B01DetectorConstruction.cc,v 1.9 2003/03/11 13:54:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "g4std/strstream"
@@ -38,7 +38,6 @@
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "PhysicalConstants.h"
// for importance biasing
#include "G4IStore.hh"
@@ -253,22 +252,21 @@ G4VPhysicalVolume* B01DetectorConstruction::Construct()
fIStore = new G4IStore(*pWorldVolume);
// for the world volume repnum is -1 !
// for the world volume repnum is 0 !
G4int n = 0;
G4double imp =1;
fIStore->AddImportanceGeometryCell(1, *pWorldVolume);
for (G4std::vector<G4VPhysicalVolume *>::iterator it =
physvolumes.begin();
it != physvolumes.end(); it++)
{
imp = pow(2., n++);
G4cout << "Going to assign importance: " << imp << ", to volume: "
<< (*it)->GetName() << G4endl;
if (*it == pWorldVolume)
if (*it != pWorldVolume)
{
// repnum -1
fIStore->AddImportanceGeometryCell(imp, **it, -1);
imp = pow(2., n++);
G4cout << "Going to assign importance: " << imp << ", to volume: "
<< (*it)->GetName() << G4endl;
fIStore->AddImportanceGeometryCell(imp, **it);
}
fIStore->AddImportanceGeometryCell(imp, **it);
}
// the remaining part pf the geometry (rest) gets the same
@@ -22,7 +22,7 @@
//
//
// $Id: B01PhysicsList.cc,v 1.4 2002/11/07 13:48:02 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: B01PrimaryGeneratorAction.cc,v 1.7 2002/11/07 13:48:02 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
+10 -8
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: exampleB02.cc,v 1.13 2002/11/13 15:10:27 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: exampleB02.cc,v 1.14 2003/03/11 13:54:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// --------------------------------------------------------------
@@ -103,17 +103,19 @@ int main(int argc, char **argv)
// ---------------------------------------------------
runManager->SetUserInitialization(new B02PhysicsList);
runManager->SetUserAction(new B02PrimaryGeneratorAction);
runManager->Initialize();
// runManager->Initialize();
// create a parallel detector
B02ImportanceDetectorConstruction *pdet =
new B02ImportanceDetectorConstruction;
runManager->Initialize();
// create an importance
G4IStore aIstore(pdet->GetWorldVolume());
// create a geometry cell for the world volume replpicanumber is -1!
G4GeometryCell gWorldVolumeCell(pdet->GetWorldVolume(), -1);
// create a geometry cell for the world volume replpicanumber is 0!
G4GeometryCell gWorldVolumeCell(pdet->GetWorldVolume(), 0);
// set world volume importance to 1
aIstore.AddImportanceGeometryCell(1, gWorldVolumeCell);
@@ -171,9 +173,9 @@ int main(int argc, char **argv)
// print a table of the scores
G4ScoreTable sp(&aIstore);
sp.Print(b02store.GetMapGeometryCellCellScorer(), myout);
sp.Print(b02store.GetMapGeometryCellCellScorer(), myout);
tree->commit();
tree->close();
@@ -181,7 +183,7 @@ int main(int argc, char **argv)
delete tf;
delete tree;
return 0;
}
+1 -1
View File
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-00 $
Geant4 version $Name: geant4-05-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -22,7 +22,7 @@
//
//
// $Id: B02CellScorer.hh,v 1.1 2002/11/08 14:52:16 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// Class B02CellScorer
@@ -22,7 +22,7 @@
//
//
// $Id: B02CellScorerStore.hh,v 1.1 2002/11/08 14:52:16 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// Class B02CellScorerStore
@@ -22,7 +22,7 @@
//
//
// $Id: B02DetectorConstruction.hh,v 1.3 2002/11/08 14:47:42 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B02DetectorConstruction_hh
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02ImportanceDetectorConstruction.hh,v 1.1 2002/11/08 14:52:16 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B02ImportanceDetectorConstruction.hh,v 1.2 2003/03/11 13:54:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B02ImportanceDetectorConstruction_hh
@@ -22,7 +22,7 @@
//
//
// $Id: B02ScoringDetectorConstruction.hh,v 1.2 2002/04/19 10:54:26 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B02ScoringDetectorConstruction_hh
@@ -22,7 +22,7 @@
//
//
// $Id: B02CellScorer.cc,v 1.1 2002/11/08 14:52:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: B02CellScorerStore.cc,v 1.1 2002/11/08 14:52:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02DetectorConstruction.cc,v 1.6 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B02DetectorConstruction.cc,v 1.7 2003/02/19 08:24:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "g4std/strstream"
@@ -38,7 +38,6 @@
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "PhysicalConstants.h"
// for importance biasing
#include "G4IStore.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02ImportanceDetectorConstruction.cc,v 1.2 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B02ImportanceDetectorConstruction.cc,v 1.4 2003/03/11 13:54:17 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -35,7 +35,6 @@
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
B02ImportanceDetectorConstruction::B02ImportanceDetectorConstruction()
@@ -48,16 +47,21 @@ B02ImportanceDetectorConstruction::~B02ImportanceDetectorConstruction()
void B02ImportanceDetectorConstruction::Construct()
{
G4String name;
G4double A, density, temperature, pressure;
G4int z;
G4String name("none");
G4double A(0), density(universe_mean_density), temperature(0), pressure(0);
G4int z(0);
name = "Galactic";
density = universe_mean_density; //from PhysicalConstants.h
pressure = 3.e-18*pascal;
temperature = 2.73*kelvin;
G4cout << density << " " << kStateGas << G4endl;
G4Material *Galactic =
new G4Material(name="Galactic", z=1, A=1.01*g/mole, density,
new G4Material(name, 1., 1.01*g/mole, density,
kStateGas,temperature,pressure);
//////////////////////////////////
// parallel world cylinder volume
//////////////////////////////////
@@ -87,7 +91,7 @@ void B02ImportanceDetectorConstruction::Construct()
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, -1));
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, 0));
@@ -168,7 +172,7 @@ void B02ImportanceDetectorConstruction::Construct()
0);
G4GeometryCell cell(*pvol, 0);
fPVolumeStore.AddPVolume(cell);
}
const G4VPhysicalVolume &B02ImportanceDetectorConstruction::
@@ -214,3 +218,4 @@ G4VPhysicalVolume &B02ImportanceDetectorConstruction::GetWorldVolume() const{
return *fWorldVolume;
}
@@ -22,7 +22,7 @@
//
//
// $Id: B02PhysicsList.cc,v 1.3 2002/11/08 14:47:48 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: B02PrimaryGeneratorAction.cc,v 1.5 2002/11/08 14:47:48 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B02ScoringDetectorConstruction.cc,v 1.5 2002/07/11 08:12:22 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B02ScoringDetectorConstruction.cc,v 1.6 2003/02/19 08:24:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -34,7 +34,6 @@
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
G4VPhysicalVolume* B02ScoringDetectorConstruction::Construct()
{
+1
View File
@@ -33,6 +33,7 @@ class G4RunManager(_object):
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, G4RunManager, name)
def BeamOn(*args): return apply(_B03App.G4RunManager_BeamOn,args)
def Initialize(*args): return apply(_B03App.G4RunManager_Initialize,args)
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<C G4RunManager instance at %s>" % (self.this,)
@@ -63,6 +63,8 @@ class B03Application:
self.CellRest = self.pgeom.GetGeometryCell(19)
r = self.base.GetRunManager()
r.Initialize()
def createIstoreAndScorer(self):
if "istore" in dir(self):
@@ -92,7 +94,7 @@ class B03Application:
# set importance of world volume
self.istore. \
AddImportanceGeometryCell(1, G4GeometryCell(self.p_world,-1))
AddImportanceGeometryCell(1, G4GeometryCell(self.p_world,0))
imp_cell_17 = self.istore.GetImportance(self.pgeom.GetGeometryCell(17))
self.istore. \
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: exampleB03.cc,v 1.10 2002/11/18 13:22:48 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// --------------------------------------------------------------
+1 -1
View File
@@ -1,5 +1,5 @@
**********************************************
Geant4 version $Name: geant4-05-00 $
Geant4 version $Name: geant4-05-01 $
(31-Jul-2002)
Copyright : Geant4 Collaboration
**********************************************
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: B03App.hh,v 1.3 2002/12/13 11:26:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// --------------------------------------------------------------------
#ifndef B03App_hh
@@ -26,6 +26,7 @@
class G4RunManager {
public:
void BeamOn(int e);
void Initialize();
};
class G4VIStore{
@@ -22,7 +22,7 @@
//
//
// $Id: B03DetectorConstruction.hh,v 1.4 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B03DetectorConstruction_hh
@@ -22,7 +22,7 @@
//
//
// $Id: B03ImportanceDetectorConstruction.hh,v 1.1 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B03ImportanceDetectorConstruction_hh
@@ -22,7 +22,7 @@
//
//
// $Id: B03PhysicsList.hh,v 1.3 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B03PhysicsList_h
@@ -22,7 +22,7 @@
//
//
// $Id: B03PrimaryGeneratorAction.hh,v 1.3 2002/11/08 17:35:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#ifndef B03PrimaryGeneratorAction_hh
+3 -3
View File
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: B03App.cc,v 1.3 2002/12/13 11:26:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B03App.cc,v 1.4 2003/03/11 13:54:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
// --------------------------------------------------------------------
#include "B03App.hh"
@@ -60,7 +60,7 @@ B03AppBase::B03AppBase(){
frunMgr->SetUserInitialization(fPhysics);
fPrimary = new B03PrimaryGeneratorAction;
frunMgr->SetUserAction(fPrimary);
frunMgr->Initialize();
// frunMgr->Initialize();
/*
// create the detector for the importances and scoring
@@ -1,27 +1,6 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.15u-20021012-1750
* Version 1.3.15u-20021124-1448
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
@@ -751,6 +730,22 @@ static PyObject *_wrap_G4RunManager_BeamOn(PyObject *self, PyObject *args) {
}
static PyObject *_wrap_G4RunManager_Initialize(PyObject *self, PyObject *args) {
PyObject *resultobj;
G4RunManager *arg1 ;
PyObject * obj0 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"O:G4RunManager_Initialize",&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_G4RunManager,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
(arg1)->Initialize();
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject * G4RunManager_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -2131,6 +2126,7 @@ static PyObject * B03AppBase_swigregister(PyObject *self, PyObject *args) {
}
static PyMethodDef SwigMethods[] = {
{ (char *)"G4RunManager_BeamOn", _wrap_G4RunManager_BeamOn, METH_VARARGS },
{ (char *)"G4RunManager_Initialize", _wrap_G4RunManager_Initialize, METH_VARARGS },
{ (char *)"G4RunManager_swigregister", G4RunManager_swigregister, METH_VARARGS },
{ (char *)"G4VIStore_swigregister", G4VIStore_swigregister, METH_VARARGS },
{ (char *)"G4VPhysicalVolume_swigregister", G4VPhysicalVolume_swigregister, METH_VARARGS },
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B03DetectorConstruction.cc,v 1.10 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B03DetectorConstruction.cc,v 1.11 2003/02/19 08:24:36 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "g4std/strstream"
@@ -38,7 +38,6 @@
#include "G4PVPlacement.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "PhysicalConstants.h"
B03DetectorConstruction::B03DetectorConstruction()
{;}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: B03ImportanceDetectorConstruction.cc,v 1.2 2002/11/22 17:47:58 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: B03ImportanceDetectorConstruction.cc,v 1.4 2003/03/11 13:54:18 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -35,7 +35,6 @@
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "PhysicalConstants.h"
B03ImportanceDetectorConstruction::B03ImportanceDetectorConstruction()
@@ -87,7 +86,7 @@ void B03ImportanceDetectorConstruction::Construct()
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
name, 0, false, 0);
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, -1));
fPVolumeStore.AddPVolume(G4GeometryCell(*fWorldVolume, 0));
@@ -22,7 +22,7 @@
//
//
// $Id: B03PhysicsList.cc,v 1.3 2002/11/08 17:35:19 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: B03PrimaryGeneratorAction.cc,v 1.5 2002/11/08 17:35:19 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
#include "globals.hh"
+15 -5
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.21 2002/11/25 10:41:12 dressel Exp $
$Id: History,v 1.23 2003/03/11 14:27:29 dressel Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,11 +17,21 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Nov 25th M. Dressel - exbiasing-V04-01-01
change README
Mar 11th, 2003 M. Dressel - exbiasing-V05-00-01
- changed the replica number of the world volume from -1 to 0
- Initialze() of the G4RunManager is now called after all Materials
and volumes (also in the parallel geometry) are built.
Nov 22th M. Dressel
changed geometry for scoring. Cells must not coinside with
Feb 19th, 2003 G.Cosmo - exbiasing-V05-00-00
- removed redundant inclusion of PhysicalConstants.h.
Now using CLHEP headers.
Nov 25th, 2002 M.Dressel - exbiasing-V04-01-01
- change README
Nov 22th, 2002 M.Dressel
- changed geometry for scoring. Cells must not coinside with
wolrd boundary since tracks would be killed before
scoring is called in the case a track exits a cell into
"out of world".
@@ -1,4 +1,4 @@
$Id: History,v 1.22 2002/12/11 14:19:17 maire Exp $
$Id: History,v 1.28 2003/03/27 11:16:16 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,24 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
27-03-03 mma (testem1-V05-00-05)
- modular physics list
26-03-03 V.Ivant (testem1-V05-00-04)
11-03-03 V.Ivant (testem1-V05-00-03)
- Remove all old interfaces to cuts
- Add definition of mean excitation energy for water
06-03-03 mma (testem1-V05-00-02)
- PhysicsList::SetCuts : suppress cutForProton
20-02-03 V.Ivant (testem1-V05-00-01)
- Migrade to cut per region
12-02-03 mma (testem1-V05-00-00)
- DetectorConstruction: change volume name
11-12-02 mma (testem1-V04-01-01)
- migration to AIDA 3.0
- UI commands under directory /testem/
@@ -22,7 +22,7 @@
//
//
// $Id: TestEm1.cc,v 1.8 2001/12/07 11:49:08 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,4 +1,4 @@
# $Id: TestEm1.in,v 1.5 2002/12/11 14:19:18 maire Exp $
# $Id: TestEm1.in,v 1.9 2003/03/26 17:49:54 vnivanch Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -6,10 +6,11 @@
# electron 100 MeV; all processes
#
/control/verbose 2
/tracking/verbose 0
#
/testem/phys/setGCut 2.20 mm
/testem/phys/setECut 6.05 mum
#
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
@@ -1,27 +1,9 @@
**********************************************
Geant4 version $Name: geant4-05-00 $
(13-Dec-2002)
Geant4 version $Name: geant4-05-01 $
(30-Apr-2003)
Copyright : Geant4 Collaboration
**********************************************
Visualization Manager instantiating...
Visualization Manager initialising...
Registering graphics systems...
You have successfully chosen to use the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
GAGTree (GAGTree)
G4HepRepFile (HepRepFile)
G4HepRep (HepRepXML)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
#
/testem/phys/setGCut 2.20 mm
/testem/phys/setECut 6.05 mum
#
/run/initialize
G4Material: Mean excitation energy is changed for Water Iold= 70.8926eV; Inew= 75 eV;
***** Table : Nb of materials = 11 *****
@@ -32,7 +14,7 @@ Current available graphics systems are:
Material: H2liquid density: 70.800 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.923 m
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Water density: 1.000 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 36.092 cm
Material: Water H_2O density: 1.000 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 36.092 cm
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 11.21 % Abundance 66.67 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 88.79 % Abundance 33.33 %
@@ -61,11 +43,39 @@ Current available graphics systems are:
---> Element: Uranium Z = 92.0 N = 238.0 A = 238.03 g/mole fractionMass: 100.00 % Abundance 100.00 %
Visualization Manager instantiating...
Visualization Manager initialising...
Registering graphics systems...
You have successfully chosen to use the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
GAGTree (GAGTree)
G4HepRepFile (HepRepFile)
G4HepRep (HepRepXML)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
/tracking/verbose 0
#
/testem/phys/setGCut 2.20 mm
/testem/phys/setECut 6.05 mum
#
/run/initialize
The Box is 20 m of Aluminium
phot: Total cross sections from Sandia parametrisation.
Em1PhysicsList::SetCuts:CutLength : 1 mm
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
#
/gun/particle e-
/gun/energy 100 MeV
/run/beamOn 100
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
@@ -82,7 +92,8 @@ msc: Tables of transport mean free paths.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
Step function: finalRange(mm)= 0.17, dRoverRange= 0.183
eBrem: Total cross sections from a NEW parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV.
@@ -103,6 +114,7 @@ hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
Step function: finalRange(mm)= 0.17, dRoverRange= 0.183
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
@@ -121,41 +133,18 @@ MuBrems: theoretical cross section
MuPairProd: theoretical cross sections
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
============= The cut Energy ==============================
gamma e-
Cut in range
Air 2.2 mm 6.05 mum
H2liquid 2.2 mm 6.05 mum
Water 2.2 mm 6.05 mum
liquidArgon 2.2 mm 6.05 mum
Aluminium 2.2 mm 6.05 mum
Silicon 2.2 mm 6.05 mum
Germanium 2.2 mm 6.05 mum
Iron 2.2 mm 6.05 mum
Tungsten 2.2 mm 6.05 mum
Lead 2.2 mm 6.05 mum
Uranium 2.2 mm 6.05 mum
Cut in energy
Air 990 eV 990 eV
H2liquid 990 eV 990 eV
Water 4.06 keV 3.27 keV
liquidArgon 9.08 keV 3.98 keV
Aluminium 9.99 keV 9.97 keV
Silicon 10 keV 8.45 keV
Germanium 31.6 keV 32.7 keV
Iron 31.1 keV 43.3 keV
Tungsten 139 keV 59.7 keV
Lead 124 keV 42.8 keV
Uranium 188 keV 56.1 keV
===================================================
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
#
/gun/particle e-
/gun/energy 100 MeV
/run/beamOn 100
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes recalculation needed : No
Material : Aluminium
Range cuts : gamma 2.2 mm e- 6.05 mum e+ 1 mm
Energy thresholds : gamma 9.98636 keV e- 9.96618 keV e+ 568.011 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
====================================================================
### Run 0 start.
--------- Ranecu engine status ---------
@@ -173,18 +162,18 @@ Start Run processing.
Run terminated.
Run Summary
Number of events processed : 100
User=15s Real=19s Sys=2.4s
User=19s Real=30s Sys=5.6s
nb tracks/event neutral: 27.8100 charged: 700.3100
nb steps/event neutral: 151.8700 charged: 1338.0800
nb tracks/event neutral: 27.9700 charged: 706.0200
nb steps/event neutral: 151.6800 charged: 2246.3000
nb of process calls per event:
eIoni eBrem compt phot conv annihil
1311.6600 25.0000 124.0600 26.3900 1.4200 1.4200
2219.7900 25.0300 123.7100 26.4900 1.4800 1.4800
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1272479250, 468362791
Current couple of seeds = 224687272, 1952306832
----------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
@@ -22,7 +22,7 @@
//
//
// $Id: Em1DetectorConstruction.hh,v 1.5 2001/12/07 11:49:09 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em1DetectorMessenger.hh,v 1.5 2002/12/11 14:19:22 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em1EventAction.hh,v 1.5 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em1EventActionMessenger.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em1PhysListEmModel.hh,v 1.1 2003/03/27 11:16:18 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PhysListEmModel_h
#define Em1PhysListEmModel_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PhysListEmModel : public G4VPhysicsConstructor
{
public:
Em1PhysListEmModel(const G4String& name = "model");
virtual ~Em1PhysListEmModel();
public:
// This method is dummy for physics.
virtual void ConstructParticle() {};
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em1PhysListEmStandard.hh,v 1.1 2003/03/27 11:16:18 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PhysListEmStandard_h
#define Em1PhysListEmStandard_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PhysListEmStandard : public G4VPhysicsConstructor
{
public:
Em1PhysListEmStandard(const G4String& name = "standard");
virtual ~Em1PhysListEmStandard();
public:
// This method is dummy for physics
virtual void ConstructParticle() {};
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em1PhysListGeneral.hh,v 1.1 2003/03/27 11:16:18 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PhysListGeneral_h
#define Em1PhysListGeneral_h 1
#include "G4VPhysicsConstructor.hh"
#include "G4Decay.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PhysListGeneral : public G4VPhysicsConstructor
{
public:
Em1PhysListGeneral(const G4String& name = "general");
virtual ~Em1PhysListGeneral();
public:
// This method is dummy for physics
virtual void ConstructParticle() {};
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,65 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: Em1PhysListParticles.hh,v 1.1 2003/03/27 11:16:19 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PhysListParticles_h
#define Em1PhysListParticles_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PhysListParticles : public G4VPhysicsConstructor
{
public:
Em1PhysListParticles(const G4String& name = "particles");
virtual ~Em1PhysListParticles();
public:
// This method will be invoked in the Construct() method.
// each particle type will be instantiated
virtual void ConstructParticle();
// This method is dummy.
virtual void ConstructProcess() {};
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,61 +21,57 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsList.hh,v 1.5 2002/03/08 13:43:29 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em1PhysicsList.hh,v 1.7 2003/03/27 11:16:19 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// 14.10.02 (V.Ivanchenko) provide modular list on base of old Em1PhysicsList
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PhysicsList_h
#define Em1PhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "G4VModularPhysicsList.hh"
#include "globals.hh"
class Em1DetectorConstruction;
class Em1PhysicsListMessenger;
class G4VPhysicsConstructor;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PhysicsList: public G4VUserPhysicsList
class Em1PhysicsList: public G4VModularPhysicsList
{
public:
Em1PhysicsList(Em1DetectorConstruction*);
~Em1PhysicsList();
protected:
// Construct particles
void ConstructParticle();
void ConstructBosons();
void ConstructLeptons();
void ConstructMesons();
void ConstructBarions();
public:
void SetCuts();
void SetGammaCut(G4double);
void SetElectronCut(G4double);
void SetProtonCut(G4double);
void GetRange(G4double);
protected:
// Construct processes and register them
void ConstructProcess();
void ConstructGeneral();
void ConstructEM();
private:
Em1DetectorConstruction* pDet;
Em1PhysicsListMessenger* pMes;
virtual void ConstructParticle();
virtual void ConstructProcess();
void AddPhysicsList(const G4String& name);
void SetCuts();
void SetCutForGamma(G4double);
void SetCutForElectron(G4double);
void SetCutForPositron(G4double);
void GetRange(G4double);
private:
G4double cutForGamma;
G4double cutForElectron;
G4double cutForProton;
G4double cutForPositron;
G4double currentDefaultCut;
G4VPhysicsConstructor* emPhysicsList;
G4VPhysicsConstructor* generalPhysicsList;
G4VPhysicsConstructor* particleList;
G4String emName;
Em1DetectorConstruction* pDet;
Em1PhysicsListMessenger* pMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsListMessenger.hh,v 1.5 2002/03/08 13:43:29 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em1PhysicsListMessenger.hh,v 1.7 2003/03/27 11:16:19 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -37,25 +37,33 @@
class Em1PhysicsList;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PhysicsListMessenger: public G4UImessenger
{
public:
Em1PhysicsListMessenger(Em1PhysicsList*);
Em1PhysicsListMessenger(Em1PhysicsList* );
~Em1PhysicsListMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
Em1PhysicsList* physList;
G4UIcmdWithADoubleAndUnit* cutGCmd;
G4UIcmdWithADoubleAndUnit* cutECmd;
G4UIcmdWithADoubleAndUnit* cutPCmd;
G4UIcmdWithADoubleAndUnit* rCmd;
Em1PhysicsList* pPhysicsList;
G4UIcmdWithADoubleAndUnit* gammaCutCmd;
G4UIcmdWithADoubleAndUnit* electCutCmd;
G4UIcmdWithADoubleAndUnit* protoCutCmd;
G4UIcmdWithADoubleAndUnit* allCutCmd;
G4UIcmdWithADoubleAndUnit* rCmd;
G4UIcmdWithAString* pListCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: Em1PrimaryGeneratorAction.hh,v 1.5 2001/12/07 11:49:09 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em1PrimaryGeneratorMessenger.hh,v 1.1 2001/12/07 11:49:09 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em1RunAction.hh,v 1.10 2002/12/11 14:19:22 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em1SteppingAction.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em1SteppingVerbose.hh,v 1.7 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
@@ -22,7 +22,7 @@
//
//
// $Id: Em1TrackingAction.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: Em1VisManager.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: ProcessesCount.hh,v 1.7 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,8 +22,8 @@
//
//
// $Id: Em1DetectorConstruction.cc,v 1.9 2002/05/31 17:10:35 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em1DetectorConstruction.cc,v 1.13 2003/03/27 11:16:20 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -53,10 +53,12 @@
Em1DetectorConstruction::Em1DetectorConstruction()
:pBox (0), lBox (0),
aMaterial(0),
aMaterial(0),
magField (0)
{
// create commands for interactive definition of the detector
// create commands for interactive definition of the detector
DefineMaterials();
BoxSize = 20*m;
detectorMessenger = new Em1DetectorMessenger(this);
}
@@ -69,125 +71,128 @@ Em1DetectorConstruction::~Em1DetectorConstruction()
G4VPhysicalVolume* Em1DetectorConstruction::Construct()
{
DefineMaterials();
BoxSize = 20*m;
return ConstructVolumes();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::DefineMaterials()
{
{
//This function illustrates the possible ways to define materials
G4String name, symbol; //a=mass of a mole;
G4double a, z, density; //z=mean number of protons;
G4int ncomponents, natoms;
G4double fractionmass;
G4String name, symbol; //a=mass of a mole;
G4double a, z, density; //z=mean number of protons;
G4int ncomponents, natoms;
G4double fractionmass;
G4Material* ma;
//
// define Elements
//
a = 1.01*g/mole;
G4Element* H = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
a = 1.01*g/mole;
G4Element* H = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
a = 14.01*g/mole;
G4Element* N = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
a = 14.01*g/mole;
G4Element* N = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
a = 16.00*g/mole;
G4Element* O = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
a = 16.00*g/mole;
G4Element* O = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
//
// define materials
//
density = 1.290*mg/cm3;
G4Material* Air = new G4Material(name="Air" , density, ncomponents=2);
Air->AddElement(N, fractionmass=70.*perCent);
Air->AddElement(O, fractionmass=30.*perCent);
density = 1.290*mg/cm3;
G4Material* Air = new G4Material(name="Air" , density, ncomponents=2);
Air->AddElement(N, fractionmass=70.*perCent);
Air->AddElement(O, fractionmass=30.*perCent);
density = 70.8*mg/cm3;
G4Material* H2l = new G4Material(name="H2liquid", density, ncomponents=1);
H2l->AddElement(H, fractionmass=1.);
density = 1.000*g/cm3;
G4Material* H2O = new G4Material(name="Water", density, ncomponents=2);
H2O->AddElement(H, natoms=2);
H2O->AddElement(O, natoms=1);
density = 70.8*mg/cm3;
G4Material* H2l = new G4Material(name="H2liquid", density, ncomponents=1);
H2l->AddElement(H, fractionmass=1.);
density = 1.390*g/cm3;
a = 39.95*g/mole;
G4Material* lAr = new G4Material(name="liquidArgon", z=18., a, density);
density = 1.000*g/cm3;
G4Material* H2O = new G4Material(name="Water", density, ncomponents=2);
H2O->AddElement(H, natoms=2);
H2O->AddElement(O, natoms=1);
H2O->SetChemicalFormula("H_2O");
H2O->GetIonisation()->SetMeanExcitationEnergy(75.0*eV);
density = 2.700*g/cm3;
a = 26.98*g/mole;
G4Material* Al = new G4Material(name="Aluminium" , z=13., a, density);
density = 1.390*g/cm3;
a = 39.95*g/mole;
ma = new G4Material(name="liquidArgon", z=18., a, density);
density = 2.330*g/cm3;
a = 28.09*g/mole;
G4Material* Si = new G4Material(name="Silicon" , z=14., a, density);
density = 2.700*g/cm3;
a = 26.98*g/mole;
G4Material* Al = new G4Material(name="Aluminium" , z=13., a, density);
density = 5.323*g/cm3;
a = 72.61*g/mole;
G4Material* Ge = new G4Material(name="Germanium" , z=32., a, density);
density = 2.330*g/cm3;
a = 28.09*g/mole;
ma = new G4Material(name="Silicon" , z=14., a, density);
density = 7.870*g/cm3;
a = 55.85*g/mole;
G4Material* Fe = new G4Material(name="Iron" , z=26., a, density);
density = 5.323*g/cm3;
a = 72.61*g/mole;
ma = new G4Material(name="Germanium" , z=32., a, density);
density = 19.30*g/cm3;
a = 183.85*g/mole;
G4Material* W = new G4Material(name="Tungsten" , z=74., a, density);
density = 7.870*g/cm3;
a = 55.85*g/mole;
ma = new G4Material(name="Iron" , z=26., a, density);
density = 11.35*g/cm3;
a = 207.19*g/mole;
G4Material* Pb = new G4Material(name="Lead" , z=82., a, density);
density = 19.30*g/cm3;
a = 183.85*g/mole;
ma = new G4Material(name="Tungsten" , z=74., a, density);
density = 18.95*g/cm3;
a = 238.03*g/mole;
G4Material* U = new G4Material(name="Uranium" , z=92., a, density);
density = 11.35*g/cm3;
a = 207.19*g/mole;
ma = new G4Material(name="Lead" , z=82., a, density);
density = 18.95*g/cm3;
a = 238.03*g/mole;
ma = new G4Material(name="Uranium" , z=92., a, density);
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
//default materials of the calorimeter
aMaterial = Al;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* Em1DetectorConstruction::ConstructVolumes()
{
{
if(lBox) delete lBox;
if(pBox) delete pBox;
G4Box*
sBox = new G4Box("Container", //its name
BoxSize/2,BoxSize/2,BoxSize/2); //its dimensions
lBox = new G4LogicalVolume(sBox, //its shape
aMaterial, //its material
"Container"); //its name
aMaterial->GetName()); //its name
pBox = new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
"Container", //its name
lBox, //its logical volume
0, //its mother volume
lBox, //its logical volume
aMaterial->GetName(), //its name
0, //its mother volume
false, //no boolean operation
0); //copy number
//
//
// Visualization attributes
//
G4VisAttributes* visAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
visAtt->SetVisibility(true);
lBox->SetVisAttributes(visAtt);
//
//always return the root volume
//
PrintParameters();
return pBox;
}
@@ -204,12 +209,12 @@ void Em1DetectorConstruction::PrintParameters()
void Em1DetectorConstruction::SetMaterial(G4String materialChoice)
{
// search the material by its name
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
// search the material by its name
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
if (pttoMaterial)
{aMaterial = pttoMaterial;
lBox->SetMaterial(aMaterial);
}
lBox->SetMaterial(aMaterial);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -217,21 +222,21 @@ void Em1DetectorConstruction::SetMaterial(G4String materialChoice)
void Em1DetectorConstruction::SetSize(G4double value)
{
BoxSize = value;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::SetMagField(G4double fieldValue)
{
//apply a global uniform magnetic field along Z axis
G4FieldManager* fieldMgr
G4FieldManager* fieldMgr
= G4TransportationManager::GetTransportationManager()->GetFieldManager();
if (magField) delete magField; //delete the existing magn field
if (fieldValue!=0.) // create a new one if non nul
{
magField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
magField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
fieldMgr->SetDetectorField(magField);
fieldMgr->CreateChordFinder(magField);
}
@@ -243,10 +248,16 @@ void Em1DetectorConstruction::SetMagField(G4double fieldValue)
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::UpdateGeometry()
{
G4RunManager::GetRunManager()->DefineWorldVolume(ConstructVolumes());
G4bool first = true;
if (pBox) first = false;
G4VPhysicalVolume* v = ConstructVolumes();
G4RunManager* rm = G4RunManager::GetRunManager();
rm->GeometryHasBeenModified();
rm->DefineWorldVolume(v);
if (!first) rm->ResetNavigator();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: Em1DetectorMessenger.cc,v 1.6 2002/12/11 14:19:23 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em1EventAction.cc,v 1.6 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//

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