Added the trace checking feature.  For each event if the trace is there

it will use it to calculate energy and will calculate the short and long gates.

If there is no trace it will put 0 for the gates and use the internal energy