{"id":21987024,"url":"https://github.com/marcodeltutto/ubana","last_synced_at":"2025-03-23T02:26:17.689Z","repository":{"id":68608671,"uuid":"126754432","full_name":"marcodeltutto/UBAna","owner":"marcodeltutto","description":"Code to study neutrino cross sections at MicroBooNE","archived":false,"fork":false,"pushed_at":"2019-07-21T04:32:44.000Z","size":7194,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T05:27:55.513Z","etag":null,"topics":["cross-section","microboone","neutrino","particle-physics"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcodeltutto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-26T00:52:53.000Z","updated_at":"2025-01-20T06:21:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d495920-2a62-420b-a51a-18a7a8919448","html_url":"https://github.com/marcodeltutto/UBAna","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodeltutto%2FUBAna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodeltutto%2FUBAna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodeltutto%2FUBAna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodeltutto%2FUBAna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcodeltutto","download_url":"https://codeload.github.com/marcodeltutto/UBAna/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245046414,"owners_count":20552191,"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":["cross-section","microboone","neutrino","particle-physics"],"created_at":"2024-11-29T18:26:42.692Z","updated_at":"2025-03-23T02:26:17.666Z","avatar_url":"https://github.com/marcodeltutto.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UBAna\n\nBased on https://github.com/drinkingkazu/LiteFMWK.\n\n## How to use it\n\nClone the repository:\n```\ngit clone https://github.com/marcodeltutto/UBAna.git\ncd UBAna\n```\n\nJust try:\n```\nsource setup.sh\n```\nThis sets up necessary shell env. variables. \nYou need to have `ROOT6` (if not, you get an error message from `setup.sh`). The suppoerted ROOT version is v6.06.06.\nThere's a support to detect `numpy` and provide a few handy compiler directives as well. Although `numpy` is not required to run the basic functionalities of this code.\nThis software is compatible with both macOS and linux operative systems.\n\nTo build:\n```\nmake\n```\nThen you are good to go. In a new session, just source the setup script.\n\n## How to run the CCInclusive analysis\n\nThe code is logically divided into two parts:\n* the `Maker`, that loops over the events in the ubxsec file, and makes all the necessary histograms needed for the analysis. The `Maker` needs to be run over MC, and data files.\n* the `Analyser`, that takes the files produced by the `Maker` as input , produces all the relevant plots, and extracts the cross section.\n\nThe python script `Main/mac/run_maker.py` allows to run the `Maker` over the BNBCosmic MC file, and the EXTBNB and BNBON data files. You need to modify `run_maker.py` so that it will take as input the UBXSec files that you have produced.\n\nThe python script `Main/mac/analyse.py` allows to run the `Analyser` and extract the cross section. You need to modify the script so that it will take the files produced by the `Maker` as input. You also need to set the right number of BNBON and EXTBNB triggers. To retrive the number of trigger events from a UBXSec file, you can use this script: `https://github.com/marcodeltutto/UBXSec/blob/master/Utils/countPOT.py`.\n\n## More information for developers\n\n### How to make a new _package_?\nJust try:\n```\ngen_my_package Aho\n```\n... which will generate a directory named `Aho` under the repository top directory.\nA new package comes with `GNUmakefile` which allows you to compile a package by simply typing `make` in the package directory.\nYou also find `sample.h` and `sample.cxx`. \nThese are very much empty C++ classes just to demonstrate that you can `make` and access them from an interpreter.\n```\npython -c \"import ROOT;print ROOT.Aho.sample()\"\n```\n\n### Generating a new class\nIn a package directory you can generate a new class. You can of course just type-it-up from scratch.\nYou can also try:\n```\ngen_my_class Tako\n```\n... which generates `Tako.h` and `Tako.cxx` much like `sample` class.  Again, to compile, you can just type  `make`.\n\nIf you have written your class from scratch, make sure you add your class to `LinkDef.h` if you want a dictionary generation (e.g. if you want an access from an interpreter).\n\n### Example?\nYou can find an example in this branch:\n```\ngit checkout example\n```\n\n### Compiling multiple packages\nNo one wants to `cd` package directory and `make` for every package. You can utilize the top level `GNUmakefile` which is extremely simple and hopefully self-descriptive. All you need to do is to list (space-separated) packages in `SUBDIRS` variable.\n\n### Excluding a class from dictionary generation\nSometimes you don't want to expose your C++ class to an interpreter.\nAssuming your C++ class is already registered in the dictionary (a mechanism to make your class available in an interpreter), simply exclude it from `LinkDef.h`.\n\nIf you wonder when you want to do it, here's some example reasons:\n* Compilation is so slow (auto-generated dictionary source code is usually _really_ long, like easily 10,000 lines, taking long time to compile)\n* Ugh I keep getting dictionary compilation error (auto-generation of dictionary source code is far from being perfect, especially for the latest C++ standards... if troublesome, exclude)\n\n### Making inter-package dependencies\nTo make one package depend on another, you typically want to know 2 information: headers to be included and libraries to be linked against.\nHere are two pieces of information you may find it useful/handy:\n*  Package libraries are compiled and available under `$MYSW_LIBDIR/libLiteFMWK_$(PACKAGE_NAME).so`\n*  Package header files are copied and available under `$MYSW_INCDIR/ubana/$(PACKAGE_NAME)`\n... where you substitute `$(PACKAGE_NAME)` with the actual name string.\n\nWith these info, you know what you need to do for your new package compilation that depends on those.\n\n1. Add compiler flags\n  * `-I$(MYSW_INCDIR)`\n  * `-L$(MYSW_LIBDIR) -lLiteFMWK_$(PACKAGE_NAME).so`\n  \n2. Include statements in the source codes\n  * `#include \"ubana/$(PACKAGE_NAME)/$(WANTED_HEADER)\"`\n  * ... where `$(WANTED_HEADER)` is the header file you want (like `sample.h`).\n\nFor example, add:\n\n```\nINCFLAGS += -I$(MYSW_INCDIR) \nLDFLAGS += -L$(MYSW_LIBDIR) -lLiteFMWK_Base\n```\njust before\n``` \ninclude $(MYSW_DIR)/Makefile/Makefile.${OSNAME} \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcodeltutto%2Fubana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcodeltutto%2Fubana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcodeltutto%2Fubana/lists"}