21 using ROOT::Math::Boost;
22 using ROOT::Math::RotationX;
23 using ROOT::Math::RotationY;
26 PxPyPzEVector eo = ei;
27 PxPyPzEVector po = pi;
30 const auto cmBoost = (ei + pi).BoostToCM();
31 const Boost boost_from_og_to_cm(cmBoost);
33 ei = boost_from_og_to_cm(ei);
34 pi = boost_from_og_to_cm(pi);
37 RotationY rotAboutY(-1.0 * atan2(pi.Px(), pi.Pz()));
38 RotationX rotAboutX(+1.0 * atan2(pi.Py(), pi.Pz()));
40 ei = rotAboutX(rotAboutY(ei));
41 pi = rotAboutX(rotAboutY(pi));
44 double e_energy = eo.E();
45 double p_energy = po.E();
46 double e_pz = -eo.P();
47 double p_pz = +po.P();
49 PxPyPzEVector eh(0, 0, e_pz, e_energy);
50 PxPyPzEVector ph(0, 0, p_pz, p_energy);
53 const auto hoBoost = (eh + ph).BoostToCM();
54 const Boost boost_from_cm_to_headon(-hoBoost);
58 tf *= boost_from_cm_to_headon;
61 tf *= boost_from_og_to_cm;