go-hep.org/x/hep@v0.38.1/fmom/p4.go (about)

     1  // Copyright ©2017 The go-hep Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package fmom
     6  
     7  // P4 models a Lorentz 4-vector.
     8  type P4 interface {
     9  	Px() float64       // x component of 4-momentum
    10  	Py() float64       // y component of 4-momentum
    11  	Pz() float64       // z component of 4-momentum
    12  	M() float64        // mass
    13  	M2() float64       // mass squared
    14  	P() float64        // momentum magnitude
    15  	P2() float64       // square of momentum magnitude
    16  	Eta() float64      // pseudo-rapidity
    17  	Rapidity() float64 // rapidity
    18  	Phi() float64      // azimuthal angle in [-pi,pi)
    19  	E() float64        // energy of 4-momentum
    20  	Et() float64       // transverse energy defined to be E*sin(Theta)
    21  	Pt() float64       // transverse momentum
    22  	IPt() float64      // inverse of transverse momentum
    23  	CosPhi() float64   // cosine(Phi)
    24  	SinPhi() float64   // sine(Phi)
    25  	CosTh() float64    // cosine(Theta)
    26  	SinTh() float64    // sine(Theta)
    27  	CotTh() float64    // cottan(Theta)
    28  	TanTh() float64    // tan(Theta)
    29  
    30  	Set(p4 P4)
    31  	Clone() P4
    32  }
    33  
    34  // Vec4 holds the four components of a Lorentz vector.
    35  type Vec4 struct {
    36  	X, Y, Z, T float64
    37  }