16void vo007_PhysicsHelpers()
28 auto phi1 =
Take(phis, idx[0]);
29 auto phi2 =
Take(phis, idx[1]);
32 std::cout <<
"DeltaPhi(phi1 = " << phi1 <<
",\n"
33 <<
" phi2 = " << phi2 <<
")\n"
34 <<
" = " << dphi <<
"\n";
40 auto eta1 =
Take(etas, idx[0]);
41 auto eta2 =
Take(etas, idx[1]);
42 auto dr =
DeltaR(eta1, eta2, phi1, phi2);
44 std::cout <<
"\nDeltaR(eta1 = " << eta1 <<
",\n"
45 <<
" eta2 = " << eta2 <<
",\n"
46 <<
" phi1 = " << phi1 <<
",\n"
47 <<
" phi2 = " << phi2 <<
")\n"
48 <<
" = " << dr <<
"\n";
63 auto invMass =
InvariantMasses(pt3, eta3, phi3, mass3, pt4, eta4, phi4, mass4);
65 std::cout <<
"\nInvariantMass(pt1 = " << pt3 <<
",\n"
66 <<
" eta1 = " << eta3 <<
",\n"
67 <<
" phi1 = " << phi3 <<
",\n"
68 <<
" mass1 = " << mass3 <<
",\n"
69 <<
" pt2 = " << pt4 <<
",\n"
70 <<
" eta2 = " << eta4 <<
",\n"
71 <<
" phi2 = " << phi4 <<
",\n"
72 <<
" mass2 = " << mass4 <<
")\n"
73 <<
" = " << invMass <<
"\n";
80 std::cout <<
"\nInvariantMass(pt = " << pt3 <<
",\n"
81 <<
" eta = " << eta3 <<
",\n"
82 <<
" phi = " << phi3 <<
",\n"
83 <<
" mass = " << mass3 <<
")\n"
84 <<
" = " << invMass2 <<
"\n";
Vector1::Scalar DeltaR(const Vector1 &v1, const Vector2 &v2)
Find difference in pseudorapidity (Eta) and Phi betwen two generic vectors The only requirements on t...
Vector1::Scalar DeltaPhi(const Vector1 &v1, const Vector2 &v2)
Find aximutal Angle difference between two generic vectors ( v2.Phi() - v1.Phi() ) The only requireme...
Vector1::Scalar InvariantMass(const Vector1 &v1, const Vector2 &v2)
return the invariant mass of two LorentzVector The only requirement on the LorentzVector is that they...
RVec< T > InvariantMasses(const RVec< T > &pt1, const RVec< T > &eta1, const RVec< T > &phi1, const RVec< T > &mass1, const RVec< T > &pt2, const RVec< T > &eta2, const RVec< T > &phi2, const RVec< T > &mass2)
Return the invariant mass of two particles given the collections of the quantities transverse momentu...
RVec< T > Take(const RVec< T > &v, const RVec< typename RVec< T >::size_type > &i)
Return elements of a vector at given indices.
RVec< RVec< std::size_t > > Combinations(const std::size_t size1, const std::size_t size2)
Return the indices that represent all combinations of the elements of two RVecs.