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 lineshapes and spin factors #17

Open
wants to merge 270 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
270 commits
Select commit Hold shift + click to select a range
8a81a46
Update doxyfile
tevans1260 Mar 27, 2019
46491bb
Update build_docs.sh
tevans1260 Mar 27, 2019
6cabf4d
Update .travis.yml
tevans1260 Mar 27, 2019
e68f62c
Update .travis.yml
tevans1260 Mar 27, 2019
e62caf8
add travis CI build
tevans1260 Mar 27, 2019
5a97e04
add travis CI build
tevans1260 Mar 27, 2019
3afd36a
add travis CI build
tevans1260 Mar 27, 2019
bec2bba
Update .travis.yml
tevans1260 Mar 27, 2019
2de0ec7
Add DEPS_DIR to travis.yml
tevans1260 Mar 27, 2019
8612399
Flag to remove OpenMP for travis CI builds
tevans1260 Mar 27, 2019
bcff46a
Flag to remove OpenMP for travis CI builds
tevans1260 Mar 27, 2019
f47cfed
minor fix to RecursivePhaseSpace for gcc5.4
tevans1260 Mar 27, 2019
41da25d
add libtbb to .travis.yml
Mar 27, 2019
acbfa0a
add libtbb to .travis.yml
Mar 27, 2019
16d05fd
Add libtbb to link options
Mar 27, 2019
eb7733a
Update build_root.sh
tevans1260 Mar 27, 2019
3587b91
Add generator test to travis.sh
Mar 27, 2019
15ab4d0
Add verbose flag to test
Mar 27, 2019
64d096c
change abs -> std::abs so compiler phase works on g++5
Mar 27, 2019
3473ac1
Big improvements in CUDA code generation
Mar 28, 2019
dfbf367
Remove LaTeX from README.md
Mar 28, 2019
2da0b64
Uncomment .travis.yml
Mar 28, 2019
7592f34
Update README.md
tevans1260 Mar 28, 2019
c206d8d
Update README.md
tevans1260 Mar 28, 2019
cc7fc62
Update README.md
tevans1260 Mar 28, 2019
498c2c5
Fix UseCUDA flag in src/CompiledExpressionBase
Mar 28, 2019
dc3ee1c
Merge branch 'master' of github.com:GooFit/AmpGen
Mar 28, 2019
85d9517
Remove unnecessary statics in utilities
Mar 28, 2019
3cefae9
Update .travis.yml
tevans1260 Mar 28, 2019
4fc8ffa
Add LASS documentation
Mar 29, 2019
b7d711d
Merge branch 'master' of github.com:GooFit/AmpGen
Mar 29, 2019
44a6053
Add code to perform pade approximations, minor improvements in some i…
Apr 1, 2019
306bec4
Remove explicit linking of tbb
Apr 2, 2019
7b6cd27
Synchronise version numbering system with Gaudi version, remove unuse…
Apr 3, 2019
705a6f1
Fix AMPGEN_MAJOR/MINOR_VERSION and include fix for gaudi builds
Apr 3, 2019
c4fe59b
Fixed problems with spin-one polarisation vectors, improved LASS inst…
Apr 10, 2019
4b0d388
Remove NBins option that doesn't seem to play nicely with travis ..
Apr 10, 2019
8295397
Reduce EDM precision, various patches for c++11 compatibility mode
Apr 23, 2019
d1f7e1c
Make quasistable & quasiparticle work together, add GLASS and photon …
Apr 29, 2019
963b862
Fix GLASS so it compiles, but it still doesn't work :(
Apr 29, 2019
a221a64
Improved CP conjugation in Particle, improved threading in CoherentSum
May 15, 2019
eb15951
Add quantum-correlated generator example
May 16, 2019
33f3257
Start adding improvements from cppcheck, removal of unused code
May 22, 2019
1ebb9d7
Greatly improved parser for expression parameters, added unit tests f…
May 23, 2019
d827df1
Remove c++17 only code in ArgumentPack, minor tweaks to MinuitExpress…
May 23, 2019
2c47751
Fix mixing object in EventType
May 23, 2019
d8b31d5
add optional OPENMP off switch to QcGenerator
May 23, 2019
ae9aca7
properly flag OPENMP in QcGenerator..
May 23, 2019
e0d02d8
Add more of the recommendations for cppcheck, some unit tests for Qua…
May 24, 2019
7124f9b
Fix associativity in ExpressionParser, add more tests to test_Express…
May 27, 2019
d56fb88
Fix example in Particle.h, improve README.md to reflect improvements …
May 27, 2019
6a00706
Changes from code review
May 28, 2019
5f90229
Merge CR changes
tevans1260 May 28, 2019
71aec76
Some minor changes from the GAUSS version
tevans1260 May 29, 2019
be236bb
Fix missing definition in QuarkContent, change default number of comp…
tevans1260 May 29, 2019
2c7a6d9
Add progress bar, BELLE2018 GLASS model for D0->Kspipi
Jun 9, 2019
13a871d
add FixedLibPdf models (for D0->KsPiPi) to QcGenerator, fixes in doxgen
Jun 10, 2019
6f2efe1
Add examples/SimFit, some bug fixes in README and minor clang warning…
Jun 18, 2019
08dd370
Minor fix in poly, add generic shapes in quasiparticles, improvements…
Jun 21, 2019
6caa622
Add prerendered formulae to the Markdown, minor fixes to Particle
Jun 21, 2019
18d936a
Make doxygen variant of markdown work correctly for intro
Jun 22, 2019
1daecdb
Fix quantum numbers of the X(3872), add generators of SU(3) for begi…
Jul 8, 2019
acfa0b3
fix PolarisedSum::densityMatrix for scalar case, neaten formatting in…
Jul 8, 2019
f10eb29
Fix unit tests under boost 1.70.0
tevans1260 Jul 8, 2019
b97e16a
Added some debugging for production polarisation
Jul 8, 2019
ed3a6a9
Merge branch 'master' of https://github.com/GooFit/AmpGen
Jul 8, 2019
9c000c5
Fix instructions for lxplus usage
Jul 9, 2019
5936ae9
Fix in python bindings, add linear time-dependent amplitude
Aug 7, 2019
fb06e0c
Add pretty new enums, some cleanup of the variable flagging code
Aug 13, 2019
d2d0e3b
Add release notes
Aug 13, 2019
f23dd6b
fix SFINAE snafu
Aug 13, 2019
0d4045c
Add faster integrator <experimental>, improvements in documentation a…
Aug 22, 2019
f5f1edc
Fix missing headers in Pade
Aug 23, 2019
01d869a
fixed in pade...
Aug 23, 2019
49fcc6f
Fix binned integrator to match CoherentSum, fix tests in ExpressionPa…
Aug 27, 2019
0a99fb2
Update mass_width.csv
tevans1260 Aug 29, 2019
4478134
Update mass_width.csv
tevans1260 Aug 29, 2019
68767c7
Cache some coordinates transforms in order to make deeper decay proce…
Sep 2, 2019
650cd2b
Merge branch 'master' of https://github.com/GooFit/AmpGen
Sep 2, 2019
78d0182
Add PolyNR for backgrounds
Sep 9, 2019
1c7f4d6
changing names in output tree
marianstahl Aug 22, 2019
a255de1
added option to choose different naming in output tree
marianstahl Sep 11, 2019
de5f3b1
Merge pull request #1 from marianstahl/mstahl_variable_naming
tevans1260 Sep 12, 2019
16d81fc
Minor fixes to enum, allow direct use with NamedParameters, switched …
Sep 12, 2019
dab084c
fix clang warnings
Sep 12, 2019
44ca302
once more for luck
Sep 12, 2019
f9d1a7f
Fixes to the stricter type checking of enums
Sep 12, 2019
80be0f5
various code changes from cppcheck
Sep 12, 2019
a12c300
fix double-free in ASTResolver
Sep 13, 2019
cf5c401
changes from cppcheck, many size_t -> unsigned's
Sep 24, 2019
8852016
remove example that depends on functional pdfs
Sep 24, 2019
fdbe135
fixed compilation when omp is not available
Sep 24, 2019
9a27071
fix printing in AmplitudeRules to deal with radians vs degrees, warni…
Sep 25, 2019
0de6006
Add TreePhaseSpace generator
Nov 12, 2019
de722a1
improve CP conjugation logic, add a couple of additional vertices
Nov 24, 2019
212f548
Changed CP conjugation behaviour to give expressions, rather than new…
Nov 25, 2019
abc8773
Remove some noise from AddCPConjugate + AmplitudeRules
Nov 25, 2019
042c2e4
Fix mising thing that was broken, add unstable initial states to tree…
Nov 28, 2019
2fdbcf1
Add states of ill-defined initial flavour to PolarisedSum
Jan 7, 2020
5827262
Remove compile flag for warnings of depreciated copy constructors
Jan 9, 2020
ecfb7a4
Change default cxx standard to 17
Jan 9, 2020
871d59f
Add gcc8 to .travis.yml
Jan 9, 2020
998e603
Add gcc8 to .travis.yml
Jan 9, 2020
6618b99
Downgrade cxx standard to make travis happy
Jan 9, 2020
b91e8a6
Add polarisation vector as argument to PolarisedSum, clean up of weig…
Jan 23, 2020
b510b32
Add proper destructor for MinuitParameterSet
Jan 23, 2020
ab9483e
Merge pull request #2 from cpviolation/master
tevans1260 Jan 25, 2020
2a3ab30
Add export to CMakeLists such that AmpGen can be used with find_package
Jan 26, 2020
65d48ea
Merge branch 'master' of https://github.com/GooFit/AmpGen
Jan 26, 2020
60668b6
Fix AMPGEN_CXX being added to CMakeLists.txt
Jan 26, 2020
f41b7d9
Update masses and widths of D*(2300) and D*(2460) match PDG2020
Jan 28, 2020
39fc83e
Add Chew-Mandelstam parameterisation of self-energy for K-matrix
Jan 31, 2020
e20488e
Add OSX travis configuration
Feb 4, 2020
a8587c1
dumb down build_root for osx
Feb 4, 2020
4f4d2f6
trying to fix travis.yml for osx
Feb 4, 2020
6b24c3d
skip building root for osx
Feb 4, 2020
a588f0d
Fix to have parameter expressions of complex parameters in complex co…
Feb 4, 2020
e28a417
Minor changes to CompilerWrapper to help with troubleshooting.
Feb 4, 2020
d75272d
Improve file I/O for osx, and add error messages for invalid vertices…
Feb 5, 2020
eb43c98
remove brew install commands from .travis.yml for osx
Feb 5, 2020
d0d45cd
still debugging osx travis configuration
Feb 5, 2020
a6c2751
split travis job for osx/linus
Feb 5, 2020
2a1801f
add actual build root options for osx
Feb 5, 2020
8a1ed0d
still fixing osx ci
Feb 5, 2020
397ce7d
Update gcc -> gcc8 in .travis.yml
Feb 5, 2020
b084063
Update gcc -> gcc8 in .travis.yml
Feb 5, 2020
1a28981
set cxx compiler explicitly for travis build
Feb 5, 2020
42599fa
set cxx compiler explicitly for travis build
Feb 5, 2020
40afbba
update ROOT version in ci
Feb 5, 2020
fc29d33
try to use conda for ROOT
Feb 5, 2020
0b37c44
ahhhh
Feb 5, 2020
020ca65
fix miniconda
Feb 5, 2020
c63717d
Try to use conda install of cxx
Feb 5, 2020
a6dd2c3
fix for std::optional bug is osx
Feb 5, 2020
993cd27
trying to fix AppleClang build ...
Feb 5, 2020
d22efbf
Add pragma to fix libstdc++ problem on apple
Feb 5, 2020
d5d7402
explicitly select clang for apple build
Feb 5, 2020
03fba6e
Merge branch 'master' into pnaik-20200204
tevans1260 Feb 5, 2020
11f7960
Update CompilerWrapper.cpp
tevans1260 Feb 5, 2020
11c5eba
Merge pull request #5 from GooFit/pnaik-20200204
tevans1260 Feb 5, 2020
9088457
Fix vectorFromFile that was broken by last commit
Feb 6, 2020
6e7557e
Merge branch 'master' of https://github.com/GooFit/AmpGen
Feb 6, 2020
5f9272a
Add OpenMP using conda to the osx build
Feb 6, 2020
b701de1
Add OpenMP using conda to the osx build
Feb 6, 2020
a2805fa
still trying to add openmp to osx ci..
Feb 6, 2020
460c7cc
still trying to add openmp to osx ci..
Feb 6, 2020
03709dc
still trying to add openmp to osx ci..
Feb 6, 2020
050d647
fixing osx ci
Feb 7, 2020
c3a581d
Explicitly link applications against ROOT libraries
Feb 7, 2020
6c9b7d2
still fix osx ci
Feb 7, 2020
b4ca3c3
Remove CXX use as global variable for c++ compiler
Feb 7, 2020
e01cef7
Add RapidSim as an optional external packages, fixes to unit tests
Feb 27, 2020
286698a
Update mass_width.csv
tevans1260 Mar 5, 2020
7598997
commit with speed up integration / partially modernised caching
Mar 17, 2020
6595276
Begin vectorising the code
Apr 9, 2020
7d22858
add simd headers
Apr 9, 2020
a46c0ff
Consolidate SIMD integration / caching code with scalar version, remo…
Apr 14, 2020
e074da9
fixes for travis build
Apr 14, 2020
a04a7b2
Fix if number of events % simd_size != 0 and Chi2 calculation
Apr 14, 2020
53a3917
fixes for array / splines for avx2d
Apr 15, 2020
7ad8e91
fix for OSX
Apr 15, 2020
462ae54
Fix simd'ed integration and plotting
Apr 19, 2020
33121a5
fix travis...
Apr 19, 2020
b97eceb
fix travis...
Apr 19, 2020
f1b1591
fix travis...
Apr 19, 2020
e1f26c8
fix travis...
Apr 19, 2020
194f473
fix travis...
Apr 19, 2020
6403a29
fix travis...
Apr 19, 2020
1c7d80f
fix travis...
Apr 19, 2020
7b9816d
fix travis...
Apr 19, 2020
9c7e191
fix travis...
Apr 19, 2020
77339ca
fix travis build
Apr 20, 2020
9b38caa
fix control predicate for CompiledExpression batch
Apr 20, 2020
b18d048
remove debug_norm for src/PolarisedSum
Apr 20, 2020
5c10f20
try to fix osx ci
Apr 20, 2020
df71985
fix travis ci
Apr 20, 2020
5e3fe48
fix travis ci
Apr 20, 2020
c5d3906
fix travis ci
Apr 20, 2020
3f193e8
increase verbosity of ci
Apr 21, 2020
14e6db1
remove --quiet from conda options
Apr 21, 2020
804603f
chris's fix to build_root
Apr 22, 2020
a5a2e68
A few random fixes for clang
Apr 22, 2020
14937c4
fixes for osx
Apr 22, 2020
d34fd54
add -fma flag
Apr 22, 2020
324b896
remove std::fabs from unary expression
Apr 22, 2020
94ae640
still applying fixes for osx
Apr 22, 2020
2f14291
cleanup of AVX code, add AVX512, fixes to spline shapes
Apr 28, 2020
e8180a0
fix avx512d types, units for OSX
Apr 28, 2020
c0c7f1c
fix units for osx
Apr 28, 2020
867cf2a
Progress towards SIMD compatible generation, various fixes
May 16, 2020
fb6a9a0
Fix OpenMP predicates
May 16, 2020
958c379
Options to switch of mvec
May 17, 2020
934860e
cleanup mvec code
May 17, 2020
064296d
fix scalar build
May 17, 2020
0ddc4eb
Fixes for canonical formulation with deeper decay topologies
May 19, 2020
c3e827e
fix fitting in scalar build
May 28, 2020
87d3838
fix fitting in scalar build
May 28, 2020
07c4773
improve customised particles, improve compiler threading
Jun 7, 2020
9a16468
fix polarisedSum issue for clang
Jun 8, 2020
614a5a1
fix isPhoton flag
Jun 9, 2020
b4863e3
add some sanity checks for photons
Jun 9, 2020
d5e981b
fix cuts in DataConvertor
Jun 29, 2020
e527eb0
Fix complex logarithm for AVX, Weyl spinors for neutrinos
Jul 27, 2020
08d32d0
fix debugging of |T|^2 in PolarisedSum
Jul 29, 2020
f88f7f6
hopefully scalar builds don't accidentally include some AVX instructions
Jul 30, 2020
7374dcd
Merge branch 'experimental_integrator2' of https://github.com/GooFit/…
Jul 30, 2020
76fa62a
change the way constants are encoded into strings to allow very large…
tevans1260 Aug 5, 2020
5365228
possible fix in CompilerWrapper
tevans1260 Aug 5, 2020
e83679b
disable openmp for osx by default
tevans1260 Aug 5, 2020
559e8ea
fix openmp silliness
tevans1260 Aug 5, 2020
d39508a
disable openmp in the travis job
tevans1260 Aug 5, 2020
754298a
[Lineshapes] Add production (P-)vector approach to GenericKmatrix and…
marianstahl Aug 10, 2020
dde1671
fix custom helicity couplings + cleanup of evaluation of PDFs to arbi…
tevans1260 Aug 10, 2020
fa24e34
[example apps] add BaryonFitter and fit_hyperon_parameters.cpp
marianstahl Aug 10, 2020
d50abb1
[SumPDF] use event weight in fit
marianstahl Aug 10, 2020
8982ae8
[BaryonFitter] throw error when adding branches and using AVX; [Minim…
marianstahl Aug 10, 2020
da730a7
fix enum parser
tevans1260 Aug 11, 2020
14a8c12
fix enum
tevans1260 Aug 11, 2020
43c9096
Merge pull request #10 from marianstahl/marianstahl_additions_to_v2
tevans1260 Aug 11, 2020
d26f957
fix enum... again ... and add unit tests this time
tevans1260 Aug 12, 2020
24d7015
[Particle tables] update particle tables to be compatible with Gauss
marianstahl Aug 12, 2020
ed09fac
Merge pull request #11 from marianstahl/marianstahl_particle_tables_G…
tevans1260 Aug 12, 2020
7b5d15a
add automated testing against released models
tevans1260 Aug 13, 2020
91867fa
Merge pull request #12 from GooFit/experimental_integrator2
tevans1260 Aug 13, 2020
c845a5f
added spin factors for V[S,P]->V V decays
phdargen Aug 20, 2020
a966f9e
Merge pull request #13 from phdargen/v2vv_spinFactors
tevans1260 Aug 31, 2020
d2ff830
Add LambdaExpression for expressions that dynamically depend on the v…
tevans1260 Sep 22, 2020
1e296a4
Fix plotting in SimFit
tevans1260 Sep 25, 2020
7d10d6d
add flag to include conjugate amplitude
tevans1260 Sep 28, 2020
4d39f63
Add some logical operators + improved safety for splines using vector…
tevans1260 Oct 6, 2020
e77543c
Modified simultaneous fit to be able to describe multiple types of ev…
Oct 16, 2020
992f2e2
fixed a compilation errore in systems where OMP is not available
Oct 26, 2020
11bc9ec
Changes for 2.1 to improve Gauss integration
tevans1260 Oct 28, 2020
7c51eb6
Merge pull request #15 from cpviolation/master
tevans1260 Oct 28, 2020
63a43fe
fixes for CI
tevans1260 Oct 28, 2020
095e9c4
Merge branch 'master' of https://github.com/goofit/AmpGen
tevans1260 Oct 28, 2020
aba144e
Remove export of includes from cmakelists to fix ROOT error
tevans1260 Oct 28, 2020
fd9c60d
yahh traviiss
tevans1260 Oct 29, 2020
ca20c5d
maybe this time ...
tevans1260 Oct 29, 2020
99625c3
fix ci
tevans1260 Oct 29, 2020
3be90cc
cleanup of CMakeLists
tevans1260 Oct 29, 2020
0dffdf0
Add fallback option to take AMPGENROOT from build if undefined
tevans1260 Oct 30, 2020
0d40406
Update README.md
tevans1260 Oct 30, 2020
0a35a14
Update README.md
tevans1260 Oct 30, 2020
57c9a48
improve store for functions that return multiple values
tevans1260 Jan 14, 2021
18cb987
Merge branch 'master' of https://github.com/goofit/AmpGen
tevans1260 Jan 14, 2021
8fc07f9
fix mistaken error message in TreePhaseSpace (scalar builds only)
tevans1260 Jan 15, 2021
5f3cb40
added new lineshapes,spin factors
phdargen Jan 20, 2021
eb3e0fb
clean-up
phdargen Jan 20, 2021
83c736e
small fix
phdargen Jan 20, 2021
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
111 changes: 111 additions & 0 deletions .ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#!/bin/sh
################################################################################
# Title : generateDocumentationAndDeploy.sh
# Date created : 2016/02/22
# Notes :
__AUTHOR__="Jeroen de Bruijn"
# Preconditions:
# - Packages doxygen doxygen-doc doxygen-latex doxygen-gui graphviz
# must be installed.
# - Doxygen configuration file must have the destination directory empty and
# source code directory with a $(TRAVIS_BUILD_DIR) prefix.
# - An gh-pages branch should already exist. See below for mor info on hoe to
# create a gh-pages branch.
#
# Required global variables:
# - TRAVIS_BUILD_NUMBER : The number of the current build.
# - TRAVIS_COMMIT : The commit that the current build is testing.
# - DOXYFILE : The Doxygen configuration file.
# - TRAVIS_REPO_SLUG : The username / reponame for the repository.
# - GH_REPO_TOKEN : Secure token to the github repository.
#
# For information on how to encrypt variables for Travis CI please go to
# https://docs.travis-ci.com/user/environment-variables/#Encrypted-Variables
# or https://gist.github.com/vidavidorra/7ed6166a46c537d3cbd2
# For information on how to create a clean gh-pages branch from the master
# branch, please go to https://gist.github.com/vidavidorra/846a2fc7dd51f4fe56a0
#
# This script will generate Doxygen documentation and push the documentation to
# the gh-pages branch of a repository specified by GH_REPO_REF.
# Before this script is used there should already be a gh-pages branch in the
# repository.
#
################################################################################

################################################################################
##### Setup this script and get the current gh-pages branch. #####
if [[ $TRAVIS_OS_NAME == "osx" ]]; then return ; fi

echo 'Setting up the script...'
# Exit with nonzero exit code if anything fails
set -e

GH_REPO_ORG=`echo $TRAVIS_REPO_SLUG | cut -d "/" -f 1`
GH_REPO_NAME=`echo $TRAVIS_REPO_SLUG | cut -d "/" -f 2`
GH_REPO_REF="github.com/$GH_REPO_ORG/$GH_REPO_NAME.git"

# Create a clean working directory for this script.
# Get the current gh-pages branch
cd doc
git clone -b gh-pages https://git@$GH_REPO_REF html
cd html

##### Configure git.
# Set the push default to simple i.e. push only the current branch.
git config --global push.default simple
# Pretend to be an user called Travis CI.
git config user.name "Travis CI"
git config user.email "[email protected]"

# Remove everything currently in the gh-pages branch.
# GitHub is smart enough to know which files have changed and which files have
# stayed the same and will only update the changed files. So the gh-pages branch
# can be safely cleaned, and it is sure that everything pushed later is the new
# documentation.
rm -rf *

# Need to create a .nojekyll file to allow filenames starting with an underscore
# to be seen on the gh-pages site. Therefore creating an empty .nojekyll file.
# Presumably this is only needed when the SHORT_NAMES option in Doxygen is set
# to NO, which it is by default. So creating the file just in case.
echo "" > .nojekyll

################################################################################
##### Generate the Doxygen code documentation and log the output. #####
echo 'Generating Doxygen code documentation...'
# Redirect both stderr and stdout to the log file AND the console.
cd ..

doxygen --version

doxygen $DOXYFILE 2>&1 | tee doxygen.log

################################################################################
##### Upload the documentation to the gh-pages branch of the repository. #####
# Only upload if Doxygen successfully created the documentation.
# Check this by verifying that the html directory and the file html/index.html
# both exist. This is a good indication that Doxygen did it's work.
if [ -d "html" ] && [ -f "html/index.html" ]; then

cd html
echo 'Uploading documentation to the gh-pages branch...'
# Add everything in this directory (the Doxygen code documentation) to the
# gh-pages branch.
# GitHub is smart enough to know which files have changed and which files have
# stayed the same and will only update the changed files.
git add --all

# Commit the added files with a title and description containing the Travis CI
# build number and the GitHub commit reference that issued this build.
git commit -m "Deploy code docs to GitHub Pages Travis build: ${TRAVIS_BUILD_NUMBER}" -m "Commit: ${TRAVIS_COMMIT}"

# Force push to the remote gh-pages branch.
# The ouput is redirected to /dev/null to hide any sensitive credential data
# that might otherwise be exposed.
git push --force "https://${GH_REPO_TOKEN}@${GH_REPO_REF}" > /dev/null 2>&1
else
echo '' >&2
echo 'Warning: No documentation (html) files have been found!' >&2
echo 'Warning: Not going to push the documentation to GitHub!' >&2
exit 1
fi
19 changes: 19 additions & 0 deletions .ci/build_root.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pushd $DEPS_DIR
set -evx

os=$1
if [[ $os == "osx" ]] ; then
wget -nv http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda_${os}.sh
elif [[ $os == "linux" ]] ; then
wget -nv http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda_${os}.sh
fi

bash miniconda_${os}.sh -b -p $DEPS_DIR/miniconda
export PATH="$DEPS_DIR/miniconda/bin:$PATH"
hash -r
conda config --add channels conda-forge

conda create --yes -n env_${os} root doxygen -c conda-forge

set +evx
popd
20 changes: 20 additions & 0 deletions .ci/build_root_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
pushd $DEPS_DIR

if [[ $1 == "osx" ]] ; then
wget -nv http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
elif [[ $1 == "linux" ]] ; then
wget -nv http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
fi

bash miniconda.sh -b -p $DEPS_DIR/miniconda
export PATH="$DEPS_DIR/miniconda/bin:$PATH"
hash -r
conda config --add channels conda-forge
conda config --set channel_priority strict

# conda install --quiet --yes -c conda-forge/label/gcc8 root_base doxygen
conda create --quiet --yes -n my_root_env root doxygen zstd=1.3.7 -c conda-forge
# conda init bash
# source "$DEPS_DIR/miniconda/bin/thisroot.sh"
# export CXX="$DEPS_DIR/miniconda/bin/g++"
popd
17 changes: 17 additions & 0 deletions .ci/build_root_osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pushd $DEPS_DIR

wget -nv https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $DEPS_DIR/miniconda
export PATH="$DEPS_DIR/miniconda/bin:$PATH"
hash -r
conda config --add channels conda-forge
conda install --quiet --yes -c conda-forge root
. $DEPS_DIR/miniconda/etc/profile.d/conda.sh
conda activate root
# . "/home/tim/miniconda/etc/profile.d/conda.sh"
# else
# export PATH="/home/tim/miniconda/bin:$PATH"

# source "$DEPS_DIR/miniconda/bin/thisroot.sh"
popd

23 changes: 23 additions & 0 deletions .ci/travis_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -evx
# from https://stackoverflow.com/questions/55342122/conda-activate-on-travis-ci
export PATH="$DEPS_DIR/miniconda/bin:$PATH"
. $(conda info --root)/etc/profile.d/conda.sh
conda activate env_${TRAVIS_OS_NAME}

echo -en 'travis_fold:start:script.build\\r'
echo "Building..."
echo "Building under OS: $TRAVIS_OS_NAME, CXX =$CXX"
echo "Directories: DEPS_DIR=$DEPS_DIR; TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR"
mkdir -p build
cd build
cmake .. -DENABLE_INSTALL=0
cmake --build . -- -j2

set +evx

cd ..

./build/bin/AmpGen.exe options/example_b2kstarll.opt --CompilerWrapper::Verbose --nEvents 10000

18 changes: 18 additions & 0 deletions .ci/travis_osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

. $(conda info --root)/etc/profile.d/conda.sh
conda activate env_${TRAVIS_OS_NAME}

echo -en 'travis_fold:start:script.build\\r'
echo "Building..."
echo "Building under OS: $TRAVIS_OS_NAME"

mkdir -p build
cd build
echo "CMake-ing, CXX = $CXX"
cmake .. -DCMAKE_CXX_COMPILER=clang -DUSE_SIMD=0 -DUSE_OPENMP=0 -DENABLE_INSTALL=0
echo "Building ..."
cmake --build . -- -j2
cd ..
echo "Running test job ..."
./build/bin/AmpGen.exe options/example_b2kstarll.opt --CompilerWrapper::Verbose --nEvents 10000
20 changes: 0 additions & 20 deletions .gitlab-ci.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
language: cpp

matrix:
include:
- os: osx
osx_image: xcode10.1
compiler: clang
addons:
homebrew:
packages:
- libomp
- os: linux
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"



cache:
ccache: true
apt: true
directories:
- "${TRAVIS_BUILD_DIR}/deps/root"
- "${TRAVIS_BUILD_DIR}/deps/doxygen"

# Blacklist
branches:
except:
- gh-pages

# Environment variables
env:
global:
- GH_REPO_NAME: AmpGen
- DOXYFILE: $TRAVIS_BUILD_DIR/doc/doxyfile
- GH_REPO_REF: github.com/GooFit/AmpGen.git
- DEPS_DIR: "${TRAVIS_BUILD_DIR}/deps"

before_install:
- eval "${MATRIX_EVAL}"
- chmod +x .ci/build_root.sh
- source .ci/build_root.sh ${TRAVIS_OS_NAME}

# Build your code e.g. by calling make
script:
- chmod +x .ci/travis_${TRAVIS_OS_NAME}.sh
- source .ci/travis_${TRAVIS_OS_NAME}.sh

# Generate and deploy documentation
after_success:
- chmod +x .ci/build_docs.sh
- source .ci/build_docs.sh
58 changes: 32 additions & 26 deletions AmpGen/ASTResolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,60 @@ namespace AmpGen {
class MinuitParameter;
class MinuitParameterSet;
class MinuitParameterLink;
/// \class ASTResolver
/// Traverses trees in IExpression::resolveDependencies()
/// to keep track of the dependencies of the tree
/// such as sub-trees, external parameters and the event type map.

/** @ingroup ExpressionEngine class ASTResolver
@brief (Internal) class to aide in the resolution of the dependencies of expression trees.

Traverses trees in IExpression::resolve() to keep track of the dependencies of the tree
such as sub-trees, external parameters and the mapping between particle kinematics and the
event vector.
*/
class ASTResolver
{
public:
ASTResolver(const std::map<std::string, size_t>& evtMap = {} , const MinuitParameterSet* mps = nullptr );
bool hasSubExpressions() const;
void reduceSubTrees();
void cleanup();
void getOrderedSubExpressions( Expression& expression, std::vector<std::pair<uint64_t,Expression>>& dependentSubexpressions );
ASTResolver(const std::map<std::string, unsigned>& evtMap = {} , const MinuitParameterSet* mps = nullptr );
std::vector<std::pair<uint64_t,Expression>> getOrderedSubExpressions( const Expression& expression);

template <class TYPE> void resolve( const TYPE& obj ){}
template <class TYPE, class ...ARGS> size_t addCacheFunction( const std::string& name, const ARGS&... args )
{
auto it = m_cacheFunctions.find(name);
if( it != m_cacheFunctions.end() ) return it->second->address();
auto cacheFunction = std::make_shared<TYPE>(nParameters, args... );
auto cacheFunction = std::make_shared<TYPE>(m_nParameters, name, args... );
m_cacheFunctions[name] = cacheFunction;
nParameters += cacheFunction->size();
return nParameters - cacheFunction->size();
m_nParameters += cacheFunction->size();
return m_nParameters - cacheFunction->size();
}
size_t nParams() const { return nParameters ; }
bool enableCuda() const { return enable_cuda ; }
bool enableCompileConstants() const { return enable_compileTimeConstants ;}
size_t nParams() const { return m_nParameters ; }
bool enableCuda() const { return m_enable_cuda ; }
bool enableAVX() const { return m_enable_avx; }
bool enableCompileConstants() const { return m_enable_compileTimeConstants ;}
void setEnableAVX(){ m_enable_avx = true ; }
std::map<std::string, std::shared_ptr<CacheTransfer>> cacheFunctions() const;
void addResolvedParameter(const IExpression* param, const std::string& thing);
void addResolvedParameter(const IExpression* param, const size_t& address, const size_t& arg=0);
std::string resolvedParameter( const IExpression* param ) const;

void clear();

std::map<const IExpression*, std::string> parameters() const { return m_resolvedParameters; }
private:
std::map<const IExpression* , std::string> m_resolvedParameters;
std::map<std::string, std::shared_ptr<CacheTransfer>> m_cacheFunctions;
std::map<std::string, size_t> evtMap; /// event specification
std::map<std::string, std::string> parameterMapping; /// Mapping of parameters to compile parameters
const MinuitParameterSet* mps; /// Set of MinuitParameters
std::map<const SubTree*, uint64_t> tempTrees; /// temporary store of sub-trees for performing cse reduction
std::map<uint64_t, Expression> subTrees; /// Unordered sub-trees
unsigned int nParameters; /// Number of parameters
bool enable_cuda; /// flag to generate CUDA code <<experimental>>
bool enable_compileTimeConstants; /// flag to enable compile time constants <<experimental>>

std::map<const IExpression*, std::string> m_resolvedParameters; /// Map of parameters that have been resolved
std::map<std::string, std::shared_ptr<CacheTransfer>> m_cacheFunctions; /// Container of functions for calculating function cache
std::map<std::string, unsigned> m_evtMap; /// Event specification
std::map<std::string, std::string> m_parameterMapping; /// Mapping of parameters to compile parameters
const MinuitParameterSet* m_mps; /// Set of MinuitParameters
std::map<const IExpression*, const SubTree*> m_tempTrees; /// temporary store of sub-trees for performing cse reduction
unsigned int m_nParameters; /// Number of parameters
bool m_enable_cuda {false}; /// flag to generate CUDA code <<experimental>>
bool m_enable_compileTimeConstants {false}; /// flag to enable compile time constants <<experimental>>
bool m_enable_avx {false}; /// flag to generate code using AVX instructions <<experimental>>
bool m_check_hashes {false}; /// flag to check that hashes are unique
};

template <> void ASTResolver::resolve<Parameter>( const Parameter& obj );
template <> void ASTResolver::resolve<SubTree> ( const SubTree & obj );
template <> void ASTResolver::resolve<Spline> ( const Spline & obj );
template <> void ASTResolver::resolve<MinuitParameterLink>( const MinuitParameterLink& obj );
template <> void ASTResolver::resolve<LambdaExpression>( const LambdaExpression& obj);
}
6 changes: 6 additions & 0 deletions AmpGen/AddCPConjugate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

namespace AmpGen {
class MinuitParameterSet;

void AddCPConjugate(MinuitParameterSet&);
}
Loading