Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can checkout projects with this command.

No Format

cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co [module]

...

The following sequence of commands should get you up and running on Linux (using bash shell).

No Format

export CLHEP_BASE_DIR=/your/path/to/clhep
tar -zxvf geant4.x.tar.gz
cd geant4.x
export G4INSTALL=$(pwd)
export G4WORKDIR=$(pwd)
export G4SYSTEM=Linux-g++
cd geant4.x/source
make
make includes
cd ../physics_lists/hadronic
make

...

Next, try to build an example application.

No Format

cd geant4.x/examples/novice/N03
export G4WORKDIR=$(pwd)
make all

...

After reconfiguring your environment using the G4VIS variables, rebuild the Geant4 visualization as follows.

No Format

cd $G4INSTALL/source/visualization
gmake clean
gmake
cd $G4INSTALL/source/interfaces
gmake clean
gmake
cd $G4INSTALL/source
gmake libmap

...

These are located at ...

No Format

http://www.lcsim.org/dist/slic/

To download a Linux release, use these commands.

No Format

wget http://www.lcsim.org/dist/slic/slic-1_13_3-Linux-g%2B%2B-bin.tar.gz
tar -zxvf slic-1_13_3-Linux-g++-bin.tar.gz

...

It is useable from anywhere on the host where it was installed.

No Format

/path/to/my/SimDist/scripts/slic.sh [options]

...

Assuming you are within the slic package's top directory you would run it with this command.

No Format

./bin/$G4SYSTEM/slic [options]

The G4SYSTEM variable depends on your platform. For instance, on Linux, it is set to Linux-g++, so the command would be ...

No Format

./bin/Linux-g++/slic [options]

...

If you installed SLIC in the recommended way, the only runtime dependency would be the Xerces C++ shared library. The Xerces library directory needs to be added to the LD_LIBRARY_PATH (bash), so that the loader can find this library when slic executes.

No Format

export LD_LIBRARY_PATH=/path/to/my/xerces/install/lib:$LD_LIBRARY_PATH

If you see this error, it means that the LD_LIBRARY_PATH has not been set correctly.

No Format

./slic/bin/Linux-g++/slic: error while loading shared libraries: libxerces-c.so.27: cannot open shared object file: No such file or directory

...

To see explanations of slic's command-line options, use the "-h" option.

No Format

slic -h

This will print slic usage and exit.

...

Typing slic -h will print the available command-line options.

No Format

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

Option  Full Name       Min Args  Max Args  Macro Command           Description
---------------------------------------------------------------------------------------------------------------------------
-h      --help          0         0         /slic/usage             Print SLIC usage.
-n      --interactive   0         0         /control/interactive    Start a Geant4 interactive session.
-v      --version       0         0         /slic/version           Print SLIC version.
-m      --macro         1         1         /control/execute        Execute Geant4 commands from a file.
-g      --lcdd-url      1         1         /lcdd/url               Set LCDD geometry file URL.
-i      --event-file    1         1         /generator/filename     Set event input file full path.
-o      --lcio-file     1         1         /lcio/filename          Set name of LCIO output file.
-p      --lcio-path     1         1         /lcio/path              Set directory for LCIO output.
-O      --autoname      0         1         /lcio/autoname          Automatically name the LCIO output file.
-x      --lcio-delete   0         0         /lcio/fileExists delete Delete an existing LCIO file.
-r      --run-events    1         1         /run/beamOn             Run # of events.
-s      --skip-events   1         1         /generator/skipEvents   Set number of events to skip.
-l      --physics-list  1         1         /physics/select         Set Geant4 physics list.
-L      --log-file      0         0         /log/filename           Set logfile name.
-d      --seed          0         1         /random/seed            Set the random seed.  (No argument seeds with time.)

...

prints the SLIC version, along with a lot of other information (probably too much).

No Format

Simulator for the Linear Collider; SLIC; v1r13p6; Jeremy McCormick and Ron Cassell; SLAC; Tue Apr  4 17:32:07 PDT 2006

