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

New record types and new injector inheritance #49

Merged
merged 147 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
4b25831
Change decay and interaction paramters to std::map<std::string, doubl…
austinschneider Jan 26, 2024
29498b4
Split build and update action versions
austinschneider Jan 26, 2024
16dd57a
Remove comment
austinschneider Jan 26, 2024
aff96f1
Add defaults
austinschneider Jan 26, 2024
b1aa201
Add InteractionSignature tests
austinschneider Jan 26, 2024
7471837
Add comparison operator
austinschneider Jan 26, 2024
ccb8457
Add InteractionRecord test
austinschneider Jan 26, 2024
ad40f4d
Remove arm64 job since Apply silicon runners are not available
austinschneider Jan 26, 2024
3f0beeb
Update actions to be compatible with actions/upload-artifact@v4
austinschneider Jan 28, 2024
d273551
Whitespace
austinschneider Jan 31, 2024
a516448
Add additional add_entry functions
austinschneider Jan 31, 2024
54cf400
Add initial primary position to interaction record
austinschneider Jan 31, 2024
98f0492
ParticleID
austinschneider Jan 31, 2024
a9a5966
Remove unused headers
austinschneider Feb 1, 2024
7590cec
Update InteractionRecord and test
austinschneider Feb 1, 2024
23bf32a
Add IDs
austinschneider Feb 1, 2024
7cd64b7
Include mutex
austinschneider Feb 1, 2024
ce06479
Test IDs and actually compare strings in serialization test
austinschneider Feb 1, 2024
7dbdc56
Whitespace
austinschneider Feb 1, 2024
4423311
Whitespace
austinschneider Feb 3, 2024
0637920
Spacing
austinschneider Feb 3, 2024
7f22066
Separate ParticleType. Turn Particle class into something useful.
austinschneider Feb 4, 2024
6022a6a
Add flag for if ParticleID is set
austinschneider Feb 4, 2024
2f810e6
Whitespace. Add Particle constructors. Add method for particle ID gen…
austinschneider Feb 4, 2024
a5d0602
Make InteractionRecord data private and add accessor methods.
austinschneider Feb 4, 2024
8909fbd
Should be member functions
austinschneider Feb 4, 2024
c8f9dc3
Use X-macros to define particle types
austinschneider Feb 4, 2024
4aee2a2
Remove old functions. Fix compilation error
austinschneider Feb 4, 2024
120316b
Fix compilation errors
austinschneider Feb 4, 2024
162a283
Build ParticleType.cxx
austinschneider Feb 4, 2024
e156a48
Fix access to private members
austinschneider Feb 4, 2024
e136a1b
More accessor methods
austinschneider Feb 4, 2024
13f78c6
Use public accessor methods for InteractionRecord
austinschneider Feb 4, 2024
6a518e0
struct --> class
austinschneider Feb 4, 2024
0dedb45
Add length
austinschneider Feb 5, 2024
b5c5eea
Define PrimaryRecord and SecondaryRecord concepts. Remove target_mome…
austinschneider Feb 5, 2024
2d38c78
Add default copy constructor for Particle
austinschneider Feb 5, 2024
6ef2dff
Fix compilation errors in InteractionRecord
austinschneider Feb 5, 2024
a290e8a
Remove things related to target momentum
austinschneider Feb 5, 2024
be981f1
Rename secondary_helicity
austinschneider Feb 5, 2024
b45b268
Fix some issues related to private member access
austinschneider Feb 5, 2024
c28a2be
Sketch special record classes to limit modification of InteractionRecord
austinschneider Feb 6, 2024
9b491ed
Fix compilation and type issues
austinschneider Feb 7, 2024
37979cd
More convenience methods and const fixes
austinschneider Feb 7, 2024
a5cb893
Use new CrossSectionDistributionRecord
austinschneider Feb 7, 2024
38687b4
Changes to work with new record types
austinschneider Feb 7, 2024
d48a44b
Add record reference to PrimaryDistributionRecord. Add GetPrimaryPart…
austinschneider Feb 10, 2024
cfb5c83
Use new record in decay
austinschneider Feb 10, 2024
c707b93
Use new record in DISFromSpline
austinschneider Feb 10, 2024
457813d
Use new record in DarkNewsCrossSection
austinschneider Feb 10, 2024
7077eca
Use new record in DarkNewsDecay
austinschneider Feb 10, 2024
b1377aa
Use new record in HNLFromSpline
austinschneider Feb 10, 2024
6b9e20c
Use new record in NeutrissimoDecay
austinschneider Feb 10, 2024
0439f5c
Use new record in ElasticScattering
austinschneider Feb 10, 2024
f3013d4
Use new record in DummyCrossSection
austinschneider Feb 10, 2024
976dd3f
struct InteractionRecord --> class InteractionRecord
austinschneider Feb 10, 2024
404e2f1
Fix return value warning
austinschneider Feb 10, 2024
cfd83d6
Fix secondary_helicities naming. Remove target momentum distribution …
austinschneider Feb 10, 2024
9f0dfaf
Fix dataclasses and CrossSection pybindings
austinschneider Feb 10, 2024
bf01228
Fix sampling tests
austinschneider Feb 10, 2024
fa19dac
Fix DarkNews build issues with new record types
austinschneider Feb 10, 2024
c2811ef
Use new methods for setting mass and helicities
austinschneider Feb 10, 2024
8476442
Pybindings for PrimaryDistributionRecord
austinschneider Feb 10, 2024
ccfff88
Pybindings for SecondaryParticleRecord
austinschneider Feb 10, 2024
2853714
Pybindings for CrossSectionDistributionRecord. Add missing function d…
austinschneider Feb 10, 2024
a7d107c
ParticleTypes should use their PDG values
austinschneider Feb 10, 2024
195afd6
Fix serialization tests
austinschneider Feb 10, 2024
086a45c
Start fixing Path tests
austinschneider Feb 10, 2024
51b9472
Add #include <cmath> where std::sqrt is used
austinschneider Feb 10, 2024
2637edd
More Path test fixes
austinschneider Feb 10, 2024
8a970bd
Finish fixing Path tests
austinschneider Feb 10, 2024
05b5827
Remove include for TagetMomentumDistribution
austinschneider Feb 10, 2024
83c74ae
Remove references to target momentum
austinschneider Feb 10, 2024
4ac1935
Whitespace
austinschneider Feb 10, 2024
7f8122b
Check length of secondary_ids before trying to access
austinschneider Feb 10, 2024
40ba71c
Move secondary position distribution
austinschneider Feb 12, 2024
9ae4bf0
Add convenience method for computing total cross section for a primar…
austinschneider Feb 12, 2024
6ae2b17
Remove override from TotalCrossSection declaration since we are using…
austinschneider Feb 12, 2024
812375a
Use TotalCrossSectionAllSignatures. Remove InteractionTreeDatum metho…
austinschneider Feb 12, 2024
8a10b41
Add convenience method for creating secondary InteractionRecord, and …
austinschneider Feb 12, 2024
2f60d9b
Sketch new layout for secondary distributions
austinschneider Feb 12, 2024
196879f
Remove InteractionTreeDatum methods and remove IsPositionDistribution
austinschneider Feb 12, 2024
095bc2d
Add new secondary distribution classes to CMakeLists.txt
austinschneider Feb 12, 2024
7e6044b
Switch to new SecondaryProcess types. Change InjectionBounds return t…
austinschneider Feb 12, 2024
b16552f
Add SecondaryProcess
austinschneider Feb 12, 2024
9022b3f
Use new SecondaryProcess type. Re-write logic for queueing and sampli…
austinschneider Feb 12, 2024
849d979
Change name of InjectionBounds and use tuple return type
austinschneider Feb 12, 2024
481698b
Whitespace
austinschneider Feb 12, 2024
97d6492
Remove out of line definition
austinschneider Feb 12, 2024
2eca710
Use new names for InjectionBounds
austinschneider Feb 12, 2024
d9e8b46
Fix pybindings
austinschneider Feb 12, 2024
3ff900c
Fix CCM_HNL test
austinschneider Feb 12, 2024
9812e58
Remove declarations for missing symbols
austinschneider Feb 12, 2024
b172867
Fix secondary for loop
austinschneider Feb 12, 2024
519fb5b
Use SecondaryInjectionDistribution and SecondaryInjectionProcess
austinschneider Feb 12, 2024
270598b
Add SecondaryBoundedVertexDistribution
austinschneider Feb 13, 2024
4c7bd4d
pybindings for SecondaryInjectionProcess
austinschneider Feb 13, 2024
7b5c943
Whitespace
austinschneider Feb 13, 2024
e77c860
Use SecondaryBoundedVertexDistribution. Fix stopping condition
austinschneider Feb 13, 2024
0f006a2
Fix typo. Check int representation of primary. Print warnings
austinschneider Feb 13, 2024
d594d40
Shift to using detector coordinates for CCM
austinschneider Feb 13, 2024
8c943d7
Move PrimaryInjector to PrimaryMass
austinschneider Feb 14, 2024
afe5f16
Fix InteractionRecord
austinschneider Feb 14, 2024
80ce937
Define PrimaryInjectionDistribution and SecondaryInjectionDistribution
austinschneider Feb 14, 2024
e5340fb
Set up Secondary distributions
austinschneider Feb 14, 2024
d46016f
Direction distributions should use new record and inherit from Primar…
austinschneider Feb 14, 2024
a67bd36
Energy distributions should use new record and inherit from PrimaryIn…
austinschneider Feb 14, 2024
b645110
Mass injector
austinschneider Feb 14, 2024
2b3c342
Helicity distributions should use new record and inherit from Primary…
austinschneider Feb 14, 2024
365dd75
Vertex distributions should use new record and inherit from PrimaryIn…
austinschneider Feb 14, 2024
e9ef9c3
Fix distributions CMakeLists and pybindings
austinschneider Feb 14, 2024
10d3e48
Fix distributions tests
austinschneider Feb 14, 2024
cacc791
Define primary and secondary processes as unrelate classes
austinschneider Feb 14, 2024
d87553c
Use separate primary and secondary classes. Use new records.
austinschneider Feb 14, 2024
cabbd29
Fix weighter
austinschneider Feb 14, 2024
307e06e
Split weighters. Use new classes.
austinschneider Feb 14, 2024
b822c11
Fix various injectors
austinschneider Feb 14, 2024
5e3e7f3
Fix injection pybindings
austinschneider Feb 14, 2024
0c00e45
Fix injection tests
austinschneider Feb 14, 2024
f2f6b4b
Use new split primary/secondary classes. Default mass
austinschneider Feb 14, 2024
19d7ce3
Add mass
austinschneider Feb 14, 2024
673b6e7
Remove DecayRecord
austinschneider Feb 14, 2024
f22d891
Actually set interaction vertex
austinschneider Feb 14, 2024
8c6d011
Add string conversion for InteractionRecord
austinschneider Feb 14, 2024
2ea3509
Mass distribution comes first. Mass distribution for secondaries
austinschneider Feb 14, 2024
98c0850
Use tuple for interaction bounds everywhere
austinschneider Feb 14, 2024
575c82f
Remove printouts
austinschneider Feb 14, 2024
fe89b9d
Monkey patch DarkNews ModelContainer to set logging level to WARNING.…
austinschneider Feb 14, 2024
eca439c
Fix Finalize methods. Remove unnecessary copies by making data member…
austinschneider Feb 15, 2024
9dbcd21
Move ostream operator into the right namespace
austinschneider Feb 15, 2024
e4d76b5
Fix function overloading issue. Add basic arithmetic operations to Pa…
austinschneider Feb 15, 2024
0430ff7
Fix indexing bug
austinschneider Feb 15, 2024
386baa2
Fix pass by reference issue that was preventing properties from being…
austinschneider Feb 15, 2024
ae84bdd
Secondary distributions don't need a mass distribution by default
austinschneider Feb 15, 2024
eaf3fa6
Convert ParticleType to int before comparison. Set secondaries correc…
austinschneider Feb 15, 2024
19998ce
Remove printouts
austinschneider Feb 15, 2024
5f04c10
Tree structure should not be flat. Fixes weighting issues caused by p…
austinschneider Feb 16, 2024
388dec7
Whitespace
austinschneider Feb 16, 2024
b5301a7
Simplify .gitignore
austinschneider Feb 16, 2024
13d851d
Use the parent vertex position as the starting point for the secondar…
austinschneider Feb 22, 2024
a241f54
Add appropriate stopping condition
austinschneider Feb 24, 2024
cb7f0a4
Test weighting
austinschneider Feb 24, 2024
9a551d6
Remove Particle interface and use ParticleRecord interface instead.
austinschneider Feb 24, 2024
9163ede
Add InteractionTree_TEST to cmake. Fix compilation errors.
austinschneider Feb 24, 2024
cbb6e76
Change SecondaryParticleRecord::Finalize so that it is finalizing the…
austinschneider Feb 24, 2024
19fd4f2
Remove max_length from SecondaryPhysicalVertexDistribution
austinschneider Feb 24, 2024
7bb6359
Fixing ordering of four momentum in SecondaryParticleRecord
austinschneider Feb 26, 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
43 changes: 36 additions & 7 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ name: Build
on: [pull_request]

