Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/coordinate transforms #45

Merged
merged 43 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e5cdd8b
Add NamedType as dependency
austinschneider Jan 16, 2024
3a183cc
Add NamedType to cmake
austinschneider Jan 16, 2024
001a388
Define special named types for detector and geometry
austinschneider Jan 16, 2024
c1d339c
Sketch the new interface for DetectorModel
austinschneider Jan 16, 2024
c12fd1d
Sketch new interface for Path
austinschneider Jan 16, 2024
17941fa
Fix compilation issues in DetectorModel
austinschneider Jan 16, 2024
90cc1b2
Fix compilation issues in Path
austinschneider Jan 16, 2024
26e9069
Use new path interface for PointSourcePositionDistribution
austinschneider Jan 16, 2024
df8ea5d
Use new path interface for SecondaryPositionDistribution
austinschneider Jan 16, 2024
293387a
Use new path interface for DecayRangePositionDistribution
austinschneider Jan 16, 2024
65ad7af
Use new path interface for RangePositionDistribution
austinschneider Jan 16, 2024
808268a
Use new path interface for ColumnDepthPositionDistribution
austinschneider Jan 16, 2024
67dbd19
Missing one type tag
austinschneider Jan 16, 2024
74e6e06
Use new path interface for Injector. Removed SamplePairProduction.
austinschneider Jan 16, 2024
1ed97c2
Use new path interface for WeightingUtils.
austinschneider Jan 16, 2024
3fa70d2
Use new path interface for Weighter.
austinschneider Jan 16, 2024
36f703b
Use new path interface for TreeWeighter.
austinschneider Jan 16, 2024
2b950b1
Use new path interface for DetectorModel_TEST.
austinschneider Jan 16, 2024
37567bb
Use new path interface for Path_TEST.
austinschneider Jan 16, 2024
7b72679
Fix overloaded function casts in DetectorModel pybindings
austinschneider Jan 16, 2024
dd61e70
Perform correct coordinate system conversions in DetectorModel_TEST
austinschneider Jan 16, 2024
bab7af2
Add pybindings for Coordinates
austinschneider Jan 17, 2024
5d11f68
Update pybindings for Path to use the new interface
austinschneider Jan 17, 2024
7d7d978
Rework Flip()
austinschneider Jan 17, 2024
559c4c6
Start to fix Path_TEST
austinschneider Jan 17, 2024
fabcd4f
Add build badge
austinschneider Jan 17, 2024
98c0561
Add arithmetic operators with doubles
austinschneider Jan 17, 2024
39463ae
Allow Geometry coordinates on the python side. Only return Vector3D i…
austinschneider Jan 17, 2024
3e3c6e4
Remove MultiplicableTo in an attempt to make operator overloads unamb…
austinschneider Jan 18, 2024
e43bc10
Missing coordinate tranform in volume sampling
austinschneider Jan 18, 2024
f5a6020
Compute Q2 more robustly before checking bounds
austinschneider Jan 19, 2024
e63847f
Fix namespace of ostream operator
austinschneider Jan 19, 2024
3559bd7
Add physically normalized property to primary energy distributions in…
austinschneider Jan 22, 2024
d83f13b
Throw when adding duplicate distributions
austinschneider Jan 22, 2024
384055d
Fix how weighters are cancelled so that iterators are not invalidated
austinschneider Jan 22, 2024
cb37c67
updated tabulated flux distribution to handle zeros in input flux fil…
nickkamp1 Jan 14, 2024
1b4efca
clean up names in python code and existing examples
nickkamp1 Jan 14, 2024
9ab22a0
Add inf flags to Path (not yet used)
austinschneider Jan 22, 2024
2fc6383
Merge branch 'dev/coordinate_transforms' of github.com:Harvard-Neutri…
nickkamp1 Jan 22, 2024
9bd3020
starting to implement dipole CCM example
nickkamp1 Jan 14, 2024
c150ee2
fix dark news cross section bugs, reject unphysical cross sections
nickkamp1 Jan 15, 2024
b3a2c21
Require finite points in Path where necessary, make sure to properly …
nickkamp1 Jan 22, 2024
2b409a6
reverse infinite check order in clip_0/1
nickkamp1 Jan 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
[submodule "vendor/photospline"]
path = vendor/photospline
url = https://github.com/austinschneider/photospline.git
[submodule "vendor/NamedType"]
path = vendor/NamedType
url = https://github.com/joboccara/NamedType.git
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ include(delabella)
include(CFITSIO)
include(photospline)
include(googletest)
include(NamedType)

# load macros for googletest
include(testing)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build](https://github.com/Harvard-Neutrino/LeptonInjector/actions/workflows/build_wheels.yml/badge.svg)](https://github.com/Harvard-Neutrino/LeptonInjector/actions/workflows/build_wheels.yml)

# LeptonInjector

LeptonInjector is a framework for injecting and weighting interaction final states of complex topology, with specific concern for the detector geometry. LeptonInjector is designed to support a wide variety of neutrino experimental setups, including atmospheric neutrinos, accelerator beam decay-in-flight neutrinos, and neutrinos from decay-at-rest sources. The original [LeptonInjector-v1](https://github.com/icecube/LeptonInjector) was developed within the IceCube collaboration to study atmospheric and astrophysical neutrino interactions in the IceCube detector.
Expand Down
23 changes: 23 additions & 0 deletions cmake/Packages/NamedType.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
# Update submodules as needed
option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE)
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/vendor/NamedType/CMakeLists.txt")
message(STATUS "Submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/vendor/NamedType
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
endif()
endif()
endif()

if(NOT EXISTS "${PROJECT_SOURCE_DIR}/vendor/NamedType/CMakeLists.txt")
message(FATAL_ERROR "The NamedType submodule was not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
endif()

add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/NamedType" "extern/NamedType")
include_directories("${PROJECT_SOURCE_DIR}/vendor/NamedType/include")
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

#include "LeptonInjector/dataclasses/InteractionSignature.h"

namespace LI { namespace dataclasses { struct InteractionRecord; } }

std::ostream& operator<<(std::ostream& os, LI::dataclasses::InteractionRecord const& record);

namespace LI {
namespace dataclasses {

Expand All @@ -38,7 +42,7 @@ struct InteractionRecord {
std::vector<double> secondary_helicity;
std::vector<double> interaction_parameters;
bool operator==(InteractionRecord const & other) const;
friend std::ostream& operator<<(std::ostream& os, InteractionRecord const& record);
friend std::ostream& ::operator<<(std::ostream& os, InteractionRecord const& record);
template<class Archive>
void serialize(Archive & archive, std::uint32_t const version) {
if(version == 0) {
Expand Down
262 changes: 212 additions & 50 deletions projects/detector/private/DetectorModel.cxx

Large diffs are not rendered by default.

Loading