Import Geant4 0.0.0 source tree
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# $Id: GNUmakefile,v 2.1 1998/07/02 15:26:45 gunter Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := exampleN01
|
||||
G4TARGET := $(name)
|
||||
G4EXLIB := true
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../..
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: lib bin
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
@@ -0,0 +1,37 @@
|
||||
# $Id: GNUmakefile.light,v 2.1 1998/07/23 07:15:18 gcosmo Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := exampleN01
|
||||
G4TARGET := $(name)
|
||||
G4EXLIB := true
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../..
|
||||
endif
|
||||
|
||||
LDLIBS := \
|
||||
-l$(G4TARGET) \
|
||||
-lG4run \
|
||||
-lG4event \
|
||||
-lG4tracking \
|
||||
-lG4bosons \
|
||||
-lG4partman \
|
||||
-lG4transportation \
|
||||
-lG4procman \
|
||||
-lG4track \
|
||||
-lG4materials \
|
||||
-lG4digits+hits \
|
||||
-lG4csg \
|
||||
-lG4geometrymng \
|
||||
-lG4volumes \
|
||||
-lG4magneticfield \
|
||||
-lG4graphics_reps \
|
||||
-lG4intercoms \
|
||||
-lG4global
|
||||
|
||||
.PHONY: all
|
||||
all: lib bin
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
@@ -0,0 +1,23 @@
|
||||
$Id: History,v 2.0 1998/07/02 14:05:34 gunter Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Example N01 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 *
|
||||
----------------------------------------------------------
|
||||
|
||||
May 07, 98 M.Asai
|
||||
- First commitment of all classes.
|
||||
|
||||
April 09, 98 G. Cosmo
|
||||
|
||||
- Created.
|
||||
@@ -0,0 +1,57 @@
|
||||
$Id: README,v 2.1 1998/09/27 07:19:57 asaim Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
ExampleN01
|
||||
----------
|
||||
|
||||
ExampleN01 is the simplest example in this novice level examples. It has
|
||||
a tracker tube and a sandwitch calorimeter made of boxes. It shoots a
|
||||
geantino (pseudo-particle which has no "real" physics interaction) per
|
||||
one event. This example demonstrates how the basic GEANT4 framework works.
|
||||
|
||||
1. Detector descreption
|
||||
|
||||
The detector is defined in ExN01DetectorConstruction.cc. Argon gas,
|
||||
alminum and lead are defined first, where all of them are single element
|
||||
material. Though materials are assigned for each volume, they will not
|
||||
affect to the trajectory of a geantino.
|
||||
|
||||
The experimental hall, which is the world volume, is made of alminum
|
||||
and it is a box. The tracker tube made of argon gas is placed at
|
||||
(-1m,0m,0m) respect to the origin of the world volume. The calorimeter
|
||||
block made of lead and it has 19 layers of alminum plates inside.
|
||||
|
||||
2. Physics processes
|
||||
|
||||
ExN01PhysicsList.cc defines only a geantino and a transprotation
|
||||
process. Though cutoff will not be applied onto geantino, a dummy
|
||||
valume must be set.
|
||||
|
||||
3. Event generation
|
||||
|
||||
G4ParticleGun is instanciated in the constructor of
|
||||
ExN01PrimaryGeneratorAction class. At the every event, the public
|
||||
method GeneratePrimaries(G4Event*) is invoked. In this method,
|
||||
G4ParticleGun is accessed to generate a primary particle (geantino).
|
||||
Please note that the direction of the primary particle is set
|
||||
just before shooting, i.e. GeneratePrimaryVertex() method invokation.
|
||||
G4ParticleGun class itself does not have any capability of randomizing
|
||||
the energy nor momentum of the primary particle. Thus the user should
|
||||
implement randomizing code in GeneratePrimaries() method.
|
||||
|
||||
4. main()
|
||||
|
||||
exampleN01.cc has the main() method. In this main() method, three
|
||||
mandatory user classes described above are constructed and set to
|
||||
the G4RunManager object. Then, "Initialize()" method of G4RunManager
|
||||
is invoked.
|
||||
Some UI commands for setting verbosity are applied via hardly coded
|
||||
"ApplyCommand()" method of G4UImanager class.
|
||||
"BeamOn()" method triggers the event loop. The argument of this
|
||||
method is the number of event in this run.
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: exampleN01.cc,v 2.3 1998/12/08 16:37:27 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - exampleN01
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, IT Division, ASD Group
|
||||
// --------------------------------------------------------------
|
||||
// Comments
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
#include "ExN01DetectorConstruction.hh"
|
||||
#include "ExN01PhysicsList.hh"
|
||||
#include "ExN01PrimaryGeneratorAction.hh"
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
// Construct the default run manager
|
||||
G4RunManager* runManager = new G4RunManager;
|
||||
|
||||
// set mandatory initialization classes
|
||||
runManager->SetUserInitialization(new ExN01DetectorConstruction);
|
||||
runManager->SetUserInitialization(new ExN01PhysicsList);
|
||||
|
||||
// set mandatory user action class
|
||||
runManager->SetUserAction(new ExN01PrimaryGeneratorAction);
|
||||
|
||||
// Initialize G4 kernel
|
||||
runManager->Initialize();
|
||||
|
||||
// get the pointer to the UI manager and set verbosities
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
UI->ApplyCommand("/run/verbose 1");
|
||||
UI->ApplyCommand("/event/verbose 1");
|
||||
UI->ApplyCommand("/tracking/verbose 1");
|
||||
|
||||
// start a run
|
||||
int numberOfEvent = 3;
|
||||
runManager->BeamOn(numberOfEvent);
|
||||
|
||||
// job termination
|
||||
delete runManager;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
Start Run processing.
|
||||
=====================================
|
||||
G4EventManager::ProcessOneEvent()
|
||||
=====================================
|
||||
1 primaries are passed from G4EventTransformer.
|
||||
!!!!!!! Now start processing an event !!!!!!!
|
||||
### pop requested out of 1 stacked tracks.
|
||||
|
||||
*********************************************************************************************************
|
||||
* G4Track Information: Particle = geantino, Track ID = 1, Parent ID = 0
|
||||
*********************************************************************************************************
|
||||
|
||||
Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
|
||||
0 -2e+03 0 0 1e+03 0 0 0 expHall initStep
|
||||
1 -1.6e+03 0 0 1e+03 0 400 400 tracker Transportation
|
||||
2 -400 0 0 1e+03 0 1.2e+03 1.6e+03 expHall Transportation
|
||||
3 0 0 0 1e+03 0 400 2e+03 caloBlock Transportation
|
||||
4 90 0 0 1e+03 0 90 2.09e+03 caloLayer Transportation
|
||||
5 110 0 0 1e+03 0 20 2.11e+03 caloBlock Transportation
|
||||
6 190 0 0 1e+03 0 80 2.19e+03 caloLayer Transportation
|
||||
7 210 0 0 1e+03 0 20 2.21e+03 caloBlock Transportation
|
||||
8 290 0 0 1e+03 0 80 2.29e+03 caloLayer Transportation
|
||||
9 310 0 0 1e+03 0 20 2.31e+03 caloBlock Transportation
|
||||
10 390 0 0 1e+03 0 80 2.39e+03 caloLayer Transportation
|
||||
11 410 0 0 1e+03 0 20 2.41e+03 caloBlock Transportation
|
||||
12 490 0 0 1e+03 0 80 2.49e+03 caloLayer Transportation
|
||||
13 510 0 0 1e+03 0 20 2.51e+03 caloBlock Transportation
|
||||
14 590 0 0 1e+03 0 80 2.59e+03 caloLayer Transportation
|
||||
15 610 0 0 1e+03 0 20 2.61e+03 caloBlock Transportation
|
||||
16 690 0 0 1e+03 0 80 2.69e+03 caloLayer Transportation
|
||||
17 710 0 0 1e+03 0 20 2.71e+03 caloBlock Transportation
|
||||
18 790 0 0 1e+03 0 80 2.79e+03 caloLayer Transportation
|
||||
19 810 0 0 1e+03 0 20 2.81e+03 caloBlock Transportation
|
||||
20 890 0 0 1e+03 0 80 2.89e+03 caloLayer Transportation
|
||||
21 910 0 0 1e+03 0 20 2.91e+03 caloBlock Transportation
|
||||
22 990 0 0 1e+03 0 80 2.99e+03 caloLayer Transportation
|
||||
23 1.01e+03 0 0 1e+03 0 20 3.01e+03 caloBlock Transportation
|
||||
24 1.09e+03 0 0 1e+03 0 80 3.09e+03 caloLayer Transportation
|
||||
25 1.11e+03 0 0 1e+03 0 20 3.11e+03 caloBlock Transportation
|
||||
26 1.19e+03 0 0 1e+03 0 80 3.19e+03 caloLayer Transportation
|
||||
27 1.21e+03 0 0 1e+03 0 20 3.21e+03 caloBlock Transportation
|
||||
28 1.29e+03 0 0 1e+03 0 80 3.29e+03 caloLayer Transportation
|
||||
29 1.31e+03 0 0 1e+03 0 20 3.31e+03 caloBlock Transportation
|
||||
30 1.39e+03 0 0 1e+03 0 80 3.39e+03 caloLayer Transportation
|
||||
31 1.41e+03 0 0 1e+03 0 20 3.41e+03 caloBlock Transportation
|
||||
32 1.49e+03 0 0 1e+03 0 80 3.49e+03 caloLayer Transportation
|
||||
33 1.51e+03 0 0 1e+03 0 20 3.51e+03 caloBlock Transportation
|
||||
34 1.59e+03 0 0 1e+03 0 80 3.59e+03 caloLayer Transportation
|
||||
35 1.61e+03 0 0 1e+03 0 20 3.61e+03 caloBlock Transportation
|
||||
36 1.69e+03 0 0 1e+03 0 80 3.69e+03 caloLayer Transportation
|
||||
37 1.71e+03 0 0 1e+03 0 20 3.71e+03 caloBlock Transportation
|
||||
38 1.79e+03 0 0 1e+03 0 80 3.79e+03 caloLayer Transportation
|
||||
39 1.81e+03 0 0 1e+03 0 20 3.81e+03 caloBlock Transportation
|
||||
40 1.89e+03 0 0 1e+03 0 80 3.89e+03 caloLayer Transportation
|
||||
41 1.91e+03 0 0 1e+03 0 20 3.91e+03 caloBlock Transportation
|
||||
42 2e+03 0 0 1e+03 0 90 4e+03 expHall Transportation
|
||||
43 3e+03 0 0 1e+03 0 1e+03 5e+03 OutOfWorld Transportation
|
||||
Track (trackID 1, parentID 0) is processed with stopping code 2
|
||||
### pop requested out of 0 stacked tracks.
|
||||
### 0 waiting tracks are re-classified to
|
||||
0 urgent tracks and 0 waiting tracks.
|
||||
NULL returned from G4StackManager.
|
||||
Terminate current event processing.
|
||||
=====================================
|
||||
G4EventManager::ProcessOneEvent()
|
||||
=====================================
|
||||
1 primaries are passed from G4EventTransformer.
|
||||
!!!!!!! Now start processing an event !!!!!!!
|
||||
### pop requested out of 1 stacked tracks.
|
||||
|
||||
*********************************************************************************************************
|
||||
* G4Track Information: Particle = geantino, Track ID = 1, Parent ID = 0
|
||||
*********************************************************************************************************
|
||||
|
||||
Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
|
||||
0 -2e+03 0 0 1e+03 0 0 0 expHall initStep
|
||||
1 -1.6e+03 40.1 0 1e+03 0 403 403 tracker Transportation
|
||||
2 -421 158 0 1e+03 0 1.18e+03 1.59e+03 expHall Transportation
|
||||
3 0 200 0 1e+03 0 423 2.01e+03 caloBlock Transportation
|
||||
4 90 209 0 1e+03 0 90.4 2.1e+03 caloLayer Transportation
|
||||
5 110 211 0 1e+03 0 20.1 2.12e+03 caloBlock Transportation
|
||||
6 190 219 0 1e+03 0 80.4 2.2e+03 caloLayer Transportation
|
||||
7 210 221 0 1e+03 0 20.1 2.22e+03 caloBlock Transportation
|
||||
8 290 229 0 1e+03 0 80.4 2.3e+03 caloLayer Transportation
|
||||
9 310 231 0 1e+03 0 20.1 2.32e+03 caloBlock Transportation
|
||||
10 390 239 0 1e+03 0 80.4 2.4e+03 caloLayer Transportation
|
||||
11 410 241 0 1e+03 0 20.1 2.42e+03 caloBlock Transportation
|
||||
12 490 249 0 1e+03 0 80.4 2.5e+03 caloLayer Transportation
|
||||
13 510 251 0 1e+03 0 20.1 2.52e+03 caloBlock Transportation
|
||||
14 590 259 0 1e+03 0 80.4 2.6e+03 caloLayer Transportation
|
||||
15 610 261 0 1e+03 0 20.1 2.62e+03 caloBlock Transportation
|
||||
16 690 269 0 1e+03 0 80.4 2.7e+03 caloLayer Transportation
|
||||
17 710 271 0 1e+03 0 20.1 2.72e+03 caloBlock Transportation
|
||||
18 790 279 0 1e+03 0 80.4 2.8e+03 caloLayer Transportation
|
||||
19 810 281 0 1e+03 0 20.1 2.82e+03 caloBlock Transportation
|
||||
20 890 289 0 1e+03 0 80.4 2.9e+03 caloLayer Transportation
|
||||
21 910 291 0 1e+03 0 20.1 2.92e+03 caloBlock Transportation
|
||||
22 990 299 0 1e+03 0 80.4 3e+03 caloLayer Transportation
|
||||
23 1.01e+03 301 0 1e+03 0 20.1 3.03e+03 caloBlock Transportation
|
||||
24 1.09e+03 309 0 1e+03 0 80.4 3.11e+03 caloLayer Transportation
|
||||
25 1.11e+03 311 0 1e+03 0 20.1 3.13e+03 caloBlock Transportation
|
||||
26 1.19e+03 319 0 1e+03 0 80.4 3.21e+03 caloLayer Transportation
|
||||
27 1.21e+03 321 0 1e+03 0 20.1 3.23e+03 caloBlock Transportation
|
||||
28 1.29e+03 329 0 1e+03 0 80.4 3.31e+03 caloLayer Transportation
|
||||
29 1.31e+03 331 0 1e+03 0 20.1 3.33e+03 caloBlock Transportation
|
||||
30 1.39e+03 339 0 1e+03 0 80.4 3.41e+03 caloLayer Transportation
|
||||
31 1.41e+03 341 0 1e+03 0 20.1 3.43e+03 caloBlock Transportation
|
||||
32 1.49e+03 349 0 1e+03 0 80.4 3.51e+03 caloLayer Transportation
|
||||
33 1.51e+03 351 0 1e+03 0 20.1 3.53e+03 caloBlock Transportation
|
||||
34 1.59e+03 359 0 1e+03 0 80.4 3.61e+03 caloLayer Transportation
|
||||
35 1.61e+03 361 0 1e+03 0 20.1 3.63e+03 caloBlock Transportation
|
||||
36 1.69e+03 369 0 1e+03 0 80.4 3.71e+03 caloLayer Transportation
|
||||
37 1.71e+03 371 0 1e+03 0 20.1 3.73e+03 caloBlock Transportation
|
||||
38 1.79e+03 379 0 1e+03 0 80.4 3.81e+03 caloLayer Transportation
|
||||
39 1.81e+03 381 0 1e+03 0 20.1 3.83e+03 caloBlock Transportation
|
||||
40 1.89e+03 389 0 1e+03 0 80.4 3.91e+03 caloLayer Transportation
|
||||
41 1.91e+03 391 0 1e+03 0 20.1 3.93e+03 caloBlock Transportation
|
||||
42 2e+03 400 0 1e+03 0 90.4 4.02e+03 expHall Transportation
|
||||
43 3e+03 500 0 1e+03 0 1e+03 5.02e+03 OutOfWorld Transportation
|
||||
Track (trackID 1, parentID 0) is processed with stopping code 2
|
||||
### pop requested out of 0 stacked tracks.
|
||||
### 0 waiting tracks are re-classified to
|
||||
0 urgent tracks and 0 waiting tracks.
|
||||
NULL returned from G4StackManager.
|
||||
Terminate current event processing.
|
||||
=====================================
|
||||
G4EventManager::ProcessOneEvent()
|
||||
=====================================
|
||||
1 primaries are passed from G4EventTransformer.
|
||||
!!!!!!! Now start processing an event !!!!!!!
|
||||
### pop requested out of 1 stacked tracks.
|
||||
|
||||
*********************************************************************************************************
|
||||
* G4Track Information: Particle = geantino, Track ID = 1, Parent ID = 0
|
||||
*********************************************************************************************************
|
||||
|
||||
Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
|
||||
0 -2e+03 0 0 1e+03 0 0 0 expHall initStep
|
||||
1 -1.6e+03 0 40 1e+03 0 402 402 tracker Transportation
|
||||
2 -400 0 160 1e+03 0 1.21e+03 1.61e+03 expHall Transportation
|
||||
3 0 0 200 1e+03 0 402 2.01e+03 caloBlock Transportation
|
||||
4 90 0 209 1e+03 0 90.4 2.1e+03 caloLayer Transportation
|
||||
5 110 0 211 1e+03 0 20.1 2.12e+03 caloBlock Transportation
|
||||
6 190 0 219 1e+03 0 80.4 2.2e+03 caloLayer Transportation
|
||||
7 210 0 221 1e+03 0 20.1 2.22e+03 caloBlock Transportation
|
||||
8 290 0 229 1e+03 0 80.4 2.3e+03 caloLayer Transportation
|
||||
9 310 0 231 1e+03 0 20.1 2.32e+03 caloBlock Transportation
|
||||
10 390 0 239 1e+03 0 80.4 2.4e+03 caloLayer Transportation
|
||||
11 410 0 241 1e+03 0 20.1 2.42e+03 caloBlock Transportation
|
||||
12 490 0 249 1e+03 0 80.4 2.5e+03 caloLayer Transportation
|
||||
13 510 0 251 1e+03 0 20.1 2.52e+03 caloBlock Transportation
|
||||
14 590 0 259 1e+03 0 80.4 2.6e+03 caloLayer Transportation
|
||||
15 610 0 261 1e+03 0 20.1 2.62e+03 caloBlock Transportation
|
||||
16 690 0 269 1e+03 0 80.4 2.7e+03 caloLayer Transportation
|
||||
17 710 0 271 1e+03 0 20.1 2.72e+03 caloBlock Transportation
|
||||
18 790 0 279 1e+03 0 80.4 2.8e+03 caloLayer Transportation
|
||||
19 810 0 281 1e+03 0 20.1 2.82e+03 caloBlock Transportation
|
||||
20 890 0 289 1e+03 0 80.4 2.9e+03 caloLayer Transportation
|
||||
21 910 0 291 1e+03 0 20.1 2.92e+03 caloBlock Transportation
|
||||
22 990 0 299 1e+03 0 80.4 3e+03 caloLayer Transportation
|
||||
23 1.01e+03 0 301 1e+03 0 20.1 3.03e+03 caloBlock Transportation
|
||||
24 1.09e+03 0 309 1e+03 0 80.4 3.11e+03 caloLayer Transportation
|
||||
25 1.11e+03 0 311 1e+03 0 20.1 3.13e+03 caloBlock Transportation
|
||||
26 1.19e+03 0 319 1e+03 0 80.4 3.21e+03 caloLayer Transportation
|
||||
27 1.21e+03 0 321 1e+03 0 20.1 3.23e+03 caloBlock Transportation
|
||||
28 1.29e+03 0 329 1e+03 0 80.4 3.31e+03 caloLayer Transportation
|
||||
29 1.31e+03 0 331 1e+03 0 20.1 3.33e+03 caloBlock Transportation
|
||||
30 1.39e+03 0 339 1e+03 0 80.4 3.41e+03 caloLayer Transportation
|
||||
31 1.41e+03 0 341 1e+03 0 20.1 3.43e+03 caloBlock Transportation
|
||||
32 1.49e+03 0 349 1e+03 0 80.4 3.51e+03 caloLayer Transportation
|
||||
33 1.51e+03 0 351 1e+03 0 20.1 3.53e+03 caloBlock Transportation
|
||||
34 1.59e+03 0 359 1e+03 0 80.4 3.61e+03 caloLayer Transportation
|
||||
35 1.61e+03 0 361 1e+03 0 20.1 3.63e+03 caloBlock Transportation
|
||||
36 1.69e+03 0 369 1e+03 0 80.4 3.71e+03 caloLayer Transportation
|
||||
37 1.71e+03 0 371 1e+03 0 20.1 3.73e+03 caloBlock Transportation
|
||||
38 1.79e+03 0 379 1e+03 0 80.4 3.81e+03 caloLayer Transportation
|
||||
39 1.81e+03 0 381 1e+03 0 20.1 3.83e+03 caloBlock Transportation
|
||||
40 1.89e+03 0 389 1e+03 0 80.4 3.91e+03 caloLayer Transportation
|
||||
41 1.91e+03 0 391 1e+03 0 20.1 3.93e+03 caloBlock Transportation
|
||||
42 2e+03 0 400 1e+03 0 90.4 4.02e+03 expHall Transportation
|
||||
43 3e+03 0 500 1e+03 0 1e+03 5.02e+03 OutOfWorld Transportation
|
||||
Track (trackID 1, parentID 0) is processed with stopping code 2
|
||||
### pop requested out of 0 stacked tracks.
|
||||
### 0 waiting tracks are re-classified to
|
||||
0 urgent tracks and 0 waiting tracks.
|
||||
NULL returned from G4StackManager.
|
||||
Terminate current event processing.
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 3
|
||||
User=0.05s Real=0.0666667s Sys=0.0166667s
|
||||
G4 kernel has come to Quit state.
|
||||
@@ -0,0 +1,31 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: ExN01DetectorConstruction.hh,v 2.1 1998/07/12 02:40:52 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef ExN01DetectorConstruction_H
|
||||
#define ExN01DetectorConstruction_H 1
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
class ExN01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
ExN01DetectorConstruction();
|
||||
~ExN01DetectorConstruction();
|
||||
|
||||
public:
|
||||
G4VPhysicalVolume* Construct();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: ExN01PhysicsList.hh,v 2.1 1998/07/12 02:40:52 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
// ExN01PhysicsList
|
||||
// Construct/define particles and physics processes
|
||||
//
|
||||
// Particle defined in ExampleN01
|
||||
// geantino
|
||||
//
|
||||
// Process defined in ExampleN01
|
||||
// transportation
|
||||
//
|
||||
|
||||
#ifndef ExN01PhysicsList_h
|
||||
#define ExN01PhysicsList_h 1
|
||||
|
||||
#include "G4VUserPhysicsList.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class ExN01PhysicsList: public G4VUserPhysicsList
|
||||
{
|
||||
public:
|
||||
ExN01PhysicsList();
|
||||
~ExN01PhysicsList();
|
||||
|
||||
protected:
|
||||
// Construct particle and physics process
|
||||
void ConstructParticle();
|
||||
void ConstructProcess();
|
||||
void SetCuts(G4double cut);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: ExN01PrimaryGeneratorAction.hh,v 2.1 1998/07/12 02:40:53 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef ExN01PrimaryGeneratorAction_h
|
||||
#define ExN01PrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4Event;
|
||||
|
||||
class ExN01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
ExN01PrimaryGeneratorAction();
|
||||
~ExN01PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: ExN01DetectorConstruction.cc,v 1.1 1998/11/14 20:52:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#include "ExN01DetectorConstruction.hh"
|
||||
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
ExN01DetectorConstruction::ExN01DetectorConstruction()
|
||||
{;}
|
||||
|
||||
ExN01DetectorConstruction::~ExN01DetectorConstruction()
|
||||
{;}
|
||||
|
||||
G4VPhysicalVolume* ExN01DetectorConstruction::Construct()
|
||||
{
|
||||
|
||||
//------------------------------------------------------ materials
|
||||
|
||||
G4double a; // atomic mass
|
||||
G4double z; // atomic number
|
||||
G4double density;
|
||||
G4String name;
|
||||
|
||||
a = 39.95*g/mole;
|
||||
density = 1.782e-03*g/cm3;
|
||||
G4Material* Ar = new G4Material(name="ArgonGas", z=18., a, density);
|
||||
|
||||
a = 26.98*g/mole;
|
||||
density = 2.7*g/cm3;
|
||||
G4Material* Al = new G4Material(name="Aluminum", z=13., a, density);
|
||||
|
||||
a = 207.19*g/mole;
|
||||
density = 11.35*g/cm3;
|
||||
G4Material* Pb = new G4Material(name="Lead", z=82., a, density);
|
||||
|
||||
//------------------------------------------------------ volumes
|
||||
|
||||
//------------------------------ experimental hall (world volume)
|
||||
//------------------------------ beam line along x axis
|
||||
|
||||
G4double expHall_x = 3.0*m;
|
||||
G4double expHall_y = 1.0*m;
|
||||
G4double expHall_z = 1.0*m;
|
||||
G4Box* experimentalHall_box
|
||||
= new G4Box("expHall_box",expHall_x,expHall_y,expHall_z);
|
||||
G4LogicalVolume* experimentalHall_log
|
||||
= new G4LogicalVolume(experimentalHall_box,Ar,"expHall_log",0,0,0);
|
||||
G4VPhysicalVolume* experimentalHall_phys
|
||||
= new G4PVPlacement(0,G4ThreeVector(),"expHall",
|
||||
experimentalHall_log,0,false,0);
|
||||
|
||||
//------------------------------ a tracker tube
|
||||
|
||||
G4double innerRadiusOfTheTube = 0.*cm;
|
||||
G4double outerRadiusOfTheTube = 60.*cm;
|
||||
G4double hightOfTheTube = 50.*cm;
|
||||
G4double startAngleOfTheTube = 0.*deg;
|
||||
G4double spanningAngleOfTheTube = 360.*deg;
|
||||
G4Tubs* tracker_tube
|
||||
= new G4Tubs("tracker_tube",innerRadiusOfTheTube,
|
||||
outerRadiusOfTheTube,hightOfTheTube,
|
||||
startAngleOfTheTube,spanningAngleOfTheTube);
|
||||
G4LogicalVolume* tracker_log
|
||||
= new G4LogicalVolume(tracker_tube,Al,"tracker_log",0,0,0);
|
||||
G4double trackerPos_x = -1.0*m;
|
||||
G4double trackerPos_y = 0.*m;
|
||||
G4double trackerPos_z = 0.*m;
|
||||
G4VPhysicalVolume* tracker_phys
|
||||
= new G4PVPlacement(0,
|
||||
G4ThreeVector(trackerPos_x,trackerPos_y,trackerPos_z),
|
||||
tracker_log,"tracker",experimentalHall_log,false,0);
|
||||
|
||||
//------------------------------ a calorimeter block
|
||||
|
||||
G4double block_x = 1.0*m;
|
||||
G4double block_y = 50.0*cm;
|
||||
G4double block_z = 50.0*cm;
|
||||
G4Box* calorimeterBlock_box
|
||||
= new G4Box("calBlock_box",block_x,block_y,block_z);
|
||||
G4LogicalVolume* calorimeterBlock_log
|
||||
= new G4LogicalVolume(calorimeterBlock_box,Pb,"caloBlock_log",0,0,0);
|
||||
G4double blockPos_x = 1.0*m;
|
||||
G4double blockPos_y = 0.0*m;
|
||||
G4double blockPos_z = 0.0*m;
|
||||
G4VPhysicalVolume* calorimeterBlock_phys
|
||||
= new G4PVPlacement(0,
|
||||
G4ThreeVector(blockPos_x,blockPos_y,blockPos_z),
|
||||
calorimeterBlock_log,"caloBlock",experimentalHall_log,false,0);
|
||||
|
||||
//------------------------------ calorimeter layers
|
||||
|
||||
G4double calo_x = 1.*cm;
|
||||
G4double calo_y = 40.*cm;
|
||||
G4double calo_z = 40.*cm;
|
||||
G4Box* calorimeterLayer_box
|
||||
= new G4Box("caloLayer_box",calo_x,calo_y,calo_z);
|
||||
G4LogicalVolume* calorimeterLayer_log
|
||||
= new G4LogicalVolume(calorimeterLayer_box,Al,"caloLayer_log",0,0,0);
|
||||
for(G4int i=0;i<19;i++) // loop for 19 layers
|
||||
{
|
||||
G4double caloPos_x = (i-9)*10.*cm;
|
||||
G4double caloPos_y = 0.0*m;
|
||||
G4double caloPos_z = 0.0*m;
|
||||
G4VPhysicalVolume* calorimeterLayer_phys
|
||||
= new G4PVPlacement(0,
|
||||
G4ThreeVector(caloPos_x,caloPos_y,caloPos_z),
|
||||
calorimeterLayer_log,"caloLayer",calorimeterBlock_log,false,i);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
|
||||
return experimentalHall_phys;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: ExN01PhysicsList.cc,v 1.1 1998/11/14 20:52:42 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
|
||||
#include "ExN01PhysicsList.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
|
||||
|
||||
ExN01PhysicsList::ExN01PhysicsList()
|
||||
{;}
|
||||
|
||||
ExN01PhysicsList::~ExN01PhysicsList()
|
||||
{;}
|
||||
|
||||
void ExN01PhysicsList::ConstructParticle()
|
||||
{
|
||||
// In this method, static member functions should be called
|
||||
// for all particles which you want to use.
|
||||
// This ensures that objects of these particle types will be
|
||||
// created in the program.
|
||||
|
||||
G4Geantino::GeantinoDefinition();
|
||||
}
|
||||
|
||||
void ExN01PhysicsList::ConstructProcess()
|
||||
{
|
||||
// Define transportation process
|
||||
|
||||
AddTransportation();
|
||||
}
|
||||
|
||||
void ExN01PhysicsList::SetCuts(G4double cut)
|
||||
{
|
||||
// uppress error messages even in case e/gamma/proton do not exist
|
||||
G4int temp = GetVerboseLevel();
|
||||
SetVerboseLevel(0);
|
||||
|
||||
// set cut values for gamma at first and for e- second and next for e+,
|
||||
// because some processes for e+/e- need cut values for gamma
|
||||
SetCutValue(cut, "gamma");
|
||||
SetCutValue(cut, "e-");
|
||||
SetCutValue(cut, "e+");
|
||||
|
||||
// set cut values for proton and anti_proton before all other hadrons
|
||||
// because some processes for hadrons need cut values for proton/anti_proton
|
||||
SetCutValue(cut, "proton");
|
||||
SetCutValue(cut, "anti_proton");
|
||||
|
||||
// set a cut value to all particles
|
||||
|
||||
SetCutValueForOthers(cut);
|
||||
|
||||
SetVerboseLevel(temp);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: ExN01PrimaryGeneratorAction.cc,v 1.1 1998/11/14 20:52:45 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#include "ExN01PrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
ExN01PrimaryGeneratorAction::ExN01PrimaryGeneratorAction()
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
particleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
UI->ApplyCommand("/gun/particle geantino");
|
||||
UI->ApplyCommand("/gun/energy 1.0 GeV");
|
||||
UI->ApplyCommand("/gun/position -2.0 0.0 0.0 m");
|
||||
}
|
||||
|
||||
ExN01PrimaryGeneratorAction::~ExN01PrimaryGeneratorAction()
|
||||
{
|
||||
delete particleGun;
|
||||
}
|
||||
|
||||
void ExN01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
G4int i = anEvent->GetEventID() % 3;
|
||||
switch(i)
|
||||
{
|
||||
case 0:
|
||||
UI->ApplyCommand("/gun/direction 1.0 0.0 0.0");
|
||||
break;
|
||||
case 1:
|
||||
UI->ApplyCommand("/gun/direction 1.0 0.1 0.0");
|
||||
break;
|
||||
case 2:
|
||||
UI->ApplyCommand("/gun/direction 1.0 0.0 0.1");
|
||||
break;
|
||||
}
|
||||
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user