|
4 | 4 | #define MCBooster_VERSION_PATCH 0
|
5 | 5 | /**
|
6 | 6 | \mainpage
|
7 |
| - |
8 | 7 | MCBooster
|
9 | 8 | =========
|
10 | 9 |
|
11 | 10 | What is it?
|
12 | 11 | -----------
|
| 12 | +
|
13 | 13 | MCBooster is an header only library designed for the fast generation of
|
14 |
| -phase space events. The library make use of thrust library and can deploy OpenMP |
15 |
| -threads, CUDA and Xeon Phi cores. It is focused on performance and precision. |
| 14 | +phase space events. The library makes use of Thrust and can deploy OpenMP |
| 15 | +threads, CUDA and Xeon Phi cores. It is focused on performance and precision. |
| 16 | +
|
| 17 | +The libray core algorithm follow as close as it is possible the implementation of the class [TGenPhaseSpace](https://root.cern.ch/doc/master/TGenPhaseSpace_8cxx.html) |
| 18 | +from [ROOT framwork](https://root.cern.ch/), |
| 19 | +which is based on the [GENBOD function (W515 from CERNLIB)](http://cernlib.web.cern.ch/cernlib/mc/genbod.html) |
| 20 | +using the Raubold and Lynch method as described in |
| 21 | +
|
| 22 | +[_F. James, Monte Carlo Phase Space, CERN 68-15 (1968)_](https://cds.cern.ch/record/275743/files/CERN-68-15.pdf). |
| 23 | +
|
| 24 | +Main features |
| 25 | +------------- |
| 26 | +
|
| 27 | +Generates phase space Monte Carlo samples with up to nine particles in the final state, using very simple |
| 28 | +and intuitive interface. Example: |
| 29 | +```c++ |
| 30 | +//generating 10M events of B0 -> J/psi K pi |
| 31 | +#include <mcbooster/GTypes.h> |
| 32 | +#include <mcbooster/Vector4R.h> |
| 33 | +#include <mcbooster/Generate.h> |
| 34 | + ... |
| 35 | +//setting the mother particle |
| 36 | +Vector4R B0(5.2795, 0.0, 0.0, 0.0); |
| 37 | +
|
| 38 | +//setting the masses of the daughter particles |
| 39 | +vector<GReal_t> masses; |
| 40 | +masses.push_back(3.096916); // J/psi |
| 41 | +masses.push_back(0.493677); // K |
| 42 | +masses.push_back(0.13957018); // pi |
| 43 | +
|
| 44 | +//generator ctor for 10M events |
| 45 | +PhaseSpace phsp(B0.mass(), massesB0, 10000000); |
| 46 | +
|
| 47 | +//run the generator |
| 48 | +phsp.Generate(B0); |
| 49 | +
|
| 50 | +//Unweight the events flags the accepted and rejected events |
| 51 | +phsp.Unweight(); |
| 52 | +
|
| 53 | +//export events to the host (in case it is necessary) |
| 54 | +Events *GenEvents = new Events(masses.size(), 10000000); |
| 55 | +phsp.Export(GenEvents); |
| 56 | +... |
| 57 | +``` |
| 58 | +Other key features are: |
| 59 | +
|
| 60 | +1. Decays can be generated with mother particles are rest or with a definite four-vector. |
| 61 | +this feature allows the generation of sequential decays. |
| 62 | +
|
| 63 | +2. Generates weighted and "unweighted" samples simultaneously. |
| 64 | +
|
| 65 | +3. Allows the fast parallel evaluation of arbitrary functions taking as |
| 66 | +argument up to ten particles as input. |
| 67 | +
|
| 68 | +4. Allows the fast parallel evaluation of arrays of variables simultaneously. |
| 69 | +
|
| 70 | +MCBooster also provides a bunch of custom types, containers and an increasing number of algorithms |
| 71 | +to maximaze performance, avoid unecessary usage of memory and grant flexibility and protability between |
| 72 | +host and device calculations and deployment scenarios. |
| 73 | +
|
| 74 | +Just changing .cu to .cpp in any source code writen only using the provided cosntructs is enough |
| 75 | +to compile your application for OpenMP using GCC in a machine without a NVIDIA GPU installed. |
| 76 | +
|
| 77 | +Many other possibilities and functionaties, bounded only by the creativity of the users. |
16 | 78 |
|
17 | 79 | The Latest Version
|
18 | 80 | ------------------
|
19 | 81 |
|
20 |
| -The latest version can be found on the |
| 82 | +The latest version can be found on the |
21 | 83 | [project relases page](https://github.com/MultithreadCorner/MCBooster/releases).
|
22 | 84 |
|
23 | 85 | Documentation
|
24 | 86 | -------------
|
25 | 87 |
|
26 | 88 | The complete and updated [Doxygen](http://www.doxygen.org/) source code documentation of this release is available in HTML format on the
|
27 | 89 | [reference manual](http://multithreadcorner.github.io/MCBooster/) webpage.
|
28 |
| -User can also browse the documentation by class, file or name using the following links: |
| 90 | +Users can also browse the documentation by class, file or name using the following links: |
29 | 91 |
|
30 |
| -1.[classe](http://multithreadcorner.github.io/MCBooster/classes.html) |
| 92 | +1.[classes](http://multithreadcorner.github.io/MCBooster/classes.html) |
31 | 93 |
|
32 |
| -2.[file](http://multithreadcorner.github.io/MCBooster/files.html) |
| 94 | +2.[files](http://multithreadcorner.github.io/MCBooster/files.html) |
33 | 95 |
|
34 |
| -3.[name](http://multithreadcorner.github.io/MCBooster/namespacemembers.html) |
| 96 | +3.[names](http://multithreadcorner.github.io/MCBooster/namespacemembers.html) |
35 | 97 |
|
| 98 | +Installation and requirements |
| 99 | +----------------------------- |
| 100 | +
|
| 101 | +MCBooster is a header only library, so no build process is necessary to install it. |
| 102 | +Just place the `mcbooter` folder and its contents where your system can find it. |
| 103 | +The library run on Linux systems and requires C++11 and the [Thrust library](https://thrust.github.io/). |
| 104 | +Some examples demonstrating the basic features of the library are included in the `src` folder. |
| 105 | +These code samples require [ROOT](https://root.cern.ch/) and [TCLAP](http://tclap.sourceforge.net/) library. |
| 106 | +CUDA based projects will require a local installation of [CUDA Tookit](https://developer.nvidia.com/cuda-toolkit) with version 6.5 or higher. |
| 107 | +Alternatively, projects the targeting [OpenMP](http://openmp.org/wp/) backend can be compiled with either nvcc or gcc. |
| 108 | +The CUDA runtime is not required to use OpemMP with gcc. |
36 | 109 |
|
37 | 110 | Examples
|
38 | 111 | --------
|
39 | 112 |
|
40 |
| -Some example code samples demonstrating the basic usage of the library are stored in the src directory. |
| 113 | +Some example code samples demonstrating the basic usage of the library are stored in the src directory, in the project source tree. |
41 | 114 | These samples can be built using [CMAKE](https://cmake.org/) according the following instructions:
|
42 | 115 |
|
43 | 116 | 1. clone the git repository: `git clone https://github.com/MultithreadCorner/MCBooster.git`
|
44 | 117 | 2. go to MCBooster directory: `cd MCBooster`
|
45 |
| -3. create a build directory: `mkdir build` |
| 118 | +3. create a build directory: `mkdir build` |
| 119 | +4. go to build directory: `cd build` |
46 | 120 | 4. `cmake ../`
|
47 | 121 | 5. `make`
|
48 | 122 |
|
49 |
| -The targets will be installed into directory-of-the-project/bin. To run an example do ./example-name |
| 123 | +Users with root privilegies can do `make install` and get the targets installed into system-install-dir/bin |
| 124 | +(usually /usr/local. __Notice the project installation path is printed out in the setp 4__). Users without root privileges can point the installation path to a different location cmake `-DCMAKE_INSTALL_PREFIX=<user-path>/ ../`. |
50 | 125 |
|
51 |
| -Installation and requirements |
52 |
| ------------------------------ |
| 126 | +The examples are named according to the convention `MCBooster_Example_<BACKEND AND COMPILER>_<EXAMPLE NAME>`. To run an example do `./example-name`. |
| 127 | +The examples are described below: |
53 | 128 |
|
54 |
| -MCBooster is a header only library, so no build process is necessary to install it. |
55 |
| -The library run on Linux systems and requires C++11 and the [Thrust library](https://thrust.github.io/). The code samples require [ROOT](https://root.cern.ch/) and [TCLAP](http://tclap.sourceforge.net/) library. |
56 |
| -CUDA based projects will require a local installation of [CUDA Tookit](https://developer.nvidia.com/cuda-toolkit) with version 6.5 or higher. |
57 |
| -Alternatively, projects the targeting [OpenMP](http://openmp.org/wp/) backend can be compiled with nvcc or gcc directly. |
| 129 | +1. __B2KPiJpsi__ : Generates a sample of B0 -> Jpsi K pi, with J/psi -> mu+ mu- and calculates in parallel, for each event, the variables: |
| 130 | + * M(K,pi), the Kpi invariant mass. |
| 131 | + * M(J/psi,pi), the J/psipi invariant mass. |
| 132 | + * cos theta(K), the helicity angle of the Kpi. |
| 133 | + * cos theta(mu), the helicity angle of the J/psi |
| 134 | + * phi, the angle between the decay planes |
| 135 | +
|
| 136 | +The program print some events and timing information to sdtout and plotsthe distributions of the above variables plus the B0 -> J/psiK pi Dalitz plot. |
| 137 | +
|
| 138 | +2. __GenerateSample__ : Takes arguments from the command line, generates a sample and save it into a ROOT TTree. |
| 139 | +
|
| 140 | +3. __PerformanceTest__: Meausure the time to generate and export samples in function of the number of events and number of particles. |
58 | 141 |
|
59 | 142 | Licensing
|
60 | 143 | ---------
|
61 | 144 |
|
62 | 145 | MCBooster is released under the [GNU General Public License version 3](http://www.gnu.org/licenses/gpl-3.0.en.html). Please see the file called [COPYING](https://github.com/MultithreadCorner/MCBooster/blob/master/COPYING).
|
63 | 146 |
|
| 147 | +Contact the developers |
| 148 | +---------------------- |
| 149 | +Here’s what you should do if you need help or would like to contribute: |
| 150 | +
|
| 151 | +1. If you need help or would like to ask a general question, subscribe and use https://groups.google.com/d/forum/mcbooster. |
| 152 | +2. If you found a bug, use GitHub issues. |
| 153 | +3. If you have an idea, use GitHub issues. |
| 154 | +4. If you want to contribute, submit a pull request. |
| 155 | +
|
64 | 156 | Author
|
65 | 157 | --------
|
66 | 158 |
|
67 |
| -MCBooster is developed and mantained by [Antonio Augusto Alves Jr](@AAAlvesJr). |
| 159 | +MCBooster was created and is mantained by [Antonio Augusto Alves Jr](@AAAlvesJr). |
68 | 160 |
|
69 | 161 | Acknowledgement
|
70 | 162 | ---------------
|
|
0 commit comments