mirror of
https://github.com/gwm17/Mask.git
synced 2024-11-22 10:18:50 -05:00
Switched to build with cmake rather than premake for easier ROOT integration
This commit is contained in:
parent
95c05cc3af
commit
c4ef429d8b
14
CMakeLists.txt
Normal file
14
CMakeLists.txt
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
|
project(Mask)
|
||||||
|
|
||||||
|
set(MASK_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/bin)
|
||||||
|
set(MASK_LIBRARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
||||||
|
set(MASK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
|
add_subdirectory(src/Mask)
|
||||||
|
add_subdirectory(src/MaskApp)
|
||||||
|
add_subdirectory(src/Detectors)
|
||||||
|
add_subdirectory(src/Plotters/ROOT)
|
19
src/Detectors/CMakeLists.txt
Normal file
19
src/Detectors/CMakeLists.txt
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
add_executable(DetectEff)
|
||||||
|
target_include_directories(DetectEff PUBLIC ${MASK_INCLUDE_DIR})
|
||||||
|
|
||||||
|
target_sources(DetectEff PUBLIC
|
||||||
|
AnasenDeadChannelMap.cpp
|
||||||
|
AnasenEfficiency.cpp
|
||||||
|
DetectorEfficiency.cpp
|
||||||
|
QQQDetector.cpp
|
||||||
|
SabreDeadChannelMap.cpp
|
||||||
|
SabreDetector.cpp
|
||||||
|
SabreEfficiency.cpp
|
||||||
|
StripDetector.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(DetectEff
|
||||||
|
Mask
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(DetectEff PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MASK_BINARY_DIR})
|
29
src/Mask/CMakeLists.txt
Normal file
29
src/Mask/CMakeLists.txt
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
add_library(Mask STATIC)
|
||||||
|
target_include_directories(Mask
|
||||||
|
PUBLIC ${MASK_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_sources(Mask PRIVATE
|
||||||
|
AngularDistribution.cpp
|
||||||
|
DecaySystem.cpp
|
||||||
|
EnergyLoss.cpp
|
||||||
|
LayeredTarget.cpp
|
||||||
|
LegendrePoly.cpp
|
||||||
|
MaskApp.cpp
|
||||||
|
MaskFile.cpp
|
||||||
|
MassLookup.cpp
|
||||||
|
Nucleus.cpp
|
||||||
|
OneStepSystem.cpp
|
||||||
|
RandomGenerator.cpp
|
||||||
|
Reaction.cpp
|
||||||
|
ReactionSystem.cpp
|
||||||
|
Rotation.cpp
|
||||||
|
Stopwatch.cpp
|
||||||
|
Target.cpp
|
||||||
|
ThreeStepSystem.cpp
|
||||||
|
TwoStepSystem.cpp
|
||||||
|
Vec3.cpp
|
||||||
|
Vec4.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(Mask PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${MASK_LIBRARY_DIR})
|
|
@ -126,6 +126,8 @@ namespace Mask {
|
||||||
input>>junk>>par1;
|
input>>junk>>par1;
|
||||||
switch(m_rxn_type)
|
switch(m_rxn_type)
|
||||||
{
|
{
|
||||||
|
case RxnType::PureDecay : break;
|
||||||
|
case RxnType::None : break;
|
||||||
case RxnType::OneStepRxn :
|
case RxnType::OneStepRxn :
|
||||||
{
|
{
|
||||||
dynamic_cast<OneStepSystem*>(m_sys)->SetReactionThetaType(par1);
|
dynamic_cast<OneStepSystem*>(m_sys)->SetReactionThetaType(par1);
|
||||||
|
@ -152,6 +154,8 @@ namespace Mask {
|
||||||
input>>junk>>dfile2;
|
input>>junk>>dfile2;
|
||||||
switch(m_rxn_type)
|
switch(m_rxn_type)
|
||||||
{
|
{
|
||||||
|
case RxnType::PureDecay : break;
|
||||||
|
case RxnType::None : break;
|
||||||
case RxnType::OneStepRxn :
|
case RxnType::OneStepRxn :
|
||||||
{
|
{
|
||||||
DecaySystem* this_sys = dynamic_cast<DecaySystem*>(m_sys);
|
DecaySystem* this_sys = dynamic_cast<DecaySystem*>(m_sys);
|
||||||
|
|
12
src/MaskApp/CMakeLists.txt
Normal file
12
src/MaskApp/CMakeLists.txt
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
add_executable(MaskApp)
|
||||||
|
target_include_directories(MaskApp PUBLIC ${MASK_INCLUDE_DIR})
|
||||||
|
|
||||||
|
target_sources(MaskApp PUBLIC
|
||||||
|
main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(MaskApp
|
||||||
|
Mask
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(MaskApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MASK_BINARY_DIR})
|
17
src/Plotters/ROOT/CMakeLists.txt
Normal file
17
src/Plotters/ROOT/CMakeLists.txt
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
find_package(ROOT REQUIRED)
|
||||||
|
add_executable(RootPlot)
|
||||||
|
target_include_directories(RootPlot
|
||||||
|
PUBLIC ${MASK_INCLUDE_DIR}
|
||||||
|
SYSTEM PUBLIC ${ROOT_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_sources(RootPlot PUBLIC
|
||||||
|
RootPlotter.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(RootPlot
|
||||||
|
Mask
|
||||||
|
${ROOT_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(RootPlot PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MASK_BINARY_DIR})
|
|
@ -163,6 +163,7 @@ std::vector<Mask::Nucleus> GetParents(const Mask::MaskFileData& data, Mask::RxnT
|
||||||
Mask::Nucleus temp1, temp2, temp3;
|
Mask::Nucleus temp1, temp2, temp3;
|
||||||
switch(rxn_type)
|
switch(rxn_type)
|
||||||
{
|
{
|
||||||
|
case Mask::RxnType::None : break;
|
||||||
case Mask::RxnType::PureDecay :
|
case Mask::RxnType::PureDecay :
|
||||||
{
|
{
|
||||||
temp1.SetIsotope(data.Z[0], data.A[0]);
|
temp1.SetIsotope(data.Z[0], data.A[0]);
|
||||||
|
@ -210,6 +211,7 @@ std::vector<Mask::Nucleus> GetParents(const Mask::MaskFileData& data, Mask::RxnT
|
||||||
return parents;
|
return parents;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return parents;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetThetaCM(Mask::Nucleus& daughter, const Mask::Nucleus& parent)
|
void SetThetaCM(Mask::Nucleus& daughter, const Mask::Nucleus& parent)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user