SlideShare a Scribd company logo
1 of 15
Download to read offline
Recent Developments in
Henry Schreiner
February 12, 2018
Special announcement
If you would like to follow along on your computer with Himadri’s talk, execute the following
lines now:
pip install scikit-build cmake
PIP_INSTALL_OPTIONS="-- -DGOOFIT_DEVICE=OMP" pip install -v goofit
Requirements:
• Linux or macOS
• A recent version of pip
• A compiler (gcc 4.8+ or Clang)
• make or ninja and git
• numpy and matplotlib needed for examples
1/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
GooFit and GooFit 2.0
2013 2014 2015 2016 2017 2018
Public release
0.1 0.2 0.3
OpenMP
0.4
Work in forks Minor updates
1.0
CMake
2.0
Python
2.1
What is GooFit?
• Package for high-speed fitting
• Resembles RooFit
• High performance on GPU or CPU
• 100-1000x faster than single core
History of GooFit
• Released publicly 2013
• GooFit 2.0 released mid 2017
• GooFit 2.1 released end of 2017
GooFit 2.0
• Easy to build (CMake)
• Dependency simplification (Minuit, etc.)
• Continuous integration online
• Lots of work merged back in
• Supports more platforms (macOS, TBB)
• Support for common tools (XCode, etc.)
• Memory caching improvements
• MPI multi GPU and node
• Docker containers too!
[Modernizing GooFit @ PEARC17]
[GooFit 2.0 @ ACAT 2017]
2/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
GooFit 2.1: Python bindings
• Compose existing PDFs
• Details in Himadri’s talk!
What it means for you
• Easy to read/write
• Easy to script
• Avoid recompiling
from goofit import *
import numpy as np
# Make a dataset
xvar = Variable("xvar", -10, 10)
data = UnbinnedDataSet(xvar)
npdata = np.random.normal(1, 2.5, 100000)
data.from_matrix([npdata], filter=True)
# Prepare model
mean = Variable("mean", 0, -10, 10)
sigma = Variable("sigma", 1, 0, 5)
gauss = GaussPdf("gauss", xvar, mean, sigma)
gauss.fitTo(data)
3/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
GooFit 2.1: Python-like memory management
• Internal reference counting for Variables
• Observables now part of API
• EventNumber also
What it means for you
• Easier model setup
• Fewer segfaults
• Simpler Python bindings
Before:
Variable* x = new Variable("x", 0, 3);
After:
Observable x{"x", 0, 3};
Python:
x = Observable("x", 0, 3)
4/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
GooFit 2.1: Constructors in amplitude models
• Now separate classes
3-body Resonances
4-body LineShapes
• New Resonances/LineShapes
What it means for you
• Readable model setup
• Easier to code
• Signature for each constructor
• Future optimizations possible
Before:
ResonancePdf("r1", ar, ai, m, w, sp, PAIR_12);
ResonancePdf("r2", ar, ai, m, sp, w, PAIR_12);
ResonancePdf("r3", ar, ai);
After:
Resonances::RBW("r1", ar, ai, m, w, sp, PAIR_12);
Resonances::LASS("r2", ar, ai, m, w, sp, PAIR_12);
Resonances::NonRes("r3", ar, ai);
5/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
GooFit 2.1: State-of-the-art build system
• Minuit2 will be built if missing
• GooFit coding style enforced
• CCache native support on CMake 3.6+
• CUDA native support on CMake 3.9+
• OpenMP on Apple LLVM compiler!
What it means for you
• Less time spent on setup
• More time spent on Physics
• Easier to contribute
• If you have make, CMake, g++, and git:
git clone https://github.com/GooFit/GooFit.git
cd GooFit
make
• Explicit instructions for many platforms available
6/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
GooFit 2.2
Compose
PDFs
Core
• Redesigned PDF indexing
• Details saved for Brad’s talk
What it means for you
• Easier to author PDFs
• We can optimize the evaluation later
__device__ fptype(
device_Exp(fptype *evt,
ParameterContainer &pc) {
int id = pc.getObservable(0);
fptype alpha = pc.getParameter(0);
fptype x = evt[id];
fptype ret = exp(alpha * x);
pc.incrementIndex(1, 1, 0, 1, 1);
return ret;
}
7/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
GooFit in the future
Documentation
• See the README
• API documentation being worked on
• Help us with the GooFit 2torial
Analyses
• Usage improvements still being added
• Several ongoing analyses in GooFit
• If you extend the core, please contribute!
Hydra
• Templated C++11 framework
• Made for highly parallel scientific
calculations
• CUDA, OpenMP, TBB, or single threaded
• Eventual integration/interaction planned
• See /MultithreadCorner/Hydra
8/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
Summary
• GooFit is a fast tool for fitting
• GooFit 2.0 is easier to build and use
• GooFit 2.1 adds Python and more
• GooFit 2.2 (coming soon) makes PDFs better
• We are available to help you with GooFit
If you have been building GooFit, it should be ready for Himadri’s talk! Follow along with her.
9/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
Questions?
Thanks to the work and support of:
• A. Augusto Alves Jr.
• Rolf Andreassen
• Christoph Hasse
• Bradley Hittle
• Zachary Huard
• Brian Maddock
• Himadri Pandey
• Henry Schreiner
• Michael Sokoloff
• Liang Sun
• Karen Tomko
Continued development on GooFit is supported by the
U.S. National Science Foundation under grant number
1414736 and was developed under grant number
1005530. Any opinions, findings, and conclusions or
recommendations expressed in this material are those
of the developers and do not necessarily reflect the
views of the National Science Foundation. In addition,
we thank the nVidia GPU Grant Program for donating
hardware used in developing this framework.
10/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
Code for Himadri’s example (addition.py)
# Imports
from goofit import *
import numpy as np
import matplotlib.pyplot as plt
# Print GooFit and computer info
print_goofit_info()
# GooFit DataSet
xvar = Observable("xvar", -5, 5)
data = UnbinnedDataSet(xvar)
# Make a dataset from 90% gauss + 10% flat
dat = np.random.normal(0.2,1.1,100000)
dat[:10000] = np.random.uniform(-5,5,10000)
data.from_matrix([dat], filter=True)
11/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
Code for Himadri’s example (addition.py)
# GooFit PDFs and fitting variables
xmean = Variable("xmean", 0, 1, -10, 10)
xsigm = Variable("xsigm", 1, 0.5, 1.5)
signal = GaussianPdf("signal", xvar, xmean, xsigm)
constant = Variable("constant", 1.0)
backgr = PolynomialPdf("backgr", xvar, [constant])
sigfrac = Variable("sigFrac", 0.9, 0.75, 1.00)
total = AddPdf("total", [sigfrac], [signal, backgr])
# Do the fit
total.fitTo(data)
12/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
Code for Himadri’s example (addition.py)
# Plot data
plt.hist(dat, bins='auto', label='data', normed=True)
# Make grid and evaluate on it
grid = total.makeGrid()
total.setData(grid)
main, gauss, flat = total.getCompProbsAtDataPoints()
xvals = grid.to_matrix().flatten()
# Plotting components
plt.plot(xvals, main, label='total')
plt.plot(xvals, np.array(gauss)*sigfrac.value, label='signal')
plt.plot(xvals, np.array(flat)*(1-sigfrac.value), label='background')
# Show the plot
plt.legend()
plt.show()
13/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018
Plot (addition.py)
4 2 0 2 4
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35 total
signal
background
data
Figure 1: Simulated data and fit
10/10Henry Schreiner
Recent Developments in GooFit
February 12, 2018

More Related Content

What's hot

2019 IRIS-HEP AS workshop: Particles and decays
2019 IRIS-HEP AS workshop: Particles and decays2019 IRIS-HEP AS workshop: Particles and decays
2019 IRIS-HEP AS workshop: Particles and decaysHenry Schreiner
 
IRIS-HEP Retreat: Boost-Histogram Roadmap
IRIS-HEP Retreat: Boost-Histogram RoadmapIRIS-HEP Retreat: Boost-Histogram Roadmap
IRIS-HEP Retreat: Boost-Histogram RoadmapHenry Schreiner
 
PyHEP 2019: Python Histogramming Packages
PyHEP 2019: Python Histogramming PackagesPyHEP 2019: Python Histogramming Packages
PyHEP 2019: Python Histogramming PackagesHenry Schreiner
 
Data Visualization in Python
Data Visualization in PythonData Visualization in Python
Data Visualization in PythonJagriti Goswami
 
Keynote at Converge 2019
Keynote at Converge 2019Keynote at Converge 2019
Keynote at Converge 2019Travis Oliphant
 
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUs
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUsScaling out Tensorflow-as-a-Service on Spark and Commodity GPUs
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUsJim Dowling
 
GPars in Saga Groovy Study
GPars in Saga Groovy StudyGPars in Saga Groovy Study
GPars in Saga Groovy StudyNaoki Rin
 
Odsc workshop - Distributed Tensorflow on Hops
Odsc workshop - Distributed Tensorflow on HopsOdsc workshop - Distributed Tensorflow on Hops
Odsc workshop - Distributed Tensorflow on HopsJim Dowling
 
Scaling Python to CPUs and GPUs
Scaling Python to CPUs and GPUsScaling Python to CPUs and GPUs
Scaling Python to CPUs and GPUsTravis Oliphant
 
Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19GoDataDriven
 
Apache spark session
Apache spark sessionApache spark session
Apache spark sessionknowbigdata
 
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...Intel® Software
 
The evolution of array computing in Python
The evolution of array computing in PythonThe evolution of array computing in Python
The evolution of array computing in PythonRalf Gommers
 
HadoopCon 2016 - 用 Jupyter Notebook Hold 住一個上線 Spark Machine Learning 專案實戰
HadoopCon 2016  - 用 Jupyter Notebook Hold 住一個上線 Spark  Machine Learning 專案實戰HadoopCon 2016  - 用 Jupyter Notebook Hold 住一個上線 Spark  Machine Learning 專案實戰
HadoopCon 2016 - 用 Jupyter Notebook Hold 住一個上線 Spark Machine Learning 專案實戰Wayne Chen
 
Python array API standardization - current state and benefits
Python array API standardization - current state and benefitsPython array API standardization - current state and benefits
Python array API standardization - current state and benefitsRalf Gommers
 
High scalable applications with Python
High scalable applications with PythonHigh scalable applications with Python
High scalable applications with PythonGiuseppe Broccolo
 

What's hot (20)

2019 IRIS-HEP AS workshop: Particles and decays
2019 IRIS-HEP AS workshop: Particles and decays2019 IRIS-HEP AS workshop: Particles and decays
2019 IRIS-HEP AS workshop: Particles and decays
 
IRIS-HEP Retreat: Boost-Histogram Roadmap
IRIS-HEP Retreat: Boost-Histogram RoadmapIRIS-HEP Retreat: Boost-Histogram Roadmap
IRIS-HEP Retreat: Boost-Histogram Roadmap
 
PyHEP 2019: Python Histogramming Packages
PyHEP 2019: Python Histogramming PackagesPyHEP 2019: Python Histogramming Packages
PyHEP 2019: Python Histogramming Packages
 
Data Visualization in Python
Data Visualization in PythonData Visualization in Python
Data Visualization in Python
 
Keynote at Converge 2019
Keynote at Converge 2019Keynote at Converge 2019
Keynote at Converge 2019
 
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUs
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUsScaling out Tensorflow-as-a-Service on Spark and Commodity GPUs
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUs
 
GPars in Saga Groovy Study
GPars in Saga Groovy StudyGPars in Saga Groovy Study
GPars in Saga Groovy Study
 
Odsc workshop - Distributed Tensorflow on Hops
Odsc workshop - Distributed Tensorflow on HopsOdsc workshop - Distributed Tensorflow on Hops
Odsc workshop - Distributed Tensorflow on Hops
 
PyCon Estonia 2019
PyCon Estonia 2019PyCon Estonia 2019
PyCon Estonia 2019
 
CuPy v4 and v5 roadmap
CuPy v4 and v5 roadmapCuPy v4 and v5 roadmap
CuPy v4 and v5 roadmap
 
Scaling Python to CPUs and GPUs
Scaling Python to CPUs and GPUsScaling Python to CPUs and GPUs
Scaling Python to CPUs and GPUs
 
Adding CF Attributes to an HDF5 File
Adding CF Attributes to an HDF5 FileAdding CF Attributes to an HDF5 File
Adding CF Attributes to an HDF5 File
 
Chainer v4 and v5
Chainer v4 and v5Chainer v4 and v5
Chainer v4 and v5
 
Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19
 
Apache spark session
Apache spark sessionApache spark session
Apache spark session
 
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
 
The evolution of array computing in Python
The evolution of array computing in PythonThe evolution of array computing in Python
The evolution of array computing in Python
 
HadoopCon 2016 - 用 Jupyter Notebook Hold 住一個上線 Spark Machine Learning 專案實戰
HadoopCon 2016  - 用 Jupyter Notebook Hold 住一個上線 Spark  Machine Learning 專案實戰HadoopCon 2016  - 用 Jupyter Notebook Hold 住一個上線 Spark  Machine Learning 專案實戰
HadoopCon 2016 - 用 Jupyter Notebook Hold 住一個上線 Spark Machine Learning 專案實戰
 
Python array API standardization - current state and benefits
Python array API standardization - current state and benefitsPython array API standardization - current state and benefits
Python array API standardization - current state and benefits
 
High scalable applications with Python
High scalable applications with PythonHigh scalable applications with Python
High scalable applications with Python
 

Similar to DIANA: Recent developments in GooFit

PEARC17: Modernizing GooFit: A Case Study
PEARC17: Modernizing GooFit: A Case StudyPEARC17: Modernizing GooFit: A Case Study
PEARC17: Modernizing GooFit: A Case StudyHenry Schreiner
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Runwesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Gaming analytics on gcp
Gaming analytics on gcpGaming analytics on gcp
Gaming analytics on gcpMyunggeun Choi
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)wesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
GCP Gaming 2016 Seoul, Korea Gaming Analytics
GCP Gaming 2016 Seoul, Korea Gaming AnalyticsGCP Gaming 2016 Seoul, Korea Gaming Analytics
GCP Gaming 2016 Seoul, Korea Gaming AnalyticsChris Jang
 
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...DataKitchen
 
