Giter Site home page Giter Site logo

simulation-chain's Introduction

Simulation Chain

####Important note:

This is the old simulation chain with (ugly) bash scripts. The new version, written in Python, can be found here: new simulation chain

####End of note

These are the scripts which I use to simulate events. Further programs used are the Pluto event generator and the Geant4 simulation code from the A2.

The scripts will run interactive, the only thing is to adapt the paths where the data should be stored as well as where the a2geant package is located and start everything via ./run.sh.

New channels can be added very easy using the same nomenclature for the decays as found in the scripts. By simply commenting the lines belonging to certain channels at the beginning of the run.sh their terminal prompt will be skipped.

Prerequisites

The following programs have to be installed and set up properly:

In order to run the detector simulation with Geant4, the file vis.mac has to be placed in the macros folder where the A2 Geant4 package had been installed.

Converting the files generated with Pluto to use them within Geant4, the pluto2mkin converter, written by Dominik Werthmüller, is needed. It should be located in the A2 Geant directory as well. In case it is missing the sources to build it are in the pluto2mkin.tar.gz. Change the path to the executable in the script convert.sh accordingly.

###Path changes in the scripts

####Scripts changed at 11.2.2015 for easier portability:

Basically you have to change two paths right at the beginning of the run.sh. The variable DATA_OUTPUT_PATH specifies where the simulated data will be stored. If not existent, the folders sim_data and g4_run will be created. The variable A2_GEANT_PATH must hold the path to the a2geant directory where the A2 and pluto2mkin executables are located. That's all.

####In case you use the version prior to the 11.2.2015:

Some paths must be changed according to the current location of the scripts and the A2 package. For most of the scripts the current directory is used, except for the file det.sh and vis.mac.

  1. In det.sh the line cd $G4WORKDIR/bin/$G4SYSTEM has to be changed to the directory in which the executable A2 is placed as well as the macros folder. All paths /data/simulation/background/channels/ must be replaced with the path to the current scripts location.
  2. Besides this shell script the vis.mac inside the macros folder of the A2 package must be replaced by the one from this repository. In vis.mac in the only not commented line /control/execute /home/wagners/Desktop/g4work/bin/Linux-g++/g4run_multi.mac the path /home/.../Linux-g++ has to be replaced with the path used in the previous point, $G4WORKDIR/bin/$G4SYSTEM, without environment variables.

By default the Pluto generated data will be stored in the directory sim_data and the detector simulated data will be stored in g4_sim. The folder g4run contains the per channel information for the particles to be tracked within Geant4. The tracking information can easily be accessed by running the pluto2mkin converter which displays the needed information.

Trouble-Shooting

  • If you are using Ubuntu (probably > 11.04) and recieve some 'undefined reference' errors, it is recommended to install the gold linker which replaces the standard ld linker to resolve this issue, sudo apt-get install binutils-gold.

simulation-chain's People

Contributors

a2wagner avatar

Watchers

 avatar  avatar

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.