JHUGen MELA  JHUGen v7.5.6, MELA v2.4.2
Matrix element calculations as used in JHUGen.
SimpleParticle_t

The SimpleParticle_t for Python is a type definition defined in TVar.hh. These are defined as pairs of an integer and a 4-vector, and are the primary input object used for every particle.

Due to difficulties with interfacing between ROOT's pyROOT implemenetation of TLorentzVector, there are new functions that operate as constructors.

Constructor

There is one constructor defined in the particle_initializer function. This was required due to the incompatibility of pyROOT and C++ based ROOT. The function takes in 5 required and 1 optional variable that are named as x, y, z, e, and ptEtaPhi.

Example:

import Mela
#creates a gluon with a 4-vector defined by x,y,z,E
gluon = Mela.SimpleParticle_t(id=21, x=0, y=0, z=12, e=12)
#creates an electron with a 4-vector defined by pt, eta, phi, mass
lepton = Mela.SimpleParticle_t(id=13, x=1, pt=0, eta=0, m=125, ptEtaPhi=True)

Attributes

There are 2 read-only attributes for a SimpleParticle_t. These cannot be edited; make a new object if you want to make a new vector.

id

The id returns the PDG ID of the particle.

Example:

import Mela
gluon = Mela.SimpleParticle_t(id=21, x=0, y=0, z=12, e=12)
print(gluon.id) #will print 21

Vectors

There are 2 vector attributes that you can use to see the value of the vector stored inside the class. There is PxPyPzE_vector, and there is PtEtaPhiM_vector. Both will return a 4-vector as a tuple of 4-values. PxPyPzE_vector returns the \(P_x\), \(P_y\), \(P_z\), \(E\) of the particle. PtEtaPhiM_vector returns the \(P_t\), \(\eta\), \(\phi\) and mass of the particle.

Vectors can also be set using setVector, which takes in the \(P_x\), \(P_y\), \(P_z\), \(E\) of the particle and sets the value of the 4-vector stored in the class to those quantities.

Example:

import Mela
gluon = Mela.SimpleParticle_t(id=21, x=0, y=0, z=12, e=12)
print(gluon.PxPyPzE_vector) #will print (0, 0, 12, 12)
gluon.SetVector(0,0,0,0)
print(gluon.PxPyPzE_vector) #will print (0, 0, 0, 0)
gluon2 = Mela.SimpleParticle_t(id=13, x=12, y=0, z=0, e=0, ptEtaPhi=True)
print(gluon.PtEtaPhiM_vector) #will print (12, 0, 0, 0)