Git Product home page Git Product logo

nanovmc's Introduction

nanoVMC: The minimalist Virtual Monte Carlo example

Purpose

Provide a minimal, yet flexible example for a VMC Simulation application:

  • Geometries are defined outside in a ROOT macro and loaded via TGeoManager
  • Multiple sensitive detectors are supported
  • Energy depositions are recorded in histograms for each sensitive detector
  • The primary generator can be changed in the macro, no recompilation necessary

Constituents

Compiled Code:

  • MCApplication: The main application, handles all setup and execution tasks, derived from TVirtualMCApplication.
  • MCStack: The list of particles in the event, derived from TVirtualMCStack. For unknown and incomprehensible reasons, each VMC app has to implement (read: copy & paste) this for oneself.
  • Sensitive Detector: Keeps track of the energy depositions in each sensitive volume.

Macros:

  • createGeo*.C: Creates a root geometry to be loaded in the VMC app. Note that each sensitive volume should be defined here by name.
  • run_g4.C: Runs the VMC Simulation using Geant4. All libraries should be auto-loaded if their location is in the environment variable LD_LIBRARY_PATH.
  • g4Config.C: Basic configuration for Geant4.
  • do.sh: Demonstrates example usage.

Installation:

Prerequisites:

Geant4_VMC needs to be correctly installed with all dependencies. I recommend simply installing all of FairSoft. All of ROOT, Geant4, VMC, etc. are extremely sensitive to environment variables. You need to make sure everything is set up properly. Use export LD_LIBRARY_PATH=... liberally and edit the CMakeFile.txt if necessary.

Clone and build:

(set environment variables first!)
git clone https://github.com/janmayer/nanoVMC.git
cd nanoVMC
mkdir build
cd build
cmake ..
make

Run ./do.sh in macros.

Acknowledgements:

Very loosely based on the examples provided with geant4_VMC by I. Hrivnacova (IPN, Orsay). Copy & Pasted the MCStack. Inheriting GPL.

nanovmc's People

Contributors

janmayer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

cymgen30

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.