Import Geant4 0.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-01 15:25:35 +02:00
parent 54d6b71f95
commit b97f8d0df7
3237 changed files with 807095 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
# $Id: GNUmakefile,v 2.2 1998/10/14 15:47:16 allison Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
ifndef G4INSTALL
G4INSTALL = ../..
endif
include $(G4INSTALL)/config/architecture.gmk
SUBDIRS = N01 N02 N03 N04 N05 N06
.PHONY : all clean clean_libs
all:
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE)); done
clean:
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) clean); done
clean_libs:
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) clean_libs); done
+17
View File
@@ -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
+37
View File
@@ -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
+23
View File
@@ -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.
+57
View File
@@ -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.
+61
View File
@@ -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;
}
View File
View File
+192
View File
@@ -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);
}
+17
View File
@@ -0,0 +1,17 @@
# $Id: GNUmakefile,v 2.1 1998/07/02 15:26:52 gunter Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleN02
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
+77
View File
@@ -0,0 +1,77 @@
$Id: History,v 2.13 1998/12/08 16:37:28 allison Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example N02 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 *
----------------------------------------------------------
4th December 1998 John Apostolakis
- corrected the Magnetic Field SetField methods
- cosmetic change to the name of a volume (chamber), as it was too long.
12th Sptember 1998 Michel Maire
- removed the function SetEmProcess() ( contained cin)
and the class ExN02PhysicsListMessenger
Interchanged N02 and N03.
9th August 1998 John Allison
- Removed trackerChamber_logVisAtt->SetForceWireframe(true);
- Removed G4_SOLVE_TEMPLATES macros (now done in architecture.gmk).
- Change G4UIterminal to G4UIGAG.
16th July 1998 John Allison
- Changed /vis~/Draw... to /vis~/draw.
9th July 1998 John Allison
- Added G4VIS_USE_DAWNFILE and G4VIS_USE_OPENGLWIN32 to ExN03VisManager.cc.
8th July 1998 G.Cosmo
- Protected visualization code with G4VIS_USE.
6th July 1998 John Allison
- Simplified ExN03VisManager.
June 29 , 98 H.Kurashige
- Modified ExN03PhysicsList.
May 15, 98 G. Cosmo
- Added #ifdef protection to ExN03MagneticField.hh. Header now
included explicitly in ExN03DetectorConstruction.hh. Example now
links.
May 07, 98 J. Apostolakis
- Created Physical Volume Parameterisation for Tracker Chambers.
- Copied from example6:
MyTrackerHit into ExN03TrackerHit
May 05, 98 J. Apostolakis
- Changed the geometry in DetectorConstruction.
- Created the Magnetic Field
May 01, 98 J. Apostolakis
- Files created by copying from exampleEmPhys2, renaming the files
and the classes within them, changing the string "My" into
- Major changes made:
* Event action: deleted energy counting.
April 09, 98 G. Cosmo
- Created.
+12
View File
@@ -0,0 +1,12 @@
$Id: README,v 2.4 1998/10/09 14:27:35 japost Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
ExampleN03
----------
May 4, 1998 John Apostolakis.
Started from exampleEmPhys2.
+93
View File
@@ -0,0 +1,93 @@
// 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: exampleN02.cc,v 2.11 1998/12/08 16:37:28 allison Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleN03
//
// For information related to this code contact:
// CERN, IT Division, ASD Group
// --------------------------------------------------------------
// Comments
//
//
#include "ExN02DetectorConstruction.hh"
#include "ExN02PhysicsList.hh"
#include "ExN02RunAction.hh"
#include "ExN02PrimaryGeneratorAction.hh"
#include "ExN02EventAction.hh"
#include "ExN02SteppingAction.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "G4RunManager.hh"
#ifdef G4VIS_USE
#include "ExN02VisManager.hh"
#endif
#include "G4ios.hh"
int
main(int argc,char** argv) {
// Run manager
G4RunManager * runManager = new G4RunManager;
// UserInitialization classes
ExN02DetectorConstruction* ExN02detector = new ExN02DetectorConstruction;
runManager->SetUserInitialization(ExN02detector);
runManager->SetUserInitialization(new ExN02PhysicsList);
#ifdef G4VIS_USE
// Visualization, if you choose to have it!
G4VisManager* visManager = new ExN02VisManager;
visManager->Initialize();
#endif
// UserAction classes
runManager->SetUserAction(new ExN02RunAction);
runManager->SetUserAction(new ExN02PrimaryGeneratorAction(ExN02detector));
ExN02EventAction* eventAction = new ExN02EventAction;
runManager->SetUserAction(eventAction);
runManager->SetUserAction(new ExN02SteppingAction(ExN02detector,eventAction));
// User interactions
G4UImanager * UI = G4UImanager::GetUIpointer();
if(argc==1)
// Define (G)UI terminal for interactive mode
{
// G4UIterminal is a (dumb) terminal.
G4UIsession * session = new G4UIterminal;
UI->ApplyCommand("/control/execute prerun.g4mac");
session->SessionStart();
delete session;
}
else
// Batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
#ifdef G4VIS_USE
delete visManager;
#endif
delete runManager;
return 0;
}
View File
+15
View File
@@ -0,0 +1,15 @@
/run/initialize
/gun/position 0 0 -100
/gun/direction 0 0 1
/gun/energy 200 MeV
/tracking/verbose 1
/gun/particle e+
/run/beamOn 1
/run/beamOn 10
/tracking/verbose 0
/run/beamOn 100
# /run/beamOn 1000
exit
File diff suppressed because it is too large Load Diff
@@ -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: ExN02ChamberParameterisation.hh,v 1.2 1998/11/30 17:18:43 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// A parameterisation that describes a series of boxes along Z
// The boxes have equal width, & their lengths are a linear equation.
// They are spaced an equal distance apart, starting from given location.
//
#ifndef ExN02ChamberParameterisation_H
#define ExN02ChamberParameterisation_H 1
#include "globals.hh"
#include "G4VPVParameterisation.hh"
class G4VPhysicalVolume;
class G4Box;
class ExN02ChamberParameterisation : public G4VPVParameterisation
{
public:
ExN02ChamberParameterisation(G4int NoChambers,
G4double startZ,
G4double spacing,
G4double widthChamber,
G4double lengthInitial,
G4double lengthFinal );
~ExN02ChamberParameterisation();
void ComputeTransformation
(const G4int copyNo,G4VPhysicalVolume *physVol) const;
void ComputeDimensions
(G4Box & trackerLayer, const G4int copyNo,
const G4VPhysicalVolume * physVol) const;
// Functions to get the parameters would be nice.
// eg G4int GetNoChambers();
private:
G4int fNoChambers; //
G4double fStartZ;
G4double fHalfWidth; // The half-width of each tracker chamber
G4double fSpacing; // The distance between the chambers' center
G4double fHalfLengthFirst; // The first half-length
G4double fHalfLengthIncr; // The Increment for the half-length
};
#endif
@@ -0,0 +1,77 @@
// 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: ExN02DetectorConstruction.hh,v 1.3 1998/10/09 14:31:01 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02DetectorConstruction_h
#define ExN02DetectorConstruction_h 1
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
// class G4UniformMagField;
#include "ExN02MagneticField.hh"
class G4Box;
class G4LogicalVolume;
class G4VPhysicalVolume;
class G4Material;
class ExN02DetectorMessenger;
class ExN02DetectorConstruction : public G4VUserDetectorConstruction
{
public:
ExN02DetectorConstruction();
~ExN02DetectorConstruction();
public:
G4VPhysicalVolume* Construct();
const G4VPhysicalVolume* GetTracker() {return physiTracker;};
G4double GetTargetFullLength() {return fTargetLength;};
G4double GetWorldFullLength() {return fWorldLength;};
void SetDetectorLength(G4double length);
// void setMaterial(G4String val);
void SetMagField(G4double val);
private:
G4Box* solidWorld; //pointer to the solid enveloppe
G4LogicalVolume* logicWorld; //pointer to the logical enveloppe
G4VPhysicalVolume* physiWorld; //pointer to the physical enveloppe
G4double fullSizeWorld; //full size of the enveloppe
G4Box* solidTracker; //pointer to the solid Tracker
G4LogicalVolume* logicTracker; //pointer to the logical Tracker
G4VPhysicalVolume* physiTracker; //pointer to the physical Tracker
G4Box* solidTarget; //pointer to the solid Target
G4LogicalVolume* logicTarget; //pointer to the logical Target
G4VPhysicalVolume* physiTarget; //pointer to the physical Target
G4Box* solidChamber; //pointer to the solid Chamber
G4LogicalVolume* logicChamber; //pointer to the logical Chamber
G4VPhysicalVolume* physiChamber; //pointer to the physical Chamber
G4Material* myMaterial; //pointer to the material
ExN02MagneticField* fpMagField; //pointer to the mag field
ExN02DetectorMessenger* detectorMessenger; //pointer to the Messenger object
G4double fWorldLength; // Full length of the world volume
// Sizes of pieces of the detector
G4double fDetectorLength; // Full length of the detector
G4double fTrackerLength; // Full length of Tracker
G4double fTargetLength; // Full length of Target
};
#endif
@@ -0,0 +1,42 @@
// 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: ExN02DetectorMessenger.hh,v 1.3 1998/10/09 14:31:02 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02DetectorMessenger_h
#define ExN02DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class ExN02DetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
class ExN02DetectorMessenger: public G4UImessenger
{
public:
ExN02DetectorMessenger(ExN02DetectorConstruction * myDet);
~ExN02DetectorMessenger();
void SetNewValue(G4UIcommand * command,G4String newValues);
private:
ExN02DetectorConstruction* myDetector;
G4UIdirectory* mydetDir;
G4UIcmdWithAString* MatCmd;
G4UIcmdWithADoubleAndUnit* SizeCmd;
G4UIcmdWithADoubleAndUnit* FieldCmd;
};
#endif
@@ -0,0 +1,36 @@
// 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: ExN02EventAction.hh,v 1.3 1998/10/09 14:31:02 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02EventAction_h
#define ExN02EventAction_h 1
#include "G4UserEventAction.hh"
class G4Event;
class ExN02EventAction : public G4UserEventAction
{
public:
ExN02EventAction();
~ExN02EventAction();
public:
void BeginOfEventAction();
void EndOfEventAction();
private:
};
#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: ExN02MagneticField.hh,v 1.1 1998/10/09 14:31:03 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// A class for control of the Magnetic Field of the detector.
// The field is assumed to be uniform.
//
// $ Id: $
// Should this be a:
// i) messenger
// ii) user class that creates the field ?
// iii) simply a derived class of Uniform field ? <== I have chosen this now.
// iv) a field manager that creates/updates field (Prefered?)
#ifndef ExN02MagneticField_H
#define ExN02MagneticField_H
#include "G4UniformMagField.hh"
class G4FieldManager;
class ExN02MagneticField: public G4UniformMagField
{
public:
ExN02MagneticField(G4ThreeVector); // The value of the field
ExN02MagneticField(); // A zero field
~ExN02MagneticField();
// Set the field to (0, 0, fieldValue)
void SetFieldValue(G4ThreeVector fieldVector);
void SetFieldValue(G4double fieldValue);
G4ThreeVector GetConstantFieldValue();
protected:
// Find the global Field Manager
G4FieldManager* GetGlobalFieldManager(); // static
};
#endif
@@ -0,0 +1,88 @@
// 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: ExN02PhysicsList.hh,v 1.4 1998/10/09 14:31:03 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// This class is a class derived from G4VUserPhysicsList
// for constructing all particles and processes.
//
// History
// first version 10 Jan. 1998 by H.Kurashige
// ------------------------------------------------------------
#ifndef ExN02PhysicsList_h
#define ExN02PhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
class G4PhotoElectricEffect;
class G4ComptonScattering;
class G4GammaConversion;
class G4MultipleScattering;
class G4eIonisation;
class G4eBremsstrahlung;
class G4eplusAnnihilation;
class G4MuIonisation;
class G4MuBremsstrahlung;
class G4MuPairProduction;
class G4hIonisation;
class ExN02PhysicsList: public G4VUserPhysicsList
{
public:
ExN02PhysicsList();
virtual ~ExN02PhysicsList();
protected:
// Construct particle and physics
virtual void ConstructParticle();
virtual void ConstructProcess();
//
virtual void SetCuts(G4double aCut);
protected:
// these methods Construct particles
virtual void ConstructBosons();
virtual void ConstructLeptons();
virtual void ConstructMesons();
virtual void ConstructBarions();
protected:
// these methods Construct physics processes and register them
virtual void ConstructGeneral();
virtual void ConstructEM();
private:
G4PhotoElectricEffect* thePhotoElectricEffect;
G4ComptonScattering* theComptonScattering;
G4GammaConversion* theGammaConversion;
G4MultipleScattering* theeminusMultipleScattering;
G4eIonisation* theeminusIonisation;
G4eBremsstrahlung* theeminusBremsstrahlung;
G4MultipleScattering* theeplusMultipleScattering;
G4eIonisation* theeplusIonisation;
G4eBremsstrahlung* theeplusBremsstrahlung;
G4eplusAnnihilation* theeplusAnnihilation;
};
#endif
@@ -0,0 +1,44 @@
// 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: ExN02PrimaryGeneratorAction.hh,v 1.3 1998/10/09 14:31:04 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02PrimaryGeneratorAction_h
#define ExN02PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class ExN02DetectorConstruction;
class G4ParticleGun;
class G4Event;
class ExN02PrimaryGeneratorMessenger;
class ExN02PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
ExN02PrimaryGeneratorAction(ExN02DetectorConstruction* myDC);
~ExN02PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
void SetRndmFlag(G4String val) { rndmFlag = val;}
private:
G4ParticleGun* particleGun;
ExN02DetectorConstruction* myDetector;
ExN02PrimaryGeneratorMessenger* gunMessenger;
G4String rndmFlag;
};
#endif
@@ -0,0 +1,37 @@
// 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: ExN02PrimaryGeneratorMessenger.hh,v 1.3 1998/10/09 14:31:05 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02PrimaryGeneratorMessenger_h
#define ExN02PrimaryGeneratorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class ExN02PrimaryGeneratorAction;
class G4UIcmdWithAString;
class ExN02PrimaryGeneratorMessenger: public G4UImessenger
{
public:
ExN02PrimaryGeneratorMessenger(ExN02PrimaryGeneratorAction* myGun);
~ExN02PrimaryGeneratorMessenger();
void SetNewValue(G4UIcommand * command,G4String newValues);
private:
ExN02PrimaryGeneratorAction* myAction;
G4UIcmdWithAString* RndmCmd;
};
#endif
@@ -0,0 +1,36 @@
// 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: ExN02RunAction.hh,v 1.3 1998/10/09 14:31:06 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02RunAction_h
#define ExN02RunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
class G4Run;
class ExN02RunAction : public G4UserRunAction
{
public:
ExN02RunAction();
~ExN02RunAction();
public:
void BeginOfRunAction(G4Run* aRun);
void EndOfRunAction(G4Run* aRun);
private:
G4int runIDcounter;
};
#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: ExN02SteppingAction.hh,v 1.3 1998/10/09 14:31:06 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#ifndef ExN02SteppingAction_h
#define ExN02SteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "globals.hh"
class ExN02DetectorConstruction;
class ExN02EventAction;
class ExN02SteppingAction : public G4UserSteppingAction
{
public:
ExN02SteppingAction(ExN02DetectorConstruction* myDC,ExN02EventAction* myEA);
~ExN02SteppingAction(){};
void UserSteppingAction();
private:
ExN02DetectorConstruction* myDetector;
ExN02EventAction* eventAction;
};
#endif
@@ -0,0 +1,71 @@
// 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: ExN02TrackerHit.hh,v 1.1 1998/10/09 14:31:07 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef ExN02TrackerHit_h
#define ExN02TrackerHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
class ExN02TrackerHit : public G4VHit
{
public:
ExN02TrackerHit();
~ExN02TrackerHit();
ExN02TrackerHit(const ExN02TrackerHit &right);
const ExN02TrackerHit& operator=(const ExN02TrackerHit &right);
int operator==(const ExN02TrackerHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
void Draw();
void Print();
private:
G4double edep;
G4ThreeVector pos;
public:
inline void SetEdep(G4double de)
{ edep = de; };
inline G4double GetEdep()
{ return edep; };
inline void SetPos(G4ThreeVector xyz)
{ pos = xyz; };
inline G4ThreeVector GetPos()
{ return pos; };
};
typedef G4THitsCollection<ExN02TrackerHit> ExN02TrackerHitsCollection;
extern G4Allocator<ExN02TrackerHit> ExN02TrackerHitAllocator;
inline void* ExN02TrackerHit::operator new(size_t)
{
void *aHit;
aHit = (void *) ExN02TrackerHitAllocator.MallocSingle();
return aHit;
}
inline void ExN02TrackerHit::operator delete(void *aHit)
{
ExN02TrackerHitAllocator.FreeSingle((ExN02TrackerHit*) aHit);
}
#endif
@@ -0,0 +1,44 @@
// 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: ExN02TrackerSD.hh,v 1.1 1998/10/09 14:31:08 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef ExN02TrackerSD_h
#define ExN02TrackerSD_h 1
#include "G4VSensitiveDetector.hh"
#include "G4ThreeVector.hh"
#include "ExN02TrackerHit.hh"
class G4Step;
class G4HCofThisEvent;
class ExN02TrackerSD : public G4VSensitiveDetector
{
public:
ExN02TrackerSD(G4String name);
~ExN02TrackerSD();
void Initialize(G4HCofThisEvent*HCE);
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
void EndOfEvent(G4HCofThisEvent*HCE);
void clear();
void DrawAll();
void PrintAll();
private:
ExN02TrackerHitsCollection *trackerCollection;
};
#endif
@@ -0,0 +1,50 @@
// 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: ExN02VisManager.hh,v 1.3 1998/10/09 14:31:09 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// Example Visualization Manager implementing virtual function
// RegisterGraphicsSystems. Exploits C-pre-processor variables
// G4VIS_USE_DAWN, 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().
// Alternatively, you can implement an empty function here and just
// register the systems you want in your main(), e.g.:
// G4VisManager* myVisManager = new MyVisManager;
// myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN02VisManager_h
#define ExN02VisManager_h 1
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN02VisManager: public G4VisManager {
public:
ExN02VisManager ();
private:
void RegisterGraphicsSystems ();
};
#endif
+4
View File
@@ -0,0 +1,4 @@
/control/verbose 2
/tracking/verbose 2
/tracking/verbose 1
/run/initialize
@@ -0,0 +1,62 @@
// 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: ExN02ChamberParameterisation.cc,v 1.1 1998/10/09 14:35:30 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
#include "ExN02ChamberParameterisation.hh"
#include "G4VPhysicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4Box.hh"
ExN02ChamberParameterisation::ExN02ChamberParameterisation(
G4int NoChambers,
G4double startZ, // Z of center of first
G4double spacingZ, // Z spacing of centers
G4double widthChamber,
G4double lengthInitial,
G4double lengthFinal )
{
fNoChambers= NoChambers;
fStartZ= startZ;
fHalfWidth= widthChamber*0.5;
fSpacing= spacingZ;
fHalfLengthFirst= 0.5 * lengthInitial;
// fHalfLengthLast= lengthFinal;
if( NoChambers > 1 ){
fHalfLengthIncr= 0.5 * (lengthFinal-lengthInitial)/(NoChambers-1);
if( spacingZ < widthChamber ) {
G4Exception( "ExN02ChamberParameterisation construction: Width > Spacing" );
}
}
}
ExN02ChamberParameterisation::~ExN02ChamberParameterisation()
{}
void ExN02ChamberParameterisation::ComputeTransformation
(const G4int copyNo,G4VPhysicalVolume *physVol) const
{
G4double Zposition= fStartZ + copyNo * fSpacing;
G4ThreeVector origin(0,0,Zposition);
physVol->SetTranslation(origin);
physVol->SetRotation(0);
}
void ExN02ChamberParameterisation::ComputeDimensions
(G4Box & trackerChamber, const G4int copyNo,
const G4VPhysicalVolume * physVol) const
{
G4double halfLength= fHalfLengthFirst + (copyNo-1) * fHalfLengthIncr;
trackerChamber.SetXHalfLength(halfLength);
trackerChamber.SetYHalfLength(halfLength);
trackerChamber.SetZHalfLength(fHalfWidth);
}
@@ -0,0 +1,256 @@
// 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: ExN02DetectorConstruction.cc,v 1.9 1998/12/04 21:26:12 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#include "ExN02DetectorConstruction.hh"
#include "ExN02DetectorMessenger.hh"
#include "ExN02ChamberParameterisation.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4GeometryManager.hh"
#include "ExN02MagneticField.hh"
#include "G4PVParameterised.hh"
#include "G4FieldManager.hh"
#include "G4TransportationManager.hh"
///#include "G4UserLimits.hh"
#include "G4SDManager.hh"
#include "ExN02TrackerSD.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "G4ios.hh"
ExN02DetectorConstruction::ExN02DetectorConstruction()
:solidWorld(NULL),logicWorld(NULL),physiWorld(NULL),
solidTracker(NULL),logicTracker(NULL),physiTracker(NULL),
solidTarget(NULL),logicTarget(NULL),physiTarget(NULL),
solidChamber(NULL),logicChamber(NULL),physiChamber(NULL),
myMaterial(NULL), fDetectorLength(0.),fWorldLength(0.)
{
detectorMessenger = new ExN02DetectorMessenger(this);
fpMagField = new ExN02MagneticField(); // G4FieldManager();
// magFieldManager = new G4FieldManager();
}
ExN02DetectorConstruction::~ExN02DetectorConstruction()
{
delete detectorMessenger;
delete fpMagField;
// delete magFieldManager;
}
G4VPhysicalVolume* ExN02DetectorConstruction::Construct()
{
//--------- Material definition ---------
G4double a, iz, z, density;
G4String name, symbol;
G4int nel;
//Air
a = 14.01*g/mole;
G4Element* elN = new G4Element(name="Nitrogen", symbol="N", iz=7., a);
a = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxigen", symbol="O", iz=8., a);
density = 1.29*mg/cm3;
G4Material* Air = new G4Material(name="Air", density, nel=2);
Air->AddElement(elN, .7);
Air->AddElement(elO, .3);
//Al
a = 26.98*g/mole;
density = 2.7*g/cm3;
G4Material* Aluminium = new G4Material(name="Al", z=13., a, density);
//Pb
a = 207.19*g/mole;
density = 11.35*g/cm3;
G4Material* Pb = new G4Material(name="Pb", z=82., a, density);
//Vacuum
a = 1.*g/mole;
density = 1.e-20*g/cm3;
G4Material* Vacuum = new G4Material(name="Vacuum",z=1.,a,density);
//--------- Sizes of the principal geometrical components (solids) ---------
fDetectorLength = 750.*cm ; // Full length of the detector
fTrackerLength = 500. * cm; // Full length of the Tracker
fTargetLength = 5.0 * cm; // Full length of the Target
G4double detectorSize = 0.5*fDetectorLength;
G4double trackerSize = fTrackerLength * 0.5; // Half length of the Tracker
G4double targetSize = fTargetLength * 0.5; // Half length of the Target
//--------- Definitions of Solids, Logical Volumes, Physical Volumes ---------
myMaterial = Aluminium;
//------------------------------
// World
//------------------------------
fWorldLength= 1.2 * fDetectorLength;
G4double HalfWorldLength = 0.5*fWorldLength;
solidWorld= new G4Box("World",HalfWorldLength,HalfWorldLength,HalfWorldLength);
logicWorld= new G4LogicalVolume( solidWorld, Air, "World", 0, 0, 0);
// Must place the World Physical volume unrotated at (0,0,0).
//
physiWorld = new G4PVPlacement(0, // no rotation
G4ThreeVector(), // at (0,0,0)
"WorldPV", // its name
logicWorld, // its logical volume
0, // its mother volume
false, // no boolean operations
0); // no field specific to volume
//------------------------------
// Target
//------------------------------
solidTarget = new G4Box("TargetSolid",targetSize,targetSize,targetSize);
logicTarget = new G4LogicalVolume(solidTarget ,myMaterial,"TargetLV",0,0,0);
physiTarget = new G4PVPlacement(0, // no rotation
G4ThreeVector(), // at (0,0,0)
"TargetPV", // its name
logicTarget, // its logical volume
physiWorld, // its mother volume
false, // no boolean operations
0); // no particular field
G4cout << "Target is " << 2*targetSize/cm << " cm of Al " << endl;
//------------------------------
// Tracker
//------------------------------
G4ThreeVector positionTracker;
solidTracker = new G4Box("Tracker",trackerSize,trackerSize,trackerSize);
logicTracker = new G4LogicalVolume(solidTracker , Air, "Tracker",0,0,0);
positionTracker= G4ThreeVector(0,0,trackerSize+targetSize);
physiTracker = new G4PVPlacement(0, // no rotation
positionTracker, // at (0,0,0)
"Tracker", // its name
logicTracker, // its logical volume
physiWorld, // its mother volume
false, // no boolean operations
0); // no particular field
//------------------------------
// Tracker segments
//------------------------------
// An example of Parameterised volumes
// dummy values for G4Box -- modified by parameterised volume
G4VSolid * solidChamber
= new G4Box("chamberBox", 100*cm, 100*cm, 10*cm);
// chamberWidth, chamberWidth, chamberDepth);
G4LogicalVolume * trackerChamberLV
= new G4LogicalVolume(solidChamber, Aluminium, "trackerChamberLV",0,0,0);
G4VPVParameterisation * chamberParam
= new ExN02ChamberParameterisation(
6, // NoChambers,
-240.*cm, // Z of center of first
80*cm, // Z spacing of centers
20*cm, // Width Chamber,
50*cm, // lengthInitial,
trackerSize*2.); // lengthFinal
// dummy value : kXAxis -- modified by parameterised volume
G4VPhysicalVolume *trackerChamber_phys
= new G4PVParameterised("trkChamber", // TrackerChamber parameterised
trackerChamberLV, // Its logical volume
physiTracker, // Mother physical volume
kZAxis, // Are placed along this axis
6, // Number of chambers
chamberParam); // The parametrisation
G4VisAttributes* trackerChamber_logVisAtt
= new G4VisAttributes(G4Colour(0.5,0.0,1.0));
trackerChamberLV->SetVisAttributes(trackerChamber_logVisAtt);
//------------------------------------------------
// Sensitive detectors
//------------------------------------------------
G4SDManager* SDman = G4SDManager::GetSDMpointer();
G4String trackerChamberSDname = "ExN02/TrackerChamberSD";
ExN02TrackerSD* aTrackerSD = new ExN02TrackerSD( trackerChamberSDname );
SDman->AddNewDetector( aTrackerSD );
trackerChamberLV->SetSensitiveDetector( aTrackerSD );
//--------- Visualization attributes -------------------------------
logicWorld->SetVisAttributes (G4VisAttributes::Invisible);
G4VisAttributes * simpleBoxVisAtt
= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
simpleBoxVisAtt->SetVisibility(true);
logicTracker->SetVisAttributes(simpleBoxVisAtt);
//set a max Step length in the absorber
///G4double maxStep = fDetectorLength/0.7, maxLength=fDetectorLength/0.7;
///G4double maxTime = 0.1*ns, minEkin = 10*MeV;
///logicAbsorber->SetUserLimits(new G4UserLimits(maxStep,maxLength,maxTime,
/// minEkin));
return physiWorld;
}
#if 0
void ExN02DetectorConstruction::setMaterial(G4String materialChoice)
{
const G4MaterialTable*
theMaterialTable = G4Material::GetMaterialTable();
G4Material* pttoMaterial;
for (G4int J=0 ; J<theMaterialTable->length() ; J++)
{ pttoMaterial = (*theMaterialTable)(J);
if(pttoMaterial->GetName() == materialChoice)
{myMaterial = pttoMaterial;
logicTracker->SetMaterial(pttoMaterial);
G4cout << "Absorber is " << fDetectorLength/cm << " cm of " << materialChoice
<< endl;}
}
}
#endif
void ExN02DetectorConstruction::SetDetectorLength(G4double length)
{
G4GeometryManager::GetInstance()->OpenGeometry();
fDetectorLength = length;
fWorldLength = 1.2*fDetectorLength;
G4double halfSize = 0.5 * fDetectorLength;
G4double halfWorldLength = 0.5*fWorldLength;
solidWorld -> SetXHalfLength(halfWorldLength);
solidWorld -> SetYHalfLength(halfWorldLength);
solidWorld -> SetZHalfLength(halfWorldLength);
solidTracker -> SetXHalfLength(halfSize);
solidTracker -> SetYHalfLength(halfSize);
solidTracker -> SetZHalfLength(halfSize);
G4cout << "Absorber is " << fDetectorLength/cm << " cm of " << myMaterial->GetName()
<< endl;
}
void ExN02DetectorConstruction::SetMagField(G4double fieldValue)
{
fpMagField->SetFieldValue(fieldValue);
}
@@ -0,0 +1,71 @@
// 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: ExN02DetectorMessenger.cc,v 1.4 1998/10/09 14:35:32 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#include "ExN02DetectorMessenger.hh"
#include "ExN02DetectorConstruction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "globals.hh"
ExN02DetectorMessenger::ExN02DetectorMessenger(ExN02DetectorConstruction * myDet)
:myDetector(myDet)
{
mydetDir = new G4UIdirectory("/mydet/");
mydetDir->SetGuidance("ExN02 detector control.");
MatCmd = new G4UIcmdWithAString("/mydet/setMaterial",this);
MatCmd->SetGuidance("Select Material of the SimpleBox.");
MatCmd->SetGuidance(" Choice : Air, Al(default), Pb, Vacuum");
MatCmd->SetParameterName("choice",true);
MatCmd->SetDefaultValue("Al");
MatCmd->SetCandidates("Air Al Pb Vacuum");
MatCmd->AvailableForStates(PreInit,Idle);
SizeCmd = new G4UIcmdWithADoubleAndUnit("/mydet/setSize",this);
SizeCmd->SetGuidance("Set full Size of the Box");
SizeCmd->SetParameterName("Size",false,false);
SizeCmd->SetDefaultUnit("cm");
SizeCmd->SetUnitCategory("Length");
SizeCmd->AvailableForStates(PreInit,Idle);
FieldCmd = new G4UIcmdWithADoubleAndUnit("/mydet/setField",this);
FieldCmd->SetGuidance("Define magnetic field.");
FieldCmd->SetGuidance("Magnetic field will be in Z direction.");
FieldCmd->SetParameterName("Bz",false,false);
FieldCmd->SetDefaultUnit("tesla");
FieldCmd->SetUnitCategory("Magnetic flux density");
FieldCmd->AvailableForStates(PreInit,Idle);
}
ExN02DetectorMessenger::~ExN02DetectorMessenger()
{
delete MatCmd;
delete SizeCmd;
delete FieldCmd;
delete mydetDir;
}
void ExN02DetectorMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
{
// if( command == MatCmd )
// { myDetector->setMaterial(newValues);}
if( command == SizeCmd )
{ myDetector->SetDetectorLength(SizeCmd->GetNewDoubleValue(newValues));}
if( command == FieldCmd )
{ myDetector->SetMagField(FieldCmd->GetNewDoubleValue(newValues));}
}
@@ -0,0 +1,56 @@
// 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: ExN02EventAction.cc,v 1.3 1998/10/09 14:35:32 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#include "ExN02EventAction.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4TrajectoryContainer.hh"
#include "G4Trajectory.hh"
#include "G4VVisManager.hh"
#include "G4UImanager.hh"
#include "G4ios.hh"
ExN02EventAction::ExN02EventAction()
{}
ExN02EventAction::~ExN02EventAction()
{}
void ExN02EventAction::BeginOfEventAction()
{}
void ExN02EventAction::EndOfEventAction()
{
const G4Event* evt = fpEventManager->GetConstCurrentEvent();
G4cout << ">>> Event " << evt->GetEventID() << endl;
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
G4int n_trajectories = 0;
if(trajectoryContainer)
{ n_trajectories = trajectoryContainer->entries(); }
G4cout << " " << n_trajectories
<< " trajectories stored in this event." << endl;
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
if(pVVisManager)
{
for(G4int i=0; i<n_trajectories; i++)
{ (*(evt->GetTrajectoryContainer()))[i]->DrawTrajectory(50); }
}
}
@@ -0,0 +1,70 @@
// 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: ExN02MagneticField.cc,v 1.2 1998/12/04 20:25:22 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// User Field class implementation.
//
#include "ExN02MagneticField.hh"
#include "G4FieldManager.hh"
// Constructors:
ExN02MagneticField::ExN02MagneticField()
: G4UniformMagField(G4ThreeVector())
{
GetGlobalFieldManager()->CreateChordFinder(this);
}
ExN02MagneticField::ExN02MagneticField(G4ThreeVector fieldVector)
: G4UniformMagField(fieldVector)
{
GetGlobalFieldManager()->CreateChordFinder(this);
}
// Set the value of the Global Field to fieldValue along Z
//
void ExN02MagneticField::SetFieldValue(G4double fieldValue)
{
G4UniformMagField::SetFieldValue(G4ThreeVector(0,0,fieldValue));
}
// Set the value of the Global Field
//
void ExN02MagneticField::SetFieldValue(G4ThreeVector fieldVector)
{
// Find the Field Manager for the global field
G4FieldManager* fieldMgr= GetGlobalFieldManager();
if(fieldVector!=G4ThreeVector(0.,0.,0.))
{
G4UniformMagField::SetFieldValue(fieldVector);
fieldMgr->SetDetectorField(this);
} else {
// If the new field's value is Zero, then it is best to
// insure that it is not used for propagation.
G4MagneticField* magField = NULL;
fieldMgr->SetDetectorField(magField);
}
}
ExN02MagneticField::~ExN02MagneticField()
{
// GetGlobalFieldManager()->SetDetectorField(0);
}
// Utility method
#include "G4TransportationManager.hh"
G4FieldManager* ExN02MagneticField::GetGlobalFieldManager()
{
return G4TransportationManager::GetTransportationManager()
->GetFieldManager();
}
+288
View File
@@ -0,0 +1,288 @@
// 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: ExN02PhysicsList.cc,v 1.4 1998/10/09 14:35:33 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// This is a version for maximum particle set
// ------------------------------------------------------------
#include "globals.hh"
#include "ExN02PhysicsList.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4ios.hh"
#include <iomanip.h>
ExN02PhysicsList::ExN02PhysicsList(): G4VUserPhysicsList(),
thePhotoElectricEffect(NULL),theComptonScattering(NULL),
theGammaConversion(NULL),
theeminusMultipleScattering(NULL),theeminusIonisation(NULL),
theeminusBremsstrahlung(NULL),
theeplusMultipleScattering(NULL),theeplusIonisation(NULL),
theeplusBremsstrahlung(NULL),
theeplusAnnihilation(NULL)
{
defaultCutValue = 2.0*mm;
SetVerboseLevel(1);
}
ExN02PhysicsList::~ExN02PhysicsList()
{
}
void ExN02PhysicsList::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.
ConstructBosons();
ConstructLeptons();
ConstructMesons();
ConstructBarions();
}
void ExN02PhysicsList::ConstructBosons()
{
// pseudo-particles
G4Geantino::GeantinoDefinition();
G4ChargedGeantino::ChargedGeantinoDefinition();
// gamma
G4Gamma::GammaDefinition();
// optical photon
G4OpticalPhoton::OpticalPhotonDefinition();
}
void ExN02PhysicsList::ConstructLeptons()
{
// leptons
G4Electron::ElectronDefinition();
G4Positron::PositronDefinition();
G4MuonPlus::MuonPlusDefinition();
G4MuonMinus::MuonMinusDefinition();
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}
void ExN02PhysicsList::ConstructMesons()
{
// mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4PionZero::PionZeroDefinition();
G4Eta::EtaDefinition();
G4EtaPrime::EtaPrimeDefinition();
G4RhoZero::RhoZeroDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
G4KaonZero::KaonZeroDefinition();
G4AntiKaonZero::AntiKaonZeroDefinition();
G4KaonZeroLong::KaonZeroLongDefinition();
G4KaonZeroShort::KaonZeroShortDefinition();
}
void ExN02PhysicsList::ConstructBarions()
{
// barions
G4Proton::ProtonDefinition();
G4AntiProton::AntiProtonDefinition();
G4Neutron::NeutronDefinition();
G4AntiNeutron::AntiNeutronDefinition();
}
void ExN02PhysicsList::ConstructProcess()
{
AddTransportation();
ConstructEM();
ConstructGeneral();
}
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
///#include "G4UserSpecialCuts.hh"
void ExN02PhysicsList::ConstructEM()
{
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// gamma
thePhotoElectricEffect = new G4PhotoElectricEffect();
theComptonScattering = new G4ComptonScattering();
theGammaConversion = new G4GammaConversion();
// add processes
pmanager->AddDiscreteProcess(thePhotoElectricEffect);
pmanager->AddDiscreteProcess(theComptonScattering);
pmanager->AddDiscreteProcess(theGammaConversion);
} else if (particleName == "e-") {
//electron
// Construct processes for electron
theeminusMultipleScattering = new G4MultipleScattering();
theeminusIonisation = new G4eIonisation();
theeminusBremsstrahlung = new G4eBremsstrahlung();
// add processes
pmanager->AddProcess(theeminusMultipleScattering);
pmanager->AddProcess(theeminusIonisation);
pmanager->AddProcess(theeminusBremsstrahlung);
// set ordering for AlongStepDoIt
pmanager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep, 1);
pmanager->SetProcessOrdering(theeminusIonisation, idxAlongStep, 2);
// set ordering for PostStepDoIt
pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep, 1);
pmanager->SetProcessOrdering(theeminusIonisation, idxPostStep, 2);
pmanager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep, 3);
} else if (particleName == "e+") {
//positron
// Construct processes for positron
theeplusMultipleScattering = new G4MultipleScattering();
theeplusIonisation = new G4eIonisation();
theeplusBremsstrahlung = new G4eBremsstrahlung();
theeplusAnnihilation = new G4eplusAnnihilation();
// add processes
pmanager->AddProcess(theeplusMultipleScattering);
pmanager->AddProcess(theeplusIonisation);
pmanager->AddProcess(theeplusBremsstrahlung);
pmanager->AddProcess(theeplusAnnihilation);
// set ordering for AtRestDoIt
pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
// set ordering for AlongStepDoIt
pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep, 1);
pmanager->SetProcessOrdering(theeplusIonisation, idxAlongStep, 2);
// set ordering for PostStepDoIt
pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep, 1);
pmanager->SetProcessOrdering(theeplusIonisation, idxPostStep, 2);
pmanager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep, 3);
pmanager->SetProcessOrdering(theeplusAnnihilation, idxPostStep, 4);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
// Construct processes for muon+
G4VProcess* aMultipleScattering = new G4MultipleScattering();
G4VProcess* aBremsstrahlung = new G4MuBremsstrahlung();
G4VProcess* aPairProduction = new G4MuPairProduction();
G4VProcess* anIonisation = new G4MuIonisation();
// add processes
pmanager->AddProcess(anIonisation);
pmanager->AddProcess(aMultipleScattering);
pmanager->AddProcess(aBremsstrahlung);
pmanager->AddProcess(aPairProduction);
// set ordering for AlongStepDoIt
pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep, 1);
pmanager->SetProcessOrdering(anIonisation, idxAlongStep, 2);
// set ordering for PostStepDoIt
pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep, 1);
pmanager->SetProcessOrdering(anIonisation, idxPostStep, 2);
pmanager->SetProcessOrdering(aBremsstrahlung, idxPostStep, 3);
pmanager->SetProcessOrdering(aPairProduction, idxPostStep, 4);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
// all others charged particles except geantino
G4VProcess* aMultipleScattering = new G4MultipleScattering();
G4VProcess* anIonisation = new G4hIonisation();
//>>G4VProcess* theUserSpecialCuts = new G4UserSpecialCuts();
// add processes
pmanager->AddProcess(anIonisation);
pmanager->AddProcess(aMultipleScattering);
/// pmanager->AddProcess(theUserSpecialCuts);
// set ordering for AtRestDoIt
//>>pmanager->SetProcessOrderingToFirst(theUserSpecialCuts, idxAtRest);
// set ordering for AlongStepDoIt
pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep, 1);
pmanager->SetProcessOrdering(anIonisation, idxAlongStep, 2);
// set ordering for PostStepDoIt
pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep, 1);
pmanager->SetProcessOrdering(anIonisation, idxPostStep, 2);
//>>pmanager->SetProcessOrdering(theUserSpecialCuts, idxPostStep, 3);
}
}
}
#include "G4Decay.hh"
void ExN02PhysicsList::ConstructGeneral()
{
// Add Decay Process
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (theDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(theDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
void ExN02PhysicsList::SetCuts(G4double cut)
{
if (verboseLevel >0){
G4cout << "ExN02PhysicsList::SetCuts:";
G4cout << "CutLength : " << cut/mm << " (mm)" << endl;
}
// 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");
SetCutValueForOthers(cut);
if (verboseLevel>1) {
DumpCutValuesTable();
}
}
@@ -0,0 +1,70 @@
// 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: ExN02PrimaryGeneratorAction.cc,v 1.3 1998/10/09 14:35:34 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// $ Id: $
//
// From exampleEmPhys2/MyPrimaryGeneratorAction.cc,v 1.1 1998/02/06 maire
#include "ExN02PrimaryGeneratorAction.hh"
#include "ExN02DetectorConstruction.hh"
#include "ExN02PrimaryGeneratorMessenger.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "globals.hh"
#include "Randomize.hh"
ExN02PrimaryGeneratorAction::ExN02PrimaryGeneratorAction(ExN02DetectorConstruction* myDC)
:myDetector(myDC),rndmFlag("off")
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
gunMessenger = new ExN02PrimaryGeneratorMessenger(this);
// default particle
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4String particleName;
G4ParticleDefinition* particle
= particleTable->FindParticle(particleName="proton");
particleGun->SetParticleDefinition(particle);
particleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
particleGun->SetParticleEnergy(3.0*GeV);
G4double position = -0.5*(myDetector->GetWorldFullLength());
particleGun->SetParticlePosition(G4ThreeVector(position,0.*cm,0.*cm));
}
ExN02PrimaryGeneratorAction::~ExN02PrimaryGeneratorAction()
{
delete particleGun;
delete gunMessenger;
}
void ExN02PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
// The Target is a box placed at (0,0,0)
//
G4double x0 = -0.5*(myDetector->GetTargetFullLength());
G4double y0 = 0.*cm, z0 = 0.*cm;
if (rndmFlag == "on")
{y0 = (myDetector->GetTargetFullLength())*(G4UniformRand()-0.5);
z0 = (myDetector->GetTargetFullLength())*(G4UniformRand()-0.5);
}
particleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
particleGun->GeneratePrimaryVertex(anEvent);
}
@@ -0,0 +1,42 @@
// 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: ExN02PrimaryGeneratorMessenger.cc,v 1.3 1998/10/09 14:35:34 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#include "ExN02PrimaryGeneratorMessenger.hh"
#include "ExN02PrimaryGeneratorAction.hh"
#include "G4UIcmdWithAString.hh"
#include "globals.hh"
ExN02PrimaryGeneratorMessenger::ExN02PrimaryGeneratorMessenger(ExN02PrimaryGeneratorAction* myGun)
:myAction(myGun)
{
RndmCmd = new G4UIcmdWithAString("/gun/random",this);
RndmCmd->SetGuidance("Shoot randomly the incident particle.");
RndmCmd->SetGuidance(" Choice : on, off(default)");
RndmCmd->SetParameterName("choice",true);
RndmCmd->SetDefaultValue("off");
RndmCmd->SetCandidates("on off");
RndmCmd->AvailableForStates(PreInit,Idle);
}
ExN02PrimaryGeneratorMessenger::~ExN02PrimaryGeneratorMessenger()
{
delete RndmCmd;
}
void ExN02PrimaryGeneratorMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
{
if( command == RndmCmd )
{ myAction->SetRndmFlag(newValues);}
}
+58
View File
@@ -0,0 +1,58 @@
// 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: ExN02RunAction.cc,v 1.3 1998/10/09 14:35:34 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#include "ExN02RunAction.hh"
#include "G4Run.hh"
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
ExN02RunAction::ExN02RunAction()
{
runIDcounter = 0;
}
ExN02RunAction::~ExN02RunAction()
{
}
void ExN02RunAction::BeginOfRunAction(G4Run* aRun)
{
aRun->SetRunID(runIDcounter++);
G4cout << "### Run " << aRun->GetRunID() << " start." << endl;
G4UImanager* UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/tracking/storeTrajectory 1");
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
if(pVVisManager)
{
UI->ApplyCommand("/vis~/clear/view");
UI->ApplyCommand("/vis~/draw/current");
}
}
void ExN02RunAction::EndOfRunAction(G4Run* aRun)
{
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
if(pVVisManager)
{
G4UImanager::GetUIpointer()->ApplyCommand("/vis~/show/view");
}
}
@@ -0,0 +1,41 @@
// 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: ExN02SteppingAction.cc,v 1.3 1998/10/09 14:35:35 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
#include "ExN02SteppingAction.hh"
#include "ExN02DetectorConstruction.hh"
#include "ExN02EventAction.hh"
#include "G4SteppingManager.hh"
ExN02SteppingAction::ExN02SteppingAction(ExN02DetectorConstruction* myDC, ExN02EventAction* myEA)
:myDetector(myDC), eventAction(myEA)
{ }
void ExN02SteppingAction::UserSteppingAction()
{
G4Step* aStep = GetSteppingManager()->GetStep();
// collect the energy deposited in the absorber
const G4VPhysicalVolume* currentVolume = aStep->GetPreStepPoint()-> GetPhysicalVolume();
#if 0
const G4VPhysicalVolume* absorber = myDetector->getAbsorber();
if (currentVolume == absorber)
{
G4double EdepStep = aStep->GetTotalEnergyDeposit();
eventAction->addEdep(EdepStep);
}
#endif
}
@@ -0,0 +1,73 @@
// 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: ExN02TrackerHit.cc,v 1.1 1998/10/09 14:35:35 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
#include "ExN02TrackerHit.hh"
#include "G4VVisManager.hh"
#include "G4Circle.hh"
#include "G4Colour.hh"
#include "G4VisAttributes.hh"
G4Allocator<ExN02TrackerHit> ExN02TrackerHitAllocator;
ExN02TrackerHit::ExN02TrackerHit()
{;}
ExN02TrackerHit::~ExN02TrackerHit()
{;}
ExN02TrackerHit::ExN02TrackerHit(const ExN02TrackerHit &right)
{
edep = right.edep;
pos = right.pos;
}
const ExN02TrackerHit& ExN02TrackerHit::operator=(const ExN02TrackerHit &right)
{
edep = right.edep;
pos = right.pos;
return *this;
}
int ExN02TrackerHit::operator==(const ExN02TrackerHit &right) const
{
return 0;
}
void ExN02TrackerHit::Draw()
{
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
if(pVVisManager)
{
G4Circle circle(pos);
circle.SetScreenSize(0.04);
circle.SetFillStyle(G4Circle::filled);
G4Colour colour(1.,0.,0.);
G4VisAttributes attribs(colour);
circle.SetVisAttributes(attribs);
pVVisManager->Draw(circle);
}
}
void ExN02TrackerHit::Print()
{
}
// This is a forward declarations of an instantiated G4Allocator<Type> object.
// It has been added in order to make code portable for the GNU g++
// (release 2.7.2) compiler.
// Whenever a new Type is instantiated via G4Allocator, it has to be forward
// declared to make object code (compiled with GNU g++) link successfully.
//
#ifdef GNU_GCC
template class G4Allocator<ExN02TrackerHit>;
#endif
+69
View File
@@ -0,0 +1,69 @@
// 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: ExN02TrackerSD.cc,v 1.1 1998/10/09 14:35:35 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
#include "ExN02TrackerSD.hh"
#include "ExN02TrackerHit.hh"
#include "G4Step.hh"
#include "G4HCofThisEvent.hh"
#include "G4Track.hh"
#include "G4SDManager.hh"
#include "G4ios.hh"
ExN02TrackerSD::ExN02TrackerSD(G4String name)
:G4VSensitiveDetector(name)
{
G4String HCname;
collectionName.insert(HCname="trackerCollection");
}
ExN02TrackerSD::~ExN02TrackerSD(){;}
void ExN02TrackerSD::Initialize(G4HCofThisEvent*HCE)
{
trackerCollection = new ExN02TrackerHitsCollection
(SensitiveDetectorName,collectionName[0]);
static G4int HCID = -1;
if(HCID<0)
{ HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]); }
HCE->AddHitsCollection( HCID, trackerCollection );
}
G4bool ExN02TrackerSD::ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist)
{
G4Track* aTrack = aStep->GetTrack();
G4double edep = aStep->GetTotalEnergyDeposit();
if(edep==0.) return true;
ExN02TrackerHit* newHit = new ExN02TrackerHit();
newHit->SetEdep( edep );
newHit->SetPos( aStep->GetPreStepPoint()->GetPosition() );
trackerCollection->insert( newHit );
return true;
}
void ExN02TrackerSD::EndOfEvent(G4HCofThisEvent*HCE)
{
}
void ExN02TrackerSD::clear()
{
}
void ExN02TrackerSD::DrawAll()
{
}
void ExN02TrackerSD::PrintAll()
{
}
+141
View File
@@ -0,0 +1,141 @@
// 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: ExN02VisManager.cc,v 1.4 1998/11/30 10:21:31 allison Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// John Allison 24th January 1998.
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifdef G4VIS_USE
#include "ExN02VisManager.hh"
// Supported drivers...
#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"
#endif
#ifdef G4VIS_USE_OPENGLX
#include "G4OpenGLImmediateX.hh"
#include "G4OpenGLStoredX.hh"
#endif
#ifdef G4VIS_USE_OPENGLWIN32
#include "G4OpenGLImmediateWin32.hh"
#include "G4OpenGLStoredWin32.hh"
#endif
#ifdef G4VIS_USE_OPENGLXM
#include "G4OpenGLImmediateXm.hh"
#include "G4OpenGLStoredXm.hh"
#endif
#ifdef G4VIS_USE_OIX
#include "G4OpenInventorX.hh"
#endif
#ifdef G4VIS_USE_OIWIN32
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_RAYX
#include "G4RayX.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....
ExN02VisManager::ExN02VisManager () {}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN02VisManager::RegisterGraphicsSystems () {
#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);
#endif
#ifdef G4VIS_USE_OPENGLX
RegisterGraphicsSystem (new G4OpenGLImmediateX);
RegisterGraphicsSystem (new G4OpenGLStoredX);
#endif
#ifdef G4VIS_USE_OPENGLWIN32
RegisterGraphicsSystem (new G4OpenGLImmediateWin32);
RegisterGraphicsSystem (new G4OpenGLStoredWin32);
#endif
#ifdef G4VIS_USE_OPENGLXM
RegisterGraphicsSystem (new G4OpenGLImmediateXm);
RegisterGraphicsSystem (new G4OpenGLStoredXm);
#endif
#ifdef G4VIS_USE_OIX
RegisterGraphicsSystem (new G4OpenInventorX);
#endif
#ifdef G4VIS_USE_OIWIN32
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);
#endif
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."
<< endl;
PrintAvailableGraphicsSystems ();
}
}
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+17
View File
@@ -0,0 +1,17 @@
# $Id: GNUmakefile,v 2.1 1998/07/02 15:26:53 gunter Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleN03
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
+61
View File
@@ -0,0 +1,61 @@
$Id: History,v 2.8 1998/10/30 12:30:12 maire Exp $
--------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example N03 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 *
----------------------------------------------------------
9-10-98 John Apostolakis
- This used to be example N02. It is now N03.
25-02-98 Michel Maire
- add a macro 'newgeom.mac' which gives an example of
interactive redefinition of the geometry
11-09-98 Michel Maire
- removed the function SetEmProcess() ( contained cin)
and the class ExN02PhysicsListMessenger
27-08-98 John Allison
- Removed /vis~/camera/zoom 3 - coworks with vis-00-02-05.
12-08-98 Michel Maire
- Changed all the class name:N02 -> ExN02.
9-08-98 John Allison
- Changed G4UIterminal to G4UIGAG.
20-07-98 Michel Maire
storeTrajectory command move to prerun.mac
16-07-98 John Allison
- Changed /vis~/Draw... to /vis~/draw.
9-07-98 John Allison
- Added G4VIS_USE_DAWNFILE and G4VIS_USE_OPENGLWIN32 to N02VisManager.cc.
8th July 1998 G.Cosmo
- Protected visualization code with G4VIS_USE.
6th July 1998 John Allison
- Simplified N02VisManager.
16th June 1998 Michel Maire
- Added G4_SOLVE_VIS_TEMPLATES to exampleN02.cc
10th June 1998 John Allison
- Added template instantiation requests to exampleN02.cc for GNU_GCC.
April 09, 98 G. Cosmo
- Created.
+119
View File
@@ -0,0 +1,119 @@
$Id: README,v 2.2 1998/11/27 17:09:02 maire Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
ExampleN03
----------
This example simulates a simple Sampling Calorimeter setup.
1- GEOMETRY DEFINITION
The calorimeter is a box made of a given number of layers. A layer
consists of an absorber plate and of a detection gap. The layer is
replicated.
Six parameters define the calorimeter :
- the material of the absorber,
- the thickness of an absorber plate,
- the material of the detection gap,
- the thickness of a gap,
- the number of layers,
- the transverse size of the calorimeter (the input face is a square).
In addition a transverse uniform magnetic field can be applied.
The default geometry is constructed in DetectorConstruction class,
but all of the above parameters can be modified interactively via
the commands defined in the DetectorMessenger class.
NB. The thickness of the absorber or of the gap can be set to zero
(but not together), and the number of layers to 1. In this case we
have a unique homogeneous block of matter, which looks like
a bubble chamber rather than a calorimeter ...
(see the macro of commands: newgeom.mac)
2- AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle which hits the
calorimeter 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).
In addition one can choose randomly the impact point of the incident
particle. The corresponding interactive command is built in
PrimaryGeneratorMessenger class.
A RUN is a set of events.
3- DETECTOR RESPONSE
A HIT is a record, event per event and volume per volume, of all the
informations needed to simulate and analyse the detector response.
In this example a CalorHit is defined as a set of 4 informations per
layer :
- the total energy deposit in the absorber plate,
- the total tracklength of all charged particles in the absorber plate,
- the total energy deposit in the detection gap,
- the total tracklength of all charged particles in the detection gap.
Therefore both the absorber and the detection gap are declared
'sensitive detector' (SD), which means they can contribute to the hit.
At the end of a run, from the CalorHitsCollection, one can study the
calorimeter performances such as :
- shower profile,
- calorimeter resolution,
- pi/e ratio ...
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 prerunN03.mac. This macro is
automatically read from the main in case of interactive running mode.
The detector has a default view which is a longitudinal view of the
calorimeter.
The tracks are drawn at the end of event, and erased at the end of run.
Optionaly one can choose to draw all particles, only the charged one,
or none. This command is defined in EventActionMessenger class.
5- PHYSICS DEMO
The particle's type and the physic processes which will be available
in this example are set in PhysicsList class.
In addition a build-in interactive command (/process/inactivate proname)
allows to activate/inactivate the processes one by one.
Then one can well visualize the processes one by one, especially
in the bubble chamber setup with a transverse magnetic field.
As a homework try to visualize a gamma conversion alone,
or the effect of the multiple scattering.
6- HOW TO START ?
- compile and link to generate an executable
% cd N03
% gmake
- execute N03 in 'batch' mode from macro files
% exampleN03 run1.mac
- execute N03 in 'interactive mode' with visualization
% exampleN03
....
Idle> type your commands. For instance:
Idle> /control/execute newgeom.mac
....
Idle> exit
+98
View File
@@ -0,0 +1,98 @@
// 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: exampleN03.cc,v 2.9 1998/12/08 16:37:30 allison Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleN02
//
// For information related to this code contact:
// CERN, IT Division, ASD Group
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#ifdef G4VIS_USE
#include "ExN03VisManager.hh"
#endif
#include "ExN03DetectorConstruction.hh"
#include "ExN03PhysicsList.hh"
#include "ExN03PrimaryGeneratorAction.hh"
#include "ExN03RunAction.hh"
#include "ExN03EventAction.hh"
#include "ExN03SteppingAction.hh"
#ifdef GNU_GCC
#include <rw/tpordvec.h>
#include "ExN03CalorHit.hh"
template class RWTPtrOrderedVector <ExN03CalorHit>;
template class RWTPtrVector <ExN03CalorHit>;
template class G4Allocator <ExN03CalorHit>;
#endif
int main(int argc,char** argv) {
// Construct the default run manager
G4RunManager * runManager = new G4RunManager;
// set mandatory initialization classes
ExN03DetectorConstruction* detector = new ExN03DetectorConstruction;
runManager->SetUserInitialization(detector);
runManager->SetUserInitialization(new ExN03PhysicsList);
#ifdef G4VIS_USE
// visualization manager
G4VisManager* visManager = new ExN03VisManager;
visManager->Initialize();
#endif
// set user action classes
runManager->SetUserAction(new ExN03PrimaryGeneratorAction(detector));
runManager->SetUserAction(new ExN03RunAction);
runManager->SetUserAction(new ExN03EventAction);
runManager->SetUserAction(new ExN03SteppingAction);
//Initialize G4 kernel
runManager->Initialize();
// get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
if (argc==1) // Define UI session for interactive mode.
{
// G4UIterminal is a (dumb) terminal.
G4UIsession * session = new G4UIterminal;
UI->ApplyCommand("/control/execute prerunN03.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;
}
View File
+29
View File
@@ -0,0 +1,29 @@
/run/particle/dumpCutValues
# e+ 300MeV
/gun/particle e+
/gun/energy 300 MeV
/run/beamOn 1
#
# list the existing physics processes
/process/list
#
# switch off MultipleScattering
/process/inactivate msc
/run/beamOn 1
#
# switch on MultipleScattering
/process/activate msc
#
# change detector parameter
/calor/setAbsMat Aluminium
/calor/setGapMat Aerogel
/calor/setAbsThick 2. cm
/calor/setGapThick 5. cm
/calor/setNbOfLayers 30
/calor/setSizeYZ 1.5 m
/calor/update
/vis~/clear/scene
/gun/particle gamma
/gun/energy 500 MeV
/run/beamOn 1
exit
+256
View File
@@ -0,0 +1,256 @@
***** Table : Nb of materials = 13 *****
Material: Aluminium density: 2.700 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.893 cm
---> Element: Aluminium Z = 13.0 N = 27.0 A = 26.98 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: liquidArgon density: 1.390 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 14.065 cm
---> Element: liquidArgon Z = 18.0 N = 40.0 A = 39.95 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Copper density: 8.960 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.436 cm
---> Element: Copper Z = 29.0 N = 63.5 A = 63.55 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Lead density: 11.350 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 5.612 mm
---> Element: Lead Z = 82.0 N = 207.2 A = 207.19 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Water density: 1.000 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 36.092 cm
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 11.21 % Abundance 66.67 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 88.79 % Abundance 33.33 %
Material: Scintillator density: 1.032 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 42.549 cm
---> Element: Carbon C Z = 6.0 N = 12.0 A = 12.01 g/mole fractionMass: 91.45 % Abundance 47.37 %
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 8.55 % Abundance 52.63 %
Material: quartz density: 2.200 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 12.295 cm
---> Element: Silicon Si Z = 14.0 N = 28.1 A = 28.09 g/mole fractionMass: 46.75 % Abundance 33.33 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 53.25 % Abundance 66.67 %
Material: Air density: 1.290 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 285.161 m
---> Element: Nitrogen N Z = 7.0 N = 14.0 A = 14.01 g/mole fractionMass: 70.00 % Abundance 72.71 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 30.00 % Abundance 27.29 %
Material: Aerogel density: 200.000 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.493 m
---> Element: Silicon Si Z = 14.0 N = 28.1 A = 28.09 g/mole fractionMass: 29.22 % Abundance 11.12 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 66.49 % Abundance 44.42 %
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 4.19 % Abundance 44.37 %
---> Element: Carbon C Z = 6.0 N = 12.0 A = 12.01 g/mole fractionMass: 0.10 % Abundance 0.09 %
Material: CarbonicGas density: 27.000 mg/cm3 temperature: 325.00 K pressure: 50.00 atm RadLength: 13.406 m
---> Element: Carbon C Z = 6.0 N = 12.0 A = 12.01 g/mole fractionMass: 27.29 % Abundance 33.33 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 72.71 % Abundance 66.67 %
Material: WaterSteam density: 0.300 mg/cm3 temperature: 500.00 K pressure: 2.00 atm RadLength: 1.203 km
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 11.21 % Abundance 66.67 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 88.79 % Abundance 33.33 %
Material: Galactic density: 0.000 mg/cm3 temperature: 2.73 K pressure: 0.00 atm RadLength: 6317232936888469300000.000 km
---> Element: Galactic Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Beam density: 0.010 mg/cm3 temperature: 273.15 K pressure: 0.02 atm RadLength: 36.786 km
---> Element: Nitrogen N Z = 7.0 N = 14.0 A = 14.01 g/mole fractionMass: 70.00 % Abundance 72.71 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 30.00 % Abundance 27.29 %
The calorimeter is made of 10 layers of: [ 10mm of Lead + 5mm of liquidArgon ]
ExN03PhysicsList::SetCuts:CutLength : 2 (mm)
phot: Total cross sections from a parametrisation(L.Urban). Good description from 10 KeV to 50 MeV for all Z
PhysicsTables from 10 keV to 50 MeV in 100 bins.
compt: Total cross sections from a parametrisation(L.Urban). 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(L.Urban). 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 parametrisation(L.Urban). 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 .
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 100 bins.
MuBrems: cross sections from R. Kokoulin
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 100 bins.
MuPairProd: cross sections from R. Kokoulin
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 50 bins.
#
# Macro file for the initialization phase of "exampleN02.cc"
#
# Sets some default verbose
# and initializes the graphic.
#
/control/saveHistory
/run/verbose 2
#
/run/particle/dumpCutValues
============= The cut Energy ==============================
gamma e- mu- proton neutron
Cut in range [mm] 2 2 2 2 2
Cut in energy [KeV]
Aluminium 9.6 1e+03 7.4e+03 1.9e+04 0.99
liquidArgon 8.6 5.6e+02 4.8e+03 1.2e+04 0.99
Copper 36 2.7e+03 1.3e+04 3.4e+04 0.99
Lead 1.2e+02 2.6e+03 1.3e+04 3.2e+04 0.99
Water 3.9 5.7e+02 5e+03 1.3e+04 0.99
Scintillator 3.1 5.8e+02 5e+03 1.3e+04 0.99
quartz 7.6 9.1e+02 6.9e+03 1.8e+04 0.99
Air 0.99 0.99 82 1.7e+02 0.99
Aerogel 2.3 1.8e+02 1.9e+03 4.8e+03 0.99
CarbonicGas 0.99 54 6e+02 1.3e+03 0.99
WaterSteam 0.99 0.99 30 45 0.99
Galactic 0.99 0.99 0.99 0.99 0.99
Beam 0.99 0.99 0.99 0.99 0.99
===================================================
#
# Edit the next line(s) to choose another graphic system
#
#/vis~/create_view/new_graphics_system DAWNFILE
/vis~/create_view/new_graphics_system OGLIX
/vis~/draw/current
/vis~/show/view
#
# for drawing the tracks
# if too many tracks cause core dump => storeTrajectory 0
/tracking/storeTrajectory 1
Idle> /run/particle/dumpCutValues
============= The cut Energy ==============================
gamma e- mu- proton neutron
Cut in range [mm] 2 2 2 2 2
Cut in energy [KeV]
Aluminium 9.6 1e+03 7.4e+03 1.9e+04 0.99
liquidArgon 8.6 5.6e+02 4.8e+03 1.2e+04 0.99
Copper 36 2.7e+03 1.3e+04 3.4e+04 0.99
Lead 1.2e+02 2.6e+03 1.3e+04 3.2e+04 0.99
Water 3.9 5.7e+02 5e+03 1.3e+04 0.99
Scintillator 3.1 5.8e+02 5e+03 1.3e+04 0.99
quartz 7.6 9.1e+02 6.9e+03 1.8e+04 0.99
Air 0.99 0.99 82 1.7e+02 0.99
Aerogel 2.3 1.8e+02 1.9e+03 4.8e+03 0.99
CarbonicGas 0.99 54 6e+02 1.3e+03 0.99
WaterSteam 0.99 0.99 30 45 0.99
Galactic 0.99 0.99 0.99 0.99 0.99
Beam 0.99 0.99 0.99 0.99 0.99
===================================================
Idle> # e+ 300MeV
Idle> /gun/particle e+
Idle> /gun/energy 300 MeV
Idle> /run/beamOn 1
### Run 0 start.
Start closing geometry.
Start Run processing.
>>> Event 0
10 hits are stored in ExN03CalorHitsCollection.
Absorber: total energy: 2.9e+02 MeV total track length: 16 cm
Gap: total energy: 10 MeV total track length: 4.4 cm
185 trajectories stored in this event.
Run terminated.
Run Summary
Number of events processed : 1
User=0.12s Real=0.13s Sys=0.033s
Idle> #
Idle> # list the existing physics processes
Idle> /process/list
Transportation, msc, hIoni, eIoni
eBrem, annihil, MuIoni, MuBrems
MuPairProd, phot, compt, conv
Decay
Idle> #
Idle> # switch off MultipleScattering
Idle> /process/inactivate MultipleScattering
illegal process (or type) name
Idle> /run/beamOn 1
### Run 1 start.
Start Run processing.
>>> Event 0
9 hits are stored in ExN03CalorHitsCollection.
Absorber: total energy: 2.8e+02 MeV total track length: 16 cm
Gap: total energy: 12 MeV total track length: 5.8 cm
187 trajectories stored in this event.
Run terminated.
Run Summary
Number of events processed : 1
User=0.12s Real=0.13s Sys=0.017s
Idle> #
Idle> # switch on MultipleScattering
Idle> /process/activate MultipleScattering
illegal process (or type) name
Idle> #
Idle> # change detector parameter
Idle> /calor/setAbsMat Aluminium
The calorimeter is made of 10 layers of: [ 10mm of Aluminium + 5mm of liquidArgon ]
Idle> /calor/setGapMat Aerogel
The calorimeter is made of 10 layers of: [ 10mm of Aluminium + 5mm of Aerogel ]
Idle> /calor/setAbsThick 2. cm
Idle> /calor/setGapThick 5. cm
Idle> /calor/setNbOfLayers 30
Idle> /calor/setSizeYZ 1.5 m
Idle> /calor/update
The calorimeter is made of 30 layers of: [ 20mm of Aluminium + 50mm of Aerogel ]
Idle> /vis~/clear/scene
Idle> /gun/particle gamma
Idle> /gun/energy 500 MeV
Idle> /run/beamOn 1
### Run 2 start.
Start closing geometry.
Start Run processing.
>>> Event 0
30 hits are stored in ExN03CalorHitsCollection.
Absorber: total energy: 3.8e+02 MeV total track length: 86 cm
Gap: total energy: 86 MeV total track length: 2.4 m
212 trajectories stored in this event.
Run terminated.
Run Summary
Number of events processed : 1
User=0.32s Real=0.35s Sys=0.033s
Idle> G4 kernel has come to Quit state.
Deletion of G4 kernel class start.
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserRunAction deleted.
UserPrimaryGenerator deleted.
G4SDManager deleted.
EventManager deleted.
UImanager deleted.
StateManager deleted.
RunManager is deleting.
@@ -0,0 +1,82 @@
// 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: ExN03CalorHit.hh,v 1.1 1998/10/09 14:54:46 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03CalorHit_h
#define ExN03CalorHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03CalorHit : public G4VHit
{
public:
ExN03CalorHit();
~ExN03CalorHit();
ExN03CalorHit(const ExN03CalorHit&);
const ExN03CalorHit& operator=(const ExN03CalorHit&);
int operator==(const ExN03CalorHit&) const;
inline void* operator new(size_t);
inline void operator delete(void*);
void Draw();
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<ExN03CalorHit> ExN03CalorHitsCollection;
extern G4Allocator<ExN03CalorHit> ExN03CalorHitAllocator;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void* ExN03CalorHit::operator new(size_t)
{
void* aHit;
aHit = (void*) ExN03CalorHitAllocator.MallocSingle();
return aHit;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void ExN03CalorHit::operator delete(void* aHit)
{
ExN03CalorHitAllocator.FreeSingle((ExN03CalorHit*) aHit);
}
#endif
@@ -0,0 +1,51 @@
// 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: ExN03CalorimeterSD.hh,v 1.1 1998/10/09 14:54:46 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03CalorimeterSD_h
#define ExN03CalorimeterSD_h 1
#include "G4VSensitiveDetector.hh"
#include "globals.hh"
class ExN03DetectorConstruction;
class G4HCofThisEvent;
class G4Step;
#include "ExN03CalorHit.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03CalorimeterSD : public G4VSensitiveDetector
{
public:
ExN03CalorimeterSD(G4String, ExN03DetectorConstruction* );
~ExN03CalorimeterSD();
void Initialize(G4HCofThisEvent*);
G4bool ProcessHits(G4Step*,G4TouchableHistory*);
void EndOfEvent(G4HCofThisEvent*);
void clear();
void DrawAll();
void PrintAll();
private:
ExN03CalorHitsCollection* CalCollection;
ExN03DetectorConstruction* Detector;
G4int* HitID;
};
#endif
@@ -0,0 +1,140 @@
// 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: ExN03DetectorConstruction.hh,v 2.3 1998/10/09 15:25:28 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03DetectorConstruction_h
#define ExN03DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
class G4Box;
class G4LogicalVolume;
class G4VPhysicalVolume;
class G4Material;
class G4UniformMagField;
class ExN03DetectorMessenger;
class ExN03CalorimeterSD;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03DetectorConstruction : public G4VUserDetectorConstruction
{
public:
ExN03DetectorConstruction();
~ExN03DetectorConstruction();
public:
void SetAbsorberMaterial (G4String);
void SetAbsorberThickness(G4double);
void SetGapMaterial (G4String);
void SetGapThickness(G4double);
void SetCalorSizeYZ(G4double);
void SetNbOfLayers (G4int);
void SetMagField(G4double);
G4VPhysicalVolume* Construct();
void UpdateGeometry();
public:
void PrintCalorParameters();
G4double GetWorldSizeX() {return WorldSizeX;};
G4double GetWorldSizeYZ() {return WorldSizeYZ;};
G4double GetCalorThickness() {return CalorThickness;};
G4double GetCalorSizeYZ() {return CalorSizeYZ;};
G4int GetNbOfLayers() {return NbOfLayers;};
G4Material* GetAbsorberMaterial() {return AbsorberMaterial;};
G4double GetAbsorberThickness() {return AbsorberThickness;};
G4Material* GetGapMaterial() {return GapMaterial;};
G4double GetGapThickness() {return GapThickness;};
const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;};
const G4VPhysicalVolume* GetAbsorber() {return physiAbsorber;};
const G4VPhysicalVolume* GetGap() {return physiGap;};
private:
G4Material* AbsorberMaterial;
G4double AbsorberThickness;
G4Material* GapMaterial;
G4double GapThickness;
G4int NbOfLayers;
G4double LayerThickness;
G4double CalorSizeYZ;
G4double CalorThickness;
G4Material* defaultMaterial;
G4double WorldSizeYZ;
G4double WorldSizeX;
G4Box* solidWorld; //pointer to the solid World
G4LogicalVolume* logicWorld; //pointer to the logical World
G4VPhysicalVolume* physiWorld; //pointer to the physical World
G4Box* solidCalor; //pointer to the solid Calor
G4LogicalVolume* logicCalor; //pointer to the logical Calor
G4VPhysicalVolume* physiCalor; //pointer to the physical Calor
G4Box* solidLayer; //pointer to the solid Layer
G4LogicalVolume* logicLayer; //pointer to the logical Layer
G4VPhysicalVolume* physiLayer; //pointer to the physical Layer
G4Box* solidAbsorber; //pointer to the solid Absorber
G4LogicalVolume* logicAbsorber; //pointer to the logical Absorber
G4VPhysicalVolume* physiAbsorber; //pointer to the physical Absorber
G4Box* solidGap; //pointer to the solid Gap
G4LogicalVolume* logicGap; //pointer to the logical Gap
G4VPhysicalVolume* physiGap; //pointer to the physical Gap
G4UniformMagField* magField; //pointer to the magnetic field
ExN03DetectorMessenger* detectorMessenger; //pointer to the Messenger
ExN03CalorimeterSD* calorimeterSD; //pointer to the sensitive detector
private:
void DefineMaterials();
void ComputeCalorParameters();
G4VPhysicalVolume* ConstructCalorimeter();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void ExN03DetectorConstruction::ComputeCalorParameters()
{
// Compute derived parameters of the calorimeter
LayerThickness = AbsorberThickness + GapThickness;
CalorThickness = NbOfLayers*LayerThickness;
WorldSizeX = 1.2*CalorThickness; WorldSizeYZ = 1.2*CalorSizeYZ;
}
#endif
@@ -0,0 +1,54 @@
// 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: ExN03DetectorMessenger.hh,v 2.3 1998/10/09 15:48:01 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03DetectorMessenger_h
#define ExN03DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class ExN03DetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03DetectorMessenger: public G4UImessenger
{
public:
ExN03DetectorMessenger(ExN03DetectorConstruction* );
~ExN03DetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
ExN03DetectorConstruction* ExN03Detector;
G4UIdirectory* ExN03detDir;
G4UIcmdWithAString* AbsMaterCmd;
G4UIcmdWithAString* GapMaterCmd;
G4UIcmdWithADoubleAndUnit* AbsThickCmd;
G4UIcmdWithADoubleAndUnit* GapThickCmd;
G4UIcmdWithADoubleAndUnit* SizeYZCmd;
G4UIcmdWithAnInteger* NbLayersCmd;
G4UIcmdWithADoubleAndUnit* MagFieldCmd;
G4UIcmdWithoutParameter* UpdateCmd;
};
#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: ExN03EventAction.hh,v 2.3 1998/10/09 15:48:01 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03EventAction_h
#define ExN03EventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class ExN03EventActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03EventAction : public G4UserEventAction
{
public:
ExN03EventAction();
~ExN03EventAction();
public:
void BeginOfEventAction();
void EndOfEventAction();
void SetDrawFlag(G4String val) {drawFlag = val;};
private:
G4int calorimeterCollID; // Hits collection ID
G4String drawFlag; // control the drawing of event
ExN03EventActionMessenger* eventMessenger;
};
#endif
@@ -0,0 +1,40 @@
// 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: ExN03EventActionMessenger.hh,v 1.1 1998/10/09 14:54:49 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03EventActionMessenger_h
#define ExN03EventActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class ExN03EventAction;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03EventActionMessenger: public G4UImessenger
{
public:
ExN03EventActionMessenger(ExN03EventAction*);
~ExN03EventActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
ExN03EventAction* eventAction;
G4UIcmdWithAString* DrawCmd;
};
#endif
@@ -0,0 +1,53 @@
// 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: ExN03PhysicsList.hh,v 2.4 1998/10/09 15:48:01 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03PhysicsList_h
#define ExN03PhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03PhysicsList: public G4VUserPhysicsList
{
public:
ExN03PhysicsList();
~ExN03PhysicsList();
protected:
// Construct particle and physics
void ConstructParticle();
void ConstructProcess();
void SetCuts(G4double);
protected:
// these methods Construct particles
void ConstructBosons();
void ConstructLeptons();
void ConstructMesons();
void ConstructBarions();
protected:
// these methods Construct physics processes and register them
void ConstructGeneral();
void ConstructEM();
};
#endif
@@ -0,0 +1,49 @@
// 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: ExN03PrimaryGeneratorAction.hh,v 2.3 1998/10/09 15:48:01 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03PrimaryGeneratorAction_h
#define ExN03PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
class ExN03DetectorConstruction;
class ExN03PrimaryGeneratorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
ExN03PrimaryGeneratorAction(ExN03DetectorConstruction*);
~ExN03PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event*);
void SetRndmFlag(G4String val) { rndmFlag = val;}
private:
G4ParticleGun* particleGun; //pointer a to G4 service class
ExN03DetectorConstruction* ExN03Detector; //pointer to the geometry
ExN03PrimaryGeneratorMessenger* gunMessenger; //messenger of this class
G4String rndmFlag; //flag for a random impact point
};
#endif
@@ -0,0 +1,41 @@
// 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: ExN03PrimaryGeneratorMessenger.hh,v 2.3 1998/10/09 15:48:01 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03PrimaryGeneratorMessenger_h
#define ExN03PrimaryGeneratorMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class ExN03PrimaryGeneratorAction;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03PrimaryGeneratorMessenger: public G4UImessenger
{
public:
ExN03PrimaryGeneratorMessenger(ExN03PrimaryGeneratorAction*);
~ExN03PrimaryGeneratorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
ExN03PrimaryGeneratorAction* ExN03Action;
G4UIcmdWithAString* RndmCmd;
};
#endif
@@ -0,0 +1,41 @@
// 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: ExN03RunAction.hh,v 2.3 1998/10/09 15:48:01 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03RunAction_h
#define ExN03RunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class G4Run;
class ExN03RunAction : public G4UserRunAction
{
public:
ExN03RunAction();
~ExN03RunAction();
public:
void BeginOfRunAction(G4Run*);
void EndOfRunAction(G4Run*);
private:
G4int runIDcounter;
};
#endif
@@ -0,0 +1,32 @@
// 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: ExN03SteppingAction.hh,v 2.2 1998/10/09 15:48:01 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03SteppingAction_h
#define ExN03SteppingAction_h 1
#include "G4UserSteppingAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03SteppingAction : public G4UserSteppingAction
{
public:
ExN03SteppingAction();
~ExN03SteppingAction();
void UserSteppingAction();
};
#endif
@@ -0,0 +1,50 @@
// 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: ExN03VisManager.hh,v 2.6 1998/10/09 15:48:01 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// Example Visualization Manager implementing virtual function
// RegisterGraphicsSystems. Exploits C-pre-processor variables
// G4VIS_USE_DAWN, 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().
// Alternatively, you can implement an empty function here and just
// register the systems you want in your main(), e.g.:
// G4VisManager* myVisManager = new MyVisManager;
// myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef ExN03VisManager_h
#define ExN03VisManager_h 1
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ExN03VisManager: public G4VisManager {
public:
ExN03VisManager ();
private:
void RegisterGraphicsSystems ();
};
#endif
+28
View File
@@ -0,0 +1,28 @@
#
# Example of interactive redefinition
# of the geometry
#
# this macro can be executed at any time
# during an interactive session:
#
# Idle> /control/execute newgeom.mac
#
#
/calor/setNbOfLayers 1
#
/calor/setAbsMat Aluminium
/calor/setAbsThick 10. cm
#
/calor/setGapMat Air
/calor/setGapThick 0. cm
#
/calor/setSizeYZ 10. cm
#
/calor/update
#
/calor/setField 5 tesla
#
/vis~/clear/scene
/vis~/clear/view
/vis~/draw/current
+22
View File
@@ -0,0 +1,22 @@
#
# Macro file for the initialization phase of "exampleN03.cc"
#
# Sets some default verbose
# and initializes the graphic.
#
/control/verbose 2
/control/saveHistory
/run/verbose 2
#
/run/particle/dumpCutValues
#
# Edit the next line(s) to choose another graphic system
#
#/vis~/create_view/new_graphics_system DAWNFILE
/vis~/create_view/new_graphics_system OGLIX
/vis~/draw/current
/vis~/show/view
#
# for drawing the tracks
# if too many tracks cause core dump => storeTrajectory 0
/tracking/storeTrajectory 1
+19
View File
@@ -0,0 +1,19 @@
# $Id: run1.mac,v 2.2 1998/10/30 12:30:16 maire Exp $
#
# Macro file for "exampleN03.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/energy 300 MeV
/run/beamOn 3
+27
View File
@@ -0,0 +1,27 @@
# $Id: run2.mac,v 2.2 1998/10/30 12:30:17 maire Exp $
#
# Macro file of "exampleN03.cc"
#
# (in iteractive it must be executed after initialization)
# (otherwise type: /control/execute ../prerunN03.mac)
# (graphic needed: OpenGL or Mesa)
#
#
# electron 30 MeV to the direction (1.,0.,0.)
# 1 event
#
/run/beamOn 1
#
# shoot randomly 20 events
#
/gun/random on
/run/beamOn 20
#
# activate/inactivate physic processes
#
/process/list
/process/inactivate eBrem
#
/run/beamOn 20
#
+68
View File
@@ -0,0 +1,68 @@
// 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: ExN03CalorHit.cc,v 1.1 1998/10/09 14:55:09 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03CalorHit.hh"
G4Allocator<ExN03CalorHit> ExN03CalorHitAllocator;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03CalorHit::ExN03CalorHit()
{
EdepAbs = 0.; TrackLengthAbs = 0.;
EdepGap = 0.; TrackLengthGap = 0.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03CalorHit::~ExN03CalorHit()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03CalorHit::ExN03CalorHit(const ExN03CalorHit& right)
{
EdepAbs = right.EdepAbs; TrackLengthAbs = right.TrackLengthAbs;
EdepGap = right.EdepGap; TrackLengthGap = right.TrackLengthGap;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const ExN03CalorHit& ExN03CalorHit::operator=(const ExN03CalorHit& right)
{
EdepAbs = right.EdepAbs; TrackLengthAbs = right.TrackLengthAbs;
EdepGap = right.EdepGap; TrackLengthGap = right.TrackLengthGap;
return *this;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
int ExN03CalorHit::operator==(const ExN03CalorHit& right) const
{
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03CalorHit::Draw()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03CalorHit::Print()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,122 @@
// 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: ExN03CalorimeterSD.cc,v 1.1 1998/10/09 14:55:09 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03CalorimeterSD.hh"
#include "ExN03CalorHit.hh"
#include "ExN03DetectorConstruction.hh"
#include "G4VPhysicalVolume.hh"
#include "G4Step.hh"
#include "G4VTouchable.hh"
#include "G4TouchableHistory.hh"
#include "G4SDManager.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03CalorimeterSD::ExN03CalorimeterSD(G4String name,
ExN03DetectorConstruction* det)
:G4VSensitiveDetector(name),Detector(det)
{
collectionName.insert("CalCollection");
HitID = new G4int[500];
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03CalorimeterSD::~ExN03CalorimeterSD()
{
delete [] HitID;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03CalorimeterSD::Initialize(G4HCofThisEvent*HCE)
{
CalCollection = new ExN03CalorHitsCollection
(SensitiveDetectorName,collectionName[0]);
for (G4int j=0;j<Detector->GetNbOfLayers();j++) {HitID[j] = -1;};
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool ExN03CalorimeterSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist)
{
G4double edep = aStep->GetTotalEnergyDeposit();
G4double stepl = 0.;
if (aStep->GetTrack()->GetDefinition()->GetPDGCharge() != 0.)
stepl = aStep->GetStepLength();
if ((edep==0.)&&(stepl==0.)) return false;
G4TouchableHistory* theTouchable
= (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
G4VPhysicalVolume* physVol = theTouchable->GetVolume();
//theTouchable->MoveUpHistory();
G4int LayerNumber = theTouchable->GetReplicaNumber(1);
if (HitID[LayerNumber]==-1)
{
ExN03CalorHit* calHit = new ExN03CalorHit();
if (physVol == Detector->GetAbsorber()) calHit->AddAbs(edep,stepl);
if (physVol == Detector->GetGap ()) calHit->AddGap(edep,stepl);
HitID[LayerNumber] = CalCollection->insert(calHit) - 1;
if (verboseLevel>0)
G4cout << " New Calorimeter Hit on layer: " << LayerNumber << endl;
}
else
{
if (physVol == Detector->GetAbsorber())
(*CalCollection)[HitID[LayerNumber]]->AddAbs(edep,stepl);
if (physVol == Detector->GetGap())
(*CalCollection)[HitID[LayerNumber]]->AddGap(edep,stepl);
if (verboseLevel>0)
G4cout << " Energy added to Layer: " << LayerNumber << endl;
}
return true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03CalorimeterSD::EndOfEvent(G4HCofThisEvent* HCE)
{
static G4int HCID = -1;
if(HCID<0)
{ HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]); }
HCE->AddHitsCollection(HCID,CalCollection);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03CalorimeterSD::clear()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03CalorimeterSD::DrawAll()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03CalorimeterSD::PrintAll()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,464 @@
// 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: ExN03DetectorConstruction.cc,v 2.5 1998/10/09 15:53:49 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03DetectorConstruction.hh"
#include "ExN03DetectorMessenger.hh"
#include "ExN03CalorimeterSD.hh"
#include "G4Material.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4PVReplica.hh"
#include "G4UniformMagField.hh"
#include "G4FieldManager.hh"
#include "G4TransportationManager.hh"
#include "G4SDManager.hh"
#include "G4RunManager.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03DetectorConstruction::ExN03DetectorConstruction()
:solidWorld(NULL),logicWorld(NULL),physiWorld(NULL),
solidCalor(NULL),logicCalor(NULL),physiCalor(NULL),
solidLayer(NULL),logicLayer(NULL),physiLayer(NULL),
solidAbsorber(NULL),logicAbsorber(NULL),physiAbsorber(NULL),
solidGap (NULL),logicGap (NULL),physiGap (NULL),
AbsorberMaterial(NULL),GapMaterial(NULL),defaultMaterial(NULL),
magField(NULL),calorimeterSD(NULL)
{
// default parameter values of the calorimeter
AbsorberThickness = 10.*mm;
GapThickness = 5.*mm;
NbOfLayers = 10;
CalorSizeYZ = 10.*cm;
// create commands for interactive definition of the calorimeter
detectorMessenger = new ExN03DetectorMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03DetectorConstruction::~ExN03DetectorConstruction()
{ delete detectorMessenger;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VPhysicalVolume* ExN03DetectorConstruction::Construct()
{
DefineMaterials();
return ConstructCalorimeter();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorConstruction::DefineMaterials()
{
//This function illustrates the possible ways to define materials
G4String name, symbol; //a=mass of a mole;
G4double a, z, density; //z=mean number of protons;
G4int iz, n; //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* H = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
a = 12.01*g/mole;
G4Element* C = new G4Element(name="Carbon" ,symbol="C" , z= 6., a);
a = 14.01*g/mole;
G4Element* N = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
a = 16.00*g/mole;
G4Element* O = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
a = 28.09*g/mole;
G4Element* Si = new G4Element(name="Silicon",symbol="Si" , z= 14., a);
a = 55.85*g/mole;
G4Element* Fe = new G4Element(name="Iron" ,symbol="Fe", z=26., a);
//
// define an Element from isotopes, by relative abundance
//
G4Isotope* U5 = new G4Isotope(name="U235", iz=92, n=235, a=235.01*g/mole);
G4Isotope* U8 = new G4Isotope(name="U238", iz=92, n=238, a=238.03*g/mole);
G4Element* U = new G4Element(name="enriched Uranium", symbol="U", ncomponents=2);
U->AddIsotope(U5, abundance= 90.*perCent);
U->AddIsotope(U8, abundance= 10.*perCent);
//
// define simple materials
//
density = 2.700*g/cm3;
a = 26.98*g/mole;
G4Material* Al = new G4Material(name="Aluminium", z=13., a, density);
density = 1.390*g/cm3;
a = 39.95*g/mole;
G4Material* lAr = new G4Material(name="liquidArgon", z=18., a, density);
density = 8.960*g/cm3;
a = 63.55*g/mole;
G4Material* Cu = new G4Material(name="Copper" , z=29., 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(H, natoms=2);
H2O->AddElement(O, natoms=1);
density = 1.032*g/cm3;
G4Material* Sci = new G4Material(name="Scintillator", density, ncomponents=2);
Sci->AddElement(C, natoms=9);
Sci->AddElement(H, natoms=10);
density = 2.200*g/cm3;
G4Material* SiO2 = new G4Material(name="quartz", density, ncomponents=2);
SiO2->AddElement(Si, natoms=1);
SiO2->AddElement(O , natoms=2);
//
// define a material from elements. case 2: mixture by fractional mass
//
density = 1.290*mg/cm3;
G4Material* Air = new G4Material(name="Air" , density, ncomponents=2);
Air->AddElement(N, fractionmass=0.7);
Air->AddElement(O, fractionmass=0.3);
//
// define a material from elements and/or others materials (mixture of mixtures)
//
density = 0.200*g/cm3;
G4Material* Aerog = new G4Material(name="Aerogel", density, ncomponents=3);
Aerog->AddMaterial(SiO2, fractionmass=62.5*perCent);
Aerog->AddMaterial(H2O , fractionmass=37.4*perCent);
Aerog->AddElement (C , fractionmass= 0.1*perCent);
//
// examples of gas in non STP conditions
//
density = 27.*mg/cm3;
pressure = 50.*atmosphere;
temperature = 325.*kelvin;
G4Material* CO2 = new G4Material(name="CarbonicGas", density, ncomponents=2,
kStateGas,temperature,pressure);
CO2->AddElement(C, natoms=1);
CO2->AddElement(O, natoms=2);
density = 0.3*mg/cm3;
pressure = 2.*atmosphere;
temperature = 500.*kelvin;
G4Material* steam = new G4Material(name="WaterSteam", density, ncomponents=1,
kStateGas,temperature,pressure);
steam->AddMaterial(H2O, fractionmass=1.);
//
// examples of vacuum
//
density = universe_mean_density; //from PhysicalConstants.h
pressure = 3.e-18*pascal;
temperature = 2.73*kelvin;
new G4Material(name="Galactic", z=1., a=1.01*g/mole, density,
kStateGas,temperature,pressure);
density = 1.e-5*g/cm3;
pressure = 2.e-2*bar;
temperature = STP_Temperature; //from PhysicalConstants.h
G4Material* beam = new G4Material(name="Beam", density, ncomponents=1,
kStateGas,temperature,pressure);
beam->AddMaterial(Air, fractionmass=1.);
G4cout << *(G4Material::GetMaterialTable()) << endl;
//default materials of the calorimeter
AbsorberMaterial = Pb;
GapMaterial = lAr;
defaultMaterial = Air;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VPhysicalVolume* ExN03DetectorConstruction::ConstructCalorimeter()
{
// complete the Calor parameters definition
ComputeCalorParameters();
//
// World
//
solidWorld = new G4Box("World", //its name
WorldSizeX/2,WorldSizeYZ/2,WorldSizeYZ/2); //its size
logicWorld = new G4LogicalVolume(solidWorld, //its solid
defaultMaterial, //its material
"World"); //its name
physiWorld = new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
"World", //its name
logicWorld, //its logical volume
NULL, //its mother volume
false, //no boolean operation
0); //copy number
//
// Calorimeter
//
solidCalor=NULL; logicCalor=NULL; physiCalor=NULL;
solidLayer=NULL; logicLayer=NULL; physiLayer=NULL;
if (CalorThickness > 0.)
{ solidCalor = new G4Box("Calorimeter", //its name
CalorThickness/2,CalorSizeYZ/2,CalorSizeYZ/2);//size
logicCalor = new G4LogicalVolume(solidCalor, //its solid
defaultMaterial, //its material
"Calorimeter"); //its name
physiCalor = new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
"Calorimeter", //its name
logicCalor, //its logical volume
physiWorld, //its mother volume
false, //no boolean operation
0); //copy number
//
// Layer
//
solidLayer = new G4Box("Layer", //its name
LayerThickness/2,CalorSizeYZ/2,CalorSizeYZ/2); //size
logicLayer = new G4LogicalVolume(solidLayer, //its solid
defaultMaterial, //its material
"Layer"); //its name
if (NbOfLayers > 1)
physiLayer = new G4PVReplica("Layer", //its name
logicLayer, //its logical volume
physiCalor, //its mother
kXAxis, //axis of replication
NbOfLayers, //number of replica
LayerThickness); //witdth of replica
else
physiLayer = new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
"Layer", //its name
logicLayer, //its logical volume
physiCalor, //its mother volume
false, //no boolean operation
0); //copy number
}
//
// Absorber
//
solidAbsorber=NULL; logicAbsorber=NULL; physiAbsorber=NULL;
if (AbsorberThickness > 0.)
{ solidAbsorber = new G4Box("Absorber", //its name
AbsorberThickness/2,CalorSizeYZ/2,CalorSizeYZ/2);
logicAbsorber = new G4LogicalVolume(solidAbsorber, //its solid
AbsorberMaterial, //its material
"Absorber"); //its name
physiAbsorber = new G4PVPlacement(0, //no rotation
G4ThreeVector(-GapThickness/2,0.,0.), //its position
"Absorber", //its name
logicAbsorber, //its logical volume
physiLayer, //its mother
false, //no boulean operat
0); //copy number
}
//
// Gap
//
solidGap=NULL; logicGap=NULL; physiGap=NULL;
if (GapThickness > 0.)
{ solidGap = new G4Box("Gap",
GapThickness/2,CalorSizeYZ/2,CalorSizeYZ/2);
logicGap = new G4LogicalVolume(solidGap,
GapMaterial,
"Gap");
physiGap = new G4PVPlacement(0, //no rotation
G4ThreeVector(AbsorberThickness/2,0.,0.), //its position
"Gap", //its name
logicGap, //its logical volume
physiLayer, //its mother
false, //no boulean operat
0); //copy number
}
//
// Sensitive Detectors: Absorber and Gap
//
G4SDManager* SDman = G4SDManager::GetSDMpointer();
if(!calorimeterSD)
{
calorimeterSD = new ExN03CalorimeterSD("CalorSD",this);
SDman->AddNewDetector( calorimeterSD );
}
if (logicAbsorber)
logicAbsorber->SetSensitiveDetector(calorimeterSD);
if (logicGap)
logicGap ->SetSensitiveDetector(calorimeterSD);
//
// Visualization attributes
//
logicWorld->SetVisAttributes (G4VisAttributes::Invisible);
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
simpleBoxVisAtt->SetVisibility(true);
logicCalor->SetVisAttributes(simpleBoxVisAtt);
//
//always return the physical World
//
PrintCalorParameters();
return physiWorld;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorConstruction::PrintCalorParameters()
{
G4cout << "\n The calorimeter is made of " << NbOfLayers << " layers of: [ "
<< AbsorberThickness/mm << "mm of " << AbsorberMaterial->GetName()
<< " + "
<< GapThickness/mm << "mm of " << GapMaterial->GetName() << " ] "
<< endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
{
// search the material by its name
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
if (pttoMaterial)
{AbsorberMaterial = pttoMaterial;
logicAbsorber->SetMaterial(pttoMaterial);
PrintCalorParameters();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorConstruction::SetGapMaterial(G4String materialChoice)
{
// search the material by its name
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
if (pttoMaterial)
{GapMaterial = pttoMaterial;
logicGap->SetMaterial(pttoMaterial);
PrintCalorParameters();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorConstruction::SetAbsorberThickness(G4double val)
{
// change Absorber thickness and recompute the calorimeter parameters
AbsorberThickness = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorConstruction::SetGapThickness(G4double val)
{
// change Gap thickness and recompute the calorimeter parameters
GapThickness = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorConstruction::SetCalorSizeYZ(G4double val)
{
// change the transverse size and recompute the calorimeter parameters
CalorSizeYZ = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorConstruction::SetNbOfLayers(G4int val)
{
NbOfLayers = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorConstruction::SetMagField(G4double fieldValue)
{
//apply a global uniform magnetic field along Z axis
G4FieldManager* fieldMgr
= G4TransportationManager::GetTransportationManager()->GetFieldManager();
if(magField) delete magField; //delete the existing magn field
if(fieldValue!=0.) // create a new one if non nul
{ magField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
fieldMgr->SetDetectorField(magField);
fieldMgr->CreateChordFinder(magField);
} else {
magField = NULL;
fieldMgr->SetDetectorField(magField);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorConstruction::UpdateGeometry()
{
G4RunManager::GetRunManager()->DefineWorldVolume(ConstructCalorimeter());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,129 @@
// 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: ExN03DetectorMessenger.cc,v 2.3 1998/10/09 15:53:49 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03DetectorMessenger.hh"
#include "ExN03DetectorConstruction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithoutParameter.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03DetectorMessenger::ExN03DetectorMessenger(ExN03DetectorConstruction * ExN03Det)
:ExN03Detector(ExN03Det)
{
ExN03detDir = new G4UIdirectory("/calor/");
ExN03detDir->SetGuidance("ExN03 detector control.");
AbsMaterCmd = new G4UIcmdWithAString("/calor/setAbsMat",this);
AbsMaterCmd->SetGuidance("Select Material of the Absorber.");
AbsMaterCmd->SetParameterName("choice",true);
AbsMaterCmd->SetCandidates("Water Aluminium Copper Lead ");
AbsMaterCmd->SetDefaultValue("Lead");
AbsMaterCmd->AvailableForStates(Idle);
GapMaterCmd = new G4UIcmdWithAString("/calor/setGapMat",this);
GapMaterCmd->SetGuidance("Select Material of the Gap.");
GapMaterCmd->SetParameterName("choice",true);
GapMaterCmd->SetCandidates("Galactic Air CarbonicGas Aerogel Scintillator liquidArgon");
GapMaterCmd->SetDefaultValue("liquidArgon");
GapMaterCmd->AvailableForStates(Idle);
AbsThickCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsThick",this);
AbsThickCmd->SetGuidance("Set Thickness of the Absorber");
AbsThickCmd->SetParameterName("Size",false,false);
AbsThickCmd->SetDefaultUnit("mm");
AbsThickCmd->SetRange("Size>=0.");
AbsThickCmd->AvailableForStates(Idle);
GapThickCmd = new G4UIcmdWithADoubleAndUnit("/calor/setGapThick",this);
GapThickCmd->SetGuidance("Set Thickness of the Gap");
GapThickCmd->SetParameterName("Size",false,false);
GapThickCmd->SetDefaultUnit("mm");
GapThickCmd->SetRange("Size>=0.");
GapThickCmd->AvailableForStates(Idle);
SizeYZCmd = new G4UIcmdWithADoubleAndUnit("/calor/setSizeYZ",this);
SizeYZCmd->SetGuidance("Set tranverse size of the calorimeter");
SizeYZCmd->SetParameterName("Size",false,false);
SizeYZCmd->SetDefaultUnit("mm");
SizeYZCmd->SetRange("Size>0.");
SizeYZCmd->AvailableForStates(Idle);
NbLayersCmd = new G4UIcmdWithAnInteger("/calor/setNbOfLayers",this);
NbLayersCmd->SetGuidance("Set number of layers.");
NbLayersCmd->SetParameterName("NbLayers",false);
NbLayersCmd->SetRange("NbLayers>0 && NbLayers<500");
NbLayersCmd->AvailableForStates(Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/calor/update",this);
UpdateCmd->SetGuidance("Update calorimeter geometry.");
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
UpdateCmd->AvailableForStates(Idle);
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/calor/setField",this);
MagFieldCmd->SetGuidance("Define magnetic field.");
MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
MagFieldCmd->SetParameterName("Bz",false,false);
MagFieldCmd->SetDefaultUnit("tesla");
MagFieldCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03DetectorMessenger::~ExN03DetectorMessenger()
{
delete NbLayersCmd;
delete AbsMaterCmd; delete GapMaterCmd;
delete AbsThickCmd; delete GapThickCmd;
delete SizeYZCmd; delete UpdateCmd;
delete MagFieldCmd;
delete ExN03detDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if( command == AbsMaterCmd )
{ ExN03Detector->SetAbsorberMaterial(newValue);}
if( command == GapMaterCmd )
{ ExN03Detector->SetGapMaterial(newValue);}
if( command == AbsThickCmd )
{ ExN03Detector->SetAbsorberThickness(AbsThickCmd->GetNewDoubleValue(newValue));}
if( command == GapThickCmd )
{ ExN03Detector->SetGapThickness(GapThickCmd->GetNewDoubleValue(newValue));}
if( command == SizeYZCmd )
{ ExN03Detector->SetCalorSizeYZ(SizeYZCmd->GetNewDoubleValue(newValue));}
if( command == NbLayersCmd )
{ ExN03Detector->SetNbOfLayers(NbLayersCmd->GetNewIntValue(newValue));}
if( command == UpdateCmd )
{ ExN03Detector->UpdateGeometry(); }
if( command == MagFieldCmd )
{ ExN03Detector->SetMagField(MagFieldCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+115
View File
@@ -0,0 +1,115 @@
// 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: ExN03EventAction.cc,v 2.5 1998/10/30 14:41:00 maire Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03EventAction.hh"
#include "ExN03CalorHit.hh"
#include "ExN03EventActionMessenger.hh"
#include <rw/tvordvec.h>
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4HCofThisEvent.hh"
#include "G4VHitsCollection.hh"
#include "G4TrajectoryContainer.hh"
#include "G4Trajectory.hh"
#include "G4VVisManager.hh"
#include "G4SDManager.hh"
#include "G4UImanager.hh"
#include "G4ios.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03EventAction::ExN03EventAction()
:calorimeterCollID(-1),drawFlag("all"),eventMessenger(NULL)
{
eventMessenger = new ExN03EventActionMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03EventAction::~ExN03EventAction()
{
delete eventMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03EventAction::BeginOfEventAction()
{ if(calorimeterCollID==-1)
{
G4SDManager * SDman = G4SDManager::GetSDMpointer();
calorimeterCollID = SDman->GetCollectionID("CalCollection");
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03EventAction::EndOfEventAction()
{
const G4Event* evt = fpEventManager->GetConstCurrentEvent();
G4cout << ">>> Event " << evt->GetEventID() << endl;
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
ExN03CalorHitsCollection* CHC = NULL;
if (HCE)
CHC = (ExN03CalorHitsCollection*)(HCE->GetHC(calorimeterCollID));
if (CHC)
{
int n_hit = CHC->entries();
G4cout << " " << n_hit
<< " hits are stored in ExN03CalorHitsCollection." << endl;
G4double totEAbs=0, totLAbs=0, totEGap=0, totLGap=0;
for (int i=0;i<n_hit;i++)
{ totEAbs += (*CHC)[i]->GetEdepAbs();
totLAbs += (*CHC)[i]->GetTrakAbs();
totEGap += (*CHC)[i]->GetEdepGap();
totLGap += (*CHC)[i]->GetTrakGap();
}
G4cout
<< " Absorber: total energy: " << setw(7) << G4BestUnit(totEAbs,"Energy")
<< " total track length: " << setw(7) << G4BestUnit(totLAbs,"Length")
<< endl
<< " Gap: total energy: " << setw(7) << G4BestUnit(totEGap,"Energy")
<< " total track length: " << setw(7) << G4BestUnit(totLGap,"Length")
<< endl;
}
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
G4int n_trajectories = 0;
if(trajectoryContainer)
{ n_trajectories = trajectoryContainer->entries(); }
G4cout << " " << n_trajectories
<< " trajectories stored in this event." << endl;
if(G4VVisManager::GetConcreteInstance())
{
for(G4int i=0; i<n_trajectories; i++)
{ G4Trajectory* trj = (*(evt->GetTrajectoryContainer()))[i];
if (drawFlag == "all") trj->DrawTrajectory(50);
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
trj->DrawTrajectory(50);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,52 @@
// 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: ExN03EventActionMessenger.cc,v 1.1 1998/10/09 14:55:10 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03EventActionMessenger.hh"
#include "ExN03EventAction.hh"
#include "G4UIcmdWithAString.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03EventActionMessenger::ExN03EventActionMessenger(ExN03EventAction* EvAct)
:eventAction(EvAct)
{
DrawCmd = new G4UIcmdWithAString("/event/drawTracks",this);
DrawCmd->SetGuidance("Draw the tracks in the event");
DrawCmd->SetGuidance(" Choice : none, charged(default), all");
DrawCmd->SetParameterName("choice",true);
DrawCmd->SetDefaultValue("charged");
DrawCmd->SetCandidates("none charged all");
DrawCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03EventActionMessenger::~ExN03EventActionMessenger()
{
delete DrawCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03EventActionMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
{
if(command == DrawCmd)
{eventAction->SetDrawFlag(newValue);}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+237
View File
@@ -0,0 +1,237 @@
// 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: ExN03PhysicsList.cc,v 2.5 1998/10/09 15:53:49 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03PhysicsList.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03PhysicsList::ExN03PhysicsList(): G4VUserPhysicsList()
{
defaultCutValue = 2.0*mm;
SetVerboseLevel(1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03PhysicsList::~ExN03PhysicsList()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PhysicsList::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.
ConstructBosons();
ConstructLeptons();
ConstructMesons();
ConstructBarions();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PhysicsList::ConstructBosons()
{
// pseudo-particles
G4Geantino::GeantinoDefinition();
G4ChargedGeantino::ChargedGeantinoDefinition();
// gamma
G4Gamma::GammaDefinition();
// optical photon
G4OpticalPhoton::OpticalPhotonDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PhysicsList::ConstructLeptons()
{
// leptons
G4Electron::ElectronDefinition();
G4Positron::PositronDefinition();
G4MuonPlus::MuonPlusDefinition();
G4MuonMinus::MuonMinusDefinition();
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PhysicsList::ConstructMesons()
{
// mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4PionZero::PionZeroDefinition();
G4Eta::EtaDefinition();
G4EtaPrime::EtaPrimeDefinition();
G4RhoZero::RhoZeroDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
G4KaonZero::KaonZeroDefinition();
G4AntiKaonZero::AntiKaonZeroDefinition();
G4KaonZeroLong::KaonZeroLongDefinition();
G4KaonZeroShort::KaonZeroShortDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PhysicsList::ConstructBarions()
{
// barions
G4Proton::ProtonDefinition();
G4AntiProton::AntiProtonDefinition();
G4Neutron::NeutronDefinition();
G4AntiNeutron::AntiNeutronDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PhysicsList::ConstructProcess()
{
AddTransportation();
ConstructEM();
ConstructGeneral();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PhysicsList::ConstructEM()
{
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
//gamma
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
pmanager->AddDiscreteProcess(new G4ComptonScattering());
pmanager->AddDiscreteProcess(new G4GammaConversion());
} else if (particleName == "e-") {
//electron
pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
pmanager->AddProcess(new G4eIonisation(), -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung(), -1,-1,3);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
pmanager->AddProcess(new G4eIonisation(), -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung(), -1,-1,3);
pmanager->AddProcess(new G4eplusAnnihilation(), 0,-1,4);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
pmanager->AddProcess(new G4MuIonisation(), -1, 2,2);
pmanager->AddProcess(new G4MuBremsstrahlung(), -1,-1,3);
pmanager->AddProcess(new G4MuPairProduction(), -1,-1,4);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(), -1,2,2);
}
}
}
#include "G4Decay.hh"
void ExN03PhysicsList::ConstructGeneral()
{
// Add Decay Process
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (theDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(theDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PhysicsList::SetCuts(G4double cut)
{
if (verboseLevel >0){
G4cout << "ExN03PhysicsList::SetCuts:";
G4cout << "CutLength : " << cut/mm << " (mm)" << endl;
}
// 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");
SetCutValueForOthers(cut);
if (verboseLevel>1) DumpCutValuesTable();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,79 @@
// 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: ExN03PrimaryGeneratorAction.cc,v 2.3 1998/10/09 15:53:49 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03PrimaryGeneratorAction.hh"
#include "ExN03DetectorConstruction.hh"
#include "ExN03PrimaryGeneratorMessenger.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03PrimaryGeneratorAction::ExN03PrimaryGeneratorAction(
ExN03DetectorConstruction* ExN03DC)
:ExN03Detector(ExN03DC),rndmFlag("off")
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
//create a messenger for this class
gunMessenger = new ExN03PrimaryGeneratorMessenger(this);
// default particle kinematic
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4String particleName;
G4ParticleDefinition* particle
= particleTable->FindParticle(particleName="e-");
particleGun->SetParticleDefinition(particle);
particleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
particleGun->SetParticleEnergy(30.*MeV);
G4double position = -0.5*(ExN03Detector->GetWorldSizeX());
particleGun->SetParticlePosition(G4ThreeVector(position,0.*cm,0.*cm));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03PrimaryGeneratorAction::~ExN03PrimaryGeneratorAction()
{
delete particleGun;
delete gunMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
//this function is called at the begining of event
//
G4double x0 = -0.5*(ExN03Detector->GetWorldSizeX());
G4double y0 = 0.*cm, z0 = 0.*cm;
if (rndmFlag == "on")
{y0 = (ExN03Detector->GetCalorSizeYZ())*(G4UniformRand()-0.5);
z0 = (ExN03Detector->GetCalorSizeYZ())*(G4UniformRand()-0.5);
}
particleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
particleGun->GeneratePrimaryVertex(anEvent);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,51 @@
// 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: ExN03PrimaryGeneratorMessenger.cc,v 2.3 1998/10/09 15:53:49 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03PrimaryGeneratorMessenger.hh"
#include "ExN03PrimaryGeneratorAction.hh"
#include "G4UIcmdWithAString.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03PrimaryGeneratorMessenger::ExN03PrimaryGeneratorMessenger(ExN03PrimaryGeneratorAction* ExN03Gun)
:ExN03Action(ExN03Gun)
{
RndmCmd = new G4UIcmdWithAString("/gun/random",this);
RndmCmd->SetGuidance("Shoot randomly the incident particle.");
RndmCmd->SetGuidance(" Choice : on, off(default)");
RndmCmd->SetParameterName("choice",true);
RndmCmd->SetDefaultValue("off");
RndmCmd->SetCandidates("on off");
RndmCmd->AvailableForStates(PreInit,Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03PrimaryGeneratorMessenger::~ExN03PrimaryGeneratorMessenger()
{
delete RndmCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PrimaryGeneratorMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
{
if( command == RndmCmd )
{ ExN03Action->SetRndmFlag(newValue);}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+59
View File
@@ -0,0 +1,59 @@
// 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: ExN03RunAction.cc,v 2.7 1998/10/30 14:41:01 maire Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03RunAction.hh"
#include "G4Run.hh"
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03RunAction::ExN03RunAction()
{
runIDcounter = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03RunAction::~ExN03RunAction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03RunAction::BeginOfRunAction(G4Run* aRun)
{
aRun->SetRunID(runIDcounter++);
G4cout << "### Run " << aRun->GetRunID() << " start." << endl;
if (G4VVisManager::GetConcreteInstance())
{
G4UImanager* UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/vis~/clear/view");
UI->ApplyCommand("/vis~/draw/current");
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03RunAction::EndOfRunAction(G4Run* aRun)
{
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis~/show/view");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -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: ExN03SteppingAction.cc,v 2.2 1998/10/09 15:53:49 japost Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "ExN03SteppingAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03SteppingAction::ExN03SteppingAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03SteppingAction::~ExN03SteppingAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03SteppingAction::UserSteppingAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+141
View File
@@ -0,0 +1,141 @@
// 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: ExN03VisManager.cc,v 2.9 1998/11/30 10:21:29 allison Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// John Allison 24th January 1998.
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifdef G4VIS_USE
#include "ExN03VisManager.hh"
// Supported drivers...
#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"
#endif
#ifdef G4VIS_USE_OPENGLX
#include "G4OpenGLImmediateX.hh"
#include "G4OpenGLStoredX.hh"
#endif
#ifdef G4VIS_USE_OPENGLWIN32
#include "G4OpenGLImmediateWin32.hh"
#include "G4OpenGLStoredWin32.hh"
#endif
#ifdef G4VIS_USE_OPENGLXM
#include "G4OpenGLImmediateXm.hh"
#include "G4OpenGLStoredXm.hh"
#endif
#ifdef G4VIS_USE_OIX
#include "G4OpenInventorX.hh"
#endif
#ifdef G4VIS_USE_OIWIN32
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_RAYX
#include "G4RayX.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....
ExN03VisManager::ExN03VisManager () {}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03VisManager::RegisterGraphicsSystems () {
#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);
#endif
#ifdef G4VIS_USE_OPENGLX
RegisterGraphicsSystem (new G4OpenGLImmediateX);
RegisterGraphicsSystem (new G4OpenGLStoredX);
#endif
#ifdef G4VIS_USE_OPENGLWIN32
RegisterGraphicsSystem (new G4OpenGLImmediateWin32);
RegisterGraphicsSystem (new G4OpenGLStoredWin32);
#endif
#ifdef G4VIS_USE_OPENGLXM
RegisterGraphicsSystem (new G4OpenGLImmediateXm);
RegisterGraphicsSystem (new G4OpenGLStoredXm);
#endif
#ifdef G4VIS_USE_OIX
RegisterGraphicsSystem (new G4OpenInventorX);
#endif
#ifdef G4VIS_USE_OIWIN32
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);
#endif
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."
<< endl;
PrintAvailableGraphicsSystems ();
}
}
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+17
View File
@@ -0,0 +1,17 @@
# $Id: GNUmakefile,v 2.1 1998/07/02 15:26:54 gunter Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleN04
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
+32
View File
@@ -0,0 +1,32 @@
$Id: History,v 2.4 1998/11/21 16:55:06 allison Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example N04 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 *
----------------------------------------------------------
21st November 1998 John Allison
- Made ExN04Field compatible with G4Field.
9 Oct, 1998 M.Asai
- A bug fixed in ExN04DetectorParameterDef.icc.
26th August 1998 John Allison.
- /vis/Draw/current -> /vis/draw/current in ExN04EventAction.cc.
9th August 1998 John Allison.
- Changed G4UIterminal to G4UIGAG.
April 09, 98 G. Cosmo
- Created.
+10
View File
@@ -0,0 +1,10 @@
$Id: README,v 2.0 1998/07/02 14:08:56 gunter Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
ExampleN04
----------
+5
View File
@@ -0,0 +1,5 @@
/mydet/generator particleGun
/mydet/reqmuon 1
/mydet/isomuon 1
/run/beamOn 10
exit
+100
View File
@@ -0,0 +1,100 @@
****************************************************************
****************************************************************
** **
** G4MuPairProduction : **
** cross section/energy loss is calculated using **
** the accurate cross section formula of R.Kokoulin, **
** ( building the tables takes a lot of time, **
** PLEASE BE PATIENT ! ) **
** sampling of the energy of the pair is generated **
** according to the sampling tables. **
** **
****************************************************************
****************************************************************
****************************************************************
****************************************************************
** **
** G4MuPairProduction : **
** cross section/energy loss is calculated using **
** the accurate cross section formula of R.Kokoulin, **
** ( building the tables takes a lot of time, **
** PLEASE BE PATIENT ! ) **
** sampling of the energy of the pair is generated **
** according to the sampling tables. **
** **
****************************************************************
****************************************************************
ExN04PhysicsList::SetCuts:CutLength : 1 (mm)
Idle> Idle> Idle> Idle> Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 1 isolated muon found.
>>> Event 0
5 hits are stored in ExN04TrackerHitsCollection.
4 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.277324 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 1 isolated muon found.
>>> Event 1
5 hits are stored in ExN04TrackerHitsCollection.
4 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.598772 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 1 isolated muon found.
>>> Event 2
24 hits are stored in ExN04TrackerHitsCollection.
6 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.768435 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 1 isolated muon found.
>>> Event 3
5 hits are stored in ExN04TrackerHitsCollection.
4 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.260963 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 1 isolated muon found.
>>> Event 4
5 hits are stored in ExN04TrackerHitsCollection.
4 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.362545 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 1 isolated muon found.
>>> Event 5
32 hits are stored in ExN04TrackerHitsCollection.
4 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.333041 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 1 isolated muon found.
>>> Event 6
5 hits are stored in ExN04TrackerHitsCollection.
6 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.327284 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 1 isolated muon found.
>>> Event 7
20 hits are stored in ExN04TrackerHitsCollection.
4 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.464026 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 1 isolated muon found.
>>> Event 8
15 hits are stored in ExN04TrackerHitsCollection.
4 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.322904 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 1 isolated muon found.
>>> Event 9
8 hits are stored in ExN04TrackerHitsCollection.
5 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.400399 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Idle>
+71
View File
@@ -0,0 +1,71 @@
// 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: exampleN04.cc,v 2.7 1998/12/08 16:37:31 allison Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleN04
//
// For information related to this code contact:
// CERN, IT Division, ASD Group
// --------------------------------------------------------------
// Comments
//
//
// --------------------------------------------------------------
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "ExN04DetectorConstruction.hh"
#include "ExN04PhysicsList.hh"
#include "ExN04PrimaryGeneratorAction.hh"
#include "ExN04EventAction.hh"
#include "ExN04StackingAction.hh"
#include "ExN04TrackingAction.hh"
#include "ExN04SteppingAction.hh"
int main(int argc,char** argv)
{
G4RunManager* runManager = new G4RunManager;
runManager->SetUserInitialization(new ExN04DetectorConstruction);
runManager->SetUserInitialization(new ExN04PhysicsList);
runManager->Initialize();
runManager->SetUserAction(new ExN04PrimaryGeneratorAction);
runManager->SetUserAction(new ExN04EventAction);
runManager->SetUserAction(new ExN04StackingAction);
runManager->SetUserAction(new ExN04TrackingAction);
runManager->SetUserAction(new ExN04SteppingAction);
if(argc==1)
{
// G4UIterminal is a (dumb) terminal.
G4UIsession* session = new G4UIterminal;
session->SessionStart();
delete session;
}
else
{
G4UImanager* UImanager = G4UImanager::GetUIpointer();
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
delete runManager;
return 0;
}
View File
+8
View File
@@ -0,0 +1,8 @@
#
/mydet/RoIangle 10 deg
/mydet/reqmuon 1
/mydet/isomuon 1
/run/beamOn 3
#
exit
+83
View File
@@ -0,0 +1,83 @@
ExN04PhysicsList::SetCuts:CutLength : 1 (mm)
conv: Total cross sections from a parametrisation(L.Urban). Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1.022 MeV to 100 GeV in 100 bins.
compt: Total cross sections from a parametrisation(L.Urban). Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 100 GeV in 100 bins.
phot: Total cross sections from a parametrisation(L.Urban). Good description from 10 KeV to 50 MeV for all Z
PhysicsTables from 10 keV to 50 MeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
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 100 TeV in 100 bins.
eBrem: Total cross sections from a parametrisation(L.Urban). 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 100 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.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 100 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
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 1000 PeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 100 eV to 100 TeV in 100 bins.
MuBrems: cross sections from R. Kokoulin
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1000 PeV in 100 bins.
MuPairProd: cross sections from R. Kokoulin
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1000 PeV in 50 bins.
Idle> #
Idle> Idle> Idle> Idle> Stage 0->1 : 1 hits found in the muon chamber.
Stage 1->2 : 0 isolated muon found.
++++++++ event aborted
>>> Event 0
437 hits are stored in ExN04TrackerHitsCollection.
2 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0.00794845 (GeV)
1 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 0 hits found in the muon chamber.
++++++++ event aborted
>>> Event 1
0 hits are stored in ExN04TrackerHitsCollection.
0 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0 (GeV)
0 hits are stored in ExN04MuonHitsCollection.
Stage 0->1 : 0 hits found in the muon chamber.
++++++++ event aborted
>>> Event 2
0 hits are stored in ExN04TrackerHitsCollection.
0 hits are stored in ExN04CalorimeterHitsCollection.
Total energy deposition in calorimeter : 0 (GeV)
0 hits are stored in ExN04MuonHitsCollection.
Idle> #
Idle>
@@ -0,0 +1,83 @@
#ifndef ExN04CalorimeterHit_h
#define ExN04CalorimeterHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
#include "G4LogicalVolume.hh"
#include "G4Transform3D.hh"
#include "G4RotationMatrix.hh"
class ExN04CalorimeterHit : public G4VHit
{
public:
ExN04CalorimeterHit();
ExN04CalorimeterHit(G4LogicalVolume* logVol,G4int z,G4int phi);
~ExN04CalorimeterHit();
ExN04CalorimeterHit(const ExN04CalorimeterHit &right);
const ExN04CalorimeterHit& operator=(const ExN04CalorimeterHit &right);
int operator==(const ExN04CalorimeterHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
void Draw();
void Print();
private:
G4int ZCellID;
G4int PhiCellID;
G4double edep;
G4ThreeVector pos;
G4RotationMatrix rot;
const G4LogicalVolume* pLogV;
public:
inline void SetCellID(G4int z,G4int phi)
{
ZCellID = z;
PhiCellID = phi;
}
inline G4int GetZ() { return ZCellID; }
inline G4int GetPhi() { return PhiCellID; }
inline void SetEdep(G4double de)
{ edep = de; }
inline void AddEdep(G4double de)
{ edep += de; }
inline G4double GetEdep()
{ return edep; }
inline void SetPos(G4ThreeVector xyz)
{ pos = xyz; }
inline G4ThreeVector GetPos()
{ return pos; }
inline void SetRot(G4RotationMatrix rmat)
{ rot = rmat; }
inline G4RotationMatrix GetRot()
{ return rot; }
inline const G4LogicalVolume * GetLogV()
{ return pLogV; }
};
typedef G4THitsCollection<ExN04CalorimeterHit> ExN04CalorimeterHitsCollection;
extern G4Allocator<ExN04CalorimeterHit> ExN04CalorimeterHitAllocator;
inline void* ExN04CalorimeterHit::operator new(size_t)
{
void *aHit;
aHit = (void *) ExN04CalorimeterHitAllocator.MallocSingle();
return aHit;
}
inline void ExN04CalorimeterHit::operator delete(void *aHit)
{
ExN04CalorimeterHitAllocator.FreeSingle((ExN04CalorimeterHit*) aHit);
}
#endif
@@ -0,0 +1,29 @@
#ifndef ExN04CalorimeterParametrisation_H
#define ExN04CalorimeterParametrisation_H 1
#include "globals.hh"
#include "G4VPVParameterisation.hh"
class G4VPhysicalVolume;
class G4Tubs;
class ExN04CalorimeterParametrisation : public G4VPVParameterisation
{
public:
ExN04CalorimeterParametrisation();
~ExN04CalorimeterParametrisation();
void ComputeTransformation
(const G4int copyNo,G4VPhysicalVolume *physVol) const;
void ComputeDimensions
(G4Tubs & calorimeterLayer, const G4int copyNo,
const G4VPhysicalVolume * physVol) const;
private:
#include "ExN04DetectorParameterDef.hh"
};
#endif
@@ -0,0 +1,20 @@
#ifndef ExN04CalorimeterROGeometry_h
#define ExN04CalorimeterROGeometry_h 1
#include "G4VReadOutGeometry.hh"
class ExN04CalorimeterROGeometry : public G4VReadOutGeometry
{
public:
ExN04CalorimeterROGeometry();
ExN04CalorimeterROGeometry(G4String);
~ExN04CalorimeterROGeometry();
private:
G4VPhysicalVolume* Build();
#include "ExN04DetectorParameterDef.hh"
};
#endif
@@ -0,0 +1,36 @@
#ifndef ExN04CalorimeterSD_h
#define ExN04CalorimeterSD_h 1
#include "G4VSensitiveDetector.hh"
#include "ExN04CalorimeterHit.hh"
class G4Step;
class G4HCofThisEvent;
class G4TouchableHistory;
class ExN04CalorimeterSD : public G4VSensitiveDetector
{
public:
ExN04CalorimeterSD(G4String name);
~ExN04CalorimeterSD();
void Initialize(G4HCofThisEvent*HCE);
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
void EndOfEvent(G4HCofThisEvent*HCE);
void clear();
void DrawAll();
void PrintAll();
private:
ExN04CalorimeterHitsCollection *CalCollection;
int CellID[20][48];
const int numberOfCellsInZ;
const int numberOfCellsInPhi;
};
#endif
@@ -0,0 +1,26 @@
#ifndef ExN04DetectorConstruction_h
#define ExN04DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
class G4VPhysicalVolume;
class ExN04DetectorConstruction : public G4VUserDetectorConstruction
{
public:
ExN04DetectorConstruction();
~ExN04DetectorConstruction();
public:
G4VPhysicalVolume* Construct();
private:
#include "ExN04DetectorParameterDef.hh"
};
#endif
@@ -0,0 +1,47 @@
G4double expHall_x;
G4double expHall_y;
G4double expHall_z;
G4double trkTubs_rmax;
G4double trkTubs_rmin;
G4double trkTubs_dz;
G4double trkTubs_sphi;
G4double trkTubs_dphi;
G4int notrkLayers;
G4double tracker_radius[5];
G4double tracker_thick;
G4double tracker_length[5];
G4double caloTubs_rmax;
G4double caloTubs_rmin;
G4double caloTubs_dz;
G4double caloTubs_sphi;
G4double caloTubs_dphi;
G4int nocaloLayers;
G4double absorber_thick;
G4double scinti_thick;
G4int segmentsinZ;
G4double caloRing_rmax;
G4double caloRing_rmin;
G4double caloRing_dz;
G4double caloRing_sphi;
G4double caloRing_dphi;
G4int segmentsinPhi;
G4double caloCell_rmax;
G4double caloCell_rmin;
G4double caloCell_dz;
G4double caloCell_sphi;
G4double caloCell_dphi;
G4int nomucounter;
G4double muBox_radius;
G4double muBox_width;
G4double muBox_thick;
G4double muBox_length;

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