12 #pragma implementation
47 std::cerr <<
"HepLorentzVector::plus() - "
48 <<
"A zero vector used as reference to LorentzVector plus-part"
58 std::cerr <<
"HepLorentzVector::minus() - "
59 <<
"A zero vector used as reference to LorentzVector minus-part"
80 std::cerr <<
"HepLorentzVector::beta() - "
81 <<
"beta computed for HepLorentzVector with t=0 -- infinite result"
101 std::cerr <<
"HepLorentzVector::gamma() - "
102 <<
"gamma computed for HepLorentzVector with t=0 -- zero result"
108 std::cerr <<
"HepLorentzVector::gamma() - "
109 <<
"gamma computed for a spacelike HepLorentzVector -- imaginary result"
118 return 1./std::sqrt(1. - v2/t2 );
135 if (std::fabs(
ee) < std::fabs(z1)) {
136 std::cerr <<
"HepLorentzVector::rapidity() - "
137 <<
"rapidity for spacelike 4-vector with |E| < |Pz| -- undefined"
141 double q = (
ee + z1) / (
ee - z1);
144 return .5 * std::log(q);
148 double r = ref.
mag2();
150 std::cerr <<
"HepLorentzVector::rapidity() - "
151 <<
"A zero vector used as reference to LorentzVector rapidity"
155 double vdotu =
pp.
dot(ref)/std::sqrt(r);
161 if (std::fabs(
ee) < std::fabs(vdotu)) {
162 std::cerr <<
"HepLorentzVector::rapidity() - "
163 <<
"rapidity for spacelike 4-vector with |E| < |P*ref| -- undefined "
167 double q = (
ee + vdotu) / (
ee - vdotu);
168 return .5 * std::log(q);
172 double v1 =
pp.
mag();
178 if (std::fabs(
ee) < std::fabs(v1)) {
179 std::cerr <<
"HepLorentzVector::coLinearRapidity() - "
180 <<
"co-linear rapidity for spacelike 4-vector -- undefined"
184 double q = (
ee + v1) / (
ee - v1);
185 return .5 * std::log(q);
196 if (
ee * w.
ee < 0 ) {
197 std::cerr <<
"HepLorentzVector::invariantMass() - "
198 <<
"invariant mass meaningless: \n"
199 <<
"a negative-mass input led to spacelike 4-vector sum" << std::endl;
203 std::cerr <<
"HepLorentzVector::invariantMass() - "
204 <<
"invariant mass meaningless because of spacelike input"
216 return (
ee+w.
ee >=0 ) ? std::sqrt(m1) : - std::sqrt(m1);
231 if (v1.
mag2() == 0) {
234 std::cerr <<
"HepLorentzVector::findBoostToCM() - "
235 <<
"boostToCM computed for two 4-vectors with combined t=0 -- "
236 <<
"infinite result" << std::endl;
double invariantMass2() const
double invariantMass() const
Hep3Vector findBoostToCM() const
double dot(const Hep3Vector &) const
static ZMpvMetric_t setMetric(ZMpvMetric_t met)
HepLorentzVector rest4Vector() const
static ZMpvMetric_t getMetric()
double coLinearRapidity() const
Hep3Vector boostVector() const
static DLL_API double metric
bool isLightlike(double epsilon=tolerance) const