Giter Club home page Giter Club logo

moller's Introduction

Testing ROOT with Møller Scattering

This is a small C++ project with the aim of testing CERN's ROOT. It is composed of a program that generates a ROOT plot of the differential cross section of QED electron-electron interaction (Møller scattering), a .dat file with the generated data and a .tex file of the plot. The .tex plot could be compiled to a .pdf with a defined $\LaTeX$ template.

$$ e^- + e^- \rightarrow e^- + e^- $$

Requirements

  • Linux
  • make
  • ROOT
  • LuaLaTeX

Working with moller-scattering

To compile the program as an executable use make with target exe.

$ make exe

The program is build in the ./bin directory. To execute it:

$ bin/main

The program generates a .dat file in the direcotry ./data. If you want to change that see parameters. To compile (make) the $\LaTeX$ document use make with target pdf. If you don't want an automatic clean-up use target pdf-dirty.

$ make pdf

Note: make pdf uses LuaLaTeX

The .pdf is build in ./tex/build directory.

Parameters

The program has parameters that could be changed. They are defined in ./src/main.cpp. The default parameters are given:

#define N                   100u                                            // number of samples
#define P                   1.0                                             // electron CM momentum
#define MASS                1.0                                             // electron invariant mass
#define COUPLING            0.30282212                                      // coupling constant
#define LIMIT               LIMIT_RELATIVISTIC                              // limit of calculation
#define EXCLUSION_ARC       0.6                                             // arc of exclusion
#define CANVAS_W            720u                                            // width of canvas
#define CANVAS_H            720u                                            // height of canvas
#define CANVAS_TITLE        "Moller Scattering"                             // title of canvas
#define GRAPH_LABEL         "Differential Cross Section;"           \
                            "\\theta\\,[rad];"                      \
                            "\\frac{d^2\\sigma}{d\\Omega^2}\\,[mb]"         // graph title \ x label \ y label
#define MOLLER_DAT_PATH     "./data/moller.dat"                             // path to `.dat` file
#define MOLLER_TEX_PATH     "./tex/diagrams/moller-cross-section.tex"       // path to `.tex` file

The default value GRAPH_LABEL literaly means "Differential Cross Section; $\theta,[\textrm{rad}]$; $\frac{d^2\sigma}{d\Omega^2},[\textrm{mb}]$"

moller's People

Contributors

nikolakostadinov avatar

Watchers

 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.