Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
+12 -11
View File
@@ -21,16 +21,20 @@
// ********************************************************************
//
//
// $Id: AnaEx01.cc,v 1.6.4.2 2001/06/28 20:18:43 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01.cc,v 1.8 2001/11/16 14:35:10 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleN03
// GEANT 4 - AnaEx01
//
// --------------------------------------------------------------
// Comments
//
// Example of histogram and tuple manipulations using an AIDA compliant
// system. All analysis manipulations (hooking an AIDA implementation,
// histo booking, filling, etc...) are concentrated in one
// class : AnaEx01AnalysisManager.
// See the README file within the same directory to have more infos.
// --------------------------------------------------------------
#include "G4RunManager.hh"
@@ -39,9 +43,7 @@
#include "Randomize.hh"
#ifdef G4ANALYSIS_USE
#include "AnaEx01AnalysisManager.hh"
#endif
#include "AnaEx01DetectorConstruction.hh"
#include "AnaEx01PhysicsList.hh"
@@ -66,16 +68,15 @@ int main(int argc,char** argv) {
AnaEx01DetectorConstruction* detector = new AnaEx01DetectorConstruction;
runManager->SetUserInitialization(detector);
runManager->SetUserInitialization(new AnaEx01PhysicsList);
#ifdef G4ANALYSIS_USE
AnaEx01AnalysisManager* analysisManager =
new AnaEx01AnalysisManager(argc==1?"Lab":argv[1]);
runManager->SetUserAction(new AnaEx01PrimaryGeneratorAction(detector));
#ifdef G4ANALYSIS_USE
AnaEx01AnalysisManager* analysisManager = new AnaEx01AnalysisManager();
runManager->SetUserAction(new AnaEx01RunAction(analysisManager));
runManager->SetUserAction(new AnaEx01EventAction(analysisManager));
runManager->SetUserAction(new AnaEx01SteppingAction(analysisManager));
#else
runManager->SetUserAction(new AnaEx01PrimaryGeneratorAction(detector));
runManager->SetUserAction(new AnaEx01RunAction());
runManager->SetUserAction(new AnaEx01EventAction());
runManager->SetUserAction(new AnaEx01SteppingAction());
+10 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.2 2001/06/20 06:49:05 barrand Exp $
$Id: History,v 1.5 2001/12/03 08:22:31 barrand Exp $
--------------------------------------------------
=========================================================
@@ -15,6 +15,15 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
03th December 2001 Guy Barrand (AnaEx01-V03-02-01)
- Change README : Explain CMTSITE setup for Lab usage.
19th November 2001 Guy Barrand
- Change README : G4ANALYSIS_USE_AIDA -> G4ANALYSIS_USE.
16rd November 2001 Guy Barrand
- * : AIDA 2.2 compliant code. Usage of tuple.
20 June 2001, Guy Barrand :
- AnaEx01SteppingVerbose.cc : replace "entries" to "size" in order
to compile with 03-00-ref-03 kernel.
+92 -49
View File
@@ -1,4 +1,4 @@
$Id: README,v 1.6 2000/12/06 13:08:13 barrand Exp $
$Id: README,v 1.11 2001/12/03 07:49:17 barrand Exp $
-------------------------------------------------------------------
=========================================================
@@ -8,61 +8,104 @@ $Id: README,v 1.6 2000/12/06 13:08:13 barrand Exp $
AnaEx01
-------
This example shows the usage of histogramming with the
analysis category.
To use the G4AnalysisManager the source/analysis category
must have been reconstructed with one of the environment
variable setted :
G4ANALYSIS_BUILD_JAS
G4ANALYSIS_BUILD_LAB
G4ANALYSIS_BUILD_LIZARD
This example shows the usage of histogram and tuple manipulations using
an AIDA compliant system. In this example, all analysis manipulations
(hooking an AIDA implementation, histo booking, filling, etc...) are
concentrated in one class : AnaEx01AnalysisManager.
To use an analysis system with this example, the coresponding
environment variable must be setted :
G4ANALYSIS_USE_JAS
G4ANALYSIS_USE_LAB
G4ANALYSIS_USE_LIZARD
To use an AIDA compliant analysis system with this example, the environment
variables :
G4ANALYSIS_USE
G4ANALYSIS_AIDA_CONFIG_CFLAGS
G4ANALYSIS_AIDA_CONFIG_LIBS
must be properly set.
Then to cosntruct this example :
The first one permits to validate/devalidate the AIDA analysis code
in the example code. The two others permit to give the compilation
and link flags of the AIDA compliant system used.
An AIDA compliant system should define the command 'aida-config' that
permits to retrieve the correct values. For example under some
UNIX csh flavour :
csh> source <your Geant4 setup script>.csh
csh> source <AIDA_SYSTEM setup>.csh (or some equivalent)
csh> setenv G4ANALYSIS_USE 1
csh> setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS `aida-config --cflags`
csh> setenv G4ANALYSIS_AIDA_CONFIG_LIBS `aida-config --libs`
csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01
csh> setenv G4ANALYSIS_USE_JAS 1
csh> setenv G4ANALYSIS_USE_LAB 1
csh> setenv G4ANALYSIS_USE_LIZARD 1
csh> gmake
Working with the Lab package :
----------------------------
If working with the Lab package run the program
from the analysis/Lab directory :
csh> cd analyis/Lab
csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx01 Lab
It must produce a g4osc.root file that contains
some histograms. You can visualize them with :
csh> source <path>/Lab/<version>/cmt/setup.csh
csh> oxm
and click in File/session to execute the session.tcl
file.
Working with jas :
--------------------------
If working with jas :
For info, the CPP macros G4ANALYSIS_*_AIDA_* are used in the
config/analysis.gmk file of the Geant4 GNUmakefile system.
Working with the Falsetto package :
---------------------------------
Falsetto is a little package containing a dummy
AIDA analysis factory. It permits to check compilation
and link of some user AIDA code without embarquing a
full analysis system.
To reconstruct this example by using the Falsetto
package (assuming that it is installed !), do :
csh> source <your Geant4 setup script>.csh
csh> source <some directory>/Falsetto/<version>/cmt/setup.csh
csh> setenv G4ANALYSIS_USE 1
csh> setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS `aida-config --cflags`
csh> setenv G4ANALYSIS_AIDA_CONFIG_LIBS `aida-config --libs`
csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01
csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx01 jas
The program will pend for a connection toward jas, then
spawn jas :
csh> <path_to_jas_bin>/jas
csh> gmake
From jas panel, open a connection toward the AnaEx01 job :
- File/Reconnect
- Give no server name if running on same machine.
- Next to end the connect panel.
To run :
csh> cd analyis/Falsetto
csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx01
At the beginning of output ;should appear :
AIDA analysis factory not found.
When connection is established, the tree widget
on the left of jas panel must display "G4Job".
Click on the tree items to access an histogram.
Double click on the histogram name to visualize it.
The histogram will update itself according time.
The Falsetto URL is : http://www.lal.in2p3.fr/SI/Falsetto
Falsetto is installed at CERN under /afs/cern.ch/sw/contrib.
Working with the OpenScientist/Lab package :
------------------------------------------
To reconstruct this example by using the OpenScientist/Lab
package (assuming that OpenScientist is installed ! ) you have
first to "setup" the environment of the Lab package and Geant4.
The Lab package (and all OpenScientist packages) being handled
by the CMT tools, you may have to setup the environment
variable "CMTSITE" to execute site specific things in the chain
of setup files of the OpenScientist packages. Then for example at CERN :
csh> setenv CMTSITE CERN
(DOS> set CMTSITE=CERN_WIN32 (for Windows))
When done then do :
csh> source <some directory>/Lab/<version>/cmt/setup.csh
csh> source <your Geant4 setup script>.csh
csh> setenv G4ANALYSIS_USE 1
csh> setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS `aida-config --cflags`
csh> setenv G4ANALYSIS_AIDA_CONFIG_LIBS `aida-config --libs`
csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01
csh> gmake
To run :
csh> cd analyis/Lab
csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx01
It must produce an AnaEx01.root file that contains
some HCL histograms and a Lab tuple (stored as a ROOT/TTree).
To plot some histograms, spawn the Lab interactive tool with :
csh> onx
(DOS> onx (for Windows))
click in File/Python to map a file chooser, choose AnaEx01.py
to execute the AnaEx01.py that contains a Python script that
do some analysis over the AnaEx01.root file (it gets an histo, plots it
in a first drawing region, gets the tuple, books and fills another histo
from the tuple colum and plots it in another drawing region).
The AnaEx01.C file could also be used, within the ROOT tool,
to see a projection of the first column of the tuple contained
in the AnaEx01.root file. For example :
csh> root
root[0] .X AnaEx01.C
The OpenScientist URL is : http://www.lal.in2p3.fr/OpenScientist
OpenScientist is installed at CERN under /afs/cern.ch/sw/contrib.
@@ -0,0 +1,19 @@
#
# Macro file for "AnEx01.cc"
#
# (can be run in batch, without graphic)
#
#/control/verbose 2
#/control/saveHistory
#
#/run/verbose 2
#/event/verbose 0
#/tracking/verbose 1
#
# muon 300 MeV to the direction (1.,0.,0.)
# 3 events
#
#/gun/particle mu+
/gun/particle e+
/gun/energy 300 MeV
/run/beamOn 100
@@ -0,0 +1,20 @@
//
// To do some analysis over the AnaEx01.root file with the ROOT tool.
// Usage :
// UNIX> root
// root[0] .X AnaEx01.C
//
{
TFile* file = new TFile("AnaEx01.root");
file->ls();
TTree* tree = (TTree*)file->Get("/tuples/AnaEx01");
tree->Print();
TCanvas* canvas = new TCanvas("canvas","EAbs",10,10,800,600);
tree->Draw("EAbs","","");
canvas->Update();
}
@@ -24,48 +24,60 @@
#/////////////////////////////////////////////////////////////////////////////
#/////////////////////////////////////////////////////////////////////////////
#
# Example of tcl script using a root file.
# Example of a Python script using the AnaEx01.root file.
#
#/////////////////////////////////////////////////////////////////////////////
# If reexecuted :
delete storage
delete v
#
# Get a SWIG handler over the current viewer :
IViewer v -this [ui getCurrentViewer]
v reset page
#
# 2x2 regions :
#v set page "2 2"
v set pageTitle "G4 analysis with Open Scientist"
#
RioStorage storage g4osc.root READ
storage ls
#
delete EAbs
#
#storage cd histograms
#storage ls
#
# Hook the current plotter :
plotter = Plotter('')
plotter.createRegions(1,2)
plotter.setParameter('pageTitle','AnaEx01 analysis')
rootTree = RootTree('AnaEx01.root','READ')
rootTree.ls()
#/////////////////////////////////////////////////////////////////////////////
# In first region, get and plot the EAbs histo :
#/////////////////////////////////////////////////////////////////////////////
rootTree.cd('histograms')
rootTree.ls()
# Get some histograms with the H1Get
# builtin procedure defined in Lab/user/init.tcl :
# In the below the first "EAbs" is a variable and
# the second is the name of the object in the storage
# (the SID, storage identifier) :
# H1DGet <variable> <storage> <SID>
H1DGet EAbs storage EAbs
#
# builtin Python procedure (defined in Lab/scripts/Python/Lab_init.py).
EAbs = H1D_get(rootTree,'EAbs')
# Plot the histo :
EAbs vis
#
v set textContext "color black fontName TTF/couri"
v set histogramContext "color red modeling solid"
#
# Fit :
#delete fitExp
#
#Exponential fitExp 0. 1.
#fitExp fit [& EAbs]
#
#fitExp vis
#
plotter.plot(EAbs)
#/////////////////////////////////////////////////////////////////////////////
# In second region plot the EAbs histo built from the tuple :
#/////////////////////////////////////////////////////////////////////////////
rootTree.cd('..')
rootTree.cd('tuples')
rootTree.ls()
tuple = Tuple("AnaEx01","AnaEx01","",rootTree)
# Create an histo in the default memory tree :
tuple_EAbs = H1D('tuple_EAbs','AnaEx01/EAbs',100,0,100)
# Create an Evaluator and a Filter object :
evaluator = Evaluator(tuple,'EAbs')
filter = Filter(tuple,'')
# Project tuple AnaEx01/EAbs column on the tuple_EAbs histo :
tuple.project(tuple_EAbs,evaluator,filter)
plotter.next()
plotter.plot(tuple_EAbs)
plotter.setParameter('histogramContext','color red modeling solid')
# Evaluators and Filters are not managed, delete them explicitly :
delete_IEvaluator(evaluator)
delete_IFilter(filter)
echo('The two histos must give the same information !')
@@ -21,36 +21,29 @@
// ********************************************************************
//
//
// $Id: AnaEx01AnalysisManager.hh,v 1.3.4.1 2001/06/28 19:06:44 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01AnalysisManager.hh,v 1.5 2001/11/16 14:30:50 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// Example Analysis Manager implementing virtual function
// RegisterAnalysisSystems. Exploits C-pre-processor variables
// G4ANALYSIS_USE_JAS, etc., which are set by the GNUmakefiles if
// environment variables of the same name are set.
// So all you have to do is set environment variables and compile and
// instantiate this in your main().
#ifndef AnaEx01AnalysisManager_h
#define AnaEx01AnalysisManager_h 1
#ifdef G4ANALYSIS_USE
#include "G4AnalysisManager.hh"
class G4Run;
class G4Event;
class G4Step;
class IAnalysisFactory;
class ITree;
class IHistogram1D;
//class ITuple;
class ITuple;
class AnaEx01AnalysisManager: public G4AnalysisManager {
class AnaEx01AnalysisManager {
public:
AnaEx01AnalysisManager(const G4String&);
AnaEx01AnalysisManager();
virtual ~AnaEx01AnalysisManager();
public:
virtual void BeginOfRun(const G4Run*);
virtual void EndOfRun(const G4Run*);
@@ -58,12 +51,14 @@ public:
virtual void EndOfEvent(const G4Event*);
virtual void Step(const G4Step*);
private:
G4int fCalorimeterCollID;
int fCalorimeterCollID;
IAnalysisFactory* fAnalysisFactory;
ITree* fTree;
IHistogram1D* fEAbs;
IHistogram1D* fLAbs;
IHistogram1D* fEGap;
IHistogram1D* fLGap;
//ITuple* fTuple;
ITuple* fTuple;
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01CalorHit.hh,v 1.1.1.1.4.1 2001/06/28 19:06:44 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01CalorHit.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01CalorimeterSD.hh,v 1.1.1.1.4.1 2001/06/28 19:06:44 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01CalorimeterSD.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01DetectorConstruction.hh,v 1.1.1.1.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01DetectorConstruction.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01DetectorMessenger.hh,v 1.1.1.1.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01DetectorMessenger.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01EventAction.hh,v 1.3.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01EventAction.hh,v 1.4 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01PhysicsList.hh,v 1.1.1.1.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01PhysicsList.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01PrimaryGeneratorAction.hh,v 1.1.1.1.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01PrimaryGeneratorAction.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01PrimaryGeneratorMessenger.hh,v 1.1.1.1.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01PrimaryGeneratorMessenger.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01RunAction.hh,v 1.3.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01RunAction.hh,v 1.4 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01SteppingAction.hh,v 1.3.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01SteppingAction.hh,v 1.4 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01SteppingVerbose.hh,v 1.1.1.1.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01SteppingVerbose.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01VisManager.hh,v 1.1.1.1.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01VisManager.hh,v 1.2 2001/07/11 09:57:09 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01AnalysisManager.cc,v 1.9.4.1 2001/06/28 19:06:45 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01AnalysisManager.cc,v 1.11 2001/11/16 14:31:11 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// Guy Barrand 14th Septembre 2000.
@@ -35,54 +35,102 @@
#include "G4Event.hh"
#include "G4HCofThisEvent.hh"
#include <IHistogramFactory.h>
#ifdef G4ANALYSIS_USE_JAS
#include "G4JasSystem.hh"
#endif
#ifdef G4ANALYSIS_USE_LAB
#include "G4LabSystem.hh"
#endif
#ifdef G4ANALYSIS_USE_LIZARD
#include "G4LizardSystem.hh"
#endif
#include <AIDA/IAnalysisFactory.h>
#include <AIDA/ITreeFactory.h>
#include <AIDA/ITupleFactory.h>
#include <AIDA/IHistogramFactory.h>
#include <AIDA/ITree.h>
#include <AIDA/IHistogram1D.h>
#include <AIDA/ITuple.h>
#include "AnaEx01CalorHit.hh"
#include "AnaEx01AnalysisManager.hh"
AnaEx01AnalysisManager::AnaEx01AnalysisManager(
const G4String& aSystem
)
AnaEx01AnalysisManager::AnaEx01AnalysisManager()
:fCalorimeterCollID(-1)
,fAnalysisFactory(0)
,fTree(0)
,fEAbs(0)
,fLAbs(0)
,fEGap(0)
,fLGap(0)
,fTuple(0)
{
#ifdef G4ANALYSIS_USE_JAS
RegisterAnalysisSystem(new G4JasSystem);
#endif
#ifdef G4ANALYSIS_USE_LAB
RegisterAnalysisSystem(new G4LabSystem);
#endif
#ifdef G4ANALYSIS_USE_LIZARD
RegisterAnalysisSystem(new G4LizardSystem);
#endif
// The factory and histograms will be deleted by the analysis manager.
IHistogramFactory* hfactory = GetHistogramFactory(aSystem);
if(!hfactory) return;
fEAbs = hfactory->create1D("EAbs",100,0,100);
fLAbs = hfactory->create1D("LAbs",100,0,100);
fEGap = hfactory->create1D("EGap",100,0,10);
fLGap = hfactory->create1D("LGap",100,0,100);
fAnalysisFactory = AIDA_createAnalysisFactory();
// Could fail if no AIDA implementation found :
if(!fAnalysisFactory) {
G4cout << "AIDA analysis factory not found." << G4endl;
return;
}
ITreeFactory* treeFactory = fAnalysisFactory->createTreeFactory();
if(!treeFactory) {
delete fAnalysisFactory;
fAnalysisFactory = 0;
return;
}
// Create a "tree" to handle histograms.
// This tree is associated to a ROOT "store" (in RECREATE mode).
fTree = treeFactory->create("AnaEx01.root",false,false,"ROOT");
// Factories are not "managed" by an AIDA analysis system.
// They must be deleted by the AIDA user code.
delete treeFactory;
if(!fTree) {
delete fAnalysisFactory;
fAnalysisFactory = 0;
return;
}
fTree->mkdir("histograms");
fTree->cd("histograms");
// Create an histo factory that will create histo in the tree :
IHistogramFactory* histoFactory =
fAnalysisFactory->createHistogramFactory(*fTree);
if(histoFactory) {
fEAbs = histoFactory->create1D("EAbs",100,0,100);
fLAbs = histoFactory->create1D("LAbs",100,0,100);
fEGap = histoFactory->create1D("EGap",100,0,10);
fLGap = histoFactory->create1D("LGap",100,0,100);
delete histoFactory;
}
fTree->cd("..");
fTree->mkdir("tuples");
fTree->cd("tuples");
// Get a tuple factory :
ITupleFactory* tupleFactory =
fAnalysisFactory->createTupleFactory(*fTree);
if(tupleFactory) {
// Create a tuple :
fTuple = tupleFactory->create("AnaEx01","AnaEx01","EAbs LAbs EGap LGap");
delete tupleFactory;
}
}
AnaEx01AnalysisManager::~AnaEx01AnalysisManager() {
delete fAnalysisFactory;
}
void AnaEx01AnalysisManager::BeginOfRun(const G4Run* aRun){
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
}
void AnaEx01AnalysisManager::EndOfRun(const G4Run*){
Store();
//if(fEAbs) Plot(fEAbs);
if(fTree) fTree->commit();
if(fEAbs) {
G4cout << "Histo : EAbs : mean " << fEAbs->mean() << " rms : " << fEAbs->rms() << G4endl;
G4cout << "Histo : LAbs : mean " << fLAbs->mean() << " rms : " << fLAbs->rms() << G4endl;
G4cout << "Histo : EGap : mean " << fEGap->mean() << " rms : " << fEGap->rms() << G4endl;
G4cout << "Histo : LGap : mean " << fLGap->mean() << " rms : " << fLGap->rms() << G4endl;
}
}
void AnaEx01AnalysisManager::BeginOfEvent(const G4Event*){
@@ -94,9 +142,9 @@ void AnaEx01AnalysisManager::BeginOfEvent(const G4Event*){
void AnaEx01AnalysisManager::EndOfEvent(const G4Event* aEvent){
if(!fEAbs) return; // No histo booked !
//if(!fTuple) return; // No tuple booked !
if(!fTuple) return; // No tuple booked !
G4int evtNb = aEvent->GetEventID();
//G4int evtNb = aEvent->GetEventID();
G4HCofThisEvent* HCE = aEvent->GetHCofThisEvent();
AnaEx01CalorHitsCollection* CHC =
@@ -104,16 +152,21 @@ void AnaEx01AnalysisManager::EndOfEvent(const G4Event* aEvent){
if(CHC) {
G4int n_hit = CHC->entries();
//G4double totEAbs=0, totLAbs=0, totEGap=0, totLGap=0;
for (G4int i=0;i<n_hit;i++) {
//totEAbs += (*CHC)[i]->GetEdepAbs();
//totLAbs += (*CHC)[i]->GetTrakAbs();
//totEGap += (*CHC)[i]->GetEdepGap();
//totLGap += (*CHC)[i]->GetTrakGap();
fEAbs->fill((*CHC)[i]->GetEdepAbs());
fLAbs->fill((*CHC)[i]->GetTrakAbs());
fEGap->fill((*CHC)[i]->GetEdepGap());
fLGap->fill((*CHC)[i]->GetTrakGap());
G4double EAbs = (*CHC)[i]->GetEdepAbs();
G4double LAbs = (*CHC)[i]->GetTrakAbs();
G4double EGap = (*CHC)[i]->GetEdepGap();
G4double LGap = (*CHC)[i]->GetTrakGap();
fEAbs->fill(EAbs);
fLAbs->fill(LAbs);
fEGap->fill(EGap);
fLGap->fill(LGap);
fTuple->fill(0,EAbs);
fTuple->fill(1,LAbs);
fTuple->fill(2,EGap);
fTuple->fill(3,LGap);
fTuple->addRow();
}
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01CalorHit.cc,v 1.1.1.1.4.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01CalorHit.cc,v 1.3 2001/11/16 14:31:11 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01CalorimeterSD.cc,v 1.1.1.1.4.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01CalorimeterSD.cc,v 1.3 2001/11/16 14:31:12 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01DetectorConstruction.cc,v 1.1.1.1.4.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01DetectorConstruction.cc,v 1.3 2001/11/16 14:31:12 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01DetectorMessenger.cc,v 1.1.1.1.4.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01DetectorMessenger.cc,v 1.3 2001/11/16 14:31:12 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01EventAction.cc,v 1.3.4.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01EventAction.cc,v 1.5 2001/11/16 14:31:12 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01PhysicsList.cc,v 1.1.1.1.4.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01PhysicsList.cc,v 1.3 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01PrimaryGeneratorAction.cc,v 1.1.1.1.4.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01PrimaryGeneratorAction.cc,v 1.3 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01PrimaryGeneratorMessenger.cc,v 1.1.1.1.4.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01PrimaryGeneratorMessenger.cc,v 1.3 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01RunAction.cc,v 1.3.4.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01RunAction.cc,v 1.5 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01SteppingAction.cc,v 1.3.4.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01SteppingAction.cc,v 1.5 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01SteppingVerbose.cc,v 1.2.2.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01SteppingVerbose.cc,v 1.4 2001/11/16 14:31:13 barrand Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: AnaEx01VisManager.cc,v 1.2.2.1 2001/06/28 19:06:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: AnaEx01VisManager.cc,v 1.4 2001/11/15 13:09:52 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 24th January 1998.
@@ -36,18 +36,21 @@
// Supported drivers...
#ifdef G4VIS_USE_ASCIITREE
// Not needing external packages or libraries...
#include "G4ASCIITree.hh"
#endif
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
// Needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
#include "G4FukuiRenderer.hh"
#endif
#ifdef G4VIS_USE_DAWNFILE
#include "G4DAWNFILE.hh"
#endif
#ifdef G4VIS_USE_OPACS
#include "G4Wo.hh"
#include "G4Xo.hh"
@@ -76,20 +79,11 @@
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_RAYTRACER
#include "G4RayTracer.hh"
#endif
#ifdef G4VIS_USE_VRML
#include "G4VRML1.hh"
#include "G4VRML2.hh"
#endif
#ifdef G4VIS_USE_VRMLFILE
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
AnaEx01VisManager::AnaEx01VisManager () {}
@@ -98,18 +92,21 @@ AnaEx01VisManager::AnaEx01VisManager () {}
void AnaEx01VisManager::RegisterGraphicsSystems () {
#ifdef G4VIS_USE_ASCIITREE
// Graphics Systems not needing external packages or libraries...
RegisterGraphicsSystem (new G4ASCIITree);
#endif
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
// Graphics systems needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
RegisterGraphicsSystem (new G4FukuiRenderer);
#endif
#ifdef G4VIS_USE_DAWNFILE
RegisterGraphicsSystem (new G4DAWNFILE);
#endif
#ifdef G4VIS_USE_OPACS
RegisterGraphicsSystem (new G4Wo);
RegisterGraphicsSystem (new G4Xo);
@@ -138,20 +135,11 @@ void AnaEx01VisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4OpenInventorWin32);
#endif
#ifdef G4VIS_USE_RAYTRACER
RegisterGraphicsSystem (new G4RayTracer);
#endif
#ifdef G4VIS_USE_VRML
RegisterGraphicsSystem (new G4VRML1);
RegisterGraphicsSystem (new G4VRML2);
#endif
#ifdef G4VIS_USE_VRMLFILE
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
#endif
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.5 2001/02/21 14:00:33 maire Exp $
# $Id: GNUmakefile,v 1.6 2001/11/29 11:28:06 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -25,3 +25,7 @@ else
endif
include $(G4INSTALL)/config/binmake.gmk
visclean:
rm -f g4*.prim g4*.eps g4*.wrl
rm -f .DAWN_*
@@ -1,4 +1,4 @@
$Id: History,v 1.11 2001/03/27 08:34:07 maire Exp $
$Id: History,v 1.15 2001/11/29 11:28:06 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,64 +15,82 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
27-03-01 mma (testem1-V03-00-05)
- set cppflag G4NOHIST = true in gnumakefile
29-11-01 mma (testem1-V03-02-02)
- EventAction: DrawTrack "none"
- small change in vis.mac
- suppression of the rndm commands, now managed by G4RunManager:
--> RunAction, EventAction. suppression of RunActionMessenger
31-10-01 mma (testem1-V03-02-01)
- PhysicsListMessenger: commands CutE, CutG, CutP avaiblable in PreInit
- in all macros: set cuts before run/initialize
26-10-01 mma (testem1-V03-02-00)
- mods in TestEm1.cc: the initialisation and vis initialisation are
not done gy default. --> inserted /run/initialize in all macros.
- To get visualisation: > /control/execute vis.mac (new vis commands)
- 80 columns everywhere
19-10-01 Steve O'Neale (examples-V03-02-00)
- Update reference output
27-03-01 mma (testem1-V03-00-05)
- set cppflag G4NOHIST = true in gnumakefile
08-03-01 Hisaya (testem1-V03-00-04)
- adapted ProcessesCount to STL
08-03-01 Hisaya (testem1-V03-00-04)
- adapted ProcessesCount to STL
21-02-01 mma (testem1-V03-00-03)
- hbook histograms restored
21-02-01 mma (testem1-V03-00-03)
- hbook histograms restored
20-02-01 mma (testem1-V03-00-02)
- verbose stepping adapted for STL
- save rndm at begin of event
20-02-01 mma (testem1-V03-00-02)
- verbose stepping adapted for STL
- save rndm at begin of event
07-12-00 mma (testem1-V02-00-03 & testem-noHist)
remove hbook histograms: GNUmakefile,runAction,trackingAction,
steppingAction
07-12-00 mma (testem1-V02-00-03 & testem-noHist)
- remove hbook histograms: GNUmakefile,runAction,trackingAction,steppingAction
06-12-00 mma (testem1-V02-00-02 & testem-withHist)
update of init.mac for new vis commands.
G4UItcsh in the main()
06-12-00 mma (testem1-V02-00-02 & testem-withHist)
- update of init.mac for new vis commands.
- G4UItcsh in the main()
24-11-00 Steve O'Neale (tagset210) (testem1-V02-00-01)
Update test output Change in processes below ~ 5 per cent
eIoni and hIoni min.delta energy(keV) and energy cut table
24-11-00 Steve O'Neale (tagset210) (testem1-V02-00-01)
- Update test output Change in processes below ~ 5 per cent
eIoni and hIoni min.delta energy(keV) and energy cut table
13-11-00 G.Cosmo (testem1-V02-00-00)
Fixed memory leak in Em1RunAction: added call to clearAndDestroy()
in EndOfRunAction() to clean ProcCounter vector.
13-11-00 G.Cosmo (testem1-V02-00-00)
- Fixed memory leak in Em1RunAction: added call to clearAndDestroy()
in EndOfRunAction() to clean ProcCounter vector.
17-06-00 J.Allison (testem1-V01-00-00)
Updated TestEm1.out for geant4-01-01-ref-06.
17-06-00 J.Allison (testem1-V01-00-00)
- Updated TestEm1.out for geant4-01-01-ref-06.
21-01-00 cppflag G4NOHIST to protect hbook histograms.
21-01-00 cppflag G4NOHIST to protect hbook histograms.
11-10-99 moved from: source/processes/electromagnetic/test
to: examples/extended/electromagnetic
11-10-99 moved from: source/processes/electromagnetic/test
to: examples/extended/electromagnetic
09-08-99 Commands for save/read Rndm status
09-08-99 Commands for save/read Rndm status
17-06-99 added histogramming facility
17-06-99 added histogramming facility
10-05-99 user's actions adapted to geant4-00-ref-04
10-05-99 user's actions adapted to geant4-00-ref-04
03-12-98 subdirectory geant3 which contains the geant3 equivalent
example.
03-12-98 subdirectory geant3 which contains the geant3 equivalent
example.
24.11.98 due to new computation of SetCut for electron, the cut in range
for e-/+ has been modified in init.mac and run10.mac (beta03-00)
24.11.98 due to new computation of SetCut for electron, the cut in range
for e-/+ has been modified in init.mac and run10.mac (beta03-00)
27.10.98 interactive command for setting StepFunction: deemax + stmin.
modifs in setxxCut functions (Hisaya).
Count occurence of processes.
Now TestEm1 is equivalent to g3-testem1
Both can be run in batch with reference files:
run1.mac (g4), run1.dat (g3).
27.10.98 interactive command for setting StepFunction: deemax + stmin.
modifs in setxxCut functions (Hisaya).
Count occurence of processes.
Now TestEm1 is equivalent to g3-testem1
Both can be run in batch with reference files:
run1.mac (g4), run1.dat (g3).
19.10.98 Moved in subdirectory electromagnetic/test/TestEm1.
Interactive commands in PhysicsList for setting cuts.
19.10.98 Moved in subdirectory electromagnetic/test/TestEm1.
Interactive commands in PhysicsList for setting cuts.
14.09.98 Created, Michel Maire
14.09.98 Created, Michel Maire
@@ -1,4 +1,4 @@
$Id: README,v 1.3 2001/03/30 12:41:27 gcosmo Exp $
$Id: README,v 1.4 2001/10/26 12:51:21 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -49,9 +49,9 @@ $Id: README,v 1.3 2001/03/30 12:41:27 gcosmo Exp $
4- VISUALIZATION
The Visualization Manager is set in the main().
The initialisation of the drawing is done via the command
/vis~/create_view in the macro init.mac. This macro is
automatically read from the main in case of interactive running mode.
The initialisation of the drawing is done via the commands
/vis/... in the macro vis.mac. To get visualisation:
> /control/execute vis.mac
The detector has a default view which is a longitudinal view of the
box.
@@ -21,11 +21,11 @@
// ********************************************************************
//
//
// $Id: TestEm1.cc,v 1.4.4.1 2001/06/28 19:06:47 gunter Exp $
// GEANT4 tag $Name: $
// $Id: TestEm1.cc,v 1.7 2001/11/29 11:28:06 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#define Em1NoOptimize 1
@@ -51,7 +51,7 @@
#endif
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv) {
@@ -82,14 +82,11 @@ int main(int argc,char** argv) {
Em1EventAction* EvtAct;
runManager->SetUserAction(RunAct = new Em1RunAction);
runManager->SetUserAction(EvtAct = new Em1EventAction(RunAct));
runManager->SetUserAction(EvtAct = new Em1EventAction);
runManager->SetUserAction(new Em1TrackingAction(RunAct));
runManager->SetUserAction(new Em1SteppingAction(RunAct,EvtAct));
#endif
//Initialize G4 kernel
runManager->Initialize();
// get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
@@ -101,7 +98,6 @@ int main(int argc,char** argv) {
#else
session = new G4UIterminal();
#endif
UI->ApplyCommand("/control/execute init.mac");
session->SessionStart();
delete session;
}
@@ -124,4 +120,4 @@ int main(int argc,char** argv) {
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,4 +1,4 @@
# $Id: TestEm1.in,v 1.1 2000/01/21 14:58:58 maire Exp $
# $Id: TestEm1.in,v 1.3 2001/10/31 15:49:30 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,13 +7,14 @@
#
/control/verbose 2
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.20 mm
/calor/cutE 6.05 mum
/calor/cutE 6.05 mum
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 100 MeV
@@ -1,8 +1,26 @@
**********************************************
Geant4 version $Name: geant4-03-01-ref-01 $
(06-Apr-2001)
Geant4 version $Name: geant4-04-00 $
(14-Dec-2001)
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)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
#
/calor/cutG 2.20 mm
/calor/cutE 6.05 mum
#
/run/initialize
***** Table : Nb of materials = 9 *****
@@ -45,148 +63,71 @@ phot: Total cross sections from a parametrisation. Good description from 10 KeV
PhysicsTables from 50 keV to 50 MeV in 100 bins.
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 1e+02 GeV in 100 bins.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 100 GeV in 100 bins.
conv: Total cross sections from a parametrisation. Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1 MeV to 1e+02 GeV in 100 bins.
PhysicsTables from 1.022 MeV to 100 GeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
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 1e+02 TeV in 100 bins.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
eBrem: Total cross sections from a NEW parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
annihil: Total cross section from Heilter formula (annihilation into 2 photons).
annihil: Total cross section from Heilter formula(annihilation into 2 photons).
gamma energies sampled according Heitler
PhysicsTables from 10 keV to 10 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
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 1e+02 TeV in 100 bins.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
MuIoni: knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
MuBrems: theoretical cross section
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
============= The cut Energy ==============================
gamma e-
Cut in range 1 mm 1 mm
Cut in energy
Air 990 eV 990 eV
H2liquid 990 eV 108 keV
Water 2.9 keV 347 keV
liquidArgon 6.18 keV 343 keV
Aluminium 6.89 keV 597 keV
Silicon 6.89 keV 541 keV
Iron 20.8 keV 1.28 MeV
Lead 101 keV 1.38 MeV
Uranium 110 keV 1.92 MeV
===================================================
# $Id: TestEm1.out,v 1.15 2001/04/26 12:33:03 stesting Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
#
# electron 100 MeV; all processes
#
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.20 mm
/calor/cutE 6.05 mum
/run/initialize
Em1PhysicsList::SetCuts:CutLength : 1 (mm)
phot: Total cross sections from a parametrisation. Good description from 10 KeV to 50 MeV for all Z
Sandia crossSection below 50 KeV
PhysicsTables from 50 keV to 50 MeV in 100 bins.
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 1e+02 GeV in 100 bins.
conv: Total cross sections from a parametrisation. Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1 MeV to 1e+02 GeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
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 1e+02 TeV in 100 bins.
eBrem: Total cross sections from a NEW parametrisation based on the EEDL data library.
Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
annihil: Total cross section from Heilter formula (annihilation into 2 photons).
gamma energies sampled according Heitler
PhysicsTables from 10 keV to 10 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
MuIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
MuIoni: knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuBrems: theoretical cross section
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 PeV.
PhysicsTables from 1 keV to 1e+03 PeV in 150 bins.
PhysicsTables from 1 keV to 1000 PeV in 150 bins.
============= The cut Energy ==============================
gamma e-
Cut in range 2.2 mm 6.05 mum
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
Iron 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
@@ -199,8 +140,9 @@ Cut in energy
Uranium 143 keV 53.4 keV
===================================================
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 100 MeV
@@ -212,25 +154,31 @@ Cut in energy
Current couple of seeds = 9876, 54321
----------------------------------------
Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 0 kByte
Total CPU time elapsed for geometry optimisation: 0 seconds
Start Run processing.
---> Begin of Event: 0
Run terminated.
Run Summary
Number of events processed : 100
User=53s Real=58s Sys=5.3s
User=16s Real=19s Sys=2.6s
nb tracks/event neutral: 28.25 charged: 664.76
nb steps/event neutral: 148.67 charged: 2195.14
nb tracks/event neutral: 27.29 charged: 692.97
nb steps/event neutral: 145.49 charged: 1331.63
nb of process calls per event:
eIoni eBrem compt phot conv annihil
2168.25 25.46 120.42 26.82 1.43 1.43
1305.51 24.92 118.20 26.09 1.20 1.20
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1296175024, 1662236208
Current couple of seeds = 640041358, 1353064269
----------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
G4 kernel has come to Quit state.
Deletion of G4 kernel class start.
UserDetectorConstruction deleted.
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1DetectorConstruction.hh,v 1.2.4.1 2001/06/28 19:06:47 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1DetectorConstruction.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1DetectorConstruction_h
#define Em1DetectorConstruction_h 1
@@ -40,7 +40,7 @@ class G4Material;
class G4UniformMagField;
class Em1DetectorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1DetectorConstruction : public G4VUserDetectorConstruction
{
@@ -86,7 +86,7 @@ class Em1DetectorConstruction : public G4VUserDetectorConstruction
G4VPhysicalVolume* ConstructVolumes();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1DetectorMessenger.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1DetectorMessenger.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1DetectorMessenger_h
#define Em1DetectorMessenger_h 1
@@ -41,7 +41,7 @@ class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1DetectorMessenger: public G4UImessenger
{
@@ -63,5 +63,7 @@ class Em1DetectorMessenger: public G4UImessenger
G4UIcmdWithoutParameter* UpdateCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1EventAction.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1EventAction.hh,v 1.5 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1EventAction_h
#define Em1EventAction_h 1
@@ -35,15 +35,14 @@
#include "G4UserEventAction.hh"
#include "globals.hh"
class Em1RunAction;
class Em1EventActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1EventAction : public G4UserEventAction
{
public:
Em1EventAction(Em1RunAction*);
Em1EventAction();
~Em1EventAction();
public:
@@ -57,13 +56,14 @@ class Em1EventAction : public G4UserEventAction
private:
Em1RunAction* Em1Run;
G4double TotalEnergyDeposit;
G4String drawFlag;
G4int printModulo;
Em1EventActionMessenger* eventMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1EventActionMessenger.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1EventActionMessenger.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1EventActionMessenger_h
#define Em1EventActionMessenger_h 1
@@ -39,7 +39,7 @@ class Em1EventAction;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1EventActionMessenger: public G4UImessenger
{
@@ -55,4 +55,6 @@ class Em1EventActionMessenger: public G4UImessenger
G4UIcmdWithAnInteger* PrintCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsList.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PhysicsList.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PhysicsList_h
#define Em1PhysicsList_h 1
@@ -38,7 +38,7 @@
class Em1DetectorConstruction;
class Em1PhysicsListMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PhysicsList: public G4VUserPhysicsList
{
@@ -78,5 +78,7 @@ class Em1PhysicsList: public G4VUserPhysicsList
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsListMessenger.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PhysicsListMessenger.hh,v 1.4 2001/10/26 12:51:23 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PhysicsListMessenger_h
#define Em1PhysicsListMessenger_h 1
@@ -38,7 +38,7 @@
class Em1PhysicsList;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PhysicsListMessenger: public G4UImessenger
{
@@ -57,4 +57,6 @@ class Em1PhysicsListMessenger: public G4UImessenger
G4UIcmdWithADoubleAndUnit* eCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PrimaryGeneratorAction.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PrimaryGeneratorAction.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1PrimaryGeneratorAction_h
#define Em1PrimaryGeneratorAction_h 1
@@ -38,8 +38,7 @@
class G4ParticleGun;
class G4Event;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
@@ -54,6 +53,8 @@ class Em1PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
G4ParticleGun* particleGun; //pointer a to G4 service class
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1RunAction.hh,v 1.5.2.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1RunAction.hh,v 1.8 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1RunAction_h
#define Em1RunAction_h 1
@@ -36,10 +36,9 @@
#include "ProcessesCount.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4Run;
class Em1RunActionMessenger;
#ifndef G4NOHIST
class HepTupleManager;
@@ -61,11 +60,7 @@ class Em1RunAction : public G4UserRunAction
void CountSteps0(G4int ns) { NbOfSteps0 += ns;}
void CountSteps1(G4int ns) { NbOfSteps1 += ns;}
void CountProcesses(G4String);
public:
void SetRndmFreq(G4int val) {saveRndm = val;}
G4int GetRndmFreq() {return saveRndm;}
#ifndef G4NOHIST
HepHistogram* GetHisto(G4int id) {return histo[id];}
#endif
@@ -77,16 +72,15 @@ class Em1RunAction : public G4UserRunAction
private:
G4int NbOfTraks0, NbOfTraks1;
G4int NbOfSteps0, NbOfSteps1;
ProcessesCount* ProcCounter;
ProcessesCount* ProcCounter;
Em1RunActionMessenger* runMessenger;
G4int saveRndm;
#ifndef G4NOHIST
HepTupleManager* hbookManager;
HepHistogram* histo[3];
#endif
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1SteppingAction.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1SteppingAction.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1SteppingAction_h
#define Em1SteppingAction_h 1
@@ -37,7 +37,7 @@
class Em1RunAction;
class Em1EventAction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1SteppingAction : public G4UserSteppingAction
{
@@ -52,4 +52,6 @@ class Em1SteppingAction : public G4UserSteppingAction
Em1EventAction* eventAction;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,22 +21,22 @@
// ********************************************************************
//
//
// $Id: Em1SteppingVerbose.hh,v 1.5.2.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1SteppingVerbose.hh,v 1.7 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
// It shows how to extract informations during the tracking of a particle.
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1SteppingVerbose_h
#define Em1SteppingVerbose_h 1
#include "G4SteppingVerbose.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1SteppingVerbose : public G4SteppingVerbose {
@@ -50,4 +50,6 @@ public:
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,11 +21,12 @@
// ********************************************************************
//
//
// $Id: Em1TrackingAction.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1TrackingAction.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1TrackingAction_h
#define Em1TrackingAction_h 1
@@ -33,7 +34,7 @@
class Em1RunAction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1TrackingAction : public G4UserTrackingAction {
@@ -47,4 +48,6 @@ class Em1TrackingAction : public G4UserTrackingAction {
Em1RunAction* runAction;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1VisManager.hh,v 1.2.4.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1VisManager.hh,v 1.4 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Example Visualization Manager implementing virtual function
// RegisterGraphicsSystems. Exploits C-pre-processor variables
@@ -42,14 +42,14 @@
// G4VisManager* myVisManager = new MyVisManager;
// myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Em1VisManager_h
#define Em1VisManager_h 1
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Em1VisManager: public G4VisManager {
@@ -63,4 +63,6 @@ private:
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,16 +21,16 @@
// ********************************************************************
//
//
// $Id: ProcessesCount.hh,v 1.5.2.1 2001/06/28 19:06:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: ProcessesCount.hh,v 1.7 2001/10/26 12:51:24 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// 08.03.01 Hisaya: adapted for STL
// 26.10.98 mma : first version
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef ProcessesCount_HH
#define ProcessesCount_HH
@@ -38,7 +38,7 @@
#include "globals.hh"
#include "g4std/vector"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class OneProcessCount
{
@@ -56,8 +56,7 @@ private:
G4int Counter; // process counter
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
typedef G4std::vector<OneProcessCount*> ProcessesCount;
@@ -1,36 +0,0 @@
#
# Macro file for the initialization phase of "TestEm1.cc"
#
# Sets some default verbose
# and initializes the graphic.
#
/control/verbose 2
/run/verbose 2
#
####/run/initialize
#
####/process/eLoss/StepFunction 0.183 170 micrometer
####/calor/cutG 2.2 mm
####/calor/cutE 1.4 micrometer #before beta03-00 (17.11.98)
####/calor/cutE 6.05 micrometer #from beta03-00 (17.11.98)
####/run/initialize
####/run/particle/dumpCutValues
#
# Create empty scene ("world" is default)
/vis/scene/create
#
# Create a scene handler for a specific graphics system
# Edit the next line(s) to choose another graphic system
#
#/vis/open DAWNFILE
/vis/open OGLIX
#
# Draw scene
/vis/camera/zoom 1.4
/vis/drawVolume
#
# for drawing the tracks
# if too many tracks cause core dump => storeTrajectory 0
/tracking/storeTrajectory 1
/event/drawTracks all
@@ -1,4 +1,4 @@
# $Id: run00.mac,v 1.1 1999/10/11 13:07:25 maire Exp $
# $Id: run00.mac,v 1.2 2001/10/26 12:51:21 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -10,7 +10,6 @@
/run/initialize
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle geantino
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run01.mac,v 1.1 1999/10/11 13:07:26 maire Exp $
# $Id: run01.mac,v 1.3 2001/10/31 15:36:43 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,22 +7,20 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
/calor/cutE 95 cm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate phot
/process/inactivate compt
/process/inactivate conv
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
/process/eLoss/fluct 0
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run02.mac,v 1.1 1999/10/11 13:07:26 maire Exp $
# $Id: run02.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,22 +7,20 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
/calor/cutE 95 cm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate phot
/process/inactivate compt
/process/inactivate conv
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
/process/eLoss/fluct 1
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run03.mac,v 1.1 1999/10/11 13:07:26 maire Exp $
# $Id: run03.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,21 +7,19 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
/calor/cutE 95 cm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate phot
/process/inactivate compt
/process/inactivate conv
#
/process/eLoss/StepFunction 0.183 170 micrometer
/process/eLoss/fluct 0
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 10 MeV
@@ -1,4 +1,4 @@
# $Id: run04.mac,v 1.2 2000/12/06 13:21:49 maire Exp $
# $Id: run04.mac,v 1.4 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,12 +7,9 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
#/calor/cutE 6.05 micrometer
/calor/cutE 100. micrometer
#
/run/initialize
#
/process/inactivate phot
@@ -20,8 +17,9 @@
/process/inactivate conv
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 100 MeV
@@ -1,4 +1,4 @@
# $Id: run05.mac,v 1.1 1999/10/11 13:07:27 maire Exp $
# $Id: run05.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,21 +7,19 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.2 mm
/calor/cutE 95 cm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate phot
/process/inactivate compt
/process/inactivate conv
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run06.mac,v 1.1 1999/10/11 13:07:27 maire Exp $
# $Id: run06.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,19 +7,17 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
/calor/cutE 95 cm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate conv
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle gamma
/gun/energy 10 MeV
@@ -1,4 +1,4 @@
# $Id: run07.mac,v 1.1 1999/10/11 13:07:27 maire Exp $
# $Id: run07.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,20 +7,18 @@
#
/control/verbose 2
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 95 cm
/calor/cutE 30 mm
#
/run/initialize
/run/particle/dumpCutValues
#
/process/inactivate phot
/process/inactivate compt
/process/inactivate msc
#
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle gamma
/gun/energy 100 MeV
@@ -1,4 +1,4 @@
# $Id: run08.mac,v 1.1 1999/10/11 13:07:28 maire Exp $
# $Id: run08.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,17 +7,14 @@
#
/control/verbose 2
#
/run/initialize
/calor/cutG 2.2 mm
/calor/cutE 6.05 micrometer
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.2 mm
####/calor/cutE 1.4 micrometer #before beta03-00 (17.11.98)
/calor/cutE 6.05 micrometer #from beta03-00 (17.11.98)
/run/initialize
/run/particle/dumpCutValues
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 100 MeV
@@ -1,4 +1,4 @@
# $Id: run09.mac,v 1.1 1999/10/11 13:07:28 maire Exp $
# $Id: run09.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -7,17 +7,14 @@
#
/control/verbose 2
#
/calor/cutG 2.2 mm
/calor/cutE 6.05 micrometer
#
/run/initialize
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.2 mm
####/calor/cutE 1.4 micrometer #before beta03-00 (17.11.98)
/calor/cutE 6.05 micrometer #from beta03-00 (17.11.98)
/run/initialize
/run/particle/dumpCutValues
/process/eLoss/StepFunction 0.183 170 micrometer
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run11.mac,v 1.1 1999/10/11 13:07:29 maire Exp $
# $Id: run11.mac,v 1.3 2001/10/31 15:36:44 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
@@ -9,10 +9,10 @@
#
/calor/cutG 95 cm
/calor/cutE 17 cm
#
/run/initialize
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 1 GeV
@@ -22,13 +22,13 @@
//
//
// $Id: Em1DetectorConstruction.cc,v 1.4.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1DetectorConstruction.cc,v 1.7 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1DetectorConstruction.hh"
#include "Em1DetectorMessenger.hh"
@@ -49,23 +49,23 @@
#include "G4UnitsTable.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1DetectorConstruction::Em1DetectorConstruction()
:pBox (NULL), lBox (NULL),
aMaterial(NULL),
magField (NULL)
:pBox (0), lBox (0),
aMaterial(0),
magField (0)
{
// create commands for interactive definition of the detector
detectorMessenger = new Em1DetectorMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1DetectorConstruction::~Em1DetectorConstruction()
{ delete detectorMessenger;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* Em1DetectorConstruction::Construct()
{
@@ -74,7 +74,7 @@ G4VPhysicalVolume* Em1DetectorConstruction::Construct()
return ConstructVolumes();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::DefineMaterials()
{
@@ -148,7 +148,7 @@ G4cout << *(G4Material::GetMaterialTable()) << G4endl;
aMaterial = Al;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* Em1DetectorConstruction::ConstructVolumes()
{
@@ -164,7 +164,7 @@ G4VPhysicalVolume* Em1DetectorConstruction::ConstructVolumes()
G4ThreeVector(), //at (0,0,0)
"Container", //its name
lBox, //its logical volume
NULL, //its mother volume
0, //its mother volume
false, //no boolean operation
0); //copy number
@@ -184,7 +184,7 @@ G4VPhysicalVolume* Em1DetectorConstruction::ConstructVolumes()
return pBox;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::PrintParameters()
{
@@ -192,7 +192,7 @@ void Em1DetectorConstruction::PrintParameters()
<< " of " << aMaterial->GetName() << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::SetMaterial(G4String materialChoice)
{
@@ -204,14 +204,14 @@ void Em1DetectorConstruction::SetMaterial(G4String materialChoice)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::SetSize(G4double value)
{
BoxSize = value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::SetMagField(G4double fieldValue)
{
@@ -229,16 +229,16 @@ void Em1DetectorConstruction::SetMagField(G4double fieldValue)
}
else
{
magField = NULL;
magField = 0;
fieldMgr->SetDetectorField(magField);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorConstruction::UpdateGeometry()
{
G4RunManager::GetRunManager()->DefineWorldVolume(ConstructVolumes());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1DetectorMessenger.cc,v 1.2.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1DetectorMessenger.cc,v 1.4 2001/10/26 12:51:25 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1DetectorMessenger.hh"
@@ -37,7 +37,7 @@
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithoutParameter.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1DetectorMessenger::Em1DetectorMessenger(Em1DetectorConstruction * Em1Det)
:Em1Detector(Em1Det)
@@ -48,21 +48,21 @@ Em1DetectorMessenger::Em1DetectorMessenger(Em1DetectorConstruction * Em1Det)
MaterCmd = new G4UIcmdWithAString("/calor/setMat",this);
MaterCmd->SetGuidance("Select material of the box.");
MaterCmd->SetParameterName("choice",false);
MaterCmd->AvailableForStates(Idle);
MaterCmd->AvailableForStates(PreInit,Idle);
SizeCmd = new G4UIcmdWithADoubleAndUnit("/calor/setSize",this);
SizeCmd->SetGuidance("Set size of the box");
SizeCmd->SetParameterName("Size",false);
SizeCmd->SetRange("Size>0.");
SizeCmd->SetUnitCategory("Length");
SizeCmd->AvailableForStates(Idle);
SizeCmd->AvailableForStates(PreInit,Idle);
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/calor/setField",this);
MagFieldCmd->SetGuidance("Define magnetic field.");
MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
MagFieldCmd->SetParameterName("Bz",false);
MagFieldCmd->SetUnitCategory("Magnetic flux density");
MagFieldCmd->AvailableForStates(Idle);
MagFieldCmd->AvailableForStates(PreInit,Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/calor/update",this);
UpdateCmd->SetGuidance("Update calorimeter geometry.");
@@ -71,7 +71,7 @@ Em1DetectorMessenger::Em1DetectorMessenger(Em1DetectorConstruction * Em1Det)
UpdateCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1DetectorMessenger::~Em1DetectorMessenger()
{
@@ -82,7 +82,7 @@ Em1DetectorMessenger::~Em1DetectorMessenger()
delete Em1detDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
@@ -99,4 +99,4 @@ void Em1DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{ Em1Detector->UpdateGeometry(); }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,17 +21,16 @@
// ********************************************************************
//
//
// $Id: Em1EventAction.cc,v 1.3.2.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1EventAction.cc,v 1.6 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1EventAction.hh"
#include "Em1RunAction.hh"
#include "Em1EventActionMessenger.hh"
#include "G4Event.hh"
@@ -41,24 +40,23 @@
#include "G4VVisManager.hh"
#include "G4ios.hh"
#include "G4UnitsTable.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1EventAction::Em1EventAction(Em1RunAction* run)
:Em1Run(run),drawFlag("all"),printModulo(10000),eventMessenger(NULL)
Em1EventAction::Em1EventAction()
:drawFlag("none"),printModulo(10000),eventMessenger(0)
{
eventMessenger = new Em1EventActionMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1EventAction::~Em1EventAction()
{
delete eventMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1EventAction::BeginOfEventAction(const G4Event* evt)
{
@@ -67,19 +65,12 @@ void Em1EventAction::BeginOfEventAction(const G4Event* evt)
//printing survey
if (evtNb%printModulo == 0)
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
//save rndm status
if (Em1Run->GetRndmFreq() == 2)
{
HepRandom::saveEngineStatus("beginOfEvent.rndm");
if (evtNb%printModulo == 0) HepRandom::showEngineStatus();
}
//additional initializations
TotalEnergyDeposit = 0.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1EventAction::EndOfEventAction(const G4Event* evt)
{
@@ -94,7 +85,8 @@ void Em1EventAction::EndOfEventAction(const G4Event* evt)
G4int n_trajectories = 0;
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
for(G4int i=0; i<n_trajectories; i++)
{ G4Trajectory* trj = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
{ G4Trajectory* trj = (G4Trajectory*)
((*(evt->GetTrajectoryContainer()))[i]);
if (drawFlag == "all") trj->DrawTrajectory(50);
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
trj->DrawTrajectory(50);
@@ -102,6 +94,6 @@ void Em1EventAction::EndOfEventAction(const G4Event* evt)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1EventActionMessenger.cc,v 1.2.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1EventActionMessenger.cc,v 1.4 2001/10/26 12:51:25 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1EventActionMessenger.hh"
@@ -36,7 +36,7 @@
#include "G4UIcmdWithAnInteger.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1EventActionMessenger::Em1EventActionMessenger(Em1EventAction* EvAct)
:eventAction(EvAct)
@@ -56,7 +56,7 @@ Em1EventActionMessenger::Em1EventActionMessenger(Em1EventAction* EvAct)
PrintCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1EventActionMessenger::~Em1EventActionMessenger()
{
@@ -64,9 +64,10 @@ Em1EventActionMessenger::~Em1EventActionMessenger()
delete PrintCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1EventActionMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
void Em1EventActionMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if(command == DrawCmd)
{eventAction->SetDrawFlag(newValue);}
@@ -76,4 +77,4 @@ void Em1EventActionMessenger::SetNewValue(G4UIcommand * command,G4String newValu
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsList.cc,v 1.3.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PhysicsList.cc,v 1.5 2001/10/26 12:51:25 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1PhysicsList.hh"
@@ -47,7 +47,7 @@
#include "G4UImanager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PhysicsList::Em1PhysicsList(Em1DetectorConstruction* p)
: G4VUserPhysicsList()
@@ -63,12 +63,12 @@ Em1PhysicsList::Em1PhysicsList(Em1DetectorConstruction* p)
pMes = new Em1PhysicsListMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PhysicsList::~Em1PhysicsList()
{ delete pMes; }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructParticle()
{
@@ -83,7 +83,7 @@ void Em1PhysicsList::ConstructParticle()
ConstructBarions();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructBosons()
{
@@ -97,7 +97,8 @@ void Em1PhysicsList::ConstructBosons()
// optical photon
G4OpticalPhoton::OpticalPhotonDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructLeptons()
{
@@ -112,7 +113,7 @@ void Em1PhysicsList::ConstructLeptons()
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructMesons()
{
@@ -130,7 +131,7 @@ void Em1PhysicsList::ConstructMesons()
G4KaonZeroShort::KaonZeroShortDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructBarions()
{
@@ -142,7 +143,7 @@ void Em1PhysicsList::ConstructBarions()
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructProcess()
{
@@ -151,7 +152,7 @@ void Em1PhysicsList::ConstructProcess()
ConstructGeneral();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
@@ -169,7 +170,7 @@ void Em1PhysicsList::ConstructProcess()
#include "G4hIonisation.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::ConstructEM()
{
@@ -216,7 +217,7 @@ void Em1PhysicsList::ConstructEM()
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Decay.hh"
@@ -236,7 +237,7 @@ void Em1PhysicsList::ConstructGeneral()
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::SetCuts()
{
@@ -261,7 +262,7 @@ void Em1PhysicsList::SetCuts()
if (verboseLevel>0) DumpCutValuesTable();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::SetGammaCut(G4double val)
{
@@ -269,7 +270,7 @@ void Em1PhysicsList::SetGammaCut(G4double val)
cutForGamma = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::SetElectronCut(G4double val)
{
@@ -277,7 +278,7 @@ void Em1PhysicsList::SetElectronCut(G4double val)
cutForElectron = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::SetProtonCut(G4double val)
{
@@ -285,7 +286,7 @@ void Em1PhysicsList::SetProtonCut(G4double val)
cutForProton = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::SetCutsByEnergy(G4double val)
{
@@ -318,7 +319,7 @@ void Em1PhysicsList::SetCutsByEnergy(G4double val)
SetCutValueForOthers(cut);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsList::GetRange(G4double val)
{
@@ -335,6 +336,6 @@ void Em1PhysicsList::GetRange(G4double val)
G4cout << "range : " << cut / mm << " (mm)" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PhysicsListMessenger.cc,v 1.2.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PhysicsListMessenger.cc,v 1.5 2001/10/31 15:36:45 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1PhysicsListMessenger.hh"
@@ -35,7 +35,7 @@
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PhysicsListMessenger::Em1PhysicsListMessenger(Em1PhysicsList* EvAct)
:physList(EvAct)
@@ -45,21 +45,21 @@ Em1PhysicsListMessenger::Em1PhysicsListMessenger(Em1PhysicsList* EvAct)
cutGCmd->SetParameterName("range",false);
cutGCmd->SetRange("range>0.");
cutGCmd->SetUnitCategory("Length");
cutGCmd->AvailableForStates(Idle);
cutGCmd->AvailableForStates(PreInit,Idle);
cutECmd = new G4UIcmdWithADoubleAndUnit("/calor/cutE",this);
cutECmd->SetGuidance("Set cut values by RANGE for e- e+.");
cutECmd->SetParameterName("range",false);
cutECmd->SetRange("range>0.");
cutECmd->SetUnitCategory("Length");
cutECmd->AvailableForStates(Idle);
cutECmd->AvailableForStates(PreInit,Idle);
cutPCmd = new G4UIcmdWithADoubleAndUnit("/calor/cutP",this);
cutPCmd->SetGuidance("Set cut values by RANGE for proton and others.");
cutPCmd->SetParameterName("range",false);
cutPCmd->SetRange("range>0.");
cutPCmd->SetUnitCategory("Length");
cutPCmd->AvailableForStates(Idle);
cutPCmd->AvailableForStates(PreInit,Idle);
eCmd = new G4UIcmdWithADoubleAndUnit("/calor/cutEnergy",this);
eCmd->SetGuidance("Set cut values by ENERGY for charged particles.");
@@ -76,7 +76,7 @@ Em1PhysicsListMessenger::Em1PhysicsListMessenger(Em1PhysicsList* EvAct)
rCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PhysicsListMessenger::~Em1PhysicsListMessenger()
{
@@ -87,9 +87,10 @@ Em1PhysicsListMessenger::~Em1PhysicsListMessenger()
delete eCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
void Em1PhysicsListMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if(command == cutGCmd)
{physList->SetGammaCut(cutGCmd->GetNewDoubleValue(newValue));}
@@ -104,4 +105,4 @@ void Em1PhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newValu
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1PrimaryGeneratorAction.cc,v 1.2.4.1 2001/06/28 19:06:49 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1PrimaryGeneratorAction.cc,v 1.4 2001/10/26 12:51:25 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1PrimaryGeneratorAction.hh"
@@ -36,7 +36,7 @@
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PrimaryGeneratorAction::Em1PrimaryGeneratorAction()
{
@@ -53,19 +53,19 @@ Em1PrimaryGeneratorAction::Em1PrimaryGeneratorAction()
particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,0.*cm));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1PrimaryGeneratorAction::~Em1PrimaryGeneratorAction()
{
delete particleGun;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->GeneratePrimaryVertex(anEvent);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,20 +21,20 @@
// ********************************************************************
//
//
// $Id: Em1RunAction.cc,v 1.10.2.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1RunAction.cc,v 1.13 2001/11/29 11:28:07 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// 08.03.01 Hisaya: adapted for STL
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1RunAction.hh"
#include "Em1RunActionMessenger.hh"
#include "G4Run.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
@@ -46,26 +46,24 @@
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1RunAction::Em1RunAction()
: ProcCounter(0), saveRndm (1),
runMessenger(new Em1RunActionMessenger(this))
: ProcCounter(0)
{
#ifndef G4NOHIST
hbookManager = NULL;
hbookManager = 0;
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1RunAction::~Em1RunAction()
{
cleanHisto();
delete runMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1RunAction::bookHisto()
{
@@ -73,13 +71,16 @@ void Em1RunAction::bookHisto()
hbookManager = new HBookFile("testem1.paw", 68);
// booking histograms
histo[0] = hbookManager->histogram("track length (mm) of a charged particle",100,0.,50*cm);
histo[1] = hbookManager->histogram("Nb of steps per track (charged particle)",100,0.,100.);
histo[2] = hbookManager->histogram("step length (mm) charged particle",100,0.,10*mm);
histo[0] = hbookManager->histogram
("track length (mm) of a charged particle",100,0.,50*cm);
histo[1] = hbookManager->histogram
("Nb of steps per track (charged particle)",100,0.,100.);
histo[2] = hbookManager->histogram
("step length (mm) charged particle",100,0.,10*mm);
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1RunAction::cleanHisto()
{
@@ -91,18 +92,16 @@ void Em1RunAction::cleanHisto()
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1RunAction::BeginOfRunAction(const G4Run* aRun)
{
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
// save Rndm status
if (saveRndm > 0)
{ HepRandom::showEngineStatus();
HepRandom::saveEngineStatus("beginOfRun.rndm");
}
G4RunManager::GetRunManager()->SetRandomNumberStore(true);
HepRandom::showEngineStatus();
NbOfTraks0 = 0; NbOfTraks1 = 0; NbOfSteps0 = 0; NbOfSteps1 = 0;
ProcCounter = new ProcessesCount;
@@ -111,13 +110,10 @@ void Em1RunAction::BeginOfRunAction(const G4Run* aRun)
if (aRun->GetRunID() == 0) bookHisto();
if (G4VVisManager::GetConcreteInstance())
{
G4UImanager* UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/vis/scene/notifyHandlers");
}
G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1RunAction::CountProcesses(G4String procName)
{
@@ -130,7 +126,7 @@ void Em1RunAction::CountProcesses(G4String procName)
(*ProcCounter)[i]->Count();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1RunAction::EndOfRunAction(const G4Run* aRun)
{
@@ -143,21 +139,22 @@ void Em1RunAction::EndOfRunAction(const G4Run* aRun)
G4int oldprec = G4cout.precision(2);
G4cout << "\n nb tracks/event"
<< " neutral: " << G4std::setw(7) << NbOfTraks0/dNbOfEvents
<< " charged: " << G4std::setw(7) << NbOfTraks1/dNbOfEvents
<< " neutral: " << G4std::setw(7) << NbOfTraks0/dNbOfEvents
<< " charged: " << G4std::setw(7) << NbOfTraks1/dNbOfEvents
<< "\n nb steps/event"
<< " neutral: " << G4std::setw(7) << NbOfSteps0/dNbOfEvents
<< " charged: " << G4std::setw(7) << NbOfSteps1/dNbOfEvents
<< " neutral: " << G4std::setw(7) << NbOfSteps0/dNbOfEvents
<< " charged: " << G4std::setw(7) << NbOfSteps1/dNbOfEvents
<< G4endl;
//frequency of processes call
G4cout << "\n nb of process calls per event: \n ";
for (G4int i=0; i< ProcCounter->size();i++)
for (size_t i=0; i< ProcCounter->size();i++)
G4cout << G4std::setw(9) << (*ProcCounter)[i]->GetName();
G4cout << "\n ";
for (G4int j=0; j< ProcCounter->size();j++)
G4cout << G4std::setw(9) << ((*ProcCounter)[j]->GetCounter())/dNbOfEvents;
for (size_t j=0; j< ProcCounter->size();j++)
G4cout << G4std::setw(9) << ((*ProcCounter)[j]->GetCounter())
/dNbOfEvents;
G4cout << G4endl;
G4cout.setf(oldform,G4std::ios::floatfield);
@@ -176,11 +173,8 @@ void Em1RunAction::EndOfRunAction(const G4Run* aRun)
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
// save Rndm status
if (saveRndm > 0)
{ HepRandom::showEngineStatus();
HepRandom::saveEngineStatus("endOfRun.rndm");
}
// show Rndm status
HepRandom::showEngineStatus();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,13 +21,13 @@
// ********************************************************************
//
//
// $Id: Em1SteppingAction.cc,v 1.5.2.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1SteppingAction.cc,v 1.7 2001/10/26 12:51:26 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1SteppingAction.hh"
#include "Em1RunAction.hh"
@@ -39,18 +39,18 @@
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1SteppingAction::Em1SteppingAction(Em1RunAction* RuAct, Em1EventAction* EvAct)
:runAction(RuAct),eventAction(EvAct)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1SteppingAction::~Em1SteppingAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1SteppingAction::UserSteppingAction(const G4Step* aStep)
{
@@ -68,6 +68,6 @@ void Em1SteppingAction::UserSteppingAction(const G4Step* aStep)
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,28 +21,28 @@
// ********************************************************************
//
//
// $Id: Em1SteppingVerbose.cc,v 1.6.2.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1SteppingVerbose.cc,v 1.8 2001/10/26 12:51:26 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1SteppingVerbose.hh"
#include "G4SteppingManager.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1SteppingVerbose::Em1SteppingVerbose()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1SteppingVerbose::~Em1SteppingVerbose()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1SteppingVerbose::StepInfo()
{
@@ -66,14 +66,14 @@ void Em1SteppingVerbose::StepInfo()
<< G4std::setw(10) << "Process" << G4endl;
}
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
G4cout << G4std::setw(5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
// if( fStepStatus != fWorldBoundary){
if( fTrack->GetNextVolume() != 0 ) {
@@ -84,8 +84,8 @@ void Em1SteppingVerbose::StepInfo()
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL){
G4cout << " "
<< G4std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
->GetProcessName();
<< G4std::setw(10) << fStep->GetPostStepPoint()
->GetProcessDefinedStep()->GetProcessName();
} else {
G4cout << " UserLimit";
}
@@ -107,7 +107,7 @@ void Em1SteppingVerbose::StepInfo()
<< " ---------------"
<< G4endl;
for(G4int lp1=(*fSecondary).size()-tN2ndariesTot;
for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
lp1<(*fSecondary).size(); lp1++){
G4cout << " : "
<< G4std::setw(6)
@@ -134,7 +134,7 @@ void Em1SteppingVerbose::StepInfo()
G4cout.precision(prec);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1SteppingVerbose::TrackingStarted()
{
@@ -154,14 +154,14 @@ G4int prec = G4cout.precision(3);
<< G4std::setw(10) << "Volume" << " "
<< G4std::setw(10) << "Process" << G4endl;
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
G4cout << G4std::setw(5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
if(fTrack->GetNextVolume()){
G4cout << G4std::setw(10) << fTrack->GetVolume()->GetName();
@@ -173,4 +173,4 @@ G4int prec = G4cout.precision(3);
G4cout.precision(prec);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,13 +22,13 @@
//
//
// $Id: Em1TrackingAction.cc,v 1.5.2.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1TrackingAction.cc,v 1.7 2001/10/26 12:51:26 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Em1TrackingAction.hh"
#include "Em1RunAction.hh"
@@ -39,13 +39,13 @@
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1TrackingAction::Em1TrackingAction(Em1RunAction* RunAct)
:runAction(RunAct)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
{
@@ -65,4 +65,5 @@ void Em1TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,14 +21,14 @@
// ********************************************************************
//
//
// $Id: Em1VisManager.cc,v 1.2.4.1 2001/06/28 19:06:50 gunter Exp $
// GEANT4 tag $Name: $
// $Id: Em1VisManager.cc,v 1.6 2001/11/15 13:09:44 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 24th January 1998.
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifdef G4VIS_USE
@@ -36,14 +36,21 @@
// Supported drivers...
// Not needing external packages or libraries...
#include "G4ASCIITree.hh"
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
// Needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
#include "G4FukuiRenderer.hh"
#endif
#ifdef G4VIS_USE_DAWNFILE
#include "G4DAWNFILE.hh"
#endif
#ifdef G4VIS_USE_OPACS
#include "G4Wo.hh"
#include "G4Xo.hh"
@@ -72,36 +79,34 @@
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_RAYX
#include "G4RayX.hh"
#endif
#ifdef G4VIS_USE_VRML
#include "G4VRML1.hh"
// #include "G4VRML2.hh"
#include "G4VRML2.hh"
#endif
#ifdef G4VIS_USE_VRMLFILE
#include "G4VRML1File.hh"
//#include "G4VRML2File.hh"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em1VisManager::Em1VisManager () {}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em1VisManager::RegisterGraphicsSystems () {
// Graphics Systems not needing external packages or libraries...
RegisterGraphicsSystem (new G4ASCIITree);
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
// Graphics systems needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
RegisterGraphicsSystem (new G4FukuiRenderer);
#endif
#ifdef G4VIS_USE_DAWNFILE
RegisterGraphicsSystem (new G4DAWNFILE);
#endif
#ifdef G4VIS_USE_OPACS
RegisterGraphicsSystem (new G4Wo);
RegisterGraphicsSystem (new G4Xo);
@@ -130,18 +135,9 @@ void Em1VisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4OpenInventorWin32);
#endif
#ifdef G4VIS_USE_RAYX
RegisterGraphicsSystem (new G4RayX);
#endif
#ifdef G4VIS_USE_VRML
RegisterGraphicsSystem (new G4VRML1);
// RegisterGraphicsSystem (new G4VRML2);
#endif
#ifdef G4VIS_USE_VRMLFILE
RegisterGraphicsSystem (new G4VRML1File);
// RegisterGraphicsSystem (new G4VRML2File);
RegisterGraphicsSystem (new G4VRML2);
#endif
if (fVerbose > 0) {
@@ -154,4 +150,4 @@ void Em1VisManager::RegisterGraphicsSystems () {
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,5 +1,5 @@
#
# Macro file for the initialization phase of "exampleN03.cc"
# Macro file for the initialization phase of "TestEm1.cc"
#
# Sets some default verbose
# and initializes the graphic.
@@ -7,20 +7,26 @@
/control/verbose 2
/run/verbose 2
#
/run/initialize
#
# Create empty scene ("world" is default)
/vis/scene/create
#
# Create a scene handler for a specific graphics system
# Edit the next line(s) to choose another graphic system
#
#/vis/open DAWNFILE
/vis/open OGLIX
#
#/vis/open DAWNFILE
#
# Draw scene
/vis/camera/zoom 1.4
/vis/drawVolume
/vis/viewer/zoom 1.4
/vis/viewer/flush
#
# for drawing the tracks
# if too many tracks cause core dump => storeTrajectory 0
/tracking/storeTrajectory 1
/event/drawTracks all
/vis/scene/endOfEventAction accumulate
#
/event/drawTracks
@@ -0,0 +1,27 @@
# $Id: GNUmakefile,v 1.2 2001/11/27 16:58:37 gcosmo Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := TestEm10
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/architecture.gmk
G4NOHIST := true
ifdef G4NOHIST
CPPFLAGS += -DG4NOHIST
else
LDFLAGS += -L/cern/pro/lib
LOADLIBS += -lpacklib $(FCLIBS)
endif
include $(G4INSTALL)/config/binmake.gmk
@@ -0,0 +1,35 @@
$Id: History,v 1.4 2001/11/27 17:01:17 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
TestEm10 History file
---------------------
This file should be used by the G4 example coordinator to briefly
summarize all major modifications introduced in the code and keep
track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
27 Nov. 2001 Gabriele Cosmo (TestEm10-V03-02-01)
- Corrected README.
- Set G4NOHIST as default in GNUmakefile.
- More models in run11.mac (V.Grichine).
21 Nov. 2001 Marc Verderi (TestEm10-V03-02-00)
- Define a new TestEm10.in (and .out) which tests
all XTR models, shooting 10 particles for each run.
Required some modification in the detector construction
and messenger.
- Define a new TestEm10.large_N.in (and .out)
shooting 1000 particles/run.
21 Nov. 2001 Marc Verderi
- Taken for the HEAD and made compliant with
geant4-04-00-cand-01
- clear many warnings
@@ -0,0 +1,132 @@
$Id: README,v 1.3 2001/11/27 16:58:18 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
TestEm10
--------
Test for investigation of ionisation in thin absorbers, transition
and synchrotron radiations.
0- INTRODUCTION
The parameterisations models can be changed simply with:
Idle> /XTRdetector/setModel i (i = 1 to 10)
It is NOT needed (and not recommended) to issue the command
/XTRdetector/update if just the model is changed.
See macro file "TestEm10.in" for an example.
1- GEOMETRY DEFINITION
The "absorber" is a tube made of a given material.
Three parameters define the absorber :
- the material of the absorber,
- the thickness of an absorber,
- the transverse size of the absorber (the input face is a square).
The volume "World" contains the "absorber".
In this test the parameters of the "World" can be changed , too.
In addition a transverse uniform magnetic field can be applied.
The default geometry is constructed in DetectorConstruction class,
but all the parameters can be changed via
the commands defined in the DetectorMessenger class.
2- AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle which hits the
absorber perpendicular to the input face. The type of the particle
and its energy are set in the PrimaryGeneratorAction class, and can
be changed via the G4 build-in commands of ParticleGun class (see
the macros provided with this example).
A RUN is a set of events.
3- DETECTOR RESPONSE
Here we test G4PAIionisation , G4IonisationByLogicalVolume and
transition radiation processes
A HIT is a record, event per event , of all the
informations needed to simulate and analyse the detector response.
In this example a CalorHit is defined as a set of 2 informations:
- the total energy deposit in the absorber,
- the total tracklength of all charged particles in the absorber,
Therefore the absorber is declared
'sensitive detector' (SD), which means they can contribute to the hit.
At the end of a run, from the histogram(s), one can study
different physics quantities such as :
- angle distribution,
- energy deposit,
- transmission/backscattering,
- ...
The test contains 10 built-in histograms, which can be activated by
interactive commands (see the macros runxx.mac for details).
The histogram files can be viewed using PAW e.g with the commands
paw> h/file 1 geant4.plot01 or g4.p11
paw> option stat
paw> h/pl 1
4- PHYSICS DEMO
The particle's type and the physic processes which will be available
in this example are set in PhysicsList class.
The messenger classes introduce interactive commands . Using these
commands the geometry of the detector, the data of the primary
particle, the limits of the histograms , etc. can be changed.
5- HOW TO START ?
- compile and link to generate an executable
% cd TestEm10
% gmake
- execute TestEm10 in 'batch' mode from macro files e.g.
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm10 run11.mac
- execute TestEm10 in 'interactive' mode with visualization e.g.
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm10
....
Idle> type your commands
....
List of the built-in histograms
-------------------------------
1. number of (tracking) steps/event
2. energy deposit distribution in the absorber (in MeV)
3. angle distribution of the primary particle at the exit
of the absorber (deg)
4. distribution of the lateral displacement at exit(mm)
5. kinetic energy of the transmitted primaries (MeV)
6. angle distribution of the backscattered primaries (deg)
7. kinetic energy of the backscattered primary particles (MeV)
8. kinetic energy of the charged secondary particles (MeV)
9. z distribution of the secondary charged vertices (mm)
10. kinetic energy of the photons escaping the absorber (MeV)
Note that, histograms are disabled via the flag G4NOHIST in the GNUmakefile.
Currently, histograms in this example are implemented through the obsolete
CLHEP/Hist package, which is no longer supported. The implementation will
be replaced by direct call to the AIDA abstract interfaces in a near future.
@@ -0,0 +1,133 @@
//
// ********************************************************************
// * 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: TestEm10.cc,v 1.2 2001/07/11 09:57:18 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// --------------------------------------------------------------
// GEANT 4 - TestEm10
//
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "Randomize.hh"
#ifdef G4VIS_USE
#include "Em10VisManager.hh"
#endif
#include "Em10DetectorConstruction.hh"
#include "Em10PhysicsList.hh"
#include "Em10PrimaryGeneratorAction.hh"
#include "Em10RunAction.hh"
#include "Em10EventAction.hh"
#include "Em10SteppingAction.hh"
#include "Em10SteppingVerbose.hh"
int main(int argc,char** argv)
{
//choose the Random engine
HepRandom::setTheEngine(new RanecuEngine);
//my Verbose output class
G4VSteppingVerbose::SetInstance(new Em10SteppingVerbose);
// Construct the default run manager
G4RunManager * runManager = new G4RunManager;
// set mandatory initialization classes
Em10DetectorConstruction* detector;
detector = new Em10DetectorConstruction;
runManager->SetUserInitialization(detector);
runManager->SetUserInitialization(new Em10PhysicsList(detector));
#ifdef G4VIS_USE
// visualization manager
G4VisManager* visManager = new Em10VisManager;
visManager->Initialize();
#endif
// set user action classes
runManager->SetUserAction(new Em10PrimaryGeneratorAction(detector));
Em10RunAction* runAction = new Em10RunAction;
runManager->SetUserAction(runAction);
Em10EventAction* eventAction = new Em10EventAction(runAction);
runManager->SetUserAction(eventAction);
Em10SteppingAction* steppingAction = new Em10SteppingAction(detector,
eventAction,
runAction);
runManager->SetUserAction(steppingAction);
//Initialize G4 kernel, physics tables ...
runManager->Initialize();
// get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
if (argc==1) // Define UI terminal for interactive mode
{
G4UIsession * session = new G4UIterminal;
UI->ApplyCommand("/control/execute init.mac");
session->SessionStart();
delete session;
}
else // Batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
// job termination
#ifdef G4VIS_USE
delete visManager;
#endif
delete runManager;
return 0;
}
@@ -0,0 +1,46 @@
#
# Macro file 'TestEm10.in' for testing "TestEm10"
#
#
/run/initialize
/run/particle/dumpCutValues
/gun/particle e-
/gun/energy 9000.0 MeV
# Test G4FoamXrayTRmodel
/XTRdetector/setModel 1
/run/beamOn 1000
# Test G4FoamXTRdEdx
/XTRdetector/setModel 2
/run/beamOn 10
# Test G4GamDistrXrayTRmodel
/XTRdetector/setModel 3
/run/beamOn 10
# Test G4GamDistrXTRdEdx
/XTRdetector/setModel 4
/run/beamOn 10
# Test G4IrregularXrayTRmodel
/XTRdetector/setModel 5
/run/beamOn 10
# Test G4IrregularXTRdEdx
/XTRdetector/setModel 6
/run/beamOn 10
# Test G4PlateIrrGasXrayTRmodel
/XTRdetector/setModel 7
/run/beamOn 10
# Test G4PlateIrrGasXTRdEdx
/XTRdetector/setModel 8
/run/beamOn 10
# Test G4RegularXrayTRmodel
/XTRdetector/setModel 9
/run/beamOn 10
# Test G4RegularXTRdEdx
/XTRdetector/setModel 10
/run/beamOn 10
@@ -0,0 +1,46 @@
#
# Macro file 'TestEm10.large_N.in' for testing "TestEm10"
#
#
/run/initialize
/run/particle/dumpCutValues
/gun/particle e-
/gun/energy 9000.0 MeV
# Test G4FoamXrayTRmodel
/XTRdetector/setModel 1
/run/beamOn 1000
# Test G4FoamXTRdEdx
/XTRdetector/setModel 2
/run/beamOn 1000
# Test G4GamDistrXrayTRmodel
/XTRdetector/setModel 3
/run/beamOn 1000
# Test G4GamDistrXTRdEdx
/XTRdetector/setModel 4
/run/beamOn 1000
# Test G4IrregularXrayTRmodel
/XTRdetector/setModel 5
/run/beamOn 1000
# Test G4IrregularXTRdEdx
/XTRdetector/setModel 6
/run/beamOn 1000
# Test G4PlateIrrGasXrayTRmodel
/XTRdetector/setModel 7
/run/beamOn 1000
# Test G4PlateIrrGasXTRdEdx
/XTRdetector/setModel 8
/run/beamOn 1000
# Test G4RegularXrayTRmodel
/XTRdetector/setModel 9
/run/beamOn 1000
# Test G4RegularXTRdEdx
/XTRdetector/setModel 10
/run/beamOn 1000
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,97 @@
//
// ********************************************************************
// * 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: Em10CalorHit.hh,v 1.2 2001/07/11 09:57:19 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10CalorHit_h
#define Em10CalorHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10CalorHit : public G4VHit
{
public:
Em10CalorHit();
~Em10CalorHit();
Em10CalorHit(const Em10CalorHit&);
const Em10CalorHit& operator=(const Em10CalorHit&);
int operator==(const Em10CalorHit&) const;
inline void* operator new(size_t);
inline void operator delete(void*);
void Print();
public:
void AddAbs(G4double de, G4double dl) {EdepAbs += de; TrackLengthAbs += dl;};
void AddGap(G4double de, G4double dl) {EdepGap += de; TrackLengthGap += dl;};
G4double GetEdepAbs() { return EdepAbs; };
G4double GetTrakAbs() { return TrackLengthAbs; };
G4double GetEdepGap() { return EdepGap; };
G4double GetTrakGap() { return TrackLengthGap; };
private:
G4double EdepAbs, TrackLengthAbs;
G4double EdepGap, TrackLengthGap;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
typedef G4THitsCollection<Em10CalorHit> Em10CalorHitsCollection;
extern G4Allocator<Em10CalorHit> Em10CalorHitAllocator;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void* Em10CalorHit::operator new(size_t)
{
void* aHit;
aHit = (void*) Em10CalorHitAllocator.MallocSingle();
return aHit;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void Em10CalorHit::operator delete(void* aHit)
{
Em10CalorHitAllocator.FreeSingle((Em10CalorHit*) aHit);
}
#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: Em10CalorimeterSD.hh,v 1.2 2001/07/11 09:57:19 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10CalorimeterSD_h
#define Em10CalorimeterSD_h 1
#include "G4VSensitiveDetector.hh"
#include "globals.hh"
class Em10DetectorConstruction;
class G4HCofThisEvent;
class G4Step;
#include "Em10CalorHit.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10CalorimeterSD : public G4VSensitiveDetector
{
public:
Em10CalorimeterSD(G4String, Em10DetectorConstruction* );
~Em10CalorimeterSD();
void Initialize(G4HCofThisEvent*);
G4bool ProcessHits(G4Step*,G4TouchableHistory*);
void EndOfEvent(G4HCofThisEvent*);
void clear();
void PrintAll();
private:
Em10CalorHitsCollection* CalCollection;
Em10DetectorConstruction* Detector;
G4int* HitID;
};
#endif
@@ -0,0 +1,199 @@
//
// ********************************************************************
// * 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: Em10DetectorConstruction.hh,v 1.4 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
#ifndef Em10DetectorConstruction_h
#define Em10DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
#include "G4ios.hh"
class G4Box;
class G4Tubs;
class G4LogicalVolume;
class G4VPhysicalVolume;
class G4Material;
class G4UniformMagField;
class Em10DetectorMessenger;
class Em10CalorimeterSD;
class G4VXrayTRmodel;
class Em10DetectorConstruction : public G4VUserDetectorConstruction
{
public:
Em10DetectorConstruction();
~Em10DetectorConstruction();
public:
void SetParametrisationModel (G4int i){fModelNumber=i;};
void ParametrisationModel ();
void SetAbsorberMaterial (G4String);
void SetAbsorberThickness(G4double);
void SetAbsorberRadius(G4double);
void SetAbsorberZpos(G4double);
void SetRadiatorMaterial (G4String);
void SetRadiatorThickness(G4double);
void SetGasGapThickness(G4double);
void SetFoilNumber (G4int i){fFoilNumber=i;};
void SetWorldMaterial(G4String);
void SetWorldSizeZ(G4double);
void SetWorldSizeR(G4double);
void SetMagField(G4double);
G4VPhysicalVolume* Construct();
void UpdateGeometry();
public:
void PrintCalorParameters();
G4Material* GetWorldMaterial() {return WorldMaterial;};
G4double GetWorldSizeZ() {return WorldSizeZ;};
G4double GetWorldSizeR() {return WorldSizeR;};
G4double GetAbsorberZpos() {return zAbsorber;};
G4double GetzstartAbs() {return zstartAbs;};
G4double GetzendAbs() {return zendAbs;};
G4Material* GetAbsorberMaterial() {return AbsorberMaterial;};
G4double GetAbsorberThickness() {return AbsorberThickness;};
G4double GetAbsorberRadius() {return AbsorberRadius;};
const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;};
const G4VPhysicalVolume* GetAbsorber() {return physiAbsorber;};
G4LogicalVolume* GetLogicalAbsorber() {return logicAbsorber;};
private:
G4bool worldchanged;
G4Material* AbsorberMaterial;
G4double AbsorberThickness;
G4double AbsorberRadius;
G4Material* fWindowMat ;
G4double fWindowThick ;
G4Material* fElectrodeMat ;
G4double fElectrodeThick ;
G4Material* fGapMat ;
G4double fGapThick ;
G4double zAbsorber ;
G4double zstartAbs , zendAbs ;
G4Material* WorldMaterial;
G4double WorldSizeR;
G4double WorldSizeZ;
G4Box* solidWorld; //pointer to the solid World
G4LogicalVolume* logicWorld; //pointer to the logical World
G4VPhysicalVolume* physiWorld; //pointer to the physical World
// TR radiator volumes and dimensions
G4Box* fSolidRadSlice; // pointer to the solid z-slice
G4LogicalVolume* fLogicRadSlice; // pointer to the logical z-slide
G4VPhysicalVolume* fPhysicRadSlice; // pointer to the physical z-slide
G4Box* fSolidRadRing; // pointer to the solid R-slice
G4LogicalVolume* fLogicRadRing; // pointer to the logical R-slide
G4VPhysicalVolume* fPhysicRadRing; // pointer to the physical R-slide
G4Box* solidRadiator;
G4LogicalVolume* logicRadiator;
G4VPhysicalVolume* physiRadiator;
G4Material* fRadiatorMat; //pointer to the TR radiator material
G4double fRadThickness ;
G4double fGasGap ;
G4int fFoilNumber ;
G4int fModelNumber ; // selection of parametrisation model1-10
G4double fDetThickness ;
G4double fDetLength ;
G4double fDetGap ;
G4double fStartR ;
G4double fStartZ ;
G4int fModuleNumber ; // the number of Rad-Det modules
G4Box* solidAbsorber; //pointer to the solid Absorber
G4LogicalVolume* logicAbsorber; //pointer to the logical Absorber
G4VPhysicalVolume* physiAbsorber; //pointer to the physical Absorber
G4UniformMagField* magField; //pointer to the magnetic field
Em10DetectorMessenger* detectorMessenger; //pointer to the Messenger
Em10CalorimeterSD* calorimeterSD; //pointer to the sensitive detector
G4VXrayTRmodel* fXTRModel ;
private:
void DefineMaterials();
void ComputeCalorParameters();
G4VPhysicalVolume* ConstructCalorimeter();
};
////////////////////////////////////////////////////////////////////////
inline void Em10DetectorConstruction::ComputeCalorParameters()
{
// Compute derived parameters of the calorimeter
if(!worldchanged)
{
// WorldSizeR=2.*AbsorberRadius ;
// WorldSizeZ=2.*AbsorberThickness ;
}
zstartAbs = zAbsorber-0.5*AbsorberThickness;
zendAbs = zAbsorber+0.5*AbsorberThickness;
}
#endif
@@ -0,0 +1,84 @@
//
// ********************************************************************
// * 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: Em10DetectorMessenger.hh,v 1.3 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10DetectorMessenger_h
#define Em10DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class Em10DetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
class Em10DetectorMessenger: public G4UImessenger
{
public:
Em10DetectorMessenger(Em10DetectorConstruction* );
~Em10DetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
void SetNewValue(G4UIcommand*, G4int);
private:
Em10DetectorConstruction* Em10Detector;
G4UIdirectory* Em10detDir;
G4UIcmdWithAnInteger* ModelCmd;
G4UIcmdWithAnInteger* FoilNumCmd;
G4UIcmdWithAString* AbsMaterCmd;
G4UIcmdWithADoubleAndUnit* AbsThickCmd;
G4UIcmdWithADoubleAndUnit* AbsRadCmd;
G4UIcmdWithAString* RadiatorMaterCmd;
G4UIcmdWithADoubleAndUnit* RadiatorThickCmd;
G4UIcmdWithADoubleAndUnit* GasGapThickCmd;
G4UIcmdWithADoubleAndUnit* AbsZposCmd;
G4UIcmdWithAString* WorldMaterCmd;
G4UIcmdWithADoubleAndUnit* WorldZCmd;
G4UIcmdWithADoubleAndUnit* WorldRCmd;
G4UIcmdWithADoubleAndUnit* MagFieldCmd;
G4UIcmdWithoutParameter* UpdateCmd;
};
#endif
@@ -0,0 +1,83 @@
//
// ********************************************************************
// * 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: Em10EventAction.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10EventAction_h
#define Em10EventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class Em10RunAction;
class Em10EventActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10EventAction : public G4UserEventAction
{
public:
Em10EventAction(Em10RunAction* Em10RA);
~Em10EventAction();
public:
void BeginOfEventAction(const G4Event*);
void EndOfEventAction(const G4Event*);
G4int GetEventno();
void setEventVerbose(G4int level);
void CountStepsCharged() ;
void CountStepsNeutral() ;
void AddCharged() ;
void AddNeutral() ;
void AddE();
void AddP();
void SetTr();
void SetRef();
void SetDrawFlag(G4String val) {drawFlag = val;};
void SetPrintModulo(G4int val) {printModulo = val;};
private:
G4int calorimeterCollID;
Em10EventActionMessenger* eventMessenger;
Em10RunAction* runaction;
G4int verboselevel;
G4double nstep,nstepCharged,nstepNeutral;
G4double Nch,Nne;
G4double NE,NP;
G4double Transmitted,Reflected ;
G4String drawFlag;
G4int printModulo;
};
#endif
@@ -0,0 +1,60 @@
//
// ********************************************************************
// * 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: Em10EventActionMessenger.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10EventActionMessenger_h
#define Em10EventActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class Em10EventAction;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10EventActionMessenger: public G4UImessenger
{
public:
Em10EventActionMessenger(Em10EventAction*);
~Em10EventActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
Em10EventAction* eventAction;
G4UIcmdWithAnInteger* setVerboseCmd;
G4UIcmdWithAString* DrawCmd;
G4UIcmdWithAnInteger* PrintCmd;
};
#endif
@@ -0,0 +1,402 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// File for definition of materials used in X-ray TR experiments
#ifndef Em10Materials_h
#define Em10Materials_h 1
#include "G4Material.hh"
G4String name, symbol ; //a=mass of a mole;
G4double a, z, density ; //z=mean number of protons;
G4int iz, n, nel ; //iz=number of protons in an isotope;
// n=number of nucleons in an isotope;
G4int ncomponents, natoms;
G4double abundance, fractionmass;
G4double temperature, pressure;
//
// define Elements
//
a = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
a = 6.94*g/mole;
G4Element* elLi = new G4Element(name="Lithium",symbol="Li" , z= 3., a);
a = 9.01*g/mole;
G4Element* elBe = new G4Element(name="Beryllium",symbol="Be" , z= 4., a);
a = 6.01*g/mole;
G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
a = 14.01*g/mole;
G4Element* elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
a = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
a = 39.948*g/mole;
G4Element* elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
a = 131.29*g/mole;
G4Element* elXe = new G4Element(name="Xenon", symbol="Xe", z=54., a);
a = 19.00*g/mole;
G4Element* elF = new G4Element(name="Fluorine", symbol="F", z=9., a);
//
// define simple materials
//
density = 1.848*g/cm3;
a = 9.01*g/mole;
G4Material* Be = new G4Material(name="Beryllium", z=4., a, density);
density = 1.390*g/cm3;
a = 39.95*g/mole;
G4Material* lAr = new G4Material(name="liquidArgon", z=18., a, density);
density = 7.870*g/cm3;
a = 55.85*g/mole;
G4Material* Fe = new G4Material(name="Iron" , z=26., a, density);
density = 8.960*g/cm3;
a = 63.55*g/mole;
G4Material* Cu = new G4Material(name="Copper" , z=29., a, density);
density = 19.32*g/cm3;
a =196.97*g/mole;
G4Material* Au = new G4Material(name="Gold" , z=79., a, density);
density = 11.35*g/cm3;
a = 207.19*g/mole;
G4Material* Pb = new G4Material(name="Lead" , z=82., a, density);
//
// define a material from elements. case 1: chemical molecule
//
density = 1.000*g/cm3;
G4Material* H2O = new G4Material(name="Water", density, ncomponents=2);
H2O->AddElement(elH, natoms=2);
H2O->AddElement(elO, natoms=1);
// Silicon as detector material
density = 2.330*g/cm3;
a = 28.09*g/mole;
G4Material* Si = new G4Material(name="Silicon", z=14., a, density);
/////////////////////////////////////////////////////////////////
//
// Detector windows, electrodes
// Al for electrodes
density = 2.700*g/cm3;
a = 26.98*g/mole;
G4Material* Al = new G4Material(name="Aluminium", z=13., a, density);
////////////////////////////////////////////////////////////////////////////
//
// Materials for popular X-ray TR radiators
//
// TRT_CH2
density = 0.935*g/cm3;
G4Material* TRT_CH2 = new G4Material(name="TRT_CH2",density, nel=2);
TRT_CH2->AddElement(elC,1);
TRT_CH2->AddElement(elH,2);
// Radiator
density = 0.059*g/cm3;
G4Material* Radiator = new G4Material(name="Radiator",density, nel=2);
Radiator->AddElement(elC,1);
Radiator->AddElement(elH,2);
// Carbon Fiber
density = 0.145*g/cm3;
G4Material* CarbonFiber = new G4Material(name="CarbonFiber",density, nel=1);
CarbonFiber->AddElement(elC,1);
// Lithium
density = 0.534*g/cm3;
G4Material* Li = new G4Material(name="Li",density, nel=1);
Li->AddElement(elLi,1);
// Beryllium
density = 1.848*g/cm3;
G4Material* Be = new G4Material(name="Be",density, nel=1);
Be->AddElement(elBe,1);
// Mylar
density = 1.39*g/cm3;
G4Material* Mylar = new G4Material(name="Mylar", density, nel=3);
Mylar->AddElement(elO,2);
Mylar->AddElement(elC,5);
Mylar->AddElement(elH,4);
// Kapton (polyimide) ??? since = Mylar C5H4O2
density = 1.39*g/cm3;
G4Material* Kapton = new G4Material(name="Kapton", density, nel=3);
Kapton->AddElement(elO,2);
Kapton->AddElement(elC,5);
Kapton->AddElement(elH,4);
// Polypropelene
G4Material* CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
CH2->AddElement(elH,2);
CH2->AddElement(elC,1);
density = 1.290*mg/cm3; // old air from elements
G4Material* air = new G4Material(name="air" , density, ncomponents=2);
Air->AddElement(elN, fractionmass=0.7);
Air->AddElement(elO, fractionmass=0.3);
density = 1.25053*mg/cm3 ; // STP
a = 14.01*g/mole ; // get atomic weight !!!
// a = 28.016*g/mole;
G4Material* N2 = new G4Material(name="Nitrogen", z= 7.,a,density) ;
density = 1.25053*mg/cm3 ; // STP
G4Material* anotherN2 = new G4Material(name="anotherN2", density,ncomponents=2);
anotherN2->AddElement(elN, 1);
anotherN2->AddElement(elN, 1);
//////////////////////////////////////////////////////////////////////////
//
// Noble gases , STP conditions
// Helium as detector gas, STP
density = 0.178*mg/cm3 ;
a = 4.0026*g/mole ;
G4Material* He = new G4Material(name="He",z=2., a, density );
// Neon as detector gas, STP
density = 0.900*mg/cm3 ;
a = 20.179*g/mole ;
G4Material* Ne = new G4Material(name="Ne",z=10., a, density );
// Argon as detector gas, STP
density = 1.7836*mg/cm3 ; // STP
G4Material* Argon = new G4Material(name="Argon" , density, ncomponents=1);
Argon->AddElement(elAr, 1);
// Krypton as detector gas, STP
density = 3.700*mg/cm3 ;
a = 83.80*g/mole ;
G4Material* Kr = new G4Material(name="Kr",z=36., a, density );
// Xenon as detector gas, STP
density = 5.858*mg/cm3 ;
a = 131.29*g/mole ;
G4Material* Xe = new G4Material(name="Xenon",z=54., a, density );
/////////////////////////////////////////////////////////////////////////////
//
// Hydrocarbones, metane and others
// Metane, STP
density = 0.7174*mg/cm3 ;
G4Material* metane = new G4Material(name="CH4",density,nel=2) ;
metane->AddElement(elC,1) ;
metane->AddElement(elH,4) ;
// Propane, STP
density = 2.005*mg/cm3 ;
G4Material* propane = new G4Material(name="C3H8",density,nel=2) ;
propane->AddElement(elC,3) ;
propane->AddElement(elH,8) ;
// iso-Butane (methylpropane), STP
density = 2.67*mg/cm3 ;
G4Material* isobutane = new G4Material(name="isoC4H10",density,nel=2) ;
isobutane->AddElement(elC,4) ;
isobutane->AddElement(elH,10) ;
///////////////////////////////////////////////////////////////////////////
//
// Molecular gases
// Carbon dioxide
density = 1.977*mg/cm3;
G4Material* CO2 = new G4Material(name="CO2", density, nel=2,
kStateGas,273.15*kelvin,1.*atmosphere);
CO2->AddElement(elC,1);
CO2->AddElement(elO,2);
// Carbon dioxide, STP
density = 1.977*mg/cm3;
G4Material* CarbonDioxide = new G4Material(name="CO2", density, nel=2);
CarbonDioxide->AddElement(elC,1);
CarbonDioxide->AddElement(elO,2);
// Nitrogen, STP
density = 1.25053*mg/cm3 ; // STP
G4Material* Nitrogen = new G4Material(name="N2" , density, ncomponents=1);
Nitrogen->AddElement(elN, 2);
// Oxygen, STP
density = 1.4289*mg/cm3 ; // STP
G4Material* Oxygen = new G4Material(name="O2" , density, ncomponents=1);
Oxygen->AddElement(elO, 2);
// Dry air (average composition), STP
density = 1.2928*mg/cm3 ; // STP
G4Material* Air = new G4Material(name="Air" , density, ncomponents=3);
Air->AddMaterial( Nitrogen, fractionmass = 0.7557 ) ;
Air->AddMaterial( Oxygen, fractionmass = 0.2315 ) ;
Air->AddMaterial( Argon, fractionmass = 0.0128 ) ;
////////////////////////////////////////////////////////////////////////////
//
// MWPC mixtures
// 93% Ar + 7% CH4, STP
density = 1.709*mg/cm3 ;
G4Material* Ar7CH4 = new G4Material(name="Ar7CH4" , density,
ncomponents=2);
Ar7CH4->AddMaterial( Argon, fractionmass = 0.971 ) ;
Ar7CH4->AddMaterial( metane, fractionmass = 0.029 ) ;
// 93% Kr + 7% CH4, STP
density = 3.491*mg/cm3 ;
G4Material* Kr7CH4 = new G4Material(name="Kr7CH4" , density,
ncomponents=2);
Kr7CH4->AddMaterial( Kr, fractionmass = 0.986 ) ;
Kr7CH4->AddMaterial( metane, fractionmass = 0.014 ) ;
// ATLAS TRT gas mixture
G4double TRT_Xe_density = 5.485*mg/cm3;
G4Material* TRT_Xe = new G4Material(name="TRT_Xe", TRT_Xe_density, nel=1,
kStateGas,293.15*kelvin,1.*atmosphere);
TRT_Xe->AddElement(elXe,1);
G4double TRT_CO2_density = 1.842*mg/cm3;
G4Material* TRT_CO2 = new G4Material(name="TRT_CO2", TRT_CO2_density, nel=2,
kStateGas,293.15*kelvin,1.*atmosphere);
TRT_CO2->AddElement(elC,1);
TRT_CO2->AddElement(elO,2);
G4double TRT_CF4_density = 3.9*mg/cm3;
G4Material* TRT_CF4 = new G4Material(name="TRT_CF4", TRT_CF4_density, nel=2,
kStateGas,293.15*kelvin,1.*atmosphere);
TRT_CF4->AddElement(elC,1);
TRT_CF4->AddElement(elF,4);
// ATLAS TRT straw tube gas mixture (20 C, 1 atm)
G4double XeCO2CF4_density = 4.76*mg/cm3;
G4Material* XeCO2CF4 = new G4Material(name="XeCO2CF4", XeCO2CF4_density,
ncomponents=3,
kStateGas,293.15*kelvin,1.*atmosphere);
XeCO2CF4->AddMaterial(TRT_Xe,0.807);
XeCO2CF4->AddMaterial(TRT_CO2,0.039);
XeCO2CF4->AddMaterial(TRT_CF4,0.154);
// 80% Ar + 20% CO2, STP
density = 1.8223*mg/cm3 ;
G4Material* Ar_80CO2_20 = new G4Material(name="ArCO2" , density,
ncomponents=2);
Ar_80CO2_20->AddMaterial( Argon, fractionmass = 0.783 ) ;
Ar_80CO2_20->AddMaterial( CarbonDioxide, fractionmass = 0.217 ) ;
// 80% Xe + 20% CO2, STP
density = 5.0818*mg/cm3 ;
G4Material* Xe20CO2 = new G4Material(name="Xe20CO2" , density, ncomponents=2);
Xe20CO2->AddMaterial( Xe, fractionmass = 0.922 ) ;
Xe20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.078 ) ;
// 80% Kr + 20% CO2, STP
density = 3.601*mg/cm3 ;
G4Material* Kr20CO2 = new G4Material(name="Kr20CO2", density,
ncomponents=2);
Kr20CO2->AddMaterial( Kr, fractionmass = 0.89 ) ;
Kr20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.11 ) ;
// Xe + 55% He + 15% CH4 ; NIM A294 (1990) 465-472; STP
density = 1.963*mg/cm3;
G4Material* Xe55He15CH4 = new G4Material(name="Xe55He15CH4",density,
ncomponents=3);
Xe55He15CH4->AddMaterial(Xe, 0.895);
Xe55He15CH4->AddMaterial(He, 0.050);
Xe55He15CH4->AddMaterial(metane,0.055);
// 90% Xe + 10% CH4, STP ; NIM A248 (1986) 379-388
density = 5.344*mg/cm3 ;
G4Material* Xe10CH4 = new G4Material(name="Xe10CH4" , density,
ncomponents=2);
Xe10CH4->AddMaterial( Xe, fractionmass = 0.987 ) ;
Xe10CH4->AddMaterial( metane, fractionmass = 0.013 ) ;
#endif
//
//
//////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,133 @@
//
// ********************************************************************
// * 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: Em10PhysicsList.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef Em10PhysicsList_h
#define Em10PhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
class G4PhotoElectricEffect;
class G4ComptonScattering;
class G4GammaConversion;
class G4MultipleScattering;
class G4PAIonisation ;
class G4ForwardXrayTR ;
class G4eIonisation;
class G4eBremsstrahlung;
class G4eplusAnnihilation;
class G4MuIonisation;
class G4MuBremsstrahlung;
class G4MuPairProduction;
class G4hIonisation;
class G4hIonisationPlus;
class Em10StepCut;
class Em10DetectorConstruction;
class Em10PhysicsListMessenger;
class Em10PhysicsList: public G4VUserPhysicsList
{
public:
Em10PhysicsList( Em10DetectorConstruction*);
~Em10PhysicsList();
protected:
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
void SetCuts();
protected:
// these methods Construct particles
void ConstructBosons();
void ConstructLeptons();
void ConstructMesons();
void ConstructBarions();
protected:
// these methods Construct physics processes and register them
void AddParameterisation();
void ConstructGeneral();
void ConstructEM();
public:
void SetGammaCut(G4double);
void SetElectronCut(G4double);
void SetProtonCut(G4double);
void SetCutsByEnergy(G4double);
void GetRange(G4double);
void SetMaxStep(G4double);
public:
G4double MaxChargedStep;
private:
G4PhotoElectricEffect* thePhotoElectricEffect;
G4ComptonScattering* theComptonScattering;
G4GammaConversion* theGammaConversion;
G4MultipleScattering* theeminusMultipleScattering;
G4eIonisation* theeminusIonisation;
G4eBremsstrahlung* theeminusBremsstrahlung;
G4PAIonisation* fPAIonisation ;
G4ForwardXrayTR* fForwardXrayTR ;
G4MultipleScattering* theeplusMultipleScattering;
G4eIonisation* theeplusIonisation;
G4eBremsstrahlung* theeplusBremsstrahlung;
G4eplusAnnihilation* theeplusAnnihilation;
Em10StepCut* theeminusStepCut ;
Em10StepCut* theeplusStepCut ;
G4double cutForGamma;
G4double cutForElectron;
G4double cutForProton;
Em10DetectorConstruction* pDet;
Em10PhysicsListMessenger* physicsListMessenger;
};
#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: Em10PhysicsListMessenger.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10PhysicsListMessenger_h
#define Em10PhysicsListMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class Em10PhysicsList;
class G4UIcmdWithoutParameter;
class G4UIcmdWithADouble;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10PhysicsListMessenger: public G4UImessenger
{
public:
Em10PhysicsListMessenger(Em10PhysicsList*);
~Em10PhysicsListMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
Em10PhysicsList* Em10List;
G4UIcmdWithADoubleAndUnit* setMaxStepCmd;
G4UIcmdWithADoubleAndUnit* cutGCmd;
G4UIcmdWithADoubleAndUnit* cutECmd;
G4UIcmdWithADoubleAndUnit* cutPCmd;
G4UIcmdWithADoubleAndUnit* rCmd;
G4UIcmdWithADoubleAndUnit* eCmd;
};
#endif
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * 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: Em10PrimaryGeneratorAction.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10PrimaryGeneratorAction_h
#define Em10PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
class Em10DetectorConstruction;
class Em10PrimaryGeneratorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
Em10PrimaryGeneratorAction(Em10DetectorConstruction*);
~Em10PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event*);
void SetRndmFlag(G4String val) { rndmFlag = val;}
void Setxvertex(G4double x) ;
void Setyvertex(G4double y) ;
void Setzvertex(G4double z) ;
static G4String GetPrimaryName() ;
private:
G4ParticleGun* particleGun; //pointer a to G4 service class
Em10DetectorConstruction* Em10Detector; //pointer to the geometry
Em10PrimaryGeneratorMessenger* gunMessenger; //messenger of this class
G4String rndmFlag; //flag for a random impact point
static G4String thePrimaryParticleName ;
G4double xvertex,yvertex,zvertex;
G4bool vertexdefined ;
};
#endif
@@ -0,0 +1,61 @@
//
// ********************************************************************
// * 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: Em10PrimaryGeneratorMessenger.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10PrimaryGeneratorMessenger_h
#define Em10PrimaryGeneratorMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class Em10PrimaryGeneratorAction;
class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10PrimaryGeneratorMessenger: public G4UImessenger
{
public:
Em10PrimaryGeneratorMessenger(Em10PrimaryGeneratorAction*);
~Em10PrimaryGeneratorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
Em10PrimaryGeneratorAction* Em10Action;
G4UIcmdWithAString* RndmCmd;
G4UIcmdWithADoubleAndUnit* setxvertexCmd;
G4UIcmdWithADoubleAndUnit* setyvertexCmd;
G4UIcmdWithADoubleAndUnit* setzvertexCmd;
};
#endif
@@ -0,0 +1,190 @@
//
// ********************************************************************
// * 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: Em10RunAction.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10RunAction_h
#define Em10RunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
#include "g4std/iostream"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10RunMessenger;
class G4Run;
#ifndef G4NOHIST
class HepTupleManager;
class HepHistogram;
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10RunAction : public G4UserRunAction
{
public:
Em10RunAction();
~Em10RunAction();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
void CountEvent();
void CountParticles(G4double,G4double);
void AddEP(G4double,G4double);
void AddEdeps(G4double Eabs);
void AddTrackLength(G4double tlabs);
void AddnStepsCharged(G4double ns);
void AddnStepsNeutral(G4double ns);
void AddTrRef(G4double tr,G4double ref);
void FillEn(G4double En);
void FillTh(G4double Th);
void FillThBack(G4double Th);
void FillR(G4double R);
void FillTt(G4double Tt);
void FillTb(G4double Tt);
void FillTsec(G4double T);
void FillGammaSpectrum(G4double E);
void FillNbOfSteps(G4double nstep);
void Fillvertexz(G4double z);
void SethistName(G4String name) ;
void SetnbinStep(G4int nbin);
void SetSteplow(G4double Slow);
void SetStephigh(G4double Shigh);
void SetnbinEn(G4int nbin);
void SetEnlow(G4double Elow);
void SetEnhigh(G4double Enhigh);
void SetnbinTt(G4int nbin);
void SetTtlow(G4double Ttlow);
void SetTthigh(G4double Tthigh);
void SetnbinTb(G4int nbin);
void SetTblow(G4double Tblow);
void SetTbhigh(G4double Tbhigh);
void SetnbinTsec(G4int nbin);
void SetTseclow(G4double Tlow);
void SetTsechigh(G4double Thigh);
void SetnbinTh(G4int nbin);
void SetThlow(G4double Thlow);
void SetThhigh(G4double Thhigh);
void SetnbinThBack(G4int nbin);
void SetThlowBack(G4double Thlow);
void SetThhighBack(G4double Thhigh);
void SetnbinR(G4int nbin);
void SetRlow(G4double Rlow);
void SetRhigh(G4double Rhigh);
void SetnbinGamma(G4int nbin);
void SetElowGamma(G4double Elow);
void SetEhighGamma(G4double Ehigh);
void Setnbinzvertex(G4int nbin);
void Setzlow(G4double z);
void Setzhigh(G4double z);
void SetRndmFreq(G4int val) {saveRndm = val;}
G4int GetRndmFreq() {return saveRndm;}
private:
void bookHisto();
private:
G4String histName ;
#ifndef G4NOHIST
HepTupleManager* hbookManager;
HepHistogram *histo1, *histo2, *histo3, *histo4, *histo5 ;
HepHistogram *histo6, *histo7, *histo8, *histo9, *histo10;
#endif
G4double EnergySumAbs,EnergySquareSumAbs;
G4double tlSumAbs,tlsquareSumAbs;
G4double nStepSumCharged,nStepSum2Charged ;
G4double nStepSumNeutral,nStepSum2Neutral ;
G4double TotNbofEvents;
G4double SumCharged,Sum2Charged,SumNeutral,Sum2Neutral;
G4double Selectron,Spositron;
G4double Transmitted,Reflected ;
G4double entryStep,underStep,overStep,distStep[200];
G4double Steplow,Stephigh,dStep;
G4int nbinStep;
G4double entryEn,underEn,overEn,distEn[200];
G4double Enlow,Enhigh,dEn;
G4int nbinEn;
G4double entryTt,underTt,overTt,distTt[200];
G4double Ttlow,Tthigh,dTt;
G4int nbinTt;
G4double Ttmean,Tt2mean;
G4double entryTb,underTb,overTb,distTb[200];
G4double Tblow,Tbhigh,dTb;
G4int nbinTb;
G4double Tbmean,Tb2mean;
G4double entryTsec,underTsec,overTsec,distTsec[200];
G4double Tseclow,Tsechigh,dTsec;
G4int nbinTsec;
G4double entryTh,underTh,overTh,distTh[200];
G4double Thlow,Thhigh,dTh;
G4int nbinTh;
G4double entryThback,underThback,overThback,distThback[200];
G4double Thlowback,Thhighback,dThback;
G4int nbinThback;
G4double entryR ,underR ,overR ,distR[200];
G4double Rlow,Rhigh,dR;
G4int nbinR;
G4double Rmean,R2mean;
G4double entryGamma,underGamma,overGamma,distGamma[200];
G4double ElowGamma,EhighGamma,dEGamma;
G4int nbinGamma ;
G4double entryvertexz,undervertexz,oververtexz,distvertexz[200];
G4double zlow,zhigh,dz;
G4int nbinvertexz;
Em10RunMessenger* runMessenger;
G4int saveRndm;
};
#endif
@@ -0,0 +1,115 @@
//
// ********************************************************************
// * 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: Em10RunMessenger.hh,v 1.2 2001/07/11 09:57:20 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10RunMessenger_h
#define Em10RunMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10RunAction;
class G4UIdirectory;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithADouble;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10RunMessenger: public G4UImessenger
{
public:
Em10RunMessenger(Em10RunAction* );
~Em10RunMessenger();
void SetNewValue(G4UIcommand* ,G4String );
private:
Em10RunAction* runAction;
G4UIdirectory* plotDir;
G4UIcmdWithAString* sethistNameCmd;
G4UIcmdWithAnInteger* setnbinStepCmd;
G4UIcmdWithADouble* setSteplowCmd;
G4UIcmdWithADouble* setStephighCmd;
G4UIcmdWithAnInteger* setnbinEnCmd;
G4UIcmdWithADoubleAndUnit* setEnlowCmd;
G4UIcmdWithADoubleAndUnit* setEnhighCmd;
G4UIcmdWithAnInteger* setnbinGammaCmd;
G4UIcmdWithADoubleAndUnit* setElowGammaCmd;
G4UIcmdWithADoubleAndUnit* setEhighGammaCmd;
G4UIcmdWithAnInteger* setnbinTtCmd;
G4UIcmdWithADoubleAndUnit* setTtlowCmd;
G4UIcmdWithADoubleAndUnit* setTthighCmd;
G4UIcmdWithAnInteger* setnbinTbCmd;
G4UIcmdWithADoubleAndUnit* setTblowCmd;
G4UIcmdWithADoubleAndUnit* setTbhighCmd;
G4UIcmdWithAnInteger* setnbinTsecCmd;
G4UIcmdWithADoubleAndUnit* setTseclowCmd;
G4UIcmdWithADoubleAndUnit* setTsechighCmd;
G4UIcmdWithAnInteger* setnbinRCmd;
G4UIcmdWithADoubleAndUnit* setRlowCmd;
G4UIcmdWithADoubleAndUnit* setRhighCmd;
G4UIcmdWithAnInteger* setnbinThCmd;
G4UIcmdWithADoubleAndUnit* setThlowCmd;
G4UIcmdWithADoubleAndUnit* setThhighCmd;
G4UIcmdWithAnInteger* setnbinThbackCmd;
G4UIcmdWithADoubleAndUnit* setThlowbackCmd;
G4UIcmdWithADoubleAndUnit* setThhighbackCmd;
G4UIcmdWithAnInteger* setnbinzvertexCmd;
G4UIcmdWithADoubleAndUnit* setzlowCmd;
G4UIcmdWithADoubleAndUnit* setzhighCmd;
G4UIdirectory* RndmDir;
G4UIcmdWithAnInteger* RndmSaveCmd;
G4UIcmdWithAString* RndmReadCmd;
};
#endif
@@ -0,0 +1,125 @@
//
// ********************************************************************
// * 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: Em10StepCut.hh,v 1.2 2001/07/11 09:57:21 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
#ifndef Em10StepCut_h
#define Em10StepCut_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "G4VDiscreteProcess.hh"
#include "G4Step.hh"
class Em10StepCut : public G4VDiscreteProcess
{
public:
Em10StepCut(const G4String& processName ="UserStepCut" );
Em10StepCut(Em10StepCut &);
~Em10StepCut();
G4double PostStepGetPhysicalInteractionLength(
const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition
);
G4VParticleChange* PostStepDoIt(
const G4Track& ,
const G4Step&
);
void SetMaxStep(G4double);
protected:
// it is not needed here !
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition
);
private:
// hide assignment operator as private
Em10StepCut & operator=(const Em10StepCut &right);
private:
G4double MaxChargedStep ;
};
// inlined function members implementation
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4UserLimits.hh"
#include "G4VParticleChange.hh"
#include "G4EnergyLossTables.hh"
inline G4double Em10StepCut::PostStepGetPhysicalInteractionLength(
const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition
)
{
// condition is set to "Not Forced"
*condition = NotForced;
G4double ProposedStep = DBL_MAX;
if((MaxChargedStep > 0.) &&
(aTrack.GetVolume() != NULL) &&
(aTrack.GetVolume()->GetName() == "Absorber") &&
(aTrack.GetDynamicParticle()->GetDefinition()->GetPDGCharge() != 0.))
ProposedStep = MaxChargedStep ;
return ProposedStep;
}
inline G4VParticleChange* Em10StepCut::PostStepDoIt(
const G4Track& aTrack,
const G4Step&
)
{
// do nothing
aParticleChange.Initialize(aTrack);
return &aParticleChange;
}
inline G4double Em10StepCut::GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition
)
{
return 0.;
}
#endif
@@ -0,0 +1,68 @@
//
// ********************************************************************
// * 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: Em10SteppingAction.hh,v 1.2 2001/07/11 09:57:21 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10SteppingAction_h
#define Em10SteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4ios.hh"
#include "globals.hh"
class Em10DetectorConstruction;
class Em10RunAction;
class Em10EventAction;
class Em10SteppingMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10SteppingAction : public G4UserSteppingAction
{
public:
Em10SteppingAction(Em10DetectorConstruction*, Em10EventAction*,
Em10RunAction* );
~Em10SteppingAction();
void UserSteppingAction(const G4Step*);
private:
Em10DetectorConstruction* detector;
Em10EventAction* eventaction;
Em10RunAction* runaction;
Em10SteppingMessenger* steppingMessenger;
G4int IDnow,IDold;
G4int evnoold ;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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: Em10SteppingMessenger.hh,v 1.2 2001/07/11 09:57:21 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef Em10SteppingMessenger_h
#define Em10SteppingMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10SteppingAction;
class G4UIdirectory;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class Em10SteppingMessenger: public G4UImessenger
{
public:
Em10SteppingMessenger(Em10SteppingAction* );
~Em10SteppingMessenger();
void SetNewValue(G4UIcommand* ,G4String );
private:
Em10SteppingAction* steppingAction;
G4UIdirectory* steppingDir;
};
#endif

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