CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

ZMxpv.cc

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------
00002 //
00003 //  ZMxpv.cc    Support for Vector package in the ZOOM context, where
00004 //              probelmatic conditions are handled via ZOOM Exceptions.
00005 //
00006 //              In the CLHEP context (that is, unless ENABLE_ZOOM_EXCEPTIONS
00007 //              is defined) this file is content-free.
00008 //
00009 //              ZMexception's are ZMthrown by classes in the PhysicsVectors
00010 //              package.  (To avoid name clashes, these start with ZMxpv.)
00011 //              Each possible such exception must be provided with some
00012 //              defining properties:  thowe are in this file.
00013 //
00014 // History:
00015 //   19-Nov-1997  MF    Initial version, to enable the ZMthrow exceptions
00016 //                      in SpaceVector.
00017 //   15-Jun-1998  WEB   Added namespace support
00018 //   08-Jan-2001  MF    Moved into CLHEP
00019 //   09-Oct-2003  MF    Major addition:  Exception class defs for CLHEP case
00020 //
00021 // ----------------------------------------------------------------------
00022 
00023 
00024 #include "CLHEP/Vector/ZMxpv.h"
00025 
00026 #ifndef ENABLE_ZOOM_EXCEPTIONS
00027 
00028 CLHEP_vector_exception::CLHEP_vector_exception 
00029                 ( const std::string & s1 ) throw() : message(s1) {}             
00030 
00031 const char* 
00032 CLHEP_vector_exception::what() const throw() { 
00033   static std::string answer;
00034   answer  = name();
00035   answer += ": ";
00036   answer += message;  
00037   return answer.c_str(); 
00038 }
00039 
00040 #define CLHEP_vector_exception_methods(NAME)                                \
00041   NAME::NAME(const std::string & s1) throw() : CLHEP_vector_exception(s1) {}  \
00042   const char* NAME::name() const throw() {                                  \
00043     return #NAME;                                                           \
00044   }
00045 
00046 CLHEP_vector_exception_methods( ZMxPhysicsVectors )
00047 CLHEP_vector_exception_methods( ZMxpvSpacelike )
00048 CLHEP_vector_exception_methods( ZMxpvNegativeMass )
00049 CLHEP_vector_exception_methods( ZMxpvVectorInputFails )
00050 CLHEP_vector_exception_methods( ZMxpvIndexRange )
00051 CLHEP_vector_exception_methods( ZMxpvFixedAxis )
00052 
00053 CLHEP_vector_exception_methods( ZMxpvTachyonic )
00054 CLHEP_vector_exception_methods( ZMxpvZeroVector )
00055 CLHEP_vector_exception_methods( ZMxpvImproperTransformation )
00056 CLHEP_vector_exception_methods( ZMxpvInfiniteVector )
00057 CLHEP_vector_exception_methods( ZMxpvInfinity )
00058 CLHEP_vector_exception_methods( ZMxpvImproperRotation )
00059 CLHEP_vector_exception_methods( ZMxpvAmbiguousAngle )
00060 
00061 CLHEP_vector_exception_methods( ZMxpvNegativeR )
00062 CLHEP_vector_exception_methods( ZMxpvUnusualTheta )
00063 CLHEP_vector_exception_methods( ZMxpvParallelCols )
00064 CLHEP_vector_exception_methods( ZMxpvNotOrthogonal )
00065 CLHEP_vector_exception_methods( ZMxpvNotSymplectic )
00066 
00067 #endif // endif for ifndef ENABLE_ZOOM_EXCEPTIONS 
00068 
00069 // ========================================================================
00070 // ========================================================================
00071 // ========================================================================
00072 
00073 #ifdef ENABLE_ZOOM_EXCEPTIONS
00074 
00075 ZM_BEGIN_NAMESPACE( zmpv )      /*  namespace zmpv  {  */
00076 
00077 
00078 ZMexClassInfo ZMxPhysicsVectors::_classInfo (
00079         "ZMxPhysicsVectors",
00080         "PhysicsVectors",
00081         ZMexSEVERE );
00082 // General Exception in a PhysicsVectors routine
00083 
00084 ZMexClassInfo ZMxpvInfiniteVector::_classInfo (
00085         "InfiniteVector",
00086         "PhysicsVectors",
00087         ZMexERROR );
00088 // Infinite vector component
00089 
00090 ZMexClassInfo ZMxpvZeroVector::_classInfo (
00091         "ZeroVector",
00092         "PhysicsVectors",
00093         ZMexERROR );
00094 // Zero Vector cannot be converted to Unit Vector
00095 
00096 ZMexClassInfo ZMxpvTachyonic::_classInfo (
00097         "Tachyonic",
00098         "PhysicsVectors",
00099         ZMexERROR );
00100 // Relativistic method using vector representing speed greater than light
00101 
00102 ZMexClassInfo ZMxpvSpacelike::_classInfo (
00103         "Spacelike",
00104         "PhysicsVectors",
00105         ZMexERROR );
00106 // Spacelike 4-vector used in context where rest mass or gamma needs computing
00107 
00108 ZMexClassInfo ZMxpvInfinity::_classInfo (
00109         "Infinity",
00110         "PhysicsVectors",
00111         ZMexERROR );
00112 // Mathematical operation will lead to infinity as a Scalar result
00113 
00114 ZMexClassInfo ZMxpvNegativeMass::_classInfo (
00115         "NegativeMass",
00116         "PhysicsVectors",
00117         ZMexERROR );
00118 // Kinematic operation was rendered meaningless by an input with negative t
00119 
00120 ZMexClassInfo ZMxpvAmbiguousAngle::_classInfo (
00121         "AmbiguousAngle",
00122         "PhysicsVectors",
00123         ZMexWARNING );
00124 // Angle requested ill-defined, due to null or collinear vectors
00125 
00126 ZMexClassInfo ZMxpvNegativeR::_classInfo (
00127         "NegativeR",
00128         "PhysicsVectors",
00129         ZMexWARNING );
00130 // Negative value supplied for vector magnitude
00131 
00132 ZMexClassInfo ZMxpvUnusualTheta::_classInfo (
00133         "UnusualTheta",
00134         "PhysicsVectors",
00135         ZMexWARNING );
00136 // Theta supplied for polar coordinates outside of [0,PI]
00137 
00138 ZMexClassInfo ZMxpvVectorInputFails::_classInfo (
00139         "VectorInputFails",
00140         "PhysicsVectors",
00141         ZMexERROR );
00142 // Theta supplied for polar coordinates outside of [0,PI]
00143 
00144 ZMexClassInfo ZMxpvParallelCols::_classInfo (
00145         "ParallelCols",
00146         "PhysicsVectors",
00147         ZMexERROR );
00148 // Col's supplied to form a Rotation are parallel instead of orthogonal
00149 
00150 ZMexClassInfo ZMxpvImproperRotation::_classInfo (
00151         "ImproperRotation",
00152         "PhysicsVectors",
00153         ZMexERROR );
00154 // Col's supplied to form a Rotation form a (rotation+reflection) instead
00155 
00156 ZMexClassInfo ZMxpvImproperTransformation::_classInfo (
00157         "ImproperRotation",
00158         "PhysicsVectors",
00159         ZMexERROR );
00160 // Rows supplied to form a LorentzTransformation form tachyonic or reflection
00161 
00162 ZMexClassInfo ZMxpvNotOrthogonal::_classInfo (
00163         "NotOrthogonal",
00164         "PhysicsVectors",
00165         ZMexWARNING );
00166 // Col's supplied to form a Rotation or LorentzTransformation are not orthogonal
00167 
00168 ZMexClassInfo ZMxpvNotSymplectic::_classInfo (
00169         "NotSymplectic",
00170         "PhysicsVectors",
00171         ZMexWARNING );
00172 // A row supplied as part of a LorentzTransformation has wrong restmass()
00173 
00174 
00175 ZMexClassInfo ZMxpvFixedAxis::_classInfo (
00176         "FixedAxis",
00177         "PhysicsVectors",
00178         ZMexERROR );
00179 // An attempt to change the axis is of a rotation fixed to be about X Y or Z.
00180 
00181 ZMexClassInfo ZMxpvIndexRange::_classInfo (
00182         "IndexRange",
00183         "PhysicsVectors",
00184         ZMexERROR );
00185 // An attempt to access a vector in the p(i) notation, where i is out of range.
00186 
00187 
00188 ZM_END_NAMESPACE( zmpv )        /*  }  // namespace zmpv  */
00189 
00190 #endif  // endif for ifdef ENAMBLE_ZOOM_EXCEPTIONS

Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7