jobs:
build_wheels:
build_wheels_linux:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-20.04, windows-2019, macos-11]
os: [ubuntu-20.04, macos-11]
arch: [x86_64, auto32, auto64, aarch64, ppc64le, s390x, arm64]
os: [ubuntu-20.04]
arch: [x86_64, i686, aarch64, ppc64le, s390x]

steps:
- name: Checkout LeptonInjector
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9' # update once build dependencies are available

Expand All @@ -28,6 +27,36 @@ jobs:
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_wheels_macos:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11]
# arch: [x86_64, arm64]
arch: [x86_64]

steps:
- name: Checkout LeptonInjector
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9' # update once build dependencies are available

- name: Build wheels
uses: pypa/[email protected]

- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
10 changes: 1 addition & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,13 @@
*.swp

# rk
*/*rk*
*/*/*rk*
vendor/rk/

# ipynb_checkpoint
*ipynb_checkpoint*
*/*ipynb_checkpoint*
*/*/*ipynb_checkpoint*
*/*/*/*ipynb_checkpoint*

# build
*build

# pycache
*pycache*
*/*pycache*
*/*/*pycache*
*/*/*/*pycache*
*/*/*/*/*pycache*
7 changes: 6 additions & 1 deletion projects/dataclasses/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ LIST (APPEND dataclasses_SOURCES
${PROJECT_SOURCE_DIR}/projects/dataclasses/private/InteractionRecord.cxx
${PROJECT_SOURCE_DIR}/projects/dataclasses/private/InteractionTree.cxx
${PROJECT_SOURCE_DIR}/projects/dataclasses/private/DecaySignature.cxx
${PROJECT_SOURCE_DIR}/projects/dataclasses/private/DecayRecord.cxx
${PROJECT_SOURCE_DIR}/projects/dataclasses/private/ParticleID.cxx
${PROJECT_SOURCE_DIR}/projects/dataclasses/private/ParticleType.cxx
)
add_library(LI_dataclasses OBJECT ${dataclasses_SOURCES})
set_property(TARGET LI_dataclasses PROPERTY POSITION_INDEPENDENT_CODE ON)
Expand All @@ -29,6 +30,10 @@ install(DIRECTORY "${PROJECT_SOURCE_DIR}/projects/dataclasses/public/"
PATTERN "*.tcc"
)

package_add_test(UnitTest_InteractionSignature ${PROJECT_SOURCE_DIR}/projects/dataclasses/private/test/InteractionSignature_TEST.cxx)
package_add_test(UnitTest_InteractionRecord ${PROJECT_SOURCE_DIR}/projects/dataclasses/private/test/InteractionRecord_TEST.cxx)
package_add_test(UnitTest_InteractionTree ${PROJECT_SOURCE_DIR}/projects/dataclasses/private/test/InteractionTree_TEST.cxx)

pybind11_add_module(dataclasses ${PROJECT_SOURCE_DIR}/projects/dataclasses/private/pybindings/dataclasses.cxx)
target_link_libraries(dataclasses PRIVATE LeptonInjector)
if(DEFINED SKBUILD)
Expand Down
33 changes: 0 additions & 33 deletions projects/dataclasses/private/DecayRecord.cxx

This file was deleted.

Loading
Loading