Code Monkey home page Code Monkey logo

fgamma's Introduction

fgamma

Requires

Compiling

The software uses CMake to manage the building process.

For Geant4 you need to source the Geant4 environment beforehand. This is necessary for running the simulation as well, because Geant4 uses the environment variables to find the data files.

If the other necessary libraries are installed at custom locations, you can specify the paths when configuring the build using -D flags (YAMLCPP_DIR for yaml-cpp and BOOST_ROOT for Boost). Since the FindBoost.cmake module seems to be a bit crappy, a Boost_NO_BOOST_CMAKE=ON is also probably necessary if there is an older Boost installed on the system as well (otherwise the module may find a wrong version).

The FindHDF5.cmake script is a bit stupid and you have to specify the HDF5_ROOT as an environment variable (e.g. HDF5_ROOT=path cmake ...).

In order to have a debug build you can use the standard CMAKE_BUILD_TYPE.

Usage

$ ./fgamma --help
Usage: fgamma [OPTION...] [EVENT...]
Simulation of gamma-rays produced in the atmosphere by cosmic rays.

 General options:
  -f, --eventfile=FILE       file with event parameters (each line with
                             eventconf syntax)
  -o, --prefix=PREFIX        set the prefix of the output files
      --seed=SEED            set the seed for the random generators; if this is
                             not specified, time(0) is used)
      --tracks               store tracks in tracks.txt
  -v, --verbosity=LEVEL      set the verbosity level (0 - minimal, 1 - a bit
                             (default), 2 - a lot)
      --vis                  open the GUI instead of running the simulation

 Options for tweaking the physics:
      --cutoff=CUT           define an energy cutoff (in GeVs)
  -m, --model=MODELFILE      set the YAML file used to model the geometry
                             (default: model.yml)
      --spaceonly            only accept particles on the outer boundary

 Other:
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

The parameters of the inital particles in the simulation can be supplied on the command line, in a file or both. All non-option arguments on the command line are interpreted as event paramters. The -f option can be used to define a file where additional events will be read from (one event per line).

Each event parameter (argument or line) is a comma-separated list of values in the form name=value. The possible parameters are:

  • E or e -- energy of the incoming particle (in GeV)
  • aoi -- angle of incidence (real number between 0 and 1, where 0 corresponds to 0 degrees and 1 to 90 degrees; default: 0)
  • pid -- PDG ID of the incoming particle (default: 2212, proton)
  • n -- number of events with these parameters (default: 1)

All parameters except energy have default values and can therefore be omitted.

An example: ./fgamma E=100 E=10,n=25 E=10,pid=11,aoi=0.5 -- 1 event with 100 GeV proton, 25 events with a 10 GeV proton and an event with a 10 GeV electron coming in at a 45 degree angle.

fgamma's People

Contributors

mortenpi avatar

Watchers

Joosep Pata avatar  avatar James Cloos avatar Ants Remm avatar Mario Kadastik avatar Andres Tiko avatar  avatar  avatar Dmitri Konstantinov avatar Lucia Perrini avatar Christian Veelken avatar acarvalh avatar  avatar  avatar Torben Lange avatar SANDEEP BHOWMIK avatar

Forkers

mortenpi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.