|
1 | | -# LEAF |
2 | | -Low Energy Algoritm Framework |
| 1 | +# :seedling: LEAF :seedling: |
| 2 | + |
| 3 | +<ins>**L**</ins>ow <ins>**E**</ins>nergy <ins>**A**</ins>lgorithm <ins>**F**</ins>ramework |
| 4 | + |
| 5 | + |
| 6 | +# DESCRIPTION |
3 | 7 |
|
4 | 8 | This algorithm is an alternative and simple LE fitter than can be used for HyperK and SuperK. |
5 | 9 |
|
6 | 10 | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
7 | 11 | 2020/02/09: LEAF was convert as a C++ class and can be included in your code. |
| 12 | +~~~~~~~~~~~~~~~~~~~~~~~~~ |
8 | 13 |
|
9 | | -New compilation method: |
10 | 14 |
|
11 | | - source RunAtStart.sh |
12 | | - ./SetupDataModel.sh |
13 | | - cd leaf/ |
14 | | - make clean; make |
15 | | - |
16 | | -In order to use the class in your code look at example/ |
17 | | -~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 | +# DOWNLOAD AND PRE-REQUISITES |
| 16 | + |
| 17 | +To download this repository use : |
| 18 | + |
| 19 | +``` |
| 20 | +git clone --single-branch --branch develop_lite https://github.com/hyperk/LEAF.git |
| 21 | +``` |
| 22 | + |
| 23 | +Then make sure the following pre-requisites are installed. |
| 24 | +1. ROOT v5r34 or superior (not tested for older versions, but might work). |
| 25 | +2. WCSim version compatible with your ROOT version. |
| 26 | +3. BONSAI installation (although LEAF can work without it). |
| 27 | + |
| 28 | +# COMPATIBILITY |
18 | 29 |
|
19 | | -# Pre-requisite to use the code: |
20 | | -1. BONSAI installation. |
21 | | -2. ROOT v5r34 or superior (not tested for older versions, but might work). |
22 | | -3. HKAstroAnalysis class is private and can be downloaded by SK collaborators on sukap cluster. |
| 30 | +Versions listed below have been tested so far. |
23 | 31 |
|
24 | | -# Compatibility tested so far: |
25 | 32 | 1. WCSim-hybrid version: for geometries "HyperK", "HyperK_mPMT", "HyperK_HybridmPMT", "HyperK_HybridmPMT10PC" |
26 | 33 | 2. In general, with all WCSim-hybrid geometries using whether BoxandLine20inchHQE or PMT3inchR14374 PMTs. |
27 | 34 | 3. With official HK WCSim: Ask G. Pronost. |
28 | 35 |
|
29 | | -# How to: |
30 | | -1. Source RunAtStart.sh after you updated your ROOT directory. |
31 | | -2. Use the script ./SetupDataModel.sh to define the DataModel (if you have hk-AstroAnalysis, you should setup the global variable) |
32 | | -2. Enter the leaf/ repository and make clean;make |
33 | | -3. Enter the example repository and make clean;make |
34 | | -4. One example of how to run the code is set in example: test_example.sh |
35 | | -5. inputs PDF, input from WCSim can be downloaded on sukap cluster. Please untar them in the LEAF repository. |
36 | | -6. You can use shell scripts in shell/ in order to run the fitter or launch on batch. |
37 | | - |
38 | | -# Useful scripts in ./macros and ./shell |
39 | | -You can compile with GNUMake like following in ./macros: |
| 36 | + |
| 37 | +# INSTALLATION |
| 38 | + |
| 39 | +1. Go to libWCSIM/ repository and make softlinks to your WCSim installation. |
| 40 | +``` |
| 41 | +$ cd libWCSIM/ |
| 42 | +$ ln -s /path/to/your/WCSim/include/ include |
| 43 | +$ ln -s /path/to/your/WCSim/src/ src |
| 44 | +$ ln -s /path/to/your/WCSim/lib/libWCSimRoot.so libWCSimRoot.so |
| 45 | +$ ln -s /path/to/your/WCSim/lib/libWCSimRoot.so.1.12.xx libWCSimRoot.so.1.12.xx |
40 | 46 | ``` |
| 47 | +2. Go to the cloned LEAF repository and source the script RunAtStart.sh after making sure you are sourcing the proper ROOT directory. |
| 48 | +``` |
| 49 | +$ cd /path/to/the/cloned/repository/LEAF |
| 50 | +$ source ./RunAtStart.sh |
| 51 | +``` |
| 52 | +3. Enter the leaf/ repository and `make clean; make` |
| 53 | +4. Enter the example/ repository and `make clean; make` |
| 54 | +5. One example of how to run the code is set in example: test_example.sh |
| 55 | + |
| 56 | +# TUNING FILES |
| 57 | + |
| 58 | +Tuning files are provided in the inputs/ repository (e.g. ./inputs/timePDF_Directionality_DRnew.root) and are made from 10 MeV electrons generated isotropically and uniformly in the tank. |
| 59 | +Alternatively, you can generate your own PDFs by following the commands below. |
| 60 | + |
| 61 | +1. Go to macros/ repository and compile AnalyzeWSHierarchy and ProducePDF with GNUMake. |
| 62 | +``` |
| 63 | +$ cd ./macros |
| 64 | +$ make AnalyzeWSHierarchy |
41 | 65 | $ make ProducePDF |
42 | 66 | ``` |
43 | | -## Making tuning file (e.g. ./inputs/timePDF_Directionality_DRnew.root) |
44 | | -1. Produce plots by AnalyzeWSHierarchy: reads out WCSim output and makes plots. |
45 | | -2. Produce time PDF (and angular PDF) by ProducePDF: uses plots made by AnalyzeWSHierarchy and generate PDFs for LEAF. |
46 | 67 |
|
| 68 | +2. Produce plots using AnalyzeWSHierarchy which reads out WCSim output. Optionally, you can index a range of events to read with -s (start index) and -e (end index). Use option -h if when using a hybrid HK geometry presenting both PMTs and mPMTs. |
47 | 69 | ``` |
48 | | -$ AnalyzeWSHierarchy -f wcrim_hybrid.root -o plots.root |
49 | | -$ ProducePDF -f plots.root -o PDF.root |
| 70 | +$ ./AnalyzeWSHierarchy -i wcrim.root -o plots.root -s 0 -e 1000 -h |
50 | 71 | ``` |
51 | 72 |
|
52 | | -## Making generic plots |
53 | | -- LEAFOutputAnalysisHybrid_leafclass: read LEAF output to produce generic plots. If one uses the master branch for LEAF, please use LEAFOutputAnalysisHybrid_master |
| 73 | +3. Produce time PDF and angular PDF using ProducePDF: uses plots made using AnalyzeWSHierarchy and generate PDFs for LEAF. |
| 74 | +``` |
| 75 | +$ ./ProducePDF -i wcsim.root -o PDF.root -s 0 -e 1000 -v |
| 76 | +``` |
54 | 77 |
|
55 | | -## Shell scripts for analysis of large files |
56 | | -You can refere shell scripts in ./shell in order to analyze many files. |
57 | | -They are not working with latest LEAF class and its examples. They are just example how to analyze. |
| 78 | +Pathes to PDF files required as inputs for LEAF are hard-coded inside leaf/LeafSplines.cc, inside the LoadSplines() methods. |
| 79 | +Make sure these pathes are consistant with the files you generate on your own. |
58 | 80 |
|
59 | | -- generateShellXX.c: this is a root macro which generates shell scripts to be submitted to sukap by LauncherXX.sh |
60 | | - - generateShell.c |
61 | | - - generateShell_analyzeWCSim.c |
62 | | -- LauncherXX.sh: this submits jobs to sukap |
63 | | - - Launcher.sh |
64 | | - - Launcher_analyzeWCSim.sh |
65 | | -- Merger_analyzeWCSim.sh: merge generated output by Launcher_analyzeWCSim.sh |
66 | 81 |
|
0 commit comments