Commit 091b172e authored by Lynn Garren's avatar Lynn Garren
Browse files

merging changes from 1.9

parent c3495a44
2005-11-03 Lynn Garren <garren@fnal.gov>
* configure.in, LorentzVector.icc
Provide a flag to enable code differences when compiling with
Visual C++.
==============================
22.06.05 Release CLHEP-2.0.2.1
==============================
......
// -*- C++ -*-
// $Id: LorentzVector.icc,v 1.2 2003/10/10 21:42:35 garren Exp $
// $Id: LorentzVector.icc,v 1.2.4.1 2005/11/14 15:49:16 garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
......@@ -144,7 +144,13 @@ inline double HepLorentzVector::angle(const Hep3Vector &v) const {
}
inline double HepLorentzVector::mag2() const {
#if defined USING_VISUAL
// kludge for problem building Windows DLL
double r = metric*(t()*t() - pp.mag2());
return r;
#else
return metric*(t()*t() - pp.mag2());
#endif
}
inline double HepLorentzVector::mag() const {
......@@ -200,7 +206,13 @@ HepLorentzVector::setVectM(const Hep3Vector & spatial, double mass) {
}
inline double HepLorentzVector::dot(const HepLorentzVector & q) const {
#if defined USING_VISUAL
// kludge for problem building Windows DLL
double r = metric*(t()*q.t() - z()*q.z() - y()*q.y() - x()*q.x());
return r;
#else
return metric*(t()*q.t() - z()*q.z() - y()*q.y() - x()*q.x());
#endif
}
inline double
......@@ -357,7 +369,13 @@ inline bool HepLorentzVector::isLightlike(double epsilon) const {
}
inline double HepLorentzVector::diff2( const HepLorentzVector & w ) const {
#if defined USING_VISUAL
// kludge for problem building Windows DLL
double r= metric*( (ee-w.ee)*(ee-w.ee) - (pp-w.pp).mag2() );
return r;
#else
return metric*( (ee-w.ee)*(ee-w.ee) - (pp-w.pp).mag2() );
#endif
}
inline double HepLorentzVector::delta2Euclidean
......
......@@ -131,6 +131,12 @@ AH_VERBATIM([VERSION],[/* Version number of package */
#undef VERSION
#endif])
## Visual C++ compile flag
AH_VERBATIM([USING_VISUAL],[/* special compile requirements for Visual C++ */
#ifndef USING_VISUAL
#undef USING_VISUAL
#endif])
AH_BOTTOM([#endif // VECTOR_DEFS_H])
......@@ -228,6 +234,7 @@ cl)
build_static="no"
build_shared="yes"
build_visual="yes"
AC_DEFINE([USING_VISUAL], [TRUE], [building with Visual C++])
;;
CC)
case "$target" in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment