r8 - 15 Sep 2014 - 10:05:01 - PaolaFerrarioYou 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 -b -n 100 macros/nexus_example1.init.mac

On screen you should see text like this:

*************************************************************
 Geant4 version Name: geant4-09-06-patch-02    (17-May-2013)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************
<<< Geant4 Physics List simulation engine: G4GenericPhysicsList

[...]
### Run 0 start.  #######################################
 >> Event no. 0
 >> Event no. 10
 >> Event no. 20
 >> Event no. 30
 >> Event no. 40
 >> Event no. 50
 >> Event no. 60
 >> Event no. 70
 >> Event no. 80
 >> Event no. 90
### Run 0 end.  #########################################

You just simulated one hundred electrons moving through gaseous xenon at 15 bar pressure.

In the init.mac file, the basic characteristics of the job are specified, namely the geometry, the generator, the actions to be used, the physics list.


/Geometry/RegisterGeometry XE_SPHERE

/Generator/RegisterGenerator SINGLE_PARTICLE

/Actions/RegisterRunAction DEFAULT

/Actions/RegisterEventAction DEFAULT

/Actions/RegisterTrackingAction DEFAULT

/control/execute macros/physics/DefaultPhysicsList.mac

/nexus/RegisterMacro macros/nexus_example1.config.mac

Tha last line executes the config.mac file, where specific parameters for each part of the simulation are given.

Let's have a look at the config.mac file (macros/nexus_example1.config.mac). The value of the configuration parameteres are specified like the following:

/run/verbose 0

Let's have a look at the geometry configuration file macros/geometries/XeSphere.mac:

/Geometry/XeSphere/LXe false
/Geometry/XeSphere/pressure 15. atmosphere
/Geometry/XeSphere/radius 10. m

The geometry is a sphere full of GXe. In this file, the pressure of the gas and the radius of the sphere are specified with their units.

The generation configuration file (macros/generators/SingleParticle.mac)

/Generator/SingleParticle/particle e-
/Generator/SingleParticle/min_energy 1. MeV
/Generator/SingleParticle/max_energy 2. MeV
/Generator/SingleParticle/region CENTER

specifies the primary particle, its energy and the generation point. In this example, it is an electron with randomly sampled energy between 1 and 2 MeV?, starting from the center of the geometry.

The parameter /nexus/persistency/outputFile must be specified necessarily: it is the path of the output file of the job.

A second example: the look-up table generation

./nexus -b -n number_of_points macros/nexus_ELTableNew.init.mac

In this job, a fake particle (called ionization electron) is generated and drifted through the electroluminescence region, producing a large number of photons along its path. Here the number of events (number_of_points) must be equal to (or higher than) the number of points from which ones wants to generate photons to build the look-up tables. The list of the coordinates of these points is built in the construction of the specific geometry in use.

The macros/nexus_ELTableNew.init.mac file look like the previous one:

/PhysicsList/RegisterPhysics G4EmLivermorePhysics
/PhysicsList/RegisterPhysics G4DecayPhysics
/PhysicsList/RegisterPhysics G4OpticalPhysics
/PhysicsList/RegisterPhysics NexusPhysics

/Geometry/RegisterGeometry OPTICAL_GEOMETRY

/Generator/RegisterGenerator SINGLE_PARTICLE 

/Actions/RegisterTrackingAction DEFAULT 

/Actions/RegisterSteppingAction DEFAULT 

/Actions/RegisterRunAction DEFAULT 

/Actions/RegisterEventAction DEFAULT 


/nexus/RegisterMacro nexus_ELTableNew.config.mac 

/nexus/RegisterDelayedMacro EL_tables.mac 

The at the end of the file, registers the macro that specifies the electroluminescence parameters. Having a look at this macro (EL_tables-mac), one can see two parameters:

/Physics/Electroluminescence/table_generation true

that sets the Electroluminescence process to the look-up table mode, and

/Physics/Electroluminescence/photons_per_point 500000

that specifies the number of photons per ionization electron generated.

Edit | WYSIWYG | Attach | PDF | Raw View | Backlinks: Web, All Webs | History: r8 < r7 < r6 < r5 < r4 | 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