London atlassian meetup 31 jan 2016 jira metrics-extract slides
London atlassian meetup 31 jan 2016 jira metrics-extract slidesLondon atlassian meetup 31 jan 2016 jira metrics-extract slides
London atlassian meetup 31 jan 2016 jira metrics-extract slidesRudiger Wolf
 
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQuery
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQueryCodeCamp Iasi - Creating serverless data analytics system on GCP using BigQuery
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQueryMárton Kodok
 
Heroku to Kubernetes & Gihub to Gitlab success story
Heroku to Kubernetes & Gihub to Gitlab success storyHeroku to Kubernetes & Gihub to Gitlab success story
Heroku to Kubernetes & Gihub to Gitlab success storyJérémy Wimsingues
 
PayPal Notebooks at Jupytercon 2018
PayPal Notebooks at Jupytercon 2018PayPal Notebooks at Jupytercon 2018
PayPal Notebooks at Jupytercon 2018Romit Mehta
 
IoT NY - Google Cloud Services for IoT
IoT NY - Google Cloud Services for IoTIoT NY - Google Cloud Services for IoT
IoT NY - Google Cloud Services for IoTJames Chittenden
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with pythonroskakori
 
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the EnterpriseBetter, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the EnterprisePerforce
 
Hp sizer for microsoft share point
Hp sizer for microsoft share pointHp sizer for microsoft share point
Hp sizer for microsoft share pointUGAIA
 
Powerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackPowerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackwesley chun
 
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQueryGDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQueryMárton Kodok
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloudwesley chun
 

Similar to DIANA: Recent developments in GooFit (20)

PEARC17: Modernizing GooFit: A Case Study
PEARC17: Modernizing GooFit: A Case StudyPEARC17: Modernizing GooFit: A Case Study
PEARC17: Modernizing GooFit: A Case Study
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Gaming analytics on gcp
Gaming analytics on gcpGaming analytics on gcp
Gaming analytics on gcp
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
GCP Gaming 2016 Seoul, Korea Gaming Analytics
GCP Gaming 2016 Seoul, Korea Gaming AnalyticsGCP Gaming 2016 Seoul, Korea Gaming Analytics
GCP Gaming 2016 Seoul, Korea Gaming Analytics
 
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
 
London atlassian meetup 31 jan 2016 jira metrics-extract slides
London atlassian meetup 31 jan 2016 jira metrics-extract slidesLondon atlassian meetup 31 jan 2016 jira metrics-extract slides
London atlassian meetup 31 jan 2016 jira metrics-extract slides
 
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQuery
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQueryCodeCamp Iasi - Creating serverless data analytics system on GCP using BigQuery
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQuery
 
R sharing 101
R sharing 101R sharing 101
R sharing 101
 
