Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F9501742
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 1f4271d..fe8bc83 100644
--- a/include/HEJ/LorentzVector.hh
+++ b/include/HEJ/LorentzVector.hh
@@ -1,33 +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
+ //! Split a single Lorentz vector into two lightlike Lorentz vectors
/**
- * @param p Momentum to be split
- * @returns A pair (p1, p2) of momenta with p = p1 + p2 and p1^2 = p2^2 = 0
+ * @param p Lorentz vector to be split
+ * @returns A pair (p1, p2) of Lorentz vectors 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
index 4e241b3..bcc6169 100644
--- a/src/LorentzVector.cc
+++ b/src/LorentzVector.cc
@@ -1,38 +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.;
+ const double E2 = p.m2()/(2.*p.plus());
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.;
+ const double E2 = p.m2()/(2.*p.minus());
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, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4485711
Default Alt Text
(2 KB)
Attached To
rHEJ HEJ
Event Timeline
Log In to Comment