{ "info": { "author": "Frank Sauerburger", "author_email": "frank@sauerburger.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: Physics" ], "description": "pylorentz\n=================================\n\nThe python package pylorentz provides classes to facilitate computations with\n4-vectors in high-energy physics.\n\nQuickstart\n==========\n\nInstall the package using pip\n\n.. code-block:: console\n\n $ pip install git+https://gitlab.sauerburger.com/frank/pylorentz.git\n\nor \n\n.. code-block:: console\n\n $ pip install pylorentz\n\n\nProperties\n----------\n\nThe package defines three types of 4-vectors: general purpose vectors,\n4-positions and 4-momenta. The working horse of the package are 4-momenta.\n\n.. code-block:: python\n\n >>> from pylorentz import Momentum4\n >>> muon = Momentum4.m_eta_phi_pt(0.1057, 4.5, 1.5, 35)\n >>> muon.eta\n 4.5\n >>> muon.phi\n 1.5\n >>> muon.p_t\n 35.0\n >>> \"%.2f\" % muon.p\n '1575.49'\n >>> \"%.2f\" % muon.e\n '1575.49'\n\nArithmetics\n-----------\n\n4-vectors support a variety of arithmetic operations. The most important one\nis the addition of two vectors.\n\n.. code-block:: python\n\n >>> from pylorentz import Momentum4\n >>> tau_1 = Momentum4.m_eta_phi_pt(1.777, 4.5, 1.5, 35)\n >>> tau_2 = Momentum4.m_eta_phi_pt(1.777, -4.5, 1.5, 35)\n\nWe can add the momenta of the two tau leptons and access the properties of the\nparent particle.\n\n.. code-block:: python\n\n >>> parent = tau_1 + tau_2\n >>> \"%.2f\" % parent.m\n '3150.21'\n >>> \"%.2f\" % parent.eta\n '0.00'\n >>> \"%.2f\" % parent.phi\n '1.50'\n\n\nLorentz Boosts\n--------------\n\nThe package also provides methods to perform Lorentz boosts. For example,\nconsider the decay of a Higgs boson to a pair of tau leptons in the rest frame\nof the Higgs boson. The tau leptons are back-to-back in the\ny-z-plane.\n\n.. code-block:: python\n\n >>> import math\n >>> from pylorentz import Momentum4\n >>> m = 125.0\n >>> tau_1 = Momentum4.e_m_eta_phi(m / 2, 1.777, 1.5, math.pi / 2)\n >>> tau_2 = Momentum4.e_m_eta_phi(m / 2, 1.777, -1.5, -math.pi / 2)\n\nNow let's assume the Higgs boson itself is not at rest. We can define its\nmomentum and then boost the two tau leptons.\n\n.. code-block:: python\n\n >>> higgs = Momentum4.m_eta_phi_pt(m, 2, 0, 250)\n >>> tau_1.boost_particle(higgs)\n Momentum4(884.599, 220.498, 26.5578, 856.264)\n >>> tau_2.boost_particle(higgs)\n Momentum4(64.2195, 29.5021, -26.5578, 50.451)\n\nLinks\n=====\n\n * `GitLab Repository `_\n * `pylorentz on PyPi `_\n * `Documentation `_", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.sauerburger.com/frank/pylorentz", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pylorentz", "package_url": "https://pypi.org/project/pylorentz/", "platform": "", "project_url": "https://pypi.org/project/pylorentz/", "project_urls": { "Homepage": "https://gitlab.sauerburger.com/frank/pylorentz" }, "release_url": "https://pypi.org/project/pylorentz/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Python project to work with 4-vectors and Lorentz boots in high energy physics.", "version": "0.1.0" }, "last_serial": 5710494, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "45fbe1b8728ee2b335cfa8731322c535", "sha256": "201b040967c6d2aeb568972745354df4da60f263b504106d69d5cc07bcafea37" }, "downloads": -1, "filename": "pylorentz-0.1.0.tar.gz", "has_sig": true, "md5_digest": "45fbe1b8728ee2b335cfa8731322c535", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8248, "upload_time": "2019-08-21T15:48:36", "url": "https://files.pythonhosted.org/packages/93/36/c92f9b8404eaf47e94ede797937fc003071e9f236a1b98d23a21f2f385e3/pylorentz-0.1.0.tar.gz" } ], "0.1.0a1": [ { "comment_text": "", "digests": { "md5": "961b1b3da1986bbaa3233b186288cbf5", "sha256": "2b08f7a24efedcfcd98d3567a562caf5ab76fa5da92a010fa3500a246ea0b957" }, "downloads": -1, "filename": "pylorentz-0.1.0a1.tar.gz", "has_sig": true, "md5_digest": "961b1b3da1986bbaa3233b186288cbf5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8256, "upload_time": "2019-08-21T15:32:42", "url": "https://files.pythonhosted.org/packages/76/16/dce3ad16a09ca0ed20fbc71d97feedf30403c62ae1fe2ef03b3241fd53b2/pylorentz-0.1.0a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "45fbe1b8728ee2b335cfa8731322c535", "sha256": "201b040967c6d2aeb568972745354df4da60f263b504106d69d5cc07bcafea37" }, "downloads": -1, "filename": "pylorentz-0.1.0.tar.gz", "has_sig": true, "md5_digest": "45fbe1b8728ee2b335cfa8731322c535", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8248, "upload_time": "2019-08-21T15:48:36", "url": "https://files.pythonhosted.org/packages/93/36/c92f9b8404eaf47e94ede797937fc003071e9f236a1b98d23a21f2f385e3/pylorentz-0.1.0.tar.gz" } ] }