Skip to content
Snippets Groups Projects
Commit aa749aa3 authored by Alex Jentsch's avatar Alex Jentsch
Browse files

I miss the TLorentzVectors from Root5. Sigh.

parent 1dea1590
No related branches found
No related tags found
No related merge requests found
......@@ -48,9 +48,17 @@ auto momentum = [](std::vector<ROOT::Math::PxPyPzMVector> const& in) {
};
auto theta = [](std::vector<ROOT::Math::PxPyPzMVector> const& in) {
std::vector<double> result;
ROOT::Math::PxPyPzMVector transFourVect;
for (size_t i = 0; i < in.size(); ++i) {
in[i].RotationY(-crossingAngle);
result.push_back(in[i].Theta()*1000);
Double_t s = std::sin(-crossingAngle);
Double_t c = std::cos(-crossingAngle);
Double_t zz = in[i].Pz();
Double_t xx = in[i].Px();
pz = c*zz - s*xx;
px = s*zz + c*xx;
transFourVect.SetPxPyPzE(in[i].Px(), in[i].Py(), in[i].Pz, in[i].E());
result.push_back(transFourVect.Theta()*1000);
}
return result;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment