00001 // $Id: StFormulary.hh,v 1.5 2003/09/16 15:27:01 jcs Exp $ 00002 // $Log: StFormulary.hh,v $ 00003 // Revision 1.5 2003/09/16 15:27:01 jcs 00004 // removed inline as it would leave a few undefined reference 00005 // 00006 // Revision 1.4 2002/10/03 10:33:57 oldi 00007 // Usage of gufld removed. 00008 // Magnetic field is read by StMagUtilities, now. 00009 // 00010 // Revision 1.3 2002/04/09 16:10:11 oldi 00011 // Method to get the magentic field factor moved to StFormulary. It works for 00012 // simulation as well, now. 00013 // 00014 // Revision 1.2 2000/07/18 21:22:15 oldi 00015 // Changes due to be able to find laser tracks. 00016 // Cleanup: - new functions in StFtpcConfMapper, StFtpcTrack, and StFtpcPoint 00017 // to bundle often called functions 00018 // - short functions inlined 00019 // - formulas of StFormulary made static 00020 // - avoid streaming of objects of unknown size 00021 // (removes the bunch of CINT warnings during compile time) 00022 // - two or three minor bugs cured 00023 // 00024 // Revision 1.1 2000/05/10 13:39:05 oldi 00025 // Initial version of StFtpcTrackMaker 00026 // 00027 00028 #ifndef STAR_StFormulary 00029 #define STAR_StFormulary 00030 00031 #include "TMath.h" 00032 00033 #ifndef ROOT_Rtypes 00034 #include "Rtypes.h" 00035 #endif 00036 00037 class StFormulary 00038 { 00039 public: 00040 00041 static Double_t CheckASinArg(Double_t asin_arg); // returns +1. if asin_arg>1. or -1. if asin_arg<-1. 00042 static Double_t RelDiff(const Double_t p1, const Double_t p2); // retuns the relative difference of two values 00043 static void Pq(const Double_t *p, const Double_t *q, Double_t x[2]); // x(y=0) values of a parabola 00044 static Double_t Angle(const Double_t *x1, const Double_t *x2, Int_t dim = 3); // angle between to vectors 00045 static Double_t Dist_squared(const Double_t *p1, const Double_t *p2, Int_t dim = 3); // squared distance of two points in space 00046 static Double_t Dist(const Double_t *p1, const Double_t *p2, Int_t dim = 3); // distance of two points in space 00047 static void VectorProd(const Double_t *a, const Double_t *b, Double_t *c); // vector product (3D) 00048 static Double_t ScalarProd(const Double_t *a, const Double_t *b, Int_t dim = 3); // scalar product of two verctors 00049 static Double_t Square(const Double_t *p, Int_t dim = 3); // squared length of a vector 00050 static void Sum(const Double_t *p1, const Double_t *p2, Double_t *P, Int_t n = 3); // sum of two vectors 00051 static void Diff(const Double_t *p1, const Double_t *p2, Double_t *P, Int_t n = 3); // difference of two vectors 00052 static Double_t Abs(const Double_t *p, Int_t dim = 3); // length of a vector 00053 00054 ClassDef(StFormulary,0) // Mathematical formulary 00055 }; 00056 00057 00058 #endif
1.5.9