Commit d817082f authored by adelmann's avatar adelmann 🎗
Browse files

add p2, to propperly calculate p*p NOT only dot(p,p)

parent 52751225
......@@ -434,6 +434,10 @@ private:
Vector_t calcMeanP() const;
};
inline double ParallelTTracker::p2(Vector_t p) {
return p[0]*p[0] + p[0]*p[1] + p[0]*p[2] + p[1]*p[0] + p[1]*p[1]+ p[1]*p[2] + p[2]*p[0] + p[2]*p[1]+ p[2]*p[2];
}
inline double ParallelTTracker::ptoEMeV(Vector_t p) {
return (sqrt(dot(p, p) + 1.0) - 1.0) * itsBunch->getM() * 1e-6;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment