Hey, all! I’ve been working in Python 3.x a lot and am in the process of reproducing many functions native to ROOT but in a numpy/pandas format. Most things I’m doing (going over StPico files for STAR analysis) are pretty straightforward, but one is eluding me: mass.
I’d like to get mass natively in Python, but I’m having trouble finding exactly how we get the mass parameter for a track in ROOT. Any idea where I can find this? I tried looking in the ROOT manual, but I was unsuccessful.
As an example, here’s how I get vertex positions for an event and then calculate v_r (where “data” is imported from a STAR pico file using upROOT):
vX = np.hstack(np.asarray(data["Event"]["Event.mPrimaryVertexX"].array()))
vY = np.hstack(np.asarray(data["Event"]["Event.mPrimaryVertexY"].array()))
vZ = np.hstack(np.asarray(data["Event"]["Event.mPrimaryVertexZ"].array()))
vR = np.power((np.power(vX, 2)+np.power(vY, 2)), (1/2))
Thanks!
ROOT Version: 6.14/02
Python Version: 3.7