Heroku to Kubernetes & Gihub to Gitlab success story
Heroku to Kubernetes & Gihub to Gitlab success storyHeroku to Kubernetes & Gihub to Gitlab success story
Heroku to Kubernetes & Gihub to Gitlab success story
 
PayPal Notebooks at Jupytercon 2018
PayPal Notebooks at Jupytercon 2018PayPal Notebooks at Jupytercon 2018
PayPal Notebooks at Jupytercon 2018
 
IoT NY - Google Cloud Services for IoT
IoT NY - Google Cloud Services for IoTIoT NY - Google Cloud Services for IoT
IoT NY - Google Cloud Services for IoT
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with python
 
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the EnterpriseBetter, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
 
Hp sizer for microsoft share point
Hp sizer for microsoft share pointHp sizer for microsoft share point
Hp sizer for microsoft share point
 
Powerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackPowerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hack
 
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQueryGDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloud
 

More from Henry Schreiner

Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Henry Schreiner
 
Princeton RSE Peer network first meeting
Princeton RSE Peer network first meetingPrinceton RSE Peer network first meeting
Princeton RSE Peer network first meetingHenry Schreiner
 
Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Henry Schreiner
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingHenry Schreiner
 
What's new in Python 3.11
What's new in Python 3.11What's new in Python 3.11
What's new in Python 3.11Henry Schreiner
 
