Cuts and calculation for Z invariant mass

The Z invariant mass plots are generated by looping over every pair of tracks that are associated with a common primary vertex:

-Both tracks must have at least 10GeV.

-Both tracks must point to within 7cm of a tower cluster.

-Each tower cluster must have at least 25Gev ET.

-At least 25% of the energy in the near cone must be in the 2x2 cluster that the track points to.

-At least 90% of the energy in the 4x4 patch centered on the 2x2 must be within the 2x2.

-The resulting Z mass must be >60Gev and <150GeV.

 

The Z mass itself is calculated by creating a four momentum for each of the two tracks.  The Energy component is set to the energy of the 2x2 cluster, while the momentum vector is given the direction of the TPC track, and a magnitude of the 2x2 tower energy.  The two four vectors are then summed and the inner product taken before taking the square root of the resulting value.

 

mZ=sqrt((v1+v2)(dot)(v1+v2))

 

Previously I'd been using the position of the tower cluster relative to the vertex to compute the momentum vector, but this new method should be more precise.

 

 

This code can be found at http://www.star.bnl.gov/cgi-bin/protected/cvsweb.cgi/StRoot/StSpinPool/StWalgoB2009/St2009ZMaker.cxx?annotate=1.2, with the lines responsible for the cuts at ~105-125.  The invariant mass is calculated at ~88-98.  The values for the various cuts are set in the macro.