15#include "CLHEP/Vector/defs.h"
16#include "CLHEP/Vector/LorentzVector.h"
30 }
else if ( ee < w.ee ) {
56 double epsilon)
const {
57 double limit = std::fabs(pp.
dot(w.pp));
58 limit += .25*((ee+w.ee)*(ee+w.ee));
59 limit *= epsilon*epsilon;
60 double delta = (pp - w.pp).
mag2();
61 delta += (ee-w.ee)*(ee-w.ee);
62 return (delta <= limit );
66 double wdw = std::fabs(pp.
dot(w.pp)) + .25*((ee+w.ee)*(ee+w.ee));
67 double delta = (pp - w.pp).
mag2() + (ee-w.ee)*(ee-w.ee);
68 if ( (wdw > 0) && (delta < wdw) ) {
69 return std::sqrt (delta/wdw);
70 }
else if ( (wdw == 0) && (delta == 0) ) {
85 double tTotal = (ee + w.ee);
87 double vTotal2 = vTotal.
mag2();
89 if ( vTotal2 >= tTotal*tTotal ) {
98 return (
isNear(w, epsilon));
103 double tRecip = 1./tTotal;
114 double b2 = vTotal2*tRecip*tRecip;
116 double ggamma = std::sqrt(1./(1.-b2));
117 double boostDotV1 = bboost.
dot(pp);
118 double gm1_b2 = (ggamma-1)/b2;
121 ggamma * (ee + boostDotV1) );
123 double boostDotV2 = bboost.
dot(w.pp);
125 ggamma * (w.ee + boostDotV2) );
127 return (w1.
isNear(w2, epsilon));
133 double tTotal = (ee + w.ee);
135 double vTotal2 = vTotal.
mag2();
137 if ( vTotal2 >= tTotal*tTotal ) {
149 if ( vTotal2 == 0 ) {
155 double tRecip = 1./tTotal;
166 double b2 = vTotal2*tRecip*tRecip;
169 "boost vector in howNearCM appears to be tachyonic"));
171 double ggamma = std::sqrt(1./(1.-b2));
172 double boostDotV1 = bboost.
dot(pp);
173 double gm1_b2 = (ggamma-1)/b2;
176 ggamma * (ee + boostDotV1) );
178 double boostDotV2 = bboost.
dot(w.pp);
180 ggamma * (w.ee + boostDotV2) );
195 double a =
eta() - w.
eta();
198 return std::sqrt ( a*a + b*b );
243 return (x1 < 1) ? x1 : 1;
249 double twoT2 = 2*ee*ee;
double dot(const Hep3Vector &) const
double deltaPhi(const Hep3Vector &v2) const
int compare(const Hep3Vector &v) const
bool isParallel(const HepLorentzVector &w, double epsilon=tolerance) const
bool isNearCM(const HepLorentzVector &w, double epsilon=tolerance) const
int compare(const HepLorentzVector &w) const
double howParallel(const HepLorentzVector &w) const
bool operator<=(const HepLorentzVector &w) const
double deltaR(const HepLorentzVector &v) const
double euclideanNorm() const
double howNear(const HepLorentzVector &w) const
double howLightlike() const
double howNearCM(const HepLorentzVector &w) const
bool operator<(const HepLorentzVector &w) const
double euclideanNorm2() const
bool isNear(const HepLorentzVector &w, double epsilon=tolerance) const
bool operator>(const HepLorentzVector &w) const
bool operator>=(const HepLorentzVector &w) const
double norm(const HepGenMatrix &m)