{"id":26253937,"url":"https://github.com/p2-718na/alice-simulation","last_synced_at":"2025-03-13T18:18:42.943Z","repository":{"id":46035604,"uuid":"417045023","full_name":"P2-718na/ALICE-simulation","owner":"P2-718na","description":"Code for my Lab-2 course. ","archived":false,"fork":false,"pushed_at":"2022-01-02T23:32:55.000Z","size":583,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T22:47:36.400Z","etag":null,"topics":["cern-root","data-analysis"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/P2-718na.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-14T08:13:16.000Z","updated_at":"2022-01-02T23:32:58.000Z","dependencies_parsed_at":"2022-09-06T04:20:41.079Z","dependency_job_id":null,"html_url":"https://github.com/P2-718na/ALICE-simulation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P2-718na%2FALICE-simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P2-718na%2FALICE-simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P2-718na%2FALICE-simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P2-718na%2FALICE-simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/P2-718na","download_url":"https://codeload.github.com/P2-718na/ALICE-simulation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243456562,"owners_count":20293905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cern-root","data-analysis"],"created_at":"2025-03-13T18:18:42.278Z","updated_at":"2025-03-13T18:18:42.934Z","avatar_url":"https://github.com/P2-718na.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"Alma Mater Studiorum Logo\" src=\"assets/unibo-logo.png\"\u003e\n\u003c/div\u003e\n\n# ALICE-simulation\nThis is my project for my Physics laboratory-2 course at University of Bologna.\nThe goal of this project is to simulate a real-world use case for ROOT software.\nThe project is divided in two parts. Firstly, we will generate data using the\nMontecarlo method, then we will analyze that data using ROOT's powerful\ninstruments.\n\n## Experiments\nThis code aims to generate data that mimics real collision events recorded by\nthe ALICE detector at CERn. I've structured this project so that new experiments\nand event generation rules can be added easily, along with new types of\nparticles. The generated data can then be saved to ROOT histograms (or other).\n\n### Kaon* decay experiment\nThe K* particle is unstable, and decays into a Pion-Kaon pair as soon\nas it is generated. This means that we cannot observe this particle directly,\nbut we can prove its existence through statistical analysis. This experiments\nsimulates the generation and decay of K* particles in collision events. The data\ngenerated by this simulation is then analysed (see [kstar-decay-analysis][1], [analysis results][2]).\n\n--------------------------------------------------------------------------------\n\n## Dependencies\n- [ROOT](https://root.cern/) (required, version 6.18^)\n- [CMake](https://cmake.org/) (recommended)\n- [Doctest](https://github.com/onqtam/doctest) (bundled)\n- [Lyra](https://github.com/bfgroup/Lyra) (bundled)\n\n## Building\nThe best way to build this code is by using CMake. I recommend you build in\n`Release` configuration, as the data generation is slow.\n```shell\ntake build\ncmake -DCMAKE_BUILD_TYPE=Release ..\nmake\n```\nThe program executable will be generated inside the build folder.\n\n### NOTE: Building ROOT application with CMake\nI run into some trouble while trying to compile ROOT with CMake.\nI think the solution is just to use the latest version of ROOT (at least\nversion 6.18, I tested it out on 6.24). If you encounter any other problem,\ngood luck.\n\n## Running\nThis code was tested and running on _Mac OS X 10.14.6 Mojave_ and\n_Ubuntu 20.04 LTS (running on WSL)_.\n\n### Generating data\nSimply run\n```bash\n./lab -e N\n```\nwhere N is the order of magnitude of collision events you want to generate\n(e.g. `./lab -e 5` will generate 1E5 events).\n\n### Running on WSL\nThis is the same as running on a normal unix distribution. There is a catch,\nthough: ROOT uses dynamic libraries, and they are loaded into `$LD_LIBRARY_PATH`\nwhen you `source thisroot.sh`. This means that, if you are launching the program\nfrom outside WSL (e.g. using CLion), your program _will not_ find the required\nlibraries. If you want to run the program, you can either setup the required\nenvironment variables manually, or just launch it from a terminal shell.\n\n### Testing\nCurrently there are no tests available. I left a doctest boilerplate in case I\nneed to add them later.\n\n--------------------------------------------------------------------------------\n\n## Additional notes\nI had some specific requirements for writing this code (see [trace 1][A],\n[trace 2][B]); In particular, I had to use dynamic polymorphism. I didn't like\nthe proposed solution a lot, and so I took some liberties and changed some\nthings around. I don't think my code is perfect, but I find this solution to be\na bit tidier than the proposed one.\n\n[1]: https://github.com/P2-718na/kstar-decay-analysis\n[2]: https://github.com/P2-718na/kstar-decay-analysis/blob/master/notebooks/kstar-decay.ipynb\n\n[A]: assets/trace.pdf\n[B]: assets/trace2.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2-718na%2Falice-simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp2-718na%2Falice-simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2-718na%2Falice-simulation/lists"}