Everything you didn't know you needed
Everything you didn't know you neededEverything you didn't know you needed
Everything you didn't know you neededHenry Schreiner
 
SciPy22 - Building binary extensions with pybind11, scikit build, and cibuild...
SciPy22 - Building binary extensions with pybind11, scikit build, and cibuild...SciPy22 - Building binary extensions with pybind11, scikit build, and cibuild...
SciPy22 - Building binary extensions with pybind11, scikit build, and cibuild...Henry Schreiner
 
PyCon 2022 -Scikit-HEP Developer Pages: Guidelines for modern packaging
PyCon 2022 -Scikit-HEP Developer Pages: Guidelines for modern packagingPyCon 2022 -Scikit-HEP Developer Pages: Guidelines for modern packaging
PyCon 2022 -Scikit-HEP Developer Pages: Guidelines for modern packagingHenry Schreiner
 
PyCon2022 - Building Python Extensions
PyCon2022 - Building Python ExtensionsPyCon2022 - Building Python Extensions
PyCon2022 - Building Python ExtensionsHenry Schreiner
 
boost-histogram / Hist: PyHEP Topical meeting
boost-histogram / Hist: PyHEP Topical meetingboost-histogram / Hist: PyHEP Topical meeting
boost-histogram / Hist: PyHEP Topical meetingHenry Schreiner
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingHenry Schreiner
 
HOW 2019: Machine Learning for the Primary Vertex Reconstruction
HOW 2019: Machine Learning for the Primary Vertex ReconstructionHOW 2019: Machine Learning for the Primary Vertex Reconstruction
HOW 2019: Machine Learning for the Primary Vertex ReconstructionHenry Schreiner
 
HOW 2019: A complete reproducible ROOT environment in under 5 minutes
HOW 2019: A complete reproducible ROOT environment in under 5 minutesHOW 2019: A complete reproducible ROOT environment in under 5 minutes
HOW 2019: A complete reproducible ROOT environment in under 5 minutesHenry Schreiner
 
ACAT 2019: A hybrid deep learning approach to vertexing
ACAT 2019: A hybrid deep learning approach to vertexingACAT 2019: A hybrid deep learning approach to vertexing
ACAT 2019: A hybrid deep learning approach to vertexingHenry Schreiner
 
2019 CtD: A hybrid deep learning approach to vertexing
2019 CtD: A hybrid deep learning approach to vertexing2019 CtD: A hybrid deep learning approach to vertexing
2019 CtD: A hybrid deep learning approach to vertexingHenry Schreiner
 
2019 IML workshop: A hybrid deep learning approach to vertexing
2019 IML workshop: A hybrid deep learning approach to vertexing2019 IML workshop: A hybrid deep learning approach to vertexing
2019 IML workshop: A hybrid deep learning approach to vertexingHenry Schreiner
 
CHEP 2019: Recent developments in histogram libraries
CHEP 2019: Recent developments in histogram librariesCHEP 2019: Recent developments in histogram libraries
CHEP 2019: Recent developments in histogram librariesHenry Schreiner
 

More from Henry Schreiner (20)

Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
 
Princeton RSE Peer network first meeting
Princeton RSE Peer network first meetingPrinceton RSE Peer network first meeting
Princeton RSE Peer network first meeting
 
Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance Tooling
 
What's new in Python 3.11
What's new in Python 3.11What's new in Python 3.11
What's new in Python 3.11
 
Everything you didn't know you needed
Everything you didn't know you neededEverything you didn't know you needed
Everything you didn't know you needed
 
SciPy22 - Building binary extensions with pybind11, scikit build, and cibuild...
SciPy22 - Building binary extensions with pybind11, scikit build, and cibuild...SciPy22 - Building binary extensions with pybind11, scikit build, and cibuild...
SciPy22 - Building binary extensions with pybind11, scikit build, and cibuild...
 
