From 15020355a686604ad9401db4127d84abedffb0fb Mon Sep 17 00:00:00 2001 From: gwm17 Date: Tue, 30 Aug 2022 10:34:16 -0400 Subject: [PATCH] Fix naming convention on executables: MaskApp->Kinematics, DetectEff->Detectors. Update README --- README.md | 20 ++++++++++---------- src/Detectors/CMakeLists.txt | 12 +++++------- src/Kinematics/CMakeLists.txt | 12 ++++++++++++ src/{MaskApp => Kinematics}/main.cpp | 0 src/MaskApp/CMakeLists.txt | 12 ------------ src/Plotters/CMakeLists.txt | 1 - 6 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 src/Kinematics/CMakeLists.txt rename src/{MaskApp => Kinematics}/main.cpp (100%) delete mode 100644 src/MaskApp/CMakeLists.txt diff --git a/README.md b/README.md index f28a651..cb1950b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# MASK: Monte cArlo Simulation of Kinematics -MASK is a Monte Carlo simulation of reaction kinematics for use detector systems at Florida State University. -MASK is capable of simulating multi-step kinematic reaction-decay sequences, storing data in ROOT Trees, after which the kinematic data can be fed to a detector geometry for efficiency testing. Currently geometries for ANASEN and SABRE are included in the code. +# Mask: Monte cArlo Simulation of Kinematics +Mask is a Monte Carlo simulation of reaction kinematics for use detector systems at Florida State University. +Mask is capable of simulating multi-step kinematic reaction-decay sequences, storing data in ROOT Trees, after which the kinematic data can be fed to a detector geometry for efficiency testing. Currently geometries for ANASEN and SABRE are included in the code. -## Building MASK +## Building Mask Dowload the repository from github. CMake is use to build the project; in most environments you can build Mask using the following methods: - `mkdir build` - `cd build` @@ -14,7 +14,7 @@ Executables will be installed to the repostiory's `bin` directory. Libraries wil By default Mask builds for release. To build for debug replace `cmake ..` with `cmake -DCMAKE_BUILD_TYPE=Debug ..`. Mask uses CMake to find the installed ROOT libraries and headers. ## Using the kinematics simulation -By default MASK is capable of simulating reactions of up to three steps. Here is a brief outline of each type: +By default Mask is capable of simulating reactions of up to three steps. Here is a brief outline of each type: 0. A pure decay involves a "target" decaying into an ejectile and residual. It is assumed isotropic by default; any other case will require the modification of the code. 1. A single step reaction involves a target being hit by a projectile and emitting an ejectile and a residual. It can incorporate all of the input file sampling parameters. @@ -23,9 +23,9 @@ By default MASK is capable of simulating reactions of up to three steps. Here is For decays, a specific angular distribution can be given as input as a text file with values of coefficiencts of a Legendre polynomial series. Examples can be found in the `./etc` directory, including an isotropic case. It is assumed that the decays in the center-of-mass frame are isotropic in phi (i.e. m=0). Decay1 corresponds to the first decay, if there are multiple steps, Decay2 to the second. If there are no decays, these parameters are not used (or if only one decay, Decay2_AngularMomentum is not used). The input file requires that the user include target information, which will be used to calculate energy loss for all of the reactants and reaction products. The energy loss through materials is calculated using the `catima` library (found in `src/vendor`), which is a C/C++ interface to the `atima` library (the same energy loss methods used by LISE). The target can contain layers, and each layer can be composed of a compound of elements with a given stoichiometry. If the user wishes to not include energy loss in the kinematics, simply give all target layers a thickness of 0. Note that more layers and more thickness = more time spent calculating energy loss. These energy loss methods are only applicable for solid targets, and should not be applied to gas or liquid targets. Energy loss calculations have a stated uncertainty of approximately five percent. -To run MASK simply do the following from the MASK repository: +To run Mask simply do the following from the Mask repository: -`./bin/MaskApp input.txt` +`./bin/Kinematics input.txt` Input.txt can be replaced by any text file with the correct format. @@ -34,14 +34,14 @@ Detector geometry is encoded using ROOT math libraries in the `src/Detectors` fo To choose which detector scheme is run, modify the main function in `src/Detectors/main.cpp`. The included geometries also have options to do an internal geometry consistency check and print out coordinates for drawing the detector arrays, which can be useful for testing. -To run DetEff use the format +To run Detectors use the format -`./bin/DetEff ` +`./bin/Detectors ` where the detection datafile contains all of the kinematics data as well as information about which particles are detected and the statsfile is a text file containing efficiency statistics. ## Data visualization -All data is saved as ROOT trees of std::vectors of Mask::Nucleus classes. To enable this, a ROOT dictionary is generated and linked into a shared library found in the `lib` directory of the repository. This allows the user to link to the shared library for accessing and analyzing the data generated by MASK. +All data is saved as ROOT trees of std::vectors of Mask::Nucleus classes. To enable this, a ROOT dictionary is generated and linked into a shared library found in the `lib` directory of the repository. This allows the user to link to the shared library for accessing and analyzing the data generated by Mask. Mask also provides a default visualization tool called RootPlot. RootPlot is run as diff --git a/src/Detectors/CMakeLists.txt b/src/Detectors/CMakeLists.txt index 0165619..c3c5232 100644 --- a/src/Detectors/CMakeLists.txt +++ b/src/Detectors/CMakeLists.txt @@ -1,7 +1,7 @@ -add_executable(DetectEff) -target_include_directories(DetectEff PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..) +add_executable(Detectors) +target_include_directories(Detectors PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..) -target_sources(DetectEff PUBLIC +target_sources(Detectors PUBLIC AnasenDeadChannelMap.cpp AnasenDeadChannelMap.h AnasenEfficiency.cpp @@ -20,10 +20,8 @@ target_sources(DetectEff PUBLIC StripDetector.h ) -target_link_libraries(DetectEff - MaskDict +target_link_libraries(Detectors Mask - catima ) -set_target_properties(DetectEff PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MASK_BINARY_DIR}) \ No newline at end of file +set_target_properties(Detectors PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MASK_BINARY_DIR}) \ No newline at end of file diff --git a/src/Kinematics/CMakeLists.txt b/src/Kinematics/CMakeLists.txt new file mode 100644 index 0000000..4b54669 --- /dev/null +++ b/src/Kinematics/CMakeLists.txt @@ -0,0 +1,12 @@ +add_executable(Kinematics) +target_include_directories(Kinematics PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..) + +target_sources(Kinematics PUBLIC + main.cpp +) + +target_link_libraries(Kinematics + Mask +) + +set_target_properties(Kinematics PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MASK_BINARY_DIR}) \ No newline at end of file diff --git a/src/MaskApp/main.cpp b/src/Kinematics/main.cpp similarity index 100% rename from src/MaskApp/main.cpp rename to src/Kinematics/main.cpp diff --git a/src/MaskApp/CMakeLists.txt b/src/MaskApp/CMakeLists.txt deleted file mode 100644 index 8c4e80c..0000000 --- a/src/MaskApp/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -add_executable(MaskApp) -target_include_directories(MaskApp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..) - -target_sources(MaskApp PUBLIC - main.cpp -) - -target_link_libraries(MaskApp - Mask -) - -set_target_properties(MaskApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MASK_BINARY_DIR}) \ No newline at end of file diff --git a/src/Plotters/CMakeLists.txt b/src/Plotters/CMakeLists.txt index 976effa..dc9d2d0 100644 --- a/src/Plotters/CMakeLists.txt +++ b/src/Plotters/CMakeLists.txt @@ -12,7 +12,6 @@ target_sources(RootPlot PUBLIC ) target_link_libraries(RootPlot - MaskDict Mask ${ROOT_LIBRARIES} )