16 #pragma implementation
19 #include "CLHEP/Vector/defs.h"
20 #include "CLHEP/Vector/LorentzVector.h"
33 }
else if ( ee < w.ee ) {
59 double epsilon)
const {
60 double limit = std::fabs(pp.
dot(w.pp));
61 limit += .25*((ee+w.ee)*(ee+w.ee));
62 limit *= epsilon*epsilon;
63 double delta = (pp - w.pp).
mag2();
64 delta += (ee-w.ee)*(ee-w.ee);
65 return (delta <= limit );
69 double wdw = std::fabs(pp.
dot(w.pp)) + .25*((ee+w.ee)*(ee+w.ee));
70 double delta = (pp - w.pp).
mag2() + (ee-w.ee)*(ee-w.ee);
71 if ( (wdw > 0) && (delta < wdw) ) {
72 return std::sqrt (delta/wdw);
73 }
else if ( (wdw == 0) && (delta == 0) ) {
88 double tTotal = (ee + w.ee);
90 double vTotal2 = vTotal.
mag2();
92 if ( vTotal2 >= tTotal*tTotal ) {
100 if ( vTotal2 == 0 ) {
101 return (
isNear(w, epsilon));
106 double tRecip = 1./tTotal;
117 double b2 = vTotal2*tRecip*tRecip;
119 register double ggamma = std::sqrt(1./(1.-b2));
120 register double boostDotV1 = bboost.
dot(pp);
121 register double gm1_b2 = (ggamma-1)/b2;
124 ggamma * (ee + boostDotV1) );
126 register double boostDotV2 = bboost.
dot(w.pp);
128 ggamma * (w.ee + boostDotV2) );
130 return (w1.
isNear(w2, epsilon));
136 double tTotal = (ee + w.ee);
138 double vTotal2 = vTotal.
mag2();
140 if ( vTotal2 >= tTotal*tTotal ) {
152 if ( vTotal2 == 0 ) {
158 double tRecip = 1./tTotal;
169 double b2 = vTotal2*tRecip*tRecip;
172 "boost vector in howNearCM appears to be tachyonic"));
174 register double ggamma = std::sqrt(1./(1.-b2));
175 register double boostDotV1 = bboost.
dot(pp);
176 register double gm1_b2 = (ggamma-1)/b2;
179 ggamma * (ee + boostDotV1) );
181 register double boostDotV2 = bboost.
dot(w.pp);
183 ggamma * (w.ee + boostDotV2) );
201 return std::sqrt (
a*
a +
b*
b );
246 return (x1 < 1) ? x1 : 1;
252 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)