13 #pragma implementation
35 std::cerr <<
"HepLorentzVector subscripting: bad index (" << i <<
")"
52 <<
"HepLorentzVector subscripting: bad index (" << i <<
")"
59 (
double bx,
double by,
double bz){
60 double b2 = bx*bx + by*by + bz*bz;
61 double ggamma = 1.0 / std::sqrt(1.0 - b2);
62 double bp = bx*
x() + by*
y() + bz*
z();
63 double gamma2 = b2 > 0 ? (ggamma - 1.0)/b2 : 0.0;
65 setX(
x() + gamma2*bp*bx + ggamma*bx*t());
66 setY(
y() + gamma2*bp*by + ggamma*by*t());
67 setZ(
z() + gamma2*bp*bz + ggamma*bz*t());
68 setT(ggamma*(t() + bp));
92 return os <<
"(" << v1.
x() <<
"," << v1.
y() <<
"," << v1.
z()
93 <<
";" << v1.
t() <<
")";
109 if (is.fail() || c !=
'(' ) {
110 std::cerr <<
"Could not find required opening parenthesis "
111 <<
"in input of a HepLorentzVector" << std::endl;
115 is >> x >> std::ws >> c;
116 if (is.fail() || c !=
',' ) {
117 std::cerr <<
"Could not find x value and required trailing comma "
118 <<
"in input of a HepLorentzVector" << std::endl;
122 is >> y >> std::ws >> c;
123 if (is.fail() || c !=
',' ) {
124 std::cerr <<
"Could not find y value and required trailing comma "
125 <<
"in input of a HepLorentzVector" << std::endl;
129 is >> z >> std::ws >> c;
130 if (is.fail() || c !=
';' ) {
131 std::cerr <<
"Could not find z value and required trailing semicolon "
132 <<
"in input of a HepLorentzVector" << std::endl;
136 is >> t >> std::ws >> c;
137 if (is.fail() || c !=
')' ) {
138 std::cerr <<
"Could not find t value and required close parenthesis "
139 <<
"in input of a HepLorentzVector" << std::endl;
159 double oneOverC = 1.0/c;
172 double oneOverC = 1.0/c;
174 w.
getT() * oneOverC);
182 std::cerr <<
"HepLorentzVector::boostVector() - "
183 <<
"boostVector computed for LorentzVector with t=0 -- infinite result"
189 std::cerr <<
"HepLorentzVector::boostVector() - "
190 <<
"boostVector computed for a non-timelike LorentzVector " << std::endl;
198 double b2 = bbeta*bbeta;
200 std::cerr <<
"HepLorentzVector::boostX() - "
201 <<
"boost along X with beta >= 1 (speed of light) -- \n"
202 <<
"no boost done" << std::endl;
204 double ggamma = std::sqrt(1./(1-b2));
213 double b2 = bbeta*bbeta;
215 std::cerr <<
"HepLorentzVector::boostY() - "
216 <<
"boost along Y with beta >= 1 (speed of light) -- \n"
217 <<
"no boost done" << std::endl;
219 double ggamma = std::sqrt(1./(1-b2));
228 double b2 = bbeta*bbeta;
230 std::cerr <<
"HepLorentzVector::boostZ() - "
231 <<
"boost along Z with beta >= 1 (speed of light) -- \n"
232 <<
"no boost done" << std::endl;
234 double ggamma = std::sqrt(1./(1-b2));
HepLorentzVector & boostX(double beta)
std::ostream & operator<<(std::ostream &os, const HepRandom &dist)
static double getTolerance()
std::vector< ExP01TrackerHit * > a
double operator()(int) const
HepLorentzVector operator/(const HepLorentzVector &, double a)
HepLorentzVector & boostY(double beta)
HepLorentzVector & rotateX(double)
Hep3Vector & rotateX(double)
Hep3Vector & rotateUz(const Hep3Vector &)
std::istream & operator>>(std::istream &is, HepRandom &dist)
static double setTolerance(double tol)
HepLorentzVector & rotateUz(const Hep3Vector &)
HepLorentzVector & operator/=(double)
static DLL_API double tolerance
HepLorentzVector & rotateY(double)
Hep3Vector & rotateZ(double)
HepLorentzVector & rotateZ(double)
Hep3Vector boostVector() const
HepLorentzVector & boostZ(double beta)
Hep3Vector & rotateY(double)
HepLorentzVector & boost(double, double, double)
static DLL_API double metric