SciPy 2022 Scikit-HEP
SciPy 2022 Scikit-HEPSciPy 2022 Scikit-HEP
SciPy 2022 Scikit-HEP
 
PyCon 2022 -Scikit-HEP Developer Pages: Guidelines for modern packaging
PyCon 2022 -Scikit-HEP Developer Pages: Guidelines for modern packagingPyCon 2022 -Scikit-HEP Developer Pages: Guidelines for modern packaging
PyCon 2022 -Scikit-HEP Developer Pages: Guidelines for modern packaging
 
PyCon2022 - Building Python Extensions
PyCon2022 - Building Python ExtensionsPyCon2022 - Building Python Extensions
PyCon2022 - Building Python Extensions
 
boost-histogram / Hist: PyHEP Topical meeting
boost-histogram / Hist: PyHEP Topical meetingboost-histogram / Hist: PyHEP Topical meeting
boost-histogram / Hist: PyHEP Topical meeting
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
 
CMake best practices
CMake best practicesCMake best practices
CMake best practices
 
HOW 2019: Machine Learning for the Primary Vertex Reconstruction
HOW 2019: Machine Learning for the Primary Vertex ReconstructionHOW 2019: Machine Learning for the Primary Vertex Reconstruction
HOW 2019: Machine Learning for the Primary Vertex Reconstruction
 
HOW 2019: A complete reproducible ROOT environment in under 5 minutes
HOW 2019: A complete reproducible ROOT environment in under 5 minutesHOW 2019: A complete reproducible ROOT environment in under 5 minutes
HOW 2019: A complete reproducible ROOT environment in under 5 minutes
 
ACAT 2019: A hybrid deep learning approach to vertexing
ACAT 2019: A hybrid deep learning approach to vertexingACAT 2019: A hybrid deep learning approach to vertexing
ACAT 2019: A hybrid deep learning approach to vertexing
 
2019 CtD: A hybrid deep learning approach to vertexing
2019 CtD: A hybrid deep learning approach to vertexing2019 CtD: A hybrid deep learning approach to vertexing
2019 CtD: A hybrid deep learning approach to vertexing
 
PyHEP 2019: Python 3.8
PyHEP 2019: Python 3.8PyHEP 2019: Python 3.8
PyHEP 2019: Python 3.8
 
2019 IML workshop: A hybrid deep learning approach to vertexing
2019 IML workshop: A hybrid deep learning approach to vertexing2019 IML workshop: A hybrid deep learning approach to vertexing
2019 IML workshop: A hybrid deep learning approach to vertexing
 
CHEP 2019: Recent developments in histogram libraries
CHEP 2019: Recent developments in histogram librariesCHEP 2019: Recent developments in histogram libraries
CHEP 2019: Recent developments in histogram libraries
 

Recently uploaded

Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentationtahreemzahra82
 
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...lizamodels9
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologycaarthichand2003
 
ECG Graph Monitoring with AD8232 ECG Sensor & Arduino.pptx
ECG Graph Monitoring with AD8232 ECG Sensor & Arduino.pptxECG Graph Monitoring with AD8232 ECG Sensor & Arduino.pptx
ECG Graph Monitoring with AD8232 ECG Sensor & Arduino.pptxmaryFF1
 
Base editing, prime editing, Cas13 & RNA editing and organelle base editing
Base editing, prime editing, Cas13 & RNA editing and organelle base editingBase editing, prime editing, Cas13 & RNA editing and organelle base editing
Base editing, prime editing, Cas13 & RNA editing and organelle base editingNetHelix
 
User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...D. B. S. College Kanpur
 
Citronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyayCitronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyayupadhyaymani499
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
 
Radiation physics in Dental Radiology...
Radiation physics in Dental Radiology...Radiation physics in Dental Radiology...
Radiation physics in Dental Radiology...navyadasi1992
 
Carbon Dioxide Capture and Storage (CSS)
Carbon Dioxide Capture and Storage (CSS)Carbon Dioxide Capture and Storage (CSS)
Carbon Dioxide Capture and Storage (CSS)Tamer Koksalan, PhD
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
basic entomology with insect anatomy and taxonomy
basic entomology with insect anatomy and taxonomybasic entomology with insect anatomy and taxonomy
basic entomology with insect anatomy and taxonomyDrAnita Sharma
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In DubaiDubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubaikojalkojal131
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxpriyankatabhane
 

