39 mcbooster::Vector4R p4_d1p, p4_h1p, p4_h2p, p4_d2p;
41 mcbooster::Vector4R d1_perp, d1_prime, h1_perp;
42 mcbooster::Vector4R D;
45 mcbooster::Vector4R D2 = p4_h1 + p4_h2;
47 d1_perp = p4_d1 - (D.dot(p4_d1) / D.dot(D)) * D;
48 h1_perp = p4_h1 - (D2.dot(p4_h1) / D2.dot(D2)) * D2;
52 d1_prime = D.cross(d1_perp);
54 d1_perp = d1_perp / d1_perp.d3mag();
55 d1_prime = d1_prime / d1_prime.d3mag();
57 mcbooster::GReal_t x, y;
59 x = d1_perp.dot(h1_perp);
60 y = d1_prime.dot(h1_perp);
61 mcbooster::GReal_t
phi = atan2(y, x);
67 mcbooster::Vector4R d1n = p4_d1 / p4_d1.d3mag();
68 mcbooster::Vector4R d2n = p4_d2 / p4_d2.d3mag();
69 mcbooster::Vector4R h1n = p4_h1 / p4_h1.d3mag();
70 mcbooster::Vector4R h2n = p4_h2 / p4_h2.d3mag();
71 mcbooster::Vector4R h12n = (p4_h1 + p4_h2);
72 h12n *= 1.0 / h12n.d3mag();
74 mcbooster::Vector4R n1 = d1n.cross(d2n);
75 mcbooster::Vector4R n2 = h1n.cross(h2n);
76 n1 *= 1.0 / n1.d3mag();
77 n2 *= 1.0 / n2.d3mag();
78 mcbooster::Vector4R n3 = n1.cross(n2);
80 mcbooster::GReal_t cp = (n1.dot(n2));
81 mcbooster::GReal_t sp = (n3.dot(h12n));
83 mcbooster::GReal_t phi2 = acos(cp);
__host__ __device__ mcbooster::GReal_t phi(const mcbooster::Vector4R &p4_p, const mcbooster::Vector4R &p4_d1, const mcbooster::Vector4R &p4_d2, const mcbooster::Vector4R &p4_h1, const mcbooster::Vector4R &p4_h2)