...

SLIC prints a splash screen as it starts up with the version, build date, and other information.

No Format

*************************************************************
 App     : Simulator for the Linear Collider (SLIC)
 Version : v1r13p6
 Date    : Tue Apr  4 17:32:07 PDT 2006
 Authors : Jeremy McCormick and Ron Cassell
 Inst    : SLAC
 WWW     : http://www.lcsim.org/software/slic
 Contact : jeremym@slac.stanford.edu
*************************************************************

...

The Geant4 toolkit prints a splash screen that SLIC displays when it starts up.

No Format

*************************************************************
 Geant4 version Name: geant4-08-00-patch-01    (10-February-2006)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

...

SLIC commands are added into various directories within the Geant4 UI hierarchy. From interactive mode, use this command to print information on a SLIC or LCDD command.

No Format

help [command]

Those directories containing only SLIC or LCDD commands are marked with SLIC or LCDD.

No Format

/lcio/   LCIO output commands. [SLIC]

...

You can put Geant4 UI commands into one or more macro files that slic can execute. This is done with the "-m" switch. There can be any number of these switches given to slic at the commandline. For instance, this command will execute the two macros init.mac and run.mac.

No Format

slic -m init.mac -m run.mac

...

If macros are interspersed throughout the command switches, then SLIC will also execute each command in order.

No Format

slic -m init.mac -x -o output -p myDir -m run.mac

...

This command will start Geant4 in PreInit mode where the geometry is not loaded.

No Format

slic -n

Other commands may also be executed before the interactive mode starts.

No Format

slic -g myGeom.lcdd -n

The LCDD file will be constructed, so the simulator will start in Idle mode.

...

The following command illustrates some of the options that could be used in a typical batch run.

No Format

slic -g myGeom.lcdd \              # geometry file
     -i events.stdhep \            # StdHep input file
     -p lcio/ \                    # path for LCIO output file
     -o output.slcio \             # name of LCIO output file
     -x \                          # delete existing LCIO file
     -r 1234 \                     # seed the random engine
     -s 100 \                      # number of events to skip
     -r 1000                       # number of events to run

...

In bash, direct all output to a file, as follows.

No Format

slic &> job.log &

Now use the tail command to look at the output file as the job progresses.

No Format

tail -f job.log

The BeginEvent and EndEvent markers are the best indicators of the job's progress.

...

This is an example of submitting a job to run 1000 events through the sid00 detector on the xlong batch queue.

No Format

bsub -q xlong -o `pwd`/job.log -e `pwd`/err.log time slic -g sid00.lcdd -i events.stdhep -o events_sid00 -r 1000

LSF accepts plain bash scripts to start jobs. Mine usually use a few for loops to run combinations of geometries with StdHep files.

No Format