Recently uploaded (20)

Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentation
 
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technology
 
ECG Graph Monitoring with AD8232 ECG Sensor & Arduino.pptx
ECG Graph Monitoring with AD8232 ECG Sensor & Arduino.pptxECG Graph Monitoring with AD8232 ECG Sensor & Arduino.pptx
ECG Graph Monitoring with AD8232 ECG Sensor & Arduino.pptx
 
Base editing, prime editing, Cas13 & RNA editing and organelle base editing
Base editing, prime editing, Cas13 & RNA editing and organelle base editingBase editing, prime editing, Cas13 & RNA editing and organelle base editing
Base editing, prime editing, Cas13 & RNA editing and organelle base editing
 
User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)
 
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
Fertilization: Sperm and the egg—collectively called the gametes—fuse togethe...
 
Volatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -IVolatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -I
 
Citronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyayCitronella presentation SlideShare mani upadhyay
Citronella presentation SlideShare mani upadhyay
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
 
Radiation physics in Dental Radiology...
Radiation physics in Dental Radiology...Radiation physics in Dental Radiology...
Radiation physics in Dental Radiology...
 
Carbon Dioxide Capture and Storage (CSS)
Carbon Dioxide Capture and Storage (CSS)Carbon Dioxide Capture and Storage (CSS)
Carbon Dioxide Capture and Storage (CSS)
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
basic entomology with insect anatomy and taxonomy
basic entomology with insect anatomy and taxonomybasic entomology with insect anatomy and taxonomy
basic entomology with insect anatomy and taxonomy
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In DubaiDubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
Dubai Calls Girl Lisa O525547819 Lexi Call Girls In Dubai
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptx
 

