View topic | Edit | WYSIWYGAttachPDF
r4 - 16 Apr 2010 - 08:44:39 - JMAlboSYou are here: TWiki >  NEXT Web  >  NextSoftware > SoftwareDetectorSimulation > SoftwareNexus > NexusUserGuide

NEXUS User's Guide

This guide assumes you have already a working installation of NEXUS. If this is not the case, please refer to NexusInstallation.

Getting started: running a simple example

Move to your NEXUS installation folder and type:

./nexus config/nexus_example1.config

On screen you should see text like this:

*************************************************************
 Geant4 version Name: geant4-09-02-patch-02    (28-August-2009)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************
[...]
### Starting Run 0.  #######################################

### Run finished.  #########################################

You just simulated a thousand electrons moving through gaseous Xenon at 10 bar pressure.

Let's have a look at the configuration file (config/nexus_example1.config). All lines have the same format:

GROUP param_name X param_value

where X is the type id of the parameter.

Data type Id
integer I
float (double) D
string S

The first group of lines in the file specifies the detector geometry used in the simulation run and its configuration:

### [GEOMETRY] ###################################

GEOMETRY geometry_name S CYLINDRIC_CHAMBER

# Internal dimensions of the chamber
GEOMETRY chamber_radius D  70. cm
GEOMETRY chamber_length D 140. cm

# Chamber thickness and material
GEOMETRY chamber_thickness D 1. cm
GEOMETRY chamber_material S copper

# Tracking material
GEOMETRY tracking_material S GXe
GEOMETRY GXe_pressure D 10. bar

The parameter geometry_name is mandatory: you'll find it in any NEXUS configuration file.

CYLINDRIC_CHAMBER is one of the geometries included in NEXUS. It requires the user to define additional configuration parameters such as dimensions or materials.

Analogously, the groups GENERATION and PHYSICS specify a primary generator? and a list of physics processes? with their configurations. The parameters generator_name and physics_list_name are also mandatory.

### [GENERATION] #################################

GENERATION generator_name S SINGLE_PARTICLE

### Particle name (e-, e+, alpha, etc.)
GENERATION particle_name S e-

### Particle energy will be generated randomly with flat probability
### between energy_min and energy_max
GENERATION energy_min D 100. keV
GENERATION energy_max D 500. keV

### Vertexes will be generated in the center of the chamber
GENERATION region S CENTER


### [PHYSICS] ####################################

PHYSICS physics_list_name S EM_STANDARD

# Optical processes? (boolean)
PHYSICS optical I 0

Additionally, the configuration file specifies actions (that is, hooks to gain control of the simulation at various stages) at run, event and tracking level. However, these parameters are not mandatory.

### [ACTIONS] ####################################

ACTIONS run_action_name      S DEFAULT
ACTIONS event_action_name    S DEFAULT
ACTIONS tracking_action_name S DEFAULT

Finally, the group JOB includes parameters such as the name of the output file or the seed of the random number generator:

### [JOB] ########################################

JOB output_dst    S data/nexus_example1.dst.root
JOB number_events I 100
JOB random_seed   I 0

Check that indeed the simulation run created the file data/nexus_example1.config.

A second example

./nexus -v config/nexus_example2.config

GEOMETRY geometry_name S SQUARE_CHAMBER
GEOMETRY config_file   S geometries/SquareChamber.config

GENERATION generator_name S GENBB_INTERFACE
GENERATION config_file    S generators/GenbbInterface.config

PHYSICS physics_list_name S LOW_ENERGY_EM
PHYSICS optical I 0

ACTIONS run_action_name      S DEFAULT
ACTIONS event_action_name    S FAST_SIM_FILTERS
ACTIONS tracking_action_name S DEFAULT
ACTIONS gamma_min_energy D 3.8 MeV

JOB output_dst    S data/nexus_example2.dst.root
JOB number_events I 100
JOB random_seed   I -1

Example 3: full simulation of an EL event

TODO

Peeking inside an output DST

View topic | Edit |  | WYSIWYG | Attach | PDF | Raw View | Backlinks: Web, All Webs | History: r8 |r6 < r5 < r4 < r3 | More topic actions...
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback