10 #include <ROOT/RDataFrame.hxx>
11 #include <ROOT/RVec.hxx>
12 #include <Math/Vector4Dfwd.h>
13 #include <Math/Vector4D.h>
15 using namespace ROOT::VecOps;
17 ROOT::Math::PtEtaPhiMVector
quadrivectot(RVec<float>& pt, RVec<float>& eta, RVec<float>& phi, RVec<float>& mass){
31 ROOT::Math::PtEtaPhiMVector m1(pt[0], eta[0], phi[0], mass[0]);
32 ROOT::Math::PtEtaPhiMVector m2(pt[1], eta[1], phi[1], mass[1]);
39 ROOT::Math::PtEtaPhiMVector
quadrivec1(RVec<float>& pt, RVec<float>& eta, RVec<float>& phi, RVec<float>& mass){
52 ROOT::Math::PtEtaPhiMVector m1(pt[0], eta[0], phi[0], mass[0]);
59 ROOT::Math::PtEtaPhiMVector
quadrivec2(RVec<float>& pt, RVec<float>& eta, RVec<float>& phi, RVec<float>& mass){
72 ROOT::Math::PtEtaPhiMVector m2(pt[1], eta[1], phi[1], mass[1]);
90 auto df_2mu_MC = df.Define(
"quadrivectot",
quadrivectot,{
"Muon_pt",
"Muon_eta",
"Muon_phi",
"Muon_mass"});
92 df_2mu_MC = df_2mu_MC.Define(
"quadrivec1",
quadrivec1,{
"Muon_pt",
"Muon_eta",
"Muon_phi",
"Muon_mass"});
94 df_2mu_MC = df_2mu_MC.Define(
"quadrivec2",
quadrivec2,{
"Muon_pt",
"Muon_eta",
"Muon_phi",
"Muon_mass"});
96 df_2mu_MC = df_2mu_MC.Define(
"dimuon_mass",
"quadrivectot.mass()");
98 df_2mu_MC = df_2mu_MC.Define(
"y",
"quadrivectot.Rapidity()");
100 df_2mu_MC = df_2mu_MC.Define(
"ptll",
"quadrivectot.Pt()");
102 df_2mu_MC = df_2mu_MC.Define(
"Pztot",
"quadrivectot.Pz()");
104 df_2mu_MC = df_2mu_MC.Define(
"Pz1",
"quadrivec1.Pz()");
106 df_2mu_MC = df_2mu_MC.Define(
"Pz2",
"quadrivec2.Pz()");
108 df_2mu_MC = df_2mu_MC.Define(
"E",
"quadrivectot.E()");
110 df_2mu_MC = df_2mu_MC.Define(
"E1",
"quadrivec1.E()");
112 df_2mu_MC = df_2mu_MC.Define(
"E2",
"quadrivec2.E()");
114 df_2mu_MC = df_2mu_MC.Define(
"Pp1",
"(E1+Pz1)/pow(2,0.5)");
116 df_2mu_MC = df_2mu_MC.Define(
"Pp2",
"(E2+Pz2)/pow(2,0.5)");
118 df_2mu_MC = df_2mu_MC.Define(
"Pm1",
"(E1-Pz1)/pow(2,0.5)");
120 df_2mu_MC = df_2mu_MC.Define(
"Pm2",
"(E2-Pz2)/pow(2,0.5)");
122 df_2mu_MC = df_2mu_MC.Define(
"costheta",
"2*(Pp1*Pm2-Pm1*Pp2)*Pztot/(pow(pow(dimuon_mass,2)*(pow(dimuon_mass,2)+pow(ptll,2)),0.5)*fabs(Pztot))");
ROOT::Math::PtEtaPhiMVector quadrivec1(RVec< float > &pt, RVec< float > &eta, RVec< float > &phi, RVec< float > &mass)
Definition: utilities.h:39
ROOT::Math::PtEtaPhiMVector quadrivectot(RVec< float > &pt, RVec< float > &eta, RVec< float > &phi, RVec< float > &mass)
Definition: utilities.h:17
auto allquantities(ROOT::RDataFrame df)
Definition: utilities.h:79
ROOT::Math::PtEtaPhiMVector quadrivec2(RVec< float > &pt, RVec< float > &eta, RVec< float > &phi, RVec< float > &mass)
Definition: utilities.h:59