Skip to content

Commit 1f1ada7

Browse files
Better doc in examples (example of it).
1 parent 3c8eda4 commit 1f1ada7

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ Work-in-progress instructions:
1818
4. go to build directory: `cd build`
1919
5. `cmake -DHYDRA_INSTALL_PATH=/path2sw/Hydra/ -DTHRUST_INSTALL_PATH=/path2sw/Hydra/ -DPYBIND11_INSTALL_PATH=/path2sw/pybind11/include/ ..`
2020
6. `make`
21+
22+
These instructions create a library .so to be imported from Python.
23+
Comprehensive documentation is to be found under the `docs/` folder.

examples/PhaseSpace/phsp_basic.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
import HydraPython as hypy
1+
# Licensed under a GNU general public license, see LICENSE.
2+
"""
3+
This example shows how to use the Hydra's phase space Monte Carlo algorithms
4+
to generate a sample of B0 -> J/psi K pi decays.
5+
6+
Author: Deepanshu Thakur
7+
Date : Aug 21, 2017
8+
"""
9+
210
import sys
311
import time
412

13+
import HydraPython as hypy
14+
515

616
def main():
7-
"""
8-
This example shows how to use the Hydra's
9-
phase space Monte Carlo algorithms to
10-
generate a sample of B0 -> J/psi K pi.
11-
"""
1217
nentries = 1000000
13-
B0_mass = 5.27955
18+
B0_mass = 5.27955 # All masses ar given in GeV/c^2
1419
Jpsi_mass = 3.0969
1520
K_mass = 0.493677
1621
pi_mass = 0.13957061
1722
if len(sys.argv) > 1:
1823
nentries = int(sys.argv[1])
1924

2025
B0 = hypy.Vector4R(B0_mass, 0.0, 0.0, 0.0)
21-
masses = [Jpsi_mass, K_mass, pi_mass]
26+
masses = [Jpsi_mass, K_mass, pi_mass] # list of final-state particles
2227
phsp = hypy.PhaseSpace3(B0_mass, masses)
2328

2429
# Device #

0 commit comments

Comments
 (0)