Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F9501746
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
View Options
diff --git a/include/HEJ/LorentzVector.hh b/include/HEJ/LorentzVector.hh
index 8190f92..1f4271d 100644
--- a/include/HEJ/LorentzVector.hh
+++ b/include/HEJ/LorentzVector.hh
@@ -1,25 +1,33 @@
/** \file
* \brief Auxiliary functions for Lorentz vectors
*
* \authors The HEJ collaboration (see AUTHORS for details)
* \date 2019
* \copyright GPLv2 or later
*/
#pragma once
#include "CLHEP/Vector/LorentzVector.h"
namespace HEJ {
inline
auto dot(
CLHEP::HepLorentzVector const & h1,
CLHEP::HepLorentzVector const & h2
) {
return h1.dot(h2);
}
inline
auto m2(CLHEP::HepLorentzVector const & h1) {
return h1.m2();
}
+
+ //! Split a single momentum into two lightlike momenta
+ /**
+ * @param p Momentum to be split
+ * @returns A pair (p1, p2) of momenta with p = p1 + p2 and p1^2 = p2^2 = 0
+ */
+ std::pair<CLHEP::HepLorentzVector, CLHEP::HepLorentzVector>
+ split_into_lightlike(CLHEP::HepLorentzVector const & p);
}
diff --git a/src/LorentzVector.cc b/src/LorentzVector.cc
new file mode 100644
index 0000000..4e241b3
--- /dev/null
+++ b/src/LorentzVector.cc
@@ -0,0 +1,38 @@
+/**
+ * \authors The HEJ collaboration (see AUTHORS for details)
+ * \date 2020
+ * \copyright GPLv2 or later
+ */
+#include "HEJ/LorentzVector.hh"
+
+#include <cmath>
+#include <utility>
+
+namespace HEJ {
+ std::pair<CLHEP::HepLorentzVector, CLHEP::HepLorentzVector>
+ split_into_lightlike(CLHEP::HepLorentzVector const & p) {
+ /*
+ * We take the ansatz
+ * p1 = (E, px, py, pz) = pt*(cosh(y), cos(phi), sin(phi), sinh(y))
+ * p2 = (E2, 0, 0, +-E2)
+ * and solve p1 + p2 = p for y and E2 (phi and pt are the same in p1 and p).
+ * The sign in p2 is chosen such that a real-valued solution exists
+ */
+ const double pt = p.perp();
+ if(p.plus() > 0){
+ const double y = std::log(p.plus()/pt);
+ const double E2 = (p.minus() - pt*pt/p.plus())/2.;
+ return std::make_pair(
+ CLHEP::HepLorentzVector{p.x(), p.y(), pt*std::sinh(y), pt*std::cosh(y)},
+ CLHEP::HepLorentzVector{0., 0., E2, -E2}
+ );
+ } else {
+ const double y = std::log(pt/p.minus());
+ const double E2 = (p.plus() - pt*pt/p.minus())/2.;
+ return std::make_pair(
+ CLHEP::HepLorentzVector{p.x(), p.y(), pt*std::sinh(y), pt*std::cosh(y)},
+ CLHEP::HepLorentzVector{0., 0., E2, +E2}
+ );
+ }
+ }
+}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Feb 23, 3:01 PM (5 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4466908
Default Alt Text
(2 KB)
Attached To
rHEJ HEJ
Event Timeline
Log In to Comment