Overview

This guide will explain how to generate physics events in an HPS setup including the ECal and the tracking detectors.

Preliminaries

You will need:

Build SLIC

You need a copy of SLIC.

See the SLIC installation instructions.

Detector Data

The lcdd detector description files are included in the hps-java distribution. 

hps-java/detector-data/detectors/

 

Run Event Simulation

The following example shows how to generate some LCIO events using slic with an stdhep file as input

slic -g ./hps-java/detector-data/detectors/HPS-EcalTest-v1pt0/HPS-EcalTest-v1pt0.lcdd \
-i ap6.6gev100mevsel_10_20u_beamspot_gammactau_0cm.stdhep \
-x -O -o hpsEcalTest -r 10000

Note that a full listing of the command line options for slic can be printed out with the following command:

> slic -h

Wed Oct 16 11:53:20 2019 :: OKAY :: SlicApplication :: SLIC is starting.
SLIC

**************
* SLIC Usage *
**************

Command line usage:

slic [single_macro_path]
slic [options]

Interactive usage:

slic -n

************************
* Command Line Options *
************************

Option  Full Name       Macro Command           Description
------------------------------------------------------------
-h      --help          /slic/usage             Print SLIC usage.
-?      --help          /slic/usage             Print SLIC usage.
-n      --interactive   /control/interactive    Start a Geant4 interactive session.
-v      --version       /slic/version           Print SLIC version.
-m      --macro         /control/execute        Execute Geant4 commands from a file.
-g      --lcdd-url      /lcdd/url               Set LCDD geometry file URL.
-i      --event-file    /generator/filename     Set event input file full path.
-o      --lcio-file     /lcio/filename          Set name of LCIO output file.
-p      --lcio-path     /lcio/path              Set directory for LCIO output.
-O      --autoname      /lcio/autoname          Automatically name the LCIO output file.
-x      --lcio-delete   /lcio/fileExists delete Delete an existing LCIO file.
-r      --run-events    /run/beamOn             Run # of events.
-s      --skip-events   /generator/skipEvents   Set number of events to skip.
-l      --physics-list  /physics/select         Set Geant4 physics list.
-L      --log-file      /log/filename           Set logfile name.
-d      --seed          /random/seed            Set the random seed. (No argument seeds with time.)
-G      --dump-gdml     /lcdd/dumpGDML          Dump geometry to GDML file.
-c      --optical       /physics/enableOptical  Enable optical physics processes.
-P      --pdg-file      /physics/setPDGFile     Set location of particle.tbl file.
-V      --lcdd-version  /lcdd/version           Set the version of the GDML setup tag.
-S      --lcdd-setup    /lcdd/setupName         Set the name of the GDML setup tag.

 

The use of the -O argument is highly recommended as it includes some run metadata into the output file name, which can be very useful in providing some provenance for the content.

 

One can also generate events internally using the GEANT4 General Particle Source. One can either issue commands on the interactive command line, or invoke them via a Geant4 macro.

slic -g detector.lcdd -m G4commands.mac -O

 

Here is a simple example to generate 100k single 4.56 GeV electrons isotropically over a fixed range in theta and uniformly in phi:

/generator/select gps
/gps/particle e-
/gps/position 0 0 0 cm
/gps/energy 4.56 GeV
/gps/ang/type iso
/gps/ang/mintheta 170 deg
/gps/ang/maxtheta 180 deg
/gps/ang/minphi 0 deg
/gps/ang/maxphi 360 deg

/run/beamOn 100000
  • No labels