for g in $(ls *.lcdd); do
  for s in $(ls stdhep/*.stdhep); do
    fname=$(basename ${s%.*})_$(basename ${g%.*})
    bsub -o `pwd`/$fname.log -e `pwd`/$fname.err -q xlong time slic -g $g -i $i -o $fname
  done
done 

...

The following command illustrates the autoname feature.

No Format

/lcio/autoname event application version geometry

...

Turn on the save feature.

No Format

/random/setSavingFlag true

...

To save the current event to a unique file, use this command.

No Format

/random/saveThisEvent

This copies currentEvent.rndm to runXXXevtYYY.rndm.

To do this for every event, put the saveThisEvent command in a macro called rndmSave.mac and run events in this fashion.

No Format

/run/beamOn 1000 rndmSave.mac

...

To restore the random state, use this Geant4 UI command.

No Format

/random/resetEngineFrom currentEvent.rndm

This can be used to "replay" events of interest. This feature will probably be used with SLIC's skipEvents feature in order to jump to the event first before restoring its random state.

No Format

/random/resetEngineFrom run0event1000.rndm
/generator/skipEvents 1000

...

The -l option or /physics/select command takes the name of the physics list to use as an argument.

No Format

/physics/select LHEP

This must happen in the PreInit stage. Once the simulator is in Idle state, the physics list is set permanently for that run, and SLIC must be restarted to use a different list.

...

The command selectStepper sets the integrator, where the argument can be one of the following.

No Format

G4ClassicalRK4
G4ExplicitEuler
G4HelixExplicitEuler
G4HelixHeum
G4HelixImplicitEuler
G4HelixSimpleRunge
G4ImplicitEuler
G4CashKarpRKF45
G4SimpleHeum
G4SimpleRunge

...

Execute this command to select GPS as the event source.

No Format

/generator/select gps

Actually, GPS is the default, but this can be used to switch if another generator is being used (e.g. in interactive mode).

...

Geant4 includes a simple particle gun that can be selected with this command.

No Format

/generator/select gun

However, GPS is the recommended single particle source, and the G4ParticleGun should be considered deprecated, in my opinion.

...

  • Your name and institutional affiliation
  • Operating system and version
  • Version of gcc compiler

    Code Block
    
    gcc -v
    
  • Versions of all SimDist software packages

    Code Block
    
    cat SimDist/packages/*/VERSION &> myversions.txt
    
  • If not using SimDist, please provide at least the SLIC and GEANT4 version numbers.
  • Run macro for reproducing the bugged LCIO file
  • Publically accessible location of the StdHep input file (if any)
  • Versions of GeomConverter and org.lcsim that you are using (if applicable)

...

How do I dump the current Geant4 geometry to GDML using SLIC?

No Format

/lcdd/dumpGDML mygeom.gdml

...

This is an example of reading a local file from the command line.

No Format

slic -g /path/to/myGeom.lcdd

This command reads the geometry from a URL.

No Format

slic -g http://www.lcsim.org/detectors/sid00/sid00.lcdd

...

To read in a "plain" GDML file, simply use the "-g" option as you normally would ...

No Format

slic -g myGeom.gdml

The LCDD system will use the GDML schema instead of LCDD and the geometry should be loaded successfully.

How do I check my Geant4 geometry for overlaps?

No Format

/geometry/test/recursive_test

...

The Geant4 OpenGL visualization driver can be used to immediately visualize the detector and events. The following command can be used to visualize the detector geometry plus hits and trajectories from the event.

No Format

/vis/scene/create
/vis/scene/add/volume
/vis/scene/add/hits
/vis/scene/add/trajectories
/vis/open OGLSX

...

A command similar to this will write out a HepRep zip file to the current directory.

No Format

/vis/scene/create 
/vis/open HepRepXML
/vis/viewer/set/culling global false
/vis/scene/add/volume 
/vis/scene/add/trajectories
/vis/scene/add/hits

How do I use DAWN from within Geant4?

No Format

/vis/open DAWNFILE

How can I make cuts using DAWN?

...

LCIO comes with the dumpevent tool that dumps an LCIO file's contents from the command-line. Typically, this would be used with a pager.

No Format

$LCIO/bin/dumpevent outfile.slcio 0 1 | less

...

Compact detectors are kept at this base url in zip files named with the detector tag.

No Format

http://www.lcsim.org/detectors

For instance, this is the location of the sid00 detector's resource file.

No Format

http://www.lcsim.org/detectors/sid00.zip

...

A list of available compact detectors is kept at this URL.

No Format

http://www.lcsim.org/detectors/taglist.txt 

...

Add an alias to ~/.lcsim/alias.properties which points to your detector's resources.

A zip file.

No Format

mydet: file:///path/to/mydet.zip

Or the directory.

No Format

mydet: file:///path/to/mydet/

...

How do I convert compact detectors into LCDD using GeomConverter?

No Format

GeomConverter/bin/GeomConverter -o lcdd compact.xml mydet.lcdd

...

All attribute values are evaluated by the JDOM expression factory.

No Format

<constant name="myval" value="2.0 * cm"/>    

...

What "magic" constants are expected by the compact reader?

No Format

<define>

  <!-- centimeters -->
  <constant name="cm" value="10"/>

  <!-- world -->
  <constant name="world_side" value="30000" />
  <constant name="world_x" value="world_side" />
  <constant name="world_y" value="world_side" />
  <constant name="world_z" value="world_side" />

  <!-- tracking region -->
  <constant name="tracking_region_radius" value="175.*cm"/>
  <constant name="tracking_region_zmax" value="282.*cm"/>

</define>

...

Cylindrical calorimeter barrel.

No Format

<detector id="1" name="EMBarrel" type="CylindricalBarrelCalorimeter" readout="EcalBarrHits">
  <dimensions inner_r = "ecal_barrel_inner_r" outer_z = "ecal_barrel_outer_z" />
  <layer repeat="30">
    <slice material = "Tungsten" thickness = "ecal_absorber_thickness" />
    <slice material = "Silicon" thickness = "ecal_sensor_thickness" />
  </layer>
</detector>

Cylindrical endcap calorimeter.

No Format

<detector id="2" name="EMEndcap" reflect="true" type="CylindricalEndcapCalorimeter" readout="EcalEndcapHits">
  <dimensions inner_r = "ecal_endcap_inner_r" inner_z = "ecal_endcap_inner_z" outer_r = "ecal_endcap_outer_r" />
  <layer repeat="30">
    <slice material = "Tungsten" thickness = "ecal_absorber_thickness" />
    <slice material = "Silicon" thickness = "ecal_sensor_thickness" />
  </layer>
</detector>

...

Polyhedra calorimeter barrel.

No Format

<detector id="3" name="EMBarrel" type="PolyhedraBarrelCalorimeter" readout="EcalBarrHits">
  <dimensions z="ecal_barrel_full_z" numsides="8" rmin="ecal_barrel_rmin"/>
    <layer repeat="30">
      <slice material="Tungsten" thickness="ecal_absorber_thickness"/>
      <slice material="Silicon" thickness="ecal_sensor_thickness" sensitive="yes"/>
    </layer>
</detector>

Polyhedra endcap calorimeter.

No Format

<detector id="4" name="EMEndcap" reflect="true" type="PolyhedraEndcapCalorimeter" readout="EcalEndcapHits">
  <dimensions numsides="8" rmin="ecal_endcap_rmin" rmax="ecal_endcap_rmax" zmin="ecal_endcap_zmin"/>
  <layer repeat="30">
    <slice material="Tungsten" thickness="ecal_absorber_thickness"/>
    <slice material="Silicon" thickness="ecal_sensor_thickness" sensitive="yes"/>
  </layer>
</detector>

...

GridXYZ segmentation.

No Format

<readout name="HcalBarrHits">
  <segmentation type="GridXYZ" gridSizeX="10.0" gridSizeY="10.0"/>
  <id>layer:7,system:6,barrel:3,x:32:-16,y:-16</id>
</readout>

Nonprojective cylinder.

No Format

<readout name="EcalBarrHits">
  <segmentation type="NonprojectiveCylinder" gridSizePhi="0.35*cm" gridSizeZ="0.35*cm" />
  <id>system:8,layer:8,barrel:3,phi:32:16,z:-16</id>
</readout>

Projective Z plane (projective endcap).

No Format

<readout name="HcalEndcapHits">
  <segmentation type="ProjectiveZPlane" thetaBins="600" phiBins="1200"/>
  <id>layer:7,system:6,barrel:3,theta:32:11,phi:11</id>
</readout>

Projective cylinder.

No Format

<readout name="HcalBarrHits">
  <segmentation type="ProjectiveCylinder" thetaBins="600" phiBins="1200"/>
  <id>layer:7,system:6,barrel:3,theta:32:11,phi:11</id>
</readout>

How do I define a silicon tracker?

Tracker barrel.

No Format

<detector id="1" name="TrackerBarrel" type="MultiLayerTracker" readout="TkrBarrHits">
  <layer id="1" inner_r = "20.000*cm" outer_z = "26.7*cm">
  <slice material = "Silicon" thickness = "0.00048*cm" />
  <!-- N layers can go here -->
</layer>

Tracker endcap.

No Format

<detector id="14" name="TrackerEndcap" type="DiskTracker" reflect="true" readout="TkrEndcapHits">
  <layer id="1" inner_r = "4.0*cm" inner_z = "30.0*cm" outer_r = "25.000*cm">
    <slice material = "Silicon" thickness = "0.03*cm" sensitive = "yes" />
  </layer>
  <!-- N layers can go here -->
</detector>

How do I define a TPC?

No Format

<detector id="2" name="TPC" type="TPC" readout="TPCHits">
  <dimensions inner_r = "36.2*cm" outer_z = "250.0*cm" />
  <layer repeat="200">
    <slice material="P10" thickness="tpc_gas_thickness" sensitive="yes" />
  </layer>
</detector>

...

Unlike calorimeters, tracker hits are written out "in the raw" without any digitization (or binning), so no segmentation is used at the simulation level.

No Format

<readout name="TkrBarrHits">
  <id>layer:10,system:6,barrel:3</id>
</readout>

How do I define a simple magnetic field?

No Format

<fields>
  <field type="Solenoid" name="GlobalSolenoid"
         inner_field="5.0"
         outer_field="-0.6"
         zmax="1000"
         outer_radius="144*cm+(2+1)*34*cm"/>
</fields>

...

The org.lcsim package can parse a field map with a line-oriented format. This gives the magnetic field strength at a given radius (r) and z.

No Format

r z Br Bz

Reference a field map from the compact description.

No Format

<fields>
  <field type="RZFieldMap" name="RZFieldMapTest"
         gridSizeZ="10.0"
         gridSizeR="10.0"             
         numBinsZ="64"
         numBinsR="67"
         url="http://www.lcsim.org/test/solenoid_5tesla.dat"/>
</fields>

How do I define a new material?

No Format

<material name="ArgonGas">
  <D type="density" value="0.00178" unit="g/cm3"/>
  <composite n="1"  ref="Ar" />
</material>

<material name="MethaneGas">
  <D type="density" value="0.000717" unit="g/cm3"/>
  <composite n="1"  ref="C" />
  <composite n="4" ref="H" />
</material>

<material name="P10">
  <D type="density" value="0.00178" unit="g/cm3"/>
  <fraction n=".9"  ref="ArgonGas" />
  <fraction n=".1"  ref="MethaneGas" />
</material>

How do I set physics limits?

No Format

<limits>
  <limitset name="MyLimits">
    <limit name="step_length_max" particles="*" value="1.0" unit="mm" />
  </limitset> 
</limits>

Reference from a slice element within layer.

No Format

<slice limits="MyLimits" ... />

How do I set the range cut?

No Format

<regions>
  <region name="MyRegion" store_secondaries="true" cut="0.1" lunit="mm" threshold="0.001" eunit="GeV" />
</regions>

Reference from a slice element within layer.

No Format

<slice limits="MyRegion" ... />

...

What tools do I need to use org.lcsim?

No Format

Java     1.5
Maven    1.0
JAS3     0.8.3 (optional)
Netbeans 5.0 (optional)

...

Use the lcg-cp command.

No Format

lcg-cp --vo ilc lfn:{LFNfromDB} file:{absolute path}

...

http://grid.desy.de/
http://grid.desy.de/certs/
http://grid.desy.de/users/
http://grid.desy.de/install/DESY-VO.html
http://cic.in2p3.fr/
http://cern.ch/lcg/
http://www.eu-egee.org/

Mokka

What is Mokka?

How do I download and install Mokka?

How do I run Mokka?

How do I get Mokka-generated LCIO files from the Grid?

How do I execute Mokka on the Grid?

How do I create my own SQL database for Mokka?

What is CGA?

How do I define my own Mokka detector or subdetector?

Marlin

What is Marlin?

What is MarlinReco

How do I download and install Marlin and MarlinReco?

...