DIANA: Recent developments in GooFit

  • 1. Recent Developments in Henry Schreiner February 12, 2018
  • 2. Special announcement If you would like to follow along on your computer with Himadri’s talk, execute the following lines now: pip install scikit-build cmake PIP_INSTALL_OPTIONS="-- -DGOOFIT_DEVICE=OMP" pip install -v goofit Requirements: • Linux or macOS • A recent version of pip • A compiler (gcc 4.8+ or Clang) • make or ninja and git • numpy and matplotlib needed for examples 1/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 3. GooFit and GooFit 2.0 2013 2014 2015 2016 2017 2018 Public release 0.1 0.2 0.3 OpenMP 0.4 Work in forks Minor updates 1.0 CMake 2.0 Python 2.1 What is GooFit? • Package for high-speed fitting • Resembles RooFit • High performance on GPU or CPU • 100-1000x faster than single core History of GooFit • Released publicly 2013 • GooFit 2.0 released mid 2017 • GooFit 2.1 released end of 2017 GooFit 2.0 • Easy to build (CMake) • Dependency simplification (Minuit, etc.) • Continuous integration online • Lots of work merged back in • Supports more platforms (macOS, TBB) • Support for common tools (XCode, etc.) • Memory caching improvements • MPI multi GPU and node • Docker containers too! [Modernizing GooFit @ PEARC17] [GooFit 2.0 @ ACAT 2017] 2/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 4. GooFit 2.1: Python bindings • Compose existing PDFs • Details in Himadri’s talk! What it means for you • Easy to read/write • Easy to script • Avoid recompiling from goofit import * import numpy as np # Make a dataset xvar = Variable("xvar", -10, 10) data = UnbinnedDataSet(xvar) npdata = np.random.normal(1, 2.5, 100000) data.from_matrix([npdata], filter=True) # Prepare model mean = Variable("mean", 0, -10, 10) sigma = Variable("sigma", 1, 0, 5) gauss = GaussPdf("gauss", xvar, mean, sigma) gauss.fitTo(data) 3/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 5. GooFit 2.1: Python-like memory management • Internal reference counting for Variables • Observables now part of API • EventNumber also What it means for you • Easier model setup • Fewer segfaults • Simpler Python bindings Before: Variable* x = new Variable("x", 0, 3); After: Observable x{"x", 0, 3}; Python: x = Observable("x", 0, 3) 4/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 6. GooFit 2.1: Constructors in amplitude models • Now separate classes 3-body Resonances 4-body LineShapes • New Resonances/LineShapes What it means for you • Readable model setup • Easier to code • Signature for each constructor • Future optimizations possible Before: ResonancePdf("r1", ar, ai, m, w, sp, PAIR_12); ResonancePdf("r2", ar, ai, m, sp, w, PAIR_12); ResonancePdf("r3", ar, ai); After: Resonances::RBW("r1", ar, ai, m, w, sp, PAIR_12); Resonances::LASS("r2", ar, ai, m, w, sp, PAIR_12); Resonances::NonRes("r3", ar, ai); 5/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 7. GooFit 2.1: State-of-the-art build system • Minuit2 will be built if missing • GooFit coding style enforced • CCache native support on CMake 3.6+ • CUDA native support on CMake 3.9+ • OpenMP on Apple LLVM compiler! What it means for you • Less time spent on setup • More time spent on Physics • Easier to contribute • If you have make, CMake, g++, and git: git clone https://github.com/GooFit/GooFit.git cd GooFit make • Explicit instructions for many platforms available 6/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 8. GooFit 2.2 Compose PDFs Core • Redesigned PDF indexing • Details saved for Brad’s talk What it means for you • Easier to author PDFs • We can optimize the evaluation later __device__ fptype( device_Exp(fptype *evt, ParameterContainer &pc) { int id = pc.getObservable(0); fptype alpha = pc.getParameter(0); fptype x = evt[id]; fptype ret = exp(alpha * x); pc.incrementIndex(1, 1, 0, 1, 1); return ret; } 7/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 9. GooFit in the future Documentation • See the README • API documentation being worked on • Help us with the GooFit 2torial Analyses • Usage improvements still being added • Several ongoing analyses in GooFit • If you extend the core, please contribute! Hydra • Templated C++11 framework • Made for highly parallel scientific calculations • CUDA, OpenMP, TBB, or single threaded • Eventual integration/interaction planned • See /MultithreadCorner/Hydra 8/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 10. Summary • GooFit is a fast tool for fitting • GooFit 2.0 is easier to build and use • GooFit 2.1 adds Python and more • GooFit 2.2 (coming soon) makes PDFs better • We are available to help you with GooFit If you have been building GooFit, it should be ready for Himadri’s talk! Follow along with her. 9/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 11. Questions? Thanks to the work and support of: • A. Augusto Alves Jr. • Rolf Andreassen • Christoph Hasse • Bradley Hittle • Zachary Huard • Brian Maddock • Himadri Pandey • Henry Schreiner • Michael Sokoloff • Liang Sun • Karen Tomko Continued development on GooFit is supported by the U.S. National Science Foundation under grant number 1414736 and was developed under grant number 1005530. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the developers and do not necessarily reflect the views of the National Science Foundation. In addition, we thank the nVidia GPU Grant Program for donating hardware used in developing this framework. 10/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 12. Code for Himadri’s example (addition.py) # Imports from goofit import * import numpy as np import matplotlib.pyplot as plt # Print GooFit and computer info print_goofit_info() # GooFit DataSet xvar = Observable("xvar", -5, 5) data = UnbinnedDataSet(xvar) # Make a dataset from 90% gauss + 10% flat dat = np.random.normal(0.2,1.1,100000) dat[:10000] = np.random.uniform(-5,5,10000) data.from_matrix([dat], filter=True) 11/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 13. Code for Himadri’s example (addition.py) # GooFit PDFs and fitting variables xmean = Variable("xmean", 0, 1, -10, 10) xsigm = Variable("xsigm", 1, 0.5, 1.5) signal = GaussianPdf("signal", xvar, xmean, xsigm) constant = Variable("constant", 1.0) backgr = PolynomialPdf("backgr", xvar, [constant]) sigfrac = Variable("sigFrac", 0.9, 0.75, 1.00) total = AddPdf("total", [sigfrac], [signal, backgr]) # Do the fit total.fitTo(data) 12/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 14. Code for Himadri’s example (addition.py) # Plot data plt.hist(dat, bins='auto', label='data', normed=True) # Make grid and evaluate on it grid = total.makeGrid() total.setData(grid) main, gauss, flat = total.getCompProbsAtDataPoints() xvals = grid.to_matrix().flatten() # Plotting components plt.plot(xvals, main, label='total') plt.plot(xvals, np.array(gauss)*sigfrac.value, label='signal') plt.plot(xvals, np.array(flat)*(1-sigfrac.value), label='background') # Show the plot plt.legend() plt.show() 13/10Henry Schreiner Recent Developments in GooFit February 12, 2018
  • 15. Plot (addition.py) 4 2 0 2 4 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 total signal background data Figure 1: Simulated data and fit 10/10Henry Schreiner Recent Developments in GooFit February 12, 2018